@texturehq/edges 5.18.0 → 5.19.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.cjs CHANGED
@@ -1,19 +1,106 @@
1
- 'use strict';var reactAriaComponents=require('react-aria-components'),Ze=require('react'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),Nf=require('@phosphor-icons/react'),luxon=require('luxon'),reactVirtual=require('@tanstack/react-virtual'),mN=require('@phosphor-icons/react/ssr'),reactAria=require('react-aria'),reactStately=require('react-stately'),lucideReact=require('lucide-react'),framerMotion=require('framer-motion'),pk=require('react-ace'),reactColorful=require('react-colorful'),curve=require('@visx/curve'),shape=require('@visx/shape'),gradient=require('@visx/gradient'),group=require('@visx/group'),scale=require('@visx/scale'),d3Array=require('d3-array'),axis=require('@visx/axis'),responsive=require('@visx/responsive'),zoom=require('@visx/zoom'),AP=require('papaparse'),brush=require('@visx/brush'),pattern=require('@visx/pattern'),d3Scale=require('d3-scale'),d3Time=require('d3-time'),dateFns=require('date-fns'),date=require('@internationalized/date'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),reactDom=require('react-dom'),BD=require('react-map-gl'),server=require('react-dom/server'),iI=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),dI=require('@tiptap/starter-kit'),P5=require('fuse.js');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Ze__namespace=/*#__PURE__*/_interopNamespace(Ze);var Nf__namespace=/*#__PURE__*/_interopNamespace(Nf);var mN__namespace=/*#__PURE__*/_interopNamespace(mN);var pk__default=/*#__PURE__*/_interopDefault(pk);var AP__default=/*#__PURE__*/_interopDefault(AP);var BD__default=/*#__PURE__*/_interopDefault(BD);var iI__default=/*#__PURE__*/_interopDefault(iI);var dI__default=/*#__PURE__*/_interopDefault(dI);var P5__default=/*#__PURE__*/_interopDefault(P5);var I0=Object.create;var Hd=Object.defineProperty;var F0=Object.getOwnPropertyDescriptor;var B0=Object.getOwnPropertyNames;var V0=Object.getPrototypeOf,O0=Object.prototype.hasOwnProperty;var z0=(e,t,r)=>t in e?Hd(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var H0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var G0=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of B0(t))!O0.call(e,n)&&n!==r&&Hd(e,n,{get:()=>t[n],enumerable:!(o=F0(t,n))||o.enumerable});return e};var vf=(e,t,r)=>(r=e!=null?I0(V0(e)):{},G0(Hd(r,"default",{value:e,enumerable:true}),e));var Ei=(e,t,r)=>z0(e,typeof t!="symbol"?t+"":t,r);var Sp=H0((vp,Cp)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof vp<"u"?t():(t(),e.FileSaver={});})(vp,function(){function e(s,d){return typeof d>"u"?d={autoBom:false}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function t(s,d,l){var c=new XMLHttpRequest;c.open("GET",s),c.responseType="blob",c.onload=function(){i(c.response,d,l);},c.onerror=function(){console.error("could not download file");},c.send();}function r(s){var d=new XMLHttpRequest;d.open("HEAD",s,false);try{d.send();}catch{}return 200<=d.status&&299>=d.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"));}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),s.dispatchEvent(d);}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,d,l){var c=n.URL||n.webkitURL,u=document.createElement("a");d=d||s.name||"download",u.download=d,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?o(u):r(u.href)?t(s,d,l):o(u,u.target="_blank")):(u.href=c.createObjectURL(s),setTimeout(function(){c.revokeObjectURL(u.href);},4e4),setTimeout(function(){o(u);},0));}:"msSaveOrOpenBlob"in navigator?function(s,d,l){if(d=d||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(e(s,l),d);else if(r(s))t(s,d,l);else {var c=document.createElement("a");c.href=s,c.target="_blank",setTimeout(function(){o(c);});}}:function(s,d,l,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof s=="string")return t(s,d,l);var u=s.type==="application/octet-stream",m=/constructor/i.test(n.HTMLElement)||n.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||u&&m||a)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var b=g.result;b=p?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=b:location=b,c=null;},g.readAsDataURL(s);}else {var f=n.URL||n.webkitURL,x=f.createObjectURL(s);c?c.location=x:location.href=x,c=null,setTimeout(function(){f.revokeObjectURL(x);},4e4);}});n.saveAs=i.saveAs=i,typeof Cp<"u"&&(Cp.exports=i);});});function fr(e,t=false){let[r,o]=Ze.useState(t);return Ze.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);o(n.matches);let a=i=>{o(i.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),r}var Gn={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function gr(e="base"){let t=fr(`(min-width: ${Gn.sm})`,e!=="base"),r=fr(`(min-width: ${Gn.md})`,["md","lg","xl","2xl"].includes(e)),o=fr(`(min-width: ${Gn.lg})`,["lg","xl","2xl"].includes(e)),n=fr(`(min-width: ${Gn.xl})`,["xl","2xl"].includes(e)),a=fr(`(min-width: ${Gn["2xl"]})`,e==="2xl"),i=!r,s=r,d="base";return a?d="2xl":n?d="xl":o?d="lg":r?d="md":t&&(d="sm"),{current:d,isSm:t,isMd:r,isLg:o,isXl:n,is2Xl:a,isMobile:i,isDesktop:s}}function ft(e,t){let r=Ze.forwardRef(({size:o=24,color:n="currentColor",className:a,mirrored:i,alt:s,...d},l)=>{let c=!!s||"aria-label"in d;return jsxRuntime.jsx("svg",{ref:l,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 256 256",fill:n,className:a,transform:i?"scale(-1, 1)":void 0,"aria-hidden":c?void 0:true,role:c?"img":void 0,"aria-label":s,...d,children:t})});return r.displayName=e,r}var js=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),Cf=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),Sf=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),wf=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),J0=ft("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),X0=ft("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),q0=ft("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),j0=ft("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),Q0=ft("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),Z0=ft("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),_0=ft("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Cf,{})]})),$0=ft("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Sf,{})]})),eS=ft("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),tS=ft("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Cf,{}),jsxRuntime.jsx(wf,{})]})),rS=ft("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Sf,{}),jsxRuntime.jsx(wf,{})]})),oS=ft("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),Oa={1:[128],2:[110,146],3:[92,128,164]},Gd=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Wd=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),nS=ft("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[1].map(Gd)})),aS=ft("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[2].map(Gd)})),iS=ft("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[3].map(Gd)})),sS=ft("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[1].map(Wd)})),lS=ft("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[2].map(Wd)})),cS=ft("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:Oa[3].map(Wd)})),dS=ft("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),za={TextureRecloser:J0,TextureFuse:X0,TextureBreaker:q0,TextureSource:j0,TextureCapacitor:Q0,TextureRegulator:Z0,TextureSwitch:_0,TextureSwitchClosed:$0,TextureOpenPoint:eS,TextureSectionalizerOpen:tS,TextureSectionalizerClosed:rS,TextureTransformer:oS,TextureSinglePhaseOverheadLine:nS,TextureTwoPhaseOverheadLine:aS,TextureThreePhaseOverheadLine:iS,TextureSinglePhaseUndergroundLine:sS,TextureTwoPhaseUndergroundLine:lS,TextureThreePhaseUndergroundLine:cS,TextureSupportStructure:dS};if(process.env.NODE_ENV==="development")for(let e of Object.keys(za))e in Nf__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var Ha={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},H=Ze.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=za[e]??Nf__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let d=typeof t=="string"&&t in Ha?Ha[t]:t,l=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:l,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});H.displayName="Icon";var uS=Ze.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:l,ref:c,...u})=>{let m=typeof n=="string"&&n in Ha?Ha[n]:n,p=r?typeof r=="string"&&r in Ha?Ha[r]:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(H,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:l})})});uS.displayName="IconWithContainer";function Dr({transparent:e=false,className:t,children:r,...o}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...o,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:r})}function SS({isEntering:e,isExiting:t,className:r="",disableGroup:o=false}){let n=[!o&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [n,a,i,r].filter(Boolean).join(" ")}function St({children:e,showArrow:t=false,withBackdrop:r=false,className:o,isDismissable:n=true,disableGroup:a=false,...i}){let d=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",l=t?12:8;l=d?l-6:l;let c=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:l,...i,className:reactAriaComponents.composeRenderProps(o,(u,m)=>SS({...m,className:u,disableGroup:a})),children:[t&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return r?jsxRuntime.jsx(Dr,{isDismissable:n,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:n,children:c})}):c}function Qs(e=true){let[t,r]=Ze.useState(null);return Ze.useEffect(()=>{if(!e){r(null);return}let o=typeof window<"u"?window.visualViewport:null;if(!o)return;let n=()=>{let a=Math.max(0,window.innerHeight-o.height-(o.offsetTop??0));r({height:o.height,keyboardOffset:a});};return n(),o.addEventListener("resize",n),o.addEventListener("scroll",n),()=>{o.removeEventListener("resize",n),o.removeEventListener("scroll",n);}},[e]),t}var PS={"--color-brand-primary":["--color-action-brand","--color-text-link-default","--action-brand-background"],"--color-brand-dark":["--color-action-brand-hover","--color-text-link-hover","--action-brand-hover"],"--color-action-brand":["--color-text-link-default","--action-brand-background"],"--color-action-brand-hover":["--color-text-link-hover","--action-brand-hover"]};function Pf(e){let t={...e};for(let[r,o]of Object.entries(PS))if(e[r])for(let n of o)e[n]||(t[n]=e[r]);return t}function Rf(e){return e.replace(/[{}<>]/g,"")}function Mf(e){return Object.entries(e).map(([t,r])=>`${Rf(t)}: ${Rf(r)};`).join(" ")}function Lf({variables:e,darkVariables:t,children:r}){let n=Ze.useId().replace(/:/g,""),a=e&&Object.keys(e).length>0,i=t&&Object.keys(t).length>0;if(!a&&!i)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});let s=a?Pf(e):null,d=i?Pf(t):null,l=s?`[data-brand-scope="${n}"] { ${Mf(s)} }`:"",c=d?`.theme-dark [data-brand-scope="${n}"] { ${Mf(d)} }`:"",u=[l,c].filter(Boolean).join(`
2
- `);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var Ga=new Map,MS=8;function ES(e){if(!e.startsWith("var("))return e;let t=e.slice(4,e.lastIndexOf(")")).trim(),r=t.indexOf(",");return (r===-1?t:t.slice(0,r)).trim()}var Wt=(e,t="#000000")=>typeof window>"u"?t:Df(e,t,0);function Df(e,t,r){if(r>MS)return t;let o=e.startsWith("var(")?ES(e):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!o.startsWith("--color-")&&(o=`--color-${o.slice(2)}`),Ga.has(o))return Ga.get(o);try{let n=document.body||document.documentElement,i=getComputedStyle(n).getPropertyValue(o).trim();if(i){if(i.startsWith("var(")){let l=Df(i,t,r+1);return Ga.set(o,l),l}return Ga.set(o,i),i}let s=document.createElement("div");s.style.color=`var(${o})`,document.body.appendChild(s);let d=getComputedStyle(s).color;return document.body.removeChild(s),d&&d!=="rgb(0, 0, 0)"?(Ga.set(o,d),d):t}catch(n){return console.warn(`Failed to resolve color for ${e}:`,n),t}}var Zs=()=>{Ga.clear();},Wo=()=>{let e=[];for(let t=1;t<=12;t++){let r=Wt(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?_s():e},_s=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],Di=()=>Wt("--color-viz-default","#444ae1"),LS=(e,t)=>{let r={},o=Wo();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r},Af=e=>{let t=e.match(/\d+/g);if(!t||t.length<3)return true;let[r,o,n]=t.map(Number);return (.299*r+.587*o+.114*n)/255>.5},DS=e=>Af(e)?Wt("--color-text-primary","#333333"):Wt("--color-text-inverse","#ffffff"),If=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractUniqueValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r=new Set,o="features"in e?e.features:[e];if(!Array.isArray(o)||o.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let n=0;return o.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];i!=null&&r.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${o[0]?.properties?Object.keys(o[0].properties).join(", "):"none"}`),Array.from(r).sort()},Ai=e=>{let t=Wo(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var Yd=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractNumericValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r="features"in e?e.features:[e];if(!Array.isArray(r)||r.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let o=new Set,n=0;return r.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];typeof i=="number"&&!isNaN(i)&&o.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${r[0]?.properties?Object.keys(r[0].properties).join(", "):"none"}`),Array.from(o).sort((a,i)=>a-i)},Jd=e=>e.length===0?(console.warn("[Colors] Cannot calculate bounds from empty array"),{min:0,max:1}):{min:e[0],max:e[e.length-1]},Ff=(e,t)=>{if(typeof t=="number")return t;if(e.length===0)return console.warn("[Colors] Cannot calculate center from empty array, defaulting to 0"),0;if(t==="median"){let r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return e.reduce((r,o)=>r+o,0)/e.length},Ii=(e="viridis")=>{let o=`viz-sequential-${{redYellowGreen:"red-yellow-green"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=Wt(i);n.push(s);}return n},Fi=(e="redYellowBlue")=>{let o=`viz-diverging-${{orangeYellowSeafoam:"orange-yellow-seafoam",redYellowBlue:"red-yellow-blue",redBlue:"red-blue"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=Wt(i);n.push(s);}return n},Bi=(e,t,r,o="viridis")=>{let n=Ii(o);if(e<=t)return n[0];if(e>=r)return n[n.length-1];if(t===r)return n[Math.floor(n.length/2)];let i=(e-t)/(r-t)*(n.length-1),s=Math.floor(i);return n[s]},Vi=(e,t,r,o,n="redYellowBlue")=>{let a=Fi(n),i=4;if(e<=t)return a[0];if(e>=r)return a[a.length-1];if(e===o||t===r)return a[i];if(e<o){let d=(e-t)/(o-t)*i,l=Math.floor(d);return a[Math.min(l,i)]}else {let s=(e-o)/(r-o),d=i+s*(a.length-1-i),l=Math.floor(d);return a[Math.min(l,a.length-1)]}};var Xd=Ze.createContext({mode:"system",colorMode:"light",isDarkTheme:false,toggleTheme:()=>{}}),er=()=>Ze.useContext(Xd);function VS(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Of(){if(typeof window>"u")return "system";let e=localStorage.getItem("colorModePreference");return e==="light"||e==="dark"||e==="system"?e:"system"}function zf(e){return e==="system"?VS():e}var Gf=({children:e})=>{let[t,r]=Ze.useState(Of),[o,n]=Ze.useState(()=>zf(Of())),a=o==="dark",i=Ze.useCallback(d=>{d==="dark"?(document.documentElement.classList.add("theme-dark"),document.body.classList.add("theme-dark")):(document.documentElement.classList.remove("theme-dark"),document.body.classList.remove("theme-dark")),Zs();},[]);Ze.useEffect(()=>{Zs();let d=zf(t);if(n(d),i(d),t==="system"){let l=window.matchMedia("(prefers-color-scheme: dark)"),c=u=>{let m=u.matches?"dark":"light";n(m),i(m);};return l.addEventListener("change",c),()=>{l.removeEventListener("change",c);}}},[t,i]);let s=Ze.useCallback(()=>{r(d=>{let l=d==="system"?"light":d==="light"?"dark":"system";return localStorage.setItem("colorModePreference",l),l});},[]);return jsxRuntime.jsx(Xd.Provider,{value:{mode:t,colorMode:o,isDarkTheme:a,toggleTheme:s},children:e})};function br(...e){return e.filter(Boolean).join(" ")}var qd=class{constructor(){Ei(this,"formatters",new Map);}register(t,r){this.formatters.set(t,r);}format(t,r,...o){let n=this.formatters.get(t);return n?n(r,...o):(console.warn(`No formatter registered for key: ${t}`),null)}has(t){return this.formatters.has(t)}keys(){return Array.from(this.formatters.keys())}unregister(t){this.formatters.delete(t);}clear(){this.formatters.clear();}},se=new qd;var cn=(e,t="Yes",r="No")=>e==null?null:e?t:r,OS=e=>cn(e,"Enabled","Disabled"),zS=e=>cn(e,"On","Off"),HS=e=>cn(e,"Active","Inactive"),GS=e=>cn(e,"True","False"),WS=e=>cn(e,"\u2713","\u2717"),dn=e=>{if(e==null)return null;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase().trim();return t==="true"||t==="yes"||t==="1"||t==="on"||t==="enabled"?true:t==="false"||t==="no"||t==="0"||t==="off"||t==="disabled"?false:null}return typeof e=="number"?e!==0:null},Wf=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=dn(e);return r===null?t.nullText??null:cn(r,t.trueText??"Yes",t.falseText??"No")};se.register("boolean",(e,t,r)=>{let o=dn(e);return o!==null?cn(o,typeof t=="string"?t:"Yes",typeof r=="string"?r:"No"):null});se.register("yesNo",e=>{let t=dn(e);return t!==null?cn(t,"Yes","No"):null});se.register("enabledDisabled",e=>{let t=dn(e);return t!==null?OS(t):null});se.register("onOff",e=>{let t=dn(e);return t!==null?zS(t):null});se.register("activeInactive",e=>{let t=dn(e);return t!==null?HS(t):null});se.register("trueFalse",e=>{let t=dn(e);return t!==null?GS(t):null});se.register("checkmark",e=>{let t=dn(e);return t!==null?WS(t):null});var he=e=>e==null,Uf=(e,t=0)=>he(e)?null:`${e.toFixed(t)}%`,Kf=(e,t=0)=>Uf(e,t)??"\u2014",US=e=>he(e)?null:Math.round(e).toString(),KS=(e,t=1)=>he(e)?null:e.toFixed(t),YS=(e,t,r=true)=>{if(he(e))return null;let o={useGrouping:r};return t!==void 0&&(o.minimumFractionDigits=t,o.maximumFractionDigits=t),new Intl.NumberFormat("en-US",o).format(e)},JS=(e,t="short")=>he(e)?null:new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:t}).format(e),XS=(e,t=2)=>he(e)?null:e.toExponential(t),Yf=(e,t="USD",r)=>{if(he(e))return null;let o={style:"currency",currency:t,currencyDisplay:r?.currencyDisplay??"symbol",useGrouping:r?.thousandsSeparator??true};return r?.minimumFractionDigits!==void 0&&(o.minimumFractionDigits=r.minimumFractionDigits),r?.maximumFractionDigits!==void 0&&(o.maximumFractionDigits=r.maximumFractionDigits),new Intl.NumberFormat("en-US",o).format(e)},Jf=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o={useGrouping:t.thousandsSeparator??false};return t.decimals!==void 0&&(o.minimumFractionDigits=t.decimals,o.maximumFractionDigits=t.decimals),t.notation&&(o.notation=t.notation,t.notation==="compact"&&t.compactDisplay&&(o.compactDisplay=t.compactDisplay)),t.sign&&(o.signDisplay=t.sign),new Intl.NumberFormat("en-US",o).format(r)},Xf=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);return isNaN(r)?t.nullText??null:Yf(r,t.currency,t)};se.register("percentage",(e,t)=>typeof e=="number"?Uf(e,typeof t=="number"?t:0):null);se.register("integer",e=>typeof e=="number"?US(e):null);se.register("float",(e,t)=>typeof e=="number"?KS(e,typeof t=="number"?t:1):null);se.register("number",(e,t,r)=>{let o=typeof e=="string"?parseFloat(e):Number(e);return isNaN(o)?null:YS(o,typeof t=="number"?t:void 0,typeof r=="boolean"?r:true)});se.register("compact",(e,t)=>typeof e=="number"?JS(e,t==="long"?"long":"short"):null);se.register("scientific",(e,t)=>typeof e=="number"?XS(e,typeof t=="number"?t:2):null);se.register("currency",(e,t,r)=>typeof e=="number"?Yf(e,typeof t=="string"?t:"USD",typeof r=="object"&&r!==null?r:{}):null);function W4(e,t=1){return he(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MWh`:`${e.toFixed(t)} kWh`}function U4(e,t=1){return he(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MW`:`${e.toFixed(t)} kW`}function yo({value:e,formatter:t,emptyClassName:r="text-text-secondary",emptyText:o="\u2014"}){if(e==null)return jsxRuntime.jsx("span",{className:r,children:o});if(typeof t=="function")return t(e);if(t&&typeof t=="object"){let n=Ar(e,t);return e instanceof Date&&n?jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n}):n||jsxRuntime.jsx("span",{className:r,children:o})}if(!t){if(typeof e=="string")return e;if(e instanceof Date){let n=Ar(e,{type:"date"});return jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n})}if(typeof e=="number")return Ar(e,{type:"number"});if(typeof e=="boolean")return Ar(e,{type:"boolean"})}return String(e)}function X4(e,t,r){return Ze__namespace.default.useCallback(o=>yo({value:o,formatter:e,emptyClassName:t,emptyText:r}),[e,t,r])}var jd=(e,t=0)=>{if(he(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mA`:`${r.toFixed(t)} mA`},el=(e,t=1)=>he(e)?null:`${e.toFixed(t)} A`,Qd=(e,t=2)=>he(e)?null:`${(e/1e3).toFixed(t)} kA`,jS=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e3?Qd(e,t??2):r<1?jd(e,t??0):el(e,t??1)},Zd=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kA":return Qd(r,o??2);case "mA":return jd(r,o??0);case "A":return el(r,o??1)}return t.autoScale!==false?jS(r,o):el(r,o??1)};se.register("current",Zd);var _4=jd,$4=el,eF=Qd;var Wn=e=>{if(e==null)return null;if(e instanceof Date)return luxon.DateTime.fromJSDate(e);if(typeof e=="string"){let t=luxon.DateTime.fromISO(e);return t.isValid?t:null}if(typeof e=="number"){let t=luxon.DateTime.fromMillis(e);return t.isValid?t:null}return null},QS=(e,t=false,r)=>{if(!e)return null;let o=Wn(e);if(!o)return "Invalid Date";let n=r?o.setZone(r):o;return t?n.toLocaleString(luxon.DateTime.DATETIME_SHORT):n.toLocaleString(luxon.DateTime.DATE_SHORT)},tl=e=>{if(!e)return null;let t=Wn(e);return t?t.toRelative():"Invalid Date"},ZS=(e,t)=>{if(!e)return null;let r=Wn(e);return r?(t?r.setZone(t):r).toLocaleString(luxon.DateTime.DATETIME_MED_WITH_WEEKDAY):"Invalid Date"},_S=e=>{if(!e)return null;let t=Wn(e);return t?t.toISO():null},$S=(e,t,r)=>{if(!e)return null;let o=Wn(e);return o?(r?o.setZone(r):o).toFormat(t):"Invalid Date"},nF=e=>{let t=Wn(e);return t?{year:t.year,month:t.month,day:t.day,weekday:t.weekday,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,weekdayShort:t.weekdayShort,weekdayLong:t.weekdayLong,monthShort:t.monthShort,monthLong:t.monthLong}:null},qf=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=Wn(e);if(!r)return t.nullText??"Invalid Date";let o=t.timezone?r.setZone(t.timezone):r;if(t.relative)return o.toRelative();if(t.format)return o.toFormat(t.format);if(t.dateStyle||t.timeStyle){let n={};if(t.dateStyle)switch(t.dateStyle){case "short":n.date=luxon.DateTime.DATE_SHORT;break;case "medium":n.date=luxon.DateTime.DATE_MED;break;case "long":n.date=luxon.DateTime.DATE_FULL;break;case "full":n.date=luxon.DateTime.DATE_HUGE;break}if(t.timeStyle)switch(t.timeStyle){case "short":n.time=luxon.DateTime.TIME_SIMPLE;break;case "medium":n.time=luxon.DateTime.TIME_WITH_SECONDS;break;case "long":case "full":n.time=luxon.DateTime.TIME_WITH_SHORT_OFFSET;break}if(n.date&&n.time)return o.toLocaleString({...n.date,...n.time});if(n.date)return o.toLocaleString(n.date);if(n.time)return o.toLocaleString(n.time)}return o.toLocaleString(luxon.DateTime.DATETIME_SHORT)};se.register("date",(e,t,r)=>QS(e,typeof t=="boolean"?t:false,typeof r=="string"?r:void 0));se.register("relativeTime",e=>tl(e));se.register("fullDateTime",(e,t)=>ZS(e,typeof t=="string"?t:void 0));se.register("isoString",e=>_S(e));se.register("customDateFormat",(e,t,r)=>typeof t=="string"?$S(e,t,typeof r=="string"?r:void 0):null);var _d=(e,t=1)=>he(e)?null:`${e.toFixed(t)} m`,ew=(e,t=1)=>he(e)?null:`${(e*100).toFixed(t)} cm`,tw=(e,t=0)=>he(e)?null:`${(e*1e3).toFixed(t)} mm`,$d=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} km`,eu=(e,t=0)=>he(e)?null:`${e.toFixed(t)} ft`,rw=(e,t=1)=>he(e)?null:`${e.toFixed(t)} in`,tu=(e,t=1)=>he(e)?null:`${e.toFixed(t)} mi`,ru=(e,t=0)=>he(e)?null:`${e.toFixed(t)} yd`,lF=(e,t=1)=>he(e)?null:`${e.toFixed(t)} nm`,cF=e=>e*3.28084,dF=e=>e/3.28084,uF=e=>e*1.60934,pF=e=>e/1.60934,mF=e=>e/5280,jf=e=>e*5280,fF=e=>e/1609.34,gF=e=>e*1609.34,bF=e=>e*.9144,hF=e=>e/.9144,xF=e=>e*2.54,yF=e=>e/2.54,Qf=(e,t=false,r=1)=>{if(he(e))return null;let o=Math.abs(e);return t?o>=1e3?$d(e,r):o<.01?tw(e,0):o<1?ew(e,r):_d(e,r):o<.01?eu(jf(e),0):o<.1?ru(jf(e)/3,0):tu(e,r)},Zf=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??1;if(t.autoScale){let n=t.unit==="m"||t.unit==="km";return Qf(r,n,o)}switch(t.unit){case "km":return $d(r,o);case "ft":return eu(r,o);case "mi":return tu(r,o);case "yd":return ru(r,o);default:return _d(r,o)}};se.register("miles",(e,t)=>typeof e=="number"?tu(e,typeof t=="number"?t:1):null);se.register("kilometers",(e,t)=>typeof e=="number"?$d(e,typeof t=="number"?t:1):null);se.register("meters",(e,t)=>typeof e=="number"?_d(e,typeof t=="number"?t:1):null);se.register("feet",(e,t)=>typeof e=="number"?eu(e,typeof t=="number"?t:0):null);se.register("yards",(e,t)=>typeof e=="number"?ru(e,typeof t=="number"?t:0):null);se.register("inches",(e,t)=>typeof e=="number"?rw(e,typeof t=="number"?t:1):null);se.register("autoScaleDistance",(e,t,r)=>typeof e=="number"?Qf(e,typeof t=="boolean"?t:false,typeof r=="number"?r:1):null);var ou=(e,t=1)=>he(e)?null:`${e.toFixed(t)} Wh`,nu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kWh`,_f=(e,t=1)=>he(e)?null:`${(e/1e6).toFixed(t)} MWh`,$f=(e,t=1)=>he(e)?null:`${(e/1e9).toFixed(t)} GWh`,au=e=>{let t=Math.abs(e);return t>=1e9?"GWh":t>=1e6?"MWh":t>=1e3?"kWh":"Wh"},eg=(e,t=1)=>{if(he(e))return null;switch(au(e)){case "GWh":return $f(e,t);case "MWh":return _f(e,t);case "kWh":return nu(e,t);default:return ou(e,t)}},iu={Wh:1,kWh:1e3,MWh:1e6,GWh:1e9},su=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.sourceUnit?r*iu[t.sourceUnit]:r,n=t.decimals??1;if(t.unit)switch(t.unit){case "GWh":return $f(o,n);case "MWh":return _f(o,n);case "kWh":return nu(o,n);case "Wh":return ou(o,n)}return t.autoScale!==false?eg(o,n):ou(o,n)};se.register("kWh",e=>typeof e=="number"?nu(e):null);se.register("autoScaleEnergy",(e,t)=>typeof e=="number"?eg(e,typeof t=="number"?t:1):null);se.register("energy",su);var rl=e=>{if(!e)return null;let t=e.replace(/\D/g,"");return t.length===10?t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):t.length===11&&t.startsWith("1")?t.replace(/1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):e},lu=e=>{if(!e)return null;let t=e.replace(/[^\d+]/g,"");return t.startsWith("+")?t.length===12&&t.startsWith("+1")?t.replace(/\+1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):t.length===13&&t.startsWith("+44")?t.replace(/\+44(\d{2})(\d{4})(\d{4})/,"+44 $1 $2 $3"):t.replace(/(\+\d{1,3})(\d{3,4})(\d{3,4})(\d{3,4})?/,"$1 $2 $3 $4").trim():rl(e)},Wa=e=>e?e.startsWith("+")||e.length>11?lu(e):rl(e):null,tg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=String(e);if(t.international)return lu(r);switch(t.country){case "US":case "CA":return rl(r);default:return Wa(r)}};se.register("phoneNumber",e=>typeof e=="string"?Wa(e):null);se.register("usPhone",e=>typeof e=="string"?rl(e):null);se.register("internationalPhone",e=>typeof e=="string"?lu(e):null);var ol=(e,t=0)=>he(e)?null:t===0?`${Math.round(e)} W`:`${e.toFixed(t)} W`,cu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kW`,du=(e,t=1)=>he(e)?null:`${(e/1e6).toFixed(t)} MW`,uu=(e,t=2)=>he(e)?null:`${(e/1e9).toFixed(t)} GW`,ow=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e9?uu(e,t??2):r>=1e6?du(e,t??1):r>=1e3?cu(e,t??1):ol(e,t??0)},pu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "GW":return uu(r,o??2);case "MW":return du(r,o??1);case "kW":return cu(r,o??1);case "W":return ol(r,o??0)}return t.autoScale!==false?ow(r,o):ol(r,o??0)};se.register("power",pu);var RF=ol,MF=cu,EF=du,LF=uu;var mu=(e,t=1)=>he(e)?null:`${(e*1e3).toFixed(t)} m\u03A9`,nl=(e,t=1)=>he(e)?null:`${e.toFixed(t)} \u03A9`,rg=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} k\u03A9`,og=(e,t=2)=>he(e)?null:`${(e/1e6).toFixed(t)} M\u03A9`,nw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e6?og(e,t??2):r>=1e3?rg(e,t??1):r<1?mu(e,t??1):nl(e,t??1)},fu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "M\u03A9":return og(r,o??2);case "k\u03A9":return rg(r,o??1);case "m\u03A9":return mu(r,o??1);case "\u03A9":return nl(r,o??1)}return t.autoScale!==false?nw(r,o):nl(r,o??1)};se.register("resistance",fu);se.register("ohms",e=>typeof e=="number"?nl(e):null);se.register("milliohms",e=>typeof e=="number"?mu(e):null);var ng=e=>{switch(e){case "FAHRENHEIT":return "F";case "CELSIUS":return "C";case "KELVIN":return "K";default:return "F"}},ag=(e,t=0)=>he(e)?null:`${e.toFixed(t)}\xB0F`,ig=(e,t=true,r=0)=>he(e)?null:`${(t?(e-32)*(5/9):e).toFixed(r)}\xB0C`,sg=(e,t=true,r=0)=>he(e)?null:`${(t?(e-32)*(5/9)+273.15:e+273.15).toFixed(r)}K`,aw=e=>e*9/5+32,iw=e=>(e-32)*(5/9),OF=e=>e+273.15,sw=e=>e-273.15,zF=e=>iw(e)+273.15,HF=e=>aw(sw(e)),lg=(e,t="F",r=0)=>{if(he(e))return null;switch(typeof t=="string"&&t.length>1?ng(t):t){case "C":return ig(e,true,r);case "K":return sg(e,true,r);default:return ag(e,r)}},cg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??0,n=t.unit??"F";if(t.showUnit===false)switch(typeof n=="string"&&n.length>1?ng(n):n){case "C":return ((r-32)*.5555555555555556).toFixed(o);case "K":return ((r-32)*.5555555555555556+273.15).toFixed(o);default:return r.toFixed(o)}return lg(r,n,o)};se.register("temperature",(e,t,r)=>typeof e=="number"?lg(e,typeof t=="string"?t:"F",typeof r=="number"?r:0):null);se.register("fahrenheit",(e,t)=>typeof e=="number"?ag(e,typeof t=="number"?t:0):null);se.register("celsius",(e,t,r)=>typeof e=="number"?ig(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);se.register("kelvin",(e,t,r)=>typeof e=="number"?sg(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);var lw=(e,t)=>!!(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0),dg=e=>e?.toUpperCase()??"",ug=e=>e?.toLowerCase()??"",pg=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",mg=e=>{if(!e)return "";let t=new Set(["a","an","the","and","but","or","for","nor","on","at","of","to","with","in","as","by"]);return e.toLowerCase().split(/\s+/).map((r,o)=>t.has(r)&&o!==0?r:r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},fg=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" "):"",gg=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",bg=e=>e?e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()).trim():"",hg=e=>e?e.toLowerCase().split("_").map(t=>gg(t)).join(" "):"",cw=e=>e?e.includes("_")?hg(e):e.toUpperCase()===e?gg(e.toLowerCase()):bg(e):"",Ua=(e,t=16)=>{if(!e)return "";if(t<5||e.length<=t)return e;let r=t-3,o=Math.ceil(r/2),n=Math.floor(r/2);return `${e.slice(0,o)}...${e.slice(-n)}`},al=(e,t=8)=>e?e.length<=t?e:`...${e.slice(-t)}`:"",il=(e,t=16,r="...")=>e?e.length<=t?e:e.slice(0,t)+r:"",dw=e=>{if(!e)return "";let t=e.toString(),r=t.slice(-4),o=t.length-4;return o>0?"*".repeat(o)+r:t},xg=(e,t)=>{if(lw(e,t))return null;if(e==null)return t.nullText??null;let r=String(e);if(t.transform&&(Array.isArray(t.transform)?t.transform:[t.transform]).forEach(n=>{switch(n){case "uppercase":r=dg(r);break;case "lowercase":r=ug(r);break;case "capitalize":r=fg(r);break;case "titleCase":r=mg(r);break;case "sentenceCase":r=pg(r);break}}),t.truncate){let{length:o,position:n,ellipsis:a="..."}=t.truncate;switch(n){case "start":r=al(r,o);break;case "middle":r=Ua(r,o);break;case "end":r=il(r,o,a);break}}return r};se.register("uppercase",e=>dg(String(e)));se.register("lowercase",e=>ug(String(e)));se.register("sentenceCase",e=>pg(String(e)));se.register("titleCase",e=>mg(String(e)));se.register("capitalize",e=>fg(String(e)));se.register("camelCaseToWords",e=>bg(String(e)));se.register("snakeCaseToWords",e=>hg(String(e)));se.register("enumToSentenceCase",e=>cw(String(e)));se.register("truncateMiddle",(e,t)=>Ua(String(e),typeof t=="number"?t:16));se.register("truncateStart",(e,t)=>al(String(e),typeof t=="number"?t:8));se.register("truncateEnd",(e,t,r)=>il(String(e),typeof t=="number"?t:16,typeof r=="string"?r:"..."));se.register("secret",e=>dw(String(e)));var gu=(e,t=0)=>{if(he(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mV`:`${r.toFixed(t)} mV`},sl=(e,t=0)=>he(e)?null:t===0?`${Math.round(e)} V`:`${e.toFixed(t)} V`,bu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kV`,uw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e3?bu(e,t??1):r<1?gu(e,t??0):sl(e,t??0)},hu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kV":return bu(r,o??1);case "mV":return gu(r,o??0);case "V":return sl(r,o??0)}return t.autoScale!==false?uw(r,o):sl(r,o??0)};se.register("voltage",hu);var JF=gu,XF=sl,qF=bu;var pw=(e,t)=>{if(e==null)return t.nullText??null;if(t.hideWhenNull&&e===null)return null;let r=typeof e=="number"?e:Number(e);return Number.isNaN(r)?t.nullText??null:Kf(r,t.decimals??0)},Ar=(e,t)=>{switch(t.type){case "text":return xg(e,t);case "number":return Jf(e,t);case "percentage":return pw(e,t);case "currency":return Xf(e,t);case "date":return qf(e,t);case "boolean":return Wf(e,t);case "energy":return su(e,t);case "power":return pu(e,t);case "voltage":return hu(e,t);case "current":return Zd(e,t);case "resistance":return fu(e,t);case "temperature":return cg(e,t);case "distance":return Zf(e,t);case "phone":return tg(e,t);case "custom":{let r=t;return r.hideWhenNull&&e==null?null:e==null?r.nullText??null:r.formatter(e,r.options)}default:return e!=null?String(e):null}};var Ka={power:"W",energy:"Wh",voltage:"V",current:"A",resistance:"\u03A9",distance:"m"},mw=new Set(["number","power","energy","voltage","current","resistance","temperature","distance","percentage"]);function xu(e){if(!e)return null;switch(e.type){case "percentage":return "%";case "power":return e.unit??Ka.power;case "energy":return e.unit??e.sourceUnit??Ka.energy;case "voltage":return e.unit??Ka.voltage;case "current":return e.unit??Ka.current;case "resistance":return e.unit??Ka.resistance;case "temperature":{let t=typeof e.unit=="string"?e.unit:"F";return t==="C"||t==="CELSIUS"?"\xB0C":t==="F"||t==="FAHRENHEIT"?"\xB0F":t==="K"||t==="KELVIN"?"K":t}case "distance":return e.unit??Ka.distance;default:return null}}function yg(e,t){if(!mw.has(t.type))return null;let r;if(typeof e=="number")r=e;else if(typeof e=="string"){let n=parseFloat(e);if(Number.isNaN(n))return null;r=n;}else return null;let o=xu(t);if(o!==null){let n;if(t.type==="percentage")n=t;else if(t.type==="energy")n=t.unit?{...t,autoScale:false}:{...t,unit:t.sourceUnit??"Wh",autoScale:false};else if(t.type==="temperature")n={...t};else {let s=t.unit;n={...t,unit:s??o,autoScale:false};}let a=Ar(r,n);if(!a)return "";if(typeof a=="string"&&a.startsWith("device."))return null;let i=String(a);return i.endsWith(` ${o}`)?i.slice(0,-(o.length+1)):i.endsWith(o)?i.slice(0,-o.length):i}if(t.type==="number"){let n=Ar(r,t);return n?String(n):""}return String(r)}var u3=(e,t)=>({type:e,...t});function Kn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Un(e,t){return Kn(e)?t.format(e):""}function vg(e){if(!Kn(e.start)||!Kn(e.end))return ()=>"";if((e.end.getTime()-e.start.getTime())/(1e3*60*60)<=720){let i=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});return s=>Un(s,i)}let r=e.start.getFullYear(),o=e.end.getFullYear(),n=r!==o,a=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",...n&&{year:"numeric"}});return i=>Un(i,a)}var fw=864e5;function Cg(e,t){let r=t?.compact??false,o=e<5*fw,n=a=>{let i=a.getHours(),s=i>=12?"PM":"AM";return {displayHour:i%12||12,period:s}};return a=>{if(!Kn(a))return "";let i=a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0;if(i&&a.getDate()===1)return a.getMonth()===0?String(a.getFullYear()):a.toLocaleDateString("en",{month:"short"});if(i){let c=a.getDate();if(o){let u=a.toLocaleDateString("en",{weekday:"short"});return r?`${u.charAt(0)}${c}`:`${u} ${c}`}return r?`${a.getMonth()+1}/${c}`:`${a.toLocaleDateString("en",{month:"short"})} ${c}`}let{displayHour:s,period:d}=n(a);if(a.getMinutes()===0&&a.getSeconds()===0)return r?`${s}${d.charAt(0).toLowerCase()}`:`${s} ${d}`;let l=String(a.getMinutes()).padStart(2,"0");return r?`${s}:${l}${d.charAt(0).toLowerCase()}`:`${s}:${l} ${d}`}}function yu(e,t){if(!Kn(e.start)||!Kn(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=l=>c=>Kn(c)?l(c):"";if(r<=24){if(o)return n(c=>{let u=c.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let l=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return c=>Un(c,l)}if(r<=48){if(o)return n(c=>{let u=c.getMonth()+1,m=c.getDate(),p=c.getHours(),g=p>=12?"p":"a",f=p%12||12;return `${u}/${m} ${f}${g}`});let l=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric"});return c=>Un(c,l)}if(r<=168){if(o)return n(c=>{let u=c.getDate();return `${c.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let l=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return c=>Un(c,l)}if(r<=720){if(o)return n(c=>{let u=c.getMonth()+1,m=c.getDate();return `${u}/${m}`});let l=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return c=>Un(c,l)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(l=>{let c=l.getMonth()+1,u=l.getDate(),m=s?`/${l.getFullYear().toString().slice(-2)}`:"";return `${c}/${u}${m}`});let d=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return l=>Un(l,d)}var vo={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function Mt(e,...t){return br(vo[e],...t)}function ot(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function Ie(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var Je={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var yw="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",vw="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",Cw={primary:vw,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},wg={full:"w-full",default:"w-fit"},Sw="opacity-50 cursor-not-allowed pointer-events-none",ww="opacity-100 cursor-pointer",Nw={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},Tw={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function kw(e){return !e||e==="default"||e==="brand"?"primary":e}function Pw(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=kw(t),s=i==="unstyled"?"":`${yw} ${Cw[i]}`;i!=="unstyled"&&(s+=` ${Je[r].text} ${Je[r].height} ${Je[r].padding} ${Je[r].gap}`),o||a?s+=` ${Sw}`:s+=` ${ww}`,n?s+=` ${wg.full}`:s+=` ${wg.default}`;let d=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,ot(),d].filter(Boolean).join(" ")}function re(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:d,href:l,className:c,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:x,...b}=e,y=t?jsxRuntime.jsx(H,{name:t,size:i,weight:d}):null,v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,typeof r=="function"?null:r,s==="right"&&y]}),C=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(H,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),w=(u??0)>0,S=tailwindMerge.twMerge(Pw(e),c),T=l?{href:l,target:f,rel:x,...b}:{};if(l){let{onPress:k,onPressStart:M,onPressEnd:D,onPressChange:R,onPressUp:I,onAuxClick:E,onContextMenu:O,onDoubleClick:W,...z}=b;Object.assign(T,z);}let P=l?jsxRuntime.jsx(reactAriaComponents.Link,{...T,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,r(k),s==="right"&&y]})}):v}):jsxRuntime.jsx(reactAriaComponents.Button,{...b,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(k){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,r(k),s==="right"&&y]})}):v});return w?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",c),style:g,children:[P,jsxRuntime.jsx("span",{className:`absolute ${Nw[p]} flex h-5 w-5 items-center justify-center rounded-full ${Tw[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):P}function Cu({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(re,{type:o?"submit":"button",form:o?e.formId:void 0,size:e.size||r,variant:e.variant||t,onPress:o?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function pn({primaryAction:e,secondaryAction:t,tertiaryAction:r,footerContent:o}){let n=e||t||r;return !n&&!o?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${o?"h-28":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:o}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:r&&jsxRuntime.jsx(Cu,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(Cu,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(Cu,{action:e,defaultVariant:"primary"})]})]})]})}var Rw={heading:{sm:vo.headingSm,md:vo.headingMd,lg:vo.headingLg,xl:vo.headingXl},display:{sm:vo.displaySm,md:vo.displayMd,lg:vo.displayLg,xl:vo.displayXl}},Mw={page:"h-16 leading-[62px]"};function xr({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=Rw[t][i],d=o?Mw[o]:"";return jsxRuntime.jsx(e,{className:br(s,"text-text-primary",d,n),children:a})}var lr=({title:e,onClose:t,hideCloseIcon:r=false,titleAlign:o="left",hasBackArrow:n=false,onBack:a,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",o==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx(re,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(H,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(xr,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(re,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(H,{name:"X","data-testid":"close-button"})})]})]});var Nu=48,Hi=Ze.createContext(false);function mn({children:e}){return jsxRuntime.jsx(Hi.Provider,{value:true,children:e})}function kg({children:e}){return jsxRuntime.jsx(Hi.Provider,{value:false,children:e})}function Xa(e,t){let r=Ze.useContext(Hi),{ref:o,height:n}=Vw();return {headerRef:o,headerHeight:!r||e||t?n||Nu:0}}function Pg(){return !Ze.useContext(Hi)}function Vw(){let[e,t]=Ze.useState(0),r=Ze.useRef(null),o=Ze.useRef(null),n=Ze.useCallback(a=>{if(o.current?.disconnect(),o.current=null,r.current=a,!a){t(0);return}let i=()=>t(r.current?.offsetHeight??0);i(),o.current=new ResizeObserver(i),o.current.observe(a);},[]);return Ze.useEffect(()=>()=>o.current?.disconnect(),[]),{ref:n,height:e}}function qa({title:e,controls:t,actions:r,containerRef:o,marginLeft:n=0,marginRight:a=0}){let s=!Ze.useContext(Hi);return !s&&!t&&!r?null:jsxRuntime.jsxs("div",{ref:o,"data-chart-header":"",className:"flex min-h-[32px] shrink-0 flex-wrap items-center justify-between gap-3 pb-4",style:{marginLeft:n,marginRight:a},children:[s?jsxRuntime.jsx("h3",{className:"truncate text-sm font-medium text-text-primary",children:e}):jsxRuntime.jsx("span",{}),t?jsxRuntime.jsx("div",{"data-chart-header-controls":"",className:"flex min-w-0 flex-1 items-center justify-end",children:t}):null,r?jsxRuntime.jsx("div",{"data-chart-header-actions":"",className:"flex shrink-0 items-center gap-1 -mt-[9px]",children:r}):null]})}var q=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:d=0,adjustAnimationSpeedBasedOnWidth:l=false,ariaLabel:c,className:u,"data-testid":m})=>{let[p,g]=Ze.useState(d===0);if(Ze.useEffect(()=>{if(d>0){let w=setTimeout(()=>g(true),d);return ()=>clearTimeout(w)}},[d]),!p)return null;let f=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",x=l&&e?(()=>{let w=typeof e=="number"?e:parseFloat(String(e));return isNaN(w)?"":`animation-duration-[${Math.max(.8,w/100)}s]`})():"",b=o==="pulse"?`animate-pulse ${x}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${x}`:"",y="rounded-sm";r==="circle"&&(y="rounded-full"),r==="text"&&(y="h-4 w-full rounded-sm");let v=a?"flex-1 min-w-0":"",C=s?Object.entries(s).map(([w,S])=>`${w}:w-[${S}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((w,S)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,y,v,C,u),style:{width:w,height:t}},S))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,y,v,C,u),style:{width:e,height:t},role:"presentation","aria-hidden":!c,"aria-label":c??void 0,"data-testid":m})},Mg=({count:e=1,children:t,className:r,"data-testid":o})=>jsxRuntime.jsx("div",{className:r,"data-testid":o,children:Array.from({length:e}).map((n,a)=>jsxRuntime.jsx("div",{children:t},a))});var Gw={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},Ww="rounded-lg",ku={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Uw={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Eg(e){return Ze__namespace.default.Children.toArray(e).some(t=>Ze__namespace.default.isValidElement(t)?t.type===Ze__namespace.default.Fragment?Eg(t.props.children):t.type===ll&&!!t.props.title:false)}function _e({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){let a=Eg(r)?jsxRuntime.jsx(mn,{children:r}):r;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",Gw[e],Ww,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(q,{width:"100%",height:"100%",className:"rounded-none"}):a})}function ll({title:e,subtitle:t,actions:r,leading:o,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(q,{width:120,height:20}),jsxRuntime.jsx(q,{width:24,height:24})]}),t&&jsxRuntime.jsx(q,{width:200,height:16})]}):!e&&!t&&!r&&!o?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(xr,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:Mt("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function Pu({src:e,alt:t,aspectRatio:r="auto",className:o,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",ku[r],o),children:jsxRuntime.jsx(q,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",ku[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",ku[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function Ru({className:e,children:t,isLoading:r=false,fill:o=false,style:n}){let i=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,o&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16}),jsxRuntime.jsx(q,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,"text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function Mu({className:e,children:t,align:r="end",isLoading:o=false}){return o?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(q,{width:80,height:32}),jsxRuntime.jsx(q,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Uw[r],e),children:t}):null}_e.Header=ll;_e.Media=Pu;_e.Content=Ru;_e.Footer=Mu;var ao=class extends Ze.Component{constructor(){super(...arguments);Ei(this,"state",{hasError:false});Ei(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(r){return {hasError:true,error:r}}componentDidCatch(r,o){console.error("Error Boundary caught an error:",r,o);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(_e,{children:[this.props.title&&jsxRuntime.jsx(_e.Header,{title:this.props.title}),jsxRuntime.jsx(_e.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};var Xw=.3,qw=.5;function wt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:d,isDismissable:l=true,transparentOverlay:c=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:x="640px",contentPadding:b=true,showHandle:y=true,animationVariant:v="scale",className:C}){let[w,S]=Ze.useState(false),[T,P]=Ze.useState(0),[k,M]=Ze.useState(false),D=Qs(s),R=D?.height??null,I=D?.keyboardOffset??0,E=Ze.useRef(null),O=Ze.useRef(null),W=Ze.useRef(null),z=Ze.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});Ze.useEffect(()=>{if(s){let G=setTimeout(()=>{S(true),setTimeout(()=>S(false),600);},400);return ()=>clearTimeout(G)}},[s]),Ze.useEffect(()=>{s||(P(0),M(false),z.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),Ze.useEffect(()=>{let G=O.current;if(!G||!s)return;let B=null,N=h=>{let L=h.target;L&&["INPUT","TEXTAREA","SELECT"].includes(L.tagName)&&(B&&clearTimeout(B),B=setTimeout(()=>{L.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return G.addEventListener("focusin",N),()=>{G.removeEventListener("focusin",N),B&&clearTimeout(B);}},[s]);let F=Ze.useCallback(G=>{l&&(G.pointerType!=="touch"&&G.pointerType!=="pen"||(W.current&&(clearTimeout(W.current),W.current=null),z.current={isDragging:true,startY:G.clientY,startTime:Date.now(),pointerId:G.pointerId},M(false),G.currentTarget.setPointerCapture(G.pointerId)));},[l]),Y=Ze.useCallback(G=>{let{isDragging:B,startY:N,pointerId:h}=z.current;if(!B||G.pointerId!==h)return;let L=G.clientY-N;P(Math.max(0,L));},[]),U=Ze.useCallback(G=>{let{isDragging:B,startY:N,startTime:h,pointerId:L}=z.current;if(!B||G.pointerId!==L)return;let A=G.clientY-N,j=Date.now()-h,ae=A/j;z.current={isDragging:false,startY:0,startTime:0,pointerId:null};let ee=(E.current?.getBoundingClientRect().height??0)*Xw;(A>ee||ae>qw&&A>50)&&l?(d?.(),P(0)):(M(true),P(0),W.current=setTimeout(()=>{M(false),W.current=null;},200));},[l,d]);if(!s)return null;let V=t||r,J=u||m||p;return jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isOpen:s,onOpenChange:G=>{G||d?.();},isDismissable:l,transparent:c,style:{paddingBottom:I>0?`${I}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:l,children:jsxRuntime.jsx("div",{ref:E,className:tailwindMerge.twMerge("w-full",k&&"transition-transform duration-200"),style:{transform:T>0?`translateY(${T}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",v==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",v==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",C),style:{maxWidth:x,...f?{height:f}:{maxHeight:/\d/.test(g)?R!==null?`min(${g}, ${Math.max(R-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[y&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:F,onPointerMove:Y,onPointerUp:U,onPointerCancel:U,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",w&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),V&&(a?jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,hasBackArrow:true,onBack:i??(()=>{}),onClose:d||(()=>{})}):jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,onClose:d||(()=>{})})),jsxRuntime.jsx("div",{ref:O,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",b?"p-4":"p-0"),children:e}),J&&jsxRuntime.jsx(pn,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}wt.displayName="Tray";function Qa({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:d,useMobileTray:l=true,popoverClassName:c}){let[u,m]=Ze.useState(false),{isMobile:p}=gr();if(l&&p){let f=Ze__namespace.default.isValidElement(e)?Ze__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,y=(v=>{if(typeof v=="string")return v;if(Ze__namespace.default.isValidElement(v)){let C=v.props;if(typeof C.children=="string")return C.children;if(Array.isArray(C.children))return C.children.find(S=>typeof S=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(wt,{isOpen:u,onClose:()=>m(false),title:y,contentPadding:false,headerContent:s,footerContent:d,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(v=>{let C=v.href&&!v.disabled?"a":"button";return jsxRuntime.jsxs(C,{...v.href&&!v.disabled?{href:v.href}:{},onClick:()=>{v.disabled||(v.onAction?v.onAction():i?.(v),m(false));},disabled:v.disabled,"data-testid":v.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!v.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",v.variant==="destructive"?"text-feedback-error-text hover:bg-feedback-error-background active:bg-feedback-error-background/80":"text-text-primary hover:bg-background-hover active:bg-background-hover/80",v.disabled&&"opacity-50 cursor-not-allowed"),children:[v.iconName&&jsxRuntime.jsx(H,{name:v.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:v.render?v.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:v.subtitle?"font-medium":"",children:v.name}),v.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:v.subtitle})]})})]},v.id)})})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(St,{className:tailwindMerge.twMerge("w-fit min-w-[180px] overflow-auto rounded-[var(--control-border-radius)] border border-border-default","bg-background-surface shadow-lg","animate-in fade-in zoom-in-97","duration-200 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-97","data-[exiting]:duration-150 data-[exiting]:ease-in",o==="right"?"origin-top-right":"origin-top-left",c),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1 py-1",c),children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 pt-3",children:s}):null,jsxRuntime.jsx(reactAriaComponents.Menu,{className:"!outline-none",children:t.map(f=>jsxRuntime.jsx($w,{id:f.id,href:f.href,onAction:()=>{f.onAction?f.onAction():i?.(f);},textAlign:n,size:a,iconName:f.iconName,isDisabled:f.disabled,variant:f.variant,subtitle:f.subtitle,render:f.render,noPadding:f.noPadding,"data-testid":f.testId,children:f.name},f.id))}),d?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:d}):null]})})]})})}function $w({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:d,...l}){let c={sm:"px-3 py-2 text-sm",md:i?"px-4 py-2.5 text-base":"px-4 py-2 text-base"},u="text-text-primary hover:bg-background-hover data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-primary data-[focus-visible]:ring-inset",m={primary:u,default:u,destructive:"text-feedback-error-text hover:bg-feedback-error-background data-[focused]:bg-feedback-error-background data-[focus-visible]:ring-2 data-[focus-visible]:ring-feedback-error-border data-[focus-visible]:ring-inset"};return s?jsxRuntime.jsx(reactAriaComponents.MenuItem,{...l,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&c[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:s()}):jsxRuntime.jsxs(reactAriaComponents.MenuItem,{...l,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&c[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(H,{name:t,size:r==="sm"?16:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:i?"font-medium":"",children:n}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:i})]}),t&&e==="right"&&jsxRuntime.jsx(H,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var Jr=({className:e,size:t=24,color:r="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});function Xr({state:e,message:t,className:r,customIndicator:o}){if(e!=="loading-more")return null;let n=jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-center gap-2 py-4","text-text-secondary",r),"aria-label":t||"Loading",children:[jsxRuntime.jsx(Jr,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}function fn({items:e,onLoadMore:t,hasMore:r,isLoading:o=false,loadingState:n,enableVirtualization:a,estimatedItemSize:i=50,overscan:s=5,scrollElement:d,loadMoreThreshold:l=100}){let c=Ze.useRef(null),u=Ze.useRef(null),m=Ze.useRef(false),[p,g]=Ze.useState(0);Ze.useEffect(()=>{u.current&&(d||c.current)&&g(P=>P+1);},[d,e.length]);let f=n||(o?e.length===0?"loading":"loading-more":"idle"),x=f==="loading",b=f==="loading-more",y=a!==void 0?a:e.length>=100,v=reactVirtual.useVirtualizer({count:e.length,getScrollElement:()=>d||c.current,estimateSize:()=>i,overscan:s}),C=y?v:null,w=y?v.getVirtualItems():[];Ze.useEffect(()=>{let P=u.current,k=d||c.current;if(!P||!k||!r||o||!t)return;let M=new IntersectionObserver(D=>{let[R]=D;R?.isIntersecting&&!m.current&&r&&t&&(m.current=true,Promise.resolve(t()).finally(()=>{m.current=false;}));},{root:k,rootMargin:`0px 0px ${l}px 0px`,threshold:0});return M.observe(P),()=>{M.disconnect();}},[r,o,t,d,l,p]);let S=Ze.useCallback((P,k)=>{C?C.scrollToIndex(P,k):c.current&&c.current.children[P]?.scrollIntoView({behavior:"smooth",block:k?.align||"start"});},[C]),T=Ze.useCallback(()=>{C?C.scrollToIndex(0,{align:"start"}):c.current&&c.current.scrollTo({top:0,behavior:"smooth"});},[C]);return {virtualizer:C,virtualItems:w,computedLoadingState:f,isInitialLoad:x,isLoadingMore:b,scrollRef:c,loadMoreRef:u,scrollToIndex:S,scrollToTop:T}}var Za=Ze.createContext({variant:"timeline",size:"md"});function Hg(){return Ze.useContext(Za)}function pl(e){return Ze.isValidElement(e)&&e.type===gl}function cN(e){return Ze.isValidElement(e)&&e.type===fl}function Bu({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:d=null,renderLoadingSkeleton:l,loadingSkeletonCount:c=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:x,height:b,maxHeight:y,...v}){let C=Ze.useRef(null),{isMobile:w}=gr(),S=w?"stacked":e,T=n!==void 0&&a!==void 0,{scrollRef:P,loadMoreRef:k,virtualizer:M,virtualItems:D,isLoadingMore:R,computedLoadingState:I}=fn({items:n||[],onLoadMore:T?m:void 0,hasMore:T?p:false,isLoading:i,loadingState:s,enableVirtualization:T?g:false,estimatedItemSize:f||(S==="stacked"?120:150),overscan:5}),E=T&&P?P:C,O=Ze.useMemo(()=>({variant:S,size:t}),[S,t]),W=S==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",z=S==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",F={};if(T&&m&&(b?(F.height=typeof b=="number"?`${b}px`:b,F.overflowY="auto"):y?(F.maxHeight=typeof y=="number"?`${y}px`:y,F.overflowY="auto"):(F.height="600px",F.overflowY="auto")),T){let V=I==="loading"||i&&(!n||n.length===0);if(V){let G=l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((B,N)=>jsxRuntime.jsx("div",{children:l()},`skeleton-${N}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((B,N)=>{let h=t==="sm"?"gap-2":"gap-3";if(S==="timeline"){let L=t==="sm"?"pt-3":"pt-4",A=t==="sm"?"p-3":"p-4";return jsxRuntime.jsxs("div",{className:"group relative grid items-start gap-4 grid-cols-[3rem_1fr]",children:[jsxRuntime.jsxs("div",{className:`relative flex h-full flex-col items-center ${L}`,children:[jsxRuntime.jsx(q,{width:32,height:32,variant:"circle"}),N<c-1&&jsxRuntime.jsx("span",{className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),jsxRuntime.jsxs("div",{className:`min-w-0 flex flex-col ${h} ${A} rounded-md border border-border-subtle bg-background-surface`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx(q,{width:"50%",height:16}),jsxRuntime.jsx(q,{width:"15%",height:12})]}),jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15})]})]},`skeleton-${N}`)}else return jsxRuntime.jsxs("div",{className:`flex flex-col ${t==="sm"?"px-3 py-3":"px-4 py-4"}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(q,{width:24,height:24,variant:"circle"}),jsxRuntime.jsx(q,{width:"50%",height:16})]}),jsxRuntime.jsxs("div",{className:`mt-3 flex flex-col ${h}`,children:[jsxRuntime.jsx(q,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"70%",height:t==="sm"?14:15}),jsxRuntime.jsx(q,{width:"20%",height:12})]})]},`skeleton-${N}`)})});return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:E,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:G})})}if(d)return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:E,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:d})})});if(!n||n.length===0)return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:E,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let J=M?D?.map(G=>({virtualItem:G,item:n[G.index],index:G.index}))||[]:n.map((G,B)=>({item:G,index:B,virtualItem:null}));return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsxs("div",{ref:E,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:{...F,position:M?"relative":void 0},...v,children:[M?jsxRuntime.jsxs("div",{style:{height:`${M.getTotalSize()}px`,position:"relative"},children:[J.map(({item:G,index:B,virtualItem:N})=>{if(!G||!N)return null;let h=a(G,B),L=S==="timeline"&&Ze.isValidElement(h)&&pl(h)?Ze.cloneElement(h,{showConnector:B!==n.length-1}):h;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${N.start}px)`},"data-index":N.index,ref:M.measureElement,children:L},`item-${B}`)}),R&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${M.getTotalSize()}px`,left:0,width:"100%"},children:x||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[J.map(({item:G,index:B})=>{let N=a(G,B);if(S==="timeline"&&Ze.isValidElement(N)&&pl(N)){let h=B===n.length-1;return jsxRuntime.jsx("div",{children:Ze.cloneElement(N,{showConnector:!h})},`item-${B}`)}return jsxRuntime.jsx("div",{children:N},`item-${B}`)}),R&&(x||jsxRuntime.jsx(Xr,{state:"loading-more"}))]}),m&&p&&!V&&jsxRuntime.jsx("div",{ref:k,style:M?{position:"absolute",top:`${M.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let Y=Ze.Children.toArray(o),U=Y.map((V,J)=>{if(pl(V)){let G=V.props.showConnector??(S==="timeline"&&J<Y.length-1),B=S==="timeline"&&J>0;return Ze.cloneElement(V,{showConnector:G,showIncomingConnector:B})}if(cN(V)){let G=J===Y.length-1;return Ze.cloneElement(V,{__isLastGroup:G,__isFirstGroup:J===0})}return V});return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),...v,children:U})})}Bu.displayName="ActivityFeed";function fl(e){let{variant:t,size:r}=Hg(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:d=false,__isFirstGroup:l=false,...c}=e,u=Ze.Children.toArray(i),m=u.map((f,x)=>{if(pl(f)){let b=f.props.showConnector??(t==="timeline"&&!(d&&x===u.length-1));return Ze.cloneElement(f,{showConnector:b,showIncomingConnector:t==="timeline"&&!(l&&x===0)})}return f}),p=t==="timeline"?"pl-[3rem]":r==="sm"?"px-3":"px-4",g=r==="sm"?"gap-3":"gap-4";return jsxRuntime.jsxs("section",{"data-slot":"group",className:tailwindMerge.twMerge("flex flex-col",s),...c,children:[(o||n||a)&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("mb-2 flex flex-wrap items-end justify-between gap-2",p),children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o&&jsxRuntime.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-secondary",children:o}),n&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:n})]}),a&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center gap-2",children:a})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex flex-col",g),children:m})]})}fl.displayName="ActivityFeedGroup";var Og={neutral:"bg-background-muted text-text-secondary border-border-muted",brand:"bg-background-muted text-action-brand border-action-brand/30",success:"bg-background-muted text-feedback-success-text border-feedback-success-border/40",warning:"bg-background-muted text-feedback-warning-text border-feedback-warning-border/40",danger:"bg-background-muted text-feedback-error-text border-feedback-error-border/40",info:"bg-background-muted text-feedback-info-text border-feedback-info-border/40"},dN={neutral:"bg-background-subtle",brand:"bg-action-brand/5",success:"bg-feedback-success-background",warning:"bg-feedback-warning-background",danger:"bg-feedback-error-background",info:"bg-feedback-info-background"},uN={neutral:"border-border-muted",brand:"border-action-brand",success:"border-feedback-success-border",warning:"border-feedback-warning-border",danger:"border-feedback-error-border",info:"border-feedback-info-border"};function gl(e){let{variant:t,size:r}=Hg(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:d,visual:l,icon:c,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:x=false,interactive:b,className:y,children:v,onKeyDown:C,showIncomingConnector:w,...S}=e,T=l??(c?jsxRuntime.jsx(H,{name:c,weight:u||"fill",className:"h-4 w-4"}):null),P=p??(t==="stacked"?"minimal":"subtle"),k=r==="sm"?"gap-2":"gap-3",M="text-xs text-text-secondary",D=r==="sm"?"text-sm":"text-[15px]",R="text-xs text-text-secondary",I=b??typeof S.onClick=="function",E=J=>{if(!I){C?.(J);return}J.key===" "?J.preventDefault():J.key==="Enter"&&(J.preventDefault(),J.currentTarget.click()),C?.(J);},O=J=>{I&&J.key===" "&&(J.preventDefault(),J.currentTarget.click());},W=I?tailwindMerge.twMerge("group cursor-pointer",ot()):void 0,F=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",P==="minimal"?r==="sm"?"pt-2":"pt-3":r==="sm"?"pt-3":"pt-4"),children:[jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("relative z-10 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Og[m]),children:T}),t==="timeline"&&f&&jsxRuntime.jsx("span",{"data-slot":"separator",className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),Y=g?tailwindMerge.twMerge(dN[m],P==="minimal"?"rounded-md border border-border-muted":uN[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:I?"button":void 0,tabIndex:I?0:void 0,className:tailwindMerge.twMerge("flex flex-col",r==="sm"?"px-3 py-3":"px-4 py-4",{minimal:"",subtle:"bg-background-subtle",solid:"bg-background-muted"}[P],Y,W,I?"transition-colors hover:bg-background-subtle/80":"",y),onKeyDown:E,onKeyUp:O,...S,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[!x&&jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Og[m]),children:T}),jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o})]}),jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("mt-3 flex flex-col",k),children:[n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",D),children:n}),i&&jsxRuntime.jsx("div",{className:R,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),v,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:d}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",M),children:a})]})]});let U=P==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",V={minimal:"",subtle:"rounded-md border border-border-subtle bg-background-surface",solid:"rounded-md bg-background-muted shadow-sm"};return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"timeline",role:I?"button":void 0,tabIndex:I?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",W,y),onKeyDown:E,onKeyUp:O,...S,children:[x?jsxRuntime.jsx("div",{}):F,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",k,U,V[P],Y,I?"transition-colors group-hover:bg-background-subtle/70":""),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",M),children:a})]}),n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",D),children:n}),i&&jsxRuntime.jsx("div",{className:R,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),v,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:d})]})]})}gl.displayName="ActivityItem";function yr({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:d,primaryAction:l,secondaryAction:c,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:x="85vh",height:b,mobileMaxHeight:y="90vh",mobileHeight:v,contentPadding:C=true,className:w}){let S=fr("(max-width: 767px)"),T=Qs(S&&e===void 0),P=T?.height??null,k=T?.keyboardOffset??0,M=Ze.useRef(null),D=Ze.useCallback(()=>{M.current&&M.current.scrollTop!==0&&(M.current.scrollTop=0);},[]),R=Ze.useRef(null),I=Ze.useRef(null);Ze.useEffect(()=>{let F=I.current;if(!F||!S)return;let Y=null,U=V=>{let J=V.target;J&&["INPUT","TEXTAREA","SELECT"].includes(J.tagName)&&(Y&&clearTimeout(Y),Y=setTimeout(()=>{J.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return F.addEventListener("focusin",U),()=>{F.removeEventListener("focusin",U),Y&&clearTimeout(Y);}},[S]);let E=Ze.useCallback(()=>{R.current&&R.current.scrollTop!==0&&(R.current.scrollTop=0);},[]);if(e===false)return null;let O=r||o,W=l||c||u||m,z=e!==void 0;return S?z?jsxRuntime.jsx(wt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:l,secondaryAction:c,footerContent:m,transparentOverlay:p,maxHeight:y,height:v,maxWidth:g,contentPadding:C,showHandle:true,animationVariant:"scale",className:w,children:d}):jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isDismissable:true,transparent:p,style:{paddingBottom:k>0?`${k}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:M,onScroll:D,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{...v?{height:v}:{maxHeight:/\d/.test(y)?P!==null?`min(${y}, ${Math.max(P-8,0)}px, 100dvh)`:`min(${y}, 100dvh)`:y}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),O&&(i?jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",C?"px-6 py-6":"p-0"),children:d}),W&&jsxRuntime.jsx(pn,{primaryAction:l,secondaryAction:c,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{...z?{isOpen:e,onOpenChange:F=>{!F&&t&&t();}}:{},isDismissable:true,transparent:p,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:g},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:R,onScroll:E,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{minWidth:f,...b?{height:b}:{maxHeight:x}},children:[O&&(i?jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",C?"px-6 py-6":"p-0"),children:d}),W&&jsxRuntime.jsx(pn,{primaryAction:l,secondaryAction:c,tertiaryAction:u,footerContent:m})]})})})})}function Jg({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:r,maxWidth:i,minWidth:s,primaryAction:{label:n,onPress:t,variant:a},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:o})})}var gn={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},Ir=Ze.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=mN__namespace[e];if(!s)return null;let d=typeof t=="string"?t in gn?gn[t]:gn.md:t,l=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:l,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});Ir.displayName="IconSSR";var fN=Ze.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:l,ref:c,...u})=>{let m=typeof n=="string"?n in gn?gn[n]:gn.md:n,p=r?typeof r=="string"?r in gn?gn[r]:m*1.75:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(Ir,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:l})})});fN.displayName="IconSSRWithContainer";var _a=({className:e,showWordmark:t=true,width:r,fill:o})=>{let n,a;if(o?o.startsWith("fill-")?a=o:n=o:e?a=e:n="var(--color-text-primary)",t){let d=r||270,l=d/270*80;return jsxRuntime.jsxs("svg",{width:d,height:l,viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsxRuntime.jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsxRuntime.jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsxRuntime.jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsxRuntime.jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsxRuntime.jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsxRuntime.jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsxRuntime.jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_796_283",children:jsxRuntime.jsx("rect",{width:"270",height:"80",fill:"white"})})})]})}let i=r||80;return jsxRuntime.jsxs("svg",{width:i,height:i,viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var hl=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:d="app-sidebar-collapse"})=>{let l=p=>p.length>0&&"items"in p[0],c=p=>l(p)?p:[{id:"default-section",items:p}],u=(p,g,f)=>jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[p.title&&jsxRuntime.jsx("div",{className:"px-6 py-1 text-xs font-medium text-text-secondary uppercase tracking-wider",children:p.title}),jsxRuntime.jsx("div",{className:"space-y-0.5",children:p.items.map(x=>m(x))}),g<f-1&&jsxRuntime.jsx("div",{className:"border-b border-border-subtle mx-6 my-2"})]},p.id),m=(p,g=false)=>{if(p.children&&p.children.length>0){let b=`category-${p.id}`;return jsxRuntime.jsxs("div",{className:"group/category",children:[jsxRuntime.jsx("input",{type:"checkbox",id:b,className:"peer/category hidden",defaultChecked:p.isExpanded,"aria-hidden":"true"}),jsxRuntime.jsxs("label",{htmlFor:b,className:"flex items-center gap-3 px-6 py-1 text-text-primary hover:bg-background-hover hover:text-text-primary cursor-pointer transition-all duration-200",children:[p.icon&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1"}),jsxRuntime.jsx("svg",{className:"w-4 h-4 transform transition-transform duration-200 peer-checked/category:rotate-180 ml-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsx("div",{className:"hidden peer-checked/category:block bg-background-subtle border-l-2 border-border-subtle ml-6",children:p.children.map(y=>m(y,true))})]},p.id)}let f={href:p.href||"#",className:`flex items-center gap-3 transition-all duration-200 hover:bg-background-hover ${g?"pl-8 pr-6 py-1 text-sm":"px-6 py-1"} ${p.isActive?`bg-action-brand/10 text-action-brand ${g?"":"border-l-2 border-action-brand"}`:"text-text-primary hover:text-text-primary"}`,"aria-current":p.isActive?"page":void 0},x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p.icon&&!g&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label})]});return a==="a"?jsxRuntime.jsx("a",{...f,children:x},p.id):jsxRuntime.jsx(a,{...f,children:x},p.id)};return jsxRuntime.jsxs("div",{className:`flex flex-col h-full ${i}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-[60px] px-6 border-b border-border-default",children:[n&&jsxRuntime.jsx("div",{className:"relative top-[-1px] transition-all duration-200",children:o||jsxRuntime.jsx(_a,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:d,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("label",{htmlFor:s,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),jsxRuntime.jsxs("nav",{className:"flex-1 flex flex-col overflow-hidden",children:[e&&e.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto py-2 scrollbar-hide",children:c(e).map((p,g,f)=>u(p,g,f.length))}),t&&t.length>0&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t bg-background-muted/30",children:jsxRuntime.jsx("div",{className:"mt-2 pb-2 space-y-0.5",children:t.map(p=>m(p))})}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-default",children:jsxRuntime.jsx("div",{children:r})})]})]})};function Xn(e){return e.id??e.href??e.label}function Hu(e,t,r=[]){for(let o of e){if(o.href===t||o.id===t)return o.children?.length&&o.pushOnSelect!==false?[...r,Xn(o)]:r;if(o.children?.length){let n=Hu(o.children,t,[...r,Xn(o)]);if(n)return n}}return null}function $g(e,t){let r=[],o=e;for(let n of t){let a=o.find(i=>Xn(i)===n);if(!a)break;r.push(a),o=a.children??[];}return r}function bN(e,t,r){let o=t.length>0?[...e,...t]:e,n=[{path:[],items:e,bottomItems:t.length>0?t:void 0}],a=$g(o,r),i=[];for(let s of a){if(!s.children?.length)break;i=[...i,Xn(s)],n.push({path:i,parent:s,items:s.children});}return n}var hN=({href:e,...t})=>jsxRuntime.jsx("a",{href:e,...t}),jg=[];function xN(e){let t=[];for(let r of e){let o=r.items??[];o.length!==0&&(t.length>0&&t.push({id:`__divider__${r.id}`,label:"",divider:true}),r.title&&t.push({id:`__group__${r.id}`,label:r.title,groupLabel:true}),t.push(...o));}return t}function yN(e,t){if(process.env.NODE_ENV==="production"||t.length===0)return;let r=new Map;for(let o of e)o.id&&r.set(o.id,"id"),o.href&&!r.has(o.href)&&r.set(o.href,"href");for(let o of t){let n=null;o.id&&r.has(o.id)?n=r.get(o.id)==="id"?`id "${o.id}"`:`id "${o.id}" (matches an items \`href\`)`:o.href&&r.has(o.href)&&(n=r.get(o.href)==="href"?`href "${o.href}"`:`href "${o.href}" (matches an items \`id\`)`),n&&console.warn(`[StackNav] L1 ${n} appears in both \`items\` and \`bottomItems\`. Stack tokens and value lookups will resolve to the \`items\` entry, making the bottomItems entry unreachable. L1 ids and hrefs must be unique across both arrays.`);}}function vN(e){if(!e)return {};let t={};return e.background!==void 0&&(t["--edges-stack-nav-background"]=e.background),e.activeBackground!==void 0&&(t["--edges-stack-nav-row-active-background"]=e.activeBackground),e.activeColor!==void 0&&(t["--edges-stack-nav-row-active-color"]=e.activeColor),e.hoverBackground!==void 0&&(t["--edges-stack-nav-row-hover-background"]=e.hoverBackground),e.borderColor!==void 0&&(t["--edges-stack-nav-border-color"]=e.borderColor),t}function $a({items:e,groups:t,bottomItems:r,value:o,defaultStack:n,stack:a,onStackChange:i,onSelect:s,linkComponent:d=hN,renderRow:l,showLogo:c=false,logo:u,header:m,footer:p,mobileMenuId:g,sidebarCollapseId:f,rootLabel:x,sticky:b=true,width:y=260,ariaLabel:v="Navigation",theme:C,animated:w=true,style:S,className:T}){process.env.NODE_ENV!=="production"&&t&&e&&console.warn("[StackNav] Both `items` and `groups` were provided. `groups` takes precedence and `items` is ignored.");let P=Ze__namespace.useMemo(()=>t?xN(t):e??jg,[t,e]),k=r??jg,M=Ze__namespace.useMemo(()=>k.length>0?[...P,...k]:P,[P,k]);Ze__namespace.useEffect(()=>{yN(P,k);},[P,k]);let[D,R]=Ze__namespace.useState(()=>a!==void 0?a:n!==void 0?n:o?Hu(M,o)??[]:[]),I=a??D,E=Ze__namespace.useCallback(B=>{a===void 0&&R(B),i?.(B);},[a,i]),O=Ze__namespace.useRef(false);Ze__namespace.useEffect(()=>{if(a!==void 0||!O.current&&(O.current=true,n!==void 0)||!o)return;let B=Hu(M,o);R(N=>{let h=B??[];return wN(N,h)?N:h});},[o,M,a,n]);let W=Ze__namespace.useMemo(()=>bN(P,k,I),[P,k,I]),z=Ze__namespace.useCallback((B,N)=>{B.children?.length&&E([...N,Xn(B)]);},[E]),F=Ze__namespace.useCallback(()=>{E(I.slice(0,-1));},[I,E]),Y=Ze__namespace.useCallback((B,N)=>{let h=$g(M,I);if(s?.(N,h),!!N.children?.length&&!(N.href&&N.pushOnSelect===false)){let A=W[W.length-1]?.path??[];z(N,A);}N.href||B.preventDefault();},[M,I,s,z,W]),U=Ze__namespace.useCallback(B=>{let N=W[W.length-1]?.path??[];z(B,N);},[z,W]),V=Ze__namespace.useCallback(B=>o?B.href===o||B.id===o:false,[o]),J=b?"sticky top-0 h-[100dvh]":"",G={...y!=null?{width:y}:{},...vN(C),...S};return jsxRuntime.jsxs("aside",{role:"navigation","aria-label":v,"data-edges-stack-nav":"",className:tailwindMerge.twMerge("edges-stack-nav flex flex-col flex-shrink-0 overflow-hidden",w&&"edges-stack-nav--animated",J,T),style:G,children:[c?jsxRuntime.jsxs("div",{className:"edges-stack-nav__logo",children:[jsxRuntime.jsx("div",{className:"relative top-[-1px]",children:u??jsxRuntime.jsx(_a,{showWordmark:true,width:120})}),f?jsxRuntime.jsx("label",{htmlFor:f,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}):null,g?jsxRuntime.jsx("label",{htmlFor:g,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}):null]}):null,m?jsxRuntime.jsx("div",{className:"edges-stack-nav__header",children:m}):null,jsxRuntime.jsx("div",{className:"relative flex-1 overflow-hidden",children:W.map((B,N)=>{let h=B.path.length,L=N===W.length-1,A=N<W.length-1,j=h===0?"__root__":B.path.join("/");return jsxRuntime.jsx(CN,{pane:B,parentPath:B.path.slice(0,-1),depth:h,isTop:L,isAbove:A,rootLabel:x,LinkComponent:d,renderRow:l,isActive:V,onSelect:Y,onDrillIn:U,onBack:F,animated:w},j)})}),p?jsxRuntime.jsx("div",{className:"edges-stack-nav__footer",children:p}):null]})}function CN({pane:e,depth:t,isTop:r,isAbove:o,rootLabel:n,LinkComponent:a,renderRow:i,isActive:s,onSelect:d,onDrillIn:l,onBack:c,animated:u}){let m=r?"edges-stack-nav__pane--top":o?"edges-stack-nav__pane--above":"edges-stack-nav__pane--below";return jsxRuntime.jsxs("nav",{"aria-label":e.parent?.label??n??"Navigation","aria-hidden":r?void 0:true,inert:r?void 0:true,className:tailwindMerge.twMerge("edges-stack-nav__pane absolute inset-0 flex flex-col gap-px overflow-y-auto px-2 py-3",!u&&"edges-stack-nav__pane--instant",m),children:[t>0&&e.parent?jsxRuntime.jsxs("button",{type:"button",className:"edges-stack-nav__back edges-stack-nav__row flex w-full cursor-pointer items-center gap-2 rounded-sm border-0 bg-transparent px-3 py-2 mb-2 text-left text-sm font-semibold text-text-primary",onClick:c,"aria-label":`Back from ${e.parent.label}`,children:[jsxRuntime.jsx(SN,{}),jsxRuntime.jsx("span",{children:e.parent.label})]}):n?jsxRuntime.jsx("div",{className:"px-3 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:n}):null,e.items.map(p=>jsxRuntime.jsx(Qg,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:l},Xn(p))),e.bottomItems&&e.bottomItems.length>0?jsxRuntime.jsx("div",{className:"edges-stack-nav__bottom-items mt-auto flex flex-col gap-px pt-3",children:e.bottomItems.map(p=>jsxRuntime.jsx(Qg,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:l},Xn(p)))}):null]})}function Qg({item:e,LinkComponent:t,renderRow:r,isActive:o,onSelect:n,onDrillIn:a}){if(e.divider)return jsxRuntime.jsx("div",{className:"edges-stack-nav__divider my-2",role:"separator"});if(e.groupLabel)return jsxRuntime.jsx("div",{className:"px-3 pt-6 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:e.label});let i=!!e.children?.length,s=tailwindMerge.twMerge("edges-stack-nav__row flex items-center justify-between gap-3 rounded-sm px-3 py-2 text-sm font-normal text-text-primary no-underline cursor-pointer text-left bg-transparent border-0 transition-colors",o&&"edges-stack-nav__row--active font-semibold");if(r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r({item:e,isActive:o,hasChildren:i,select:c=>n(c,e),drillIn:()=>a(e),LinkComponent:t,className:s})});let d=jsxRuntime.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.leading??e.icon?jsxRuntime.jsx("span",{className:"inline-flex items-center flex-shrink-0",children:e.leading??e.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:e.label})]});if(e.href&&i&&e.pushOnSelect===false)return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(s,"cursor-default p-0"),children:[jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm px-3 py-2 text-inherit no-underline","aria-current":o?"page":void 0,onClick:c=>n(c,e),children:d}),jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 pr-2 text-text-secondary",children:[e.trailing,jsxRuntime.jsx("button",{type:"button",className:"edges-stack-nav__drill-in inline-flex cursor-pointer items-center rounded-sm border-0 bg-transparent p-1 text-inherit","aria-label":`Open ${e.label}`,onClick:()=>a(e),children:jsxRuntime.jsx(Zg,{})})]})]});let l=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d,jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 text-text-secondary",children:[e.trailing,i?jsxRuntime.jsx(Zg,{}):null]})]});return e.href?jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:s,"aria-current":o?"page":void 0,onClick:c=>n(c,e),children:l}):jsxRuntime.jsx("button",{type:"button",className:s,"aria-label":e.ariaLabel,onClick:c=>{n(c,e);},children:l})}function Zg(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M4.5 3 7.5 6 4.5 9"})})}function SN(){return jsxRuntime.jsx("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M8.5 3 4.5 7 8.5 11"})})}function wN(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return false;return true}var Ki=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:d,className:l="",mobileMenuId:c="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(Ir,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(Ir,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(Ir,{name:"Moon",size:"sm"})}},m=()=>{switch(s||(i?"dark":"light")){case "system":return "Switch to light mode";case "light":return "Switch to dark mode";case "dark":return "Switch to system mode";default:return "Toggle theme"}};return jsxRuntime.jsx("header",{className:`h-[60px] bg-background-surface border-b ${l}`,children:jsxRuntime.jsxs("div",{className:"relative flex h-full items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center h-full flex-shrink-0",children:r&&jsxRuntime.jsx("label",{htmlFor:c,className:"md:hidden cursor-pointer","aria-label":"Open menu",children:jsxRuntime.jsx("div",{className:"flex h-full w-14 flex-col items-center justify-center border-r hover:bg-background-hover transition-colors",children:jsxRuntime.jsx(Ir,{name:"List",size:"sm"})})})}),t&&jsxRuntime.jsx("div",{className:"flex-1 flex justify-end md:justify-center md:px-4 min-w-0",children:jsxRuntime.jsx("div",{className:"w-full md:max-w-4xl min-w-0",children:t})}),!t&&jsxRuntime.jsx("div",{className:"flex-1"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 pr-4 flex-shrink-0 ml-4",children:[e,n&&a&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover transition-colors","aria-label":m(),children:u()}),d,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function tb({sideNav:e,stackNav:t,topNav:r,children:o,contentPaddingX:n,contentPaddingY:a,showSidebarBorder:i=true,mainClassName:s,enableJsEnhancements:d=false}){let l="app-mobile-menu",c="app-sidebar-collapse";return Ze.useEffect(()=>{if(!d)return;let u=document.getElementById(c),m=document.getElementById(l),p=document.querySelector("[data-app-shell]"),g=document.getElementById("app-sidebar");if(!u||!p||!g)return;let f=null,x=false;try{let M=localStorage.getItem("sidebar-collapsed");M!==null&&(u.checked=M==="true");}catch{}let b=()=>{try{localStorage.setItem("sidebar-collapsed",String(u.checked));}catch{}u.checked?x=true:(f&&(clearTimeout(f),f=null),p.removeAttribute("data-peek"),x=false);};u.addEventListener("change",b);let y=M=>{M.key==="Escape"&&(m&&(m.checked=false),p.removeAttribute("data-peek"));};document.addEventListener("keydown",y);let v=null;m&&(v=()=>{document.body.style.overflow=m.checked?"hidden":"";},m.addEventListener("change",v));let C=M=>{let R=M.target.closest("a");R&&R.href&&window.innerWidth<768&&m&&setTimeout(()=>{m.checked=false,document.body.style.overflow="";},100);};g.addEventListener("click",C);let w=16,S=200,T=()=>{f&&(clearTimeout(f),f=null),p.getAttribute("data-peek")!=="true"&&p.setAttribute("data-peek","true");},P=()=>{f&&clearTimeout(f),f=setTimeout(()=>{p.removeAttribute("data-peek"),f=null;},S);},k=M=>{if(window.innerWidth<768||!u.checked)return;let D=g.contains(M.target);if(x&&!D&&(x=false),x)return;M.clientX<=w||D?T():p.getAttribute("data-peek")==="true"&&P();};return document.addEventListener("mousemove",k),()=>{u.removeEventListener("change",b),document.removeEventListener("keydown",y),m&&v&&m.removeEventListener("change",v),g.removeEventListener("click",C),document.removeEventListener("mousemove",k),f&&clearTimeout(f);}},[d,l,c]),jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative","data-app-shell":"",children:[jsxRuntime.jsx("input",{type:"checkbox",id:c,className:"sr-only peer/sidebar","aria-hidden":"true"}),jsxRuntime.jsx("a",{href:"#app-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 z-50 rounded px-3 py-2 bg-background-surface shadow",children:"Skip to content"}),jsxRuntime.jsx(Ki,{...r,mobileMenuId:l,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",r?.className].filter(Boolean).join(" ")}),jsxRuntime.jsxs("div",{className:"flex w-full h-[calc(100dvh-60px)] md:h-[100dvh] relative overflow-hidden",children:[jsxRuntime.jsx("input",{type:"checkbox",id:l,className:"sr-only peer/mobile","aria-hidden":"true"}),jsxRuntime.jsx("label",{htmlFor:l,className:"fixed inset-0 bg-background-modal z-[55] opacity-0 pointer-events-none peer-checked/mobile:opacity-100 peer-checked/mobile:pointer-events-auto transition-opacity md:hidden","aria-label":"Close menu"}),jsxRuntime.jsx("div",{"aria-hidden":"true","data-peek-zone":"",className:"hidden md:block fixed left-0 top-0 bottom-0 w-4 z-[70] pointer-events-none"}),jsxRuntime.jsx("label",{htmlFor:c,"data-expand-rail":"",className:"hidden fixed left-3 top-3 z-[75] items-center justify-center w-9 h-9 rounded-md bg-background-surface border border-border-default shadow-sm hover:bg-background-hover cursor-pointer transition-all duration-200","aria-label":"Expand sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("aside",{id:"app-sidebar","data-app-sidebar":"",className:["bg-background-surface","border-r border-border-default","transition-transform duration-300 ease-in-out md:transition-[transform,width] md:duration-300 md:ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-full md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",i?"":"!border-r-0",(t??e)?.className||""].filter(Boolean).join(" "),children:t?jsxRuntime.jsx($a,{...t,mobileMenuId:l,sidebarCollapseId:c,sticky:false,width:null,className:["h-full !border-r-0",t.className].filter(Boolean).join(" ")}):jsxRuntime.jsx(hl,{...e,mobileMenuId:l,sidebarCollapseId:c,className:"h-full"})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntime.jsx("div",{className:"sticky top-0 flex-shrink-0 hidden md:block z-20","data-top-nav-wrapper":"",children:jsxRuntime.jsx(Ki,{...r,className:r?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body scrollbar-visible",n,a,s||""].join(" "),role:"main",children:o})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
1
+ 'use strict';var reactAriaComponents=require('react-aria-components'),Ze=require('react'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),Tf=require('@phosphor-icons/react'),luxon=require('luxon'),reactVirtual=require('@tanstack/react-virtual'),bN=require('@phosphor-icons/react/ssr'),reactAria=require('react-aria'),reactStately=require('react-stately'),lucideReact=require('lucide-react'),framerMotion=require('framer-motion'),gk=require('react-ace'),reactColorful=require('react-colorful'),curve=require('@visx/curve'),shape=require('@visx/shape'),gradient=require('@visx/gradient'),group=require('@visx/group'),scale=require('@visx/scale'),d3Array=require('d3-array'),axis=require('@visx/axis'),responsive=require('@visx/responsive'),zoom=require('@visx/zoom'),BP=require('papaparse'),brush=require('@visx/brush'),pattern=require('@visx/pattern'),d3Scale=require('d3-scale'),d3Time=require('d3-time'),dateFns=require('date-fns'),date=require('@internationalized/date'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),reactDom=require('react-dom'),HD=require('react-map-gl'),server=require('react-dom/server'),dI=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),fI=require('@tiptap/starter-kit'),L5=require('fuse.js');var _documentCurrentScript=typeof document!=='undefined'?document.currentScript:null;function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Ze__namespace=/*#__PURE__*/_interopNamespace(Ze);var Tf__namespace=/*#__PURE__*/_interopNamespace(Tf);var bN__namespace=/*#__PURE__*/_interopNamespace(bN);var gk__default=/*#__PURE__*/_interopDefault(gk);var BP__default=/*#__PURE__*/_interopDefault(BP);var HD__default=/*#__PURE__*/_interopDefault(HD);var dI__default=/*#__PURE__*/_interopDefault(dI);var fI__default=/*#__PURE__*/_interopDefault(fI);var L5__default=/*#__PURE__*/_interopDefault(L5);var G0=Object.create;var Wd=Object.defineProperty;var W0=Object.getOwnPropertyDescriptor;var U0=Object.getOwnPropertyNames;var K0=Object.getPrototypeOf,Y0=Object.prototype.hasOwnProperty;var J0=(e,t,r)=>t in e?Wd(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var X0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var q0=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of U0(t))!Y0.call(e,n)&&n!==r&&Wd(e,n,{get:()=>t[n],enumerable:!(o=W0(t,n))||o.enumerable});return e};var Cf=(e,t,r)=>(r=e!=null?G0(K0(e)):{},q0(Wd(r,"default",{value:e,enumerable:true}),e));var Mi=(e,t,r)=>J0(e,typeof t!="symbol"?t+"":t,r);var Np=X0((Sp,wp)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Sp<"u"?t():(t(),e.FileSaver={});})(Sp,function(){function e(s,d){return typeof d>"u"?d={autoBom:false}:typeof d!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),d={autoBom:!d}),d.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function t(s,d,c){var l=new XMLHttpRequest;l.open("GET",s),l.responseType="blob",l.onload=function(){i(l.response,d,c);},l.onerror=function(){console.error("could not download file");},l.send();}function r(s){var d=new XMLHttpRequest;d.open("HEAD",s,false);try{d.send();}catch{}return 200<=d.status&&299>=d.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"));}catch{var d=document.createEvent("MouseEvents");d.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),s.dispatchEvent(d);}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,d,c){var l=n.URL||n.webkitURL,u=document.createElement("a");d=d||s.name||"download",u.download=d,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?o(u):r(u.href)?t(s,d,c):o(u,u.target="_blank")):(u.href=l.createObjectURL(s),setTimeout(function(){l.revokeObjectURL(u.href);},4e4),setTimeout(function(){o(u);},0));}:"msSaveOrOpenBlob"in navigator?function(s,d,c){if(d=d||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(e(s,c),d);else if(r(s))t(s,d,c);else {var l=document.createElement("a");l.href=s,l.target="_blank",setTimeout(function(){o(l);});}}:function(s,d,c,l){if(l=l||open("","_blank"),l&&(l.document.title=l.document.body.innerText="downloading..."),typeof s=="string")return t(s,d,c);var u=s.type==="application/octet-stream",m=/constructor/i.test(n.HTMLElement)||n.safari,p=/CriOS\/[\d]+/.test(navigator.userAgent);if((p||u&&m||a)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var h=g.result;h=p?h:h.replace(/^data:[^;]*;/,"data:attachment/file;"),l?l.location.href=h:location=h,l=null;},g.readAsDataURL(s);}else {var f=n.URL||n.webkitURL,x=f.createObjectURL(s);l?l.location=x:location.href=x,l=null,setTimeout(function(){f.revokeObjectURL(x);},4e4);}});n.saveAs=i.saveAs=i,typeof wp<"u"&&(wp.exports=i);});});function fr(e,t=false){let[r,o]=Ze.useState(t);return Ze.useEffect(()=>{if(typeof window>"u")return;let n=window.matchMedia(e);o(n.matches);let a=i=>{o(i.matches);};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a);}},[e]),r}var Wn={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function gr(e="base"){let t=fr(`(min-width: ${Wn.sm})`,e!=="base"),r=fr(`(min-width: ${Wn.md})`,["md","lg","xl","2xl"].includes(e)),o=fr(`(min-width: ${Wn.lg})`,["lg","xl","2xl"].includes(e)),n=fr(`(min-width: ${Wn.xl})`,["xl","2xl"].includes(e)),a=fr(`(min-width: ${Wn["2xl"]})`,e==="2xl"),i=!r,s=r,d="base";return a?d="2xl":n?d="xl":o?d="lg":r?d="md":t&&(d="sm"),{current:d,isSm:t,isMd:r,isLg:o,isXl:n,is2Xl:a,isMobile:i,isDesktop:s}}function ft(e,t){let r=Ze.forwardRef(({size:o=24,color:n="currentColor",className:a,mirrored:i,alt:s,...d},c)=>{let l=!!s||"aria-label"in d;return jsxRuntime.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 256 256",fill:n,className:a,transform:i?"scale(-1, 1)":void 0,"aria-hidden":l?void 0:true,role:l?"img":void 0,"aria-label":s,...d,children:t})});return r.displayName=e,r}var js=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M12 128h44M200 128h44",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"76",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("circle",{cx:"180",cy:"128",r:"20",fill:"none",stroke:"currentColor",strokeWidth:"16"})]}),Sf=()=>jsxRuntime.jsx("path",{d:"M166 120 88 70",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),wf=()=>jsxRuntime.jsx("path",{d:"M162 122 92 128",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),Nf=()=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 85.7 A32 32 0 1 1 144 85.7",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"58",r:"8",fill:"currentColor",stroke:"none"})]}),$0=ft("TextureRecloser",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"R"})]})),eS=ft("TextureFuse",jsxRuntime.jsx("path",{d:"M20 128h72q18 -84 36 0q18 84 36 0h72",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})),tS=ft("TextureBreaker",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("rect",{x:"36",y:"36",width:"184",height:"184",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"140",fontWeight:"700",fill:"currentColor",stroke:"none",children:"B"})]})),rS=ft("TextureSource",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M4 128h40M212 128h40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"84",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("path",{d:"M92 128q18 -84 36 0q18 84 36 0",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),oS=ft("TextureCapacitor",jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("path",{d:"M4 128h106M146 128h106M110 72v112M146 72v112",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"})})),nS=ft("TextureRegulator",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"92",fill:"none",stroke:"currentColor",strokeWidth:"16"}),jsxRuntime.jsx("text",{x:"128",y:"126",textAnchor:"middle",dominantBaseline:"central",fontFamily:"ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",fontSize:"128",fontWeight:"700",fill:"currentColor",stroke:"none",children:"V"})]})),aS=ft("TextureSwitch",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Sf,{})]})),iS=ft("TextureSwitchClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(wf,{})]})),sS=ft("TextureOpenPoint",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M112 52 C 74 92, 74 164, 112 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M144 52 C 182 92, 182 164, 144 204",fill:"none",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"})]})),lS=ft("TextureSectionalizerOpen",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(Sf,{}),jsxRuntime.jsx(Nf,{})]})),cS=ft("TextureSectionalizerClosed",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(js,{}),jsxRuntime.jsx(wf,{}),jsxRuntime.jsx(Nf,{})]})),dS=ft("TextureTransformer",jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("path",{d:"M40 64H88A22 22 0 0 1 88 108A22 22 0 0 1 88 152A22 22 0 0 1 88 196H40",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M216 64H168A22 22 0 0 0 168 108A22 22 0 0 0 168 152A22 22 0 0 0 168 196H216",fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",strokeLinejoin:"round"})]})),za={1:[128],2:[110,146],3:[92,128,164]},Ud=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round"},e),Kd=e=>jsxRuntime.jsx("path",{d:`M24 ${e}h208`,fill:"none",stroke:"currentColor",strokeWidth:"16",strokeLinecap:"round",pathLength:100,strokeDasharray:"20 20"},e),uS=ft("TextureSinglePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[1].map(Ud)})),pS=ft("TextureTwoPhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[2].map(Ud)})),mS=ft("TextureThreePhaseOverheadLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[3].map(Ud)})),fS=ft("TextureSinglePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[1].map(Kd)})),gS=ft("TextureTwoPhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[2].map(Kd)})),bS=ft("TextureThreePhaseUndergroundLine",jsxRuntime.jsx(jsxRuntime.Fragment,{children:za[3].map(Kd)})),hS=ft("TextureSupportStructure",jsxRuntime.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"currentColor",stroke:"none"})),Ha={TextureRecloser:$0,TextureFuse:eS,TextureBreaker:tS,TextureSource:rS,TextureCapacitor:oS,TextureRegulator:nS,TextureSwitch:aS,TextureSwitchClosed:iS,TextureOpenPoint:sS,TextureSectionalizerOpen:lS,TextureSectionalizerClosed:cS,TextureTransformer:dS,TextureSinglePhaseOverheadLine:uS,TextureTwoPhaseOverheadLine:pS,TextureThreePhaseOverheadLine:mS,TextureSinglePhaseUndergroundLine:fS,TextureTwoPhaseUndergroundLine:gS,TextureThreePhaseUndergroundLine:bS,TextureSupportStructure:hS};if(process.env.NODE_ENV==="development")for(let e of Object.keys(Ha))e in Tf__namespace&&console.error(`Custom icon "${e}" collides with a Phosphor icon of the same name. Rename it (use the "Texture" prefix) to keep the icon namespace unambiguous.`);var Ga={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},H=Ze.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=Ha[e]??Tf__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react or the custom icon registry`),null;let d=typeof t=="string"&&t in Ga?Ga[t]:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});H.displayName="Icon";var xS=Ze.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:c,ref:l,...u})=>{let m=typeof n=="string"&&n in Ga?Ga[n]:n,p=r?typeof r=="string"&&r in Ga?Ga[r]:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(H,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:c})})});xS.displayName="IconWithContainer";function Dr({transparent:e=false,className:t,children:r,...o}){return jsxRuntime.jsx(reactAriaComponents.ModalOverlay,{...o,className:reactAriaComponents.composeRenderProps(t,(n,a)=>tailwindMerge.twMerge("fixed inset-0 z-50","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",e?"bg-transparent":["bg-gradient-to-br from-background-modal/20 via-background-modal/15 to-background-modal/20","backdrop-blur-[2px]","supports-[backdrop-filter]:bg-background-modal/15"].join(" "),a.isEntering&&["animate-in fade-in","duration-300 ease-out"].join(" "),a.isExiting&&["animate-out fade-out","duration-200 ease-in"].join(" "),n)),children:r})}function ES({isEntering:e,isExiting:t,className:r="",disableGroup:o=false}){let n=[!o&&"group","bg-background-surface","forced-colors:bg-[Canvas]","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none"].filter(Boolean).join(" "),a=e?["animate-in","fade-in","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",i=t?["animate-out","fade-out","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [n,a,i,r].filter(Boolean).join(" ")}function St({children:e,showArrow:t=false,withBackdrop:r=false,className:o,isDismissable:n=true,disableGroup:a=false,...i}){let d=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",c=t?12:8;c=d?c-6:c;let l=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:c,...i,className:reactAriaComponents.composeRenderProps(o,(u,m)=>ES({...m,className:u,disableGroup:a})),children:[t&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});return r?jsxRuntime.jsx(Dr,{isDismissable:n,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:n,children:l})}):l}function Qs(e=true){let[t,r]=Ze.useState(null);return Ze.useEffect(()=>{if(!e){r(null);return}let o=typeof window<"u"?window.visualViewport:null;if(!o)return;let n=()=>{let a=Math.max(0,window.innerHeight-o.height-(o.offsetTop??0));r({height:o.height,keyboardOffset:a});};return n(),o.addEventListener("resize",n),o.addEventListener("scroll",n),()=>{o.removeEventListener("resize",n),o.removeEventListener("scroll",n);}},[e]),t}var IS={"--color-brand-primary":["--color-action-brand","--color-text-link-default","--action-brand-background"],"--color-brand-dark":["--color-action-brand-hover","--color-text-link-hover","--action-brand-hover"],"--color-action-brand":["--color-text-link-default","--action-brand-background"],"--color-action-brand-hover":["--color-text-link-hover","--action-brand-hover"]};function Rf(e){let t={...e};for(let[r,o]of Object.entries(IS))if(e[r])for(let n of o)e[n]||(t[n]=e[r]);return t}function Ef(e){return e.replace(/[{}<>]/g,"")}function Mf(e){return Object.entries(e).map(([t,r])=>`${Ef(t)}: ${Ef(r)};`).join(" ")}function Df({variables:e,darkVariables:t,children:r}){let n=Ze.useId().replace(/:/g,""),a=e&&Object.keys(e).length>0,i=t&&Object.keys(t).length>0;if(!a&&!i)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r});let s=a?Rf(e):null,d=i?Rf(t):null,c=s?`[data-brand-scope="${n}"] { ${Mf(s)} }`:"",l=d?`.theme-dark [data-brand-scope="${n}"] { ${Mf(d)} }`:"",u=[c,l].filter(Boolean).join(`
2
+ `);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var Wa=new Map,BS=8;function VS(e){if(!e.startsWith("var("))return e;let t=e.slice(4,e.lastIndexOf(")")).trim(),r=t.indexOf(",");return (r===-1?t:t.slice(0,r)).trim()}var Wt=(e,t="#000000")=>typeof window>"u"?t:Af(e,t,0);function Af(e,t,r){if(r>BS)return t;let o=e.startsWith("var(")?VS(e):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!o.startsWith("--color-")&&(o=`--color-${o.slice(2)}`),Wa.has(o))return Wa.get(o);try{let n=document.body||document.documentElement,i=getComputedStyle(n).getPropertyValue(o).trim();if(i){if(i.startsWith("var(")){let c=Af(i,t,r+1);return Wa.set(o,c),c}return Wa.set(o,i),i}let s=document.createElement("div");s.style.color=`var(${o})`,document.body.appendChild(s);let d=getComputedStyle(s).color;return document.body.removeChild(s),d&&d!=="rgb(0, 0, 0)"?(Wa.set(o,d),d):t}catch(n){return console.warn(`Failed to resolve color for ${e}:`,n),t}}var Zs=()=>{Wa.clear();},Wo=()=>{let e=[];for(let t=1;t<=12;t++){let r=Wt(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?_s():e},_s=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],Di=()=>Wt("--color-viz-default","#444ae1"),OS=(e,t)=>{let r={},o=Wo();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r},If=e=>{let t=e.match(/\d+/g);if(!t||t.length<3)return true;let[r,o,n]=t.map(Number);return (.299*r+.587*o+.114*n)/255>.5},zS=e=>If(e)?Wt("--color-text-primary","#333333"):Wt("--color-text-inverse","#ffffff"),Ff=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractUniqueValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r=new Set,o="features"in e?e.features:[e];if(!Array.isArray(o)||o.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let n=0;return o.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];i!=null&&r.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${o[0]?.properties?Object.keys(o[0].properties).join(", "):"none"}`),Array.from(r).sort()},Ai=e=>{let t=Wo(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var Xd=(e,t)=>{if(!e||typeof e!="object")return console.warn("[Colors] Invalid GeoJSON data provided to extractNumericValues"),[];if(!("type"in e)||e.type!=="FeatureCollection"&&e.type!=="Feature")return console.warn("[Colors] Data is not valid GeoJSON (missing type or invalid type)"),[];let r="features"in e?e.features:[e];if(!Array.isArray(r)||r.length===0)return console.warn("[Colors] No features found in GeoJSON data"),[];let o=new Set,n=0;return r.forEach(a=>{if(!(!a||typeof a!="object")&&a.properties&&t in a.properties){n++;let i=a.properties[t];typeof i=="number"&&!isNaN(i)&&o.add(i);}}),n===0&&console.warn(`[Colors] Property "${t}" not found on any features. Available properties: ${r[0]?.properties?Object.keys(r[0].properties).join(", "):"none"}`),Array.from(o).sort((a,i)=>a-i)},qd=e=>e.length===0?(console.warn("[Colors] Cannot calculate bounds from empty array"),{min:0,max:1}):{min:e[0],max:e[e.length-1]},Bf=(e,t)=>{if(typeof t=="number")return t;if(e.length===0)return console.warn("[Colors] Cannot calculate center from empty array, defaulting to 0"),0;if(t==="median"){let r=Math.floor(e.length/2);return e.length%2===0?(e[r-1]+e[r])/2:e[r]}return e.reduce((r,o)=>r+o,0)/e.length},Ii=(e="viridis")=>{let o=`viz-sequential-${{redYellowGreen:"red-yellow-green"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=Wt(i);n.push(s);}return n},Fi=(e="redYellowBlue")=>{let o=`viz-diverging-${{orangeYellowSeafoam:"orange-yellow-seafoam",redYellowBlue:"red-yellow-blue",redBlue:"red-blue"}[e]||e}`,n=[];for(let a=1;a<=10;a++){let i=`${o}-${a}`,s=Wt(i);n.push(s);}return n},Bi=(e,t,r,o="viridis")=>{let n=Ii(o);if(e<=t)return n[0];if(e>=r)return n[n.length-1];if(t===r)return n[Math.floor(n.length/2)];let i=(e-t)/(r-t)*(n.length-1),s=Math.floor(i);return n[s]},Vi=(e,t,r,o,n="redYellowBlue")=>{let a=Fi(n),i=4;if(e<=t)return a[0];if(e>=r)return a[a.length-1];if(e===o||t===r)return a[i];if(e<o){let d=(e-t)/(o-t)*i,c=Math.floor(d);return a[Math.min(c,i)]}else {let s=(e-o)/(r-o),d=i+s*(a.length-1-i),c=Math.floor(d);return a[Math.min(c,a.length-1)]}};var jd=Ze.createContext({mode:"system",colorMode:"light",isDarkTheme:false,toggleTheme:()=>{}}),er=()=>Ze.useContext(jd);function KS(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function zf(){if(typeof window>"u")return "system";let e=localStorage.getItem("colorModePreference");return e==="light"||e==="dark"||e==="system"?e:"system"}function Hf(e){return e==="system"?KS():e}var Wf=({children:e})=>{let[t,r]=Ze.useState(zf),[o,n]=Ze.useState(()=>Hf(zf())),a=o==="dark",i=Ze.useCallback(d=>{d==="dark"?(document.documentElement.classList.add("theme-dark"),document.body.classList.add("theme-dark")):(document.documentElement.classList.remove("theme-dark"),document.body.classList.remove("theme-dark")),Zs();},[]);Ze.useEffect(()=>{Zs();let d=Hf(t);if(n(d),i(d),t==="system"){let c=window.matchMedia("(prefers-color-scheme: dark)"),l=u=>{let m=u.matches?"dark":"light";n(m),i(m);};return c.addEventListener("change",l),()=>{c.removeEventListener("change",l);}}},[t,i]);let s=Ze.useCallback(()=>{r(d=>{let c=d==="system"?"light":d==="light"?"dark":"system";return localStorage.setItem("colorModePreference",c),c});},[]);return jsxRuntime.jsx(jd.Provider,{value:{mode:t,colorMode:o,isDarkTheme:a,toggleTheme:s},children:e})};function br(...e){return e.filter(Boolean).join(" ")}var Qd=class{constructor(){Mi(this,"formatters",new Map);}register(t,r){this.formatters.set(t,r);}format(t,r,...o){let n=this.formatters.get(t);return n?n(r,...o):(console.warn(`No formatter registered for key: ${t}`),null)}has(t){return this.formatters.has(t)}keys(){return Array.from(this.formatters.keys())}unregister(t){this.formatters.delete(t);}clear(){this.formatters.clear();}},se=new Qd;var cn=(e,t="Yes",r="No")=>e==null?null:e?t:r,YS=e=>cn(e,"Enabled","Disabled"),JS=e=>cn(e,"On","Off"),XS=e=>cn(e,"Active","Inactive"),qS=e=>cn(e,"True","False"),jS=e=>cn(e,"\u2713","\u2717"),dn=e=>{if(e==null)return null;if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.toLowerCase().trim();return t==="true"||t==="yes"||t==="1"||t==="on"||t==="enabled"?true:t==="false"||t==="no"||t==="0"||t==="off"||t==="disabled"?false:null}return typeof e=="number"?e!==0:null},Uf=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=dn(e);return r===null?t.nullText??null:cn(r,t.trueText??"Yes",t.falseText??"No")};se.register("boolean",(e,t,r)=>{let o=dn(e);return o!==null?cn(o,typeof t=="string"?t:"Yes",typeof r=="string"?r:"No"):null});se.register("yesNo",e=>{let t=dn(e);return t!==null?cn(t,"Yes","No"):null});se.register("enabledDisabled",e=>{let t=dn(e);return t!==null?YS(t):null});se.register("onOff",e=>{let t=dn(e);return t!==null?JS(t):null});se.register("activeInactive",e=>{let t=dn(e);return t!==null?XS(t):null});se.register("trueFalse",e=>{let t=dn(e);return t!==null?qS(t):null});se.register("checkmark",e=>{let t=dn(e);return t!==null?jS(t):null});var he=e=>e==null,Kf=(e,t=0)=>he(e)?null:`${e.toFixed(t)}%`,Yf=(e,t=0)=>Kf(e,t)??"\u2014",QS=e=>he(e)?null:Math.round(e).toString(),ZS=(e,t=1)=>he(e)?null:e.toFixed(t),_S=(e,t,r=true)=>{if(he(e))return null;let o={useGrouping:r};return t!==void 0&&(o.minimumFractionDigits=t,o.maximumFractionDigits=t),new Intl.NumberFormat("en-US",o).format(e)},$S=(e,t="short")=>he(e)?null:new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:t}).format(e),ew=(e,t=2)=>he(e)?null:e.toExponential(t),Jf=(e,t="USD",r)=>{if(he(e))return null;let o={style:"currency",currency:t,currencyDisplay:r?.currencyDisplay??"symbol",useGrouping:r?.thousandsSeparator??true};return r?.minimumFractionDigits!==void 0&&(o.minimumFractionDigits=r.minimumFractionDigits),r?.maximumFractionDigits!==void 0&&(o.maximumFractionDigits=r.maximumFractionDigits),new Intl.NumberFormat("en-US",o).format(e)},Xf=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o={useGrouping:t.thousandsSeparator??false};return t.decimals!==void 0&&(o.minimumFractionDigits=t.decimals,o.maximumFractionDigits=t.decimals),t.notation&&(o.notation=t.notation,t.notation==="compact"&&t.compactDisplay&&(o.compactDisplay=t.compactDisplay)),t.sign&&(o.signDisplay=t.sign),new Intl.NumberFormat("en-US",o).format(r)},qf=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);return isNaN(r)?t.nullText??null:Jf(r,t.currency,t)};se.register("percentage",(e,t)=>typeof e=="number"?Kf(e,typeof t=="number"?t:0):null);se.register("integer",e=>typeof e=="number"?QS(e):null);se.register("float",(e,t)=>typeof e=="number"?ZS(e,typeof t=="number"?t:1):null);se.register("number",(e,t,r)=>{let o=typeof e=="string"?parseFloat(e):Number(e);return isNaN(o)?null:_S(o,typeof t=="number"?t:void 0,typeof r=="boolean"?r:true)});se.register("compact",(e,t)=>typeof e=="number"?$S(e,t==="long"?"long":"short"):null);se.register("scientific",(e,t)=>typeof e=="number"?ew(e,typeof t=="number"?t:2):null);se.register("currency",(e,t,r)=>typeof e=="number"?Jf(e,typeof t=="string"?t:"USD",typeof r=="object"&&r!==null?r:{}):null);function J4(e,t=1){return he(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MWh`:`${e.toFixed(t)} kWh`}function X4(e,t=1){return he(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MW`:`${e.toFixed(t)} kW`}function yo({value:e,formatter:t,emptyClassName:r="text-text-secondary",emptyText:o="\u2014"}){if(e==null)return jsxRuntime.jsx("span",{className:r,children:o});if(typeof t=="function")return t(e);if(t&&typeof t=="object"){let n=Ar(e,t);return e instanceof Date&&n?jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n}):n||jsxRuntime.jsx("span",{className:r,children:o})}if(!t){if(typeof e=="string")return e;if(e instanceof Date){let n=Ar(e,{type:"date"});return jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n})}if(typeof e=="number")return Ar(e,{type:"number"});if(typeof e=="boolean")return Ar(e,{type:"boolean"})}return String(e)}function Z4(e,t,r){return Ze__namespace.default.useCallback(o=>yo({value:o,formatter:e,emptyClassName:t,emptyText:r}),[e,t,r])}var Zd=(e,t=0)=>{if(he(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mA`:`${r.toFixed(t)} mA`},el=(e,t=1)=>he(e)?null:`${e.toFixed(t)} A`,_d=(e,t=2)=>he(e)?null:`${(e/1e3).toFixed(t)} kA`,rw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e3?_d(e,t??2):r<1?Zd(e,t??0):el(e,t??1)},$d=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kA":return _d(r,o??2);case "mA":return Zd(r,o??0);case "A":return el(r,o??1)}return t.autoScale!==false?rw(r,o):el(r,o??1)};se.register("current",$d);var rF=Zd,oF=el,nF=_d;var Un=e=>{if(e==null)return null;if(e instanceof Date)return luxon.DateTime.fromJSDate(e);if(typeof e=="string"){let t=luxon.DateTime.fromISO(e);return t.isValid?t:null}if(typeof e=="number"){let t=luxon.DateTime.fromMillis(e);return t.isValid?t:null}return null},ow=(e,t=false,r)=>{if(!e)return null;let o=Un(e);if(!o)return "Invalid Date";let n=r?o.setZone(r):o;return t?n.toLocaleString(luxon.DateTime.DATETIME_SHORT):n.toLocaleString(luxon.DateTime.DATE_SHORT)},tl=e=>{if(!e)return null;let t=Un(e);return t?t.toRelative():"Invalid Date"},nw=(e,t)=>{if(!e)return null;let r=Un(e);return r?(t?r.setZone(t):r).toLocaleString(luxon.DateTime.DATETIME_MED_WITH_WEEKDAY):"Invalid Date"},aw=e=>{if(!e)return null;let t=Un(e);return t?t.toISO():null},iw=(e,t,r)=>{if(!e)return null;let o=Un(e);return o?(r?o.setZone(r):o).toFormat(t):"Invalid Date"},lF=e=>{let t=Un(e);return t?{year:t.year,month:t.month,day:t.day,weekday:t.weekday,hour:t.hour,minute:t.minute,second:t.second,millisecond:t.millisecond,weekdayShort:t.weekdayShort,weekdayLong:t.weekdayLong,monthShort:t.monthShort,monthLong:t.monthLong}:null},jf=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=Un(e);if(!r)return t.nullText??"Invalid Date";let o=t.timezone?r.setZone(t.timezone):r;if(t.relative)return o.toRelative();if(t.format)return o.toFormat(t.format);if(t.dateStyle||t.timeStyle){let n={};if(t.dateStyle)switch(t.dateStyle){case "short":n.date=luxon.DateTime.DATE_SHORT;break;case "medium":n.date=luxon.DateTime.DATE_MED;break;case "long":n.date=luxon.DateTime.DATE_FULL;break;case "full":n.date=luxon.DateTime.DATE_HUGE;break}if(t.timeStyle)switch(t.timeStyle){case "short":n.time=luxon.DateTime.TIME_SIMPLE;break;case "medium":n.time=luxon.DateTime.TIME_WITH_SECONDS;break;case "long":case "full":n.time=luxon.DateTime.TIME_WITH_SHORT_OFFSET;break}if(n.date&&n.time)return o.toLocaleString({...n.date,...n.time});if(n.date)return o.toLocaleString(n.date);if(n.time)return o.toLocaleString(n.time)}return o.toLocaleString(luxon.DateTime.DATETIME_SHORT)};se.register("date",(e,t,r)=>ow(e,typeof t=="boolean"?t:false,typeof r=="string"?r:void 0));se.register("relativeTime",e=>tl(e));se.register("fullDateTime",(e,t)=>nw(e,typeof t=="string"?t:void 0));se.register("isoString",e=>aw(e));se.register("customDateFormat",(e,t,r)=>typeof t=="string"?iw(e,t,typeof r=="string"?r:void 0):null);var eu=(e,t=1)=>he(e)?null:`${e.toFixed(t)} m`,sw=(e,t=1)=>he(e)?null:`${(e*100).toFixed(t)} cm`,lw=(e,t=0)=>he(e)?null:`${(e*1e3).toFixed(t)} mm`,tu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} km`,ru=(e,t=0)=>he(e)?null:`${e.toFixed(t)} ft`,cw=(e,t=1)=>he(e)?null:`${e.toFixed(t)} in`,ou=(e,t=1)=>he(e)?null:`${e.toFixed(t)} mi`,nu=(e,t=0)=>he(e)?null:`${e.toFixed(t)} yd`,pF=(e,t=1)=>he(e)?null:`${e.toFixed(t)} nm`,mF=e=>e*3.28084,fF=e=>e/3.28084,gF=e=>e*1.60934,bF=e=>e/1.60934,hF=e=>e/5280,Qf=e=>e*5280,xF=e=>e/1609.34,yF=e=>e*1609.34,vF=e=>e*.9144,CF=e=>e/.9144,SF=e=>e*2.54,wF=e=>e/2.54,Zf=(e,t=false,r=1)=>{if(he(e))return null;let o=Math.abs(e);return t?o>=1e3?tu(e,r):o<.01?lw(e,0):o<1?sw(e,r):eu(e,r):o<.01?ru(Qf(e),0):o<.1?nu(Qf(e)/3,0):ou(e,r)},_f=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??1;if(t.autoScale){let n=t.unit==="m"||t.unit==="km";return Zf(r,n,o)}switch(t.unit){case "km":return tu(r,o);case "ft":return ru(r,o);case "mi":return ou(r,o);case "yd":return nu(r,o);default:return eu(r,o)}};se.register("miles",(e,t)=>typeof e=="number"?ou(e,typeof t=="number"?t:1):null);se.register("kilometers",(e,t)=>typeof e=="number"?tu(e,typeof t=="number"?t:1):null);se.register("meters",(e,t)=>typeof e=="number"?eu(e,typeof t=="number"?t:1):null);se.register("feet",(e,t)=>typeof e=="number"?ru(e,typeof t=="number"?t:0):null);se.register("yards",(e,t)=>typeof e=="number"?nu(e,typeof t=="number"?t:0):null);se.register("inches",(e,t)=>typeof e=="number"?cw(e,typeof t=="number"?t:1):null);se.register("autoScaleDistance",(e,t,r)=>typeof e=="number"?Zf(e,typeof t=="boolean"?t:false,typeof r=="number"?r:1):null);var au=(e,t=1)=>he(e)?null:`${e.toFixed(t)} Wh`,iu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kWh`,$f=(e,t=1)=>he(e)?null:`${(e/1e6).toFixed(t)} MWh`,eg=(e,t=1)=>he(e)?null:`${(e/1e9).toFixed(t)} GWh`,su=e=>{let t=Math.abs(e);return t>=1e9?"GWh":t>=1e6?"MWh":t>=1e3?"kWh":"Wh"},tg=(e,t=1)=>{if(he(e))return null;switch(su(e)){case "GWh":return eg(e,t);case "MWh":return $f(e,t);case "kWh":return iu(e,t);default:return au(e,t)}},lu={Wh:1,kWh:1e3,MWh:1e6,GWh:1e9},cu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.sourceUnit?r*lu[t.sourceUnit]:r,n=t.decimals??1;if(t.unit)switch(t.unit){case "GWh":return eg(o,n);case "MWh":return $f(o,n);case "kWh":return iu(o,n);case "Wh":return au(o,n)}return t.autoScale!==false?tg(o,n):au(o,n)};se.register("kWh",e=>typeof e=="number"?iu(e):null);se.register("autoScaleEnergy",(e,t)=>typeof e=="number"?tg(e,typeof t=="number"?t:1):null);se.register("energy",cu);var rl=e=>{if(!e)return null;let t=e.replace(/\D/g,"");return t.length===10?t.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3"):t.length===11&&t.startsWith("1")?t.replace(/1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):e},du=e=>{if(!e)return null;let t=e.replace(/[^\d+]/g,"");return t.startsWith("+")?t.length===12&&t.startsWith("+1")?t.replace(/\+1(\d{3})(\d{3})(\d{4})/,"+1 ($1) $2-$3"):t.length===13&&t.startsWith("+44")?t.replace(/\+44(\d{2})(\d{4})(\d{4})/,"+44 $1 $2 $3"):t.replace(/(\+\d{1,3})(\d{3,4})(\d{3,4})(\d{3,4})?/,"$1 $2 $3 $4").trim():rl(e)},Ua=e=>e?e.startsWith("+")||e.length>11?du(e):rl(e):null,rg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=String(e);if(t.international)return du(r);switch(t.country){case "US":case "CA":return rl(r);default:return Ua(r)}};se.register("phoneNumber",e=>typeof e=="string"?Ua(e):null);se.register("usPhone",e=>typeof e=="string"?rl(e):null);se.register("internationalPhone",e=>typeof e=="string"?du(e):null);var ol=(e,t=0)=>he(e)?null:t===0?`${Math.round(e)} W`:`${e.toFixed(t)} W`,uu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kW`,pu=(e,t=1)=>he(e)?null:`${(e/1e6).toFixed(t)} MW`,mu=(e,t=2)=>he(e)?null:`${(e/1e9).toFixed(t)} GW`,dw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e9?mu(e,t??2):r>=1e6?pu(e,t??1):r>=1e3?uu(e,t??1):ol(e,t??0)},fu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "GW":return mu(r,o??2);case "MW":return pu(r,o??1);case "kW":return uu(r,o??1);case "W":return ol(r,o??0)}return t.autoScale!==false?dw(r,o):ol(r,o??0)};se.register("power",fu);var DF=ol,AF=uu,IF=pu,FF=mu;var gu=(e,t=1)=>he(e)?null:`${(e*1e3).toFixed(t)} m\u03A9`,nl=(e,t=1)=>he(e)?null:`${e.toFixed(t)} \u03A9`,og=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} k\u03A9`,ng=(e,t=2)=>he(e)?null:`${(e/1e6).toFixed(t)} M\u03A9`,uw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e6?ng(e,t??2):r>=1e3?og(e,t??1):r<1?gu(e,t??1):nl(e,t??1)},bu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "M\u03A9":return ng(r,o??2);case "k\u03A9":return og(r,o??1);case "m\u03A9":return gu(r,o??1);case "\u03A9":return nl(r,o??1)}return t.autoScale!==false?uw(r,o):nl(r,o??1)};se.register("resistance",bu);se.register("ohms",e=>typeof e=="number"?nl(e):null);se.register("milliohms",e=>typeof e=="number"?gu(e):null);var ag=e=>{switch(e){case "FAHRENHEIT":return "F";case "CELSIUS":return "C";case "KELVIN":return "K";default:return "F"}},ig=(e,t=0)=>he(e)?null:`${e.toFixed(t)}\xB0F`,sg=(e,t=true,r=0)=>he(e)?null:`${(t?(e-32)*(5/9):e).toFixed(r)}\xB0C`,lg=(e,t=true,r=0)=>he(e)?null:`${(t?(e-32)*(5/9)+273.15:e+273.15).toFixed(r)}K`,pw=e=>e*9/5+32,mw=e=>(e-32)*(5/9),WF=e=>e+273.15,fw=e=>e-273.15,UF=e=>mw(e)+273.15,KF=e=>pw(fw(e)),cg=(e,t="F",r=0)=>{if(he(e))return null;switch(typeof t=="string"&&t.length>1?ag(t):t){case "C":return sg(e,true,r);case "K":return lg(e,true,r);default:return ig(e,r)}},dg=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals??0,n=t.unit??"F";if(t.showUnit===false)switch(typeof n=="string"&&n.length>1?ag(n):n){case "C":return ((r-32)*.5555555555555556).toFixed(o);case "K":return ((r-32)*.5555555555555556+273.15).toFixed(o);default:return r.toFixed(o)}return cg(r,n,o)};se.register("temperature",(e,t,r)=>typeof e=="number"?cg(e,typeof t=="string"?t:"F",typeof r=="number"?r:0):null);se.register("fahrenheit",(e,t)=>typeof e=="number"?ig(e,typeof t=="number"?t:0):null);se.register("celsius",(e,t,r)=>typeof e=="number"?sg(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);se.register("kelvin",(e,t,r)=>typeof e=="number"?lg(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);var gw=(e,t)=>!!(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0),ug=e=>e?.toUpperCase()??"",pg=e=>e?.toLowerCase()??"",mg=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",fg=e=>{if(!e)return "";let t=new Set(["a","an","the","and","but","or","for","nor","on","at","of","to","with","in","as","by"]);return e.toLowerCase().split(/\s+/).map((r,o)=>t.has(r)&&o!==0?r:r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},gg=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" "):"",bg=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",hg=e=>e?e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()).trim():"",xg=e=>e?e.toLowerCase().split("_").map(t=>bg(t)).join(" "):"",bw=e=>e?e.includes("_")?xg(e):e.toUpperCase()===e?bg(e.toLowerCase()):hg(e):"",Ka=(e,t=16)=>{if(!e)return "";if(t<5||e.length<=t)return e;let r=t-3,o=Math.ceil(r/2),n=Math.floor(r/2);return `${e.slice(0,o)}...${e.slice(-n)}`},al=(e,t=8)=>e?e.length<=t?e:`...${e.slice(-t)}`:"",il=(e,t=16,r="...")=>e?e.length<=t?e:e.slice(0,t)+r:"",hw=e=>{if(!e)return "";let t=e.toString(),r=t.slice(-4),o=t.length-4;return o>0?"*".repeat(o)+r:t},yg=(e,t)=>{if(gw(e,t))return null;if(e==null)return t.nullText??null;let r=String(e);if(t.transform&&(Array.isArray(t.transform)?t.transform:[t.transform]).forEach(n=>{switch(n){case "uppercase":r=ug(r);break;case "lowercase":r=pg(r);break;case "capitalize":r=gg(r);break;case "titleCase":r=fg(r);break;case "sentenceCase":r=mg(r);break}}),t.truncate){let{length:o,position:n,ellipsis:a="..."}=t.truncate;switch(n){case "start":r=al(r,o);break;case "middle":r=Ka(r,o);break;case "end":r=il(r,o,a);break}}return r};se.register("uppercase",e=>ug(String(e)));se.register("lowercase",e=>pg(String(e)));se.register("sentenceCase",e=>mg(String(e)));se.register("titleCase",e=>fg(String(e)));se.register("capitalize",e=>gg(String(e)));se.register("camelCaseToWords",e=>hg(String(e)));se.register("snakeCaseToWords",e=>xg(String(e)));se.register("enumToSentenceCase",e=>bw(String(e)));se.register("truncateMiddle",(e,t)=>Ka(String(e),typeof t=="number"?t:16));se.register("truncateStart",(e,t)=>al(String(e),typeof t=="number"?t:8));se.register("truncateEnd",(e,t,r)=>il(String(e),typeof t=="number"?t:16,typeof r=="string"?r:"..."));se.register("secret",e=>hw(String(e)));var hu=(e,t=0)=>{if(he(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mV`:`${r.toFixed(t)} mV`},sl=(e,t=0)=>he(e)?null:t===0?`${Math.round(e)} V`:`${e.toFixed(t)} V`,xu=(e,t=1)=>he(e)?null:`${(e/1e3).toFixed(t)} kV`,xw=(e,t)=>{if(he(e))return null;let r=Math.abs(e);return r>=1e3?xu(e,t??1):r<1?hu(e,t??0):sl(e,t??0)},yu=(e,t)=>{if(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0)return null;if(e==null)return t.nullText??null;let r=typeof e=="string"?parseFloat(e):Number(e);if(isNaN(r))return t.nullText??null;let o=t.decimals;if(t.unit)switch(t.unit){case "kV":return xu(r,o??1);case "mV":return hu(r,o??0);case "V":return sl(r,o??0)}return t.autoScale!==false?xw(r,o):sl(r,o??0)};se.register("voltage",yu);var QF=hu,ZF=sl,_F=xu;var yw=(e,t)=>{if(e==null)return t.nullText??null;if(t.hideWhenNull&&e===null)return null;let r=typeof e=="number"?e:Number(e);return Number.isNaN(r)?t.nullText??null:Yf(r,t.decimals??0)},Ar=(e,t)=>{switch(t.type){case "text":return yg(e,t);case "number":return Xf(e,t);case "percentage":return yw(e,t);case "currency":return qf(e,t);case "date":return jf(e,t);case "boolean":return Uf(e,t);case "energy":return cu(e,t);case "power":return fu(e,t);case "voltage":return yu(e,t);case "current":return $d(e,t);case "resistance":return bu(e,t);case "temperature":return dg(e,t);case "distance":return _f(e,t);case "phone":return rg(e,t);case "custom":{let r=t;return r.hideWhenNull&&e==null?null:e==null?r.nullText??null:r.formatter(e,r.options)}default:return e!=null?String(e):null}};var Ya={power:"W",energy:"Wh",voltage:"V",current:"A",resistance:"\u03A9",distance:"m"},vw=new Set(["number","power","energy","voltage","current","resistance","temperature","distance","percentage"]);function vu(e){if(!e)return null;switch(e.type){case "percentage":return "%";case "power":return e.unit??Ya.power;case "energy":return e.unit??e.sourceUnit??Ya.energy;case "voltage":return e.unit??Ya.voltage;case "current":return e.unit??Ya.current;case "resistance":return e.unit??Ya.resistance;case "temperature":{let t=typeof e.unit=="string"?e.unit:"F";return t==="C"||t==="CELSIUS"?"\xB0C":t==="F"||t==="FAHRENHEIT"?"\xB0F":t==="K"||t==="KELVIN"?"K":t}case "distance":return e.unit??Ya.distance;default:return null}}function vg(e,t){if(!vw.has(t.type))return null;let r;if(typeof e=="number")r=e;else if(typeof e=="string"){let n=parseFloat(e);if(Number.isNaN(n))return null;r=n;}else return null;let o=vu(t);if(o!==null){let n;if(t.type==="percentage")n=t;else if(t.type==="energy")n=t.unit?{...t,autoScale:false}:{...t,unit:t.sourceUnit??"Wh",autoScale:false};else if(t.type==="temperature")n={...t};else {let s=t.unit;n={...t,unit:s??o,autoScale:false};}let a=Ar(r,n);if(!a)return "";if(typeof a=="string"&&a.startsWith("device."))return null;let i=String(a);return i.endsWith(` ${o}`)?i.slice(0,-(o.length+1)):i.endsWith(o)?i.slice(0,-o.length):i}if(t.type==="number"){let n=Ar(r,t);return n?String(n):""}return String(r)}var g3=(e,t)=>({type:e,...t});function Yn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Kn(e,t){return Yn(e)?t.format(e):""}function Cg(e){if(!Yn(e.start)||!Yn(e.end))return ()=>"";if((e.end.getTime()-e.start.getTime())/(1e3*60*60)<=720){let i=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});return s=>Kn(s,i)}let r=e.start.getFullYear(),o=e.end.getFullYear(),n=r!==o,a=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",...n&&{year:"numeric"}});return i=>Kn(i,a)}var Cw=864e5;function Sg(e,t){let r=t?.compact??false,o=e<5*Cw,n=a=>{let i=a.getHours(),s=i>=12?"PM":"AM";return {displayHour:i%12||12,period:s}};return a=>{if(!Yn(a))return "";let i=a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0;if(i&&a.getDate()===1)return a.getMonth()===0?String(a.getFullYear()):a.toLocaleDateString("en",{month:"short"});if(i){let l=a.getDate();if(o){let u=a.toLocaleDateString("en",{weekday:"short"});return r?`${u.charAt(0)}${l}`:`${u} ${l}`}return r?`${a.getMonth()+1}/${l}`:`${a.toLocaleDateString("en",{month:"short"})} ${l}`}let{displayHour:s,period:d}=n(a);if(a.getMinutes()===0&&a.getSeconds()===0)return r?`${s}${d.charAt(0).toLowerCase()}`:`${s} ${d}`;let c=String(a.getMinutes()).padStart(2,"0");return r?`${s}:${c}${d.charAt(0).toLowerCase()}`:`${s}:${c} ${d}`}}function Cu(e,t){if(!Yn(e.start)||!Yn(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=c=>l=>Yn(l)?c(l):"";if(r<=24){if(o)return n(l=>{let u=l.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let c=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return l=>Kn(l,c)}if(r<=48){if(o)return n(l=>{let u=l.getMonth()+1,m=l.getDate(),p=l.getHours(),g=p>=12?"p":"a",f=p%12||12;return `${u}/${m} ${f}${g}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"numeric"});return l=>Kn(l,c)}if(r<=168){if(o)return n(l=>{let u=l.getDate();return `${l.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let c=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return l=>Kn(l,c)}if(r<=720){if(o)return n(l=>{let u=l.getMonth()+1,m=l.getDate();return `${u}/${m}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return l=>Kn(l,c)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(c=>{let l=c.getMonth()+1,u=c.getDate(),m=s?`/${c.getFullYear().toString().slice(-2)}`:"";return `${l}/${u}${m}`});let d=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return c=>Kn(c,d)}var vo={displayXl:"text-display-xl",displayLg:"text-display-lg",displayMd:"text-display-md",displaySm:"text-display-sm",headingXl:"text-heading-xl",headingLg:"text-heading-lg",headingMd:"text-heading-md",headingSm:"text-heading-sm",bodyLg:"text-body-lg",bodyMd:"text-body-md",bodySm:"text-body-sm",labelLg:"text-label-lg",labelMd:"text-label-md",labelSm:"text-label-sm",code:"text-code",agent:"text-agent"};function Et(e,...t){return br(vo[e],...t)}function ot(e=false){return `${e?"outline outline-1 outline-border-input data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2":"outline-none data-[focus-visible]:outline data-[focus-visible]:outline-2 data-[focus-visible]:outline-action-default data-[focus-visible]:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2"}`}function Ie(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var Je={sm:{text:"text-[length:var(--control-text-sm)]",height:"h-[var(--control-sm-height)]",padding:"px-[var(--control-padding-sm)]",paddingY:"py-[var(--control-gap-sm)]",gap:"gap-[var(--control-gap-sm)]"},md:{text:"text-[length:var(--control-text-md)]",height:"h-[var(--control-md-height)]",padding:"px-[var(--control-padding-md)]",paddingY:"py-[var(--control-gap-md)]",gap:"gap-[var(--control-gap-md)]"},lg:{text:"text-[length:var(--control-text-lg)]",height:"h-[var(--control-lg-height)]",padding:"px-[var(--control-padding-lg)]",paddingY:"py-[var(--control-gap-lg)]",gap:"gap-[var(--control-gap-lg)]"},xl:{text:"text-[length:var(--control-text-xl)]",height:"h-[var(--control-xl-height)]",padding:"px-[var(--control-padding-xl)]",paddingY:"py-[var(--control-gap-xl)]",gap:"gap-[var(--control-gap-xl)]"}};var kw="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",Pw="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",Rw={primary:Pw,secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border-2 border-border-muted hover:bg-action-secondary-hover forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]",ghost:"border-none text-text-primary hover:bg-text-primary/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]",destructive:"bg-transparent text-feedback-error-text border-2 border-border-muted hover:bg-feedback-error-background/50 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]",link:"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4",icon:"border-none text-text-primary hover:bg-background-hover hover:text-text-primary forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-1 flex-shrink-0 rounded-[var(--control-border-radius)]",unstyled:"bg-transparent"},Ng={full:"w-full",default:"w-fit"},Ew="opacity-50 cursor-not-allowed pointer-events-none",Mw="opacity-100 cursor-pointer",Lw={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},Dw={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function Aw(e){return !e||e==="default"||e==="brand"?"primary":e}function Iw(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=Aw(t),s=i==="unstyled"?"":`${kw} ${Rw[i]}`;i!=="unstyled"&&(s+=` ${Je[r].text} ${Je[r].height} ${Je[r].padding} ${Je[r].gap}`),o||a?s+=` ${Ew}`:s+=` ${Mw}`,n?s+=` ${Ng.full}`:s+=` ${Ng.default}`;let d=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,ot(),d].filter(Boolean).join(" ")}function re(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:d,href:c,className:l,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:x,...h}=e,y=t?jsxRuntime.jsx(H,{name:t,size:i,weight:d}):null,v=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,typeof r=="function"?null:r,s==="right"&&y]}),C=jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:a||jsxRuntime.jsx(H,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),w=(u??0)>0,S=tailwindMerge.twMerge(Iw(e),l),N=c?{href:c,target:f,rel:x,...h}:{};if(c){let{onPress:T,onPressStart:E,onPressEnd:A,onPressChange:P,onPressUp:I,onAuxClick:R,onContextMenu:O,onDoubleClick:W,...z}=h;Object.assign(N,z);}let k=c?jsxRuntime.jsx(reactAriaComponents.Link,{...N,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,r(T),s==="right"&&y]})}):v}):jsxRuntime.jsx(reactAriaComponents.Button,{...h,...o&&{"aria-busy":true},style:w?void 0:g,className:S,children:o?C:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&y,r(T),s==="right"&&y]})}):v});return w?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",l),style:g,children:[k,jsxRuntime.jsx("span",{className:`absolute ${Lw[p]} flex h-5 w-5 items-center justify-center rounded-full ${Dw[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):k}function wu({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(re,{type:o?"submit":"button",form:o?e.formId:void 0,size:e.size||r,variant:e.variant||t,onPress:o?void 0:e.onPress,isLoading:e.isLoading,isDisabled:e.isDisabled,children:e.label})}function pn({primaryAction:e,secondaryAction:t,tertiaryAction:r,footerContent:o}){let n=e||t||r;return !n&&!o?null:jsxRuntime.jsxs("div",{className:`flex w-full flex-col items-center justify-center border-t p-4 ${o?"h-28":""}`,children:[o&&jsxRuntime.jsx("div",{className:"flex h-10 justify-center",children:o}),n&&jsxRuntime.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{children:r&&jsxRuntime.jsx(wu,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(wu,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(wu,{action:e,defaultVariant:"primary"})]})]})]})}var Fw={heading:{sm:vo.headingSm,md:vo.headingMd,lg:vo.headingLg,xl:vo.headingXl},display:{sm:vo.displaySm,md:vo.displayMd,lg:vo.displayLg,xl:vo.displayXl}},Bw={page:"h-16 leading-[62px]"};function xr({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=Fw[t][i],d=o?Bw[o]:"";return jsxRuntime.jsx(e,{className:br(s,"text-text-primary",d,n),children:a})}var lr=({title:e,onClose:t,hideCloseIcon:r=false,titleAlign:o="left",hasBackArrow:n=false,onBack:a,headerContent:i})=>jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex h-16 w-full flex-shrink-0 items-center justify-between border-b px-6",e&&"border-b",o==="center"?"justify-center":""),children:[n&&jsxRuntime.jsx(re,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(H,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(xr,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(re,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(H,{name:"X","data-testid":"close-button"})})]})]});var ku=48,Hi=Ze.createContext(false),Lg=Ze.createContext(null);function Dg(){return Ze.useContext(Lg)}function fn({children:e}){return jsxRuntime.jsx(Hi.Provider,{value:true,children:e})}function Ag({children:e}){return jsxRuntime.jsx(Hi.Provider,{value:false,children:e})}function Xa(e,t){let r=Ze.useContext(Hi),{ref:o,height:n}=Hw();return {headerRef:o,headerHeight:!r||e||t?n||ku:0}}function Ig(){return !Ze.useContext(Hi)}function Hw(){let[e,t]=Ze.useState(0),r=Ze.useRef(null),o=Ze.useRef(null),n=Ze.useCallback(a=>{if(o.current?.disconnect(),o.current=null,r.current=a,!a){t(0);return}let i=()=>t(r.current?.offsetHeight??0);i(),o.current=new ResizeObserver(i),o.current.observe(a);},[]);return Ze.useEffect(()=>()=>o.current?.disconnect(),[]),{ref:n,height:e}}var Gw=`
3
+ /*
4
+ * The container is a WRAPPER, not the grid itself. A container query cannot
5
+ * style its own container, so when .chart-header carried container-type the
6
+ * query's own grid-template-columns: auto 1fr auto never applied \u2014 the base
7
+ * 1fr auto stayed, and the third track was an IMPLICIT one created by the
8
+ * actions' grid-column: 3. The wide layout worked by accident and the
9
+ * controls never got the flexible centre column they were written for.
10
+ */
11
+ .chart-header-container {
12
+ container-type: inline-size;
13
+ container-name: chart-header;
14
+ }
15
+ .chart-header {
16
+ display: grid;
17
+ grid-template-columns: 1fr auto;
18
+ align-items: center;
19
+ column-gap: 0.75rem;
20
+ min-height: 32px;
21
+ }
22
+ .chart-header__title {
23
+ grid-column: 1;
24
+ grid-row: 1;
25
+ min-width: 0;
26
+ }
27
+ .chart-header__actions {
28
+ grid-column: 2;
29
+ grid-row: 1;
30
+ /*
31
+ * Pulled out by the icon button's own internal padding so the GLYPH lands on
32
+ * the card's content edge, not the button's invisible box.
33
+ *
34
+ * An icon Button is a 44px ghost target with 12px of padding, so a button
35
+ * flush to the edge draws its arrows 12px inside it. Everything it lines up
36
+ * against is bordered \u2014 Export in the bottom bar, the controls beside it \u2014
37
+ * where the box edge IS the visual edge. Matching boxes therefore looked
38
+ * wrong, which is the thing being corrected: this aligns what the eye
39
+ * actually sees.
40
+ *
41
+ * Expressed as the same token the button pads itself with, so the two cannot
42
+ * drift: a change to the control scale moves the padding and this pull
43
+ * together. The fallback matches the token's current value.
44
+ */
45
+ margin-right: calc(-1 * var(--control-padding-sm, 0.75rem));
46
+ }
47
+ .chart-header__controls {
48
+ grid-column: 1 / -1;
49
+ grid-row: 2;
50
+ display: flex;
51
+ flex-wrap: wrap;
52
+ align-items: center;
53
+ gap: 0.5rem;
54
+ margin-top: 0.5rem;
55
+ }
56
+ .chart-header__controls > * {
57
+ flex: 1 1 auto;
58
+ min-width: 0;
59
+ }
60
+ @container chart-header (width >= 720px) {
61
+ .chart-header {
62
+ grid-template-columns: auto 1fr auto;
63
+ }
64
+ .chart-header__controls {
65
+ grid-column: 2;
66
+ grid-row: 1;
67
+ margin-top: 0;
68
+ /*
69
+ * space-between, not flex-end. A cluster that groups its controls (the
70
+ * state-history bar puts "what is charted" in one group and "over what
71
+ * window" in another) gets its first group left-aligned against the title
72
+ * and the rest pushed right, instead of one undifferentiated run of five
73
+ * controls where the metric reads like the range. A cluster with a single
74
+ * child is unaffected \u2014 there is nothing to space apart, and margin-left:auto on that child keeps it right-aligned.
75
+ */
76
+ justify-content: space-between;
77
+ flex-wrap: nowrap;
78
+ }
79
+ .chart-header__controls > :only-child {
80
+ margin-left: auto;
81
+ }
82
+ .chart-header__controls > * {
83
+ flex: 0 0 auto;
84
+ }
85
+ .chart-header__actions {
86
+ grid-column: 3;
87
+ }
88
+ }
89
+ `;function qa({title:e,controls:t,actions:r,containerRef:o,marginLeft:n=0,marginRight:a=0}){let s=!Ze.useContext(Hi),[d,c]=Ze.useState(null),l=Ze.useRef(null),u=Ze.useCallback(m=>{if(o?.(m),l.current?.disconnect(),l.current=null,!m)return;let p=()=>c(m.offsetWidth);p(),l.current=new ResizeObserver(p),l.current.observe(m);},[o]);return Ze.useEffect(()=>()=>l.current?.disconnect(),[]),!s&&!t&&!r?null:jsxRuntime.jsxs(Lg.Provider,{value:d,children:[jsxRuntime.jsx("style",{children:Gw}),jsxRuntime.jsx("div",{className:"chart-header-container shrink-0",style:{marginLeft:n,marginRight:a},children:jsxRuntime.jsxs("div",{ref:u,"data-chart-header":"",className:"chart-header pb-4",children:[s?jsxRuntime.jsx("h3",{className:"chart-header__title truncate text-sm font-medium text-text-primary",children:e}):jsxRuntime.jsx("span",{className:"chart-header__title"}),t?jsxRuntime.jsx("div",{"data-chart-header-controls":"",className:"chart-header__controls",children:t}):null,r?jsxRuntime.jsx("div",{"data-chart-header-actions":"",className:"chart-header__actions flex shrink-0 items-center gap-1",children:r}):null]})})]})}var j=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:d=0,adjustAnimationSpeedBasedOnWidth:c=false,ariaLabel:l,className:u,"data-testid":m})=>{let[p,g]=Ze.useState(d===0);if(Ze.useEffect(()=>{if(d>0){let w=setTimeout(()=>g(true),d);return ()=>clearTimeout(w)}},[d]),!p)return null;let f=n?"bg-gradient-to-r from-[var(--color-skeleton-base)] via-[var(--color-skeleton-highlight)] to-[var(--color-skeleton-base)]":"bg-[var(--color-skeleton-base)]",x=c&&e?(()=>{let w=typeof e=="number"?e:parseFloat(String(e));return isNaN(w)?"":`animation-duration-[${Math.max(.8,w/100)}s]`})():"",h=o==="pulse"?`animate-pulse ${x}`:o==="wave"?`relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--color-skeleton-wave)] before:to-transparent before:animate-wave ${x}`:"",y="rounded-sm";r==="circle"&&(y="rounded-full"),r==="text"&&(y="h-4 w-full rounded-sm");let v=a?"flex-1 min-w-0":"",C=s?Object.entries(s).map(([w,S])=>`${w}:w-[${S}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((w,S)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,h,y,v,C,u),style:{width:w,height:t}},S))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,h,y,v,C,u),style:{width:e,height:t},role:"presentation","aria-hidden":!l,"aria-label":l??void 0,"data-testid":m})},Bg=({count:e=1,children:t,className:r,"data-testid":o})=>jsxRuntime.jsx("div",{className:r,"data-testid":o,children:Array.from({length:e}).map((n,a)=>jsxRuntime.jsx("div",{children:t},a))});var Kw={outlined:"bg-background-surface border border-border-default",elevated:"bg-background-surface border-0 shadow-md",filled:"bg-background-muted border-0",ghost:"bg-transparent border-0 shadow-none"},Yw="rounded-lg",Ru={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},Jw={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Vg(e){return Ze__namespace.default.Children.toArray(e).some(t=>Ze__namespace.default.isValidElement(t)?t.type===Ze__namespace.default.Fragment?Vg(t.props.children):t.type===cl&&!!t.props.title:false)}function _e({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){let a=Vg(r)?jsxRuntime.jsx(fn,{children:r}):r;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",Kw[e],Yw,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(j,{width:"100%",height:"100%",className:"rounded-none"}):a})}function cl({title:e,subtitle:t,actions:r,leading:o,className:n,isLoading:a=false}){return a?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx(j,{width:120,height:20}),jsxRuntime.jsx(j,{width:24,height:24})]}),t&&jsxRuntime.jsx(j,{width:200,height:16})]}):!e&&!t&&!r&&!o?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",n),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o}),jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(xr,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:Et("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function Eu({src:e,alt:t,aspectRatio:r="auto",className:o,children:n,isLoading:a=false}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("bg-background-muted",Ru[r],o),children:jsxRuntime.jsx(j,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ru[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Ru[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function Mu({className:e,children:t,isLoading:r=false,fill:o=false,style:n}){let i=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,o&&"flex-1 flex flex-col min-h-0",e),style:n,children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(j,{width:"100%",height:16}),jsxRuntime.jsx(j,{width:"80%",height:16}),jsxRuntime.jsx(j,{width:"60%",height:16})]})}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(i,"text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),style:n,children:t}):null}function Lu({className:e,children:t,align:r="end",isLoading:o=false}){return o?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("px-6 py-4 flex gap-2 justify-end",e),children:[jsxRuntime.jsx(j,{width:80,height:32}),jsxRuntime.jsx(j,{width:60,height:32})]}):t?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("px-6 py-4 flex items-center gap-2",Jw[r],e),children:t}):null}_e.Header=cl;_e.Media=Eu;_e.Content=Mu;_e.Footer=Lu;var ao=class extends Ze.Component{constructor(){super(...arguments);Mi(this,"state",{hasError:false});Mi(this,"handleRetry",()=>{this.setState({hasError:false,error:void 0}),typeof window<"u"&&window.location.reload();});}static getDerivedStateFromError(r){return {hasError:true,error:r}}componentDidCatch(r,o){console.error("Error Boundary caught an error:",r,o);}render(){return this.state.hasError?this.props.fallback?this.props.fallback:jsxRuntime.jsxs(_e,{children:[this.props.title&&jsxRuntime.jsx(_e.Header,{title:this.props.title}),jsxRuntime.jsx(_e.Content,{children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center justify-center gap-4","data-testid":"error-boundary",children:[jsxRuntime.jsx("p",{className:"text-feedback-error-text",children:this.state.error?.message||"Something went wrong"}),jsxRuntime.jsx("button",{className:"rounded bg-action-default px-4 py-2 text-[color:var(--color-action-default-text)] hover:bg-action-default-hover",onClick:this.handleRetry,children:"Retry"})]})})]}):this.props.children}};var Qw=.3,Zw=.5;function wt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:d,isDismissable:c=true,transparentOverlay:l=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:x="640px",contentPadding:h=true,showHandle:y=true,animationVariant:v="scale",className:C}){let[w,S]=Ze.useState(false),[N,k]=Ze.useState(0),[T,E]=Ze.useState(false),A=Qs(s),P=A?.height??null,I=A?.keyboardOffset??0,R=Ze.useRef(null),O=Ze.useRef(null),W=Ze.useRef(null),z=Ze.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});Ze.useEffect(()=>{if(s){let G=setTimeout(()=>{S(true),setTimeout(()=>S(false),600);},400);return ()=>clearTimeout(G)}},[s]),Ze.useEffect(()=>{s||(k(0),E(false),z.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),Ze.useEffect(()=>{let G=O.current;if(!G||!s)return;let B=null,L=b=>{let M=b.target;M&&["INPUT","TEXTAREA","SELECT"].includes(M.tagName)&&(B&&clearTimeout(B),B=setTimeout(()=>{M.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return G.addEventListener("focusin",L),()=>{G.removeEventListener("focusin",L),B&&clearTimeout(B);}},[s]);let F=Ze.useCallback(G=>{c&&(G.pointerType!=="touch"&&G.pointerType!=="pen"||(W.current&&(clearTimeout(W.current),W.current=null),z.current={isDragging:true,startY:G.clientY,startTime:Date.now(),pointerId:G.pointerId},E(false),G.currentTarget.setPointerCapture(G.pointerId)));},[c]),Y=Ze.useCallback(G=>{let{isDragging:B,startY:L,pointerId:b}=z.current;if(!B||G.pointerId!==b)return;let M=G.clientY-L;k(Math.max(0,M));},[]),U=Ze.useCallback(G=>{let{isDragging:B,startY:L,startTime:b,pointerId:M}=z.current;if(!B||G.pointerId!==M)return;let D=G.clientY-L,q=Date.now()-b,ae=D/q;z.current={isDragging:false,startY:0,startTime:0,pointerId:null};let ee=(R.current?.getBoundingClientRect().height??0)*Qw;(D>ee||ae>Zw&&D>50)&&c?(d?.(),k(0)):(E(true),k(0),W.current=setTimeout(()=>{E(false),W.current=null;},200));},[c,d]);if(!s)return null;let V=t||r,J=u||m||p;return jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isOpen:s,onOpenChange:G=>{G||d?.();},isDismissable:c,transparent:l,style:{paddingBottom:I>0?`${I}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center p-0 sm:p-4",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full max-w-full p-0 sm:p-2 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",isDismissable:c,children:jsxRuntime.jsx("div",{ref:R,className:tailwindMerge.twMerge("w-full",T&&"transition-transform duration-200"),style:{transform:N>0?`translateY(${N}px)`:void 0},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("relative flex w-full flex-col overflow-hidden","bg-background-surface","shadow-2xl shadow-black/30 dark:shadow-black/60","border-t border-x border-border-default/40","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0 focus:shadow-none","origin-bottom",v==="scale"?"animate-[tray-enter-scale_400ms_cubic-bezier(0.32,0.72,0,1)]":"animate-[tray-enter_400ms_cubic-bezier(0.32,0.72,0,1)]",v==="scale"?"data-[exiting]:animate-[tray-exit-scale_250ms_cubic-bezier(0.32,0,0.67,0)]":"data-[exiting]:animate-[tray-exit_250ms_cubic-bezier(0.32,0,0.67,0)]",C),style:{maxWidth:x,...f?{height:f}:{maxHeight:/\d/.test(g)?P!==null?`min(${g}, ${Math.max(P-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[y&&jsxRuntime.jsx("div",{className:"absolute top-0 left-0 right-0 h-8 z-10 flex justify-center items-start pt-2 touch-none cursor-grab active:cursor-grabbing",onPointerDown:F,onPointerMove:Y,onPointerUp:U,onPointerCancel:U,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-1 w-12 rounded-full bg-border-muted transition-all duration-300","hover:bg-border-default hover:w-16",w&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),V&&(a?jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,hasBackArrow:true,onBack:i??(()=>{}),onClose:d||(()=>{})}):jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!d,onClose:d||(()=>{})})),jsxRuntime.jsx("div",{ref:O,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",h?"p-4":"p-0"),children:e}),J&&jsxRuntime.jsx(pn,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}wt.displayName="Tray";function Qa({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:d,useMobileTray:c=true,popoverClassName:l}){let[u,m]=Ze.useState(false),{isMobile:p}=gr();if(c&&p){let f=Ze__namespace.default.isValidElement(e)?Ze__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,y=(v=>{if(typeof v=="string")return v;if(Ze__namespace.default.isValidElement(v)){let C=v.props;if(typeof C.children=="string")return C.children;if(Array.isArray(C.children))return C.children.find(S=>typeof S=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(wt,{isOpen:u,onClose:()=>m(false),title:y,contentPadding:false,headerContent:s,footerContent:d,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(v=>{let C=v.href&&!v.disabled?"a":"button";return jsxRuntime.jsxs(C,{...v.href&&!v.disabled?{href:v.href}:{},onClick:()=>{v.disabled||(v.onAction?v.onAction():i?.(v),m(false));},disabled:v.disabled,"data-testid":v.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!v.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",v.variant==="destructive"?"text-feedback-error-text hover:bg-feedback-error-background active:bg-feedback-error-background/80":"text-text-primary hover:bg-background-hover active:bg-background-hover/80",v.disabled&&"opacity-50 cursor-not-allowed"),children:[v.iconName&&jsxRuntime.jsx(H,{name:v.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:v.render?v.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:v.subtitle?"font-medium":"",children:v.name}),v.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:v.subtitle})]})})]},v.id)})})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(St,{className:tailwindMerge.twMerge("w-fit min-w-[180px] overflow-auto rounded-[var(--control-border-radius)] border border-border-default","bg-background-surface shadow-lg","animate-in fade-in zoom-in-97","duration-200 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-97","data-[exiting]:duration-150 data-[exiting]:ease-in",o==="right"?"origin-top-right":"origin-top-left",l),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1 py-1",l),children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 pt-3",children:s}):null,jsxRuntime.jsx(reactAriaComponents.Menu,{className:"!outline-none",children:t.map(f=>jsxRuntime.jsx(rN,{id:f.id,href:f.href,onAction:()=>{f.onAction?f.onAction():i?.(f);},textAlign:n,size:a,iconName:f.iconName,isDisabled:f.disabled,variant:f.variant,subtitle:f.subtitle,render:f.render,noPadding:f.noPadding,"data-testid":f.testId,children:f.name},f.id))}),d?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:d}):null]})})]})})}function rN({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:d,...c}){let l={sm:"px-3 py-2 text-sm",md:i?"px-4 py-2.5 text-base":"px-4 py-2 text-base"},u="text-text-primary hover:bg-background-hover data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-primary data-[focus-visible]:ring-inset",m={primary:u,default:u,destructive:"text-feedback-error-text hover:bg-feedback-error-background data-[focused]:bg-feedback-error-background data-[focus-visible]:ring-2 data-[focus-visible]:ring-feedback-error-border data-[focus-visible]:ring-inset"};return s?jsxRuntime.jsx(reactAriaComponents.MenuItem,{...c,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&l[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:s()}):jsxRuntime.jsxs(reactAriaComponents.MenuItem,{...c,isDisabled:o,className:tailwindMerge.twMerge("group box-border flex w-full cursor-pointer items-center rounded-sm outline-none transition-colors",!d&&l[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(H,{name:t,size:r==="sm"?16:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-1 flex-col",children:[jsxRuntime.jsx("span",{className:i?"font-medium":"",children:n}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:i})]}),t&&e==="right"&&jsxRuntime.jsx(H,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var Jr=({className:e,size:t=24,color:r="text-action-brand"})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent",r,e),style:{width:t,height:t},role:"status","aria-label":"loading",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Loading..."})});function Xr({state:e,message:t,className:r,customIndicator:o}){if(e!=="loading-more")return null;let n=jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-center gap-2 py-4","text-text-secondary",r),"aria-label":t||"Loading",children:[jsxRuntime.jsx(Jr,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}function gn({items:e,onLoadMore:t,hasMore:r,isLoading:o=false,loadingState:n,enableVirtualization:a,estimatedItemSize:i=50,overscan:s=5,scrollElement:d,loadMoreThreshold:c=100}){let l=Ze.useRef(null),u=Ze.useRef(null),m=Ze.useRef(false),[p,g]=Ze.useState(0);Ze.useEffect(()=>{u.current&&(d||l.current)&&g(k=>k+1);},[d,e.length]);let f=n||(o?e.length===0?"loading":"loading-more":"idle"),x=f==="loading",h=f==="loading-more",y=a!==void 0?a:e.length>=100,v=reactVirtual.useVirtualizer({count:e.length,getScrollElement:()=>d||l.current,estimateSize:()=>i,overscan:s}),C=y?v:null,w=y?v.getVirtualItems():[];Ze.useEffect(()=>{let k=u.current,T=d||l.current;if(!k||!T||!r||o||!t)return;let E=new IntersectionObserver(A=>{let[P]=A;P?.isIntersecting&&!m.current&&r&&t&&(m.current=true,Promise.resolve(t()).finally(()=>{m.current=false;}));},{root:T,rootMargin:`0px 0px ${c}px 0px`,threshold:0});return E.observe(k),()=>{E.disconnect();}},[r,o,t,d,c,p]);let S=Ze.useCallback((k,T)=>{C?C.scrollToIndex(k,T):l.current&&l.current.children[k]?.scrollIntoView({behavior:"smooth",block:T?.align||"start"});},[C]),N=Ze.useCallback(()=>{C?C.scrollToIndex(0,{align:"start"}):l.current&&l.current.scrollTo({top:0,behavior:"smooth"});},[C]);return {virtualizer:C,virtualItems:w,computedLoadingState:f,isInitialLoad:x,isLoadingMore:h,scrollRef:l,loadMoreRef:u,scrollToIndex:S,scrollToTop:N}}var Za=Ze.createContext({variant:"timeline",size:"md"});function Xg(){return Ze.useContext(Za)}function ml(e){return Ze.isValidElement(e)&&e.type===bl}function pN(e){return Ze.isValidElement(e)&&e.type===gl}function Ou({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:d=null,renderLoadingSkeleton:c,loadingSkeletonCount:l=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:x,height:h,maxHeight:y,...v}){let C=Ze.useRef(null),{isMobile:w}=gr(),S=w?"stacked":e,N=n!==void 0&&a!==void 0,{scrollRef:k,loadMoreRef:T,virtualizer:E,virtualItems:A,isLoadingMore:P,computedLoadingState:I}=gn({items:n||[],onLoadMore:N?m:void 0,hasMore:N?p:false,isLoading:i,loadingState:s,enableVirtualization:N?g:false,estimatedItemSize:f||(S==="stacked"?120:150),overscan:5}),R=N&&k?k:C,O=Ze.useMemo(()=>({variant:S,size:t}),[S,t]),W=S==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",z=S==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",F={};if(N&&m&&(h?(F.height=typeof h=="number"?`${h}px`:h,F.overflowY="auto"):y?(F.maxHeight=typeof y=="number"?`${y}px`:y,F.overflowY="auto"):(F.height="600px",F.overflowY="auto")),N){let V=I==="loading"||i&&(!n||n.length===0);if(V){let G=c?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:l}).map((B,L)=>jsxRuntime.jsx("div",{children:c()},`skeleton-${L}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:l}).map((B,L)=>{let b=t==="sm"?"gap-2":"gap-3";if(S==="timeline"){let M=t==="sm"?"pt-3":"pt-4",D=t==="sm"?"p-3":"p-4";return jsxRuntime.jsxs("div",{className:"group relative grid items-start gap-4 grid-cols-[3rem_1fr]",children:[jsxRuntime.jsxs("div",{className:`relative flex h-full flex-col items-center ${M}`,children:[jsxRuntime.jsx(j,{width:32,height:32,variant:"circle"}),L<l-1&&jsxRuntime.jsx("span",{className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),jsxRuntime.jsxs("div",{className:`min-w-0 flex flex-col ${b} ${D} rounded-md border border-border-subtle bg-background-surface`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx(j,{width:"50%",height:16}),jsxRuntime.jsx(j,{width:"15%",height:12})]}),jsxRuntime.jsx(j,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(j,{width:"70%",height:t==="sm"?14:15})]})]},`skeleton-${L}`)}else return jsxRuntime.jsxs("div",{className:`flex flex-col ${t==="sm"?"px-3 py-3":"px-4 py-4"}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(j,{width:24,height:24,variant:"circle"}),jsxRuntime.jsx(j,{width:"50%",height:16})]}),jsxRuntime.jsxs("div",{className:`mt-3 flex flex-col ${b}`,children:[jsxRuntime.jsx(j,{width:"85%",height:t==="sm"?14:15}),jsxRuntime.jsx(j,{width:"70%",height:t==="sm"?14:15}),jsxRuntime.jsx(j,{width:"20%",height:12})]})]},`skeleton-${L}`)})});return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:R,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:G})})}if(d)return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:R,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:d})})});if(!n||n.length===0)return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{ref:R,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:F,...v,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let J=E?A?.map(G=>({virtualItem:G,item:n[G.index],index:G.index}))||[]:n.map((G,B)=>({item:G,index:B,virtualItem:null}));return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsxs("div",{ref:R,"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),style:{...F,position:E?"relative":void 0},...v,children:[E?jsxRuntime.jsxs("div",{style:{height:`${E.getTotalSize()}px`,position:"relative"},children:[J.map(({item:G,index:B,virtualItem:L})=>{if(!G||!L)return null;let b=a(G,B),M=S==="timeline"&&Ze.isValidElement(b)&&ml(b)?Ze.cloneElement(b,{showConnector:B!==n.length-1}):b;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${L.start}px)`},"data-index":L.index,ref:E.measureElement,children:M},`item-${B}`)}),P&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%"},children:x||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[J.map(({item:G,index:B})=>{let L=a(G,B);if(S==="timeline"&&Ze.isValidElement(L)&&ml(L)){let b=B===n.length-1;return jsxRuntime.jsx("div",{children:Ze.cloneElement(L,{showConnector:!b})},`item-${B}`)}return jsxRuntime.jsx("div",{children:L},`item-${B}`)}),P&&(x||jsxRuntime.jsx(Xr,{state:"loading-more"}))]}),m&&p&&!V&&jsxRuntime.jsx("div",{ref:T,style:E?{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let Y=Ze.Children.toArray(o),U=Y.map((V,J)=>{if(ml(V)){let G=V.props.showConnector??(S==="timeline"&&J<Y.length-1),B=S==="timeline"&&J>0;return Ze.cloneElement(V,{showConnector:G,showIncomingConnector:B})}if(pN(V)){let G=J===Y.length-1;return Ze.cloneElement(V,{__isLastGroup:G,__isFirstGroup:J===0})}return V});return jsxRuntime.jsx(Za.Provider,{value:O,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":S,className:tailwindMerge.twMerge("flex flex-col",W,z,r),...v,children:U})})}Ou.displayName="ActivityFeed";function gl(e){let{variant:t,size:r}=Xg(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:d=false,__isFirstGroup:c=false,...l}=e,u=Ze.Children.toArray(i),m=u.map((f,x)=>{if(ml(f)){let h=f.props.showConnector??(t==="timeline"&&!(d&&x===u.length-1));return Ze.cloneElement(f,{showConnector:h,showIncomingConnector:t==="timeline"&&!(c&&x===0)})}return f}),p=t==="timeline"?"pl-[3rem]":r==="sm"?"px-3":"px-4",g=r==="sm"?"gap-3":"gap-4";return jsxRuntime.jsxs("section",{"data-slot":"group",className:tailwindMerge.twMerge("flex flex-col",s),...l,children:[(o||n||a)&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("mb-2 flex flex-wrap items-end justify-between gap-2",p),children:[jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[o&&jsxRuntime.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-secondary",children:o}),n&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:n})]}),a&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center gap-2",children:a})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex flex-col",g),children:m})]})}gl.displayName="ActivityFeedGroup";var Yg={neutral:"bg-background-muted text-text-secondary border-border-muted",brand:"bg-background-muted text-action-brand border-action-brand/30",success:"bg-background-muted text-feedback-success-text border-feedback-success-border/40",warning:"bg-background-muted text-feedback-warning-text border-feedback-warning-border/40",danger:"bg-background-muted text-feedback-error-text border-feedback-error-border/40",info:"bg-background-muted text-feedback-info-text border-feedback-info-border/40"},mN={neutral:"bg-background-subtle",brand:"bg-action-brand/5",success:"bg-feedback-success-background",warning:"bg-feedback-warning-background",danger:"bg-feedback-error-background",info:"bg-feedback-info-background"},fN={neutral:"border-border-muted",brand:"border-action-brand",success:"border-feedback-success-border",warning:"border-feedback-warning-border",danger:"border-feedback-error-border",info:"border-feedback-info-border"};function bl(e){let{variant:t,size:r}=Xg(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:d,visual:c,icon:l,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:x=false,interactive:h,className:y,children:v,onKeyDown:C,showIncomingConnector:w,...S}=e,N=c??(l?jsxRuntime.jsx(H,{name:l,weight:u||"fill",className:"h-4 w-4"}):null),k=p??(t==="stacked"?"minimal":"subtle"),T=r==="sm"?"gap-2":"gap-3",E="text-xs text-text-secondary",A=r==="sm"?"text-sm":"text-[15px]",P="text-xs text-text-secondary",I=h??typeof S.onClick=="function",R=J=>{if(!I){C?.(J);return}J.key===" "?J.preventDefault():J.key==="Enter"&&(J.preventDefault(),J.currentTarget.click()),C?.(J);},O=J=>{I&&J.key===" "&&(J.preventDefault(),J.currentTarget.click());},W=I?tailwindMerge.twMerge("group cursor-pointer",ot()):void 0,F=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",k==="minimal"?r==="sm"?"pt-2":"pt-3":r==="sm"?"pt-3":"pt-4"),children:[jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("relative z-10 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Yg[m]),children:N}),t==="timeline"&&f&&jsxRuntime.jsx("span",{"data-slot":"separator",className:"absolute top-[2rem] left-1/2 w-0 border-l-2 border-dotted -translate-x-1/2 h-[calc(100%+2.5rem)] border-border-muted"})]}),Y=g?tailwindMerge.twMerge(mN[m],k==="minimal"?"rounded-md border border-border-muted":fN[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:I?"button":void 0,tabIndex:I?0:void 0,className:tailwindMerge.twMerge("flex flex-col",r==="sm"?"px-3 py-3":"px-4 py-4",{minimal:"",subtle:"bg-background-subtle",solid:"bg-background-muted"}[k],Y,W,I?"transition-colors hover:bg-background-subtle/80":"",y),onKeyDown:R,onKeyUp:O,...S,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[!x&&jsxRuntime.jsx("span",{"data-slot":"indicator",className:tailwindMerge.twMerge("flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-full border text-sm font-medium shadow-sm ring-2 ring-background-surface",Yg[m]),children:N}),jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o})]}),jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("mt-3 flex flex-col",T),children:[n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",A),children:n}),i&&jsxRuntime.jsx("div",{className:P,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),v,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:d}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",E),children:a})]})]});let U=k==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",V={minimal:"",subtle:"rounded-md border border-border-subtle bg-background-surface",solid:"rounded-md bg-background-muted shadow-sm"};return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"timeline",role:I?"button":void 0,tabIndex:I?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",W,y),onKeyDown:R,onKeyUp:O,...S,children:[x?jsxRuntime.jsx("div",{}):F,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",T,U,V[k],Y,I?"transition-colors group-hover:bg-background-subtle/70":""),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsx("div",{"data-slot":"title",className:"min-w-0 flex-1 text-sm font-semibold text-text-primary",children:o}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",E),children:a})]}),n&&jsxRuntime.jsx("div",{"data-slot":"description",className:tailwindMerge.twMerge("text-text-secondary",A),children:n}),i&&jsxRuntime.jsx("div",{className:P,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),v,d&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:d})]})]})}bl.displayName="ActivityItem";function yr({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:d,primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:x="85vh",height:h,mobileMaxHeight:y="90vh",mobileHeight:v,contentPadding:C=true,className:w}){let S=fr("(max-width: 767px)"),N=Qs(S&&e===void 0),k=N?.height??null,T=N?.keyboardOffset??0,E=Ze.useRef(null),A=Ze.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]),P=Ze.useRef(null),I=Ze.useRef(null);Ze.useEffect(()=>{let F=I.current;if(!F||!S)return;let Y=null,U=V=>{let J=V.target;J&&["INPUT","TEXTAREA","SELECT"].includes(J.tagName)&&(Y&&clearTimeout(Y),Y=setTimeout(()=>{J.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return F.addEventListener("focusin",U),()=>{F.removeEventListener("focusin",U),Y&&clearTimeout(Y);}},[S]);let R=Ze.useCallback(()=>{P.current&&P.current.scrollTop!==0&&(P.current.scrollTop=0);},[]);if(e===false)return null;let O=r||o,W=c||l||u||m,z=e!==void 0;return S?z?jsxRuntime.jsx(wt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:c,secondaryAction:l,footerContent:m,transparentOverlay:p,maxHeight:y,height:v,maxWidth:g,contentPadding:C,showHandle:true,animationVariant:"scale",className:w,children:d}):jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isDismissable:true,transparent:p,style:{paddingBottom:T>0?`${T}px`:void 0,transition:"padding-bottom 0.25s ease-out"},className:"flex items-end justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-0 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:E,onScroll:A,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border-t border-x border-border-default/40","rounded-t-xl","overflow-hidden","animate-in slide-in-from-bottom","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:slide-out-to-bottom","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{...v?{height:v}:{maxHeight:/\d/.test(y)?k!==null?`min(${y}, ${Math.max(k-8,0)}px, 100dvh)`:`min(${y}, 100dvh)`:y}},children:[jsxRuntime.jsx("div",{className:"flex justify-center pt-2",children:jsxRuntime.jsx("div",{className:"h-1.5 w-12 rounded-full bg-border-muted"})}),O&&(i?jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",C?"px-6 py-6":"p-0"),children:d}),W&&jsxRuntime.jsx(pn,{primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{...z?{isOpen:e,onOpenChange:F=>{!F&&t&&t();}}:{},isDismissable:true,transparent:p,className:"flex items-center justify-center",children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"w-full p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",style:{maxWidth:g},children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{ref:P,onScroll:R,className:tailwindMerge.twMerge("relative flex w-full flex-col","bg-background-surface","shadow-2xl shadow-black/20","border border-border-default/50","rounded-md","overflow-hidden","outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0","animate-in fade-in zoom-in-96 slide-in-from-bottom-2","duration-300 ease-out","data-[exiting]:animate-out data-[exiting]:fade-out data-[exiting]:zoom-out-95","data-[exiting]:duration-200 data-[exiting]:ease-in",w),style:{minWidth:f,...h?{height:h}:{maxHeight:x}},children:[O&&(i?jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(lr,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto",C?"px-6 py-6":"p-0"),children:d}),W&&jsxRuntime.jsx(pn,{primaryAction:c,secondaryAction:l,tertiaryAction:u,footerContent:m})]})})})})}function $g({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:r,maxWidth:i,minWidth:s,primaryAction:{label:n,onPress:t,variant:a},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:o})})}var bn={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},Ir=Ze.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=bN__namespace[e];if(!s)return null;let d=typeof t=="string"?t in bn?bn[t]:bn.md:t,c=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:d,color:r,weight:o,className:c,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});Ir.displayName="IconSSR";var hN=Ze.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:d,ariaLabel:c,ref:l,...u})=>{let m=typeof n=="string"?n in bn?bn[n]:bn.md:n,p=r?typeof r=="string"?r in bn?bn[r]:m*1.75:r:m*1.75,g=tailwindMerge.twMerge("inline-flex items-center justify-center flex-shrink-0",t==="circle"?"rounded-full":"rounded-lg",e==="subtle"&&"bg-background-muted",e==="solid"&&"bg-action-brand text-[color:var(--color-action-brand-text)]",e==="outline"&&"border-2 border-current",o);return jsxRuntime.jsx("div",{className:g,style:{width:p,height:p},children:jsxRuntime.jsx(Ir,{...u,name:i,size:n,color:s,weight:d,className:a,ariaLabel:c})})});hN.displayName="IconSSRWithContainer";var _a=({className:e,showWordmark:t=true,width:r,fill:o})=>{let n,a;if(o?o.startsWith("fill-")?a=o:n=o:e?a=e:n="var(--color-text-primary)",t){let d=r||270,c=d/270*80;return jsxRuntime.jsxs("svg",{width:d,height:c,viewBox:"0 0 270 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsxs("g",{clipPath:"url(#clip0_796_283)",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"}),jsxRuntime.jsx("path",{d:"M269.838 49.4457H249.005C249.266 51.801 250.162 53.6985 251.695 55.1377C253.225 56.577 255.134 57.2967 257.416 57.2967C259.307 57.2967 260.887 56.8715 262.159 56.021C263.463 55.1377 264.408 53.9927 264.996 52.5862H269.251C268.502 54.9415 267.084 56.937 264.996 58.5725C262.943 60.208 260.414 61.026 257.416 61.026C255.069 61.026 252.917 60.4697 250.961 59.3575C249.037 58.2127 247.504 56.6587 246.363 54.696C245.255 52.7332 244.7 50.558 244.7 48.17C244.7 45.782 245.255 43.6067 246.363 41.644C247.504 39.6812 249.037 38.1437 250.961 37.0315C252.917 35.8867 255.069 35.3142 257.416 35.3142C259.73 35.3142 261.833 35.8702 263.724 36.9825C265.615 38.0947 267.098 39.6485 268.176 41.644C269.283 43.6395 269.838 45.913 269.838 48.4645V49.4457ZM257.416 39.0432C255.263 39.0432 253.439 39.6812 251.939 40.957C250.47 42.2327 249.542 43.9337 249.152 46.06H265.583C265.192 43.9992 264.262 42.3145 262.796 41.006C261.36 39.6975 259.568 39.0432 257.416 39.0432Z"}),jsxRuntime.jsx("path",{d:"M228.356 60.5352V35.8049H232.219V39.7794H232.464C233.05 38.5689 233.963 37.5712 235.202 36.7862C236.474 35.9684 237.974 35.5594 239.701 35.5594H243.125V39.4359H239.701C237.517 39.4359 235.757 40.1554 234.42 41.5949C233.083 43.0342 232.414 44.9152 232.414 47.2377V60.5352H228.356Z"}),jsxRuntime.jsx("path",{d:"M208.607 61.0259C205.64 61.0259 203.326 60.1262 201.663 58.3272C200 56.4952 199.169 53.8947 199.169 50.5252V35.8047H203.228V49.8874C203.228 52.2427 203.766 54.0744 204.842 55.3829C205.95 56.6587 207.532 57.2967 209.586 57.2967C211.02 57.2967 212.308 56.9694 213.449 56.3152C214.623 55.6284 215.536 54.6959 216.188 53.5184C216.84 52.3407 217.166 50.9997 217.166 49.4949V35.8047H221.225V60.5352H217.313V56.5607H217.068C216.286 57.9019 215.161 58.9814 213.694 59.7992C212.226 60.6169 210.531 61.0259 208.607 61.0259Z"}),jsxRuntime.jsx("path",{d:"M186.736 39.534V56.806H194.756V60.5352H182.677V39.534H177.199V35.8047H182.677V29.5732H186.736V35.8047H193.24V39.534H186.736Z"}),jsxRuntime.jsx("path",{d:"M156.585 60.5352H151.988L158.394 48.0227L152.33 35.8047H156.976L162.062 46.0599H165.388L170.474 35.8047H175.022L168.958 48.0227L175.365 60.5352H170.67L165.29 49.7892H162.013L156.585 60.5352Z"}),jsxRuntime.jsx("path",{d:"M150.138 49.1315H129.304C129.565 51.4867 130.461 53.3842 131.994 54.8235C133.526 56.2627 135.433 56.9825 137.715 56.9825C139.606 56.9825 141.188 56.5572 142.459 55.7067C143.763 54.8235 144.709 53.6785 145.296 52.272H149.551C148.801 54.6272 147.382 56.6227 145.296 58.2582C143.242 59.8937 140.715 60.7118 137.715 60.7118C135.368 60.7118 133.216 60.1555 131.26 59.0432C129.336 57.8985 127.804 56.3445 126.663 54.3817C125.554 52.419 125 50.2437 125 47.8557C125 45.4677 125.554 43.2925 126.663 41.3298C127.804 39.367 129.336 37.8295 131.26 36.7173C133.216 35.5725 135.368 35 137.715 35C140.03 35 142.133 35.556 144.024 36.6682C145.915 37.7805 147.399 39.3342 148.475 41.3298C149.583 43.3252 150.138 45.5987 150.138 48.1502V49.1315ZM137.715 38.729C135.564 38.729 133.738 39.367 132.238 40.6427C130.771 41.9185 129.842 43.6195 129.45 45.7458H145.883C145.491 43.685 144.562 42.0002 143.095 40.6917C141.661 39.3832 139.867 38.729 137.715 38.729Z"}),jsxRuntime.jsx("path",{d:"M116.961 60.5353H112.559V30.4072H101.164V26.1875H128.307V30.4072H116.961V60.5353Z"})]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:"clip0_796_283",children:jsxRuntime.jsx("rect",{width:"270",height:"80",fill:"white"})})})]})}let i=r||80;return jsxRuntime.jsxs("svg",{width:i,height:i,viewBox:"0 0 80 80",xmlns:"http://www.w3.org/2000/svg",className:a,style:n?{fill:n}:void 0,children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.223654 20.2934C0.417233 19.8234 0.873598 19.517 1.37984 19.517H20.5909C21.282 19.517 21.8422 20.0798 21.8422 20.774V40.049C21.8422 40.5572 21.5375 41.0155 21.0702 41.2102C20.6028 41.405 20.0647 41.2977 19.7067 40.9385L0.495628 21.6635C0.137428 21.3041 0.030075 20.7633 0.223654 20.2934ZM4.40349 22.0311L19.3396 37.017V22.0311H4.40349Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 20.2934C38.8394 19.8234 39.2958 19.517 39.802 19.517H59.013C59.7041 19.517 60.2642 20.0798 60.2642 20.774V40.049C60.2642 40.5572 59.9597 41.0155 59.4923 41.2102C59.025 41.405 58.4867 41.2977 58.1289 40.9385L38.9178 21.6635C38.5595 21.3041 38.4522 20.7633 38.6458 20.2934ZM42.8255 22.0311L57.7618 37.017V22.0311H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4347 58.8447C19.6283 58.3747 20.0847 58.0685 20.5909 58.0685H39.802C40.493 58.0685 41.0532 58.6312 41.0532 59.3255V78.6005C41.0532 79.1087 40.7486 79.567 40.2813 79.7617C39.8139 79.9562 39.2757 79.849 38.9178 79.49L19.7067 60.215C19.3485 59.8555 19.2411 59.3147 19.4347 58.8447ZM23.6146 60.5825L38.5508 75.5682V60.5825H23.6146Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 58.1643C39.79 57.9695 40.3283 58.0768 40.6861 58.436L59.8972 77.711C60.2555 78.0703 60.3628 78.6113 60.1692 79.081C59.9756 79.551 59.5192 79.8575 59.013 79.8575H39.802C39.1109 79.8575 38.5508 79.2948 38.5508 78.6005V59.3255C38.5508 58.8173 38.8554 58.359 39.3227 58.1643ZM41.0532 62.3575V77.3433H55.9893L41.0532 62.3575Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 19.6129C39.79 19.4182 40.3283 19.5254 40.6861 19.8846L59.8972 39.1595C60.2555 39.519 60.3628 40.0598 60.1692 40.5298C59.9756 40.9995 59.5192 41.306 59.013 41.306H39.802C39.1109 41.306 38.5508 40.7433 38.5508 40.049V20.7741C38.5508 20.2658 38.8554 19.8075 39.3227 19.6129ZM41.0532 23.8061V38.792H55.9893L41.0532 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.3227 38.8885C39.79 38.694 40.3283 38.8012 40.6861 39.1602L59.8972 58.4352C60.2555 58.7945 60.3628 59.3355 60.1692 59.8055C59.9756 60.2752 59.5192 60.5817 59.013 60.5817H39.802C39.1109 60.5817 38.5508 60.019 38.5508 59.3247V40.0497C38.5508 39.5415 38.8554 39.0832 39.3227 38.8885ZM41.0532 43.0817V58.0675H55.9893L41.0532 43.0817Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 39.569C38.8394 39.0992 39.2958 38.7927 39.802 38.7927H59.013C59.7041 38.7927 60.2642 39.3555 60.2642 40.0497V59.3247C60.2642 59.833 59.9597 60.2912 59.4923 60.486C59.025 60.6805 58.4867 60.5732 58.1289 60.2142L38.9178 40.9392C38.5595 40.5797 38.4522 40.039 38.6458 39.569ZM42.8255 41.3067L57.7618 56.2927V41.3067H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.6458 58.8447C38.8394 58.3747 39.2958 58.0685 39.802 58.0685H59.013C59.7041 58.0685 60.2642 58.6312 60.2642 59.3255V78.6005C60.2642 79.1087 59.9597 79.567 59.4923 79.7617C59.025 79.9562 58.4867 79.849 58.1289 79.49L38.9178 60.215C38.5595 59.8555 38.4522 59.3147 38.6458 58.8447ZM42.8255 60.5825L57.7618 75.5682V60.5825H42.8255Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 19.6129C59.0011 19.4182 59.5394 19.5254 59.8972 19.8846L79.1083 39.1595C79.4666 39.519 79.5739 40.0598 79.3803 40.5298C79.1867 40.9995 78.7303 41.306 78.2241 41.306H59.013C58.322 41.306 57.7618 40.7433 57.7618 40.049V20.7741C57.7618 20.2658 58.0664 19.8075 58.5338 19.6129ZM60.2643 23.8061V38.792H75.2006L60.2643 23.8061Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.5338 0.338803C59.0011 0.144135 59.5394 0.251385 59.8972 0.610565L79.1083 19.8855C79.4666 20.2449 79.5739 20.7857 79.3803 21.2556C79.1867 21.7256 78.7303 22.032 78.2241 22.032H59.013C58.322 22.032 57.7618 21.4692 57.7618 20.775V1.50003C57.7618 0.99174 58.0664 0.533468 58.5338 0.338803ZM60.2643 4.53208V19.5179H75.2006L60.2643 4.53208Z"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.8569 20.2934C58.0505 19.8234 58.5069 19.517 59.013 19.517H78.2241C78.9151 19.517 79.4753 20.0798 79.4753 20.774V40.049C79.4753 40.5572 79.1707 41.0155 78.7034 41.2102C78.236 41.405 77.6978 41.2977 77.3399 40.9385L58.1289 21.6635C57.7705 21.3041 57.6633 20.7633 57.8569 20.2934ZM62.0365 22.0311L76.9729 37.017V22.0311H62.0365Z"})]})};var xl=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:d="app-sidebar-collapse"})=>{let c=p=>p.length>0&&"items"in p[0],l=p=>c(p)?p:[{id:"default-section",items:p}],u=(p,g,f)=>jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[p.title&&jsxRuntime.jsx("div",{className:"px-6 py-1 text-xs font-medium text-text-secondary uppercase tracking-wider",children:p.title}),jsxRuntime.jsx("div",{className:"space-y-0.5",children:p.items.map(x=>m(x))}),g<f-1&&jsxRuntime.jsx("div",{className:"border-b border-border-subtle mx-6 my-2"})]},p.id),m=(p,g=false)=>{if(p.children&&p.children.length>0){let h=`category-${p.id}`;return jsxRuntime.jsxs("div",{className:"group/category",children:[jsxRuntime.jsx("input",{type:"checkbox",id:h,className:"peer/category hidden",defaultChecked:p.isExpanded,"aria-hidden":"true"}),jsxRuntime.jsxs("label",{htmlFor:h,className:"flex items-center gap-3 px-6 py-1 text-text-primary hover:bg-background-hover hover:text-text-primary cursor-pointer transition-all duration-200",children:[p.icon&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1"}),jsxRuntime.jsx("svg",{className:"w-4 h-4 transform transition-transform duration-200 peer-checked/category:rotate-180 ml-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsx("div",{className:"hidden peer-checked/category:block bg-background-subtle border-l-2 border-border-subtle ml-6",children:p.children.map(y=>m(y,true))})]},p.id)}let f={href:p.href||"#",className:`flex items-center gap-3 transition-all duration-200 hover:bg-background-hover ${g?"pl-8 pr-6 py-1 text-sm":"px-6 py-1"} ${p.isActive?`bg-action-brand/10 text-action-brand ${g?"":"border-l-2 border-action-brand"}`:"text-text-primary hover:text-text-primary"}`,"aria-current":p.isActive?"page":void 0},x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[p.icon&&!g&&jsxRuntime.jsx("span",{className:"flex-shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-all duration-200",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200",children:p.label})]});return a==="a"?jsxRuntime.jsx("a",{...f,children:x},p.id):jsxRuntime.jsx(a,{...f,children:x},p.id)};return jsxRuntime.jsxs("div",{className:`flex flex-col h-full ${i}`,children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between h-[60px] px-6 border-b border-border-default",children:[n&&jsxRuntime.jsx("div",{className:"relative top-[-1px] transition-all duration-200",children:o||jsxRuntime.jsx(_a,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:d,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("label",{htmlFor:s,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),jsxRuntime.jsxs("nav",{className:"flex-1 flex flex-col overflow-hidden",children:[e&&e.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto py-2 scrollbar-hide",children:l(e).map((p,g,f)=>u(p,g,f.length))}),t&&t.length>0&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t bg-background-muted/30",children:jsxRuntime.jsx("div",{className:"mt-2 pb-2 space-y-0.5",children:t.map(p=>m(p))})}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-default",children:jsxRuntime.jsx("div",{children:r})})]})]})};function qn(e){return e.id??e.href??e.label}function Wu(e,t,r=[]){for(let o of e){if(o.href===t||o.id===t)return o.children?.length&&o.pushOnSelect!==false?[...r,qn(o)]:r;if(o.children?.length){let n=Wu(o.children,t,[...r,qn(o)]);if(n)return n}}return null}function ib(e,t){let r=[],o=e;for(let n of t){let a=o.find(i=>qn(i)===n);if(!a)break;r.push(a),o=a.children??[];}return r}function yN(e,t,r){let o=t.length>0?[...e,...t]:e,n=[{path:[],items:e,bottomItems:t.length>0?t:void 0}],a=ib(o,r),i=[];for(let s of a){if(!s.children?.length)break;i=[...i,qn(s)],n.push({path:i,parent:s,items:s.children});}return n}var vN=({href:e,...t})=>jsxRuntime.jsx("a",{href:e,...t}),rb=[];function CN(e){let t=[];for(let r of e){let o=r.items??[];o.length!==0&&(t.length>0&&t.push({id:`__divider__${r.id}`,label:"",divider:true}),r.title&&t.push({id:`__group__${r.id}`,label:r.title,groupLabel:true}),t.push(...o));}return t}function SN(e,t){if(process.env.NODE_ENV==="production"||t.length===0)return;let r=new Map;for(let o of e)o.id&&r.set(o.id,"id"),o.href&&!r.has(o.href)&&r.set(o.href,"href");for(let o of t){let n=null;o.id&&r.has(o.id)?n=r.get(o.id)==="id"?`id "${o.id}"`:`id "${o.id}" (matches an items \`href\`)`:o.href&&r.has(o.href)&&(n=r.get(o.href)==="href"?`href "${o.href}"`:`href "${o.href}" (matches an items \`id\`)`),n&&console.warn(`[StackNav] L1 ${n} appears in both \`items\` and \`bottomItems\`. Stack tokens and value lookups will resolve to the \`items\` entry, making the bottomItems entry unreachable. L1 ids and hrefs must be unique across both arrays.`);}}function wN(e){if(!e)return {};let t={};return e.background!==void 0&&(t["--edges-stack-nav-background"]=e.background),e.activeBackground!==void 0&&(t["--edges-stack-nav-row-active-background"]=e.activeBackground),e.activeColor!==void 0&&(t["--edges-stack-nav-row-active-color"]=e.activeColor),e.hoverBackground!==void 0&&(t["--edges-stack-nav-row-hover-background"]=e.hoverBackground),e.borderColor!==void 0&&(t["--edges-stack-nav-border-color"]=e.borderColor),t}function $a({items:e,groups:t,bottomItems:r,value:o,defaultStack:n,stack:a,onStackChange:i,onSelect:s,linkComponent:d=vN,renderRow:c,showLogo:l=false,logo:u,header:m,footer:p,mobileMenuId:g,sidebarCollapseId:f,rootLabel:x,sticky:h=true,width:y=260,ariaLabel:v="Navigation",theme:C,animated:w=true,style:S,className:N}){process.env.NODE_ENV!=="production"&&t&&e&&console.warn("[StackNav] Both `items` and `groups` were provided. `groups` takes precedence and `items` is ignored.");let k=Ze__namespace.useMemo(()=>t?CN(t):e??rb,[t,e]),T=r??rb,E=Ze__namespace.useMemo(()=>T.length>0?[...k,...T]:k,[k,T]);Ze__namespace.useEffect(()=>{SN(k,T);},[k,T]);let[A,P]=Ze__namespace.useState(()=>a!==void 0?a:n!==void 0?n:o?Wu(E,o)??[]:[]),I=a??A,R=Ze__namespace.useCallback(B=>{a===void 0&&P(B),i?.(B);},[a,i]),O=Ze__namespace.useRef(false);Ze__namespace.useEffect(()=>{if(a!==void 0||!O.current&&(O.current=true,n!==void 0)||!o)return;let B=Wu(E,o);P(L=>{let b=B??[];return kN(L,b)?L:b});},[o,E,a,n]);let W=Ze__namespace.useMemo(()=>yN(k,T,I),[k,T,I]),z=Ze__namespace.useCallback((B,L)=>{B.children?.length&&R([...L,qn(B)]);},[R]),F=Ze__namespace.useCallback(()=>{R(I.slice(0,-1));},[I,R]),Y=Ze__namespace.useCallback((B,L)=>{let b=ib(E,I);if(s?.(L,b),!!L.children?.length&&!(L.href&&L.pushOnSelect===false)){let D=W[W.length-1]?.path??[];z(L,D);}L.href||B.preventDefault();},[E,I,s,z,W]),U=Ze__namespace.useCallback(B=>{let L=W[W.length-1]?.path??[];z(B,L);},[z,W]),V=Ze__namespace.useCallback(B=>o?B.href===o||B.id===o:false,[o]),J=h?"sticky top-0 h-[100dvh]":"",G={...y!=null?{width:y}:{},...wN(C),...S};return jsxRuntime.jsxs("aside",{role:"navigation","aria-label":v,"data-edges-stack-nav":"",className:tailwindMerge.twMerge("edges-stack-nav flex flex-col flex-shrink-0 overflow-hidden",w&&"edges-stack-nav--animated",J,N),style:G,children:[l?jsxRuntime.jsxs("div",{className:"edges-stack-nav__logo",children:[jsxRuntime.jsx("div",{className:"relative top-[-1px]",children:u??jsxRuntime.jsx(_a,{showWordmark:true,width:120})}),f?jsxRuntime.jsx("label",{htmlFor:f,className:"hidden md:flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-all duration-200 relative top-[-1px]","aria-label":"Collapse sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}):null,g?jsxRuntime.jsx("label",{htmlFor:g,className:"md:hidden flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover cursor-pointer transition-colors","aria-label":"Close menu",children:jsxRuntime.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}):null]}):null,m?jsxRuntime.jsx("div",{className:"edges-stack-nav__header",children:m}):null,jsxRuntime.jsx("div",{className:"relative flex-1 overflow-hidden",children:W.map((B,L)=>{let b=B.path.length,M=L===W.length-1,D=L<W.length-1,q=b===0?"__root__":B.path.join("/");return jsxRuntime.jsx(NN,{pane:B,parentPath:B.path.slice(0,-1),depth:b,isTop:M,isAbove:D,rootLabel:x,LinkComponent:d,renderRow:c,isActive:V,onSelect:Y,onDrillIn:U,onBack:F,animated:w},q)})}),p?jsxRuntime.jsx("div",{className:"edges-stack-nav__footer",children:p}):null]})}function NN({pane:e,depth:t,isTop:r,isAbove:o,rootLabel:n,LinkComponent:a,renderRow:i,isActive:s,onSelect:d,onDrillIn:c,onBack:l,animated:u}){let m=r?"edges-stack-nav__pane--top":o?"edges-stack-nav__pane--above":"edges-stack-nav__pane--below";return jsxRuntime.jsxs("nav",{"aria-label":e.parent?.label??n??"Navigation","aria-hidden":r?void 0:true,inert:r?void 0:true,className:tailwindMerge.twMerge("edges-stack-nav__pane absolute inset-0 flex flex-col gap-px overflow-y-auto px-2 py-3",!u&&"edges-stack-nav__pane--instant",m),children:[t>0&&e.parent?jsxRuntime.jsxs("button",{type:"button",className:"edges-stack-nav__back edges-stack-nav__row flex w-full cursor-pointer items-center gap-2 rounded-sm border-0 bg-transparent px-3 py-2 mb-2 text-left text-sm font-semibold text-text-primary",onClick:l,"aria-label":`Back from ${e.parent.label}`,children:[jsxRuntime.jsx(TN,{}),jsxRuntime.jsx("span",{children:e.parent.label})]}):n?jsxRuntime.jsx("div",{className:"px-3 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:n}):null,e.items.map(p=>jsxRuntime.jsx(ob,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:c},qn(p))),e.bottomItems&&e.bottomItems.length>0?jsxRuntime.jsx("div",{className:"edges-stack-nav__bottom-items mt-auto flex flex-col gap-px pt-3",children:e.bottomItems.map(p=>jsxRuntime.jsx(ob,{item:p,LinkComponent:a,renderRow:i,isActive:s(p),onSelect:d,onDrillIn:c},qn(p)))}):null]})}function ob({item:e,LinkComponent:t,renderRow:r,isActive:o,onSelect:n,onDrillIn:a}){if(e.divider)return jsxRuntime.jsx("div",{className:"edges-stack-nav__divider my-2",role:"separator"});if(e.groupLabel)return jsxRuntime.jsx("div",{className:"px-3 pt-6 pb-1.5 text-[10px] font-semibold uppercase tracking-[0.08em] text-text-secondary",children:e.label});let i=!!e.children?.length,s=tailwindMerge.twMerge("edges-stack-nav__row flex items-center justify-between gap-3 rounded-sm px-3 py-2 text-sm font-normal text-text-primary no-underline cursor-pointer text-left bg-transparent border-0 transition-colors",o&&"edges-stack-nav__row--active font-semibold");if(r)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r({item:e,isActive:o,hasChildren:i,select:l=>n(l,e),drillIn:()=>a(e),LinkComponent:t,className:s})});let d=jsxRuntime.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[e.leading??e.icon?jsxRuntime.jsx("span",{className:"inline-flex items-center flex-shrink-0",children:e.leading??e.icon}):null,jsxRuntime.jsx("span",{className:"truncate",children:e.label})]});if(e.href&&i&&e.pushOnSelect===false)return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(s,"cursor-default p-0"),children:[jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm px-3 py-2 text-inherit no-underline","aria-current":o?"page":void 0,onClick:l=>n(l,e),children:d}),jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 pr-2 text-text-secondary",children:[e.trailing,jsxRuntime.jsx("button",{type:"button",className:"edges-stack-nav__drill-in inline-flex cursor-pointer items-center rounded-sm border-0 bg-transparent p-1 text-inherit","aria-label":`Open ${e.label}`,onClick:()=>a(e),children:jsxRuntime.jsx(nb,{})})]})]});let c=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d,jsxRuntime.jsxs("span",{className:"flex flex-shrink-0 items-center gap-2 text-text-secondary",children:[e.trailing,i?jsxRuntime.jsx(nb,{}):null]})]});return e.href?jsxRuntime.jsx(t,{href:e.href,"aria-label":e.ariaLabel,className:s,"aria-current":o?"page":void 0,onClick:l=>n(l,e),children:c}):jsxRuntime.jsx("button",{type:"button",className:s,"aria-label":e.ariaLabel,onClick:l=>{n(l,e);},children:c})}function nb(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M4.5 3 7.5 6 4.5 9"})})}function TN(){return jsxRuntime.jsx("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",children:jsxRuntime.jsx("path",{d:"M8.5 3 4.5 7 8.5 11"})})}function kN(e,t){if(e===t)return true;if(e.length!==t.length)return false;for(let r=0;r<e.length;r+=1)if(e[r]!==t[r])return false;return true}var Ki=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:d,className:c="",mobileMenuId:l="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(Ir,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(Ir,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(Ir,{name:"Moon",size:"sm"})}},m=()=>{switch(s||(i?"dark":"light")){case "system":return "Switch to light mode";case "light":return "Switch to dark mode";case "dark":return "Switch to system mode";default:return "Toggle theme"}};return jsxRuntime.jsx("header",{className:`h-[60px] bg-background-surface border-b ${c}`,children:jsxRuntime.jsxs("div",{className:"relative flex h-full items-center",children:[jsxRuntime.jsx("div",{className:"flex items-center h-full flex-shrink-0",children:r&&jsxRuntime.jsx("label",{htmlFor:l,className:"md:hidden cursor-pointer","aria-label":"Open menu",children:jsxRuntime.jsx("div",{className:"flex h-full w-14 flex-col items-center justify-center border-r hover:bg-background-hover transition-colors",children:jsxRuntime.jsx(Ir,{name:"List",size:"sm"})})})}),t&&jsxRuntime.jsx("div",{className:"flex-1 flex justify-end md:justify-center md:px-4 min-w-0",children:jsxRuntime.jsx("div",{className:"w-full md:max-w-4xl min-w-0",children:t})}),!t&&jsxRuntime.jsx("div",{className:"flex-1"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-4 pr-4 flex-shrink-0 ml-4",children:[e,n&&a&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex items-center justify-center w-8 h-8 rounded hover:bg-background-hover transition-colors","aria-label":m(),children:u()}),d,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function lb({sideNav:e,stackNav:t,topNav:r,children:o,contentPaddingX:n,contentPaddingY:a,showSidebarBorder:i=true,mainClassName:s,enableJsEnhancements:d=false}){let c="app-mobile-menu",l="app-sidebar-collapse";return Ze.useEffect(()=>{if(!d)return;let u=document.getElementById(l),m=document.getElementById(c),p=document.querySelector("[data-app-shell]"),g=document.getElementById("app-sidebar");if(!u||!p||!g)return;let f=null,x=false;try{let E=localStorage.getItem("sidebar-collapsed");E!==null&&(u.checked=E==="true");}catch{}let h=()=>{try{localStorage.setItem("sidebar-collapsed",String(u.checked));}catch{}u.checked?x=true:(f&&(clearTimeout(f),f=null),p.removeAttribute("data-peek"),x=false);};u.addEventListener("change",h);let y=E=>{E.key==="Escape"&&(m&&(m.checked=false),p.removeAttribute("data-peek"));};document.addEventListener("keydown",y);let v=null;m&&(v=()=>{document.body.style.overflow=m.checked?"hidden":"";},m.addEventListener("change",v));let C=E=>{let P=E.target.closest("a");P&&P.href&&window.innerWidth<768&&m&&setTimeout(()=>{m.checked=false,document.body.style.overflow="";},100);};g.addEventListener("click",C);let w=16,S=200,N=()=>{f&&(clearTimeout(f),f=null),p.getAttribute("data-peek")!=="true"&&p.setAttribute("data-peek","true");},k=()=>{f&&clearTimeout(f),f=setTimeout(()=>{p.removeAttribute("data-peek"),f=null;},S);},T=E=>{if(window.innerWidth<768||!u.checked)return;let A=g.contains(E.target);if(x&&!A&&(x=false),x)return;E.clientX<=w||A?N():p.getAttribute("data-peek")==="true"&&k();};return document.addEventListener("mousemove",T),()=>{u.removeEventListener("change",h),document.removeEventListener("keydown",y),m&&v&&m.removeEventListener("change",v),g.removeEventListener("click",C),document.removeEventListener("mousemove",T),f&&clearTimeout(f);}},[d,c,l]),jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative","data-app-shell":"",children:[jsxRuntime.jsx("input",{type:"checkbox",id:l,className:"sr-only peer/sidebar","aria-hidden":"true"}),jsxRuntime.jsx("a",{href:"#app-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 z-50 rounded px-3 py-2 bg-background-surface shadow",children:"Skip to content"}),jsxRuntime.jsx(Ki,{...r,mobileMenuId:c,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",r?.className].filter(Boolean).join(" ")}),jsxRuntime.jsxs("div",{className:"flex w-full h-[calc(100dvh-60px)] md:h-[100dvh] relative overflow-hidden",children:[jsxRuntime.jsx("input",{type:"checkbox",id:c,className:"sr-only peer/mobile","aria-hidden":"true"}),jsxRuntime.jsx("label",{htmlFor:c,className:"fixed inset-0 bg-background-modal z-[55] opacity-0 pointer-events-none peer-checked/mobile:opacity-100 peer-checked/mobile:pointer-events-auto transition-opacity md:hidden","aria-label":"Close menu"}),jsxRuntime.jsx("div",{"aria-hidden":"true","data-peek-zone":"",className:"hidden md:block fixed left-0 top-0 bottom-0 w-4 z-[70] pointer-events-none"}),jsxRuntime.jsx("label",{htmlFor:l,"data-expand-rail":"",className:"hidden fixed left-3 top-3 z-[75] items-center justify-center w-9 h-9 rounded-md bg-background-surface border border-border-default shadow-sm hover:bg-background-hover cursor-pointer transition-all duration-200","aria-label":"Expand sidebar",children:jsxRuntime.jsx(Ir,{name:"Sidebar",size:"sm"})}),jsxRuntime.jsx("aside",{id:"app-sidebar","data-app-sidebar":"",className:["bg-background-surface","border-r border-border-default","transition-transform duration-300 ease-in-out md:transition-[transform,width] md:duration-300 md:ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-full md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",i?"":"!border-r-0",(t??e)?.className||""].filter(Boolean).join(" "),children:t?jsxRuntime.jsx($a,{...t,mobileMenuId:c,sidebarCollapseId:l,sticky:false,width:null,className:["h-full !border-r-0",t.className].filter(Boolean).join(" ")}):jsxRuntime.jsx(xl,{...e,mobileMenuId:c,sidebarCollapseId:l,className:"h-full"})}),jsxRuntime.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:[jsxRuntime.jsx("div",{className:"sticky top-0 flex-shrink-0 hidden md:block z-20","data-top-nav-wrapper":"",children:jsxRuntime.jsx(Ki,{...r,className:r?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body scrollbar-visible",n,a,s||""].join(" "),role:"main",children:o})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
3
90
  @media (min-width: 768px) {
4
91
  /* Collapsed: hide the rail offscreen, surface the floating expand
5
92
  button, and let the edge zone receive hover events. */
6
- #${c}:checked ~ * [data-app-sidebar] {
93
+ #${l}:checked ~ * [data-app-sidebar] {
7
94
  transform: translateX(-100%);
8
95
  position: absolute;
9
96
  }
10
- #${c}:checked ~ * [data-expand-rail] {
97
+ #${l}:checked ~ * [data-expand-rail] {
11
98
  display: flex;
12
99
  }
13
- #${c}:checked ~ * [data-top-nav-wrapper] {
100
+ #${l}:checked ~ * [data-top-nav-wrapper] {
14
101
  padding-left: 3.5rem;
15
102
  }
16
- #${c}:checked ~ * [data-peek-zone] {
103
+ #${l}:checked ~ * [data-peek-zone] {
17
104
  pointer-events: auto;
18
105
  }
19
106
 
@@ -27,8 +114,8 @@
27
114
  z-index: 50;
28
115
  }
29
116
  }
30
- `}})]})}function bn(e,t=300){let[r,o]=Ze.useState(e);return Ze.useEffect(()=>{let n=setTimeout(()=>o(e),t);return ()=>clearTimeout(n)},[e,t]),r}function yl(e,t=300){let[r,o]=Ze.useState(false);return Ze.useEffect(()=>{if(e){let n=setTimeout(()=>{o(true);},t);return ()=>clearTimeout(n)}o(false);},[e,t]),r}var AN=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-action-default border border-action-default-hover text-[color:var(--color-action-default-text)] text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function tr({children:e,content:t,...r}){return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:200,children:[e,jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...r,offset:10,className:reactAriaComponents.composeRenderProps(r.className,(o,n)=>AN({...n,className:o})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-action-default stroke-action-default-hover group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}function vr(){let[e,t]=Ze__namespace.default.useState(false),r=Ze__namespace.default.useCallback((n,a)=>{t(true),a?.(n);},[]),o=Ze__namespace.default.useCallback((n,a)=>{t(false),a?.(n);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}var Nt=Ze__namespace.default.forwardRef(({children:e,className:t},r)=>jsxRuntime.jsx("div",{ref:r,className:tailwindMerge.twMerge("relative w-full",t),children:e}));Nt.displayName="InputWrapper";function Yi({onClick:e,size:t="md",className:r}){return jsxRuntime.jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-[48%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary cursor-pointer",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsxRuntime.jsx(H,{name:"X",size:t==="sm"?16:20})})}function hn(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,n="border rounded-[var(--control-border-radius)] !outline-none ";return r?`${n} border-border-muted`:t&&o?`${n} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:t?`${n} border-feedback-error-border`:o?`${n} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${n} border-border-input`}function ob(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function IN(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function Yt(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:a="md",className:i}=e;return tailwindMerge.twMerge("w-full",hn({isInvalid:t,isDisabled:r,isFocused:o}),ob({transparent:n,isDisabled:r}),Je[a].text,Je[a].height,Je[a].padding,IN(a),i)}function FN(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:n,transparent:a,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",ob({transparent:a,isDisabled:n}),Je[t].height,hn({isFocused:r,isInvalid:o,isDisabled:n}),i)}function qe({children:e,size:t="md",tooltip:r,description:o,descriptionPlacement:n="below",isRequired:a,className:i,htmlFor:s}){let d=r||o&&n==="tooltip",l=r||o,c=o&&n==="inline",u=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(Je[t].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,a&&jsxRuntime.jsx("span",{children:"*"}),d&&jsxRuntime.jsx("span",{className:"inline-flex items-center text-text-secondary",children:jsxRuntime.jsx(H,{name:"Info",size:t==="sm"?16:20})}),c&&jsxRuntime.jsx("span",{className:"text-text-secondary font-normal ml-1",children:o})]});return d&&l?jsxRuntime.jsx(tr,{content:l,children:u}):u}function Pe({size:e="md",className:t,children:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",Je[e].text,t),children:r})}function xe({children:e,size:t="md",className:r}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(Je[t].text,"text-feedback-error-text",r),children:e})}function Cl({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:n,className:a,...i}){return jsxRuntime.jsx("input",{className:Yt({isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:e,className:a}),...i})}function nb(e){let{children:t,...r}=e;return jsxRuntime.jsx("div",{...r,className:FN(e),children:typeof t=="function"?t(e):t})}var Xu=Ze.createContext("md");function cb(){return Ze.useContext(Xu)}function Ku(e="md"){let t=e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":"";return `flex-1 text-start data-[placeholder]:text-text-disabled overflow-hidden text-ellipsis whitespace-nowrap ${Je[e].text} ${t}`}function GN(){let e=Ze__namespace.default.useCallback((r,o)=>{o?.(r);},[]),t=Ze__namespace.default.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function Ko({label:e,description:t,errorMessage:r,children:o,items:n,renderItem:a,renderSelectedValue:i,size:s="md",selectedKey:d,defaultSelectedKey:l,onSelectionChange:c,placeholder:u,showErrors:m=false,tooltip:p,isRequired:g,transparent:f,reserveErrorSpace:x=false,placement:b="bottom start",shouldFlip:y=true,menuWidth:v="match",descriptionPlacement:C="below",useMobileTray:w=true,...S}){let[T,P]=Ze.useState(null),[k,M]=Ze.useState(null),[D,R]=Ze.useState(false),I=d??T??l,{handleFocus:E,handleBlur:O}=GN(),{isMobile:W}=gr(),z=w&&W,F=Ze__namespace.default.useMemo(()=>!i||!I||!n?null:Array.from(n).find(B=>B.id===I)??null,[i,I,n]),Y=G=>{c&&G!==null&&c(G),c||P(G);},U=Ze.useRef(null),V=Ze.useRef(null),J=()=>{z&&R(!D);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.Select,{...S,selectedKey:I,defaultSelectedKey:l,onSelectionChange:Y,placeholder:u,className:Ie(S.className,"group flex w-full flex-col"),ref:U,onOpenChange:G=>{z||(G&&V.current?M(V.current.offsetWidth):G||U.current?.blur());},children:({isDisabled:G,isInvalid:B,isOpen:N})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:s,tooltip:p,description:C==="tooltip"||C==="inline"?t:void 0,descriptionPlacement:C,isRequired:g,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("div",{ref:V,children:jsxRuntime.jsxs(re,{variant:"unstyled",className:tailwindMerge.twMerge(Yt({isInvalid:B||m&&!!r,isDisabled:G,isFocused:z?D:N,transparent:f,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:h=>E(h,S.onFocus),onBlur:h=>O(h,S.onBlur),onPress:z?J:void 0,"data-open":z?D:N,children:[i&&F?jsxRuntime.jsx("div",{className:Ku(s),children:i(F)}):z&&I?jsxRuntime.jsx("div",{className:Ku(s),children:n?Array.from(n).find(A=>A.id===I)?.label:String(I)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:Ku(s)}),jsxRuntime.jsx(H,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] transition-transform",(z?D:N)&&"rotate-180")})]})})}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:m?jsxRuntime.jsx(xe,{size:s,className:"text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Pe,{size:s,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:m?jsxRuntime.jsx(xe,{size:s,className:"mt-1 text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Pe,{size:s,className:"mt-1",children:t}):null}),z?null:jsxRuntime.jsx(St,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:v==="match"&&k?`${k}px`:void 0,minWidth:v==="auto"&&k?`${k}px`:void 0,maxWidth:v==="auto"?"min(600px, 90vw)":void 0},placement:b,shouldFlip:y,children:jsxRuntime.jsx(Xu.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:a&&n?h=>jsxRuntime.jsx(Cr,{id:h.id,textValue:h.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(h)})},h.id):o})})})]})}),z&&jsxRuntime.jsx(wt,{isOpen:D,onClose:()=>R(false),title:e??"Select an option",contentPadding:false,children:jsxRuntime.jsx(Xu.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:I!=null?[I]:[],onSelectionChange:G=>{let B=Array.from(G)[0];B!=null&&(Y(B),R(false));},children:a&&n?G=>jsxRuntime.jsx(Cr,{id:G.id,textValue:G.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(G)})},G.id):o})})})]})}function Cr({size:e,className:t,...r}){let o=cb(),n=e??o;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...r,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-primary data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",Je[n].paddingY,Je[n].text,t)})}var $N=[],eT={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},tT={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},ub={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},ju=(e,t,r)=>{if(e==null||e==="")return "";let n=(r?r.flatMap(a=>a.items):t||[]).find(a=>a.id===e);return n?n.name:""};async function rT(e,t,r){try{let o=e.url.replace("{q}",t),n=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([d,l])=>{n.append(d,l.toString());});let a=`${o}${n.toString()?"?"+n.toString():""}`,i=await fetch(a,{method:"GET",headers:e.headers,signal:r});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in REST request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}async function oT(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),n=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.json();if(a.errors)throw new Error(a.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(a=e.responsePath.split(".").reduce((i,s)=>i?.[s],a)),{items:e.transformResponse(a)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in GraphQL request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}function Nl({label:e,staticItems:t=$N,sections:r,selectedKey:o,defaultSelectedKey:n,onSelectionChange:a,requestConfig:i,defaultFilter:s,placeholder:d,errorMessage:l,description:c,size:u="md",tooltip:m,isRequired:p,isDisabled:g,isInvalid:f,validationResult:x,showErrors:b=true,renderItem:y,renderLeftIcon:v,renderSection:C,autoFocus:w=false,reserveErrorSpace:S=false,hideChevron:T=false,useMobileTray:P=true,className:k}){let M=Ze__namespace.default.useRef(null),D=Ze__namespace.default.useRef(null),[R,I]=Ze__namespace.default.useState(),[E,O]=Ze.useState(()=>ju(o||n,t,r)),[W,z]=Ze.useState(false),[F,Y]=Ze.useState(false),U=bn(E),{contains:V}=reactAria.useFilter({sensitivity:"base"}),[J,G]=Ze.useState(),{isMobile:B}=gr(),N=P&&B,h=Je[u].text,L=reactStately.useAsyncList({async load({signal:le,filterText:ge=""}){if(!i)return {items:[]};if(!i.url||i.shouldLoad&&!i.shouldLoad(ge))return {items:[]};try{let ce;return i.requestType==="GraphQL"?ce=await oT(i,ge,le):ce=await rT(i,ge,le),G(ce.error),{items:ce.items}}catch(ce){return ce instanceof Error&&ce.name==="AbortError"?{items:[]}:(console.error("Error loading items:",ce),G(ce instanceof Error?ce.message:"Unknown error occurred"),{items:[]})}},initialFilterText:""}),A=i&&U!==""?L:null,j=false,ae=Ze.useRef("");Ze.useEffect(()=>{w&&z(true);},[w]),Ze.useEffect(()=>{let le=ju(o,t,r);le!==E&&O(le);},[o,t,r]),Ze.useEffect(()=>{let le=()=>{M.current&&I(M.current.offsetWidth);};return le(),window.addEventListener("resize",le),()=>window.removeEventListener("resize",le)},[]),Ze.useEffect(()=>{U===""?ae.current="":A&&U!==ae.current&&(ae.current=U,A.setFilterText(U));},[U,A]),j=yl(!!A?.isLoading,300);let _=Ze__namespace.default.useMemo(()=>{if(!N||!E)return A?A.items:t;let le=A?A.items:t,ge=s??(i?()=>true:V);return le.filter(ce=>ge(ce.name,E))},[N,E,A,t,s,V]),ee=le=>{let ge=ju(le,t,r);O(ge),a&&a(le);},ie=le=>{O(le);},Ee=()=>{N&&Y(true);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:ee,selectedKey:o||void 0,defaultSelectedKey:n||void 0,items:A?A.items:r?r.flatMap(le=>le.items):t,className:Ie(k,"group flex flex-col w-full"),menuTrigger:N?"manual":i?"input":"focus",allowsEmptyCollection:!!i,isDisabled:g,isInvalid:f||!!l,inputValue:E,onInputChange:ie,autoFocus:w&&!N,defaultFilter:s??(i?()=>true:V),"aria-label":e||d||"Autocomplete",children:le=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:u,tooltip:m,isRequired:p,children:e}),jsxRuntime.jsxs(Nt,{ref:M,children:[v?jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10",children:v(j)}):jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 z-10 flex items-center",children:j?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:`${eT[u]} text-text-secondary`})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:Yt({isInvalid:f||!!l,isDisabled:g,isFocused:W||(N?F:le.isOpen),size:u,className:tailwindMerge.twMerge(tT[u],E&&!g||!T&&!E?"pr-10":"pr-3",N&&"cursor-pointer",k)}),placeholder:d,disabled:g,onFocus:ge=>{z(true),N&&(ge.currentTarget.blur(),Ee());},onBlur:()=>{z(false);},onClick:N?Ee:void 0,readOnly:N,"aria-label":e||d||"Autocomplete"}),E&&!g&&jsxRuntime.jsx(Yi,{onClick:()=>{O(""),a?.(null);},size:u}),!T&&!E&&jsxRuntime.jsx(reactAriaComponents.Button,{className:"absolute right-3 top-[46%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":"Toggle menu",isDisabled:g,children:({isPressed:ge})=>jsxRuntime.jsx(H,{name:ge?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),S?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:b&&J?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:J}):b&&typeof l=="string"?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:l}):b&&typeof l=="function"&&x?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:l(x)}):c?jsxRuntime.jsx(Pe,{size:u,children:c}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c&&jsxRuntime.jsx(Pe,{size:u,className:"mt-1",children:c}),b&&J&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:J}),b&&typeof l=="string"&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:l}),b&&typeof l=="function"&&x&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:l(x)})]}),!N&&jsxRuntime.jsx(St,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:R?`${R}px`:void 0,zIndex:9999},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",className:`max-h-[300px] overflow-auto bg-background-input outline-none ${h}`,children:r?r.map(ge=>{let ce=ge.items.map(pe=>jsxRuntime.jsx(Cr,{id:pe.id,textValue:pe.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${ub[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:y?y(pe):pe.name},pe.id));if(C){let pe=C(ge,ce);return Ze__namespace.default.isValidElement(pe)&&pe.type===reactAriaComponents.ListBoxSection?pe:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:pe},ge.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-secondary",children:ge.name}),ce]},ge.name)}):ge=>jsxRuntime.jsx(Cr,{id:ge.id,textValue:ge.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${ub[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:y?y(ge):ge.name},ge.id)})})]})}),N&&jsxRuntime.jsx(wt,{isOpen:F,onClose:()=>Y(false),title:e??d??"Search",contentPadding:false,height:"80vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"p-4 border-b border-border-default",children:jsxRuntime.jsxs(Nt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10 flex items-center",children:j?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"})}),jsxRuntime.jsx("input",{ref:D,type:"text",value:E,onChange:le=>ie(le.target.value),placeholder:d,autoFocus:true,className:Yt({isInvalid:false,isDisabled:false,isFocused:true,size:"md",className:"pl-10 pr-10"})}),E&&jsxRuntime.jsx(Yi,{onClick:()=>{O(""),a?.(null);},size:"md"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",items:_,selectedKeys:o?[o]:[],selectionMode:"single",onSelectionChange:le=>{let ge=Array.from(le)[0];ge&&(ee(ge),Y(false));},className:"bg-background-input outline-none",children:le=>jsxRuntime.jsx(Cr,{id:le.id,textValue:le.name,size:"md",className:"flex cursor-default items-center gap-2 px-4 py-3 text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0",children:y?y(le):le.name},le.id)})})]})})]})}function Yo({src:e,alt:t,firstName:r,lastName:o,fullName:n,onClick:a,size:i="md",shape:s="circle",variant:d="user",className:l,status:c,bordered:u=false,piiEntity:m}){let[p,g]=Ze.useState(false),f=Ze.useCallback(()=>g(true),[]);Ze.useEffect(()=>{g(false);},[e]);let x={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},b={xs:"h-1.5 w-1.5",sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4"},y={xs:"bottom-0 right-0",sm:"bottom-0 right-0",md:"bottom-0 right-0",lg:"bottom-0.5 right-0.5",xl:"bottom-1 right-1"},v={online:"bg-feedback-success-background border-feedback-success-border",offline:"bg-text-secondary border-border-muted",away:"bg-feedback-warning-background border-feedback-warning-border",busy:"bg-feedback-error-background border-feedback-error-border"},C={user:"bg-feedback-info-background text-feedback-info-text",team:"bg-feedback-info-background text-feedback-info-text",organization:"bg-feedback-success-background text-feedback-success-text"},w=s==="circle"?"rounded-full":"rounded-md",S=tailwindMerge.twMerge("relative inline-flex items-center justify-center overflow-hidden transition-opacity outline-none",x[i],w,a&&"cursor-pointer hover:opacity-80",u&&"ring-2 ring-background-surface",l),P=(()=>{if(r||o){let R=r?.[0]||"",I=o?.[0]||"";return (R+I).toUpperCase()}if(n){let R=n.split(" "),I=R[0]?.[0]||"",E=R[R.length-1]?.[0]||"";return I===E?I.toUpperCase():(I+E).toUpperCase()}return ""})(),k=()=>{let R={xs:14,sm:16,md:20,lg:24,xl:32}[i];switch(d){case "team":return jsxRuntime.jsx(lucideReact.Users,{size:R});case "organization":return jsxRuntime.jsx(lucideReact.Building2,{size:R});default:return jsxRuntime.jsx(lucideReact.User,{size:R})}},M=R=>{if(m)return d==="organization"?R?"organization-logo":"initials":R?"avatar":"initials"},D=()=>e&&!p?jsxRuntime.jsx("img",{src:e,alt:t||n||"Avatar",className:"h-full w-full object-cover",onError:f,"data-pii-type":M(true),"data-pii-entity":m}):P?jsxRuntime.jsx("span",{className:"font-semibold","data-pii-type":M(false),"data-pii-entity":m,children:P}):k();return jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx("div",{"data-avatar":true,className:tailwindMerge.twMerge(S,!e||p?C[d]:""),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,children:D()}),c&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("absolute border-2 border-background-surface",w,b[i],y[i],v[c]),"aria-label":`Status: ${c}`})]})}var uT={default:"bg-feedback-info-background text-feedback-info-text",success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",primary:"bg-action-primary/10 text-action-primary border border-action-primary/20",brand:"bg-action-primary/10 text-action-primary border border-action-primary/20",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted",neutral:"bg-background-muted text-text-secondary",charging:"bg-state-charging text-state-charging-text",discharging:"bg-state-discharging text-state-discharging-text",heat:"bg-state-heat text-state-heat-text",cool:"bg-state-cool text-state-cool-text",eco:"bg-state-eco text-state-eco-text",auto:"bg-state-auto text-state-auto-text",on:"bg-state-on text-state-on-text",off:"bg-state-off text-state-off-text",idle:"bg-state-idle text-state-idle-text",circulate:"bg-state-circulate text-state-circulate-text",unknown:"bg-state-unknown text-state-unknown-text",connected:"bg-feedback-success-background text-feedback-success-text",disconnected:"bg-feedback-error-background text-feedback-error-text",importing:"bg-state-importing text-state-importing-text",exporting:"bg-state-exporting text-state-exporting-text"},pT={xs:"px-1.5 py-0.5 text-xs",sm:"px-2.5 py-1.5 text-xs",md:"px-3.5 py-2 text-sm",lg:"px-4 py-2.5 text-base"},mT={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"},fT={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};function gt({children:e,variant:t="default",size:r="sm",shape:o="square",dot:n=false,dotPosition:a="left",dotPulse:i=false,title:s,className:d}){let l=n&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("rounded-full bg-current opacity-75",fT[r],i&&"animate-pulse"),"aria-hidden":"true"});return jsxRuntime.jsxs("span",{title:s,className:tailwindMerge.twMerge("inline-flex items-center gap-1.5 font-medium",pT[r],mT[o],uT[t],d),children:[n&&a==="left"&&l,e,n&&a==="right"&&l]})}var pt=({href:e,children:t,className:r="",external:o=false,title:n,variant:a="secondary",onClick:i,asButton:s=false,onPress:d,showArrow:l=false,alwaysUnderlined:c=false,LinkComponent:u,"data-pii-type":m,"data-pii-entity":p})=>{let g={...m&&{"data-pii-type":m},...p&&{"data-pii-entity":p}},f=o?{target:"_blank",rel:"noopener noreferrer"}:{},C=`${`${c?"underline decoration-1 underline-offset-4 decoration-current":"hover:underline hover:decoration-1 hover:underline-offset-4 hover:decoration-current"} cursor-pointer`} ${{primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""}[a==="brand"?"primary":a==="default"?"secondary":a]} ${r}`,w=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,l&&jsxRuntime.jsxs("span",{children:["\xA0","\u2192"]})]});return s?jsxRuntime.jsx("button",{type:"button",className:C,onClick:d,title:n,...g,children:w}):u&&e?jsxRuntime.jsx(u,{href:e,className:C,title:n,onClick:i,...f,...g,children:w}):jsxRuntime.jsx("a",{href:e||"#",className:C,...f,...g,title:n,onClick:i,children:w})};var NT={info:{subtle:{container:"bg-feedback-info-background border-l-4 border-l-feedback-info-border",iconColor:"text-feedback-info-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-info-border border-feedback-info-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Info},success:{subtle:{container:"bg-feedback-success-background border-l-4 border-l-feedback-success-border",iconColor:"text-feedback-success-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-success-border border-feedback-success-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.CheckCircle},warning:{subtle:{container:"bg-feedback-warning-background border-l-4 border-l-feedback-warning-border",iconColor:"text-feedback-warning-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-warning-border border-feedback-warning-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.AlertCircle},error:{subtle:{container:"bg-feedback-error-background border-l-4 border-l-feedback-error-border",iconColor:"text-feedback-error-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-error-border border-feedback-error-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.XCircle},discovery:{subtle:{container:"bg-background-muted border-l-4 border-l-action-brand",iconColor:"text-action-brand",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-action-brand border-action-brand",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Lightbulb}};function kl({variant:e="info",appearance:t="subtle",title:r,children:o,dismissible:n=false,onDismiss:a,primaryAction:i,secondaryAction:s,icon:d,hideIcon:l=false,className:c,testId:u}){let m=NT[e],p=m[t],g=m.icon,f=!!(i||s),x=!!(r||o);return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex gap-3 rounded-sm border p-4",p.container,c),role:"region","aria-live":"polite","data-testid":u,children:[!l&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",p.iconColor),"aria-hidden":"true",children:d||jsxRuntime.jsx(g,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[x&&jsxRuntime.jsxs("div",{className:"flex-1",children:[r&&jsxRuntime.jsx("div",{className:br(Mt("headingSm"),p.titleColor),children:r}),o&&jsxRuntime.jsx("div",{className:br(Mt("bodySm"),r?"mt-1":"",p.bodyColor),children:o})]}),f&&jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i&&(i.asLink?jsxRuntime.jsx(pt,{asButton:true,onPress:i.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:i.label}):jsxRuntime.jsx(re,{size:"sm",variant:"primary",onPress:i.onPress,className:t==="bold"?"bg-background-surface text-text-primary hover:bg-background-surface/90":"",children:i.label})),s&&(s.asLink?jsxRuntime.jsx(pt,{asButton:true,onPress:s.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:s.label}):jsxRuntime.jsx(re,{size:"sm",variant:"secondary",onPress:s.onPress,className:t==="bold"?"border-text-inverse/30 text-text-inverse hover:bg-text-inverse/10":"",children:s.label}))]})]}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:tailwindMerge.twMerge("flex h-8 w-8 flex-shrink-0 items-center justify-center self-start rounded-md transition-colors hover:bg-background-modal/10",p.iconColor,ot()),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function gb({isOpen:e=true,position:t="sticky",className:r,...o}){let n=t==="fixed"?"fixed top-0 left-0 right-0 z-50":"sticky top-0 z-50",a=r?`${r} !rounded-none`:"!rounded-none";return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:n,children:jsxRuntime.jsx(kl,{...o,className:a})})})}function ei(){let[e,t]=Ze.useState({width:0,height:0}),r=Ze.useRef(null),o=Ze.useRef(void 0),n=Ze.useCallback(a=>{if(r.current&&(r.current.disconnect(),r.current=null),o.current&&(cancelAnimationFrame(o.current),o.current=void 0),!a){t({width:0,height:0});return}let i=a.getBoundingClientRect();t({width:i.width,height:i.height}),r.current=new ResizeObserver(s=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(d=>{for(let l of s){let{width:c,height:u}=l.contentRect;t(m=>m.width!==c||m.height!==u?{width:c,height:u}:m);}});}),r.current.observe(a);},[]);return Ze.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current),r.current&&r.current.disconnect();},[]),{ref:n,width:e.width,height:e.height}}function xn({value:e,children:t,className:r,size:o="sm",iconPosition:n="right"}){let[a,i]=Ze.useState(false),l=jsxRuntime.jsx(re,{variant:"icon",size:o,onPress:()=>{let u=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(u),i(true),setTimeout(()=>{i(false);},2e3);},className:"!px-2 relative",style:{top:"0.5px"},children:jsxRuntime.jsx(H,{name:"Copy",size:o==="sm"?14:16})}),c=a?jsxRuntime.jsx(tr,{content:"Copied!",children:l}):l;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-0.5",r),children:[n==="left"&&c,t,n==="right"&&c]})}function Pl(e){let{children:t,maxWidth:r=600,className:o,...n}=e,{ref:a,width:i}=ei(),[s,d]=Ze__namespace.default.useState(false),[l,c]=Ze__namespace.default.useState(false),u=Ze__namespace.default.useRef(false),m=Ze__namespace.default.useMemo(()=>t&&!e.items&&typeof t!="function"?Ze__namespace.default.Children.toArray(t):null,[t,e.items]);if(Ze__namespace.default.useEffect(()=>{m&&m.length>=4&&i>0&&!u.current?(u.current=true,d(i>r),c(true)):(!m||m&&m.length<4)&&c(true);let p=setTimeout(()=>{l||c(true);},100);return ()=>clearTimeout(p)},[i,r,m,l]),m&&s&&m.length>=4){let p=m[0],g=m.slice(1,-2),f=m.slice(-2),x=g.map(b=>{if(Ze__namespace.default.isValidElement(b)){let y=b.props;if(typeof y.children=="string")return {label:y.children,href:y.href}}return {label:"..."}});return jsxRuntime.jsxs(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",l?"opacity-100":"opacity-0",o),children:[p,jsxRuntime.jsx(AT,{items:x}),f]})}return jsxRuntime.jsx(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",l?"opacity-100":"opacity-0",o),children:t})}function AT({items:e}){let t=e.map((r,o)=>({id:`breadcrumb-${o}`,name:r.label,href:r.href}));return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Qa,{items:t,align:"left",size:"sm",children:jsxRuntime.jsx(re,{variant:"icon",size:"sm",icon:"DotsThree","aria-label":"Show hidden breadcrumbs",className:"px-0.5"})}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-text-secondary"})]})})}function Rl(e){let{className:t,children:r,href:o,copyable:n,copyValue:a,...i}=e;return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:Ie(t,"flex items-center gap-2"),...i,children:s=>{let d=s.isCurrent,l=typeof r=="function"?r(s):r;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:d?n?jsxRuntime.jsx(xn,{value:a||(typeof l=="string"?l:void 0),size:"sm",iconPosition:"right",children:jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:l})}):jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:l}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(pt,{variant:"muted",href:o,className:"max-w-[150px] truncate sm:max-w-[300px] md:max-w-none",children:l}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-text-secondary"})]})})}})}function UT({isSelected:e,isDisabled:t}){let r=[ot,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return t?r.push("text-text-disabled forced-colors:text-[GrayText]"):e?r.push("bg-action-default text-text-inverse invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-text-primary hover:bg-background-hover pressed:bg-background-selected"),r.join(" ")}function ti({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...t,children:[jsxRuntime.jsx(Ml,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(El,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:({isSelected:o,isDisabled:n})=>`${UT({isSelected:o,isDisabled:n})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function Ml(){let{direction:e}=reactAriaComponents.useLocale(),t=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(re,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(H,{name:"CaretRight","aria-hidden":true,size:t}):jsxRuntime.jsx(H,{name:"CaretLeft","aria-hidden":true,size:t})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-text-primary"}),jsxRuntime.jsx(re,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(H,{name:"CaretLeft","aria-hidden":true,size:t}):jsxRuntime.jsx(H,{name:"CaretRight","aria-hidden":true,size:t})})]})}function El(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-secondary",children:e})})}var Sb=Ze__namespace.createContext(null);function yn(){let e=Ze__namespace.useContext(Sb);if(!e)throw new Error("Carousel components must be used within a CarouselRoot");return e}function wb({page:e,defaultPage:t=0,onPageChange:r,orientation:o="horizontal",loop:n=false,autoplay:a=false,autoplayDelay:i=4e3,allowMouseDrag:s=false,spacing:d="1rem",slidesPerView:l=1,slidesPerMove:c=1,className:u,children:m,...p}){let g=e!==void 0,[f,x]=Ze__namespace.useState(t),b=g?e:f,y=Ze__namespace.useRef(null),[v,C]=Ze__namespace.useState(0),[w,S]=Ze__namespace.useState(typeof a=="boolean"?a:!!a),[T,P]=Ze__namespace.useState(false),k=Ze__namespace.useRef(null),M=Ze__namespace.useRef(null),D=typeof a=="object"&&a!==null&&a.delay?a.delay:i;Ze__namespace.useEffect(()=>{if(y.current){let h=Math.max(1,Math.floor(Number(l)||1)),L=y.current.children;if(L.length===0){C(0);return}let A=Math.ceil(L.length/h);C(A);}},[m,l]);let R=Ze__namespace.useRef(-1);Ze__namespace.useEffect(()=>{if(b!==R.current&&y.current){let h=Array.from(y.current.children);if(h.length===0)return;let L=b*l,A=Math.min(L,h.length-1),j=h[A];j&&typeof j.scrollIntoView=="function"&&(j.scrollIntoView({behavior:"smooth",block:o==="vertical"?"start":"nearest",inline:o==="horizontal"?"start":"nearest"}),R.current=b);}},[b,l,o]);let I=Ze__namespace.useCallback(h=>{let L=h;n?L<0?L=v-1:L>=v&&(L=0):L=Math.max(0,Math.min(h,v-1)),g||x(L),r?.(L);},[g,n,r,v]),E=Ze__namespace.useCallback(()=>{I(b+c);},[b,I,c]),O=Ze__namespace.useCallback(()=>{I(b-c);},[b,I,c]),W=Ze__namespace.useRef(E);Ze__namespace.useEffect(()=>{W.current=E;},[E]);let z=v>0&&(n||b<v-1),F=v>0&&(n||b>0),Y=Ze__namespace.useCallback(()=>{S(h=>!h);},[]);Ze__namespace.useEffect(()=>{if(w&&v>1)return k.current=setInterval(()=>{W.current();},D),()=>{k.current&&(clearInterval(k.current),k.current=null);}},[w,v,D]);let U=Ze__namespace.useCallback(()=>{k.current&&(clearInterval(k.current),k.current=null);},[]),V=Ze__namespace.useCallback(()=>{w&&v>1&&(k.current=setInterval(()=>{W.current();},D));},[w,v,D]),J=Ze__namespace.useCallback(h=>{if(!s)return;P(true);let L="touches"in h&&h.touches&&h.touches.length>0?h.touches[0].clientX:"clientX"in h?h.clientX:0,A="touches"in h&&h.touches&&h.touches.length>0?h.touches[0].clientY:"clientY"in h?h.clientY:0;M.current={x:L,y:A};},[s]),G=Ze__namespace.useCallback(h=>{if(!T||!M.current)return;let L="touches"in h&&h.touches&&h.touches.length>0?h.touches[0].clientX:"clientX"in h?h.clientX:0,A="touches"in h&&h.touches&&h.touches.length>0?h.touches[0].clientY:"clientY"in h?h.clientY:0,j=L-M.current.x,ae=A-M.current.y,_=50;o==="horizontal"&&Math.abs(j)>_?(j>0?O():E(),P(false),M.current=null):o==="vertical"&&Math.abs(ae)>_&&(ae>0?O():E(),P(false),M.current=null);},[T,o,E,O]),B=Ze__namespace.useCallback(()=>{P(false),M.current=null;},[]),N={currentPage:b,totalPages:v,orientation:o,loop:n,spacing:d,slidesPerView:l,goToPage:I,goToNext:E,goToPrev:O,canGoNext:z,canGoPrev:F,isAutoplayActive:w,toggleAutoplay:Y,itemsRef:y,isDragging:T,allowMouseDrag:s,handleDragStart:J,handleDragMove:G,handleDragEnd:B};return jsxRuntime.jsx(Sb.Provider,{value:N,children:jsxRuntime.jsx("div",{...p,className:tailwindMerge.twMerge("relative w-full",o==="vertical"?"h-full":"",u),onMouseEnter:U,onMouseLeave:V,children:m})})}function Nb({className:e,children:t,...r}){let{itemsRef:o,orientation:n,spacing:a,isDragging:i,allowMouseDrag:s,handleDragStart:d,handleDragMove:l,handleDragEnd:c}=yn();return jsxRuntime.jsx("div",{ref:o,...r,className:tailwindMerge.twMerge("flex overflow-x-auto overflow-y-hidden snap-x snap-mandatory scrollbar-hide scroll-smooth",n==="vertical"&&"flex-col overflow-y-auto overflow-x-hidden snap-y",s&&i&&"cursor-grabbing select-none",s&&!i&&"cursor-grab",e),style:{gap:a,"--carousel-spacing":a,...r.style},onMouseDown:d,onMouseMove:l,onMouseUp:c,onMouseLeave:c,onTouchStart:d,onTouchMove:l,onTouchEnd:c,children:t})}function Tb({index:e,className:t,children:r,...o}){let{orientation:n,slidesPerView:a}=yn();return jsxRuntime.jsx("div",{...o,"data-index":e,className:tailwindMerge.twMerge("shrink-0 snap-start",n==="horizontal"?"h-full":"w-full",t),style:{width:n==="horizontal"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,height:n==="vertical"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,...o.style},children:r})}function kb({className:e,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex items-center justify-center gap-4 mt-4",e),children:t})}function Pb({className:e,children:t,...r}){let{goToPrev:o,canGoPrev:n}=yn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Previous slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:"CaretLeft",size:"sm"})})}function Rb({className:e,children:t,...r}){let{goToNext:o,canGoNext:n}=yn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Next slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:"CaretRight",size:"sm"})})}function op({index:e,className:t,children:r,...o}){let{currentPage:n,goToPage:a}=yn(),i=n===e;return jsxRuntime.jsx("button",{type:"button",...o,onClick:s=>{a(e),o.onClick?.(s);},"aria-label":`Go to slide ${e+1}`,"aria-current":i,className:tailwindMerge.twMerge("h-2 rounded-full transition-all duration-200",i?"w-6 bg-action-brand":"w-2 bg-border-muted hover:bg-border-input","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",t),children:r})}function Mb({className:e,...t}){let{totalPages:r}=yn();return jsxRuntime.jsx("div",{...t,className:tailwindMerge.twMerge("flex items-center gap-2",e),role:"group","aria-label":"Carousel indicators",children:Array.from({length:r},(o,n)=>jsxRuntime.jsx(op,{index:n},n))})}function Eb({className:e,children:t,...r}){let{isAutoplayActive:o,toggleAutoplay:n}=yn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{n(),r.onClick?.(a);},"aria-label":o?"Pause autoplay":"Start autoplay",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:o?"Pause":"Play",size:"sm"})})}function Lb({className:e,...t}){let{currentPage:r,totalPages:o}=yn();return jsxRuntime.jsxs("div",{...t,className:tailwindMerge.twMerge("text-sm text-text-secondary tabular-nums",e),"aria-live":"polite","aria-atomic":"true",children:[r+1," / ",o]})}var QT="focus:ring-action-primary",ZT="bg-action-primary border-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover hover:border-action-primary-hover";function np(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:Ie(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(qe,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(Pe,{children:e.description}),jsxRuntime.jsx(xe,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function _T({isDisabled:e}){return `relative flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-secondary"}`}function $T({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",a=QT,i="";return r?i="border-border-muted bg-background-muted":t?i="border-feedback-error-border bg-feedback-error-background":e||o?i=ZT:i="bg-background-input border-border-input hover:border-border-focus",`${n} ${a} ${i}`}var Db="w-4 h-4 text-current group-disabled:text-text-disabled";function ap({className:e,...t}){return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`${$T(t)} ${e||""}`,children:t.isIndeterminate?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:Db}):t.isSelected?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:Db}):null})}function io(e){let{children:t,variant:r,...o}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...o,className:reactAriaComponents.composeRenderProps(e.className,(n,a)=>`${_T(a)} ${n||""}`),children:n=>{let{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}=n;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ap,{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}),typeof t=="function"?t(n):t]})}})}var rk={primary:"bg-action-primary/10 text-action-primary border border-action-primary/20 hover:bg-action-primary/15",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted hover:bg-action-secondary-hover",info:"bg-feedback-info-background text-feedback-info-text border border-feedback-info-border hover:bg-feedback-info-background/80"};function Ib(e){return !e||e==="default"?"secondary":e==="brand"?"primary":e}var ok={xs:"px-1.5 py-[2px] gap-0.5",sm:"px-2 py-1 gap-1",md:"px-3 py-1.5 gap-1.5",lg:"px-3 py-2 gap-2",xl:"px-4 py-2.5 gap-2"},nk="opacity-75 cursor-not-allowed pointer-events-none";function Fb(e){let{variant:t,size:r,isDisabled:o,isClickable:n,className:a}=e,i=r==="xs"?"text-xs":Je[r].text;return tailwindMerge.twMerge("inline-flex items-center justify-center rounded-full font-medium transition-colors","whitespace-nowrap select-none",ok[r],i,rk[t],n&&!o&&"cursor-pointer",o&&nk,a)}function jr({children:e,onRemove:t,removeLabel:r="Remove",size:o="md",variant:n="secondary",isRemovable:a=true,isDisabled:i=false,className:s,onClick:d}){let l=!!d&&!i,c=a&&t&&!i,u=x=>{x.stopPropagation(),x.preventDefault(),t&&!i&&t();},m=()=>{d&&!i&&d();},p=o==="xs"?10:o==="sm"?12:o==="md"?14:16,f=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"truncate",children:e}),c?l?jsxRuntime.jsx("span",{onClick:u,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u(x));},role:"button",tabIndex:0,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,children:jsxRuntime.jsx(H,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):jsxRuntime.jsx("button",{type:"button",onClick:u,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,tabIndex:-1,children:jsxRuntime.jsx(H,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):null]});return l?jsxRuntime.jsx("button",{type:"button",onClick:m,className:Fb({variant:Ib(n),size:o,isDisabled:i,isClickable:l,className:s}),disabled:i,children:f}):jsxRuntime.jsx("span",{className:Fb({variant:Ib(n),size:o,isDisabled:i,isClickable:l,className:s}),children:f})}function Ob({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a=false,isDisabled:i=false,isInvalid:s=false,validationResult:d,placeholder:l="Add items...",selectedItems:c=[],onItemsChange:u,staticItems:m,fetchSuggestions:p,chipVariant:g="secondary",showErrors:f=true,className:x}){let[b,y]=Ze.useState(""),[v,C]=Ze.useState([]),[w,S]=Ze.useState(false),[T,P]=Ze.useState(false),[k,M]=Ze.useState(-1),D=bn(b,300),R=Ze.useRef(null),I=Ze.useRef(null),{isFocused:E,handleFocus:O,handleBlur:W}=vr(),z=Ze.useId(),F=Ze.useCallback(N=>{if(!u||!N.trim())return;let h=N.trim();if(c.includes(h)){y(""),P(false),C([]),M(-1);return}u([...c,h]),y(""),P(false),C([]),M(-1),R.current?.focus();},[c,u]),Y=Ze.useCallback(N=>{u&&u(c.filter(h=>h!==N));},[c,u]);Ze.useEffect(()=>{if(!p)return;let N=true;return (async()=>{let L=D.trim();if(!L){N&&(S(false),C([]),P(false));return}S(true);try{let A=await p(L);if(!N)return;C(A),P(!0);}catch(A){if(!N)return;console.error("Error fetching suggestions:",A),C([]),P(false);}finally{N&&S(false);}})(),()=>{N=false;}},[D,p]),Ze.useEffect(()=>{if(p||!m)return;if(!D.trim()){C([]),P(false);return}let N=m.filter(h=>h.name.toLowerCase().includes(D.toLowerCase())).map(h=>h.id);C(N),P(N.length>0||D.trim().length>0);},[D,m,p]);let U=Ze.useMemo(()=>{let N=v.filter(h=>!c.includes(h));return b.trim()&&!N.includes(b.trim())&&!c.includes(b.trim())?[...N,`Create tag: "${b.trim()}"`]:N},[v,b,c]),V=Ze.useCallback(N=>{y(N.target.value),M(-1),N.target.value&&P(true);},[]),J=Ze.useCallback(N=>{i||(N.startsWith("Create tag:")?F(b):F(N));},[F,b,i]),G=Ze.useCallback(N=>{if(!i)switch(N.key){case "Enter":case ",":if(N.preventDefault(),k>=0&&k<U.length){let h=U[k];h.startsWith("Create tag:")?F(b):F(h);}else b.trim()&&F(b.trim());break;case "Backspace":!b&&c.length>0&&(N.preventDefault(),Y(c[c.length-1]));break;case "ArrowDown":N.preventDefault(),T&&M(h=>h<U.length-1?h+1:h);break;case "ArrowUp":N.preventDefault(),T&&M(h=>h>0?h-1:-1);break;case "Escape":P(false),M(-1);break}},[i,b,c,U,k,T,F,Y]);Ze.useEffect(()=>{let N=h=>{I.current&&h.target instanceof Node&&!I.current.contains(h.target)&&P(false);};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);let B=()=>tailwindMerge.twMerge("flex items-center gap-1.5 rounded-md overflow-x-auto overflow-y-hidden","[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",hn({isInvalid:s,isDisabled:i,isFocused:E}),"bg-background-input",o==="sm"&&"px-2 py-1 h-[32px]",o==="md"&&"px-2.5 py-1.5 h-[40px]",o==="lg"&&"px-3 py-2 h-[44px]",o==="xl"&&"px-3.5 py-2.5 h-[48px]",i&&"opacity-50 cursor-not-allowed bg-background-muted");return jsxRuntime.jsxs("div",{ref:I,className:tailwindMerge.twMerge("relative flex flex-col gap-1",x),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:B(),onClick:()=>!i&&R.current?.focus(),children:[c.map(N=>jsxRuntime.jsx(jr,{variant:g,size:"xs",onRemove:()=>Y(N),isDisabled:i,className:"shrink-0 max-h-full",children:N},N)),jsxRuntime.jsx("input",{ref:R,type:"text",role:"combobox","aria-expanded":T,"aria-haspopup":"listbox","aria-controls":z,"aria-autocomplete":"list",value:b,onChange:V,onKeyDown:G,onFocus:N=>O(N),onBlur:N=>W(N),placeholder:c.length===0?l:"",disabled:i,className:"flex-1 min-w-[120px] h-full !border-0 !outline-none !ring-0 bg-transparent text-text-primary text-sm placeholder:text-text-disabled disabled:cursor-not-allowed focus:!ring-0 focus:!outline-none focus:!border-0 focus-visible:!ring-0 focus-visible:!outline-none focus-visible:!border-0",style:{boxShadow:"none",WebkitAppearance:"none",appearance:"none",border:"none",outline:"none"}})]})}),T&&(b||U.length>0)&&jsxRuntime.jsx("div",{id:z,role:"listbox",className:tailwindMerge.twMerge("absolute z-50 mt-1 rounded-lg border border-border-default","max-h-60 overflow-auto bg-background-surface shadow-lg","left-0 right-0 top-full"),children:w?jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"Loading..."}):U.length>0?U.map((N,h)=>jsxRuntime.jsx("div",{role:"option","aria-selected":h===k,className:tailwindMerge.twMerge("cursor-pointer px-3 py-2 text-sm transition-colors","hover:bg-background-hover",h===k&&"bg-background-selected",N.startsWith("Create tag:")&&"italic text-text-secondary"),onClick:()=>J(N),children:N},N)):b&&jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"No suggestions found"})}),t&&jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}),f&&typeof r=="string"&&jsxRuntime.jsx(xe,{size:o,className:"text-feedback-error-text mt-1",children:r}),f&&typeof r=="function"&&d&&jsxRuntime.jsx(xe,{size:o,className:"text-feedback-error-text mt-1",children:r(d)})]})}var fk={json:()=>import('ace-builds/src-noconflict/mode-json'),javascript:()=>import('ace-builds/src-noconflict/mode-javascript'),typescript:()=>import('ace-builds/src-noconflict/mode-typescript'),html:()=>import('ace-builds/src-noconflict/mode-html'),css:()=>import('ace-builds/src-noconflict/mode-css'),markdown:()=>import('ace-builds/src-noconflict/mode-markdown'),yaml:()=>import('ace-builds/src-noconflict/mode-yaml'),xml:()=>import('ace-builds/src-noconflict/mode-xml'),python:()=>import('ace-builds/src-noconflict/mode-python'),sql:()=>import('ace-builds/src-noconflict/mode-sql')},gk={github:()=>import('ace-builds/src-noconflict/theme-github'),github_dark:()=>import('ace-builds/src-noconflict/theme-github_dark')},bk={"ext-language-tools":()=>import('ace-builds/src-noconflict/ext-language_tools')},ji=new Set;async function sp(e,t){ji.has(e)||(await t(),ji.add(e));}async function hk(e,t,r){await Promise.all([sp(`language:${e}`,fk[e]),sp(`theme:${t}`,gk[t]),r?sp("extension:language-tools",bk["ext-language-tools"]):void 0]);}function Hb(e,t,r){let o=ji.has(`language:${e}`)&&ji.has(`theme:${t}`);return r?o&&ji.has("extension:language-tools"):o}function Gb({value:e,readOnly:t=false,onChange:r,language:o="json",theme:n="github_dark",height:a,width:i="100%",className:s,lineHeight:d=19,minLines:l=3,maxLines:c=50,showLineNumbers:u=true,showGutter:m=true,fontSize:p=14,wrapEnabled:g=false}){let f=Ze.useRef(null),[x,b]=Ze.useState(()=>Hb(o,n,!t)),y=Ze.useMemo(()=>{if(a)return a;let v=(e.match(/\n/g)||[]).length+1;return `${Math.max(l,Math.min(v,c))*d+10}px`},[e,a,d,l,c]);return Ze.useEffect(()=>{let v=false,C=!t;return Hb(o,n,C)?(b(true),()=>{v=true;}):(b(false),hk(o,n,C).then(()=>{v||b(true);}).catch(w=>{v||b(true),console.error("Failed to load Ace editor resources",w);}),()=>{v=true;})},[o,t,n]),Ze.useEffect(()=>{x&&f.current?.editor&&f.current.editor.resize();},[y,x]),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden rounded-md border border-border-input",s),style:{width:i,height:y},children:x?jsxRuntime.jsx(pk__default.default,{ref:f,mode:o,theme:n,value:e,onChange:r,readOnly:t,width:"100%",height:"100%",fontSize:p,showPrintMargin:false,showGutter:m,highlightActiveLine:!t,setOptions:{useWorker:true,showLineNumbers:u,tabSize:2,enableBasicAutocompletion:!t,enableLiveAutocompletion:!t,enableSnippets:!t,showFoldWidgets:true,wrap:g},editorProps:{$blockScrolling:true}}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-muted text-foreground-muted",children:"Loading editor\u2026"})})}var Ub=Ze__namespace.createContext({variant:"contained",density:"comfortable",showDividers:true}),Kb=Ze__namespace.createContext(null),Sk={contained:"rounded-lg border border-border-default bg-background-surface overflow-hidden",bordered:"rounded-lg border border-border-default bg-background-surface",plain:"bg-transparent"},Wb={true:"divide-y divide-border-default",false:"gap-3"},wk={comfortable:"px-5 py-3",compact:"px-4 py-2.5"},Nk={comfortable:"px-5 pt-0",compact:"px-4 pt-0"},Tk={comfortable:"h-4 w-4",compact:"h-3.5 w-3.5"};function up(){return Ze__namespace.useContext(Ub)}function kk(e){let t=Ze__namespace.useContext(Kb);if(!t)throw new Error(`${e} must be used within a <CollapseItem>`);return t}function Pk({variant:e,showDividers:t,className:r}){let o="group/collapse-item w-full transition-colors",n={contained:"bg-background-surface",bordered:"bg-background-surface",plain:"bg-transparent"},a=t?"":"rounded-lg border border-border-default bg-background-surface overflow-hidden";return tailwindMerge.twMerge(o,n[e],a,r)}function Rk({isDisabled:e,isPressed:t,density:r,variant:o,showDividers:n,className:a}){let i="group/collapse-header flex w-full items-start gap-4 text-left transition-colors duration-150",s=e?"cursor-not-allowed text-text-disabled":"cursor-pointer text-text-primary",d=t&&!e?"bg-background-hover":"",l=wk[r];return tailwindMerge.twMerge(i,ot(),l,s,d,o==="plain"&&n?"px-0":"",a)}function Mk({density:e,showDividers:t,className:r}){let o="text-text-primary",n=Nk[e];return tailwindMerge.twMerge(o,n,t?"":"rounded-b-lg",r)}function ri({variant:e="contained",density:t="comfortable",showDividers:r=true,className:o,...n}){let a=Ze__namespace.useMemo(()=>({variant:e,density:t,showDividers:r}),[e,t,r]),i=tailwindMerge.twMerge("flex w-full flex-col",Sk[e],r?Wb.true:Wb.false,e==="plain"&&r?"border-y border-border-default/60":"");return jsxRuntime.jsx(Ub.Provider,{value:a,children:jsxRuntime.jsx(reactAriaComponents.DisclosureGroup,{...n,className:Ie(o,i)})})}function Sn({className:e,children:t,...r}){let{variant:o,showDividers:n}=up();return jsxRuntime.jsx(reactAriaComponents.Disclosure,{...r,className:reactAriaComponents.composeRenderProps(e,a=>Pk({variant:o,showDividers:n,className:a})),children:a=>jsxRuntime.jsx(Kb.Provider,{value:a,children:t})})}Sn.displayName="CollapseItem";function wn({title:e,description:t,startContent:r,endContent:o,indicator:n,indicatorPosition:a="end",showIndicator:i=true,keepIndicatorSpace:s=false,children:d,className:l,...c}){let u=kk("CollapseHeader"),{density:m,variant:p,showDividers:g}=up(),f=Tk[m];return jsxRuntime.jsx(reactAriaComponents.Button,{...c,slot:"trigger","data-expanded":u.isExpanded?"true":void 0,className:reactAriaComponents.composeRenderProps(l,(x,b)=>Rk({isDisabled:b.isDisabled??false,isPressed:b.isPressed??false,density:m,variant:p,showDividers:g,className:x})),children:x=>{let b=x.isDisabled??false,y=i?typeof n=="function"?n({isExpanded:u.isExpanded,isDisabled:b}):n??jsxRuntime.jsx(H,{name:"CaretDown",size:m==="compact"?"xs":"sm",weight:"bold","aria-hidden":"true",className:tailwindMerge.twMerge("text-text-secondary transition-transform duration-200",u.isExpanded?"rotate-180":"rotate-0")}):null,v=y?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center text-text-secondary",f),"aria-hidden":"true",children:y}):s?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center",f),"aria-hidden":"true"}):null;return jsxRuntime.jsxs("div",{className:"flex w-full items-center gap-4",children:[a==="start"&&v,r&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-text-secondary",children:r}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[d??jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 text-left",children:[e&&jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:e}),t&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-sm text-text-secondary",children:o})]}),a==="end"&&v]})}})}wn.displayName="CollapseHeader";function Nn({className:e,children:t,...r}){let{density:o,showDividers:n}=up();return jsxRuntime.jsx(reactAriaComponents.DisclosurePanel,{...r,className:reactAriaComponents.composeRenderProps(e,a=>Mk({density:o,showDividers:n,className:a})),children:jsxRuntime.jsx(mn,{children:t})})}Nn.displayName="CollapseContent";function oi(e){if(!e)return false;let t=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t)}function mp(e){if(!e)return "";let t=e.startsWith("#")?e.slice(1):e;return t.length===3&&(t=t.split("").map(r=>r+r).join("")),`#${t.toUpperCase()}`}function Ak({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,className:s,validationResult:d,value:l,defaultValue:c,onChange:u,placeholder:m="#000000",showColorSwatch:p=true,reserveErrorSpace:g=true,...f}){let[x,b]=Ze.useState(c||""),[y,v]=Ze.useState(l||c||""),[C,w]=Ze.useState(false),[S,T]=Ze.useState(null),{isFocused:P,handleFocus:k,handleBlur:M}=vr(),D=l!==void 0?l:x;Ze.useEffect(()=>{l!==void 0&&v(l);},[l]);let R=D?!oi(D):false,I=Ze.useCallback(W=>{if(v(W),oi(W)){let z=mp(W);u?u(z):b(z);}else W===""&&(u?u(""):b(""));},[u]),E=Ze.useCallback(W=>{let z=mp(W);v(z),u?u(z):b(z);},[u]),O=Ze.useCallback(W=>{if(oi(y)){let z=mp(y);v(z),u&&z!==D?u(z):!u&&z!==x&&b(z);}M(W,f.onBlur);},[y,D,x,u,M,f.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Ie(s,"group flex flex-col"),children:({isDisabled:W})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(Cl,{size:o,disabled:W,type:"text",value:y,placeholder:m,onFocus:z=>k(z,f.onFocus),onBlur:O,onChange:z=>I(z.target.value),className:tailwindMerge.twMerge(Yt({isInvalid:R,isDisabled:W,isFocused:P,size:o,transparent:i}),p?"pr-12":"pr-3","pl-3")}),p&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:Je[o].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",oi(D)?"border-border-default":"border-border-default bg-background-muted"),style:oi(D)?{backgroundColor:D}:void 0,"aria-hidden":"true",children:!oi(D)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:T,children:jsxRuntime.jsx(re,{variant:"secondary",size:o,icon:"Palette",onPress:()=>w(!C),isDisabled:W,className:"flex-shrink-0",children:"Pick"})})]})}),g?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&d?jsxRuntime.jsx(xe,{size:o,children:r(d)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&d?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(d)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null}),C&&S&&jsxRuntime.jsx(St,{triggerRef:{current:S},isOpen:C,onOpenChange:w,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:D||"#000000",onChange:E,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:D||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-primary text-[length:var(--control-text-sm)] font-mono",children:D||"#000000"})]})]})})]})})}function Xb({isOpen:e,onClose:t,onConfirm:r,title:o,message:n,confirmLabel:a="Confirm",cancelLabel:i="Cancel",confirmVariant:s,isDestructive:d=false,isLoading:l=false,maxWidth:c="500px",minWidth:u="400px"}){return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:o,maxWidth:c,minWidth:u,primaryAction:{label:a,onPress:()=>{r();},variant:s??(d?"destructive":"primary"),isLoading:l},secondaryAction:{label:i,onPress:t,variant:"secondary",isDisabled:l},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:n})})}function qb({isConnected:e,connectedAt:t,disconnectedAt:r,showTimestamp:o=false,isLoading:n,size:a="sm",shape:i="pill",...s}){if(n)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let d=e?"Connected":"Disconnected",l=e?"success":"neutral",c=null;if(o){if(e&&t)c=tl(t);else if(!e&&r){let u=tl(r);c=u?`Offline ${u}`:null;}}return jsxRuntime.jsxs("div",{className:"inline-flex flex-col gap-1",children:[jsxRuntime.jsx(gt,{variant:l,size:a,shape:i,dot:e,dotPulse:e,...s,children:d}),c&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:c})]})}function jb({firstName:e,lastName:t,email:r,phone:o,avatarUrl:n,href:a,LinkComponent:i,variant:s="outlined",layout:d="horizontal",showEmail:l=true,showPhone:c=false,isLoading:u=false,className:m,contentClassName:p,piiEntity:g}){let f=`${e} ${t}`.trim(),x=({children:y,className:v})=>a?i?jsxRuntime.jsx(i,{href:a,className:v,children:y}):jsxRuntime.jsx(pt,{href:a,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",v),asButton:false,children:y}):jsxRuntime.jsx("span",{className:v,children:y}),b=d==="vertical";return u?jsxRuntime.jsx(_e,{variant:s,className:tailwindMerge.twMerge("flex flex-col",m),children:jsxRuntime.jsx(_e.Content,{className:"flex items-center flex-1",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",b?"flex flex-col items-center gap-4":"flex items-center gap-4"),children:[jsxRuntime.jsx(q,{width:56,height:56,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(b?"w-full text-center":"flex-1","space-y-2"),children:[jsxRuntime.jsx(q,{width:"70%",height:20,className:tailwindMerge.twMerge(b&&"mx-auto")}),jsxRuntime.jsx(q,{width:"100%",height:16,className:tailwindMerge.twMerge(b&&"mx-auto")})]})]})})}):jsxRuntime.jsx(_e,{variant:s,className:tailwindMerge.twMerge("group/card flex flex-col",m),children:jsxRuntime.jsx(_e.Content,{className:tailwindMerge.twMerge("flex items-center flex-1",a&&"cursor-pointer",p),children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full",b?"flex flex-col items-center gap-4 text-center":"flex items-center gap-4"),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:n,size:"xl",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:g}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(b?"w-full":"flex-1 min-w-0"),children:[a&&jsxRuntime.jsx(x,{className:"after:absolute after:inset-0",children:jsxRuntime.jsx("span",{className:"sr-only",children:f})}),jsxRuntime.jsx("span",{className:"text-lg font-semibold leading-tight text-text-primary block mb-1.5 group-hover/card:text-text-brand transition-colors","data-pii-type":g?"full-name":void 0,"data-pii-entity":g,children:f}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-0.5",b&&"flex flex-col items-center"),children:[l&&r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Envelope",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`mailto:${r}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",b?"":"truncate"),"data-pii-type":g?"email":void 0,"data-pii-entity":g,children:r})]}),c&&o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Phone",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`tel:${o}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",b?"":"truncate"),"data-pii-type":g?"phone":void 0,"data-pii-entity":g,children:Wa(o)})]})]})]})]})})})}function Al({firstName:e,lastName:t,email:r,avatarUrl:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:l="normal",showEmail:c=false,badge:u,avatarShape:m,isLoading:p=false,className:g,piiEntity:f}){let x=m??(n==="inline"?"circle":"square"),y={xs:{avatarSize:"xs",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonAvatar:24,skeletonText:80,skeletonSecondary:60},sm:{avatarSize:"sm",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonAvatar:32,skeletonText:96,skeletonSecondary:72},md:{avatarSize:"md",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonAvatar:40,skeletonText:128,skeletonSecondary:96},lg:{avatarSize:"lg",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonAvatar:48,skeletonText:160,skeletonSecondary:120}}[a],v=`${e} ${t}`.trim(),w={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[l],S=({children:T,className:P})=>i?s?jsxRuntime.jsx(s,{href:i,className:P,children:T}):jsxRuntime.jsx(pt,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",P),asButton:false,children:T}):jsxRuntime.jsx("span",{className:P,children:T});return p?n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsx(q,{width:y.skeletonAvatar,height:y.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsx(q,{width:y.skeletonText,height:y.skeletonAvatar*.5})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsx(q,{width:y.skeletonAvatar,height:y.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:y.skeletonText,height:16}),c&&jsxRuntime.jsx(q,{width:y.skeletonSecondary,height:12})]})]}):n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsxs(S,{className:tailwindMerge.twMerge("flex items-center",y.gap),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:o,size:y.avatarSize,variant:"user",shape:x,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,y.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":f?"full-name":void 0,"data-pii-entity":f,children:v})]}),u]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",y.gap,g),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:o,size:y.avatarSize,variant:"user",shape:x,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(S,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,y.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"full-name":void 0,"data-pii-entity":f,children:v})}),u]}),c&&r&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",y.secondaryTextSize),"data-pii-type":f?"email":void 0,"data-pii-entity":f,children:r})]})]})}var gp=Ze.createContext(null);function Qb(e){let t=Ze.useContext(gp),r=Ze.useRef(null),o=e??r,[n,a]=Ze.useState(()=>t||{current:"xl",isSm:true,isMd:true,isLg:true,isXl:true,is2Xl:false,isMobile:false,isDesktop:true});return Ze.useEffect(()=>{if(t){a(t);return}let i=o.current;if(!i||typeof ResizeObserver>"u")return;let s=()=>{let l=i.offsetWidth,c=l>=640,u=l>=768,m=l>=1024,p=l>=1280,g=l>=1536,f="base";g?f="2xl":p?f="xl":m?f="lg":u?f="md":c&&(f="sm"),a({current:f,isSm:c,isMd:u,isLg:m,isXl:p,is2Xl:g,isMobile:!u,isDesktop:u});};s();let d=new ResizeObserver(s);return d.observe(i),()=>d.disconnect()},[t,o]),n}function _b({children:e,className:t}){let r=Ze.useRef(null),[o,n]=Ze.useState({current:"base",isSm:false,isMd:false,isLg:false,isXl:false,is2Xl:false,isMobile:true,isDesktop:false});return Ze.useEffect(()=>{let a=r.current;if(!a||typeof ResizeObserver>"u")return;let i=()=>{let d=a.offsetWidth,l=d>=640,c=d>=768,u=d>=1024,m=d>=1280,p=d>=1536,g="base";p?g="2xl":m?g="xl":u?g="lg":c?g="md":l&&(g="sm"),n({current:g,isSm:l,isMd:c,isLg:u,isXl:m,is2Xl:p,isMobile:!c,isDesktop:c});};i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[]),jsxRuntime.jsx(gp.Provider,{value:o,children:jsxRuntime.jsx("div",{ref:r,className:t,style:{width:"100%"},children:e})})}var Il={duration:.5,ease:"easeInOut"},Qr=Ze.createContext(null);function Fl(){let e=Ze.useRef({played:false});return Ze.useEffect(()=>{e.current.played=true;},[]),e.current}var ta=()=>{let e=Ze.useContext(Qr);if(!e)throw new Error("useChartContext must be used within a ChartContextProvider");return e};function Bl(e,t){if(t<=0||e.length<2)return e;let r=[e[0]];for(let o=1;o<e.length;o++)e[o].xValue.getTime()-e[o-1].xValue.getTime()>t&&r.push(null),r.push(e[o]);return r}var kn=({data:e,color:t="var(--color-viz-default)",baseline:r,fillOpacity:o=.1,showLine:n=true,maxGapMs:a,animate:i=true})=>{let s=Ze.useId(),d=Ze.useId(),{xScale:l,yScale:c,animationSettings:u,entrance:m}=ta(),[p]=Ze__namespace.default.useState(()=>m?.played!==true),g=i&&p,f=l.range(),x=c.range(),b=(T,P)=>typeof r=="function"?r(T,P):r??0,y=T=>T.chartYValue??T.yValue,v=a!=null?Bl(e,a):e,C=i?void 0:"non-scaling-stroke",w={transformOrigin:`0 ${x[0]}px`,transformBox:"fill-box",isolation:"isolate"},S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r===void 0?jsxRuntime.jsx(shape.AreaClosed,{data:v,x:T=>T?l(T.xValue):0,y:T=>T?c(y(T)):0,yScale:c,defined:T=>T!=null,fill:`url(#${s})`,curve:curve.curveLinear}):jsxRuntime.jsx(shape.Area,{data:v,x:T=>T?l(T.xValue):0,y0:(T,P)=>T?c(b(T,P)):0,y1:T=>T?c(y(T)):0,defined:T=>T!=null,fill:t,fillOpacity:o,curve:curve.curveLinear}),n?jsxRuntime.jsx(shape.LinePath,{data:v,x:T=>T?l(T.xValue):0,y:T=>T?c(y(T)):0,defined:T=>T!=null,stroke:t,strokeWidth:3,vectorEffect:C,curve:curve.curveLinear}):null]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:s,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"50%",stopColor:t,stopOpacity:o}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]}),g&&jsxRuntime.jsx("clipPath",{id:d,children:jsxRuntime.jsx("rect",{x:f[0],y:x[1],width:f[1]-f[0],height:x[0]-x[1]})})]}),g?jsxRuntime.jsx("g",{clipPath:`url(#${d})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:u.duration,ease:u.ease},style:w,children:S})}):jsxRuntime.jsx("g",{style:w,children:S})]})};var Ol=({data:e,color:t="var(--color-viz-default)",opacity:r=1,categoryColors:o={}})=>{let{xScale:n,yScale:a,animationSettings:i}=ta(),s=Ze.useId(),d=n.range(),l=a.range(),c=[...e].sort((p,g)=>p.xValue.getTime()-g.xValue.getTime());if(c.length===0)return null;let u=c.length>1?c[1].xValue.getTime()-c[0].xValue.getTime():15*6e4,m=Math.abs(n(new Date(c[0].xValue.getTime()+u))-n(c[0].xValue));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:s,children:jsxRuntime.jsx("rect",{x:d[0],y:l[1],width:d[1]-d[0],height:l[0]-l[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${s})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:i.duration,ease:i.ease},style:{transformOrigin:`0 ${a(0)}px`,isolation:"isolate"},children:c.map((p,g)=>{let f=n(p.xValue),x=p.chartYValue??p.yValue,b=p.baselineValue??0,y=a(x),v=a(b),C=Math.min(y,v),w=Math.abs(y-v),S=c[g+1],T=S?Math.abs(n(S.xValue)-f):m,P=p.category&&o[p.category]?o[p.category]:t;return jsxRuntime.jsx(shape.Bar,{x:f-T/2,y:C,width:T,height:w,fill:P,opacity:r,rx:1},p.xValue.getTime())})})})]})};function nP(e,t){return e.length*(t*.6)}var ra;function aP(){if(ra!==void 0)return ra;if(typeof window>"u"||typeof document>"u")return ra=null,ra;try{ra=document.createElement("canvas").getContext("2d");}catch{ra=null;}return ra}function zl(e,t=12,r="system-ui"){let o=aP();return o?(o.font=`${t}px ${r}`,o.measureText(e).width):nP(e,t)}function Pn(e,t=12,r="system-ui"){return e.length===0?0:Math.max(...e.map(o=>zl(o,t,r)))}function th(e,t,r=12,o="system-ui"){if(t<=0)return "";if(zl(e,r,o)<=t)return e;let n="\u2026";if(zl(n,r,o)>t)return "";let a=0,i=e.length;for(;a<i;){let s=Math.ceil((a+i)/2);zl(e.slice(0,s)+n,r,o)<=t?a=s:i=s-1;}return e.slice(0,a)+n}var Hl=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function dP(e){return e>=1e9?"GW":e>=1e6?"MW":e>=1e3?"kW":"W"}function uP(e){return e>=1e3?"kA":e<1?"mA":"A"}function pP(e){return e>=1e3?"kV":e<1?"mV":"V"}function mP(e){return e>=1e6?"M\u03A9":e>=1e3?"k\u03A9":e<1?"m\u03A9":"\u03A9"}function ai(e,t){if(typeof e!="object"||e===null)return e;switch(e.type){case "energy":{if(e.unit||e.autoScale===false)return e;let r=e.sourceUnit?iu[e.sourceUnit]:1;return {...e,unit:au(t*r)}}case "power":return e.unit||e.autoScale===false?e:{...e,unit:dP(t)};case "current":return e.unit||e.autoScale===false?e:{...e,unit:uP(t)};case "voltage":return e.unit||e.autoScale===false?e:{...e,unit:pP(t)};case "resistance":return e.unit||e.autoScale===false?e:{...e,unit:mP(t)};default:return e}}var fP=e=>e.baselineValue??0,Ye={top:8,right:0,bottom:50,left:60};function Or(e={type:"number"}){let t=i=>{if(i==null)return "-";let s=yo({value:i,formatter:e});if(s===null)return "-";if(typeof s=="string")return s;if(typeof s=="number")return s.toString();if(typeof s=="object"&&s!==null&&"props"in s){let d=c=>{if(c==null)return "";if(typeof c=="string")return c;if(typeof c=="number")return c.toString();if(typeof c=="object"&&"props"in c){let u=c.props;if(u?.children)return Array.isArray(u.children)?u.children.map(d).join(""):d(u.children)}return ""};return d(s)||i.toString()}return i.toString()},r=i=>{if(i==null)return "-";if(typeof e=="string"){let s=yo({value:i,formatter:e});return s===null?"-":String(s)}if(typeof e=="object"&&e.type)switch(e.type){case "energy":case "power":case "voltage":case "current":case "resistance":case "temperature":case "distance":return t(i);case "currency":return t(i);default:return t(i)}return t(i)},o,n,a;return typeof e=="object"&&e.type&&e.type==="number"&&("min"in e&&(o=e.min),"max"in e&&(n=e.max)),{format:t,tickFormat:r,min:o,max:n,tickInterval:a}}var hp=(e,t)=>{let r=d3Array.extent(e,o=>o.xValue);return scale.scaleTime({range:[Ye.left,t-Ye.right],domain:r,nice:true})},Zi=(e,t,r,o)=>{let n=Or(r);if(o)return scale.scaleLinear({range:[t-Ye.bottom,Ye.top],domain:o,nice:true});let a=d3Array.min(e,l=>Math.min(l.yValue,l.chartYValue??l.yValue,l.baselineValue??l.yValue))||0,i=d3Array.max(e,l=>Math.max(l.yValue,l.chartYValue??l.yValue,l.baselineValue??l.yValue))||0,s=n.min!==void 0?n.min:a>=0?0:a*1.1,d=n.max!==void 0?n.max:i<=0?0:i*1.1;return scale.scaleLinear({range:[t-Ye.bottom,Ye.top],domain:[s,d],nice:true})};function _i(e){return e instanceof Date&&!Number.isNaN(e.getTime())}var $i=12;function gP(e,t,r=12,o=false){if(!_i(t[0])||!_i(t[1]))return console.warn("ChartAxis: Invalid date in domain, skipping tick calculation"),[];let n=t[0].getTime(),a=t[1].getTime(),i=a-n;if(i===0||i<1e3)return [t[0]];let s=yu({start:t[0],end:t[1]},{compact:o}),l=[t[0],new Date((t[0].getTime()+t[1].getTime())/2),t[1]].map(y=>s(y)),c=Pn(l,r),m=c+c,p=Math.floor(e/m),g=Math.max(2,Math.min(8,p));if(g<=2)return [t[0],t[1]];let f=[t[0]],x=i/36e5,b;x<=1?b=6e4:x<=6?b=5*6e4:x<=48?b=60*6e4:x<=168?b=360*6e4:b=1440*6e4;for(let y=1;y<g-1;y++){let v=y/(g-1),C=n+i*v,w=Math.round(C/b)*b,S=f[f.length-1].getTime(),T=w>S?w:S+b;if(T>=a)break;f.push(new Date(T));}return f.push(t[1]),f}var bP=({top:e,scale:t,width:r})=>{let o=t.domain(),n=[o[0],o[o.length-1]],a=_i(n[0])&&_i(n[1]),i=r<400,s=a?n[0].getTime():0,d=a?n[1].getTime():0,l=Ze.useMemo(()=>a?yu({start:n[0],end:n[1]},{compact:i}):()=>"",[s,d,i,a]),c=Ze.useMemo(()=>gP(r,n,12,i),[r,s,d,i]);return c.length===0?null:jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,tickValues:c,tickFormat:u=>{let m=u;return _i(m)?l(m):""},stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:(u,m,p)=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:m===0?"start":m===p.length-1?"end":"middle"}),rangePadding:0})};function ii(e,t=12){let r=t*2.5,o=Math.floor(e/r);return Math.max(2,Math.min(6,o))}var xp=12,hP=({left:e,scale:t,yFormatter:r,height:o})=>{let n=Or(r),a=Ze.useMemo(()=>!o||o<=0?5:ii(o),[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:i=>{let s={fill:"var(--color-text-secondary)",fontSize:xp,textAnchor:"end"},d=t(i),[l,c]=t.range(),u=Math.min(l,c),m=Math.max(l,c);return d-u<xp/2?{...s,verticalAnchor:"start"}:m-d<xp/2?{...s,verticalAnchor:"end"}:{...s,dy:"0.33em"}}})},xP=({top:e,scale:t})=>jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})}),yP=({left:e,scale:t,availableWidth:r})=>jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickFormat:r===void 0?void 0:o=>th(String(o),r,$i),tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:$i,textAnchor:"end",dx:"-0.25em",dy:"0.33em"})}),vP=({top:e,scale:t,yFormatter:r,width:o})=>{let n=Or(r),a=Ze.useMemo(()=>{if(!o||o<=0)return 5;let s=Math.floor(o/60);return Math.max(2,Math.min(8,s))},[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})})},Zr={Bottom:bP,Left:hP,CategoryBottom:xP,CategoryLeft:yP,NumericBottom:vP};var ko=({data:e,formatter:t,label:r,categoryLabels:o})=>{let n=Ze__namespace.default.useContext(Qr),a=o??n?.categoryLabels,i=n?.xScale,s=n?.width,d=n?.height,l=Or(t),c=y=>{if(y.baselineValue===void 0)return l.format(y.value);let v=Math.min(y.baselineValue,y.value),C=Math.max(y.baselineValue,y.value);return `${l.format(v)} \u2013 ${l.format(C)}`},u=Ze__namespace.default.useRef(null),[m,p]=Ze__namespace.default.useState({x:0,y:0,translate:"translate(-50%, -100%)"});if(Ze__namespace.default.useEffect(()=>{if(!e||!u.current)return;let v=u.current.getBoundingClientRect(),C=s??window.innerWidth,w=d??window.innerHeight,S=e.x,T=e.y,P=16,k=e.x+v.width+P<=C,M=e.x-v.width-P>=0,D;e.position==="left"?D=M||!k:D=!k&&M;let R=D?"translate(calc(-100% - 16px), -50%)":"translate(16px, -50%)";if(!k&&!M){let I=C-e.x,E=e.x;I<=E?(S=C,R="translate(-100%, -50%)"):(S=0,R="translate(0, -50%)");}T-v.height/2<0?T=v.height/2:T+v.height/2>w&&(T=w-v.height/2),p({x:S,y:T,translate:R});},[e?.x,e?.y,e?.position,s,d]),!e)return null;let g=i?.domain(),x=g&&g.length===2&&g.every(y=>y instanceof Date)?vg({start:g[0],end:g[1]}):null,b=r||(x&&e.xValue instanceof Date?x(e.xValue):String(e.xValue));return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsxs(framerMotion.motion.div,{ref:u,role:"tooltip","aria-live":"polite",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"data-testid":"tooltip",className:"pointer-events-none absolute z-50 rounded-lg bg-background-surface p-4 text-sm shadow-xl ring-1 ring-border-default whitespace-nowrap",style:{left:m.x,top:m.y,transform:m.translate},children:[jsxRuntime.jsx("div",{className:"mb-1 font-medium text-text-primary",children:b}),e.isEvent?jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.series.length>1&&jsxRuntime.jsx("ul",{className:"list-none p-0 border-b border-border-default pb-2",children:e.series.slice(0,-1).map(y=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[y.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:c(y)})]}),y.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:y.categoryColor||y.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[y.category]||y.category})]}),y.extraTooltipRows&&y.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:y.extraTooltipRows.map(v=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:v.value})]},v.label))})]},y.label))}),(()=>{let y=e.series[e.series.length-1],v=e.eventItems?.length?e.eventItems:[{label:y.label,color:y.color,metadata:e.eventMetadata}];return jsxRuntime.jsx("div",{className:"space-y-2",children:v.map((C,w)=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:C.color}}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:C.label})]}),C.metadata&&Object.keys(C.metadata).length>0&&jsxRuntime.jsx("div",{className:"ml-4 mt-1 space-y-0.5 text-xs text-text-secondary",children:Object.entries(C.metadata).map(([S,T])=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"capitalize",children:[S,":"]}),jsxRuntime.jsx("span",{className:"font-medium",children:T})]},S))})]},`${C.label}-${w}`))})})()]}):jsxRuntime.jsx("ul",{className:"list-none p-0",children:e.series.map(y=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[y.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:c(y)})]}),y.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:y.categoryColor||y.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[y.category]||y.category})]}),y.extraTooltipRows&&y.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:y.extraTooltipRows.map(v=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:v.value})]},v.label))})]},y.label))})]})})};var lh={top:20,right:20,bottom:50,left:60},ph=12,RP=.4,ch=60;function MP({margin:e,orientation:t,labelsKey:r,width:o}){return Ze.useMemo(()=>{if(e)return e;if(t!=="horizontal")return lh;let n=Pn(r.split("\0"),$i,"system-ui"),a=Math.max(ch,Math.floor(o*RP)),i=Math.ceil(n)+ph;return {...lh,left:Math.min(Math.max(i,ch),a)}},[e,t,r,o])}var mh=({data:e,width:t,height:r,margin:o,color:n,yFormatter:a={type:"number"},showGrid:i=true,showAxes:s=true,animate:d=true,barRadius:l=4,barPadding:c=.3,onBarClick:u,onBarHover:m,activeIndex:p,className:g,style:f,"aria-label":x,orientation:b="horizontal",showTooltip:y=true})=>{let[v,C]=Ze.useState(null),[w,S]=Ze.useState(null),[T,P]=Ze.useState(null),[k,M]=Ze.useState(t??600),[D,R]=Ze.useState(r??300),I=Ze.useRef(null),E=p??v,O=Ze.useId(),W=n||"var(--color-viz-default)";Ze.useEffect(()=>{if(t!==void 0&&r!==void 0){M(t),R(r);return}if(!I.current)return;let N=new ResizeObserver(h=>{for(let L of h)t===void 0&&M(L.contentRect.width),r===void 0&&R(L.contentRect.height);});return N.observe(I.current),t===void 0&&M(I.current.offsetWidth),r===void 0&&R(I.current.offsetHeight||300),()=>{N.disconnect();}},[t,r]);let z=e.map(N=>N.label).join("\0"),F=MP({margin:o,orientation:b,labelsKey:z,width:k}),Y=Math.max(0,F.left-ph),{xScale:U,yScale:V,innerWidth:J,innerHeight:G}=Ze.useMemo(()=>{let N=k-F.left-F.right,h=D-F.top-F.bottom;if(b==="horizontal"){let A=d3Array.max(e,j=>j.value)||0;return {xScale:scale.scaleLinear({range:[0,N],domain:[0,A*1.1],nice:true}),yScale:scale.scaleBand({range:[0,h],domain:e.map(j=>j.label),padding:c}),innerWidth:N,innerHeight:h}}let L=d3Array.max(e,A=>A.value)||0;return {xScale:scale.scaleBand({range:[0,N],domain:e.map(A=>A.label),padding:c}),yScale:scale.scaleLinear({range:[h,0],domain:[0,L*1.1],nice:true}),innerWidth:N,innerHeight:h}},[e,k,D,F,c,b]);if(e.length===0)return jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:r!==void 0?{height:r,...f}:f,children:"No data available"});let B=(N,h)=>{if(C(N),m?.(h,N),N!==null&&h){let L,A;if(b==="horizontal"){let ae=U(h.value),_=V(h.label)||0,ee=V.bandwidth();L=F.left+ae,A=F.top+_+ee/2;}else {let ae=U,_=V,ee=ae(h.label)??0,ie=ae.bandwidth(),Ee=_(h.value);L=F.left+ee+ie/2,A=F.top+Ee;}let j=L>k/2;P(h.label),S({xValue:new Date,series:[{label:"Value",value:h.value,color:h.color||W}],x:L,y:A,position:j?"left":"right"});}else S(null),P(null);};return jsxRuntime.jsxs("div",{ref:I,className:tailwindMerge.twMerge("relative h-full w-full overflow-hidden rounded-lg bg-background-surface",g),style:r!==void 0?{height:r,...f}:f,"aria-label":x,role:"img",children:[jsxRuntime.jsxs("svg",{width:k,height:D,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx(gradient.LinearGradient,{id:`${O}-bar`,from:W,to:W,toOpacity:.85})}),jsxRuntime.jsxs(group.Group,{left:F.left,top:F.top,children:[i&&jsxRuntime.jsx("g",{className:"grid-lines",children:(b==="horizontal"?U.ticks(5):V.ticks(5)).map(N=>{let h=b==="horizontal"?0:V(N),L=b==="horizontal"?U(N):0;return jsxRuntime.jsx("line",{x1:b==="horizontal"?L:0,y1:b==="horizontal"?0:h,x2:b==="horizontal"?L:J,y2:b==="horizontal"?G:h,stroke:"var(--color-border-default)",strokeOpacity:.5,strokeDasharray:"2,3"},N)})}),e.map((N,h)=>{let L=E===h||E==null,A=N.color||`url(#${O}-bar)`;if(b==="horizontal"){let le=U(N.value),ge=V.bandwidth(),ce=V(N.label)||0;return jsxRuntime.jsx(framerMotion.motion.rect,{x:0,y:ce,width:le,height:ge,fill:A,rx:l,ry:l,initial:d?{width:0,opacity:.5}:void 0,animate:{width:le,opacity:L?1:.5},transition:{duration:.5,delay:h*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:u||m?"pointer":"default"},onMouseEnter:()=>B(h,N),onMouseLeave:()=>B(null,null),onClick:()=>u?.(N,h)},N.label)}let j=U,ae=V,_=j.bandwidth(),ee=j(N.label)??0,ie=ae(N.value),Ee=Math.max(0,G-ie);return d?jsxRuntime.jsx(framerMotion.motion.rect,{x:ee,width:_,fill:A,rx:l,ry:l,initial:{y:G,height:0,opacity:.5},animate:{y:ie,height:Ee,opacity:L?1:.5},transition:{duration:.5,delay:h*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:u||m?"pointer":"default"},onMouseEnter:()=>B(h,N),onMouseLeave:()=>B(null,null),onClick:()=>u?.(N,h)},N.label):jsxRuntime.jsx("rect",{x:ee,y:ie,width:_,height:Ee,fill:A,rx:l,ry:l,opacity:L?1:.5,style:{cursor:u||m?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>B(h,N),onMouseLeave:()=>B(null,null),onClick:()=>u?.(N,h)},N.label)}),s&&b==="vertical"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Zr.CategoryBottom,{top:G,scale:U}),jsxRuntime.jsx(Zr.Left,{left:0,scale:V,yFormatter:a,height:G})]}),s&&b==="horizontal"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Zr.NumericBottom,{top:G,scale:U,yFormatter:a,width:J}),jsxRuntime.jsx(Zr.CategoryLeft,{left:0,scale:V,availableWidth:Y})]})]})]}),y&&jsxRuntime.jsx(ko,{data:w,formatter:a,label:T??void 0})]})};var fh=({item:e,onToggle:t})=>{let r=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-3 w-3 shrink-0",style:{backgroundColor:e.fill,borderRadius:"1px",opacity:e.isHidden?.35:1}}),jsxRuntime.jsx("span",{className:`text-sm whitespace-nowrap ${e.isHidden?"text-text-disabled line-through":"text-text-secondary"}`,children:e.category})]});return t?jsxRuntime.jsx("button",{type:"button",className:"flex items-center gap-2 shrink-0 rounded-sm focus:outline-none focus:ring-2 focus:ring-border-focus disabled:cursor-not-allowed disabled:opacity-60","aria-pressed":!e.isHidden,"aria-label":`${e.isHidden?"Show":"Hide"} ${e.category}`,disabled:e.isDisabled,onClick:()=>t(e.category),children:r}):jsxRuntime.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})},DP=({items:e,onToggle:t})=>e.length===0?null:jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:e.map(r=>jsxRuntime.jsx(fh,{item:r,onToggle:t},r.category))}),li=({items:e,onExport:t,marginLeft:r=0,marginRight:o=0,isZoomed:n=false,onResetZoom:a,onLegendItemToggle:i})=>{let[s,d]=Ze__namespace.default.useState(false),[l,c]=Ze__namespace.default.useState(null),[u,m]=Ze__namespace.default.useState(false),[p,g]=Ze__namespace.default.useState(false),f=Ze__namespace.default.useCallback(async b=>{d(true),c(b),g(false);try{await t(b);}catch(y){console.error("Export failed:",y);}finally{d(false),c(null);}},[t]),x=Ze__namespace.default.useCallback(async b=>{await f(b);},[f]);return jsxRuntime.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 min-h-[32px]",style:{marginLeft:r,marginRight:o},children:[jsxRuntime.jsx("div",{className:"hidden sm:block flex-1 min-w-0",children:jsxRuntime.jsx(DP,{items:e,onToggle:i})}),jsxRuntime.jsx("div",{className:"sm:hidden flex items-center gap-3",children:e.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>m(true),className:"text-sm text-text-secondary hover:text-text-primary transition-colors underline decoration-dotted underline-offset-4",children:"Legend"}),jsxRuntime.jsx(wt,{isOpen:u,onClose:()=>m(false),title:"Legend",children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-3 p-4",children:e.map(b=>jsxRuntime.jsx(fh,{item:b,onToggle:i},b.category))})})]})}),jsxRuntime.jsxs("div",{className:"sm:hidden flex items-center gap-2 shrink-0",children:[n&&a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",onPress:a,children:jsxRuntime.jsx(H,{name:"ArrowsOut",size:16})}),jsxRuntime.jsx(re,{variant:"secondary",size:"sm",onPress:()=>g(true),isDisabled:s,children:jsxRuntime.jsx(H,{name:"Export",size:16})}),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),title:"Export Chart",contentPadding:false,children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("button",{onClick:()=>f("csv"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"List",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="csv"?"Exporting...":"Export as CSV"})]}),jsxRuntime.jsxs("button",{onClick:()=>f("svg"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"Code",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="svg"?"Exporting...":"Export as SVG"})]}),jsxRuntime.jsxs("button",{onClick:()=>f("png"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"DownloadSimple",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:l==="png"?"Exporting...":"Export as PNG"})]})]})})]}),jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[n&&a&&jsxRuntime.jsxs(re,{variant:"secondary",size:"sm",onPress:a,children:[jsxRuntime.jsx(H,{name:"ArrowsOut",size:16}),jsxRuntime.jsx("span",{className:"hidden sm:inline",children:"Reset Zoom"})]}),jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{variant:"secondary",size:"sm",isDisabled:s,children:[jsxRuntime.jsx(H,{name:"Export",size:16}),s?"Exporting...":"Export"]}),jsxRuntime.jsx(St,{placement:"top end",className:"min-w-48 p-1 bg-background-surface rounded-lg shadow-xl ring-1 ring-border-default",children:jsxRuntime.jsxs(reactAriaComponents.Menu,{onAction:x,className:"outline-none",children:[jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"csv",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"List",size:14}),l==="csv"?"Exporting...":"Export as CSV"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"svg",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"Code",size:14}),l==="svg"?"Exporting...":"Export as SVG"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"png",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"DownloadSimple",size:14}),l==="png"?"Exporting...":"Export as PNG"]})})]})})]})]})]})};var Ul=vf(Sp());var bh=["stroke","fill","color","stop-color","flood-color","lighting-color"],hh=/var\s*\(/;function xh(e,t){let r=[e,...Array.from(e.querySelectorAll("*"))],o=[t,...Array.from(t.querySelectorAll("*"))],n=Math.min(r.length,o.length);for(let a=0;a<n;a++){let i=r[a],s=o[a];if(!(i instanceof Element)||!(s instanceof Element))continue;let d=window.getComputedStyle(i);for(let l of bh){let c=s.getAttribute(l);if(c&&hh.test(c)){let u=d.getPropertyValue(l);u&&s.setAttribute(l,u.trim());}}if(s instanceof HTMLElement||s instanceof SVGElement)for(let l of bh){let c=l,u=s.style.getPropertyValue(c);if(u&&hh.test(u)){let m=d.getPropertyValue(c);m&&s.style.setProperty(c,m.trim());}}}}function wp(e,t,r=true){let o=e||"chart";if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}async function Np(e,t,r={},o){let n=Array.isArray(t[0])?t:[t];try{switch(e){case "csv":await IP(n,r);break;case "svg":await FP(o,r);break;case "png":await BP(o,r);break;default:throw new Error(`Unsupported export type: ${e}`)}}catch(a){throw console.error("Export failed:",a),new Error(`Failed to export chart as ${e}: ${a instanceof Error?a.message:"Unknown error"}`)}}async function IP(e,t){try{let r=t.yFormat?xu(t.yFormat):null,o=t.yFormat,n=m=>{if(m==null||m==="")return "";if(!o)return typeof m=="number"?m:String(m);let p=yg(m,o);return p===null?typeof m=="number"?m:String(m):p},a=new Map;e.forEach(m=>{m.forEach(p=>{let g=p.xValue.getTime();a.has(g)||a.set(g,p.xValue);});});let i=Array.from(a.values()).sort((m,p)=>m.getTime()-p.getTime()),s=e.map((m,p)=>{let g=t.seriesLabels?.[p]||`Series ${p+1}`;return r&&!g.includes(`(${r})`)?`${g} (${r})`:g}),d=i.map(m=>{let p={[t.xLabel||"Date"]:m.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return e.forEach((g,f)=>{let x=s[f],b=g.find(y=>y.xValue.getTime()===m.getTime());p[x]=b?n(b.yValue):"",b?.category&&(p[`${x} Category`]=b.category);}),p}),l=AP__default.default.unparse(d,{header:!0,skipEmptyLines:!0}),c=new Blob([l],{type:"text/csv;charset=utf-8;"}),u=wp(t.filename||"chart-data","csv",t.timestamp!==!1);(0,Ul.saveAs)(c,u);}catch(r){throw new Error(`CSV export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function FP(e,t){if(!e.current)throw new Error("SVG element not found");try{let r=e.current,o=r.cloneNode(!0);if(xh(r,o),!o.querySelector("rect[data-background]")){let l=document.createElementNS("http://www.w3.org/2000/svg","rect");l.setAttribute("width",o.getAttribute("width")||"100%"),l.setAttribute("height",o.getAttribute("height")||"100%"),l.setAttribute("fill","white"),l.setAttribute("data-background","true"),o.insertBefore(l,o.firstChild);}let i=new XMLSerializer().serializeToString(o);i.includes("<?xml")||(i=`<?xml version="1.0" encoding="UTF-8"?>
31
- `+i),i.includes("xmlns=")||(i=i.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),d=wp(t.filename||"chart","svg",t.timestamp!==!1);(0,Ul.saveAs)(s,d);}catch(r){throw new Error(`SVG export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function BP(e,t,r=2){if(!e.current)throw new Error("SVG element not found");let o="";try{let n=e.current,a=n.getBoundingClientRect(),i=n.cloneNode(!0);xh(n,i),i.setAttribute("width",String(a.width)),i.setAttribute("height",String(a.height)),i.removeAttribute("transform");let s=i.getElementsByTagName("text");Array.from(s).forEach(m=>{m.style.fontFamily||(m.style.fontFamily="system-ui, -apple-system, sans-serif"),m.style.fontSize||(m.style.fontSize="12px");});let d=document.createElementNS("http://www.w3.org/2000/svg","rect");d.setAttribute("width",String(a.width)),d.setAttribute("height",String(a.height)),d.setAttribute("fill","white"),i.insertBefore(d,i.firstChild);let c=new XMLSerializer().serializeToString(i);c.includes("xmlns=")||(c=c.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let u=new Blob([c],{type:"image/svg+xml;charset=utf-8"});return o=URL.createObjectURL(u),new Promise((m,p)=>{let g=new Image,f=setTimeout(()=>{o&&URL.revokeObjectURL(o),p(new Error("Image loading timeout"));},1e4);g.onload=()=>{clearTimeout(f);try{let x=document.createElement("canvas");x.width=a.width*r,x.height=a.height*r;let b=x.getContext("2d");if(!b)throw new Error("Canvas context not available");b.imageSmoothingEnabled=!0,b.imageSmoothingQuality="high",b.scale(r,r),b.fillStyle="white",b.fillRect(0,0,a.width,a.height),b.drawImage(g,0,0,a.width,a.height),x.toBlob(y=>{if(y){let v=wp(t.filename||"chart","png",t.timestamp!==!1);(0,Ul.saveAs)(y,v),m();}else p(new Error("Failed to create PNG blob"));o&&URL.revokeObjectURL(o);},"image/png",1);}catch(x){o&&URL.revokeObjectURL(o),p(x);}},g.onerror=()=>{clearTimeout(f),o&&URL.revokeObjectURL(o),p(new Error("Failed to load SVG as image"));},g.src=o;})}catch(n){throw o&&URL.revokeObjectURL(o),new Error(`PNG export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function VP(e){if(typeof window>"u")return false;switch(e){case "csv":return true;case "svg":return typeof XMLSerializer<"u";case "png":return typeof HTMLCanvasElement<"u"&&typeof HTMLCanvasElement.prototype.toBlob=="function";default:return false}}function OP(e){return {csv:"CSV Spreadsheet",svg:"SVG Vector Image",png:"PNG Image"}[e]||"Unknown Format"}function Kl({datasets:e,metadata:t,svgRef:r}){return Ze.useCallback(async o=>{try{await Np(o,e,t,r);}catch(n){throw console.error("Chart export failed:",n),n}},[e,t,r])}var Tp=({data:e,seriesMetadata:t,width:r,height:o,onBrushChange:n,brushRegion:a,margin:i=Ye,yDomain:s})=>{let d=Ze.useRef(null),l=Ze.useRef(false),c=Ze.useMemo(()=>e.flat(),[e]),u=Ze.useMemo(()=>({top:10,bottom:15,left:i.left,right:i.right}),[i]),m=r-u.left-u.right,p=Ze.useMemo(()=>{if(c.length===0)return scale.scaleTime({domain:[new Date,new Date],range:[0,m]});let y=new Date(Math.min(...c.map(C=>C.xValue.getTime()))),v=new Date(Math.max(...c.map(C=>C.xValue.getTime())));return scale.scaleTime({domain:[y,v],range:[0,m]})},[c,m]),g=Ze.useMemo(()=>{let y=c.length>0?Math.max(0,...c.map(v=>v.yValue)):1;return scale.scaleLinear({domain:s??[0,y],range:[o-u.bottom,u.top]})},[c,o,s,u.top,u.bottom]),f=y=>{if(l.current)return;if(!y){n(null);return}let{x0:v,x1:C}=y;if(v===C)return;let w=new Date(v),S=new Date(C);if(!(Number.isNaN(w.getTime())||Number.isNaN(S.getTime()))){if(c.length>0){let T=Math.min(...c.map(R=>R.xValue.getTime())),P=Math.max(...c.map(R=>R.xValue.getTime())),M=(P-T)*.05;if(Math.abs(w.getTime()-T)<M&&Math.abs(S.getTime()-P)<M){n(null);return}}n([w,S]);}},x=Ze.useMemo(()=>{if(c.length!==0)return {start:{x:0,y:u.top},end:{x:m,y:o-u.bottom}}},[m,o,c]);Ze.useEffect(()=>{if(!d.current||c.length===0)return;let y=d.current.state;if(y?.isBrushing||y?.activeHandle)return;let v=Math.min(...c.map(k=>k.xValue.getTime())),C=Math.max(...c.map(k=>k.xValue.getTime())),w=a?a[0]:new Date(v),S=a?a[1]:new Date(C),T=d.current.state?.extent;if(T){let k=p.invert(T.x0),M=p.invert(T.x1),D=Math.abs(k.getTime()-w.getTime()),R=Math.abs(M.getTime()-S.getTime());if(D<1e3&&R<1e3)return}l.current=true;let P=k=>{let M=d.current.getExtent({x:p(w),y:u.top},{x:p(S),y:o-u.bottom});return {...k,start:{y:M.y0,x:M.x0},end:{y:M.y1,x:M.x1},extent:M}};d.current.updateBrush(P),setTimeout(()=>{l.current=false;},50);},[a,p,o,c]);let b={fill:"url(#brush_pattern)",fillOpacity:.15,stroke:"var(--color-border-focus)",strokeWidth:1.5,strokeOpacity:.3};return jsxRuntime.jsx("div",{className:"mt-2",children:jsxRuntime.jsxs("svg",{width:r,height:o,children:[jsxRuntime.jsx(pattern.PatternLines,{id:"brush_pattern",height:8,width:8,stroke:"var(--color-text-secondary)",strokeWidth:1,orientation:["diagonal"]}),jsxRuntime.jsxs("g",{transform:`translate(${u.left}, 0)`,children:[e.map((y,v)=>jsxRuntime.jsx(shape.LinePath,{data:y,x:C=>p(C.xValue),y:C=>g(C.yValue),stroke:t[v]?.color||"var(--color-gray-500)",strokeWidth:1.5,opacity:.8},`brush-series-${v}`)),jsxRuntime.jsx(brush.Brush,{xScale:p,yScale:g,width:m,height:o-u.top-u.bottom,margin:{top:u.top,bottom:u.bottom,left:0,right:0},handleSize:8,innerRef:d,resizeTriggerAreas:["left","right"],brushDirection:"horizontal",initialBrushPosition:x,onChange:f,onClick:()=>n(null),selectedBoxStyle:b,useWindowMoveEvents:true})]})]})})};function Xo(e){switch(e){case "command":return Wt("--color-action-brand","#111111");case "success":return Wt("--color-feedback-success-border","#278a4a");case "warning":return Wt("--color-feedback-warning-border","#c88420");case "error":return Wt("--color-feedback-error-border","#c42d2d");case "alert":return Wt("--color-feedback-warning-border","#c88420");default:return Wt("--color-text-secondary","#525250")}}function Jl({events:e,color:t,showLabels:r=false}){let o=Ze.useContext(Qr),[n,a]=Ze.useState(null);if(!o)return console.warn("ChartEventMarkers must be used within a ChartContainer"),null;let{xScale:i,yScale:s,height:d,tooltip:l,datasets:c,seriesMetadata:u,seriesTypes:m,categoryColors:p}=o,g=e.filter(b=>{let y=i(b.timestamp);return y>=Ye.left&&y<=i.range()[1]}),f=Ze.useCallback((b,y)=>{a(y);let v=i(b.timestamp),C=v>(i.range()[1]-Ye.right-Ye.left)/2+Ye.left,w=[];c&&u&&c.forEach((P,k)=>{if(P.length===0)return;let M=d3Array.bisector(O=>O.xValue).left,D=M(P,b.timestamp),R=P[D-1],I=P[D],E;if(!R)E=I;else if(!I)E=R;else {let O=Math.abs(b.timestamp.getTime()-R.xValue.getTime()),W=Math.abs(b.timestamp.getTime()-I.xValue.getTime());E=O<W?R:I;}E&&u[k]&&w.push({label:u[k].label,value:E.yValue,color:u[k].color,type:m?.[k]||"line",...E.category&&{category:E.category,categoryColor:p?.[E.category]}});});let T=g.filter(P=>Math.abs(i(P.timestamp)-v)<=10).map(P=>({label:P.label,color:P.color??t??Xo(P.type),metadata:P.metadata}));w.push({label:T.length>1?`${T.length} events`:b.label,value:0,color:b.color??t??Xo(b.type),type:"event"}),l.show({xValue:b.timestamp,series:w,x:v,y:w.length>1&&typeof w[0].value=="number"?s(w[0].value):d/2,position:C?"left":"right",isEvent:true,eventMetadata:b.metadata,eventItems:T});},[i,s,d,l,t,c,u,m,p,g]),x=Ze.useCallback(()=>{a(null),l.hide();},[l]);return g.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-markers","data-testid":"chart-event-markers",children:g.map((b,y)=>{let v=i(b.timestamp),C=b.color??t??Xo(b.type),w=n===y;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:v,y1:Ye.top,x2:v,y2:d-Ye.bottom,stroke:C,strokeWidth:w?3:2,strokeDasharray:"4 4",strokeOpacity:w?.9:.6,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:v,cy:Ye.top,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:v,cy:d-Ye.bottom,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),r&&jsxRuntime.jsx("text",{x:v,y:Ye.top-8,textAnchor:"middle",fill:"var(--color-text-secondary)",fontSize:11,fontWeight:500,pointerEvents:"none",children:b.label}),jsxRuntime.jsx("rect",{x:v-10,y:Ye.top,width:20,height:d-Ye.top-Ye.bottom,fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(b,y),onMouseLeave:x})]},`${b.timestamp.getTime()}-${y}`)})})}var $P=d3Array.bisector(e=>e.xValue).left;function e1(e,t){if(e.length===0)return;let r=$P(e,t),o=e[r-1],n=e[r];return o?n?Math.abs(t.getTime()-o.xValue.getTime())<Math.abs(t.getTime()-n.xValue.getTime())?{point:o,index:r-1}:{point:n,index:r}:{point:o,index:r-1}:n?{point:n,index:r}:void 0}function Xl({spans:e,opacity:t=.25,color:r}){let o=Ze.useContext(Qr),[n,a]=Ze.useState(null),i=Ze.useRef(Number.NEGATIVE_INFINITY),s=o?.xScale,d=o?.yScale,l=o?.height,c=o?.tooltip,u=o?.datasets,m=o?.seriesMetadata,p=o?.seriesTypes,g=o?.categoryColors,[f,x]=s?.domain()??[new Date(0),new Date(0)],[b,y]=s?.range()??[0,0],v=Ze.useCallback((D,R,I)=>{if(!s||!c||(a(I),D.timeStamp-i.current<16))return;i.current=D.timeStamp;let{left:E}=D.currentTarget.ownerSVGElement?.getBoundingClientRect()??{left:0},O=D.clientX-E,W=s.invert(O),z=[];u&&m&&u.forEach((J,G)=>{let B=m[G],N=e1(J,W);if(!N||!B)return;let{point:h,index:L}=N,A=Hl(B,h,L);z.push({label:B.label,value:h.yValue,...A!==void 0?{baselineValue:A}:{},chartY:h.chartYValue??h.yValue,showMarker:h.showTooltipMarker??true,color:B.color,type:p?.[G]??"line",...h.category?{category:h.category,categoryColor:g?.[h.category]}:{},...h.extraTooltipRows&&h.extraTooltipRows.length>0?{extraTooltipRows:h.extraTooltipRows}:{}});});let F=O>(y-b)/2+b,U=e.filter(J=>J.end>J.start&&J.start<R.end&&J.end>R.start).map(J=>({label:J.label,color:J.color??r??Xo(J.type),metadata:J.metadata}));z.push({label:U.length>1?`${U.length} scheduled commands`:R.label,value:0,color:R.color??r??Xo(R.type),type:"event"});let V=z.length>1?z[0]?.chartY??z[0]?.value:void 0;c.show({xValue:W,series:z,x:O,y:typeof V=="number"&&d?d(V):(l??0)/2,position:F?"left":"right",isEvent:true,eventMetadata:R.metadata,eventItems:U});},[s,d,l,c,u,m,p,g,r,b,y,e]),C=Ze.useCallback(()=>{a(null),c?.hide();},[c]);if(!o)return console.warn("ChartEventSpans must be used within a ChartContainer"),null;let{xScale:w,height:S}=o,T=Ye.top,k=S-Ye.bottom-T,M=e.filter(D=>D.end>D.start);return M.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-spans","data-testid":"chart-event-spans",children:M.map((D,R)=>{let I=D.start<f?f:D.start,E=D.end>x?x:D.end;if(I>=x||E<=f)return null;let O=w(I),z=w(E)-O;if(z<=0)return null;let F=D.color??r??Xo(D.type);return jsxRuntime.jsx("rect",{x:O,y:T,width:z,height:k,fill:F,fillOpacity:n===R?Math.min((t??.25)*1.8,1):t??.25,pointerEvents:"all",style:{cursor:"pointer"},onMouseMove:U=>v(U,D,R),onMouseLeave:C},`${D.start.getTime()}-${D.end.getTime()}-${R}`)})})}var kh=Ze.createContext(false);function Pp({children:e}){return jsxRuntime.jsx(kh.Provider,{value:true,children:e})}function oa(e){let t=Ze.useContext(kh),[r,o]=Ze.useState(false),[n,a]=Ze.useState(null),i=Ze.useRef(null),s=Ze.useCallback(u=>{if(i.current?.disconnect(),i.current=null,!u||typeof ResizeObserver>"u")return;let m=new ResizeObserver(([p])=>{if(!p)return;let{width:g,height:f}=p.contentRect;a(x=>x&&x.width===g&&x.height===f?x:{width:g,height:f});});m.observe(u),i.current=m;},[]);Ze.useEffect(()=>()=>i.current?.disconnect(),[]);let d=Ze.useCallback(()=>{o(false),a(null);},[]),l=t?null:jsxRuntime.jsx(re,{variant:"icon",size:"sm",icon:"ArrowsOutSimple","aria-label":`Expand ${e} chart`,onPress:()=>o(true)}),c=Ze.useCallback(u=>r&&!t?jsxRuntime.jsx(yr,{isOpen:true,onClose:d,title:e,contentPadding:false,maxWidth:"min(1200px, 100vw)",minWidth:"min(360px, 100vw)",height:"82vh",mobileHeight:"82vh",children:jsxRuntime.jsx("div",{ref:s,className:"h-full w-full p-4",children:u})}):u,[r,t,d,e,s]);return {isExpanded:r,action:l,expandedSize:n,present:c}}var na=({data:e,color:t="var(--color-viz-default)",strokeWidth:r=3,strokeDasharray:o,categoryColors:n={},maxGapMs:a,animate:i=true})=>{let{xScale:s,yScale:d,animationSettings:l,entrance:c}=ta(),[u]=Ze__namespace.default.useState(()=>c?.played!==true),m=i&&u,p=d.range(),g=Object.keys(n).length>0,f=S=>S.category?n[S.category]??t:t,x=S=>S.chartYValue??S.yValue,b=e.length===1?e[0]:void 0,y=a!=null?Bl(e,a):e,v=i?void 0:"non-scaling-stroke",C=b?jsxRuntime.jsx("circle",{cx:s(b.xValue),cy:d(x(b)),r,fill:g?f(b):t}):g?e.slice(0,-1).map((S,T)=>{let P=e[T+1];return a!=null&&a>0&&P.xValue.getTime()-S.xValue.getTime()>a?null:jsxRuntime.jsx(shape.LinePath,{data:[S,P],x:k=>s(k.xValue),y:k=>d(x(k)),stroke:f(S),strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:v,curve:curve.curveLinear},`${S.xValue.getTime()}-${P.xValue.getTime()}`)}):jsxRuntime.jsx(shape.LinePath,{data:y,x:S=>S?s(S.xValue):0,y:S=>S?d(x(S)):0,defined:S=>S!=null,stroke:t,strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:v,curve:curve.curveLinear}),w={transformOrigin:`0 ${p[0]}px`,transformBox:"fill-box",isolation:"isolate"};return m?jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:l.duration,ease:l.ease},style:w,children:C}):jsxRuntime.jsx("g",{style:w,children:C})};var Dh=e=>e.type===kn||e.type===na||e.type===Ol,m1=e=>e.type===Jl||e.type===Xl,Ah=280,f1=d3Array.bisector(e=>e.xValue).left,g1=()=>jsxRuntime.jsx("div",{className:"flex h-full items-center justify-center",children:jsxRuntime.jsx("p",{className:"text-text-secondary",children:"No data available"})}),b1=()=>jsxRuntime.jsxs("div",{className:"flex h-full flex-col gap-4 p-4",children:[jsxRuntime.jsx(q,{className:"h-full w-full"}),jsxRuntime.jsxs("div",{className:"flex gap-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-4 w-24"})]})]}),h1=({parentWidth:e,parentHeight:t,yFormatter:r={type:"number"},yDomain:o,referenceLines:n,isLoading:a=false,enableZoom:i=false,enableBrush:s=false,brushHeight:d=60,onZoomChange:l,zoomDomain:c,hiddenSeriesLabels:u,onHiddenSeriesChange:m,hideBottomBar:p=false,headerActions:g,headerControls:f,title:x,children:b})=>{let y=u!==void 0,v=c!==void 0,[C,w]=Ze.useState(null),[S,T]=Ze.useState(null),P=v?c:S,[k,M]=Ze.useState(()=>new Set),D=y?u:k,R=Ze.useRef(null),I=Ze.useId(),E=Ze.useRef(0),O=Ze.useRef(""),W=Ze.useRef(null),{colorMode:z}=er(),F=Ze.useMemo(()=>Wo(),[z]),Y=Ze.useMemo(()=>Di(),[z]),{datasets:U,seriesMetadata:V,categoryInfo:J,categoryColors:G,categoryLabels:B,seriesTypes:N}=Ze.useMemo(()=>{let fe=Ze.Children.toArray(b).filter(ze=>Ze.isValidElement(ze)&&Dh(ze)),Ve=fe.filter(ze=>ze.props.data).length,Re=[],Ge=[],rt=[],mt=null,Fe=null;fe.forEach((ze,Ct)=>{let Ae=ze.props;if(!Ae.data)return;Re.push(Ae.data);let Ho=("color"in Ae&&Ae.color?Ae.color:void 0)||(Ve===1?Y:F[Ct%F.length]),Go=ze.type===kn;Ge.push({label:"label"in Ae&&Ae.label||`Series ${Re.length}`,color:Ho,...Go&&"baseline"in Ae&&Ae.baseline!==void 0?{baseline:Ae.baseline,tooltipRange:"tooltipRange"in Ae&&Ae.tooltipRange||false}:{}});let Hn=Go?"area":ze.type===na?"line":"bar";rt.push(Hn),"categoryColors"in Ae&&Ae.categoryColors&&(mt=Ae.categoryColors),"categoryLabels"in Ae&&Ae.categoryLabels&&(Fe=Ae.categoryLabels);});let dt=null;if(mt){let ze=new Set;Re.forEach(Ct=>{Ct.forEach(Ae=>{Ae.category&&ze.add(Ae.category);});}),dt=Array.from(ze).map(Ct=>({label:Fe?.[Ct]||Ct,color:mt[Ct]||"#6b7280"}));}return {datasets:Re,seriesMetadata:Ge,categoryInfo:dt,categoryColors:mt,categoryLabels:Fe,seriesTypes:rt}},[b,Y,F,z]),h=oa(x),L=h.expandedSize?.width??e,A=h.expandedSize?.height??t,ae=!p?h.action:null,_=g||ae?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g,ae]}):void 0,{headerRef:ee,headerHeight:ie}=Xa(!!_,!!f),Ee=p?0:60,le=s?d+8:0,ge=A-ie-Ee-le,ce=Math.max(100,ge),pe=Ze.useCallback(Q=>Q?D.has(Q):false,[D]),Te=Ze.useMemo(()=>V.map((Q,fe)=>pe(Q.label)?null:fe).filter(Q=>Q!==null),[V,pe]),et=Ze.useMemo(()=>Te.map(Q=>U[Q]).filter(Q=>!!Q),[U,Te]),Be=Ze.useMemo(()=>Te.map(Q=>V[Q]).filter(Q=>!!Q),[V,Te]),$t=Ze.useMemo(()=>Te.map(Q=>N[Q]).filter(Q=>!!Q),[N,Te]),yt=$t.findIndex(Q=>Q==="bar"),ir=yt!==-1,Rt=Ze.useCallback((Q,fe)=>{let Ve=Q.has(fe);if(!Ve&&V.reduce((rt,mt)=>Q.has(mt.label)||mt.label===fe?rt:rt+1,0)<1)return Q;let Re=new Set(Q);return Ve?Re.delete(fe):Re.add(fe),Re},[V]),tt=Ze.useCallback(Q=>{if(y){let fe=u;if(!fe.has(Q)&&V.reduce((Ge,rt)=>fe.has(rt.label)||rt.label===Q?Ge:Ge+1,0)<1){w(null);return}m?.(Re=>Rt(Re,Q));}else M(fe=>Rt(fe,Q));w(null);},[y,u,m,V,Rt]),Gt=Ze.useMemo(()=>V.map(Q=>Q.label).join(""),[V]),te=Ze.useRef(Gt);Ze.useEffect(()=>{te.current!==Gt&&(te.current=Gt,y||M(Q=>Q.size===0?Q:new Set));},[Gt,y]);let Oe=Ze.useMemo(()=>et.flat(),[et]),Ue=Ze.useMemo(()=>{if(Oe.length===0)return null;let Q=[...Oe].sort((fe,Ve)=>fe.xValue.getTime()-Ve.xValue.getTime());return [Q[0].xValue,Q[Q.length-1].xValue]},[Oe]),oe=P||Ue,we=Ze.useCallback(Q=>{v?l?.(Q):T(Q);},[v,l]),X=Ze.useMemo(()=>oe?U.map(fe=>fe.filter(Ve=>Ve.xValue>=oe[0]&&Ve.xValue<=oe[1])):U,[U,oe]),K=Ze.useMemo(()=>Te.map(Q=>X[Q]??[]),[Te,X]);Ze.useEffect(()=>{l&&l(P);},[P,l]);let de=Ze.useMemo(()=>Te.flatMap(Q=>X[Q]??[]),[X,Te]),ne=Ze.useMemo(()=>Zi(de,ce,r,o),[de,ce,r,o]),ke=Ze.useRef(JSON.stringify(r)),ve=Ze.useRef(null),$=Ze.useMemo(()=>{let[Q,fe]=ne.domain(),Ve=Math.max(Math.abs(Q),Math.abs(fe)),Re=JSON.stringify(r);if(Re!==ke.current&&(ke.current=Re,ve.current=null),ve.current!==null)return ve.current;if(Ve===0)return ai(r,0);let Ge=ai(r,Ve);return ve.current=Ge,Ge},[ne,r]),ue=Ze.useMemo(()=>{let Q=ce-Ye.top-Ye.bottom;return ii(Q)},[ce]),Z=Ze.useMemo(()=>{let Q=Or($),fe=Q.tickFormat||Q.format,Re=ne.ticks(ue).map(mt=>fe(mt)),Ge=Pn(Re,12,"system-ui"),rt=Math.ceil(Ge)+12;return {...Ye,left:Math.max(rt,30),right:8}},[ne,$,ue]),be=Ze.useMemo(()=>oe?scale.scaleTime({domain:oe,range:[Z.left,L-Z.right]}):hp(Oe,L),[oe,Oe,L,Z]),sr=Ze.useCallback(Q=>{if(!Ue)return;let{scaleX:fe,translateX:Ve}=Q,Re=L-Z.left-Z.right,[Ge,rt]=Ue,mt=rt.getTime()-Ge.getTime();if(mt<=0){we(null);return}let Fe=-Ve,dt=Fe+Re,ze=Re*fe/mt,Ct=Fe/ze,Ae=dt/ze,zo=new Date(Ge.getTime()+Ct),Ho=new Date(Ge.getTime()+Ae),Go=Math.abs(zo.getTime()-Ge.getTime()),Hn=Math.abs(Ho.getTime()-rt.getTime()),qs=mt*.02;Go<qs&&Hn<qs?we(null):we([zo,Ho]);},[Ue,L,Z,we]),ln=Ze.useCallback(Q=>{let{left:fe}=R.current?.getBoundingClientRect()||{left:0},Ve=Q.clientX-fe;if(Q.timeStamp-(E.current||0)<16)return;E.current=Q.timeStamp;let Re=be.invert(Ve),Ge=K.map((Fe,dt)=>{if(!Fe||Fe.length===0)return null;let ze=f1(Fe,Re,1);if(ze===0)return {point:Fe[0],index:0,datasetIndex:dt};if(ze>=Fe.length)return {point:Fe[Fe.length-1],index:Fe.length-1,datasetIndex:dt};let Ct=Fe[ze-1],Ae=Fe[ze];if(!Ct||!Ae)return null;let zo=Math.abs(Ct.xValue.getTime()-Re.getTime()),Ho=Math.abs(Ae.xValue.getTime()-Re.getTime()),Go=zo<Ho;return {point:Go?Ct:Ae,index:Go?ze-1:ze,datasetIndex:dt}}).filter(Fe=>Fe!==null&&Be[Fe.datasetIndex]!==void 0).map(({point:Fe,index:dt,datasetIndex:ze})=>({label:Be[ze].label,value:Fe.yValue,baselineValue:Hl(Be[ze],Fe,dt),color:Be[ze].color,point:Fe,type:$t[ze]}));if(Ge.length===0){w(null);return}let rt=be(Ge[0].point.xValue),mt=rt>(L-Z.right-Z.left)/2+Z.left;w({xValue:Ge[0].point.xValue,series:Ge.map(({label:Fe,value:dt,baselineValue:ze,color:Ct,point:Ae,type:zo})=>({label:Fe,value:dt,...ze!==void 0?{baselineValue:ze}:{},chartY:Ae.chartYValue??dt,showMarker:Ae.showTooltipMarker??true,color:Ct,type:zo,category:Ae.category,categoryColor:Ae.category&&G?G[Ae.category]:void 0,...Ae.extraTooltipRows&&Ae.extraTooltipRows.length>0?{extraTooltipRows:Ae.extraTooltipRows}:{}})),x:rt,y:ne(Ge[0].point.chartYValue??Ge[0].value),position:mt?"left":"right"});},[K,Be,$t,be,ne,L,G,Z]),oo=()=>{w(null);},Le=Ze.useCallback(()=>{we(null),W.current&&W.current.reset();},[we]),vt=Ze.useCallback(Q=>{let fe={scaleX:1,scaleY:1,translateX:0,translateY:0,skewX:0,skewY:0};if(!Q||!Ue)return fe;let[Ve,Re]=Ue,Ge=Re.getTime()-Ve.getTime();if(Ge<=0)return fe;let[rt,mt]=Q,Fe=mt.getTime()-rt.getTime();if(Fe<=0)return fe;let dt=Ge/Fe,ze=L-Z.left-Z.right,Ct=rt.getTime()-Ve.getTime();return {scaleX:dt,scaleY:1,translateX:-(Ct/Ge)*ze*dt,translateY:0,skewX:0,skewY:0}},[Ue,L,Z]),Bt=Ze.useCallback(Q=>{if(!(W.current&&Ue))return;let[fe,Ve]=Ue,Re=Ve.getTime()-fe.getTime();if(Re<=0){W.current.reset();return}if(!Q){W.current.reset();return}let[Ge,rt]=Q,mt=rt.getTime()-Ge.getTime();if(mt<=0){W.current.reset();return}let Fe=Re/mt,dt=L-Z.left-Z.right,Ct=-((Ge.getTime()-fe.getTime())/Re)*dt*Fe;W.current.setTransformMatrix({scaleX:Fe,scaleY:1,translateX:Ct,translateY:0,skewX:0,skewY:0});},[Ue,L,Z]),no=Ze.useCallback(Q=>{we(Q),Bt(Q);},[we,Bt]);Ze.useEffect(()=>{v&&Bt(c??null);},[v,c,Bt]);let Xs=Fl(),Vd={width:L,height:ce,xScale:be,yScale:ne,yFormatter:$,animationSettings:Il,entrance:Xs,tooltip:{data:C,show:w,hide:()=>w(null)},datasets:K,seriesMetadata:Be,seriesTypes:$t,categoryColors:G||void 0,categoryLabels:B||void 0},M0=Ze.Children.toArray(b),bf=0,hf=[],xf=[],Od=[];M0.forEach(Q=>{if(!Ze.isValidElement(Q)){Od.push(Q);return}if(m1(Q))xf.push(Q);else if(Dh(Q)){let fe=bf;bf++;let Ve=Q.props,Re=V[fe]?.label;if(pe(Re))return;hf.push(Ze__namespace.default.cloneElement(Q,{...Ve,data:X[fe]||Ve.data,color:V[fe]?.color}));}else Od.push(Q);});let E0=Te.length,L0=(J||V).map(Q=>{let fe=!J&&pe(Q.label);return {category:Q.label,fill:Q.color,isHidden:fe,isDisabled:!J&&!fe&&E0<=1}}),D0=typeof r=="object"&&r!==null&&typeof r.type=="string",A0=Kl({datasets:et,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:Be.map(Q=>Q.label),timestamp:true,...D0?{yFormat:r}:{}},svgRef:R}),zd=jsxRuntime.jsx(qa,{title:x,controls:f,actions:_,containerRef:ee,marginRight:Z.right});if(a)return h.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[zd,jsxRuntime.jsx(b1,{})]}));if(U.length===0)return h.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[zd,jsxRuntime.jsx(g1,{})]}));let yf=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:x}),jsxRuntime.jsx("g",{children:ne.ticks(ue).map(Q=>{let fe=Math.abs(Q)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:ne(Q)},to:{x:L-Z.right,y:ne(Q)},stroke:fe?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:fe?1.5:1},`grid-line-${Q}`)})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:I,children:jsxRuntime.jsx("rect",{x:be.range()[0],y:ne.range()[1],width:be.range()[1]-be.range()[0],height:ne.range()[0]-ne.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${I})`,children:hf}),Od,n&&n.length>0&&jsxRuntime.jsx("g",{children:n.map((Q,fe)=>{let Ve=ne(Q.value),Re=Q.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:Ve},to:{x:L-Z.right,y:Ve},stroke:Re,strokeWidth:1.5,strokeDasharray:"6 4"}),Q.label&&jsxRuntime.jsx("text",{x:L-Z.right-4,y:Ve-4,textAnchor:"end",fontSize:11,fill:Re,children:Q.label})]},`ref-line-${fe}`)})}),jsxRuntime.jsx(Zr.Bottom,{top:ce-Z.bottom,scale:be,width:L-Z.left-Z.right}),jsxRuntime.jsx(Zr.Left,{left:Z.left,scale:ne,yFormatter:$,height:ce-Z.top-Z.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ir?(()=>{let Q=et[yt]??[];if(Q.length===0)return null;let fe=[...Q].sort((Hn,qs)=>Hn.xValue.getTime()-qs.xValue.getTime()),Ve=fe.findIndex(Hn=>Hn.xValue.getTime()===C.xValue.getTime()),Re=fe[Ve+1],Ge=fe.length>1&&Re?Re.xValue.getTime()-C.xValue.getTime():15*6e4,rt=Math.abs(be(new Date(C.xValue.getTime()+Ge))-be(C.xValue)),Fe=be(C.xValue)-rt/2,dt=ne.range(),[ze,Ct]=be.range(),Ae=Math.min(ze,Ct),zo=Math.max(ze,Ct),Ho=Math.max(Fe,Ae),Go=Math.max(0,Math.min(Fe+rt,zo)-Ho);return jsxRuntime.jsx("rect",{x:Ho,y:dt[1],width:Go,height:dt[0]-dt[1],className:"fill-background-muted",opacity:.5,pointerEvents:"none",style:{transition:"all 100ms ease-out"}})})():null,C.series.filter(Q=>Q.type!=="bar"&&Q.showMarker!==false).map(Q=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:be(C.xValue),cy:ne(Q.chartY??Q.value),r:8,fill:"white",stroke:Q.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:be(C.xValue),cy:ne(Q.chartY??Q.value),r:4,fill:Q.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${Q.label}`))]}),jsxRuntime.jsx("rect",{x:Z.left,y:Z.top,width:L-Z.left-Z.right,height:ce-Z.top-Z.bottom,fill:"transparent",style:{cursor:i?"grab":"crosshair",touchAction:"none"},onMouseMove:ln,onMouseLeave:oo}),xf]});return h.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(Qr.Provider,{value:Vd,children:[zd,i?jsxRuntime.jsx(zoom.Zoom,{initialTransformMatrix:vt(P),width:L,height:ce,scaleXMin:1,scaleXMax:20,scaleYMin:1,scaleYMax:1,constrain:Q=>{let{scaleX:fe,translateX:Ve}=Q,Re=Math.max(1,Math.min(20,fe)),Ge=1,rt=L-Z.left-Z.right,mt=0,Fe=rt*(1-Re),dt=Math.max(Fe,Math.min(mt,Ve));return {...Q,scaleX:Re,scaleY:Ge,translateX:dt,translateY:0}},children:Q=>{if(W.current=Q,Q.transformMatrix){let{scaleX:fe,translateX:Ve}=Q.transformMatrix,Re=`${fe.toFixed(4)}-${Ve.toFixed(2)}`;Re!==O.current&&(O.current=Re,setTimeout(()=>{sr(Q.transformMatrix);},0));}return jsxRuntime.jsx("svg",{width:L,height:ce,className:"overflow-visible",ref:fe=>{R.current=fe,Q.containerRef.current!==fe&&(Q.containerRef.current=fe);},role:"img","aria-label":x,style:{cursor:Q.isDragging?"grabbing":"grab",touchAction:"none"},onMouseDown:Q.dragStart,onMouseMove:Q.dragMove,onMouseUp:Q.dragEnd,onMouseLeave:()=>{Q.isDragging&&Q.dragEnd();},onTouchStart:Q.dragStart,onTouchMove:Q.dragMove,onTouchEnd:Q.dragEnd,children:yf})}},`zoom-${Math.round(L)}x${Math.round(ce)}`):jsxRuntime.jsx("svg",{width:L,height:ce,className:"overflow-visible",ref:R,role:"img","aria-label":x,children:yf}),jsxRuntime.jsx(ko,{data:C,formatter:$}),s&&Ue&&jsxRuntime.jsx(Tp,{data:et,seriesMetadata:Be,width:L,height:d,onBrushChange:no,brushRegion:P,margin:Z,...o?{yDomain:o}:{}}),!p&&jsxRuntime.jsx(li,{onExport:A0,items:L0,marginLeft:0,marginRight:Z.right,isZoomed:P!==null,onResetZoom:Le,onLegendItemToggle:J?void 0:tt})]})}))},Ih=responsive.withParentSize(h1);var w1=e=>e.toLocaleString(),N1=e=>`${Math.round(e*100)}%`,Oh=({data:e,width:t=800,height:r=400,padding:o=0,barGap:n=30,formatValue:a=w1,formatPercentage:i=N1,color:s,showScale:d=true,showOverallConversion:l=true,overallConversionLabel:c="Overall Conversion:",activeStageId:u,onStageClick:m,onStageHover:p,className:g,style:f,"aria-label":x="Funnel chart"})=>{let[b,y]=Ze.useState(null),[v,C]=Ze.useState(t),w=Ze.useRef(null),S=u??b,T=Ze.useId(),P=s||"var(--color-viz-default)";Ze.useEffect(()=>{if(!w.current)return;let E=new ResizeObserver(O=>{for(let W of O)C(W.contentRect.width);});return E.observe(w.current),()=>{E.disconnect();}},[]);let{layout:k,overallConversion:M}=Ze.useMemo(()=>{if(e.length===0)return {layout:[],overallConversion:0};let E=e[0].value,O=l?60:0,W=r-o*2-O,z=(e.length-1)*n,F=(W-z)/e.length,Y=e.map((V,J)=>{let G=o+O+J*(F+n),B=E===0?0:V.value/E,N=B,h=J===0?null:e[J-1].value,L=h==null||h===0?0:1-V.value/h;return {stage:V,index:J,y:G,barHeight:F,widthPercent:B,conversionRate:N,dropOff:L}}),U=E===0?0:e[e.length-1].value/E;return {layout:Y,overallConversion:U,maxValue:E}},[e,v,r,o,n,d,l]);if(e.length===0)return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex h-full min-h-[280px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:{width:t,height:r,...f},children:"No funnel data available"});let D=d?60:0,R=o+D,I=v-o*2-D;return jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",g),style:{height:r,...f},"aria-label":x,role:"img",children:jsxRuntime.jsxs("svg",{width:"100%",height:r,className:"relative",children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bar`,from:P,to:P,toOpacity:.85}),jsxRuntime.jsx(gradient.LinearGradient,{id:`${T}-bg`,from:P,to:P,fromOpacity:.01,toOpacity:.15,x1:"0",y1:"0",x2:"1",y2:"0"})]}),l&&jsxRuntime.jsxs("text",{x:R,y:o+20,className:"fill-text-primary text-sm font-medium",children:[jsxRuntime.jsx("tspan",{className:"fill-text-secondary",children:c})," ",i(M)]}),d&&jsxRuntime.jsx("g",{children:k.map(E=>{let O=E.y+E.barHeight/2;return jsxRuntime.jsx("text",{x:o+D-12,y:O,textAnchor:"end",dominantBaseline:"middle",className:"fill-text-secondary text-xs",children:i(E.conversionRate)},E.stage.id)})}),k.map(E=>{let O=S===E.stage.id,W=I*E.widthPercent;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:R,y:E.y,width:I,height:E.barHeight,fill:`url(#${T}-bg)`,rx:4}),jsxRuntime.jsx(framerMotion.motion.rect,{x:R,y:E.y,width:W,height:E.barHeight,fill:`url(#${T}-bar)`,rx:4,initial:{width:0},animate:{width:W},transition:{duration:.6,delay:E.index*.1,ease:"easeOut"},opacity:O||S==null?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease"},onMouseEnter:()=>{y(E.stage.id),p?.(E.stage);},onMouseLeave:()=>{y(null),p?.(null);},onClick:()=>m?.(E.stage)}),jsxRuntime.jsx("rect",{x:R+10,y:E.y+E.barHeight/2-10,width:70,height:20,className:"fill-background-surface stroke-border-default",strokeWidth:1,rx:4,style:{pointerEvents:"none"}}),jsxRuntime.jsx("text",{x:R+16,y:E.y+E.barHeight/2+4,className:"fill-text-primary text-xs font-semibold",style:{pointerEvents:"none"},children:a(E.stage.value)}),jsxRuntime.jsxs("text",{x:R,y:E.y-8,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:[jsxRuntime.jsx("tspan",{children:E.index+1})," ",E.stage.label]}),E.stage.secondaryValue&&jsxRuntime.jsx("text",{x:R+16,y:E.y-24,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:E.stage.secondaryValue}),E.index>0&&E.dropOff>0&&jsxRuntime.jsxs("text",{x:R+I,y:E.y-8,textAnchor:"end",className:"fill-text-secondary text-xs",children:[i(E.dropOff)," drop"]}),E.stage.annotation&&jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:R+W+8,y:E.y+8,width:60,height:24,rx:3,className:"fill-background-muted"}),jsxRuntime.jsx("text",{x:R+W+16,y:E.y+20,className:"fill-text-secondary text-xs font-medium",children:E.stage.annotation})]})]},E.stage.id)})]})})};var M1=.005,Gh=320;function jl(e){return e>0?e:0}function E1(e,t,r){let o=t===0?0:jl(e.value)/t*100;return `${e.label}: ${r(e.value)}, ${o.toFixed(1)}%`}var Wh=({data:e,width:t,height:r,innerRadiusRatio:o=0,yFormatter:n={type:"number"},showLegend:a=true,showTooltip:i=true,onSliceClick:s,onSliceHover:d,className:l,style:c,"aria-label":u})=>{let[m,p]=Ze.useState(null),[g,f]=Ze.useState(null),[x,b]=Ze.useState(null),[y,v]=Ze.useState(t??600),[C,w]=Ze.useState(r??300),S=Ze.useRef(null);Ze.useEffect(()=>{if(t!==void 0&&r!==void 0){v(t),w(r);return}if(!S.current)return;let z=new ResizeObserver(F=>{for(let Y of F)t===void 0&&v(Y.contentRect.width),r===void 0&&w(Y.contentRect.height);});return z.observe(S.current),t===void 0&&v(S.current.offsetWidth),r===void 0&&w(S.current.offsetHeight||300),()=>{z.disconnect();}},[t,r]);let T=Ze.useMemo(()=>e.reduce((z,F)=>z+jl(F.value),0),[e]),P=Ze.useMemo(()=>{let z=Ai(e.map(F=>F.label));return e.map(F=>({...F,color:F.color||z[F.label]||"var(--color-viz-default)"}))},[e]),k=Or(n),M=s!==void 0,D=a&&y>=Gh,R=D?Math.max(y*.45,Gh*.45):y,E=Math.max(0,Math.min(R,C)-8)/2,O=E*Math.min(Math.max(o,0),.95);if(e.length===0||T===0)return jsxRuntime.jsx("div",{ref:S,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",l),style:r!==void 0?{height:r,...c}:c,children:"No data available"});let W=(z,F,Y)=>{if(p(z),d?.(F,z),z!==null&&F&&Y){let U=R/2+Y[0],V=C/2+Y[1];b(F.label),f({xValue:new Date,series:[{label:"Value",value:F.value,color:F.color||"var(--color-viz-default)"}],x:U,y:V,position:U>y/2?"left":"right"});}else f(null),b(null);};return jsxRuntime.jsxs("div",{ref:S,className:tailwindMerge.twMerge("relative flex h-full w-full items-center gap-4 rounded-lg bg-background-surface",l),style:r!==void 0?{height:r,...c}:c,children:[jsxRuntime.jsx("svg",{width:R,height:C,className:"flex-shrink-0",role:M?"group":"img","aria-label":u,children:jsxRuntime.jsx(group.Group,{top:C/2,left:R/2,children:jsxRuntime.jsx(shape.Pie,{data:P,pieValue:z=>jl(z.value),pieSort:null,pieSortValues:null,outerRadius:E,innerRadius:O,padAngle:M1,children:z=>z.arcs.map((F,Y)=>{let U=m===Y||m===null,V=z.path.centroid(F);return jsxRuntime.jsx("path",{d:z.path(F)??void 0,fill:F.data.color,opacity:U?1:.5,style:{cursor:s||d?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>W(Y,F.data,V),onMouseLeave:()=>W(null,null),onClick:()=>s?.(F.data,Y),...M?{role:"button",tabIndex:0,"aria-label":E1(F.data,T,k.format),onFocus:()=>W(Y,F.data,V),onBlur:()=>W(null,null),onKeyDown:J=>{J.key!=="Enter"&&J.key!==" "||(J.preventDefault(),s?.(F.data,Y));}}:{}},F.data.label)})})})}),D?jsxRuntime.jsx("ul",{className:"flex min-w-0 flex-col gap-1 overflow-y-auto py-2 text-xs",children:P.map((z,F)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",style:{opacity:m===F||m===null?1:.5},onMouseEnter:()=>W(F,z),onMouseLeave:()=>W(null,null),children:[jsxRuntime.jsx("span",{className:"h-3 w-3 flex-shrink-0 rounded-sm",style:{backgroundColor:z.color}}),jsxRuntime.jsx("span",{className:"truncate text-text-primary",title:z.label,children:z.label}),jsxRuntime.jsxs("span",{className:"ml-auto flex-shrink-0 tabular-nums text-text-secondary",children:[k.format(z.value)," (",(jl(z.value)/T*100).toFixed(1),"%)"]})]},z.label))}):null,i&&jsxRuntime.jsx(ko,{data:g,formatter:n,label:x??void 0})]})};function Uh(){let e=new Map;return {publish(t,r){for(let[o,n]of e)o!==t&&n(r);},subscribe(t,r){return e.set(t,r),()=>{e.delete(t);}}}}var D1=d3Array.bisector(e=>e.xValue).left,A1=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function Kh(e){let{mouseX:t,datasets:r,seriesMetadata:o,seriesTypes:n,xScale:a,yScale:i,plotLeft:s,plotRight:d}=e,l=a.invert(t),c=r.map((p,g)=>{if(!p||p.length===0)return null;let f=D1(p,l,1);if(f===0)return {point:p[0],index:0,datasetIndex:g};if(f>=p.length)return {point:p[p.length-1],index:p.length-1,datasetIndex:g};let x=p[f-1],b=p[f];if(!x||!b)return null;let y=Math.abs(x.xValue.getTime()-l.getTime()),v=Math.abs(b.xValue.getTime()-l.getTime()),C=y<v;return {point:C?x:b,index:C?f-1:f,datasetIndex:g}}).filter(p=>p!==null&&o[p.datasetIndex]!==void 0).map(({point:p,index:g,datasetIndex:f})=>({label:o[f].label,value:p.yValue,baselineValue:A1(o[f],p,g),color:o[f].color,point:p,type:n[f]}));if(c.length===0)return null;let u=a(c[0].point.xValue),m=u>(s+d)/2;return {xValue:c[0].point.xValue,series:c.map(({label:p,value:g,baselineValue:f,color:x,point:b,type:y})=>({label:p,value:g,...f!==void 0?{baselineValue:f}:{},chartY:b.chartYValue??g,showMarker:b.showTooltipMarker??true,color:x,type:y,...b.category!==void 0?{category:b.category}:{},...b.extraTooltipRows&&b.extraTooltipRows.length>0?{extraTooltipRows:b.extraTooltipRows}:{}})),x:u,y:i(c[0].point.chartYValue??c[0].value),position:m?"left":"right"}}var Xh=e=>e instanceof Date&&!Number.isNaN(e.getTime()),V1=160;function Ql(e,t,r){let[o,n]=Ze.useState(null);Ze.useImperativeHandle(r,()=>({setPreview:n}),[]);let[a,i]=e.range(),s=Ze.useMemo(()=>o?d3Scale.scaleTime().domain([new Date(o[0]),new Date(o[1])]).range([a,i]):e,[o,e,a,i]),d=s.domain(),l=d[0],c=d[d.length-1],u=Xh(l)&&Xh(c),m=t<400,p=Math.max(2,Math.min(8,Math.floor(t/(m?70:110)))),g=Ze.useMemo(()=>{if(!u)return [];let f=i-a;if(f<=0)return s.ticks(p);let[x,b]=s.domain(),y=x.getTime(),v=b.getTime(),C=(v-y)/f,w=Math.min(V1,f),S=w*C,T=d3Scale.scaleTime().domain([new Date(y-S),new Date(v+S)]).range([a-w,i+w]),P=d3Time.timeTickInterval(x,b,p);if(P)return T.ticks(P);let k=Math.max(2,Math.round(p*(f+2*w)/f));return T.ticks(k)},[s,p,u,a,i]);return {activeScale:s,ticks:g,start:l,end:c,valid:u,compact:m,rangeStart:a,rangeEnd:i}}var G1=6,qh=20,Ap=Ze.forwardRef(({top:e,scale:t,width:r},o)=>{let{activeScale:n,ticks:a,start:i,end:s,valid:d,compact:l,rangeStart:c,rangeEnd:u}=Ql(t,r,o),m=a.length>=2?a[1].getTime()-a[0].getTime():s.getTime()-i.getTime(),p=Ze.useMemo(()=>d?Cg(m,{compact:l}):()=>"",[m,l,d]),g=Ze.useId(),f=Math.min(c,u),x=Math.abs(u-c);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:c,x2:u,y1:e,y2:e,stroke:"var(--color-border-muted)",strokeWidth:1}),a.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:g,children:jsxRuntime.jsx("rect",{x:f,y:e-4,width:x,height:qh+16})})}),jsxRuntime.jsx("g",{clipPath:`url(#${g})`,children:a.map(b=>jsxRuntime.jsxs("g",{transform:`translate(${n(b)},${e})`,children:[jsxRuntime.jsx("line",{x1:0,x2:0,y1:0,y2:G1,stroke:"var(--color-border-muted)",strokeWidth:1}),jsxRuntime.jsx("text",{x:0,y:qh,textAnchor:"middle",fontSize:12,fill:"var(--color-text-secondary)",children:p(b)})]},b.getTime()))})]})]})});Ap.displayName="LiveTimeAxisBottom";var Ip=Ze.forwardRef(({scale:e,width:t,top:r,bottom:o},n)=>{let{activeScale:a,ticks:i,rangeStart:s,rangeEnd:d}=Ql(e,t,n),l=Ze.useId(),c=Math.min(s,d),u=Math.abs(d-s);return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:l,children:jsxRuntime.jsx("rect",{x:c,y:r,width:u,height:o-r})})}),jsxRuntime.jsx("g",{clipPath:`url(#${l})`,children:i.map(m=>{let p=a(m);return jsxRuntime.jsx("line",{x1:p,x2:p,y1:r,y2:o,stroke:"var(--color-border-muted)",strokeWidth:1},m.getTime())})})]})});Ip.displayName="LiveTimeGridlines";function Zl(e,t,r){let o=e[1]-e[0],n=t/Math.max(1,r)*o;return [e[0]-n,e[1]-n]}function jh(e,t,r){let o=e[1]-e[0],n=e[0]+t*o,a=o/r,i=n-t*a;return [i,i+a]}function Fp(e,t,r=16,o=800){return t===1?e*r:t===2?e*o:e}var Qh=(e,t,r,o,n)=>{let a=t!==1?jh(e,r,t):e;return o!==0&&(a=Zl(a,o,n)),a},Zh=(e,t)=>{if(!t)return e;let r=e[1]-e[0];if(r>=t[1]-t[0])return [t[0],t[1]];let[o,n]=e;return n>t[1]&&(n=t[1],o=n-r),o<t[0]&&(o=t[0],n=o+r),[o,n]},X1=e=>typeof requestAnimationFrame=="function"?requestAnimationFrame(e):setTimeout(()=>e(0),0),q1=e=>{typeof cancelAnimationFrame=="function"?cancelAnimationFrame(e):clearTimeout(e);};function _h(e){let{groupRef:t}=e,r=Ze.useRef({xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0});r.current={xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0};let o=Ze.useRef(e.onCommit);o.current=e.onCommit;let n=Ze.useRef(e.panBoundsMs);n.current=e.panBoundsMs;let a=Ze.useRef(e.getPanBoundsMs);a.current=e.getPanBoundsMs;let i=Ze.useRef(e.settleMs??140);i.current=e.settleMs??140;let s=Ze.useRef(e.zoomIntent??(I=>I.ctrlKey));s.current=e.zoomIntent??(I=>I.ctrlKey);let d=Ze.useRef(e.onGestureStart);d.current=e.onGestureStart;let l=Ze.useRef(e.onFramePreview);l.current=e.onFramePreview;let c=Ze.useRef(null),u=Ze.useRef({scale:1,cursorFrac:.5,panDxPx:0,timer:null}),m=Ze.useRef(null),p=Ze.useRef(null),g=Ze.useRef(false),f=Ze.useCallback((I,E,O)=>{p.current={translateX:I,scaleX:E,preview:O},m.current==null&&(m.current=X1(()=>{m.current=null;let W=p.current;W!=null&&(t.current?.setAttribute("transform",`translate(${W.translateX},0) scale(${W.scaleX},1)`),l.current?.(W.preview));}));},[t]),x=Ze.useCallback(()=>{m.current!=null&&(q1(m.current),m.current=null),p.current=null,t.current?.removeAttribute("transform"),l.current?.(null);},[t]),b=Ze.useCallback(()=>{g.current||(g.current=true,d.current?.());},[]),y=Ze.useCallback(()=>{g.current=false;},[]),v=Ze.useCallback(()=>{u.current.timer!=null&&(clearTimeout(u.current.timer),u.current.timer=null);},[]),C=Ze.useCallback(()=>{u.current={scale:1,cursorFrac:.5,panDxPx:0,timer:null};},[]),w=Ze.useCallback(()=>{let{xDomain:I,plotWidthPx:E}=r.current,{scale:O,cursorFrac:W,panDxPx:z}=u.current;O===1&&z===0||o.current(Zh(Qh(I,O,W,z,E),a.current?.()??n.current));},[]),S=Ze.useCallback(()=>{u.current.timer!=null&&(v(),w(),C(),x());},[v,w,C,x]),T=Ze.useCallback(I=>{S(),I.currentTarget.setPointerCapture?.(I.pointerId),c.current={startX:I.clientX,dxPx:0},b();},[S,b]),P=Ze.useCallback(I=>{if(!c.current)return;c.current.dxPx=I.clientX-c.current.startX;let{xDomain:E,plotWidthPx:O}=r.current;f(c.current.dxPx,1,Zl(E,c.current.dxPx,O));},[f]),k=Ze.useCallback(I=>{if(!c.current)return;let{dxPx:E}=c.current;c.current=null,x(),y(),E!==0&&o.current(Zh(Zl(r.current.xDomain,E,r.current.plotWidthPx),a.current?.()??n.current));},[x,y]),M=Ze.useCallback(()=>{c.current&&(c.current=null,x(),y());},[x,y]),D=Ze.useRef(null),R=Ze.useCallback(I=>{if(D.current?.(),D.current=null,!I)return;let E=O=>{if(c.current)return;let{plotWidthPx:W,plotLeftPx:z}=r.current,F=Fp(O.deltaY,O.deltaMode),Y=Fp(O.deltaX,O.deltaMode),U=s.current(O);if(!U&&Y===0)return;if(O.preventDefault(),b(),U){let B=Math.min(1,Math.max(0,(O.clientX-I.getBoundingClientRect().left)/Math.max(1,W)));u.current.scale*=Math.exp(-F/200),u.current.cursorFrac=B;}else u.current.panDxPx-=Y;let{scale:V,cursorFrac:J,panDxPx:G}=u.current;f((z+J*W)*(1-V)+G,V,Qh(r.current.xDomain,V,J,G,W)),v(),u.current.timer=setTimeout(()=>{w(),C(),x(),y();},i.current);};I.addEventListener("wheel",E,{passive:false}),D.current=()=>I.removeEventListener("wheel",E);},[f,x,v,w,C,b,y]);return Ze.useEffect(()=>()=>{D.current?.(),D.current=null,x(),u.current.timer!=null&&clearTimeout(u.current.timer);},[x]),{onPointerDown:T,onPointerMove:P,onPointerUp:k,onPointerCancel:M,wheelTargetRef:R,gestureActiveRef:g}}var rx=e=>e.type===kn||e.type===na,eR=({children:e,title:t,headerActions:r,headerControls:o,viewport:n,panBounds:a,getPanBounds:i,onViewportChange:s,onPlotWidthChange:d,yFormatter:l={type:"number"},yDomain:c,referenceLines:u,cameraSync:m,parentWidth:p=0,parentHeight:g=0})=>{let[f,x]=Ze.useState(null),b=Ze.useRef(null),y=Ze.useRef(0),v=Ze.useId(),C=Ze.useRef(null),w=Ze.useRef(null),S=Ze.useRef(null),{colorMode:T}=er(),P=Ze.useMemo(()=>Wo(),[T]),k=Ze.useMemo(()=>Di(),[T]),{datasets:M,seriesMetadata:D,seriesTypes:R}=Ze.useMemo(()=>{let oe=Ze.Children.toArray(e).filter(ne=>Ze.isValidElement(ne)&&rx(ne)),we=oe.filter(ne=>ne.props.data).length,X=[],K=[],de=[];return oe.forEach((ne,ke)=>{let ve=ne.props;if(!ve.data)return;X.push(ve.data);let ue=("color"in ve&&ve.color?ve.color:void 0)||(we===1?k:P[ke%P.length]),Z=ne.type===kn;K.push({label:"label"in ve&&ve.label||`Series ${X.length}`,color:ue,...Z&&"baseline"in ve&&ve.baseline!==void 0?{baseline:ve.baseline,tooltipRange:"tooltipRange"in ve&&ve.tooltipRange||false}:{}}),de.push(Z?"area":"line");}),{datasets:X,seriesMetadata:K,seriesTypes:de}},[e,k,P]),I=oa(t),E=I.expandedSize?.width??p,O=r||I.action?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r,I.action]}):void 0,{headerRef:W,headerHeight:z}=Xa(!!O,!!o),F=Math.max(100,(I.expandedSize?.height??g)-z-60),Y=Ze.useMemo(()=>[new Date(n.startMs),new Date(n.endMs)],[n.startMs,n.endMs]),U=Ze.useMemo(()=>{let oe=M.flat(),we=oe.filter(X=>{let K=X.xValue.getTime();return K>=n.startMs&&K<=n.endMs});return we.length>0?we:oe},[M,n.startMs,n.endMs]),V=Ze.useMemo(()=>{let oe=Zi(U,F,l,c);if(!c){let[we,X]=oe.domain();X>we&&oe.domain([we,X+(X-we)*.05]);}return oe},[U,F,l,c]),J=Ze.useRef(JSON.stringify(l)),G=Ze.useRef(null),B=Ze.useMemo(()=>{let[oe,we]=V.domain(),X=Math.max(Math.abs(oe),Math.abs(we)),K=JSON.stringify(l);if(K!==J.current&&(J.current=K,G.current=null),G.current!==null)return G.current;if(X===0)return ai(l,0);let de=ai(l,X);return G.current=de,de},[V,l]),N=Ze.useMemo(()=>{let oe=F-Ye.top-Ye.bottom;return ii(oe)},[F]),h=Ze.useMemo(()=>{let oe=Or(B),we=oe.tickFormat||oe.format,K=V.ticks(N).map(ke=>we(ke)),de=Pn(K,12,"system-ui"),ne=Math.ceil(de)+12;return {...Ye,left:Math.max(ne,30)}},[V,B,N]),L=Ze.useMemo(()=>scale.scaleTime({domain:Y,range:[h.left,E-h.right]}),[Y,E,h]),A=Ze.useMemo(()=>[n.startMs,n.endMs],[n.startMs,n.endMs]),j=Ze.useMemo(()=>a?[a.startMs,a.endMs]:void 0,[a]),ae=Ze.useCallback(oe=>{s({startMs:oe[0],endMs:oe[1]});},[s]),_=E-h.left-h.right,ee=Ze.useCallback(()=>x(null),[]),ie=Ze.useRef({}),Ee=Ze.useRef(m);Ee.current=m;let le=Ze.useCallback(oe=>{w.current?.setPreview(oe),S.current?.setPreview(oe),Ee.current?.publish(ie.current,oe);},[]),{onPointerDown:ge,onPointerMove:ce,onPointerUp:pe,onPointerCancel:Te,wheelTargetRef:et,gestureActiveRef:Be}=_h({xDomain:A,plotWidthPx:_,plotLeftPx:h.left,groupRef:C,onCommit:ae,onGestureStart:ee,onFramePreview:le,...j?{panBoundsMs:j}:{},...i?{getPanBoundsMs:()=>{let oe=i();return [oe.startMs,oe.endMs]}}:{}}),$t=Ze.useRef({startMs:n.startMs,endMs:n.endMs,left:0,width:0});$t.current={startMs:n.startMs,endMs:n.endMs,left:h.left,width:_},Ze.useEffect(()=>{if(!m)return;let oe=()=>{C.current?.removeAttribute("transform"),w.current?.setPreview(null),S.current?.setPreview(null);},we=K=>{if(Be.current)return;if(K==null){oe();return}let{startMs:de,endMs:ne,left:ke,width:ve}=$t.current,$=ne-de,ue=K[1]-K[0];if($<=0||ue<=0||ve<=0)return;let Z=$/ue,be=ke*(1-Z)+(de-K[0])*ve/ue;C.current?.setAttribute("transform",`translate(${be},0) scale(${Z},1)`),w.current?.setPreview(K),S.current?.setPreview(K);},X=m.subscribe(ie.current,we);return ()=>{X(),Be.current||oe();}},[m,Be]),Ze.useEffect(()=>{d?.(Math.max(0,E-h.left-h.right));},[E,h,d]);let yt=Ze.useCallback(oe=>{if(Be.current)return;let{left:we}=b.current?.getBoundingClientRect()||{left:0},X=oe.clientX-we;oe.timeStamp-(y.current||0)<16||(y.current=oe.timeStamp,x(Kh({mouseX:X,datasets:M,seriesMetadata:D,seriesTypes:R,xScale:L,yScale:V,plotLeft:h.left,plotRight:E-h.right})));},[M,D,R,L,V,E,h,Be]),ir=Ze.useCallback(()=>x(null),[]),Rt=Fl(),tt={width:E,height:F,xScale:L,yScale:V,yFormatter:B,animationSettings:Il,entrance:Rt,tooltip:{data:f,show:x,hide:()=>x(null)},datasets:M,seriesMetadata:D,seriesTypes:R},Gt=0,te=[];Ze.Children.toArray(e).forEach(oe=>{if(!Ze.isValidElement(oe)){te.push(oe);return}if(rx(oe)){let we=Gt;Gt++;let X=oe.props;te.push(Ze__namespace.default.cloneElement(oe,{...X,color:D[we]?.color,animate:false}));}else te.push(oe);});let Oe=D.map(oe=>({category:oe.label,fill:oe.color})),Ue=Kl({datasets:M,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:D.map(oe=>oe.label),timestamp:true},svgRef:b}),Dt=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:t}),jsxRuntime.jsx("g",{children:V.ticks(N).map(oe=>{let we=Math.abs(oe)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:h.left,y:V(oe)},to:{x:E-h.right,y:V(oe)},stroke:we?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:we?1.5:1},`grid-line-${oe}`)})}),jsxRuntime.jsx(Ip,{ref:S,scale:L,width:E-h.left-h.right,top:V.range()[1],bottom:V.range()[0]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:v,children:jsxRuntime.jsx("rect",{x:L.range()[0],y:V.range()[1],width:L.range()[1]-L.range()[0],height:V.range()[0]-V.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${v})`,children:jsxRuntime.jsx("g",{"data-camera-plot-group":"",ref:C,children:te})}),u&&u.length>0&&jsxRuntime.jsx("g",{children:u.map((oe,we)=>{let X=V(oe.value),K=oe.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:h.left,y:X},to:{x:E-h.right,y:X},stroke:K,strokeWidth:1.5,strokeDasharray:"6 4"}),oe.label&&jsxRuntime.jsx("text",{x:E-h.right-4,y:X-4,textAnchor:"end",fontSize:11,fill:K,children:oe.label})]},`ref-line-${we}`)})}),jsxRuntime.jsx(Ap,{ref:w,top:F-h.bottom,scale:L,width:E-h.left-h.right}),jsxRuntime.jsx(Zr.Left,{left:h.left,scale:V,yFormatter:B,height:F-h.top-h.bottom}),f&&!f.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(shape.Line,{"data-testid":"chart-hover-crosshair",from:{x:L(f.xValue),y:V.range()[1]},to:{x:L(f.xValue),y:V.range()[0]},stroke:"var(--color-text-secondary)",strokeWidth:1,strokeDasharray:"3 3",opacity:.7}),f.series.filter(oe=>oe.type!=="bar"&&oe.showMarker!==false).map(oe=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:L(f.xValue),cy:V(oe.chartY??oe.value),r:8,fill:"white",stroke:oe.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:L(f.xValue),cy:V(oe.chartY??oe.value),r:4,fill:oe.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${oe.label}`))]}),jsxRuntime.jsx("rect",{"data-camera-surface":"",x:h.left,y:h.top,width:E-h.left-h.right,height:F-h.top-h.bottom,fill:"transparent",style:{cursor:"grab",touchAction:"none"},onMouseMove:yt,onMouseLeave:ir,onPointerDown:ge,onPointerMove:ce,onPointerUp:pe,onPointerCancel:Te,ref:et})]});return I.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(Qr.Provider,{value:tt,children:[jsxRuntime.jsx(qa,{title:t,controls:o,actions:O,containerRef:W,marginRight:h.right}),jsxRuntime.jsx("svg",{width:E,height:F,className:"overflow-visible",ref:b,role:"img","aria-label":t,children:Dt}),jsxRuntime.jsx(ko,{data:f,formatter:B}),jsxRuntime.jsx(li,{onExport:Ue,items:Oe,marginLeft:0,marginRight:h.right})]})}))},_l=responsive.withParentSize(eR);function $l(e,t,r,o){if(r.length===0)throw new Error("tierForViewport: resolution ladder is empty");let n=[...r].sort((s,d)=>s.bucketMs-d.bucketMs),a=e/Math.max(1,t*o.targetPointsPerPx),i=Math.max(o.nativeMs,a);return n.find(s=>s.bucketMs>=i)??n[n.length-1]}function tR(e,t){return Math.floor(e/t.tileSpanMs)}function jo(e,t,r){let o=tR(e.startMs,t)-r,n=Math.ceil(e.endMs/t.tileSpanMs)-1+r,a=[];for(let i=o;i<=n;i++)a.push({tierId:t.id,index:i,startMs:i*t.tileSpanMs,endMs:(i+1)*t.tileSpanMs});return a}var or=(e,t)=>`${e}:${t}`,la=e=>!!e&&(e.line.length>0||(e.band?.length??0)>0||Object.values(e.lines??{}).some(t=>t.length>0));var ox={erroredTiles:0};function Op(e,t){let r=new Map,o=new Map,n=new Map,a=0;for(let m of e){let p=t.get(or(m.tierId,m.index));if(p&&(p.error&&(a+=1),!!p.data)){for(let g of p.data.line)r.set(g.xValue.getTime(),g);for(let g of p.data.band??[])o.set(g.xValue.getTime(),g);for(let[g,f]of Object.entries(p.data.lines??{})){let x=n.get(g);x||(x=new Map,n.set(g,x));for(let b of f)x.set(b.xValue.getTime(),b);}}}let i=(m,p)=>m.xValue.getTime()-p.xValue.getTime(),s=[...r.values()].sort(i),d=[...o.values()].sort(i),l=Object.fromEntries([...n.entries()].map(([m,p])=>[m,[...p.values()].sort(i)])),c,u;for(let m of [s,d,...Object.values(l)]){if(!m.length)continue;let p=m[0].xValue.getTime(),g=m[m.length-1].xValue.getTime();c=Math.min(c??p,p),u=Math.max(u??g,g);}return {line:s,band:d,lines:l,coverage:{earliestMs:c,latestMs:u,erroredTiles:a}}}function rR(e,t,r,o){let n=jo(e,t,0).filter(a=>o==null||a.startMs<o);return n.length===0?false:n.every(a=>{let i=r.get(or(a.tierId,a.index));return i!=null&&(i.status==="loaded"||i.status==="empty")})}function nx(e,t,r){return jo(e,t,0).some(n=>{let a=r.get(or(n.tierId,n.index));return a?.status==="loaded"&&la(a.data)})}function oR(e,t){if(!la(e))return false;let r=e.coverage.earliestMs,o=e.coverage.latestMs;return r==null||o==null?false:r<t.endMs&&o>t.startMs}function ax({viewport:e,targetTier:t,ladder:r,store:o,overscanTiles:n,prev:a,prevViewport:i,maxFutureMs:s}){let d=rR(e,t,o,s),l=jo(e,t,0).filter(p=>s==null||p.startMs<s).map(p=>o.get(or(p.tierId,p.index))),c=l.every(p=>p?.revalidated&&!p.refreshing&&!p.error),u=nx(e,t,o);if(d&&(!u||a?.isFallback)&&l.some(p=>p?.refreshing||p?.error||p?.revalidated===false)&&a&&a.targetTier.id===t.id&&i?.startMs===e.startMs&&i?.endMs===e.endMs)return a;if(d&&(c||u)){let p=jo(e,t,n),{line:g,band:f,lines:x,coverage:b}=Op(p,o);return {line:g,band:f,lines:x,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:b}}let m=r.findIndex(p=>p.id===t.id);for(let p=m+1;p<r.length;p++){let g=r[p];if(nx(e,g,o)){let f=jo(e,g,n),{line:x,band:b,lines:y,coverage:v}=Op(f,o);return {line:x,band:b,lines:y,renderTier:g,targetTier:t,isFallback:true,isStale:false,coverage:v}}}if(d){let p=jo(e,t,n),{line:g,band:f,lines:x,coverage:b}=Op(p,o);return {line:g,band:f,lines:x,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:b}}return a?oR(a,e)?{...a,targetTier:t,isFallback:true,isStale:false}:{line:a.line,band:a.band,lines:a.lines,renderTier:null,targetTier:t,isFallback:true,isStale:true,coverage:ox}:{line:[],band:[],lines:{},renderTier:null,targetTier:t,isFallback:false,isStale:false,coverage:ox}}var zp=new Map;function ix(e,t){switch(t.type){case "reset":return new Map;case "request":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);t.refresh&&n?.data?r.set(o,{...n,refreshing:true,error:void 0,revalidated:false}):(!n||n.status==="error")&&r.set(o,{status:"loading",refreshing:!!t.refresh});}return r}case "cancel":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);n&&r.set(o,{...n,refreshing:false,status:n.data?n.status:"error"});}return r}case "fulfilled":{let r=new Map(e);return r.set(t.id,{status:la(t.data)?"loaded":"empty",data:t.data,revision:(e.get(t.id)?.revision??0)+1,revalidated:t.refresh||e.get(t.id)?.revalidated}),r}case "failed":{let r=new Map(e),o=e.get(t.id);return r.set(t.id,o?.data?{...o,refreshing:false,error:t.error}:{status:"error",error:t.error}),r}default:return e}}function lx({refs:e,refsKey:t,store:r,tier:o,viewport:n,fetchTile:a,dispatch:i,concurrency:s,maxFutureMs:d,resetKey:l,refreshKey:c,refreshEnabled:u=true,automaticLoads:m=false}){let p=Ze.useRef({resetKey:l,refreshKey:c,refreshEnabled:u});Ze.useLayoutEffect(()=>{p.current={resetKey:l,refreshKey:c,refreshEnabled:u};},[l,c,u]);let g=Ze.useRef(new Map),f=Ze.useRef(new Map),x=Ze.useRef(0),b=Ze.useRef(false),y=Ze.useRef(null),v=Ze.useRef(new Map),C=Ze.useRef({resetKey:l,refreshKey:c,refreshEnabled:u}),w=Ze.useRef(`${o.id}:${n.startMs}:${n.endMs}`),[S,T]=Ze.useReducer(k=>k+1,0),P=Ze.useCallback(()=>{for(let k of g.current.values())k.ac.abort();g.current.clear(),f.current.clear(),y.current=null,b.current=false,v.current.clear();},[]);return Ze.useEffect(()=>{let k=`${o.id}:${n.startMs}:${n.endMs}`,M=C.current.resetKey!==l,D=C.current.refreshKey!==c,R=C.current.refreshEnabled&&!u;if(M&&P(),u)(D||b.current)&&!M&&(b.current=false,x.current+=1,y.current={generation:x.current,seen:new Set});else {b.current||(b.current=f.current.size>0||[...g.current.values()].some(Y=>Y.refresh));let F=[...f.current.keys()];for(let Y of F)v.current.set(Y,w.current);f.current.clear(),y.current=null;for(let[Y,U]of g.current)!U.refresh&&!(R&&U.automatic)||(U.ac.abort(),g.current.delete(Y),F.push(Y),v.current.set(Y,R&&w.current===k?k:U.viewportKey));F.length&&i({type:"cancel",ids:F});}C.current={resetKey:l,refreshKey:u||M?c:C.current.refreshKey,refreshEnabled:u},w.current=k;let I=y.current;if(I){let F=[];for(let Y of e){let U=or(Y.tierId,Y.index);I.seen.has(U)||d!=null&&Y.startMs>=d||(I.seen.add(U),f.current.set(U,I.generation),F.push(U));}F.length&&i({type:"request",ids:F,refresh:true});}let E=new Set(e.map(F=>or(F.tierId,F.index)));for(let F of f.current.keys())E.has(F)||(f.current.delete(F),v.current.set(F,k),i({type:"cancel",ids:[F]}));for(let[F,Y]of g.current)(Y.tierId!==o.id||Y.refresh&&!E.has(F))&&(Y.ac.abort(),g.current.delete(F),v.current.set(F,k),i({type:"cancel",ids:[F]}));let O=e.filter(F=>{if(d!=null&&F.startMs>=d)return false;let Y=or(F.tierId,F.index);if(g.current.has(Y))return false;let U=r.get(Y),V=v.current.get(Y);return V===k&&!f.current.has(Y)?false:f.current.has(Y)||V!=null||!U||U.status==="loading"}),W=(n.startMs+n.endMs)/2;O.sort((F,Y)=>Math.abs((F.startMs+F.endMs)/2-W)-Math.abs((Y.startMs+Y.endMs)/2-W));let z=O.slice(0,Math.max(0,s-g.current.size));for(let F of z){let Y=or(F.tierId,F.index),U=f.current.get(Y),V=U!==void 0,J={ac:new AbortController,tierId:F.tierId,generation:U??x.current,refresh:V,automatic:m&&u,viewportKey:k};v.current.delete(Y),g.current.set(Y,J),i({type:"request",ids:[Y],refresh:V});let G=d!=null?Math.min(F.endMs,d):F.endMs,B=()=>!J.ac.signal.aborted&&p.current.resetKey===l&&g.current.get(Y)===J&&(!J.automatic||p.current.refreshEnabled)&&(!V||p.current.refreshEnabled&&p.current.refreshKey===c)&&(f.current.get(Y)??J.generation)===J.generation;Promise.resolve().then(()=>{if(J.ac.signal.aborted)throw new DOMException("Aborted","AbortError");return a(o,F.startMs,G,J.ac.signal,{reason:V?"refresh":"load",isCurrent:B})}).then(N=>{B()&&i({type:"fulfilled",id:Y,data:N,refresh:V});}).catch(N=>{if(!B())return;let h=N instanceof Error?N.message:String(N);i({type:"failed",id:Y,error:new Error(`tile fetch failed (tile ${Y}, tier ${o.id}): ${h}`)});}).finally(()=>{g.current.get(Y)===J&&(g.current.delete(Y),f.current.get(Y)===J.generation&&f.current.delete(Y),!f.current.size&&![...g.current.values()].some(N=>N.refresh)&&(y.current=null),T());});}},[e,t,r,a,o,n,i,s,d,l,c,u,m,P,S]),Ze.useEffect(()=>P,[P]),{abortAll:P}}var dx=1.3,cR=25e4,dR=3;function uR(e,t,r){let o=t.tileSpanMs/t.bucketMs,n=Math.max(1,Math.floor(cR/o/r));return Math.min(Math.max(1,Math.ceil(.5*e/t.tileSpanMs)),n)}function ux(e){let{fetchTile:t,ladder:r,nativeMs:o,viewport:n,widthPx:a,maxFutureMs:i,targetPointsPerPx:s=1,concurrency:d=3,tileCostSeriesCount:l=dR,resetKey:c,refreshKey:u,refreshEnabled:m,automaticLoads:p}=e,g=Ze.useMemo(()=>({targetPointsPerPx:s,nativeMs:o}),[s,o]),[f,x]=Ze.useState(()=>$l(n.endMs-n.startMs,Math.max(1,a),r,g)),[b,y]=Ze.useReducer(ix,zp),[v,C]=Ze.useState(c),w=v===c?b:zp,S=Ze.useRef(null),T=Ze.useRef(null);v!==c&&(C(c),S.current=null,T.current=null,y({type:"reset"}));let P=Ze.useRef(n.endMs-n.startMs),k=Ze.useRef(g);Ze.useEffect(()=>{let B=n.endMs-n.startMs,N=$l(B,Math.max(1,a),r,g);if(N.id===f.id){k.current=g;return}let L=$l(B,Math.max(1,a),r,k.current).id!==N.id,A=B/P.current;(L||A>dx||A<1/dx)&&(P.current=B,k.current=g,x(N));},[n,a,r,f.id,g]);let M=n.endMs-n.startMs,D=Ze.useMemo(()=>uR(M,f,l),[M,f,l]),R=Ze.useMemo(()=>jo(n,f,D),[n,f,D]),I=Ze.useMemo(()=>R.map(B=>or(B.tierId,B.index)).join(","),[R]),E=Ze.useRef(R);E.current=R;let O=Ze.useRef(n);O.current=n;let W=Ze.useRef(w);W.current=w,lx({refs:R,refsKey:I,store:w,tier:f,viewport:n,fetchTile:t,dispatch:y,concurrency:d,resetKey:c,refreshKey:u,refreshEnabled:m,automaticLoads:p,...i!=null?{maxFutureMs:i}:{}});let z=Ze.useMemo(()=>E.current.map(B=>{let N=or(B.tierId,B.index),h=w.get(N);return `${N}:${h?.status??"\u2205"}:${h?.revision??0}:${!!h?.error}`}).join("|"),[I,w]),F=Ze.useMemo(()=>{let B=ax({viewport:O.current,targetTier:f,ladder:r,store:W.current,overscanTiles:D,prev:S.current,prevViewport:T.current,maxFutureMs:i});return S.current=B,T.current=O.current,B},[z,f,r,D,n.startMs,n.endMs,i,c]),Y=Ze.useMemo(()=>E.current.some(B=>W.current.get(or(B.tierId,B.index))?.status==="loading"),[z]),U=Ze.useMemo(()=>{let B=E.current[0];return B?W.current.get(or(B.tierId,B.index))?.status==="empty":false},[z]),V=R.map(B=>w.get(or(B.tierId,B.index))),J=V.some(B=>B?.refreshing),G=V.find(B=>B?.error)?.error;return {tier:f,series:F,loading:Y,refreshing:J,refreshError:G,atDataStart:U}}function Gp(e){let{initialViewport:t,...r}=e,[o,n]=Ze.useState(t),a=ux({...r,viewport:o}),i=Ze.useCallback(d=>n(d),[]),s=Ze.useCallback(d=>n(d),[]);return {viewport:o,onViewportChange:i,jumpTo:s,...a}}var pR={sm:"gap-4 px-6 py-8",md:"gap-5 px-8 py-12",lg:"gap-6 px-10 py-16"},mR={sm:"xs",md:"sm",lg:"md"},fR={sm:Mt("bodySm"),md:Mt("bodySm"),lg:Mt("bodyMd")},gR={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-16 w-16"},bR={sm:20,md:24,lg:32},hR={center:"items-center text-center [&_.empty-state-actions]:justify-center [&_.empty-state-actions]:text-center",start:"items-start text-left [&_.empty-state-actions]:justify-start [&_.empty-state-actions]:text-left"},xR={mesh:"radial-gradient(at 20% 20%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 80% 80%, rgba(68, 74, 225, 0.045) 0px, transparent 45%), radial-gradient(at 50% 50%, rgba(68, 74, 225, 0.03) 0px, transparent 50%)","top-fade":"linear-gradient(to bottom, rgba(68, 74, 225, 0.06) 0%, rgba(68, 74, 225, 0.02) 60%, transparent 100%)",center:"radial-gradient(ellipse 600px 400px at center, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",corners:"radial-gradient(at 0% 0%, rgba(68, 74, 225, 0.06) 0px, transparent 40%), radial-gradient(at 100% 100%, rgba(68, 74, 225, 0.045) 0px, transparent 40%)",bottom:"radial-gradient(ellipse 700px 300px at 50% 100%, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",asymmetric:"radial-gradient(at 15% 30%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 85% 70%, rgba(68, 74, 225, 0.04) 0px, transparent 50%)"};function ec({icon:e,title:t,description:r,primaryAction:o,secondaryAction:n,actions:a,size:i="md",alignment:s="center",variant:d="default",spotlightPattern:l="mesh",fullHeight:c=false,className:u}){let m=i==="sm"?"sm":"md",p=d==="spotlight",g=p?{background:xR[l]}:void 0,f=()=>a?jsxRuntime.jsx("div",{className:"empty-state-actions mt-2 flex flex-wrap items-center gap-3",children:a}):o||n?jsxRuntime.jsxs("div",{className:"empty-state-actions mt-2 flex flex-col gap-3",children:[o&&(o.href?jsxRuntime.jsx(re,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,href:o.href,children:o.label}):jsxRuntime.jsx(re,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,children:o.label})),n&&jsxRuntime.jsx(pt,{href:n.href||"#",variant:"muted",onPress:n.onPress,className:Mt("labelMd"),children:n.label})]}):null;return jsxRuntime.jsxs("section",{"data-testid":"empty-state",role:"status","aria-live":"polite",className:tailwindMerge.twMerge("flex w-full flex-col rounded-xl text-text-primary",pR[i],hR[s],c?"h-full justify-center":"",p?"relative overflow-hidden":"",u),style:g,children:[e&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center rounded-full border border-border-muted bg-background-muted text-text-secondary",gR[i]),children:jsxRuntime.jsx(H,{name:e,size:bR[i]})}),jsxRuntime.jsx(xr,{size:mR[i],tag:"h2",className:"text-text-secondary",children:t}),r&&jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("max-w-xs text-text-secondary whitespace-pre-line",fR[i]),children:r}),f()]})}var vR=1440*60*1e3,CR=[{id:"5y",label:"5 years",days:5*365},{id:"year",label:"Year",days:365},{id:"month",label:"Month",days:30},{id:"week",label:"Week",days:7},{id:"day",label:"24h",days:1}],SR=[{id:"day",days:1},{id:"week",days:7},{id:"month",days:30}];function mx(e,t=Date.now){return SR.map(({id:r,days:o})=>({id:r,label:e[r],getRange:()=>{let n=new Date(t());return {after:dateFns.subDays(n,o),before:n}}}))}function tc(e=Date.now){return CR.map(({id:t,label:r,days:o})=>({id:t,label:r,getRange:()=>{let n=e();return {after:new Date(n-o*vR),before:new Date(n)}}}))}function RR({selectionState:e,isDisabled:t}){let r=`${ot} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-primary group-hover:bg-background-muted group-pressed:bg-background-muted",middle:["bg-background-selected group-hover:bg-background-muted forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-feedback-error-background forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-background-muted forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-feedback-error-background forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:"bg-action-default text-[color:var(--color-action-default-text)] group-invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] forced-colors:text-[HighlightText]"},n=t?"text-text-disabled forced-colors:text-text-disabled font-light":"";return [r,o[e],n].filter(Boolean).join(" ")}function pi({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{...t,children:[jsxRuntime.jsx(Ml,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"w-full border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(El,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:"selection-start:rounded-s-full selection-end:rounded-e-full [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm border-0 outside-month:text-text-disabled invalid:selected:bg-feedback-error-background forced-colors:selected:bg-[Highlight] forced-colors:selected:text-[HighlightText] forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full [&]:border-0",children:({formattedDate:o,isSelected:n,isSelectionStart:a,isSelectionEnd:i,isFocusVisible:s,isDisabled:d})=>jsxRuntime.jsx("span",{className:RR({selectionState:n&&(a||i)?"cap":n?"middle":"none",isDisabled:d}),children:o})})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function gx(e){return e==="brand"?"primary":e==="default"||e==="secondary"||!e?"subtle":e}var ER={sm:"h-[var(--control-sm-height)] text-xs",md:"h-[var(--control-md-height)] text-sm",lg:"h-[var(--control-lg-height)] text-base",xl:"h-[var(--control-xl-height)] text-lg"},LR={sm:14,md:16,lg:18,xl:20},DR=({isSelected:e,isFirst:t,isLast:r,isDisabled:o,variant:n="subtle"})=>{let a=gx(n),i=a==="primary"?"focus-visible:outline-action-primary":"focus-visible:outline-[color:var(--color-action-secondary-text)]";return a==="subtle"?tailwindMerge.twMerge(ot(),"focus-visible:outline-[color:var(--color-action-secondary-text)]","px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-background-muted text-text-primary font-medium forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText]",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed"):tailwindMerge.twMerge(ot(),i,"px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-action-primary text-[color:var(--color-action-primary-text)] font-semibold forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText] hover:font-semibold",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed")};function oc({options:e,value:t,onChange:r,size:o="md",className:n,isDisabled:a,variant:i="subtle",iconOnly:s=false,"aria-label":d}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-flex overflow-hidden rounded-[var(--control-border-radius)]",gx(i)==="subtle"?"border border-border-muted":"border-2 border-border-muted",ER[o],n),role:"group","aria-label":d,children:e.map((l,c)=>{let u=s&&!!l.icon;return jsxRuntime.jsxs(reactAriaComponents.ToggleButton,{isSelected:t===l.id,onChange:()=>r(l.id),className:DR({isSelected:t===l.id,isFirst:c===0,isLast:c===e.length-1,isDisabled:a,variant:i}),isDisabled:a,"aria-label":l.label,children:[l.icon&&jsxRuntime.jsx(H,{name:l.icon,size:LR[o]}),u?jsxRuntime.jsx("span",{className:"sr-only",children:l.label}):jsxRuntime.jsx("span",{className:"inline-flex flex-col items-center after:content-[attr(data-label)] after:font-semibold after:h-0 after:overflow-hidden after:invisible","data-label":l.label,children:l.label})]},l.id)})})}function BR(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Yp(e){return BR(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var Cx=120*1e3,VR=.02,Sx={FIVE_MINUTES:0,FIFTEEN_MINUTES:1,HOUR:2,DAY:3,WEEK:4,MONTH:5,YEAR:6},OR=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function nc({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,showReset:d=true,restrictToSingleDay:l=false,presetRanges:c=[],windowSizeOptions:u=OR,autoAdjustWindowSize:m=false,className:p}){let[g,f]=Ze.useState(0),x=Ze.useRef(null),[b,y]=Ze.useState(false),[v,C]=Ze.useState(null),w=N=>{let L=(N.before.getTime()-N.after.getTime())/(1e3*60*60);return L<=24?"FIFTEEN_MINUTES":L<=72||L<=168?"HOUR":("DAY")};Ze.useEffect(()=>{if(m&&!b&&o){let N=w(e);o(N);}},[e,m,b,o]);let S=N=>{let h;for(let L of c){let A=L.getRange(),j=(A.before.getTime()-A.after.getTime())*VR,ae=Math.abs(A.after.getTime()-N.after.getTime()),_=Math.abs(A.before.getTime()-N.before.getTime());if(ae>j||_>j)continue;let ee=ae+_;(!h||ee<h.distance)&&(h={id:L.id,distance:ee});}return h?.id},T=v&&c.some(N=>N.id===v.id)&&Math.abs(v.after-e.after.getTime())<=Cx&&Math.abs(v.before-e.before.getTime())<=Cx?v.id:S(e),P=Yp(e.after),k=Yp(e.before),M=new Date(k.getTime()-1),D={start:date.fromDate(P,date.getLocalTimeZone()),end:date.fromDate(M,date.getLocalTimeZone())};Ze.useEffect(()=>{let N=new ResizeObserver(h=>{for(let L of h)f(L.contentRect.width);});return x.current&&N.observe(x.current),()=>{x.current&&N.unobserve(x.current);}},[]);let R=[...u].sort((N,h)=>Sx[N.id]-Sx[h.id]),I=N=>{let h=N.toString(),L=c.find(A=>A.id===h);if(L){let A=L.getRange();C({id:h,after:A.after.getTime(),before:A.before.getTime()}),y(false),t(A,{presetId:h});}},E=N=>{if(N?.start&&N?.end){C(null);let h=new Date(N.start.year,N.start.month-1,N.start.day,0,0,0,0),L=new Date(N.end.year,N.end.month-1,N.end.day+1,0,0,0,0);t({after:h,before:L});}},O=N=>{if(N){C(null);let h=new Date(N.year,N.month-1,N.day,0,0,0,0),L=new Date(N.year,N.month-1,N.day+1,0,0,0,0);t({after:h,before:L});}},W=N=>{o&&(y(true),o(N.toString()));},z=()=>{c.length>0&&I(c[0].id);},F=N=>Yp(N).toLocaleDateString("en-US"),Y=R.map(N=>({id:N.id,label:N.label,value:N.id})),U=c.map(N=>({id:N.id,label:N.label,value:N.id})),V=s?jsxRuntime.jsx("div",{className:"flex items-center rounded-md border border-border-muted bg-background-muted px-3 py-2 text-sm text-text-secondary",children:R.find(N=>N.id===r)?.label||r}):jsxRuntime.jsx(Ko,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:W,items:Y,size:"md","aria-label":"Select Window Size",children:N=>jsxRuntime.jsx(Cr,{id:N.id,"aria-label":N.label,size:"md",children:N.label},N.id)}),J=d&&!T&&c.length>0,G=l?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{className:"border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",children:[jsxRuntime.jsx(H,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:F(e.after)})]}),jsxRuntime.jsx(St,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ti,{"aria-label":"Select date",value:date.parseDate(P.toISOString().split("T")[0]),onChange:O})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{className:tailwindMerge.twMerge("border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",J&&"rounded-r-none"),variant:"secondary",children:[jsxRuntime.jsx(H,{name:"CalendarBlank",size:18}),!T&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${F(e.after)} - ${F(M)}`})]}),jsxRuntime.jsx(St,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(pi,{"aria-label":"Date range calendar",value:D,onChange:E})})]}),J&&jsxRuntime.jsx(re,{variant:"ghost",size:"md",onPress:z,children:"Reset"})]}),B=g<600;return jsxRuntime.jsx("div",{ref:x,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",p),children:B?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&G,a&&c.length>0&&jsxRuntime.jsx(Ko,{selectedKey:T??"",onSelectionChange:I,items:U,size:"md","aria-label":"Select Date Range",children:N=>jsxRuntime.jsx(Cr,{id:N.id,size:"md",children:N.label},N.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&V})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&G,a&&c.length>0&&jsxRuntime.jsx(oc,{options:c.map(N=>({id:N.id,label:N.label})),value:T??"",onChange:I,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&V})]})})}var GR={live:"Live",connecting:"Connecting\u2026",reconnecting:"Reconnecting\u2026",stale:"No signal",delayed:"Measured demand delayed","refresh-failed":"Update delayed"};function Nx({label:e,checked:t,onChange:r,status:o,disabledReason:n}){let a=Ze.useId(),i=t&&o==="live";return jsxRuntime.jsxs("div",{className:"flex max-w-full shrink-0 flex-col items-end gap-1",children:[jsxRuntime.jsxs(re,{variant:"ghost",size:"sm","aria-label":e,"aria-pressed":t,...n&&{"aria-describedby":a},isDisabled:!!n,onPress:()=>r(!t),className:t?"text-text-secondary":"text-text-tertiary",children:[jsxRuntime.jsx("span",{"aria-hidden":"true","data-live-indicator":i?"live":"neutral",className:`size-1.5 shrink-0 rounded-full ${i?"bg-error-base":"bg-text-tertiary"}`}),jsxRuntime.jsx("span",{"aria-live":"polite",children:t?GR[o]:"Static"})]}),n&&jsxRuntime.jsx("span",{id:a,className:"max-w-64 text-right text-xs text-text-tertiary",children:n})]})}var KR=1440*60*1e3,jp=6e4,Tx=(e,t)=>({startMs:t-e*KR,endMs:t}),YR=e=>({after:new Date(e.startMs),before:new Date(e.endMs)});function kx({source:e,title:t,liveControl:r,initialRange:o,viewportEnd:n,yFormatter:a,yDomain:i,referenceLines:s,emptyState:d,presetRanges:l,tierToWindow:c,windowSizeOptions:u,height:m=360,hint:p,dataBounds:g,onViewChange:f,followLatest:x=false,followLatestKey:b,children:y}){let[v,C]=Ze.useState(900),w=e.refreshEnabled!==false,S=g?.endMs,[T,P]=Ze.useState(()=>S??Date.now()),k=n?.getTime()??S,M=x&&n===void 0&&g===void 0,[D,R]=Ze.useState(true),[I,E]=Ze.useState(null),O=M&&D,[W,z]=Ze.useState({resetKey:e.resetKey,automatic:false}),F=n===void 0&&g===void 0&&D,Y=o?.days??30,U=Ze.useMemo(()=>Tx(Y,k??Date.now()),[Y,k]),V=Ze.useRef({resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:w,followLatestKey:b}),J=w&&(V.current.resetKey!==e.resetKey||V.current.refreshKey!==e.refreshKey||V.current.refreshEnabled===false),G=V.current.resetKey===e.resetKey,B=M&&V.current.followLatestKey!==b,N=S??(J||B?Date.now():T);Ze.useEffect(()=>{V.current={resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:w,followLatestKey:b},(J||B)&&(G&&z({resetKey:e.resetKey,automatic:true}),P(N));},[e.resetKey,e.refreshKey,w,b,J,B,N,G]);let[h,L]=Ze.useState(null),[A,j]=Ze.useState(null),ae=h??U,_=Gp({fetchTile:e.fetchTile,ladder:e.ladder,nativeMs:e.nativeMs,initialViewport:U,widthPx:v,maxFutureMs:N,tileCostSeriesCount:e.tileCostSeriesCount,resetKey:e.resetKey,...e.refreshKey!==void 0&&{refreshKey:e.refreshKey},refreshEnabled:w&&I===null,automaticLoads:(O||B)&&(W.resetKey===e.resetKey&&W.automatic||G&&(J||B))}),ee=_.series.targetTier.bucketMs,ie=M?(Math.floor(N/ee)+1)*ee:N,Ee=k==null?Math.max(ie,_.viewport.endMs):ie,le=Ze.useMemo(()=>({startMs:g?.startMs??0,endMs:Ee}),[g?.startMs,Ee]),ge=Le=>{let vt=k==null?Math.max(le.endMs,Date.now()):le.endMs,Bt=Math.min(Le.endMs-Le.startMs,vt-le.startMs),no=Math.max(Math.min(Le.endMs,vt),le.startMs+Bt);return {startMs:no-Bt,endMs:no}},ce=(Le,vt=true)=>{z({resetKey:e.resetKey,automatic:false});let Bt=Math.abs(le.endMs-Le)<=jp||Math.abs(Date.now()-Le)<=jp,no=vt&&Bt;w&&E(""),R(no),S==null&&P(Date.now());};Ze.useEffect(()=>{if(S!=null){P(S);return}if(!w)return;let Le,vt=(no=true)=>{let Xs=Date.now();no&&O&&z({resetKey:e.resetKey,automatic:true}),P(Xs);let Vd=ee-Xs%ee;Le=setTimeout(vt,Math.min(jp,Vd));},Bt=()=>{document.visibilityState==="visible"&&(clearTimeout(Le),vt());};return vt(false),document.addEventListener("visibilitychange",Bt),()=>{clearTimeout(Le),document.removeEventListener("visibilitychange",Bt);}},[S,ee,w,O,e.resetKey]);let pe=Ze.useRef(b);Ze.useEffect(()=>{let Le=pe.current!==b;pe.current=b,!(!Le||!M)&&(R(true),P(Date.now()));},[M,b]),Ze.useEffect(()=>{O&&w&&P(Date.now());},[O,w,e.resetKey,e.refreshKey]);let Te=_.jumpTo,{startMs:et,endMs:Be}=_.viewport;Ze.useEffect(()=>{if(!O)return;let Le=Math.max(Be-et,ee);ie===Be&&Le===Be-et||(z({resetKey:e.resetKey,automatic:true}),Te({startMs:ie-Le,endMs:ie}));},[O,ie,et,Be,ee,Te,e.resetKey]);let $t=Ze.useMemo(()=>tc(()=>k??Date.now()),[k]),yt=l??$t,ir=()=>{if(A&&"presetId"in A){let Le=yt.find(vt=>vt.id===A.presetId);if(Le){let vt=Le.getRange();return {startMs:vt.after.getTime(),endMs:vt.before.getTime()}}}return A&&"range"in A?A.range:Tx(Y,k??Date.now())},{coverage:Rt,renderTier:tt,targetTier:Gt,isFallback:te,isStale:Oe}=_.series,Ue=Gt.id,Dt=tt?.id??null,{startMs:oe,endMs:we}=_.viewport,X=Ze.useRef(f);Ze.useEffect(()=>{X.current=f;},[f]),Ze.useEffect(()=>{X.current?.({targetTierId:Ue,renderedTierId:Dt,viewport:{startMs:oe,endMs:we},followingLatest:O,atLiveEdge:F});},[Ue,Dt,oe,we,O,F]),Ze.useEffect(()=>{if(I===null)return;let Le=`${Ue}:${oe}:${we}`;E(I===Le?null:Le);},[I,Ue,oe,we]);let K=tt?tt.bucketMs*1.5:0,de=Le=>Le==null?"\u2014":new Date(Le).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ne=(Le,vt)=>{let Bt=vt-Le<1728e5?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{month:"short",day:"numeric",year:"numeric"},no=new Intl.DateTimeFormat("en-US",Bt);return `${no.format(new Date(Le))} \u2013 ${no.format(new Date(vt))}`},ke=O?_.viewport.endMs-_.viewport.startMs!==ae.endMs-ae.startMs:_.viewport.startMs!==ae.startMs||_.viewport.endMs!==ae.endMs,ve=Oe||_.loading&&Rt.earliestMs==null,$=(_.viewport.endMs-_.viewport.startMs)*.03,ue=!ve&&Rt.earliestMs!=null&&Rt.earliestMs>_.viewport.startMs+$,Z=!_.loading&&Rt.earliestMs==null&&Rt.latestMs==null&&!la(_.series)&&!Oe,be=oa(t),sr=y({series:_.series,gapMs:K}),ln=Ze.isValidElement(sr)&&sr.type===Ze.Fragment?sr.props.children:sr,oo=jsxRuntime.jsxs("div",{className:`flex flex-col gap-3${be.isExpanded?" h-full":""}`,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start gap-2",children:[jsxRuntime.jsx("div",{className:"min-w-0 flex-[1_1_16rem]",children:jsxRuntime.jsx(nc,{dateRange:YR(_.viewport),onDateRangeChange:(Le,vt)=>{let Bt=ge({startMs:Le.after.getTime(),endMs:Le.before.getTime()});ce(Bt.endMs,!!vt?.presetId),j(vt?.presetId?{presetId:vt.presetId}:{range:Bt}),L(Bt),_.jumpTo(Bt);},windowSize:c[Gt.id],windowSizeOptions:u,lockWindowSize:true,presetRanges:yt,allowDatePicker:true,showReset:false})}),jsxRuntime.jsxs("div",{className:"ml-auto flex max-w-full flex-wrap items-start gap-2",children:[r&&jsxRuntime.jsx(Nx,{...r,status:_.refreshError?"refresh-failed":r.status}),!be.isExpanded&&!Z&&be.action]})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-text-secondary",children:[jsxRuntime.jsxs("span",{children:["Window"," ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:ne(_.viewport.startMs,_.viewport.endMs)})]}),jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"\u2022"}),jsxRuntime.jsxs("span",{children:["Resolution ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:tt?.id??Gt.id}),te&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:[" \xB7 loading ",Gt.id]})]}),_.loading&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"loading\u2026"}),_.refreshError&&jsxRuntime.jsx("span",{role:"status",className:"text-text-tertiary",children:Rt.earliestMs==null?"Unable to load telemetry":"Refresh failed \xB7 showing previous data"}),ue&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:["showing available history from ",de(Rt.earliestMs)]}),!ue&&!ve&&_.atDataStart&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"no earlier data loaded"}),ke&&jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onPress:()=>{let Le=ge(ir());ce(Le.endMs,!(A&&"range"in A)),L(Le),_.jumpTo(Le);},children:"\u27F2 Reset"})]}),jsxRuntime.jsx("div",{className:`relative overflow-hidden rounded-md border border-border-subtle${be.isExpanded?" min-h-0 flex-1":""}`,style:be.isExpanded?void 0:{height:m},children:Z?jsxRuntime.jsx(ec,{title:d.title,description:d.description}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_l,{title:t,viewport:_.viewport,panBounds:le,getPanBounds:()=>({startMs:le.startMs,endMs:S??Math.max(le.endMs,Date.now())}),onViewportChange:Le=>{ce(Le.endMs),_.onViewportChange(Le);},onPlotWidthChange:C,...a&&{yFormatter:a},...i&&{yDomain:i},...s&&{referenceLines:s},children:ln}),_.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})}),p&&jsxRuntime.jsx("p",{className:"text-xs text-text-tertiary",children:p})]});return jsxRuntime.jsx(Pp,{children:be.present(oo)})}function cs({count:e,label:t="results",suffix:r,unknownLabel:o="\u2014",isLoading:n=false,className:a="",testId:i}){if(n)return jsxRuntime.jsx("div",{className:`flex items-center ${a}`,children:jsxRuntime.jsx(q,{width:80,height:16})});if(e===null)return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:o});let s=t.endsWith("s")?t.slice(0,-1):t,d=e===1&&!r?s:t,l=`${e.toLocaleString()}${r??""}${d?` ${d}`:""}`;return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:l})}var QR=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(t,r,e.className)};function $r({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,showSearchIcon:s,isClearable:d,onClear:l,type:c,validationResult:u,reserveErrorSpace:m=true,isLoading:p=false,descriptionPlacement:g="below",...f}){let[x,b]=Ze__namespace.default.useState(false),{isFocused:y,handleFocus:v,handleBlur:C}=vr(),w=c==="password",S=yl(p,300);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Ie(f.className,"group flex flex-col"),children:({isDisabled:T,isInvalid:P})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:g==="tooltip"||g==="inline"?t:void 0,descriptionPlacement:g,isRequired:a,children:e}),jsxRuntime.jsxs(Nt,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute top-1/2 -translate-y-1/2 transform flex items-center z-10",style:{left:9},children:(()=>{let k={sm:14,md:16,lg:18,xl:20}[o];return S?jsxRuntime.jsx(Jr,{size:k,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:k,className:`transition-colors ${y?"text-action-brand":"text-text-secondary"}`})})()}),jsxRuntime.jsx(Cl,{size:o,disabled:T,type:w?x?"text":"password":c,name:f.name,autoComplete:f.autoComplete,value:f.value,defaultValue:f.defaultValue,placeholder:f.placeholder,onFocus:k=>v(k,f.onFocus),onBlur:k=>C(k,f.onBlur),onChange:k=>f.onChange?.(k.target.value),style:s?{paddingLeft:{sm:28,md:32,lg:36,xl:37}[o]}:void 0,className:QR({isInvalid:P,isDisabled:T,isFocused:y,size:o,transparent:i,showSearchIcon:s,isClearable:d,hasValue:!!f.value,isPassword:w,className:typeof f.className=="string"?f.className:void 0})}),d&&f.value&&!T&&jsxRuntime.jsx(Yi,{onClick:()=>{l?l():f.onChange&&f.onChange("");},size:o}),w&&!T&&jsxRuntime.jsx("button",{type:"button",onClick:()=>b(!x),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":x?"Hide password":"Show password",onMouseDown:k=>{k.preventDefault(),k.stopPropagation();},children:jsxRuntime.jsx(H,{name:x?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-primary"})})]}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}function ua({value:e,onChange:t,onClear:r,placeholder:o="Search...",size:n="sm",className:a="",isLoading:i=false}){return jsxRuntime.jsx("div",{className:`flex-1 min-w-0 sm:max-w-sm ${a}`,children:jsxRuntime.jsx($r,{value:e,onChange:t,placeholder:o,showSearchIcon:true,isClearable:!!e&&!!r,onClear:r,size:n,"aria-label":o,reserveErrorSpace:false,isLoading:i})})}function ds({value:e,options:t,onChange:r,direction:o,onDirectionChange:n,showLabel:a=true,size:i="sm",className:s="",compact:d=false}){let[l,c]=Ze.useState(false),u=o!==void 0&&n!==void 0,m=t.find(p=>p.value===e);return d?jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[jsxRuntime.jsx(re,{variant:"secondary",size:i,icon:"ArrowsDownUp","aria-label":`Sort by: ${m?.label||"Select"}`,onPress:()=>c(true)}),jsxRuntime.jsx(wt,{isOpen:l,onClose:()=>c(false),title:"Sort by",contentPadding:false,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:t.map(p=>({id:p.value,label:p.label,value:p.value})),className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:e?[e]:[],onSelectionChange:p=>{let g=Array.from(p)[0];g!=null&&(r(g),c(false));},children:p=>jsxRuntime.jsx(Cr,{id:p.id,textValue:p.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:p.label})},p.id)})})]}):jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[a&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary whitespace-nowrap",children:"Sort by:"}),jsxRuntime.jsx(Ko,{selectedKey:e,onSelectionChange:p=>r(p),size:i,className:"min-w-32",items:t.map(p=>({id:p.value,label:p.label,value:p.value})),renderItem:p=>p.label,"aria-label":"Sort by",reserveErrorSpace:false}),u&&jsxRuntime.jsx(re,{variant:"ghost",size:i,onClick:()=>n(o==="asc"?"desc":"asc"),"aria-label":`Sort ${o==="asc"?"descending":"ascending"}`,className:"p-1.5",children:o==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-4 h-4"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-4 h-4"})})]})}function Ex({search:e,searchMobileMode:t="expanded",filters:r=[],onRemoveFilter:o,onClearAllFilters:n,onManageFilters:a,exportControl:i,maxVisibleFilterChips:s=3,sort:d,resultsCount:l,leftControls:c,onManageColumns:u,columnPicker:m,customControls:p,actions:g,interactionMode:f="auto",sticky:x,stickyTop:b="0",zIndex:y=10,className:v="",style:C}){let w=r.length>0;if(!(e||w||a||d||l||c||u||m||p||g||i))return null;let T=x?"sticky bg-background-surface":"",P=x?{top:b,zIndex:y}:{};return jsxRuntime.jsxs("div",{className:`@container flex flex-col gap-3 bg-background-surface py-3 border-b border-border-default ${T} ${v}`,style:{...C,...P},children:[jsxRuntime.jsxs("div",{className:"hidden @[640px]:flex @[640px]:items-center @[640px]:justify-between @[640px]:gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[c,c&&l&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),l&&jsxRuntime.jsx(cs,{count:l.count,label:l.label,suffix:l.suffix,unknownLabel:l.unknownLabel,isLoading:l.isLoading,testId:l.testId}),l&&d&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),d&&jsxRuntime.jsx(ds,{value:d.value,options:d.options,onChange:d.onChange,showLabel:d.showLabel,direction:d.direction,onDirectionChange:d.onDirectionChange}),u?jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Columns",onClick:u,children:"Columns"}):m,w&&o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.slice(0,s).map(k=>jsxRuntime.jsxs(jr,{variant:"primary",size:"sm",onRemove:()=>o(k.id),isRemovable:true,children:[k.label,": ",k.value]},k.id)),r.length>s&&a&&jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",onClick:a,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",r.length-s," more"]}),n&&jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onClick:n,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:p||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:g.items.map(k=>jsxRuntime.jsx(re,{variant:k.variant||"secondary",size:"sm",icon:k.icon,onPress:k.onClick,isDisabled:k.disabled,children:k.label},k.id))}),e&&jsxRuntime.jsx("div",{className:"w-64",children:jsxRuntime.jsx(ua,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,children:"Filters"}),i&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})]}),jsxRuntime.jsxs("div",{className:"@[640px]:hidden",children:[jsxRuntime.jsx("div",{className:"flex flex-col gap-3 mb-3",children:jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:p?jsxRuntime.jsx("div",{className:"flex-1",children:p}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(Qa,{items:g.items.map(k=>({id:k.id,name:k.label,iconName:k.icon,variant:k.variant==="destructive"?"destructive":"primary",disabled:k.disabled,onAction:k.onClick})),align:"left",size:"sm",children:jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"DotsThreeVertical","aria-label":g.menuLabel||"Actions"})}),e&&jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(ua,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,"aria-label":`Filters${r.length>0?` (${r.length} active)`:""}`}),i&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[c,l&&jsxRuntime.jsx(cs,{count:l.count,label:l.label,suffix:l.suffix,unknownLabel:l.unknownLabel,isLoading:l.isLoading})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:d&&jsxRuntime.jsx(ds,{value:d.value,options:d.options,onChange:d.onChange,showLabel:false,direction:d.direction,onDirectionChange:d.onDirectionChange,compact:f!=="desktop"})})]})]})]})}function Lx({filters:e,onRemove:t,onClearAll:r,onManageFilters:o,maxVisibleChips:n=3,mode:a="chips",showManageButton:i=true,size:s="sm",className:d=""}){let l=e.length>0,c=e.slice(0,n),u=Math.max(0,e.length-n),m=u>0,p=a==="button"&&!!o,g=a==="chips"&&i&&!!o;if(!l&&!p&&!g)return null;let f=p&&jsxRuntime.jsxs(re,{variant:"secondary",size:s,onClick:o,className:"whitespace-nowrap",children:[e.length," ",e.length===1?"filter":"filters"]}),x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx(re,{variant:"secondary",size:s,icon:"Sliders",onClick:o,className:"whitespace-nowrap",children:"Filters"}),l&&c.map(y=>jsxRuntime.jsxs(jr,{variant:"secondary",size:s,onRemove:()=>t(y.id),isRemovable:true,children:[y.label,": ",y.value]},y.id)),l&&m&&o&&jsxRuntime.jsxs(re,{variant:"ghost",size:s,onClick:o,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",u," more"]}),l&&r&&jsxRuntime.jsx(re,{variant:"ghost",size:s,onClick:r,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]}),b=a==="button"?f:x;return jsxRuntime.jsx("div",{className:`flex flex-wrap items-center gap-2 ${d}`,children:b})}var Dx=["isEmpty","isNotEmpty"];function Ax(e){return Dx.includes(e)}var Ix={isEmpty:"is empty",isNotEmpty:"is not empty"};function o2(e,t,r){return {field:e,operator:t,value:r}}function n2(e,t="AND"){return {logic:t,conditions:e}}function us(){return {logic:"AND",conditions:[]}}function lc(e){return !e||e.conditions.length===0?true:e.conditions.every(t=>"conditions"in t?lc(t):false)}function a2(e,t){if(!e)return [];let r=new Map(t?.map(i=>[i.field,i])),o=new Map;function n(i){if("conditions"in i)i.conditions.forEach(s=>n(s));else {let s=o.get(i.field)||[];s.push(i),o.set(i.field,s);}}e.conditions.forEach(i=>n(i));let a=[];for(let[i,s]of o.entries()){let d=r.get(i),l=d?.label||i,c=[],u=[],m=[];for(let p of s)p.operator==="in"&&Array.isArray(p.value)?c.push(...p.value):p.operator==="eq"?p.value!==void 0&&typeof p.value!="boolean"&&!Array.isArray(p.value)?c.push(p.value):m.push(p):["gte","gt","lte","lt"].includes(p.operator)&&p.value!==void 0?u.push({operator:p.operator,value:typeof p.value=="boolean"||Array.isArray(p.value)?String(p.value):p.value}):m.push(p);if(c.length>0){let g=Array.from(new Set(c)).map(f=>d?.values?.find(b=>String(b.value)===String(f))?.label??f);a.push({id:`${i}-in`,label:l,value:g.join(", ")});}if(u.length>0){let p=u.find(f=>f.operator==="gte"||f.operator==="gt"),g=u.find(f=>f.operator==="lte"||f.operator==="lt");if(p&&g){let f=p.operator==="gte"?"\u2265":">",x=g.operator==="lte"?"\u2264":"<";a.push({id:`${i}-range`,label:l,value:`${f} ${p.value} and ${x} ${g.value}`});}else for(let f of u){let x;f.operator==="gte"?x="\u2265":f.operator==="gt"?x=">":f.operator==="lte"?x="\u2264":x="<",a.push({id:`${i}-${f.operator}`,label:l,value:`${x} ${f.value}`});}}for(let p of m){let g;p.operator==="neq"?g=`\u2260 ${p.value}`:p.operator==="contains"?g=`contains "${p.value}"`:p.operator==="startsWith"?g=`starts with "${p.value}"`:p.operator==="endsWith"?g=`ends with "${p.value}"`:Ax(p.operator)?g=Ix[p.operator]:g=String(p.value),a.push({id:`${i}-${p.operator}`,label:l,value:g});}}return a}function Ln(e,t){let r=e||us();return {...r,conditions:[...r.conditions,t]}}function pa(e,t){if(!e)return us();let r=e.conditions.filter(o=>"conditions"in o?pa(o,t).conditions.length>0:o.field!==t);return {...e,conditions:r}}function ma(e){if(!e)return [];let t=new Set;function r(o){"conditions"in o?o.conditions.forEach(r):t.add(o.field);}return e.conditions.forEach(r),Array.from(t)}function Bx({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,showCalendar:d=true,reserveErrorSpace:l=true,validationResult:c,className:u,...m}){let[p,g]=Ze.useState(false),f=x=>{m.onChange&&x&&m.onChange(x),g(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Ie(u,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(ps,{size:o,isDisabled:i,isInvalid:s,hasCalendar:d}),d&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[jsxRuntime.jsx(re,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-secondary hover:text-text-primary transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(H,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(ti,{value:m.value,onChange:f,minValue:m.minValue,maxValue:m.maxValue,isDisabled:i,isReadOnly:m.isReadOnly,isDateUnavailable:m.isDateUnavailable})})})]})]})}),l?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&c?jsxRuntime.jsx(xe,{size:o,children:r(c)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(c)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})}function m2({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.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 ps({size:e="md",isDisabled:t,isInvalid:r,hasCalendar:o,className:n,...a}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(hn({isInvalid:r,isDisabled:t}),"px-3 py-2 flex items-center gap-0.5 w-full",o&&"pr-10",n),...a,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:m2({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||t,size:e})})})}function cc({label:e,description:t,errorMessage:r,...o}){return jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{...o,className:Ie(o.className,"group flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{children:e}),jsxRuntime.jsxs(nb,{className:"w-auto min-w-[208px]",children:[jsxRuntime.jsx(ps,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsxRuntime.jsx(ps,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsxRuntime.jsx(re,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsxRuntime.jsx(lucideReact.CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsxRuntime.jsx(Pe,{children:t}),typeof r=="string"?jsxRuntime.jsx(xe,{children:r}):null,jsxRuntime.jsx(St,{children:jsxRuntime.jsx(pi,{})})]})}var S2=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(t,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function ms({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,validationResult:s,reserveErrorSpace:d=true,descriptionPlacement:l="below",...c}){let u=Ze.useId(),{isFocused:m,handleFocus:p,handleBlur:g}=vr();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...c,id:u,isRequired:a,className:Ie(c.className,"group flex flex-col gap-1"),step:c.step??1,onChange:f=>{typeof f=="number"&&(c.maxValue!=null&&f>c.maxValue?c.onChange?.(c.maxValue):c.minValue!=null&&f<c.minValue?c.onChange?.(c.minValue):c.onChange?.(f));},isInvalid:!!r||typeof c.value=="number"&&(c.maxValue!=null&&c.value>c.maxValue||c.minValue!=null&&c.value<c.minValue),children:({isDisabled:f,isInvalid:x})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:l==="tooltip"||l==="inline"?t:void 0,descriptionPlacement:l,isRequired:a,htmlFor:u,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:y=>p(y,c.onFocus),onBlur:y=>g(y,c.onBlur),className:S2({isInvalid:x||!!r,isDisabled:f,isFocused:m,transparent:i,size:o,className:typeof c.className=="string"?c.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(H,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(H,{name:"CaretDown",size:14})})]})]})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:r?jsxRuntime.jsx(xe,{size:o,children:typeof r=="function"?r(s):r}):t&&l==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:r?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:typeof r=="function"?r(s):r}):t&&l==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}var em={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function T2({isSelected:e,isDisabled:t,size:r="md"}){let o="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=em[r].track,a=ot,i="focus-visible:outline-action-primary",s="";return e?s="bg-action-primary forced-colors:!bg-[Highlight] group-pressed:bg-action-primary-hover":s="bg-border-input group-pressed:bg-border-focus",[o,n,a,i,s,t?"bg-background-muted forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function k2({isSelected:e,isDisabled:t,size:r="md"}){let o="transform rounded-full bg-background-surface outline-none shadow transition duration-200 ease-in-out",n=em[r].handle;return [o,n,e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function dc({children:e,variant:t="primary",size:r="md",...o}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...o,className:Ie(o.className,`relative group flex items-center gap-2 ${em[r].text} text-text-primary transition disabled:text-text-disabled forced-colors:disabled:text-[GrayText]`),children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:T2({...n,size:r}),children:jsxRuntime.jsx("span",{className:k2({...n,size:r})})}),e]})})}function zx(e){return new Intl.NumberFormat("en-US").format(e)}function Hx({isOpen:e,onClose:t,facetConfigs:r,facetCounts:o={},currentFilters:n,onApply:a,onClear:i,title:s="Filters",resultCount:d}){let[l,c]=Ze.useState(n),[u,m]=Ze.useState({}),[p,g]=Ze.useState({}),[f,x]=Ze.useState(null),{isMobile:b}=gr(),y=Ze.useMemo(()=>r.some(h=>h.group),[r]),{groups:v,ungroupedFacets:C,facetsByGroup:w}=Ze.useMemo(()=>{let h=new Set,L=[],A={};for(let j of r)j.group?(h.has(j.group)||(h.add(j.group),A[j.group]=[]),A[j.group].push(j)):L.push(j);return {groups:Array.from(h),ungroupedFacets:L,facetsByGroup:A}},[r]);Ze.useEffect(()=>{e&&(c(n),m({}),g({}),x(!b&&v.length>0?v[0]:null));},[e,n,v,b]);let S=Ze.useMemo(()=>!l||lc(l)?0:ma(l).length,[l]),T=()=>{a(l),t();},P=()=>{let h=us();c(h),i?i():a(h),t();},k=h=>{if(!l)return [];if(!ma(l).includes(h))return [];let A=[];function j(ae){if(ae)for(let _ of ae.conditions)"conditions"in _?j(_):_.field===h&&_.operator==="in"&&Array.isArray(_.value)&&A.push(..._.value.map(String));}return j(l),A},M=(h,L,A)=>{let j=pa(l,h);L!==void 0&&(j=Ln(j,{field:h,operator:"gte",value:L})),A!==void 0&&(j=Ln(j,{field:h,operator:"lte",value:A})),c(j);},D=h=>{if(!l)return;let L;function A(j){if(j)for(let ae of j.conditions)"conditions"in ae?A(ae):ae.field===h&&ae.operator==="eq"&&typeof ae.value=="boolean"&&(L=ae.value);}return A(l),L},R=(h,L)=>{let A=pa(l,h);L!==void 0&&(A=Ln(A,{field:h,operator:"eq",value:L})),c(A);},I=(h,L,A)=>{let j=pa(l,h);L&&(j=Ln(j,{field:h,operator:"gte",value:L.toString()})),A&&(j=Ln(j,{field:h,operator:"lte",value:A.toString()})),c(j);},E=h=>{let L=w[h]||[],A=l?ma(l):[];return L.filter(j=>A.includes(j.field)).length},O="pr-9 bg-background-muted/50",W="border-t border-border-muted",z="text-sm font-medium text-text-link-default",F=h=>jsxRuntime.jsx("span",{className:z,children:h}),Y=h=>{let L=o[h.field]||{},A=u[h.field]||"",j=[];h.values?j=h.values.map(ee=>({value:String(ee.value),label:ee.label,count:L[String(ee.value)]})):j=Object.entries(L).map(([ee,ie])=>({value:ee,label:ee,count:ie}));let ae=j.length;if(A){let ee=A.toLowerCase();j=j.filter(ie=>ie.label.toLowerCase().includes(ee));}j.sort((ee,ie)=>ee.count!==void 0&&ie.count!==void 0&&ie.count!==ee.count?ie.count-ee.count:ee.label.localeCompare(ie.label));let _=h.type||"string";if(_==="string"||!h.type){let ee=k(h.field),ie=h.searchThreshold??10,Ee=h.maxVisibleOptions??50,le=p[h.field]??false,ge=le||j.length<=Ee?j:j.slice(0,Ee),ce=j.length>Ee&&!le;return jsxRuntime.jsxs(Sn,{id:h.field,children:[jsxRuntime.jsx(wn,{title:h.label,description:h.description,className:O,endContent:ee.length>0?F(`${ee.length} selected`):void 0}),jsxRuntime.jsx(Nn,{className:W,children:jsxRuntime.jsxs("div",{className:"space-y-4 pt-4 pb-4",children:[ae>ie&&jsxRuntime.jsx(ua,{value:A,onChange:pe=>m(Te=>({...Te,[h.field]:pe})),onClear:()=>m(pe=>({...pe,[h.field]:""})),placeholder:`Search ${h.label.toLowerCase()}...`,size:"sm",className:"w-full !max-w-none pr-4"}),jsxRuntime.jsx(np,{value:ee,onChange:pe=>{let Te=pa(l,h.field);pe.length>0&&(Te=Ln(Te,{field:h.field,operator:"in",value:pe})),c(Te);},children:jsxRuntime.jsx("div",{className:"space-y-1.5",children:ge.map(pe=>jsxRuntime.jsx("div",{className:"rounded-md py-2 pr-4 transition-colors hover:bg-background-hover",children:jsxRuntime.jsx(io,{value:pe.value,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3 flex-1",children:[h.renderLabel?h.renderLabel(pe.value,pe.label):jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:pe.label}),pe.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-text-secondary tabular-nums",children:zx(pe.count)})]})})},pe.value))})}),ce&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",onPress:()=>g(pe=>({...pe,[h.field]:true})),className:"w-full",children:["Show all ",j.length," options"]})}),le&&j.length>Ee&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onPress:()=>g(pe=>({...pe,[h.field]:false})),className:"w-full",children:"Show less"})})]})})]},h.field)}if(_==="number"){let ee,ie,Ee=ge=>{if(ge)for(let ce of ge.conditions)"conditions"in ce?Ee(ce):ce.field===h.field&&(ce.operator==="gte"&&typeof ce.value=="number"&&(ee=ce.value),ce.operator==="lte"&&typeof ce.value=="number"&&(ie=ce.value));};Ee(l);let le=ee!==void 0||ie!==void 0;return jsxRuntime.jsxs(Sn,{id:h.field,children:[jsxRuntime.jsx(wn,{title:h.label,description:h.description,className:O,endContent:le?F(ee!==void 0&&ie!==void 0?`${ee} - ${ie}`:ee!==void 0?`\u2265 ${ee}`:`\u2264 ${ie}`):void 0}),jsxRuntime.jsx(Nn,{className:W,children:jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 pb-4",children:[jsxRuntime.jsx(ms,{label:"Min",value:ee,onChange:ge=>M(h.field,ge,ie)},`${h.field}-min`),jsxRuntime.jsx(ms,{label:"Max",value:ie,onChange:ge=>M(h.field,ee,ge)},`${h.field}-max`)]})})]},h.field)}if(_==="boolean"){let ee=D(h.field);return jsxRuntime.jsxs(Sn,{id:h.field,children:[jsxRuntime.jsx(wn,{title:h.label,description:h.description,className:O,endContent:ee!==void 0?F(ee?"Yes":"No"):void 0}),jsxRuntime.jsx(Nn,{className:W,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 pb-4",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:ee!==void 0?ee?"Enabled":"Disabled":"No filter applied"}),jsxRuntime.jsx(dc,{size:"lg",isSelected:ee??false,onChange:ie=>R(h.field,ie?true:void 0),children:ee?"Yes":"No"})]})})]},h.field)}if(_==="date"){let ee,ie,Ee=Te=>{if(Te)for(let et of Te.conditions)"conditions"in et?Ee(et):et.field===h.field&&(et.operator==="gte"&&(ee=String(et.value)),et.operator==="lte"&&(ie=String(et.value)));};Ee(l);let le=ee!==void 0||ie!==void 0,ge=Te=>{if(Te)try{return /^\d{4}-\d{2}-\d{2}$/.test(Te)?date.parseDate(Te):void 0}catch{return}},ce=ge(ee),pe=ge(ie);return jsxRuntime.jsxs(Sn,{id:h.field,children:[jsxRuntime.jsx(wn,{title:h.label,description:h.description,className:O,endContent:le?F("Date range selected"):void 0}),jsxRuntime.jsx(Nn,{className:W,children:jsxRuntime.jsx("div",{className:"pt-4 pb-4",children:jsxRuntime.jsx(cc,{label:"Date Range",value:ce&&pe?{start:ce,end:pe}:void 0,onChange:Te=>{Te?I(h.field,Te.start,Te.end):I(h.field,void 0,void 0);}})})})]},h.field)}return null},U=()=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[C.map(h=>{let A=(l?ma(l):[]).includes(h.field);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(`__ungrouped__${h.field}`),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:h.label}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[A&&jsxRuntime.jsx("span",{className:z,children:"1 active"}),jsxRuntime.jsx(H,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},h.field)}),v.map(h=>{let L=E(h);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(h),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:h}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[L>0&&jsxRuntime.jsxs("span",{className:z,children:[L," active"]}),jsxRuntime.jsx(H,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},h)})]}),V=h=>{if(h.startsWith("__ungrouped__")){let A=h.replace("__ungrouped__",""),j=C.find(ae=>ae.field===A);return j?jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[j.field],children:Y(j)}):null}let L=w[h]||[];return L.length===0?null:jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[L[0].field],children:L.map(A=>Y(A))})},J=()=>{if(f){let h=f.startsWith("__ungrouped__")&&C.find(L=>L.field===f.replace("__ungrouped__",""))?.label||f;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(null),className:"flex items-center gap-2 px-4 py-3 border-b border-border-muted hover:bg-background-hover transition-colors",children:[jsxRuntime.jsx(H,{name:"CaretLeft",size:"sm",className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:h})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:V(f)})]})}return U()},G=()=>jsxRuntime.jsxs("div",{className:"flex h-full",children:[jsxRuntime.jsxs("div",{className:"w-48 flex-shrink-0 border-r border-border-muted overflow-y-auto bg-background-muted/30",children:[C.map(h=>{let A=(l?ma(l):[]).includes(h.field),j=f===`__ungrouped__${h.field}`;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(`__ungrouped__${h.field}`),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${j?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${j?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:h.label}),A&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},h.field)}),v.map(h=>{let L=E(h),A=f===h;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(h),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${A?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${A?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:h}),L>0&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},h)})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:f?V(f):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-sm",children:"Select a category to view filters"})})]}),B=()=>jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[r[0].field],children:r.map(h=>Y(h))});return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:y&&b&&f?f.startsWith("__ungrouped__")?C.find(h=>h.field===f.replace("__ungrouped__",""))?.label||s:f:S>0?`${s} (${S} active)`:s,hideCloseIcon:false,primaryAction:{label:"Apply filters",onPress:T,variant:"primary"},secondaryAction:{label:"Clear all",onPress:P},maxWidth:y?"800px":"700px",height:"600px",mobileHeight:"85vh",contentPadding:false,footerContent:d!==void 0?jsxRuntime.jsxs("div",{className:"text-sm text-text-secondary text-center",children:[jsxRuntime.jsx("span",{className:"font-semibold text-text-primary",children:zx(d)})," ",d===1?"result":"results"," with current filters"]}):void 0,children:r.length===0?jsxRuntime.jsx("div",{className:"py-12 text-center",children:jsxRuntime.jsx("div",{className:"text-sm font-medium text-text-secondary",children:"No filters available"})}):y?b?J():G():B()})}function rm(e="left"){switch(e){case "center":return "justify-center text-center";case "right":return "justify-end text-right";default:return "justify-start text-left"}}function Rr(e="normal",t){return tailwindMerge.twMerge({strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[e],t&&"hover:text-action-primary cursor-pointer transition-colors")}function Se(e="left",t){return tailwindMerge.twMerge("flex items-center gap-1 min-w-0 overflow-hidden",rm(e),t)}function mc(e,t="\u2014"){return e==null||e===""?t:String(e)}var Dn={xs:"h-4 w-12",sm:"h-4 w-20",md:"h-4 w-24",lg:"h-4 w-32",xl:"h-4 w-40"};function Pt(e="normal"){return {strong:Dn.lg,high:Dn.lg,normal:Dn.md,low:Dn.sm}[e]}function me(e,...t){return typeof e=="function"?e(...t):e}function Gx(e="neutral",t="sm"){return tailwindMerge.twMerge("inline-flex items-center rounded-full font-medium",t==="sm"?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-sm",{success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",neutral:"bg-background-muted text-text-secondary"}[e])}function Wx(e){return e?"success":"neutral"}function fc(e,t=false){return t?e>0?"text-feedback-success-text":e<0?"text-feedback-error-text":"text-text-primary":"text-text-primary"}function om(e="hover",t="secondary"){let r={primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",brand:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""},o={visible:"underline underline-offset-4 decoration-1 cursor-pointer",hover:"hover:underline hover:underline-offset-4 hover:decoration-1 cursor-pointer transition-colors",none:"cursor-pointer"},n=r[t],a=o[e]||"";return `${n} ${a}`.trim()}function Do(e,t,r,o="hover",n="secondary",a,i){if(!t)return e;let s=typeof t=="function"&&r?t(r):t,d=om(o,n);return jsxRuntime.jsx("a",{href:s,className:tailwindMerge.twMerge(d,a==="strong"||a==="high"?"font-semibold":"",i),onClick:c=>{c.metaKey||c.ctrlKey;},children:e})}function Ux({row:e,context:t,actions:r,align:o="right",size:n="sm"}){let{isLoading:a}=t;if(a)return jsxRuntime.jsx(q,{className:Dn.sm});let s=(typeof r=="function"?r(e):r).filter(l=>!me(l.hidden,e));if(s.length===0)return null;let d=Se(o);return jsxRuntime.jsx("div",{className:d,children:s.map(l=>{let c=me(l.disabled,e);return l.variant==="icon"||!l.label?jsxRuntime.jsx(re,{variant:"icon",size:n,onPress:()=>{l.onClick(e);},isDisabled:c,"aria-label":l.label||l.id,children:jsxRuntime.jsx(H,{name:l.icon||"DotsThree",size:n==="sm"?16:20})},l.id):jsxRuntime.jsxs(re,{variant:l.variant||"secondary",size:n,onPress:()=>{l.onClick(e);},isDisabled:c,children:[l.icon&&jsxRuntime.jsx(H,{name:l.icon,size:n==="sm"?14:16}),l.label]},l.id)})})}function Yx({value:e,row:t,context:r,variant:o="default",label:n,size:a="sm",shape:i="square",dot:s,dotPosition:d="left",dotPulse:l,align:c="left",emptyText:u="\u2014",className:m,maxVisible:p=2,maxLabelLength:g}){let{isLoading:f}=r,x=(S,T)=>{if(!g||S.length<=g)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:S});let P=S.slice(0,g-1)+"\u2026";return jsxRuntime.jsx(tr,{content:T,children:jsxRuntime.jsx("span",{children:P})})};if(f)return jsxRuntime.jsx(q,{className:Pt("normal")});if(e==null||e==="")return jsxRuntime.jsx("div",{className:Se(c,"text-text-secondary"),children:u});if(Array.isArray(e)&&e.length===0)return jsxRuntime.jsx("div",{className:Se(c,"text-text-secondary"),children:u});let b=Se(c,m);if(Array.isArray(e)){let S=e.slice(0,p),T=e.slice(p),P=T.length>0;return jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[S.map((k,M)=>{let D=me(o,k,t),R=n!==void 0?me(n,k,t):String(k),I=me(s,k,t),E=me(l,k,t);return jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsx(gt,{variant:D,size:a,shape:i,dot:I,dotPosition:d,dotPulse:E,children:x(R,R)})},M)}),P&&jsxRuntime.jsx(tr,{content:T.join(", "),children:jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsxs(gt,{variant:"neutral",size:a,shape:i,children:["+",T.length]})})})]})})}let y=me(o,e,t),v=n!==void 0?me(n,e,t):String(e),C=me(s,e,t),w=me(l,e,t);return jsxRuntime.jsx("div",{className:b,children:jsxRuntime.jsx(gt,{variant:y,size:a,shape:i,dot:C,dotPosition:d,dotPulse:w,children:x(v,v)})})}function Jx({value:e,context:t,format:r="icon",trueText:o="Yes",falseText:n="No",trueIcon:a="Check",falseIcon:i="X",showFalse:s=true,align:d="center",emphasis:l="normal",className:c}){let{isLoading:u}=t;if(u)return jsxRuntime.jsx(q,{className:Pt(l)});let m=!!e;if(!m&&!s)return jsxRuntime.jsx("div",{className:Se(d,c)});let p=Se(d,c);switch(r){case "icon":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(H,{name:m?a:i,size:16,className:m?"text-feedback-success-text":"text-text-disabled"})});case "text":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx("span",{className:Rr(l),children:m?o:n})});case "badge":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(gt,{variant:m?"success":"neutral",size:"sm",children:m?o:n})});default:return null}}var gc="var(--color-text-subtle)",Xx=_s().map((e,t)=>`var(--color-viz-categorical-${t+1})`);function jx({value:e,row:t,context:r,color:o,swatch:n="dot",emptyText:a="\u2014",align:i="left",className:s}){let{isLoading:d}=r;if(d)return jsxRuntime.jsx(q,{className:Pt("normal")});let l=me(e,t),c=l==null?"":String(l);return c.length===0?jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a}):jsxRuntime.jsxs("div",{className:Se(i,tailwindMerge.twMerge("gap-2",s)),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:tailwindMerge.twMerge("h-2 w-2 flex-shrink-0",n==="dot"?"rounded-full":"rounded-sm"),style:{backgroundColor:o??gc}}),jsxRuntime.jsx("span",{className:"truncate",children:c})]})}function Zx({row:e,context:t,firstName:r,lastName:o,email:n,avatarUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:l,linkVariant:c="secondary",showEmail:u=false,badge:m,emphasis:p="normal",align:g="left",className:f,piiEntity:x}){let{isLoading:b}=t,y=me(r,e),v=me(o,e),C=me(n,e),w=me(a,e),S=me(d,e),T=me(m,e),P=me(x,e),k=Se(g,f);return jsxRuntime.jsx("div",{className:k,children:jsxRuntime.jsx(Al,{firstName:y,lastName:v,email:C,avatarUrl:w,layout:i,size:s,href:S,LinkComponent:l,linkVariant:c,showEmail:u,badge:T,emphasis:p,isLoading:b,piiEntity:P})})}function _x({value:e,row:t,context:r,render:o,className:n}){let a=o(e,t,r);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-full w-full",n),children:a})}function $x({value:e,row:t,context:r,format:o="date",customFormat:n,emptyText:a="\u2014",align:i="left",emphasis:s="normal",href:d,linkBehavior:l="hover",className:c}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Pt(s)});if(!e)return jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a});let m=e instanceof Date?e:new Date(e);if(isNaN(m.getTime()))return jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a});let p;switch(o){case "date":p=m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});break;case "time":p=m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});break;case "datetime":p=m.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});break;case "relative":p=O2(m);break;case "custom":p=n?m.toLocaleString("en-US",n):m.toISOString();break;default:p=m.toLocaleDateString();}let g=Se(i,tailwindMerge.twMerge(Rr(s),c)),f=me(d,t);return f?jsxRuntime.jsx("div",{className:g,children:Do(p,f,t,l)}):jsxRuntime.jsx("div",{className:g,children:p})}function O2(e){let r=new Date().getTime()-e.getTime(),o=Math.floor(r/1e3),n=Math.floor(o/60),a=Math.floor(n/60),i=Math.floor(a/24);return o<60?"just now":n<60?`${n} minute${n!==1?"s":""} ago`:a<24?`${a} hour${a!==1?"s":""} ago`:i<7?`${i} day${i!==1?"s":""} ago`:e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}var H2={up:"ArrowUp",down:"ArrowDown",flat:"Minus"},G2={positive:"text-feedback-success-text",negative:"text-feedback-error-text",neutral:"text-text-secondary"};function nm(e){return e>0?"up":e<0?"down":"flat"}function W2(e,t,r){switch(e){case "percent":return {type:"percentage",decimals:t};case "currency":return {type:"currency",currency:r,minimumFractionDigits:t,maximumFractionDigits:t};case "compact":return {type:"number",notation:"compact",decimals:t,thousandsSeparator:true};default:return {type:"number",decimals:t,thousandsSeparator:true}}}function ey({value:e,row:t,context:r,direction:o,tone:n="neutral",format:a="number",decimals:i=0,currency:s="USD",showIcon:d=true,align:l="right",emphasis:c="normal",emptyText:u="\u2014",className:m}){let{isLoading:p}=r;if(p)return jsxRuntime.jsx(q,{className:Pt(c)});let g=typeof e=="number"?e:Number(e);if(e==null||e===""||!Number.isFinite(g))return jsxRuntime.jsx("div",{className:Se(l,"text-text-secondary"),children:u});let f=me(o,t)??nm(g),x=me(n,t)??"neutral",b=Ar(g,W2(a,i,s))??u,y=g>0?"+":"",C=Se(l,tailwindMerge.twMerge(c==="strong"||c==="high"?"font-semibold":void 0,m,G2[x]));return jsxRuntime.jsxs("div",{className:C,children:[d&&jsxRuntime.jsx(H,{name:H2[f],size:"xs","aria-hidden":true}),jsxRuntime.jsx("span",{children:`${y}${b}`})]})}function xc({manufacturer:e,model:t,deviceType:r,deviceTypeIconName:o,logoUrl:n,layout:a="stacked",size:i="md",href:s,LinkComponent:d,linkVariant:l="unstyled",showDeviceTypeIcon:c=true,showLogo:u=true,emphasis:m="normal",isLoading:p=false,className:g,piiEntity:f}){let[x,b]=Ze.useState(false),y=o||(r?Y2(r):"DeviceMobile"),C={xs:{iconSize:28,logoSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",iconInTextSize:12,skeletonIcon:28,skeletonText:80,skeletonSecondary:60},sm:{iconSize:32,logoSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",iconInTextSize:14,skeletonIcon:32,skeletonText:96,skeletonSecondary:72},md:{iconSize:32,logoSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",iconInTextSize:16,skeletonIcon:36,skeletonText:128,skeletonSecondary:96},lg:{iconSize:40,logoSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",iconInTextSize:18,skeletonIcon:40,skeletonText:160,skeletonSecondary:120}}[i],w=n&&!x&&u,T={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[m],P=({children:k,className:M})=>s?d?jsxRuntime.jsx(d,{href:s,className:M,children:k}):jsxRuntime.jsx(pt,{href:s,variant:l,className:tailwindMerge.twMerge("hover:underline",M),asButton:false,children:k}):jsxRuntime.jsx("span",{className:M,children:k});if(p)return a==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(q,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:C.skeletonText,height:C.skeletonIcon*.6})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(q,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:C.skeletonText,height:16}),jsxRuntime.jsx(q,{width:C.skeletonSecondary,height:12})]})]});if(a==="inline"){let k=`${e} ${t}`;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:w?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>b(true)}):jsxRuntime.jsx(H,{name:y,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsx(P,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",T,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:k})})]})}return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",C.gap,g),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:w?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>b(true)}):jsxRuntime.jsx(H,{name:y,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(P,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",T,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:e})}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1.5 text-text-secondary leading-normal",C.secondaryTextSize),children:[c&&jsxRuntime.jsx(H,{name:y,size:C.iconInTextSize,className:"flex-shrink-0"}),jsxRuntime.jsx("span",{className:"truncate","data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:t})]})]})]})}function Y2(e){switch(e){case "battery":return "BatteryHigh";case "charger":return "ChargingStation";case "inverter":return "Power";case "thermostat":return "ThermometerSimple";case "vehicle":return "CarSimple";case "water_heater":return "DropHalfBottom";case "meter":return "Gauge";default:return "DeviceMobile"}}function ry({row:e,context:t,manufacturer:r,model:o,deviceType:n,logoUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:l,linkVariant:c="secondary",showDeviceTypeIcon:u=true,showLogo:m=true,emphasis:p="normal",align:g="left",className:f,piiEntity:x}){let{isLoading:b}=t,y=me(r,e),v=me(o,e),C=me(n,e),w=me(a,e),S=me(d,e),T=me(x,e),P=Se(g,f);return jsxRuntime.jsx("div",{className:P,children:jsxRuntime.jsx(xc,{manufacturer:y,model:v,deviceType:C,logoUrl:w,layout:i,size:s,href:S,LinkComponent:l,linkVariant:c,showDeviceTypeIcon:u,showLogo:m,emphasis:p,isLoading:b,piiEntity:T})})}var YX={charging:"percentage",discharging:"percentage",on:"kW",idle:void 0,off:void 0,heat:"temperature",cool:"temperature",auto:"temperature",eco:"temperature",circulate:void 0,unknown:void 0,connected:void 0,disconnected:void 0},J2=["charging","discharging","heat","cool","on","circulate","connected"],X2={unknown:"Unknown",on:"On",off:"Off",idle:"Idle",charging:"Charging",discharging:"Discharging",heat:"Heating",eco:"Eco Mode",cool:"Cooling",auto:"Auto",circulate:"Circulating",connected:"Connected",disconnected:"Disconnected"};function am(e){return J2.includes(e)}function im(e){return X2[e]}function ga({state:e,label:t,icon:r,isLoading:o,size:n="sm",shape:a="pill",dot:i,dotPulse:s,fixedWidth:d,className:l,...c}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let u=t??im(e),m=am(e);return jsxRuntime.jsxs(gt,{variant:e,size:n,shape:a,dot:i??m,dotPulse:s??m,className:d?`w-28 justify-center ${l||""}`:l,...c,children:[r&&jsxRuntime.jsx(H,{name:r,size:n==="sm"?12:n==="md"?14:16}),u]})}var j2={importing:"Importing",exporting:"Exporting",idle:"Idle",unknown:"Unknown"};function ny(e){return j2[e]}var Q2={importing:"ArrowDown",exporting:"ArrowUp"};function vc({state:e,label:t,showIcon:r=false,isLoading:o,size:n="sm",shape:a="pill",fixedWidth:i,className:s,...d}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-24"});let l=t??ny(e),c=Q2[e],u=n==="sm"?12:n==="md"?14:16;return r&&c?jsxRuntime.jsx(gt,{variant:e,size:n,shape:a,className:`w-6 justify-center ${s||""}`,...d,children:jsxRuntime.jsx(H,{name:c,size:u})}):jsxRuntime.jsx(gt,{variant:e,size:n,shape:a,className:i?`w-28 justify-center ${s||""}`:s,...d,children:l})}function Cc({state:e,stateLabel:t,metric:r,metricFormatter:o,secondaryState:n,layout:a="horizontal",isLoading:i,size:s="sm",shape:d="pill",icon:l,fixedWidth:c,secondaryStateIconOnly:u=false,className:m}){if(i)return jsxRuntime.jsx(q,{className:tailwindMerge.twMerge("inline-flex h-6 w-32",m)});let p=r!=null&&o?Ar(r,o):null,g=a==="horizontal",f=o&&!p;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",g?"gap-2":"flex-col gap-1",m),children:[(p||f)&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("font-medium inline-block",p?"text-text-primary":"text-text-secondary",s==="sm"&&"text-xs min-w-12",s==="md"&&"text-sm min-w-14",s==="lg"&&"text-base min-w-16"),children:p||"\u2014"}),jsxRuntime.jsx(ga,{state:e,label:t,icon:l,size:s,shape:d,fixedWidth:c}),n&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="importing"||n==="exporting"?jsxRuntime.jsx(vc,{state:n,size:s,shape:d,fixedWidth:c,showIcon:u}):jsxRuntime.jsx(ga,{state:n,size:s,shape:d,fixedWidth:c})})]})}function ay({value:e,row:t,context:r,metric:o,metricFormatter:n,secondaryState:a,size:i="sm",shape:s="pill",label:d,icon:l,fixedWidth:c=true,align:u="left",compact:m=false,className:p}){let{isLoading:g}=r;if(g){let C={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"}[s],w=o!=null||n!=null;return jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:w?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(q,{className:"h-4 w-12"}),jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`}),jsxRuntime.jsx(q,{className:`h-6 w-20 ${C}`})]}):jsxRuntime.jsx(q,{className:`h-6 w-24 ${C}`})})}if(!e)return jsxRuntime.jsx("div",{className:Se(u,p),children:jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"})});let f=me(o,t),x=me(a,t),b=typeof d=="function"?d(e,t):d,y=Se(u,p);return f!=null||n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(y),children:jsxRuntime.jsx(Cc,{state:e,stateLabel:b,metric:f,metricFormatter:n,secondaryState:x||void 0,size:i,shape:s,icon:l,fixedWidth:c,secondaryStateIconOnly:m,layout:"horizontal"})}):jsxRuntime.jsx("div",{className:y,children:jsxRuntime.jsx(ga,{state:e,label:b,icon:l,size:i,shape:s,fixedWidth:c})})}function sy({value:e,row:t,context:r,formatter:o,align:n="left",emphasis:a="normal",href:i,linkBehavior:s="hover",className:d,emptyText:l="\u2014",emptyClassName:c="text-text-secondary"}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(q,{className:Pt(a)});let m=yo({value:e,formatter:o,emptyText:l,emptyClassName:c}),p=Rr(a),g=Se(n,tailwindMerge.twMerge(p,d)),f=jsxRuntime.jsx("div",{className:g,children:m}),x=me(i,t);return x?Do(f,x,t,s):f}var lm=Ze__namespace.default.memo(({value:e,min:t,max:r,color:o="var(--color-viz-default)",backgroundColor:n="var(--color-background-muted)",colorScale:a,showLabel:i=true,formatLabel:s,height:d=20,minWidth:l=4,segments:c,segmentGap:u=2,barWidth:m,context:p})=>{let g=Ze.useMemo(()=>r===t?100:Math.max(0,Math.min(100,(e-t)/(r-t)*100)),[e,t,r]),f=Ze.useMemo(()=>o==="auto"&&a?a.type==="diverging"&&a.center!==void 0?Vi(e,t,r,a.center,a.scheme):Bi(e,t,r,a.scheme):o,[o,a,e,t,r]);if(p.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2 w-full",style:{height:d},children:jsxRuntime.jsx("div",{className:"h-full flex-1 animate-pulse bg-border-default rounded"})});if(c&&c>0){let y=`calc((100% - ${u*(c-1)}px) / ${c})`,v=Math.ceil(g/100*c),C={height:d,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`flex gap-0.5 ${m?"":"flex-1"}`,style:C,children:Array.from({length:c}).map((w,S)=>{let T=S<v;return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:y,backgroundColor:T?f:n==="none"?"transparent":n,marginRight:S<c-1?`${u}px`:0}},S)})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})}let x={height:d,backgroundColor:n==="none"?"transparent":n,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`relative rounded-sm ${m?"":"flex-1"}`,style:x,children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm",style:{width:`${g}%`,minWidth:g>0?l:0,backgroundColor:f}})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})});lm.displayName="HorizontalBarCell";function aM(e){return Math.max(1,String(Math.max(1,Math.trunc(e))).length)}function dy({context:e,startAt:t=1,padTo:r,rowCount:o,align:n="right",className:a}){let{isLoading:i,rowIndex:s}=e;if(i)return jsxRuntime.jsx(q,{className:Pt("normal")});if(typeof s!="number"||!Number.isFinite(s))return jsxRuntime.jsx("div",{className:Se(n,"text-text-muted"),children:"\u2014"});let d=s+t,l=r??(o===void 0?void 0:aM(o+t-1)),c=l===void 0?String(d):String(d).padStart(l,"0");return jsxRuntime.jsx("div",{className:Se(n,tailwindMerge.twMerge("font-mono text-text-muted tabular-nums",a)),children:jsxRuntime.jsx("span",{children:c})})}var cm=Ze__namespace.default.memo(({value:e,data:t,color:r="var(--color-viz-default)",categoryColors:o,context:n,width:a,height:i=40})=>{let s=e||t||[],d=x=>"xValue"in x?x.xValue:x.x,l=x=>"yValue"in x?x.yValue:x.y,c=a||100,u=i,{xScale:m,yScale:p,barWidth:g}=Ze.useMemo(()=>{if(s.length===0)return {xScale:scale.scaleTime({range:[0,c],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]}),barWidth:2};let x=d3Array.extent(s,T=>d(T)),b=d3Array.min(s,T=>l(T))??0,y=d3Array.max(s,T=>l(T))??0,v=b<0?b:0,C=scale.scaleTime({range:[0,c],domain:x}),w=scale.scaleLinear({range:[u,0],domain:[v,y*1.05]}),S=s.length>1?c/s.length*.8:8;return {xScale:C,yScale:w,barWidth:Math.max(2,S)}},[s,c,u]);if(n.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-0.5",style:{width:c,height:u},children:Array.from({length:5}).map((x,b)=>jsxRuntime.jsx("div",{className:"flex-1 animate-pulse bg-border-default rounded"},b))});if(!s||s.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:c,height:u},children:"No data"});let f=p(0);return jsxRuntime.jsx("svg",{width:c,height:u,children:s.map((x,b)=>{let y=l(x),v=m(d(x)),C=p(y),w=Math.abs(f-C),S=x.category&&o?.[x.category]?o[x.category]:r;return jsxRuntime.jsx(shape.Bar,{x:v-g/2,y:y>=0?C:f,width:g,height:w,fill:S,rx:1},`bar-${b}`)})})});cm.displayName="MiniBarCell";function my({value:e,row:t,context:r,format:o="number",decimals:n=0,prefix:a,suffix:i,emptyText:s="\u2014",align:d="right",emphasis:l="normal",href:c,linkBehavior:u="hover",showPositiveSign:m=false,colorCode:p=false,className:g}){let{isLoading:f}=r;if(f)return jsxRuntime.jsx(q,{className:Pt(l)});if(e==null||isNaN(Number(e)))return jsxRuntime.jsx("div",{className:Se(d,"text-text-secondary"),children:s});let x=Number(e),b;switch(o){case "currency":b=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(x);break;case "percent":b=new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(x/100);break;case "compact":b=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:n>0?1:0,maximumFractionDigits:n}).format(x);break;default:b=new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(x);}let v=`${m&&x>0?"+":""}${b}`,C=p?fc(x,true):Rr(l),w=Se(d,tailwindMerge.twMerge(C,g)),S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a}),jsxRuntime.jsx("span",{children:v}),i&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:i})]}),T=me(c,t);return T?jsxRuntime.jsx("div",{className:w,children:Do(S,T,t,u)}):jsxRuntime.jsx("div",{className:w,children:S})}var bM={low:"var(--color-feedback-warning-text)",critical:"var(--color-feedback-error-text)"};function um(e,t){if(t){if(t.critical!==void 0&&e<=t.critical)return "critical";if(t.low!==void 0&&e<=t.low)return "low"}}var pm=Ze__namespace.default.memo(({value:e,showLabel:t=true,color:r="var(--color-viz-categorical-1)",backgroundColor:o="var(--color-background-muted)",height:n=20,segments:a,segmentGap:i=2,colorScale:s,thresholds:d,context:l})=>{let c=Ze.useMemo(()=>Math.max(0,Math.min(100,e)),[e]),u=Ze.useMemo(()=>um(c,d),[c,d]),m=Ze.useMemo(()=>u?bM[u]:r==="auto"&&s?s.type==="diverging"&&s.center!==void 0?Vi(e,0,100,s.center,s.scheme):Bi(e,0,100,s.scheme):r,[r,s,u,e]);if(l.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2",style:{height:n},children:jsxRuntime.jsx("div",{className:"h-full w-full animate-pulse bg-border-default rounded"})});if(a&&a>0){let g=`calc((100% - ${i*(a-1)}px) / ${a})`,f=Math.ceil(c/100*a);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"flex gap-0.5 flex-1",style:{height:n},children:Array.from({length:a}).map((x,b)=>{let y=b<f,v=m;if(!u&&r==="auto"&&s&&y){let C=(b+1)/a*100;s.type==="diverging"&&s.center!==void 0?v=Vi(C,0,100,s.center,s.scheme):v=Bi(C,0,100,s.scheme);}return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:g,backgroundColor:y?v:o==="none"?"transparent":o,marginRight:b<a-1?`${i}px`:0}},b)})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[c.toFixed(0),"%"]})]})}return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"relative flex-1 rounded-sm",style:{height:n,backgroundColor:o==="none"?"transparent":o},children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm transition-all duration-300",style:{width:`${c}%`,backgroundColor:m}})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[c.toFixed(0),"%"]})]})});pm.displayName="PercentBarCell";var xM="\u2013",fy="\u200A";function gy(e){if(e==null||e==="")return;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:void 0}function by({row:e,context:t,min:r,max:o,decimals:n=0,unit:a,emptyText:i="\u2014",align:s="right",emphasis:d="normal",className:l}){let{isLoading:c}=t;if(c)return jsxRuntime.jsx(q,{className:Pt(d)});let u=gy(me(r,e)),m=gy(me(o,e));if(u===void 0&&m===void 0)return jsxRuntime.jsx("div",{className:Se(s,"text-text-secondary"),children:i});let p=x=>new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(x),g=u!==void 0&&m!==void 0?`${p(u)}${fy}${xM}${fy}${p(m)}`:p(u!==void 0?u:m),f=Se(s,tailwindMerge.twMerge("tabular-nums",Rr(d),l));return jsxRuntime.jsxs("div",{className:f,children:[jsxRuntime.jsx("span",{children:g}),a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a})]})}function kc({row:e,context:t,isSelected:r=false,onSelect:o,isDisabled:n=false,align:a="center"}){let{isLoading:i}=t;if(i)return jsxRuntime.jsx("div",{className:Se(a),children:jsxRuntime.jsx(q,{className:"h-4 w-4 rounded"})});let s=me(n,e),d=Se(a);return jsxRuntime.jsx("div",{className:d,children:jsxRuntime.jsx(io,{isSelected:r,onChange:l=>{o?.(e,l);},isDisabled:s,"aria-label":"Select row"})})}function Pc({streetAddress:e,city:t,state:r,postalCode:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:l="normal",isLoading:c=false,showIcon:u=true,className:m,piiEntity:p}){let f={xs:{iconSize:16,iconContainerSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonIconStacked:28,skeletonIconInline:16,skeletonText:80,skeletonSecondary:60},sm:{iconSize:20,iconContainerSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonIconStacked:32,skeletonIconInline:20,skeletonText:96,skeletonSecondary:72},md:{iconSize:24,iconContainerSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonIconStacked:36,skeletonIconInline:24,skeletonText:128,skeletonSecondary:96},lg:{iconSize:28,iconContainerSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonIconStacked:40,skeletonIconInline:28,skeletonText:160,skeletonSecondary:120}}[a],b={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[l],y=[];t&&y.push(t),r&&o?y.push(`${r} ${o}`):r?y.push(r):o&&y.push(o);let v=y.join(", "),C=({children:S,className:T})=>i?s?jsxRuntime.jsx(s,{href:i,className:T,children:S}):jsxRuntime.jsx(pt,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",T),asButton:false,children:S}):jsxRuntime.jsx("span",{className:T,children:S});if(c)return n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconInline,height:f.skeletonIconInline,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(q,{width:f.skeletonText,height:f.skeletonIconInline*.8})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(q,{width:f.skeletonIconStacked,height:f.skeletonIconStacked,className:"flex-shrink-0 rounded"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(q,{width:f.skeletonText,height:16}),jsxRuntime.jsx(q,{width:f.skeletonSecondary,height:12})]})]});if(n==="inline")return jsxRuntime.jsxs(C,{className:tailwindMerge.twMerge("flex items-center",f.gap,i&&"hover:bg-background-hover transition-colors",m),children:[u&&jsxRuntime.jsx(H,{name:"MapPin",size:f.iconSize,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",b,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})]});let w=()=>{if(p){if(t&&r&&o)return "city-state-zip";if(t&&r)return "city-state";if(t)return "city";if(r)return "state";if(o)return "postal-code"}};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",f.gap,m),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",f.iconContainerSize),children:jsxRuntime.jsx(H,{name:"MapPin",size:f.iconSize,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(C,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",b,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})}),v&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",f.secondaryTextSize),"data-pii-type":w(),"data-pii-entity":p,children:v})]})]})}function xy({row:e,context:t,streetAddress:r,city:o,state:n,postalCode:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:l,linkVariant:c="secondary",emphasis:u="normal",align:m="left",className:p,piiEntity:g}){let{isLoading:f}=t,x=me(r,e),b=me(o,e),y=me(n,e),v=me(a,e),C=me(d,e),w=me(g,e),S=Se(m,p);return jsxRuntime.jsx("div",{className:S,children:jsxRuntime.jsx(Pc,{streetAddress:x,city:b,state:y,postalCode:v,layout:i,size:s,href:C,LinkComponent:l,linkVariant:c,emphasis:u,isLoading:f,piiEntity:w})})}var mm=Ze__namespace.default.memo(({value:e,data:t,type:r="line",color:o="var(--color-viz-default)",strokeWidth:n=2,categoryColors:a,context:i,width:s,height:d=40})=>{let l=e||t||[],c=s||100,u=d,{xScale:m,yScale:p}=Ze.useMemo(()=>{if(l.length===0)return {xScale:scale.scaleTime({range:[0,c],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]})};let f=d3Array.extent(l,v=>v.xValue),x=d3Array.min(l,v=>v.yValue)||0,b=d3Array.max(l,v=>v.yValue)||0,y=(b-x)*.1||1;return {xScale:scale.scaleTime({range:[0,c],domain:f}),yScale:scale.scaleLinear({range:[u,0],domain:[x-y,b+y]})}},[l,c,u]);if(i.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center",style:{width:c,height:u},children:jsxRuntime.jsx("div",{className:"h-1 w-full animate-pulse bg-border-default rounded"})});if(!l||l.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:c,height:u},children:"No data"});let g=a&&l[0]?.category&&a[l[0].category]?a[l[0].category]:o;return jsxRuntime.jsxs("svg",{width:c,height:u,className:"overflow-visible",children:[(r==="area"||r==="both")&&jsxRuntime.jsx(shape.AreaClosed,{data:l,x:f=>m(f.xValue),y:f=>p(f.yValue),yScale:p,fill:g,fillOpacity:.15,curve:curve.curveLinear}),(r==="line"||r==="both")&&jsxRuntime.jsx(shape.LinePath,{data:l,x:f=>m(f.xValue),y:f=>p(f.yValue),stroke:g,strokeWidth:n,strokeLinecap:"round",curve:curve.curveLinear})]})});mm.displayName="SparklineCell";function Sy({value:e,row:t,context:r,prefix:o,suffix:n,emptyText:a="\u2014",href:i,linkBehavior:s="hover",linkVariant:d="secondary",emphasis:l="normal",truncate:c=true,copyable:u=false,align:m="left",className:p,piiType:g,piiEntity:f}){let{isLoading:x}=r;if(x)return jsxRuntime.jsx(q,{className:Pt(l)});let b=mc(e,a),y=me(i,t),v=me(f,t),C=b,w=false,S=false;if(c&&b&&typeof b=="string")if(typeof c=="boolean")S=true;else {let{position:E="end",length:O=16,ellipsis:W="...",tooltip:z=true}=c;if(b.length>O){switch(E){case "start":C=al(b,O);break;case "middle":C=Ua(b,O);break;case "end":C=il(b,O,W);break}w=z;}}let T=g&&v?{"data-pii-type":g,"data-pii-entity":v}:{},P=Object.keys(T).length>0,k=jsxRuntime.jsx("span",{className:S?"truncate":"",...T,children:C}),M=w?jsxRuntime.jsx(tr,{content:P?jsxRuntime.jsx("span",{...T,children:String(b)}):String(b),children:k}):k,D=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:o}),M,n&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:n})]}),R=D;if(u&&b&&b!==a){let E=typeof u=="function"?u(t):String(b);R=jsxRuntime.jsx(xn,{value:E,size:"sm",children:D});}if(y){let E=Se(m,p);return jsxRuntime.jsx("div",{className:E,children:Do(R,y,t,s,d,l)})}let I=Se(m,tailwindMerge.twMerge(Rr(l),p));return jsxRuntime.jsx("div",{className:I,children:R})}var LM={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},DM={sm:"hidden sm:grid",md:"hidden md:grid",lg:"hidden lg:grid",xl:"hidden xl:grid"};function Rc(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function Mc(e,t,r,o){if(r.cell){let n=r.cell,a=typeof r.cellProps=="function"?r.cellProps(e,t):r.cellProps;return jsxRuntime.jsx(n,{value:e,row:t,context:o,...a})}return r.render?r.render(e,t,o):e?.toString()??"\u2014"}function Lc({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(u=>u.mobile!==false).map(u=>{let m=u.mobile===false?null:u.mobile;return {...u,mobilePriority:m?.priority??2,mobileFormat:m?.format??"secondary",showLabel:m?.label??m?.format==="secondary",icon:m?.icon}}).sort((u,m)=>u.mobilePriority-m.mobilePriority),i=a.filter(u=>u.mobilePriority===1||u.mobileFormat==="primary"),s=a.filter(u=>u.mobilePriority===2&&u.mobileFormat!=="primary"),d=a.filter(u=>u.mobileFormat==="badge"),l={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:[i.length>0&&jsxRuntime.jsxs("div",{className:"mb-2 flex items-start justify-between",children:[jsxRuntime.jsx("div",{className:"flex-1",children:i.map(u=>{let m=Rc(e,u);return jsxRuntime.jsx("div",{className:"font-medium text-text-primary [&>*]:!justify-start [&>*]:!text-left",children:Mc(m,e,u,l)},u.id)})}),d.length>0&&jsxRuntime.jsx("div",{className:"ml-2 flex flex-wrap gap-1",children:d.map(u=>{let m=Rc(e,u);return jsxRuntime.jsx("div",{className:"inline-flex",children:Mc(m,e,u,l)},u.id)})})]}),s.length>0&&jsxRuntime.jsx("div",{className:"space-y-1",children:s.map(u=>{let m=Rc(e,u),p=u.showLabel&&u.label;return jsxRuntime.jsxs("div",{className:"flex items-center text-sm text-text-secondary",children:[u.icon&&jsxRuntime.jsx(H,{name:u.icon,className:"mr-1.5 h-4 w-4 flex-shrink-0"}),p&&jsxRuntime.jsxs("span",{className:"mr-1 font-medium",children:[u.label,":"]}),jsxRuntime.jsx("span",{className:"truncate [&>*]:!justify-start [&>*]:!text-left",children:Mc(m,e,u,l)})]},u.id)})})]})}function Dc({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(d=>d.mobile!==false),i={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:jsxRuntime.jsx("div",{className:"space-y-2",children:a.map((d,l)=>{let c=Rc(e,d),u=l===0;return jsxRuntime.jsxs("div",{children:[!u&&jsxRuntime.jsx("div",{className:"text-xs text-text-secondary",children:d.label}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(u?"font-medium text-text-primary":"text-sm text-text-primary","[&>*]:!justify-start [&>*]:!text-left"),children:Mc(c,e,d,i)})]},d.id)})})})}function wy(e="md"){return {mobile:LM[e],desktop:DM[e]}}function Ny({density:e}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[e]),children:[jsxRuntime.jsx("div",{className:"mb-2 h-5 w-3/4 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-background-muted"})]})]})}var YM={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},JM={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};function XM(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function qM({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:l}){let c=e.reorderable!==false,{attributes:u,listeners:m,setNodeRef:p,transform:g,transition:f,isDragging:x}=sortable.useSortable({id:e.id,disabled:!c||s}),{role:b,"aria-pressed":y,...v}=u,C=t?.columnId===e.id,w=C?t.direction:null,S=n&&a,T=C?l:void 0,P={...XM(e),transform:utilities.CSS.Transform.toString(g),transition:f,opacity:x?.8:1,zIndex:x?50:void 0};return jsxRuntime.jsx("div",{ref:p,className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",YM[i],JM[e.align||"left"],o&&"sticky top-0 z-10",S&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&S&&"z-30",e.sortable&&!s&&"hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",C?"font-bold text-text-primary":"font-medium text-text-secondary",x&&"bg-background-hover"),style:P,...v,...m,role:"columnheader","aria-sort":C?w==="asc"?"ascending":"descending":"none","aria-disabled":s,title:T,"data-sort-note":T,children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:"flex-1 truncate cursor-pointer",onClick:()=>!s&&e.sortable&&r(e.id),children:e.label}),T&&jsxRuntime.jsx("span",{className:"sr-only",children:T}),e.sortable&&jsxRuntime.jsx("button",{type:"button",className:"flex flex-shrink-0 cursor-pointer",onClick:()=>!s&&r(e.id),"aria-label":`Sort by ${e.label}`,children:C?jsxRuntime.jsx(H,{name:w==="asc"?"CaretUp":"CaretDown",size:14,weight:T?"regular":"bold",className:T?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(H,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function ky({columns:e,columnOrder:t,onColumnOrderChange:r,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,density:s="default",isLoading:d=false,renderHeaderContent:l,sortNote:c}){let u=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:5}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),m=new Map(e.map(f=>[f.id,f])),p=f=>{let{active:x,over:b}=f;if(b&&x.id!==b.id){let y=t.indexOf(x.id),v=t.indexOf(b.id);if(m.get(b.id)?.reorderable===false)return;let w=0;for(let k=0;k<t.length&&m.get(t[k])?.reorderable===false;k++)w=k+1;if(v<w)return;let S=Math.min(y,v),T=Math.max(y,v);for(let k=S;k<=T;k++){if(k===y)continue;if(m.get(t[k])?.reorderable===false)return}let P=sortable.arrayMove(t,y,v);r(P);}},g=t.map(f=>m.get(f)).filter(f=>f!==void 0);return jsxRuntime.jsx(core.DndContext,{sensors:u,collisionDetection:core.closestCenter,onDragEnd:p,children:jsxRuntime.jsx(sortable.SortableContext,{items:t,strategy:sortable.horizontalListSortingStrategy,children:jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:g.map((f,x)=>jsxRuntime.jsx(qM,{column:f,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,isFirstColumn:x===0,density:s,isLoading:d,headerContent:l?.(f),sortNote:c},f.id))})})})}var Ac="__select",eE=new Set,gm={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},bm={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},tE={full:"w-full",auto:"w-auto inline-block",contained:"w-full max-w-6xl mx-auto"},rE={auto:"table-auto",fixed:"table-fixed",responsive:"table-auto"};function Py(e){if(typeof e=="number")return e;let t=/^(\d+(?:\.\d+)?)px$/.exec(e.trim());return t?Number(t[1]):0}function hm(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function oE(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function nE({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:l}){let c=t?.columnId===e.id,u=c?t.direction:null,m=n&&a,p=c?l:void 0;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",gm[i],bm[e.align||"left"],o&&"sticky top-0 z-10",m&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&m&&"z-30",e.sortable&&!s&&"cursor-pointer hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",c?"font-bold text-text-primary":"font-medium text-text-secondary"),onClick:()=>!s&&e.sortable&&r(e.id),role:"columnheader","aria-sort":c?u==="asc"?"ascending":"descending":"none","aria-disabled":s,title:p,"data-sort-note":p,style:hm(e),children:s?jsxRuntime.jsx(q,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:"truncate",children:e.label}),e.headerTooltip&&jsxRuntime.jsx(tr,{content:e.headerTooltip,children:jsxRuntime.jsx(re,{variant:"ghost","aria-label":`About ${e.label}`,onClick:g=>g.stopPropagation(),className:"h-auto min-h-0 flex-shrink-0 p-0 text-text-tertiary hover:text-text-secondary",children:jsxRuntime.jsx(H,{name:"Info",size:12,"aria-hidden":true})})}),p&&jsxRuntime.jsx("span",{className:"sr-only",children:p}),e.sortable&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0",children:c?jsxRuntime.jsx(H,{name:u==="asc"?"CaretUp":"CaretDown",size:14,weight:p?"regular":"bold",className:p?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(H,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function aE({column:e,row:t,rowIndex:r,columnIndex:o,isHovered:n,isSelected:a,density:i="default",className:s,stickyFirstColumn:d}){let l=d&&o===0,c=oE(t,e),u={isLoading:false,isHovered:n,...a===void 0?{}:{isSelected:a},rowIndex:r,columnIndex:o,density:i},m;if(e.cell){let p=e.cell,g=typeof e.cellProps=="function"?e.cellProps(c,t):e.cellProps;m=jsxRuntime.jsx(p,{value:c,row:t,context:u,...g});}else e.render?m=e.render(c,t,u):m=jsxRuntime.jsx("span",{className:"truncate",children:c?.toString()??""});if(e.popover){let p=e.popover,g,f="top",x=false,b="hover";typeof p=="string"?g=p:typeof p=="function"?g=p(c,t):(g=typeof p.content=="function"?p.content(c,t):p.content,f=p.placement||"top",x=p.showArrow??false,b=p.trigger||"hover"),m=jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{...b==="hover"?{trigger:"longPress"}:{},children:[jsxRuntime.jsx("div",{className:"cursor-help",children:m}),jsxRuntime.jsx(St,{placement:f,showArrow:x,children:jsxRuntime.jsx("div",{className:"p-2",children:g})})]});}return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":gm[i],bm[e.align||"left"],l&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",s),role:"cell",style:hm(e),children:m})}function iE({column:e,rowIndex:t,columnIndex:r,density:o="default",stickyFirstColumn:n}){let a=n&&r===0,i={isLoading:true,rowIndex:t,columnIndex:r,density:o},s;if(e.cell){let d=e.cell,l=typeof e.cellProps=="function"?e.cellProps(null,{}):e.cellProps;s=jsxRuntime.jsx(d,{value:null,row:{},context:i,...l});}else e.render?s=e.render(null,{},i):s=jsxRuntime.jsx(q,{className:"h-4 w-full max-w-[200px]"});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":gm[o],bm[e.align||"left"],a&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]"),role:"cell",style:hm(e),children:s})}function sE(e,t){let r=new Set(["BUTTON","A","INPUT","SELECT","TEXTAREA"]),o=new Set(["button","link","checkbox","switch","menuitem","option"]),n=e;for(;n&&n!==t;){if(r.has(n.tagName))return true;let a=n.getAttribute("role");if(a&&o.has(a))return true;n=n.parentElement;}return false}function Ry({columns:e,row:t,rowIndex:r,density:o="default",onClick:n,stickyFirstColumn:a,isSelected:i}){let[s,d]=Ze.useState(false),l=Ze.useCallback(c=>{if(!n)return;let u=c.target,m=c.currentTarget;sE(u,m)||n(t);},[n,t]);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("contents group",n&&"cursor-pointer"),role:"row","aria-selected":i===void 0?void 0:i,onClick:l,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),children:e.map((c,u)=>jsxRuntime.jsx(aE,{column:c,row:t,rowIndex:r,columnIndex:u,isHovered:s,isSelected:i,density:o,className:tailwindMerge.twMerge(n?"group-hover:bg-background-hover":"",i&&"bg-background-selected"),stickyFirstColumn:a},c.id))})}function lE({columns:e,rowIndex:t,density:r="default",stickyFirstColumn:o}){return jsxRuntime.jsx("div",{className:"contents",role:"row",children:e.map((n,a)=>jsxRuntime.jsx(iE,{column:n,rowIndex:t,columnIndex:a,density:r,stickyFirstColumn:o},n.id))})}function My({columns:e,data:t,className:r,density:o="default",width:n="full",height:a,maxHeight:i,layout:s="auto",mobileRenderer:d="auto",customMobileRowRender:l,mobileBreakpoint:c="md",isLoading:u=false,loadingState:m,loadingRowCount:p=5,onLoadMore:g,hasMore:f=false,enableVirtualization:x,estimatedRowHeight:b,loadingIndicator:y,stickyHeader:v=false,stickyFirstColumn:C=false,onRowClick:w,getRowId:S,selectedRowIds:T,onSelectionChange:P,selectionMode:k="multi",hideHeader:M=false,sortConfig:D,onSort:R,sortNote:I,"aria-label":E,enableColumnReorder:O=false,columnOrder:W,onColumnOrderChange:z}){let F=P!==void 0,Y=T??eE,U=Ze.useCallback(($,ue)=>{if(S)return S($);let Z=$.id;return typeof Z=="string"&&Z.length>0?Z:typeof Z=="number"&&Number.isFinite(Z)?String(Z):`row-${ue}`},[S]),V=Ze.useMemo(()=>t.map(($,ue)=>U($,ue)),[t,U]),J=Ze.useCallback(($,ue)=>{if(!P)return;if(k==="single"){P(ue?new Set([$]):new Set);return}let Z=new Set(Y);ue?Z.add($):Z.delete($),P(Z);},[P,Y,k]),G=V.filter($=>Y.has($)).length,B=V.length>0&&G===V.length,N=G>0&&!B,h=Ze.useCallback($=>{if(!P)return;let ue=new Set(Y);for(let Z of V)$?ue.add(Z):ue.delete(Z);P(ue);},[P,V,Y]),L=Ze.useMemo(()=>F?[{id:Ac,label:"",width:44,align:"center",sortable:false,reorderable:false,exportable:false,mobile:false,render:(ue,Z,be)=>{let sr=U(Z,be.rowIndex);return jsxRuntime.jsx(kc,{value:void 0,row:Z,context:be,isSelected:Y.has(sr),onSelect:(ln,oo)=>J(sr,oo)})}},...e]:e,[e,F,Y,U,J]),A=F&&k==="multi"?jsxRuntime.jsx(io,{isSelected:B,isIndeterminate:N,onChange:$=>h($),isDisabled:V.length===0,"aria-label":B?"Deselect all rows on this page":"Select all rows on this page"}):void 0,j=Ze.useCallback($=>$.id===Ac?A:void 0,[A]),[ae,_]=Ze.useState(null),ee=D!==void 0,ie=ee?D:ae,Ee=Ze.useRef(null),le=Ze.useMemo(()=>L.map($=>$.id),[L]),[ge,ce]=Ze.useState(le),pe=W!==void 0,Te=pe?W:ge;Ze.useEffect(()=>{pe||ce($=>{let ue=L.map(oo=>oo.id),Z=new Set(ue),be=new Set($),sr=$.filter(oo=>Z.has(oo)),ln=ue.filter(oo=>!be.has(oo));return [...sr,...ln]});},[L,pe]);let et=Ze.useCallback($=>{pe||ce($),z?.($);},[pe,z]),Be=Ze.useMemo(()=>{if(!O&&!W)return L;let $=new Map(L.map(be=>[be.id,be])),ue=Te.map(be=>$.get(be)).filter(be=>be!==void 0),Z=$.get(Ac);return Z&&!ue.some(be=>be.id===Ac)?[Z,...ue]:ue},[L,Te,O,W]),$t=fn({items:t,onLoadMore:g,hasMore:f,isLoading:u,loadingState:m,enableVirtualization:x,estimatedItemSize:b||(o==="compact"?40:o==="relaxed"?60:48),overscan:5}),yt=g||x?$t:null,ir=yt?.scrollRef??Ee,{loadMoreRef:Rt,virtualizer:tt,virtualItems:Gt,isLoadingMore:te,computedLoadingState:Oe}=yt||{},{gridTemplateColumns:Ue,totalMinWidth:Dt}=Ze.useMemo(()=>{let $=0;return {gridTemplateColumns:Be.map(Z=>{if(Z.minWidth?$+=Py(Z.minWidth):Z.width&&($+=Py(Z.width)),Z.width)return typeof Z.width=="number"?`${Z.width}px`:Z.width;if(Z.flex)return `${Z.flex}fr`;if(Z.minWidth&&Z.maxWidth){let be=typeof Z.minWidth=="number"?`${Z.minWidth}px`:Z.minWidth,sr=typeof Z.maxWidth=="number"?`${Z.maxWidth}px`:Z.maxWidth;return `minmax(${be}, ${sr})`}return Z.minWidth?`minmax(${typeof Z.minWidth=="number"?`${Z.minWidth}px`:Z.minWidth}, 1fr)`:Z.maxWidth?`minmax(0, ${typeof Z.maxWidth=="number"?`${Z.maxWidth}px`:Z.maxWidth})`:"1fr"}).join(" "),totalMinWidth:$}},[Be]),oe=Ze.useCallback($=>{if(!L.find(be=>be.id===$)?.sortable)return;let Z;ie?.columnId===$?Z={columnId:$,direction:ie.direction==="asc"?"desc":"asc"}:Z={columnId:$,direction:"asc"},ee||_(Z),R?.(Z);},[L,ie,R,ee]),we=Oe==="loading"||u&&t.length===0,X={};a?(X.height=typeof a=="number"?`${a}px`:a,X.overflowY="auto"):i?(X.maxHeight=typeof i=="number"?`${i}px`:i,X.overflowY="auto"):g&&(X.height="600px",X.overflowY="auto"),g&&(X.overflowX="auto");let K=tailwindMerge.twMerge(tE[n],!g&&(s==="responsive"?"overflow-x-auto scrollbar-visible":"overflow-auto scrollbar-visible"),r),de=wy(c),ne=d!=="none",ke=($,ue)=>ne?d==="custom"&&l?l($,ue):jsxRuntime.jsx(d==="cards"?Dc:Lc,{row:$,columns:Be,density:o,isLoading:u,onClick:w?()=>w($):void 0}):null,ve=tt?Gt?.map($=>({virtualItem:$,row:t[$.index],index:$.index}))||[]:t.map(($,ue)=>({row:$,index:ue,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:ir,className:K,style:{...X,position:tt?"relative":void 0},children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("grid border-separate border-spacing-0",rE[s],n==="auto"?"inline-grid w-auto":"w-full",ne&&de.desktop),role:"table","aria-label":E,style:{gridTemplateColumns:Ue,minWidth:Dt>0?`${Dt}px`:void 0},children:[!M&&(O?jsxRuntime.jsx(ky,{columns:L,columnOrder:Te,onColumnOrderChange:et,sortConfig:ie,onSort:oe,stickyHeader:v,stickyFirstColumn:C,density:o,isLoading:we,renderHeaderContent:j,sortNote:I}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:Be.map(($,ue)=>jsxRuntime.jsx(nE,{column:$,sortConfig:ie,onSort:oe,stickyHeader:v,stickyFirstColumn:C,isFirstColumn:ue===0,density:o,isLoading:we,headerContent:j($),sortNote:I},$.id))})),tt&&!we?jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1",height:`${tt.getTotalSize()}px`,position:"relative"},role:"rowgroup",children:t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue,virtualItem:Z})=>{if(!$||!Z)return null;let be=S?S($):`row-${ue}`;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",display:"grid",gridTemplateColumns:Ue,transform:`translateY(${Z.start}px)`},"data-index":Z.index,ref:tt.measureElement,children:jsxRuntime.jsx(Ry,{columns:Be,row:$,rowIndex:ue,density:o,onClick:w,stickyFirstColumn:C,isSelected:F?Y.has(U($,ue)):void 0})},be)}),te&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${tt.getTotalSize()}px`,left:0,width:"100%"},children:y||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:we?Array.from({length:p}).map(($,ue)=>jsxRuntime.jsx(lE,{columns:Be,rowIndex:ue,density:o,stickyFirstColumn:C},`loading-${ue}`)):t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue})=>{if(!$)return null;let Z=S?S($):`row-${ue}`;return jsxRuntime.jsx(Ry,{columns:Be,row:$,rowIndex:ue,density:o,onClick:w,stickyFirstColumn:C,isSelected:F?Y.has(U($,ue)):void 0},Z)}),te&&jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1"},children:y||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"col-span-full py-12 text-center text-text-secondary",role:"row",children:jsxRuntime.jsx("div",{role:"cell",children:"No data available"})})})]}),ne&&jsxRuntime.jsx("div",{className:de.mobile,children:we?Array.from({length:p}).map(($,ue)=>jsxRuntime.jsx(Ny,{density:o},`mobile-loading-${ue}`)):t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue})=>{if(!$)return null;let Z=S?S($):`mobile-row-${ue}`;return jsxRuntime.jsx("div",{className:"border-b border-border-default last:border-b-0",children:ke($,ue)},Z)}),te&&(y||jsxRuntime.jsx(Xr,{state:"loading-more"}))]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}),g&&f&&!we&&(tt?jsxRuntime.jsx("div",{ref:Rt,style:{position:"absolute",top:`${tt.getTotalSize()}px`,left:0,width:"100%",height:1}}):jsxRuntime.jsx("div",{ref:Rt,className:"h-px w-full"}))]})}function Ly({status:e,alertCount:t,showCount:r=false,isLoading:o,size:n="sm",shape:a="pill",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let s={healthy:"success",warning:"warning",error:"error",unknown:"neutral"},d={healthy:"Healthy",warning:"Warning",error:"Error",unknown:"Unknown"},l=e==="warning"||e==="error",c=r&&t?`${d[e]} (${t})`:d[e];return jsxRuntime.jsx(gt,{variant:s[e],size:n,shape:a,dot:l,dotPulse:l,...i,children:c})}var dE={battery:"BatteryHigh",charger:"ChargingStation",thermostat:"ThermometerSimple",inverter:"Power",vehicle:"Car",water_heater:"DropHalfBottom",meter:"Gauge",gateway:"WifiHigh",other:"Cube",unknown:"Question"},uE={battery:"Battery",charger:"Charger",thermostat:"Thermostat",inverter:"Inverter",vehicle:"Vehicle",water_heater:"Water Heater",meter:"Meter",gateway:"Gateway",other:"Other",unknown:"Unknown"};function Ay({deviceType:e,iconName:t,size:r="md",showLabel:o=false,className:n}){let a=t||(e?dE[e]:"Question"),i=e?uE[e]:void 0;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",o?"flex-col gap-1":"gap-0",n),children:[jsxRuntime.jsx(H,{name:a,size:r}),o&&i&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:i})]})}function ys({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,slideInFrom:d="right",transparentOverlay:l=false,onClose:c,className:u,primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f,contentPadding:x=true,maxWidth:b="400px"}){if(!s)return null;let y=t||r,v=m||p||g||f;return jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isOpen:s,onOpenChange:C=>!C&&c?.(),isDismissable:true,transparent:l,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",d==="right"?"right-0":"left-0",d==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",d==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:b,width:"100%"},children:[y&&(a&&i?jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,hasBackArrow:true,onBack:i,onClose:c}):jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,onClose:c})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",x?"px-6 py-6":"p-0"),children:e}),v&&jsxRuntime.jsx(pn,{primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f})]})})})})}ys.displayName="Drawer";function Fy({status:e,programName:t,isLoading:r,size:o="sm",shape:n="pill",...a}){if(r)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-20"});let i={enrolled:"success",eligible:"info",pending:"warning",not_eligible:"neutral",opted_out:"neutral"},s={enrolled:"Enrolled",eligible:"Eligible",pending:"Pending",not_eligible:"Not Eligible",opted_out:"Opted Out"},d=jsxRuntime.jsx(gt,{variant:i[e],size:o,shape:n,...a,children:s[e]});return t?jsxRuntime.jsx(tr,{content:t,children:d}):d}function Vy({value:e,onChange:t,onUrlChange:r,accept:o="image/*",maxSize:n,isDisabled:a=false,onUpload:i,className:s,showPreview:d=true,placeholder:l="Drop files here or click to browse"}){let[c,u]=Ze.useState(false),[m,p]=Ze.useState(false),[g,f]=Ze.useState(null),[x,b]=Ze.useState(e),y=Ze.useRef(null),v=async S=>{if(f(null),n&&S.size>n){f(`File size must be less than ${(n/1024/1024).toFixed(2)}MB`);return}if(d&&S.type.startsWith("image/")){let T=new FileReader;T.onloadend=()=>{b(T.result);},T.readAsDataURL(S);}if(i){p(true);try{let T=await i(S);b(T),r?.(T);}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{p(false);}}t?.(S,x);},C=async S=>{try{let T=S.items;if(T.length>0){let P=T[0];if(P.kind==="file"){let k=await P.getFile();k&&v(k);}}}catch(T){f("Failed to upload file"),console.error("Upload error:",T);}finally{u(false);}},w=()=>{b(void 0),f(null),t?.(null),r?.(""),y.current&&(y.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",c?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",a&&"pointer-events-none opacity-50",g&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:C,onDropEnter:()=>u(true),onDropExit:()=>u(false),children:[x?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[d&&(x.startsWith("data:image")||x.startsWith("http"))?jsxRuntime.jsx("img",{src:x,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"File uploaded"})]}),!a&&jsxRuntime.jsx(re,{variant:"icon",size:"sm",onPress:w,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-primary",children:l}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:o==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${o}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:o.split(","),onSelect:S=>{let T=Array.from(S||[]);T.length>0&&v(T[0]);},children:jsxRuntime.jsx(re,{variant:"secondary",size:"sm",isDisabled:a,children:"Choose File"})})]}),m&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"Uploading..."})]})})]}),g&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:g})]})}function zy({version:e,isLatest:t,updateAvailable:r,isLoading:o,size:n="sm",shape:a="rounded",...i}){if(o)return jsxRuntime.jsx(q,{className:"inline-flex h-6 w-16"});let s="neutral",d=e;return t?s="success":r&&(s="warning",d=`${e} (Update)`),jsxRuntime.jsx(gt,{variant:s,size:n,shape:a,...i,children:d})}function bi(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function Gy({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,trigger:a,children:i,showShortcutHint:s=true,showInput:d=true,className:l}){let[c,u]=Ze.useState(false),m=fr("(max-width: 767px)"),p=o!==void 0?o:c,g=Ze.useCallback(y=>{n?n(y):u(y);},[n]);Ze.useEffect(()=>{let y=v=>{(v.metaKey||v.ctrlKey)&&v.key==="k"&&(v.preventDefault(),g(!p)),v.key==="Escape"&&p&&g(false);};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[p,g]);let f=Ze.useCallback(y=>{r?.(y);},[r]),x=jsxRuntime.jsxs("button",{type:"button",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-text-primary hover:bg-background-hover rounded-md transition-colors","aria-label":"Open search",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:18}),!m&&s&&jsxRuntime.jsxs("span",{className:"hidden md:flex items-center gap-1 text-xs",children:[jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:navigator.platform.includes("Mac")?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:"K"})]})]}),b=a===null||Ze.isValidElement(a)&&a.type===Ze.Fragment&&!a.props.children;return m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!b&&(a?jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:a}):jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:x})),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),hideCloseIcon:false,contentPadding:false,maxHeight:"90vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted flex-shrink-0",children:jsxRuntime.jsx($r,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:l,autoFocus:true})}),jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:i})]})})]}):b?null:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[a||x,jsxRuntime.jsx(St,{placement:"bottom",className:"w-[600px] max-w-[90vw] bg-background-surface shadow-xl border border-border-default rounded-lg overflow-hidden",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted",children:jsxRuntime.jsx($r,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:l,autoFocus:true})}),jsxRuntime.jsx("div",{className:"max-h-[500px] overflow-hidden",children:i})]})})]})}function Ky({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,children:a,maxHeight:i="400px",variant:s="default",className:d}){let[l,c]=Ze.useState(false),u=fr("(max-width: 767px)"),m=Ze.useRef(null),p=Ze.useRef(null),g=o!==void 0?o:l,f=Ze.useCallback(M=>{n?n(M):c(M);},[n]);Ze.useEffect(()=>{let M=D=>{(D.metaKey||D.ctrlKey)&&D.key==="k"&&(D.preventDefault(),f(!g)),D.key==="Escape"&&g&&f(false);};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[g,f]),Ze.useEffect(()=>{g&&!u&&m.current&&setTimeout(()=>{m.current?.querySelector("input")?.focus();},0);},[g,u]),Ze.useEffect(()=>{if(!g||u)return;let M=D=>{let R=D.target,I=m.current?.contains(R),E=p.current?.contains(R);!I&&!E&&f(false);};return document.addEventListener("mousedown",M,true),()=>document.removeEventListener("mousedown",M,true)},[g,u,f]);let x=M=>{r?.(M);},b=Ze.useCallback(()=>{f(false);},[f]),y=Ze.useCallback(()=>{r?.("");},[r]),[v,C]=Ze.useState(null);Ze.useEffect(()=>{if(g&&!u&&m.current){let M=null,D=()=>{let I=m.current?.getBoundingClientRect();I&&C({top:I.bottom+8,left:I.left,width:I.width});},R=()=>{M===null&&(M=requestAnimationFrame(()=>{D(),M=null;}));};return D(),window.addEventListener("resize",R),window.addEventListener("scroll",R,true),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R,true),M!==null&&cancelAnimationFrame(M);}}},[g,u]);let w=Ze.useCallback(()=>{f(true);},[f]);if(u)return jsxRuntime.jsxs("div",{className:d,children:[jsxRuntime.jsx("button",{type:"button",onClick:w,className:"flex items-center justify-center w-10 h-10 rounded-lg hover:bg-background-hover transition-colors","aria-label":"Open search",children:jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:"md"})}),jsxRuntime.jsxs(wt,{isOpen:g,onClose:b,contentPadding:false,height:"80vh",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx($r,{value:t,onChange:x,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:y,reserveErrorSpace:false,autoFocus:true})}),jsxRuntime.jsx(re,{variant:"icon",onPress:b,"aria-label":"Close search",className:"flex-shrink-0",children:jsxRuntime.jsx(H,{name:"X",size:"md"})})]}),jsxRuntime.jsx("div",{className:"mt-4",children:a})]})]},"mobile");let S=M=>{let R=M.target.tagName==="INPUT";if(M.key==="ArrowDown"&&g&&R){M.preventDefault();let I=p.current?.querySelector("[data-search-result]");I&&I.focus();}},T=M=>{let D=M.target;if(!D.hasAttribute("data-search-result"))return;let I=Array.from(p.current?.querySelectorAll("[data-search-result]")||[]),E=I.indexOf(D);if(M.key==="ArrowDown"){M.preventDefault(),M.stopPropagation();let O=Math.min(E+1,I.length-1);I[O]?.focus();}else if(M.key==="ArrowUp")if(M.preventDefault(),M.stopPropagation(),E===0)m.current?.querySelector("input")?.focus();else {let O=Math.max(E-1,0);I[O]?.focus();}else M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),f(false),m.current?.querySelector("input")?.focus());},P=g&&v&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsx("div",{ref:p,style:{position:"fixed",top:`${v.top}px`,left:`${v.left}px`,width:`${v.width}px`,zIndex:9999},role:"listbox",onKeyDown:T,children:jsxRuntime.jsx("div",{className:"bg-background-surface shadow-2xl border border-border-default rounded-lg overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:i},children:a})})}),document.body):null,k=s==="elevated"?"bg-background-muted/50 border-border-subtle/50 focus-within:bg-background-body focus-within:border-border-focus focus-within:shadow-md backdrop-blur-sm transition-all duration-200":"";return jsxRuntime.jsxs("div",{ref:m,className:`relative w-full ${d||""}`,onKeyDown:S,children:[jsxRuntime.jsx($r,{value:t,onChange:x,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:k,onFocus:()=>f(true)}),P]},"desktop")}function Yy({message:e="No results found",suggestion:t,icon:r="MagnifyingGlass",className:o=""}){return jsxRuntime.jsxs("div",{className:`flex flex-col items-center justify-center py-12 px-4 text-center ${o}`,children:[jsxRuntime.jsx("div",{className:"text-text-secondary mb-3",children:jsxRuntime.jsx(H,{name:r,size:48})}),jsxRuntime.jsx("p",{className:"text-base font-medium text-text-primary mb-1",children:e}),t&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary max-w-xs",children:t})]})}function Xy({count:e=3,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`,children:Array.from({length:e}).map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[jsxRuntime.jsx(q,{width:20,height:20,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[jsxRuntime.jsx(q,{width:"60%",height:16}),jsxRuntime.jsx(q,{width:"40%",height:12})]}),jsxRuntime.jsx(q,{width:16,height:16})]},o))})}function jy({title:e,count:t,isLoading:r,footer:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex flex-col",a),children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-1.5 px-4 pt-4 pb-2 border-t border-border-muted first:border-t-0",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:e}),!r&&t!==void 0&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:t}),r&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary animate-pulse",children:"Loading..."})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:n}),o&&jsxRuntime.jsx("div",{className:"px-4 py-2 border-t border-border-subtle",children:o})]})}function Qy({id:e,title:t,subtitle:r,metadata:o,icon:n,customIcon:a,onSelect:i,isFocused:s=false,className:d,testId:l}){return jsxRuntime.jsxs("div",{role:"option",tabIndex:0,onClick:()=>{i?.(e);},onKeyDown:m=>{let p=m.currentTarget;switch(m.key){case "Enter":case " ":{m.preventDefault(),i?.(e);break}case "ArrowDown":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);f!==-1&&f<g.length-1&&g[f+1].focus();break}case "ArrowUp":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);if(f>0)g[f-1].focus();else {let x=document.querySelector('input[type="text"][placeholder*="Search"]');x&&x.focus();}break}case "Escape":{m.preventDefault();let g=document.querySelector('input[type="text"][placeholder*="Search"]');g&&g.focus();break}}},"data-testid":l,"data-search-result":true,className:tailwindMerge.twMerge("group flex items-center gap-3 px-4 py-3 cursor-pointer outline-none transition-colors","text-text-primary hover:bg-background-hover","focus-visible:bg-background-muted focus-visible:outline-none","data-[focused]:bg-background-hover",s&&"bg-background-hover",d),"data-focused":s||void 0,children:[a?jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a}):n?jsxRuntime.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx(H,{name:n,size:20})}):null,jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("span",{className:"font-medium text-text-primary truncate",children:t}),o&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary flex-shrink-0",children:o})]}),r&&jsxRuntime.jsx("div",{className:"text-sm text-text-secondary truncate mt-0.5",children:r})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[focused]:opacity-100 transition-opacity",children:jsxRuntime.jsx(H,{name:"ArrowRight",size:16,className:"text-text-secondary"})})]})}function Zy({children:e,maxHeight:t="400px",className:r}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-y-auto overscroll-contain","divide-y divide-border-muted",r),style:{maxHeight:t},children:e})}function $y({placeholder:e="Search...",onClick:t,showShortcut:r=true,variant:o="default",className:n=""}){let a=typeof navigator<"u"&&navigator.platform.includes("Mac");return jsxRuntime.jsxs("button",{type:"button",onClick:t,className:`
117
+ `}})]})}function hn(e,t=300){let[r,o]=Ze.useState(e);return Ze.useEffect(()=>{let n=setTimeout(()=>o(e),t);return ()=>clearTimeout(n)},[e,t]),r}function vl(e,t=300){let[r,o]=Ze.useState(false);return Ze.useEffect(()=>{if(e){let n=setTimeout(()=>{o(true);},t);return ()=>clearTimeout(n)}o(false);},[e,t]),r}var BN=({isEntering:e,isExiting:t,className:r})=>["max-w-[200px] group bg-action-default border border-action-default-hover text-[color:var(--color-action-default-text)] text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1",e?"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200":"",t?"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150":"",r].filter(Boolean).join(" ");function tr({children:e,content:t,...r}){return jsxRuntime.jsxs(reactAriaComponents.TooltipTrigger,{delay:200,children:[e,jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...r,offset:10,className:reactAriaComponents.composeRenderProps(r.className,(o,n)=>BN({...n,className:o})),children:[jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-action-default stroke-action-default-hover group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})]})}function vr(){let[e,t]=Ze__namespace.default.useState(false),r=Ze__namespace.default.useCallback((n,a)=>{t(true),a?.(n);},[]),o=Ze__namespace.default.useCallback((n,a)=>{t(false),a?.(n);},[]);return {isFocused:e,handleFocus:r,handleBlur:o}}var Nt=Ze__namespace.default.forwardRef(({children:e,className:t},r)=>jsxRuntime.jsx("div",{ref:r,className:tailwindMerge.twMerge("relative w-full",t),children:e}));Nt.displayName="InputWrapper";function Yi({onClick:e,size:t="md",className:r}){return jsxRuntime.jsx("button",{type:"button",onClick:o=>{o.preventDefault(),o.stopPropagation(),e();},className:tailwindMerge.twMerge("absolute right-2 top-[48%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary cursor-pointer",r),"aria-label":"Clear input",onMouseDown:o=>{o.preventDefault(),o.stopPropagation();},children:jsxRuntime.jsx(H,{name:"X",size:t==="sm"?16:20})})}function xn(e){let{isInvalid:t,isDisabled:r,isFocused:o}=e,n="border rounded-[var(--control-border-radius)] !outline-none ";return r?`${n} border-border-muted`:t&&o?`${n} border-feedback-error-border shadow-[inset_0_0_0_1px_var(--color-feedback-error-border)]`:t?`${n} border-feedback-error-border`:o?`${n} border-border-focus shadow-[inset_0_0_0_1px_var(--color-border-focus)]`:`${n} border-border-input`}function db(e){return e.isDisabled?"bg-background-muted":e.transparent?"bg-transparent":"bg-background-input"}function VN(e){return e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":""}function Yt(e){let{isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:a="md",className:i}=e;return tailwindMerge.twMerge("w-full",xn({isInvalid:t,isDisabled:r,isFocused:o}),db({transparent:n,isDisabled:r}),Je[a].text,Je[a].height,Je[a].padding,VN(a),i)}function ON(e){let{size:t="md",isFocusWithin:r,isInvalid:o,isDisabled:n,transparent:a,className:i}=e;return tailwindMerge.twMerge("group flex items-center rounded-[var(--control-border-radius)] overflow-hidden",db({transparent:a,isDisabled:n}),Je[t].height,xn({isFocused:r,isInvalid:o,isDisabled:n}),i)}function qe({children:e,size:t="md",tooltip:r,description:o,descriptionPlacement:n="below",isRequired:a,className:i,htmlFor:s}){let d=r||o&&n==="tooltip",c=r||o,l=o&&n==="inline",u=jsxRuntime.jsxs("label",{htmlFor:s,className:tailwindMerge.twMerge(Je[t].text,"!text-text-label font-semibold flex items-center gap-1",i),children:[e,a&&jsxRuntime.jsx("span",{children:"*"}),d&&jsxRuntime.jsx("span",{className:"inline-flex items-center text-text-secondary",children:jsxRuntime.jsx(H,{name:"Info",size:t==="sm"?16:20})}),l&&jsxRuntime.jsx("span",{className:"text-text-secondary font-normal ml-1",children:o})]});return d&&c?jsxRuntime.jsx(tr,{content:c,children:u}):u}function Pe({size:e="md",className:t,children:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("leading-[2.25] text-text-secondary",Je[e].text,t),children:r})}function xe({children:e,size:t="md",className:r}){return jsxRuntime.jsx("div",{role:"alert",className:tailwindMerge.twMerge(Je[t].text,"text-feedback-error-text",r),children:e})}function Sl({size:e="md",isInvalid:t,isDisabled:r,isFocused:o,transparent:n,className:a,...i}){return jsxRuntime.jsx("input",{className:Yt({isInvalid:t,isDisabled:r,isFocused:o,transparent:n,size:e,className:a}),...i})}function ub(e){let{children:t,...r}=e;return jsxRuntime.jsx("div",{...r,className:ON(e),children:typeof t=="function"?t(e):t})}var ju=Ze.createContext("md");function bb(){return Ze.useContext(ju)}function Ju(e="md"){let t=e==="sm"?"!text-base md:!text-[length:var(--control-text-sm)]":e==="md"?"!text-base md:!text-[length:var(--control-text-md)]":"";return `flex-1 text-start data-[placeholder]:text-text-disabled overflow-hidden text-ellipsis whitespace-nowrap ${Je[e].text} ${t}`}function KN(){let e=Ze__namespace.default.useCallback((r,o)=>{o?.(r);},[]),t=Ze__namespace.default.useCallback((r,o)=>{o?.(r);},[]);return {handleFocus:e,handleBlur:t}}function Ko({label:e,description:t,errorMessage:r,children:o,items:n,renderItem:a,renderSelectedValue:i,size:s="md",selectedKey:d,defaultSelectedKey:c,onSelectionChange:l,placeholder:u,showErrors:m=false,tooltip:p,isRequired:g,transparent:f,reserveErrorSpace:x=false,placement:h="bottom start",shouldFlip:y=true,menuWidth:v="match",descriptionPlacement:C="below",useMobileTray:w=true,...S}){let[N,k]=Ze.useState(null),[T,E]=Ze.useState(null),[A,P]=Ze.useState(false),I=d??N??c,{handleFocus:R,handleBlur:O}=KN(),{isMobile:W}=gr(),z=w&&W,F=Ze__namespace.default.useMemo(()=>!i||!I||!n?null:Array.from(n).find(B=>B.id===I)??null,[i,I,n]),Y=G=>{l&&G!==null&&l(G),l||k(G);},U=Ze.useRef(null),V=Ze.useRef(null),J=()=>{z&&P(!A);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.Select,{...S,selectedKey:I,defaultSelectedKey:c,onSelectionChange:Y,placeholder:u,className:Ie(S.className,"group flex w-full flex-col"),ref:U,onOpenChange:G=>{z||(G&&V.current?E(V.current.offsetWidth):G||U.current?.blur());},children:({isDisabled:G,isInvalid:B,isOpen:L})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:s,tooltip:p,description:C==="tooltip"||C==="inline"?t:void 0,descriptionPlacement:C,isRequired:g,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("div",{ref:V,children:jsxRuntime.jsxs(re,{variant:"unstyled",className:tailwindMerge.twMerge(Yt({isInvalid:B||m&&!!r,isDisabled:G,isFocused:z?A:L,transparent:f,size:s}),"flex items-center text-start gap-4 cursor-pointer pl-[var(--control-padding-sm)]"),onFocus:b=>R(b,S.onFocus),onBlur:b=>O(b,S.onBlur),onPress:z?J:void 0,"data-open":z?A:L,children:[i&&F?jsxRuntime.jsx("div",{className:Ju(s),children:i(F)}):z&&I?jsxRuntime.jsx("div",{className:Ju(s),children:n?Array.from(n).find(D=>D.id===I)?.label:String(I)}):jsxRuntime.jsx(reactAriaComponents.SelectValue,{className:Ju(s)}),jsxRuntime.jsx(H,{name:"CaretDown","aria-hidden":true,className:tailwindMerge.twMerge("h-4 w-4 text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] transition-transform",(z?A:L)&&"rotate-180")})]})})}),x?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:m?jsxRuntime.jsx(xe,{size:s,className:"text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Pe,{size:s,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:m?jsxRuntime.jsx(xe,{size:s,className:"mt-1 text-feedback-error-text",children:typeof r=="function"&&S.validationResult?r(S.validationResult):typeof r=="string"?r:null}):t&&C==="below"?jsxRuntime.jsx(Pe,{size:s,className:"mt-1",children:t}):null}),z?null:jsxRuntime.jsx(St,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-[var(--control-border-radius)]",style:{width:v==="match"&&T?`${T}px`:void 0,minWidth:v==="auto"&&T?`${T}px`:void 0,maxWidth:v==="auto"?"min(600px, 90vw)":void 0},placement:h,shouldFlip:y,children:jsxRuntime.jsx(ju.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full max-h-[300px] overflow-auto bg-background-input p-0 outline-0",children:a&&n?b=>jsxRuntime.jsx(Cr,{id:b.id,textValue:b.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(b)})},b.id):o})})})]})}),z&&jsxRuntime.jsx(wt,{isOpen:A,onClose:()=>P(false),title:e??"Select an option",contentPadding:false,children:jsxRuntime.jsx(ju.Provider,{value:"md",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:n,className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:I!=null?[I]:[],onSelectionChange:G=>{let B=Array.from(G)[0];B!=null&&(Y(B),P(false));},children:a&&n?G=>jsxRuntime.jsx(Cr,{id:G.id,textValue:G.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:a(G)})},G.id):o})})})]})}function Cr({size:e,className:t,...r}){let o=bb(),n=e??o;return jsxRuntime.jsx(reactAriaComponents.ListBoxItem,{...r,className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 rounded-sm px-3 outline-none text-text-primary data-[focused]:bg-background-hover data-[focus-visible]:ring-2 data-[focus-visible]:ring-action-default data-[focus-visible]:ring-inset data-[selected]:bg-background-selected data-[selected]:font-medium overflow-hidden",Je[n].paddingY,Je[n].text,t)})}var rT=[],oT={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},nT={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},xb={sm:"py-1",md:"py-2",lg:"py-3",xl:"py-4"},Zu=(e,t,r)=>{if(e==null||e==="")return "";let n=(r?r.flatMap(a=>a.items):t||[]).find(a=>a.id===e);return n?n.name:""};async function aT(e,t,r){try{let o=e.url.replace("{q}",t),n=new URLSearchParams;e.extraParams&&Object.entries(e.extraParams).forEach(([d,c])=>{n.append(d,c.toString());});let a=`${o}${n.toString()?"?"+n.toString():""}`,i=await fetch(a,{method:"GET",headers:e.headers,signal:r});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);let s=await i.json();return {items:e.transformResponse(s)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in REST request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}async function iT(e,t,r){try{let o=e.graphqlQuery.replace(`$${e.variableKey||"filter"}`,`"${t}"`),n=await fetch(e.url,{method:"POST",headers:{"Content-Type":"application/json",...e.headers},body:JSON.stringify({query:o}),signal:r});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);let a=await n.json();if(a.errors)throw new Error(a.errors[0]?.message||"GraphQL error occurred");return e.responsePath&&(a=e.responsePath.split(".").reduce((i,s)=>i?.[s],a)),{items:e.transformResponse(a)}}catch(o){if(o instanceof Error&&o.name==="AbortError")return {items:[]};console.error("Error in GraphQL request:",o);let n=o instanceof Error?o.message:"Unknown error occurred";return {items:[],error:n}}}function Tl({label:e,staticItems:t=rT,sections:r,selectedKey:o,defaultSelectedKey:n,onSelectionChange:a,requestConfig:i,defaultFilter:s,placeholder:d,errorMessage:c,description:l,size:u="md",tooltip:m,isRequired:p,isDisabled:g,isInvalid:f,validationResult:x,showErrors:h=true,renderItem:y,renderLeftIcon:v,renderSection:C,autoFocus:w=false,reserveErrorSpace:S=false,hideChevron:N=false,useMobileTray:k=true,className:T}){let E=Ze__namespace.default.useRef(null),A=Ze__namespace.default.useRef(null),[P,I]=Ze__namespace.default.useState(),[R,O]=Ze.useState(()=>Zu(o||n,t,r)),[W,z]=Ze.useState(false),[F,Y]=Ze.useState(false),U=hn(R),{contains:V}=reactAria.useFilter({sensitivity:"base"}),[J,G]=Ze.useState(),{isMobile:B}=gr(),L=k&&B,b=Je[u].text,M=reactStately.useAsyncList({async load({signal:le,filterText:ge=""}){if(!i)return {items:[]};if(!i.url||i.shouldLoad&&!i.shouldLoad(ge))return {items:[]};try{let ce;return i.requestType==="GraphQL"?ce=await iT(i,ge,le):ce=await aT(i,ge,le),G(ce.error),{items:ce.items}}catch(ce){return ce instanceof Error&&ce.name==="AbortError"?{items:[]}:(console.error("Error loading items:",ce),G(ce instanceof Error?ce.message:"Unknown error occurred"),{items:[]})}},initialFilterText:""}),D=i&&U!==""?M:null,q=false,ae=Ze.useRef("");Ze.useEffect(()=>{w&&z(true);},[w]),Ze.useEffect(()=>{let le=Zu(o,t,r);le!==R&&O(le);},[o,t,r]),Ze.useEffect(()=>{let le=()=>{E.current&&I(E.current.offsetWidth);};return le(),window.addEventListener("resize",le),()=>window.removeEventListener("resize",le)},[]),Ze.useEffect(()=>{U===""?ae.current="":D&&U!==ae.current&&(ae.current=U,D.setFilterText(U));},[U,D]),q=vl(!!D?.isLoading,300);let _=Ze__namespace.default.useMemo(()=>{if(!L||!R)return D?D.items:t;let le=D?D.items:t,ge=s??(i?()=>true:V);return le.filter(ce=>ge(ce.name,R))},[L,R,D,t,s,V]),ee=le=>{let ge=Zu(le,t,r);O(ge),a&&a(le);},ie=le=>{O(le);},Me=()=>{L&&Y(true);};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(reactAriaComponents.ComboBox,{onSelectionChange:ee,selectedKey:o||void 0,defaultSelectedKey:n||void 0,items:D?D.items:r?r.flatMap(le=>le.items):t,className:Ie(T,"group flex flex-col w-full"),menuTrigger:L?"manual":i?"input":"focus",allowsEmptyCollection:!!i,isDisabled:g,isInvalid:f||!!c,inputValue:R,onInputChange:ie,autoFocus:w&&!L,defaultFilter:s??(i?()=>true:V),"aria-label":e||d||"Autocomplete",children:le=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:u,tooltip:m,isRequired:p,children:e}),jsxRuntime.jsxs(Nt,{ref:E,children:[v?jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10",children:v(q)}):jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 z-10 flex items-center",children:q?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:`${oT[u]} text-text-secondary`})}),jsxRuntime.jsx(reactAriaComponents.Input,{className:Yt({isInvalid:f||!!c,isDisabled:g,isFocused:W||(L?F:le.isOpen),size:u,className:tailwindMerge.twMerge(nT[u],R&&!g||!N&&!R?"pr-10":"pr-3",L&&"cursor-pointer",T)}),placeholder:d,disabled:g,onFocus:ge=>{z(true),L&&(ge.currentTarget.blur(),Me());},onBlur:()=>{z(false);},onClick:L?Me:void 0,readOnly:L,"aria-label":e||d||"Autocomplete"}),R&&!g&&jsxRuntime.jsx(Yi,{onClick:()=>{O(""),a?.(null);},size:u}),!N&&!R&&jsxRuntime.jsx(reactAriaComponents.Button,{className:"absolute right-3 top-[46%] -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":"Toggle menu",isDisabled:g,children:({isPressed:ge})=>jsxRuntime.jsx(H,{name:ge?"CaretUp":"CaretDown",className:"h-4 w-4"})})]}),S?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:h&&J?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:J}):h&&typeof c=="string"?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:c}):h&&typeof c=="function"&&x?jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text",children:c(x)}):l?jsxRuntime.jsx(Pe,{size:u,children:l}):null}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[l&&jsxRuntime.jsx(Pe,{size:u,className:"mt-1",children:l}),h&&J&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:J}),h&&typeof c=="string"&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:c}),h&&typeof c=="function"&&x&&jsxRuntime.jsx(xe,{size:u,className:"text-feedback-error-text mt-1",children:c(x)})]}),!L&&jsxRuntime.jsx(St,{className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm ring-1 ring-black/5 rounded-[var(--control-border-radius)]",style:{minWidth:P?`${P}px`:void 0,zIndex:9999},children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",className:`max-h-[300px] overflow-auto bg-background-input outline-none ${b}`,children:r?r.map(ge=>{let ce=ge.items.map(pe=>jsxRuntime.jsx(Cr,{id:pe.id,textValue:pe.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${xb[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:y?y(pe):pe.name},pe.id));if(C){let pe=C(ge,ce);return Ze__namespace.default.isValidElement(pe)&&pe.type===reactAriaComponents.ListBoxSection?pe:jsxRuntime.jsx(reactAriaComponents.ListBoxSection,{children:pe},ge.name)}return jsxRuntime.jsxs(reactAriaComponents.ListBoxSection,{children:[jsxRuntime.jsx(reactAriaComponents.Header,{className:"px-3 py-1 text-sm font-bold text-text-secondary",children:ge.name}),ce]},ge.name)}):ge=>jsxRuntime.jsx(Cr,{id:ge.id,textValue:ge.name,size:u,className:`flex cursor-default items-center gap-2 px-3 ${xb[u]} text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0`,children:y?y(ge):ge.name},ge.id)})})]})}),L&&jsxRuntime.jsx(wt,{isOpen:F,onClose:()=>Y(false),title:e??d??"Search",contentPadding:false,height:"80vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"p-4 border-b border-border-default",children:jsxRuntime.jsxs(Nt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-[45%] -translate-y-1/2 z-10 flex items-center",children:q?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"})}),jsxRuntime.jsx("input",{ref:A,type:"text",value:R,onChange:le=>ie(le.target.value),placeholder:d,autoFocus:true,className:Yt({isInvalid:false,isDisabled:false,isFocused:true,size:"md",className:"pl-10 pr-10"})}),R&&jsxRuntime.jsx(Yi,{onClick:()=>{O(""),a?.(null);},size:"md"})]})}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:jsxRuntime.jsx(reactAriaComponents.ListBox,{"aria-label":e||d||"Suggestions",items:_,selectedKeys:o?[o]:[],selectionMode:"single",onSelectionChange:le=>{let ge=Array.from(le)[0];ge&&(ee(ge),Y(false));},className:"bg-background-input outline-none",children:le=>jsxRuntime.jsx(Cr,{id:le.id,textValue:le.name,size:"md",className:"flex cursor-default items-center gap-2 px-4 py-3 text-text-primary outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-selected data-[selected]:font-medium data-[focus-visible]:ring-0",children:y?y(le):le.name},le.id)})})]})})]})}function Yo({src:e,alt:t,firstName:r,lastName:o,fullName:n,onClick:a,size:i="md",shape:s="circle",variant:d="user",className:c,status:l,bordered:u=false,piiEntity:m}){let[p,g]=Ze.useState(false),f=Ze.useCallback(()=>g(true),[]);Ze.useEffect(()=>{g(false);},[e]);let x={xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-16 w-16 text-xl"},h={xs:"h-1.5 w-1.5",sm:"h-2 w-2",md:"h-2.5 w-2.5",lg:"h-3 w-3",xl:"h-4 w-4"},y={xs:"bottom-0 right-0",sm:"bottom-0 right-0",md:"bottom-0 right-0",lg:"bottom-0.5 right-0.5",xl:"bottom-1 right-1"},v={online:"bg-feedback-success-background border-feedback-success-border",offline:"bg-text-secondary border-border-muted",away:"bg-feedback-warning-background border-feedback-warning-border",busy:"bg-feedback-error-background border-feedback-error-border"},C={user:"bg-feedback-info-background text-feedback-info-text",team:"bg-feedback-info-background text-feedback-info-text",organization:"bg-feedback-success-background text-feedback-success-text"},w=s==="circle"?"rounded-full":"rounded-md",S=tailwindMerge.twMerge("relative inline-flex items-center justify-center overflow-hidden transition-opacity outline-none",x[i],w,a&&"cursor-pointer hover:opacity-80",u&&"ring-2 ring-background-surface",c),k=(()=>{if(r||o){let P=r?.[0]||"",I=o?.[0]||"";return (P+I).toUpperCase()}if(n){let P=n.split(" "),I=P[0]?.[0]||"",R=P[P.length-1]?.[0]||"";return I===R?I.toUpperCase():(I+R).toUpperCase()}return ""})(),T=()=>{let P={xs:14,sm:16,md:20,lg:24,xl:32}[i];switch(d){case "team":return jsxRuntime.jsx(lucideReact.Users,{size:P});case "organization":return jsxRuntime.jsx(lucideReact.Building2,{size:P});default:return jsxRuntime.jsx(lucideReact.User,{size:P})}},E=P=>{if(m)return d==="organization"?P?"organization-logo":"initials":P?"avatar":"initials"},A=()=>e&&!p?jsxRuntime.jsx("img",{src:e,alt:t||n||"Avatar",className:"h-full w-full object-cover",onError:f,"data-pii-type":E(true),"data-pii-entity":m}):k?jsxRuntime.jsx("span",{className:"font-semibold","data-pii-type":E(false),"data-pii-entity":m,children:k}):T();return jsxRuntime.jsxs("div",{className:"relative inline-block",children:[jsxRuntime.jsx("div",{"data-avatar":true,className:tailwindMerge.twMerge(S,!e||p?C[d]:""),onClick:a,role:a?"button":void 0,tabIndex:a?0:void 0,children:A()}),l&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("absolute border-2 border-background-surface",w,h[i],y[i],v[l]),"aria-label":`Status: ${l}`})]})}var fT={default:"bg-feedback-info-background text-feedback-info-text",success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",primary:"bg-action-primary/10 text-action-primary border border-action-primary/20",brand:"bg-action-primary/10 text-action-primary border border-action-primary/20",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted",neutral:"bg-background-muted text-text-secondary",charging:"bg-state-charging text-state-charging-text",discharging:"bg-state-discharging text-state-discharging-text",heat:"bg-state-heat text-state-heat-text",cool:"bg-state-cool text-state-cool-text",eco:"bg-state-eco text-state-eco-text",auto:"bg-state-auto text-state-auto-text",on:"bg-state-on text-state-on-text",off:"bg-state-off text-state-off-text",idle:"bg-state-idle text-state-idle-text",circulate:"bg-state-circulate text-state-circulate-text",unknown:"bg-state-unknown text-state-unknown-text",connected:"bg-feedback-success-background text-feedback-success-text",disconnected:"bg-feedback-error-background text-feedback-error-text",importing:"bg-state-importing text-state-importing-text",exporting:"bg-state-exporting text-state-exporting-text"},gT={xs:"px-1.5 py-0.5 text-xs",sm:"px-2.5 py-1.5 text-xs",md:"px-3.5 py-2 text-sm",lg:"px-4 py-2.5 text-base"},bT={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"},hT={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};function gt({children:e,variant:t="default",size:r="sm",shape:o="square",dot:n=false,dotPosition:a="left",dotPulse:i=false,title:s,className:d}){let c=n&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("rounded-full bg-current opacity-75",hT[r],i&&"animate-pulse"),"aria-hidden":"true"});return jsxRuntime.jsxs("span",{title:s,className:tailwindMerge.twMerge("inline-flex items-center gap-1.5 font-medium",gT[r],bT[o],fT[t],d),children:[n&&a==="left"&&c,e,n&&a==="right"&&c]})}var pt=({href:e,children:t,className:r="",external:o=false,title:n,variant:a="secondary",onClick:i,asButton:s=false,onPress:d,showArrow:c=false,alwaysUnderlined:l=false,LinkComponent:u,"data-pii-type":m,"data-pii-entity":p})=>{let g={...m&&{"data-pii-type":m},...p&&{"data-pii-entity":p}},f=o?{target:"_blank",rel:"noopener noreferrer"}:{},C=`${`${l?"underline decoration-1 underline-offset-4 decoration-current":"hover:underline hover:decoration-1 hover:underline-offset-4 hover:decoration-current"} cursor-pointer`} ${{primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""}[a==="brand"?"primary":a==="default"?"secondary":a]} ${r}`,w=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t,c&&jsxRuntime.jsxs("span",{children:["\xA0","\u2192"]})]});return s?jsxRuntime.jsx("button",{type:"button",className:C,onClick:d,title:n,...g,children:w}):u&&e?jsxRuntime.jsx(u,{href:e,className:C,title:n,onClick:i,...f,...g,children:w}):jsxRuntime.jsx("a",{href:e||"#",className:C,...f,...g,title:n,onClick:i,children:w})};var PT={info:{subtle:{container:"bg-feedback-info-background border-l-4 border-l-feedback-info-border",iconColor:"text-feedback-info-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-info-border border-feedback-info-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Info},success:{subtle:{container:"bg-feedback-success-background border-l-4 border-l-feedback-success-border",iconColor:"text-feedback-success-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-success-border border-feedback-success-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.CheckCircle},warning:{subtle:{container:"bg-feedback-warning-background border-l-4 border-l-feedback-warning-border",iconColor:"text-feedback-warning-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-warning-border border-feedback-warning-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.AlertCircle},error:{subtle:{container:"bg-feedback-error-background border-l-4 border-l-feedback-error-border",iconColor:"text-feedback-error-border",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-feedback-error-border border-feedback-error-border",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.XCircle},discovery:{subtle:{container:"bg-background-muted border-l-4 border-l-action-brand",iconColor:"text-action-brand",titleColor:"text-text-primary",bodyColor:"text-text-primary"},bold:{container:"bg-action-brand border-action-brand",iconColor:"text-text-inverse",titleColor:"text-text-inverse",bodyColor:"text-text-inverse/90"},icon:lucideReact.Lightbulb}};function Pl({variant:e="info",appearance:t="subtle",title:r,children:o,dismissible:n=false,onDismiss:a,primaryAction:i,secondaryAction:s,icon:d,hideIcon:c=false,className:l,testId:u}){let m=PT[e],p=m[t],g=m.icon,f=!!(i||s),x=!!(r||o);return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex gap-3 rounded-sm border p-4",p.container,l),role:"region","aria-live":"polite","data-testid":u,children:[!c&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0",p.iconColor),"aria-hidden":"true",children:d||jsxRuntime.jsx(g,{className:"h-5 w-5"})}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[x&&jsxRuntime.jsxs("div",{className:"flex-1",children:[r&&jsxRuntime.jsx("div",{className:br(Et("headingSm"),p.titleColor),children:r}),o&&jsxRuntime.jsx("div",{className:br(Et("bodySm"),r?"mt-1":"",p.bodyColor),children:o})]}),f&&jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[i&&(i.asLink?jsxRuntime.jsx(pt,{asButton:true,onPress:i.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:i.label}):jsxRuntime.jsx(re,{size:"sm",variant:"primary",onPress:i.onPress,className:t==="bold"?"bg-background-surface text-text-primary hover:bg-background-surface/90":"",children:i.label})),s&&(s.asLink?jsxRuntime.jsx(pt,{asButton:true,onPress:s.onPress,variant:t==="bold"?"unstyled":"default",className:t==="bold"?"text-text-inverse hover:text-text-inverse/80":"",children:s.label}):jsxRuntime.jsx(re,{size:"sm",variant:"secondary",onPress:s.onPress,className:t==="bold"?"border-text-inverse/30 text-text-inverse hover:bg-text-inverse/10":"",children:s.label}))]})]}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:tailwindMerge.twMerge("flex h-8 w-8 flex-shrink-0 items-center justify-center self-start rounded-md transition-colors hover:bg-background-modal/10",p.iconColor,ot()),"aria-label":"Dismiss banner",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]})}function Sb({isOpen:e=true,position:t="sticky",className:r,...o}){let n=t==="fixed"?"fixed top-0 left-0 right-0 z-50":"sticky top-0 z-50",a=r?`${r} !rounded-none`:"!rounded-none";return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:e&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:n,children:jsxRuntime.jsx(Pl,{...o,className:a})})})}function ei(){let[e,t]=Ze.useState({width:0,height:0}),r=Ze.useRef(null),o=Ze.useRef(void 0),n=Ze.useCallback(a=>{if(r.current&&(r.current.disconnect(),r.current=null),o.current&&(cancelAnimationFrame(o.current),o.current=void 0),!a){t({width:0,height:0});return}let i=a.getBoundingClientRect();t({width:i.width,height:i.height}),r.current=new ResizeObserver(s=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(d=>{for(let c of s){let{width:l,height:u}=c.contentRect;t(m=>m.width!==l||m.height!==u?{width:l,height:u}:m);}});}),r.current.observe(a);},[]);return Ze.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current),r.current&&r.current.disconnect();},[]),{ref:n,width:e.width,height:e.height}}function yn({value:e,children:t,className:r,size:o="sm",iconPosition:n="right"}){let[a,i]=Ze.useState(false),c=jsxRuntime.jsx(re,{variant:"icon",size:o,onPress:()=>{let u=e||(typeof t=="string"?t:"");navigator.clipboard.writeText(u),i(true),setTimeout(()=>{i(false);},2e3);},className:"!px-2 relative",style:{top:"0.5px"},children:jsxRuntime.jsx(H,{name:"Copy",size:o==="sm"?14:16})}),l=a?jsxRuntime.jsx(tr,{content:"Copied!",children:c}):c;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-0.5",r),children:[n==="left"&&l,t,n==="right"&&l]})}function Rl(e){let{children:t,maxWidth:r=600,className:o,...n}=e,{ref:a,width:i}=ei(),[s,d]=Ze__namespace.default.useState(false),[c,l]=Ze__namespace.default.useState(false),u=Ze__namespace.default.useRef(false),m=Ze__namespace.default.useMemo(()=>t&&!e.items&&typeof t!="function"?Ze__namespace.default.Children.toArray(t):null,[t,e.items]);if(Ze__namespace.default.useEffect(()=>{m&&m.length>=4&&i>0&&!u.current?(u.current=true,d(i>r),l(true)):(!m||m&&m.length<4)&&l(true);let p=setTimeout(()=>{c||l(true);},100);return ()=>clearTimeout(p)},[i,r,m,c]),m&&s&&m.length>=4){let p=m[0],g=m.slice(1,-2),f=m.slice(-2),x=g.map(h=>{if(Ze__namespace.default.isValidElement(h)){let y=h.props;if(typeof y.children=="string")return {label:y.children,href:y.href}}return {label:"..."}});return jsxRuntime.jsxs(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",c?"opacity-100":"opacity-0",o),children:[p,jsxRuntime.jsx(BT,{items:x}),f]})}return jsxRuntime.jsx(reactAriaComponents.Breadcrumbs,{...n,ref:a,className:tailwindMerge.twMerge("flex gap-2",c?"opacity-100":"opacity-0",o),children:t})}function BT({items:e}){let t=e.map((r,o)=>({id:`breadcrumb-${o}`,name:r.label,href:r.href}));return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Qa,{items:t,align:"left",size:"sm",children:jsxRuntime.jsx(re,{variant:"icon",size:"sm",icon:"DotsThree","aria-label":"Show hidden breadcrumbs",className:"px-0.5"})}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 text-text-secondary"})]})})}function El(e){let{className:t,children:r,href:o,copyable:n,copyValue:a,...i}=e;return jsxRuntime.jsx(reactAriaComponents.Breadcrumb,{className:Ie(t,"flex items-center gap-2"),...i,children:s=>{let d=s.isCurrent,c=typeof r=="function"?r(s):r;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:d?n?jsxRuntime.jsx(yn,{value:a||(typeof c=="string"?c:void 0),size:"sm",iconPosition:"right",children:jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:c})}):jsxRuntime.jsx("span",{className:"max-w-[200px] truncate font-semibold text-text-primary sm:max-w-none",children:c}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(pt,{variant:"muted",href:o,className:"max-w-[150px] truncate sm:max-w-[300px] md:max-w-none",children:c}),jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-4 w-4 shrink-0 text-text-secondary"})]})})}})}function JT({isSelected:e,isDisabled:t}){let r=[ot,"w-9 h-9 text-sm cursor-default rounded-sm flex items-center justify-center forced-color-adjust-none font-semibold"];return t?r.push("text-text-disabled forced-colors:text-[GrayText]"):e?r.push("bg-action-default text-text-inverse invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]"):r.push("text-text-primary hover:bg-background-hover pressed:bg-background-selected"),r.join(" ")}function ti({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.Calendar,{...t,children:[jsxRuntime.jsx(Ml,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(Ll,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:({isSelected:o,isDisabled:n})=>`${JT({isSelected:o,isDisabled:n})} border-0`})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function Ml(){let{direction:e}=reactAriaComponents.useLocale(),t=18;return jsxRuntime.jsxs("header",{className:"flex w-full items-center gap-1 px-1 pb-4",children:[jsxRuntime.jsx(re,{variant:"icon",slot:"previous",className:"pl-0",children:e==="rtl"?jsxRuntime.jsx(H,{name:"CaretRight","aria-hidden":true,size:t}):jsxRuntime.jsx(H,{name:"CaretLeft","aria-hidden":true,size:t})}),jsxRuntime.jsx(reactAriaComponents.Heading,{className:"text-md mx-2 flex-1 text-center font-semibold text-text-primary"}),jsxRuntime.jsx(re,{variant:"icon",slot:"next",className:"pr-0",children:e==="rtl"?jsxRuntime.jsx(H,{name:"CaretLeft","aria-hidden":true,size:t}):jsxRuntime.jsx(H,{name:"CaretRight","aria-hidden":true,size:t})})]})}function Ll(){return jsxRuntime.jsx(reactAriaComponents.CalendarGridHeader,{children:e=>jsxRuntime.jsx(reactAriaComponents.CalendarHeaderCell,{className:"text-xs font-semibold text-text-secondary",children:e})})}var Eb=Ze__namespace.createContext(null);function vn(){let e=Ze__namespace.useContext(Eb);if(!e)throw new Error("Carousel components must be used within a CarouselRoot");return e}function Mb({page:e,defaultPage:t=0,onPageChange:r,orientation:o="horizontal",loop:n=false,autoplay:a=false,autoplayDelay:i=4e3,allowMouseDrag:s=false,spacing:d="1rem",slidesPerView:c=1,slidesPerMove:l=1,className:u,children:m,...p}){let g=e!==void 0,[f,x]=Ze__namespace.useState(t),h=g?e:f,y=Ze__namespace.useRef(null),[v,C]=Ze__namespace.useState(0),[w,S]=Ze__namespace.useState(typeof a=="boolean"?a:!!a),[N,k]=Ze__namespace.useState(false),T=Ze__namespace.useRef(null),E=Ze__namespace.useRef(null),A=typeof a=="object"&&a!==null&&a.delay?a.delay:i;Ze__namespace.useEffect(()=>{if(y.current){let b=Math.max(1,Math.floor(Number(c)||1)),M=y.current.children;if(M.length===0){C(0);return}let D=Math.ceil(M.length/b);C(D);}},[m,c]);let P=Ze__namespace.useRef(-1);Ze__namespace.useEffect(()=>{if(h!==P.current&&y.current){let b=Array.from(y.current.children);if(b.length===0)return;let M=h*c,D=Math.min(M,b.length-1),q=b[D];q&&typeof q.scrollIntoView=="function"&&(q.scrollIntoView({behavior:"smooth",block:o==="vertical"?"start":"nearest",inline:o==="horizontal"?"start":"nearest"}),P.current=h);}},[h,c,o]);let I=Ze__namespace.useCallback(b=>{let M=b;n?M<0?M=v-1:M>=v&&(M=0):M=Math.max(0,Math.min(b,v-1)),g||x(M),r?.(M);},[g,n,r,v]),R=Ze__namespace.useCallback(()=>{I(h+l);},[h,I,l]),O=Ze__namespace.useCallback(()=>{I(h-l);},[h,I,l]),W=Ze__namespace.useRef(R);Ze__namespace.useEffect(()=>{W.current=R;},[R]);let z=v>0&&(n||h<v-1),F=v>0&&(n||h>0),Y=Ze__namespace.useCallback(()=>{S(b=>!b);},[]);Ze__namespace.useEffect(()=>{if(w&&v>1)return T.current=setInterval(()=>{W.current();},A),()=>{T.current&&(clearInterval(T.current),T.current=null);}},[w,v,A]);let U=Ze__namespace.useCallback(()=>{T.current&&(clearInterval(T.current),T.current=null);},[]),V=Ze__namespace.useCallback(()=>{w&&v>1&&(T.current=setInterval(()=>{W.current();},A));},[w,v,A]),J=Ze__namespace.useCallback(b=>{if(!s)return;k(true);let M="touches"in b&&b.touches&&b.touches.length>0?b.touches[0].clientX:"clientX"in b?b.clientX:0,D="touches"in b&&b.touches&&b.touches.length>0?b.touches[0].clientY:"clientY"in b?b.clientY:0;E.current={x:M,y:D};},[s]),G=Ze__namespace.useCallback(b=>{if(!N||!E.current)return;let M="touches"in b&&b.touches&&b.touches.length>0?b.touches[0].clientX:"clientX"in b?b.clientX:0,D="touches"in b&&b.touches&&b.touches.length>0?b.touches[0].clientY:"clientY"in b?b.clientY:0,q=M-E.current.x,ae=D-E.current.y,_=50;o==="horizontal"&&Math.abs(q)>_?(q>0?O():R(),k(false),E.current=null):o==="vertical"&&Math.abs(ae)>_&&(ae>0?O():R(),k(false),E.current=null);},[N,o,R,O]),B=Ze__namespace.useCallback(()=>{k(false),E.current=null;},[]),L={currentPage:h,totalPages:v,orientation:o,loop:n,spacing:d,slidesPerView:c,goToPage:I,goToNext:R,goToPrev:O,canGoNext:z,canGoPrev:F,isAutoplayActive:w,toggleAutoplay:Y,itemsRef:y,isDragging:N,allowMouseDrag:s,handleDragStart:J,handleDragMove:G,handleDragEnd:B};return jsxRuntime.jsx(Eb.Provider,{value:L,children:jsxRuntime.jsx("div",{...p,className:tailwindMerge.twMerge("relative w-full",o==="vertical"?"h-full":"",u),onMouseEnter:U,onMouseLeave:V,children:m})})}function Lb({className:e,children:t,...r}){let{itemsRef:o,orientation:n,spacing:a,isDragging:i,allowMouseDrag:s,handleDragStart:d,handleDragMove:c,handleDragEnd:l}=vn();return jsxRuntime.jsx("div",{ref:o,...r,className:tailwindMerge.twMerge("flex overflow-x-auto overflow-y-hidden snap-x snap-mandatory scrollbar-hide scroll-smooth",n==="vertical"&&"flex-col overflow-y-auto overflow-x-hidden snap-y",s&&i&&"cursor-grabbing select-none",s&&!i&&"cursor-grab",e),style:{gap:a,"--carousel-spacing":a,...r.style},onMouseDown:d,onMouseMove:c,onMouseUp:l,onMouseLeave:l,onTouchStart:d,onTouchMove:c,onTouchEnd:l,children:t})}function Db({index:e,className:t,children:r,...o}){let{orientation:n,slidesPerView:a}=vn();return jsxRuntime.jsx("div",{...o,"data-index":e,className:tailwindMerge.twMerge("shrink-0 snap-start",n==="horizontal"?"h-full":"w-full",t),style:{width:n==="horizontal"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,height:n==="vertical"?`calc((100% - (${a-1} * var(--carousel-spacing, 1rem))) / ${a})`:void 0,...o.style},children:r})}function Ab({className:e,children:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex items-center justify-center gap-4 mt-4",e),children:t})}function Ib({className:e,children:t,...r}){let{goToPrev:o,canGoPrev:n}=vn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Previous slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:"CaretLeft",size:"sm"})})}function Fb({className:e,children:t,...r}){let{goToNext:o,canGoNext:n}=vn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{o(),r.onClick?.(a);},disabled:!n||r.disabled,"aria-label":"Next slide",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","disabled:opacity-40 disabled:cursor-not-allowed","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:"CaretRight",size:"sm"})})}function ap({index:e,className:t,children:r,...o}){let{currentPage:n,goToPage:a}=vn(),i=n===e;return jsxRuntime.jsx("button",{type:"button",...o,onClick:s=>{a(e),o.onClick?.(s);},"aria-label":`Go to slide ${e+1}`,"aria-current":i,className:tailwindMerge.twMerge("h-2 rounded-full transition-all duration-200",i?"w-6 bg-action-brand":"w-2 bg-border-muted hover:bg-border-input","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",t),children:r})}function Bb({className:e,...t}){let{totalPages:r}=vn();return jsxRuntime.jsx("div",{...t,className:tailwindMerge.twMerge("flex items-center gap-2",e),role:"group","aria-label":"Carousel indicators",children:Array.from({length:r},(o,n)=>jsxRuntime.jsx(ap,{index:n},n))})}function Vb({className:e,children:t,...r}){let{isAutoplayActive:o,toggleAutoplay:n}=vn();return jsxRuntime.jsx("button",{type:"button",...r,onClick:a=>{n(),r.onClick?.(a);},"aria-label":o?"Pause autoplay":"Start autoplay",className:tailwindMerge.twMerge("inline-flex items-center justify-center rounded-md","h-10 w-10","bg-background-input border border-border-input","text-text-primary hover:bg-background-muted","transition-colors duration-200","focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default",e),children:t||jsxRuntime.jsx(H,{name:o?"Pause":"Play",size:"sm"})})}function Ob({className:e,...t}){let{currentPage:r,totalPages:o}=vn();return jsxRuntime.jsxs("div",{...t,className:tailwindMerge.twMerge("text-sm text-text-secondary tabular-nums",e),"aria-live":"polite","aria-atomic":"true",children:[r+1," / ",o]})}var $T="focus:ring-action-primary",ek="bg-action-primary border-action-primary text-[color:var(--color-action-primary-text)] hover:bg-action-primary-hover hover:border-action-primary-hover";function ip(e){return jsxRuntime.jsxs(reactAriaComponents.CheckboxGroup,{...e,className:Ie(e.className,"flex flex-col gap-2"),children:[jsxRuntime.jsx(qe,{children:e.label}),e.children,e.description&&jsxRuntime.jsx(Pe,{children:e.description}),jsxRuntime.jsx(xe,{children:typeof e.errorMessage=="function"?void 0:e.errorMessage})]})}function tk({isDisabled:e}){return `relative flex gap-2 items-center group text-sm transition ${e?"text-text-disabled":"text-text-secondary"}`}function rk({isSelected:e,isInvalid:t,isDisabled:r,isIndeterminate:o}){let n="w-5 h-5 flex-shrink-0 rounded-[var(--control-border-radius)] flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2",a=$T,i="";return r?i="border-border-muted bg-background-muted":t?i="border-feedback-error-border bg-feedback-error-background":e||o?i=ek:i="bg-background-input border-border-input hover:border-border-focus",`${n} ${a} ${i}`}var zb="w-4 h-4 text-current group-disabled:text-text-disabled";function sp({className:e,...t}){return jsxRuntime.jsx("div",{"aria-hidden":"true",className:`${rk(t)} ${e||""}`,children:t.isIndeterminate?jsxRuntime.jsx(lucideReact.Minus,{"aria-hidden":true,className:zb}):t.isSelected?jsxRuntime.jsx(lucideReact.Check,{"aria-hidden":true,className:zb}):null})}function io(e){let{children:t,variant:r,...o}=e;return jsxRuntime.jsx(reactAriaComponents.Checkbox,{...o,className:reactAriaComponents.composeRenderProps(e.className,(n,a)=>`${tk(a)} ${n||""}`),children:n=>{let{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}=n;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(sp,{isSelected:a,isIndeterminate:i,isDisabled:s,isInvalid:d}),typeof t=="function"?t(n):t]})}})}var ak={primary:"bg-action-primary/10 text-action-primary border border-action-primary/20 hover:bg-action-primary/15",secondary:"bg-action-secondary text-[color:var(--color-action-secondary-text)] border border-border-muted hover:bg-action-secondary-hover",info:"bg-feedback-info-background text-feedback-info-text border border-feedback-info-border hover:bg-feedback-info-background/80"};function Gb(e){return !e||e==="default"?"secondary":e==="brand"?"primary":e}var ik={xs:"px-1.5 py-[2px] gap-0.5",sm:"px-2 py-1 gap-1",md:"px-3 py-1.5 gap-1.5",lg:"px-3 py-2 gap-2",xl:"px-4 py-2.5 gap-2"},sk="opacity-75 cursor-not-allowed pointer-events-none";function Wb(e){let{variant:t,size:r,isDisabled:o,isClickable:n,className:a}=e,i=r==="xs"?"text-xs":Je[r].text;return tailwindMerge.twMerge("inline-flex items-center justify-center rounded-full font-medium transition-colors","whitespace-nowrap select-none",ik[r],i,ak[t],n&&!o&&"cursor-pointer",o&&sk,a)}function jr({children:e,onRemove:t,removeLabel:r="Remove",size:o="md",variant:n="secondary",isRemovable:a=true,isDisabled:i=false,className:s,onClick:d}){let c=!!d&&!i,l=a&&t&&!i,u=x=>{x.stopPropagation(),x.preventDefault(),t&&!i&&t();},m=()=>{d&&!i&&d();},p=o==="xs"?10:o==="sm"?12:o==="md"?14:16,f=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"truncate",children:e}),l?c?jsxRuntime.jsx("span",{onClick:u,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),u(x));},role:"button",tabIndex:0,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,children:jsxRuntime.jsx(H,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):jsxRuntime.jsx("button",{type:"button",onClick:u,className:"flex-shrink-0 rounded-full p-0.5 hover:bg-text-primary/10 transition-colors cursor-pointer","aria-label":r,title:r,tabIndex:-1,children:jsxRuntime.jsx(H,{name:"X",size:p,className:"text-current opacity-70 hover:opacity-100"})}):null]});return c?jsxRuntime.jsx("button",{type:"button",onClick:m,className:Wb({variant:Gb(n),size:o,isDisabled:i,isClickable:c,className:s}),disabled:i,children:f}):jsxRuntime.jsx("span",{className:Wb({variant:Gb(n),size:o,isDisabled:i,isClickable:c,className:s}),children:f})}function Yb({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a=false,isDisabled:i=false,isInvalid:s=false,validationResult:d,placeholder:c="Add items...",selectedItems:l=[],onItemsChange:u,staticItems:m,fetchSuggestions:p,chipVariant:g="secondary",showErrors:f=true,className:x}){let[h,y]=Ze.useState(""),[v,C]=Ze.useState([]),[w,S]=Ze.useState(false),[N,k]=Ze.useState(false),[T,E]=Ze.useState(-1),A=hn(h,300),P=Ze.useRef(null),I=Ze.useRef(null),{isFocused:R,handleFocus:O,handleBlur:W}=vr(),z=Ze.useId(),F=Ze.useCallback(L=>{if(!u||!L.trim())return;let b=L.trim();if(l.includes(b)){y(""),k(false),C([]),E(-1);return}u([...l,b]),y(""),k(false),C([]),E(-1),P.current?.focus();},[l,u]),Y=Ze.useCallback(L=>{u&&u(l.filter(b=>b!==L));},[l,u]);Ze.useEffect(()=>{if(!p)return;let L=true;return (async()=>{let M=A.trim();if(!M){L&&(S(false),C([]),k(false));return}S(true);try{let D=await p(M);if(!L)return;C(D),k(!0);}catch(D){if(!L)return;console.error("Error fetching suggestions:",D),C([]),k(false);}finally{L&&S(false);}})(),()=>{L=false;}},[A,p]),Ze.useEffect(()=>{if(p||!m)return;if(!A.trim()){C([]),k(false);return}let L=m.filter(b=>b.name.toLowerCase().includes(A.toLowerCase())).map(b=>b.id);C(L),k(L.length>0||A.trim().length>0);},[A,m,p]);let U=Ze.useMemo(()=>{let L=v.filter(b=>!l.includes(b));return h.trim()&&!L.includes(h.trim())&&!l.includes(h.trim())?[...L,`Create tag: "${h.trim()}"`]:L},[v,h,l]),V=Ze.useCallback(L=>{y(L.target.value),E(-1),L.target.value&&k(true);},[]),J=Ze.useCallback(L=>{i||(L.startsWith("Create tag:")?F(h):F(L));},[F,h,i]),G=Ze.useCallback(L=>{if(!i)switch(L.key){case "Enter":case ",":if(L.preventDefault(),T>=0&&T<U.length){let b=U[T];b.startsWith("Create tag:")?F(h):F(b);}else h.trim()&&F(h.trim());break;case "Backspace":!h&&l.length>0&&(L.preventDefault(),Y(l[l.length-1]));break;case "ArrowDown":L.preventDefault(),N&&E(b=>b<U.length-1?b+1:b);break;case "ArrowUp":L.preventDefault(),N&&E(b=>b>0?b-1:-1);break;case "Escape":k(false),E(-1);break}},[i,h,l,U,T,N,F,Y]);Ze.useEffect(()=>{let L=b=>{I.current&&b.target instanceof Node&&!I.current.contains(b.target)&&k(false);};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[]);let B=()=>tailwindMerge.twMerge("flex items-center gap-1.5 rounded-md overflow-x-auto overflow-y-hidden","[&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",xn({isInvalid:s,isDisabled:i,isFocused:R}),"bg-background-input",o==="sm"&&"px-2 py-1 h-[32px]",o==="md"&&"px-2.5 py-1.5 h-[40px]",o==="lg"&&"px-3 py-2 h-[44px]",o==="xl"&&"px-3.5 py-2.5 h-[48px]",i&&"opacity-50 cursor-not-allowed bg-background-muted");return jsxRuntime.jsxs("div",{ref:I,className:tailwindMerge.twMerge("relative flex flex-col gap-1",x),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:B(),onClick:()=>!i&&P.current?.focus(),children:[l.map(L=>jsxRuntime.jsx(jr,{variant:g,size:"xs",onRemove:()=>Y(L),isDisabled:i,className:"shrink-0 max-h-full",children:L},L)),jsxRuntime.jsx("input",{ref:P,type:"text",role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":z,"aria-autocomplete":"list",value:h,onChange:V,onKeyDown:G,onFocus:L=>O(L),onBlur:L=>W(L),placeholder:l.length===0?c:"",disabled:i,className:"flex-1 min-w-[120px] h-full !border-0 !outline-none !ring-0 bg-transparent text-text-primary text-sm placeholder:text-text-disabled disabled:cursor-not-allowed focus:!ring-0 focus:!outline-none focus:!border-0 focus-visible:!ring-0 focus-visible:!outline-none focus-visible:!border-0",style:{boxShadow:"none",WebkitAppearance:"none",appearance:"none",border:"none",outline:"none"}})]})}),N&&(h||U.length>0)&&jsxRuntime.jsx("div",{id:z,role:"listbox",className:tailwindMerge.twMerge("absolute z-50 mt-1 rounded-lg border border-border-default","max-h-60 overflow-auto bg-background-surface shadow-lg","left-0 right-0 top-full"),children:w?jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"Loading..."}):U.length>0?U.map((L,b)=>jsxRuntime.jsx("div",{role:"option","aria-selected":b===T,className:tailwindMerge.twMerge("cursor-pointer px-3 py-2 text-sm transition-colors","hover:bg-background-hover",b===T&&"bg-background-selected",L.startsWith("Create tag:")&&"italic text-text-secondary"),onClick:()=>J(L),children:L},L)):h&&jsxRuntime.jsx("div",{className:"px-3 py-2 text-sm text-text-secondary",children:"No suggestions found"})}),t&&jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}),f&&typeof r=="string"&&jsxRuntime.jsx(xe,{size:o,className:"text-feedback-error-text mt-1",children:r}),f&&typeof r=="function"&&d&&jsxRuntime.jsx(xe,{size:o,className:"text-feedback-error-text mt-1",children:r(d)})]})}var hk={json:()=>import('ace-builds/src-noconflict/mode-json'),javascript:()=>import('ace-builds/src-noconflict/mode-javascript'),typescript:()=>import('ace-builds/src-noconflict/mode-typescript'),html:()=>import('ace-builds/src-noconflict/mode-html'),css:()=>import('ace-builds/src-noconflict/mode-css'),markdown:()=>import('ace-builds/src-noconflict/mode-markdown'),yaml:()=>import('ace-builds/src-noconflict/mode-yaml'),xml:()=>import('ace-builds/src-noconflict/mode-xml'),python:()=>import('ace-builds/src-noconflict/mode-python'),sql:()=>import('ace-builds/src-noconflict/mode-sql')},xk={github:()=>import('ace-builds/src-noconflict/theme-github'),github_dark:()=>import('ace-builds/src-noconflict/theme-github_dark')},yk={"ext-language-tools":()=>import('ace-builds/src-noconflict/ext-language_tools')},ji=new Set;async function cp(e,t){ji.has(e)||(await t(),ji.add(e));}async function vk(e,t,r){await Promise.all([cp(`language:${e}`,hk[e]),cp(`theme:${t}`,xk[t]),r?cp("extension:language-tools",yk["ext-language-tools"]):void 0]);}function Xb(e,t,r){let o=ji.has(`language:${e}`)&&ji.has(`theme:${t}`);return r?o&&ji.has("extension:language-tools"):o}function qb({value:e,readOnly:t=false,onChange:r,language:o="json",theme:n="github_dark",height:a,width:i="100%",className:s,lineHeight:d=19,minLines:c=3,maxLines:l=50,showLineNumbers:u=true,showGutter:m=true,fontSize:p=14,wrapEnabled:g=false}){let f=Ze.useRef(null),[x,h]=Ze.useState(()=>Xb(o,n,!t)),y=Ze.useMemo(()=>{if(a)return a;let v=(e.match(/\n/g)||[]).length+1;return `${Math.max(c,Math.min(v,l))*d+10}px`},[e,a,d,c,l]);return Ze.useEffect(()=>{let v=false,C=!t;return Xb(o,n,C)?(h(true),()=>{v=true;}):(h(false),vk(o,n,C).then(()=>{v||h(true);}).catch(w=>{v||h(true),console.error("Failed to load Ace editor resources",w);}),()=>{v=true;})},[o,t,n]),Ze.useEffect(()=>{x&&f.current?.editor&&f.current.editor.resize();},[y,x]),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden rounded-md border border-border-input",s),style:{width:i,height:y},children:x?jsxRuntime.jsx(gk__default.default,{ref:f,mode:o,theme:n,value:e,onChange:r,readOnly:t,width:"100%",height:"100%",fontSize:p,showPrintMargin:false,showGutter:m,highlightActiveLine:!t,setOptions:{useWorker:true,showLineNumbers:u,tabSize:2,enableBasicAutocompletion:!t,enableLiveAutocompletion:!t,enableSnippets:!t,showFoldWidgets:true,wrap:g},editorProps:{$blockScrolling:true}}):jsxRuntime.jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-muted text-foreground-muted",children:"Loading editor\u2026"})})}var Qb=Ze__namespace.createContext({variant:"contained",density:"comfortable",showDividers:true}),Zb=Ze__namespace.createContext(null),Tk={contained:"rounded-lg border border-border-default bg-background-surface overflow-hidden",bordered:"rounded-lg border border-border-default bg-background-surface",plain:"bg-transparent"},jb={true:"divide-y divide-border-default",false:"gap-3"},kk={comfortable:"px-5 py-3",compact:"px-4 py-2.5"},Pk={comfortable:"px-5 pt-0",compact:"px-4 pt-0"},Rk={comfortable:"h-4 w-4",compact:"h-3.5 w-3.5"};function mp(){return Ze__namespace.useContext(Qb)}function Ek(e){let t=Ze__namespace.useContext(Zb);if(!t)throw new Error(`${e} must be used within a <CollapseItem>`);return t}function Mk({variant:e,showDividers:t,className:r}){let o="group/collapse-item w-full transition-colors",n={contained:"bg-background-surface",bordered:"bg-background-surface",plain:"bg-transparent"},a=t?"":"rounded-lg border border-border-default bg-background-surface overflow-hidden";return tailwindMerge.twMerge(o,n[e],a,r)}function Lk({isDisabled:e,isPressed:t,density:r,variant:o,showDividers:n,className:a}){let i="group/collapse-header flex w-full items-start gap-4 text-left transition-colors duration-150",s=e?"cursor-not-allowed text-text-disabled":"cursor-pointer text-text-primary",d=t&&!e?"bg-background-hover":"",c=kk[r];return tailwindMerge.twMerge(i,ot(),c,s,d,o==="plain"&&n?"px-0":"",a)}function Dk({density:e,showDividers:t,className:r}){let o="text-text-primary",n=Pk[e];return tailwindMerge.twMerge(o,n,t?"":"rounded-b-lg",r)}function ri({variant:e="contained",density:t="comfortable",showDividers:r=true,className:o,...n}){let a=Ze__namespace.useMemo(()=>({variant:e,density:t,showDividers:r}),[e,t,r]),i=tailwindMerge.twMerge("flex w-full flex-col",Tk[e],r?jb.true:jb.false,e==="plain"&&r?"border-y border-border-default/60":"");return jsxRuntime.jsx(Qb.Provider,{value:a,children:jsxRuntime.jsx(reactAriaComponents.DisclosureGroup,{...n,className:Ie(o,i)})})}function wn({className:e,children:t,...r}){let{variant:o,showDividers:n}=mp();return jsxRuntime.jsx(reactAriaComponents.Disclosure,{...r,className:reactAriaComponents.composeRenderProps(e,a=>Mk({variant:o,showDividers:n,className:a})),children:a=>jsxRuntime.jsx(Zb.Provider,{value:a,children:t})})}wn.displayName="CollapseItem";function Nn({title:e,description:t,startContent:r,endContent:o,indicator:n,indicatorPosition:a="end",showIndicator:i=true,keepIndicatorSpace:s=false,children:d,className:c,...l}){let u=Ek("CollapseHeader"),{density:m,variant:p,showDividers:g}=mp(),f=Rk[m];return jsxRuntime.jsx(reactAriaComponents.Button,{...l,slot:"trigger","data-expanded":u.isExpanded?"true":void 0,className:reactAriaComponents.composeRenderProps(c,(x,h)=>Lk({isDisabled:h.isDisabled??false,isPressed:h.isPressed??false,density:m,variant:p,showDividers:g,className:x})),children:x=>{let h=x.isDisabled??false,y=i?typeof n=="function"?n({isExpanded:u.isExpanded,isDisabled:h}):n??jsxRuntime.jsx(H,{name:"CaretDown",size:m==="compact"?"xs":"sm",weight:"bold","aria-hidden":"true",className:tailwindMerge.twMerge("text-text-secondary transition-transform duration-200",u.isExpanded?"rotate-180":"rotate-0")}):null,v=y?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center text-text-secondary",f),"aria-hidden":"true",children:y}):s?jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("flex flex-shrink-0 items-center justify-center",f),"aria-hidden":"true"}):null;return jsxRuntime.jsxs("div",{className:"flex w-full items-center gap-4",children:[a==="start"&&v,r&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-text-secondary",children:r}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[d??jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 text-left",children:[e&&jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:e}),t&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:t})]}),o&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0 items-center text-sm text-text-secondary",children:o})]}),a==="end"&&v]})}})}Nn.displayName="CollapseHeader";function Tn({className:e,children:t,...r}){let{density:o,showDividers:n}=mp();return jsxRuntime.jsx(reactAriaComponents.DisclosurePanel,{...r,className:reactAriaComponents.composeRenderProps(e,a=>Dk({density:o,showDividers:n,className:a})),children:jsxRuntime.jsx(fn,{children:t})})}Tn.displayName="CollapseContent";function oi(e){if(!e)return false;let t=e.startsWith("#")?e.slice(1):e;return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(t)}function gp(e){if(!e)return "";let t=e.startsWith("#")?e.slice(1):e;return t.length===3&&(t=t.split("").map(r=>r+r).join("")),`#${t.toUpperCase()}`}function Bk({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,className:s,validationResult:d,value:c,defaultValue:l,onChange:u,placeholder:m="#000000",showColorSwatch:p=true,reserveErrorSpace:g=true,...f}){let[x,h]=Ze.useState(l||""),[y,v]=Ze.useState(c||l||""),[C,w]=Ze.useState(false),[S,N]=Ze.useState(null),{isFocused:k,handleFocus:T,handleBlur:E}=vr(),A=c!==void 0?c:x;Ze.useEffect(()=>{c!==void 0&&v(c);},[c]);let P=A?!oi(A):false,I=Ze.useCallback(W=>{if(v(W),oi(W)){let z=gp(W);u?u(z):h(z);}else W===""&&(u?u(""):h(""));},[u]),R=Ze.useCallback(W=>{let z=gp(W);v(z),u?u(z):h(z);},[u]),O=Ze.useCallback(W=>{if(oi(y)){let z=gp(y);v(z),u&&z!==A?u(z):!u&&z!==x&&h(z);}E(W,f.onBlur);},[y,A,x,u,E,f.onBlur]);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Ie(s,"group flex flex-col"),children:({isDisabled:W})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsxs("div",{className:"flex-1 relative",children:[jsxRuntime.jsx(Sl,{size:o,disabled:W,type:"text",value:y,placeholder:m,onFocus:z=>T(z,f.onFocus),onBlur:O,onChange:z=>I(z.target.value),className:tailwindMerge.twMerge(Yt({isInvalid:P,isDisabled:W,isFocused:k,size:o,transparent:i}),p?"pr-12":"pr-3","pl-3")}),p&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none",style:{width:Je[o].height},children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-6 h-6 rounded border shadow-sm",oi(A)?"border-border-default":"border-border-default bg-background-muted"),style:oi(A)?{backgroundColor:A}:void 0,"aria-hidden":"true",children:!oi(A)&&jsxRuntime.jsx("div",{className:"w-full h-full flex items-center justify-center",children:jsxRuntime.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-border-muted"})})})})]}),jsxRuntime.jsx("div",{ref:N,children:jsxRuntime.jsx(re,{variant:"secondary",size:o,icon:"Palette",onPress:()=>w(!C),isDisabled:W,className:"flex-shrink-0",children:"Pick"})})]})}),g?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&d?jsxRuntime.jsx(xe,{size:o,children:r(d)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&d?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(d)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null}),C&&S&&jsxRuntime.jsx(St,{triggerRef:{current:S},isOpen:C,onOpenChange:w,placement:"bottom end",className:"bg-background-input shadow-xl border border-border-input/20 backdrop-blur-sm rounded-lg p-4",children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntime.jsx(reactColorful.HexColorPicker,{color:A||"#000000",onChange:R,style:{width:"200px",height:"200px"}}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"w-10 h-10 rounded border border-border-default shadow-sm flex-shrink-0",style:{backgroundColor:A||"#000000"}}),jsxRuntime.jsx("div",{className:"flex-1 text-text-primary text-[length:var(--control-text-sm)] font-mono",children:A||"#000000"})]})]})})]})})}function eh({isOpen:e,onClose:t,onConfirm:r,title:o,message:n,confirmLabel:a="Confirm",cancelLabel:i="Cancel",confirmVariant:s,isDestructive:d=false,isLoading:c=false,maxWidth:l="500px",minWidth:u="400px"}){return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:o,maxWidth:l,minWidth:u,primaryAction:{label:a,onPress:()=>{r();},variant:s??(d?"destructive":"primary"),isLoading:c},secondaryAction:{label:i,onPress:t,variant:"secondary",isDisabled:c},children:jsxRuntime.jsx("div",{className:"text-text-primary",children:n})})}function th({isConnected:e,connectedAt:t,disconnectedAt:r,showTimestamp:o=false,isLoading:n,size:a="sm",shape:i="pill",...s}){if(n)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-24"});let d=e?"Connected":"Disconnected",c=e?"success":"neutral",l=null;if(o){if(e&&t)l=tl(t);else if(!e&&r){let u=tl(r);l=u?`Offline ${u}`:null;}}return jsxRuntime.jsxs("div",{className:"inline-flex flex-col gap-1",children:[jsxRuntime.jsx(gt,{variant:c,size:a,shape:i,dot:e,dotPulse:e,...s,children:d}),l&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:l})]})}function rh({firstName:e,lastName:t,email:r,phone:o,avatarUrl:n,href:a,LinkComponent:i,variant:s="outlined",layout:d="horizontal",showEmail:c=true,showPhone:l=false,isLoading:u=false,className:m,contentClassName:p,piiEntity:g}){let f=`${e} ${t}`.trim(),x=({children:y,className:v})=>a?i?jsxRuntime.jsx(i,{href:a,className:v,children:y}):jsxRuntime.jsx(pt,{href:a,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",v),asButton:false,children:y}):jsxRuntime.jsx("span",{className:v,children:y}),h=d==="vertical";return u?jsxRuntime.jsx(_e,{variant:s,className:tailwindMerge.twMerge("flex flex-col",m),children:jsxRuntime.jsx(_e.Content,{className:"flex items-center flex-1",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",h?"flex flex-col items-center gap-4":"flex items-center gap-4"),children:[jsxRuntime.jsx(j,{width:56,height:56,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(h?"w-full text-center":"flex-1","space-y-2"),children:[jsxRuntime.jsx(j,{width:"70%",height:20,className:tailwindMerge.twMerge(h&&"mx-auto")}),jsxRuntime.jsx(j,{width:"100%",height:16,className:tailwindMerge.twMerge(h&&"mx-auto")})]})]})})}):jsxRuntime.jsx(_e,{variant:s,className:tailwindMerge.twMerge("group/card flex flex-col",m),children:jsxRuntime.jsx(_e.Content,{className:tailwindMerge.twMerge("flex items-center flex-1",a&&"cursor-pointer",p),children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full",h?"flex flex-col items-center gap-4 text-center":"flex items-center gap-4"),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:n,size:"xl",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:g}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge(h?"w-full":"flex-1 min-w-0"),children:[a&&jsxRuntime.jsx(x,{className:"after:absolute after:inset-0",children:jsxRuntime.jsx("span",{className:"sr-only",children:f})}),jsxRuntime.jsx("span",{className:"text-lg font-semibold leading-tight text-text-primary block mb-1.5 group-hover/card:text-text-brand transition-colors","data-pii-type":g?"full-name":void 0,"data-pii-entity":g,children:f}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-0.5",h&&"flex flex-col items-center"),children:[c&&r&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Envelope",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`mailto:${r}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",h?"":"truncate"),"data-pii-type":g?"email":void 0,"data-pii-entity":g,children:r})]}),l&&o&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Phone",size:16,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`tel:${o}`,variant:"unstyled",className:tailwindMerge.twMerge("text-sm leading-relaxed text-text-primary relative z-20",h?"":"truncate"),"data-pii-type":g?"phone":void 0,"data-pii-entity":g,children:Ua(o)})]})]})]})]})})})}function Il({firstName:e,lastName:t,email:r,avatarUrl:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:c="normal",showEmail:l=false,badge:u,avatarShape:m,isLoading:p=false,className:g,piiEntity:f}){let x=m??(n==="inline"?"circle":"square"),y={xs:{avatarSize:"xs",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonAvatar:24,skeletonText:80,skeletonSecondary:60},sm:{avatarSize:"sm",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonAvatar:32,skeletonText:96,skeletonSecondary:72},md:{avatarSize:"md",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonAvatar:40,skeletonText:128,skeletonSecondary:96},lg:{avatarSize:"lg",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonAvatar:48,skeletonText:160,skeletonSecondary:120}}[a],v=`${e} ${t}`.trim(),w={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[c],S=({children:N,className:k})=>i?s?jsxRuntime.jsx(s,{href:i,className:k,children:N}):jsxRuntime.jsx(pt,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",k),asButton:false,children:N}):jsxRuntime.jsx("span",{className:k,children:N});return p?n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsx(j,{width:y.skeletonAvatar,height:y.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsx(j,{width:y.skeletonText,height:y.skeletonAvatar*.5})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsx(j,{width:y.skeletonAvatar,height:y.skeletonAvatar,className:"flex-shrink-0 rounded-full"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(j,{width:y.skeletonText,height:16}),l&&jsxRuntime.jsx(j,{width:y.skeletonSecondary,height:12})]})]}):n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",y.gap,g),children:[jsxRuntime.jsxs(S,{className:tailwindMerge.twMerge("flex items-center",y.gap),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:o,size:y.avatarSize,variant:"user",shape:x,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,y.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":f?"full-name":void 0,"data-pii-entity":f,children:v})]}),u]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",y.gap,g),children:[jsxRuntime.jsx(Yo,{firstName:e,lastName:t,src:o,size:y.avatarSize,variant:"user",shape:x,className:"flex-shrink-0",piiEntity:f}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(S,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",w,y.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"full-name":void 0,"data-pii-entity":f,children:v})}),u]}),l&&r&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",y.secondaryTextSize),"data-pii-type":f?"email":void 0,"data-pii-entity":f,children:r})]})]})}var hp=Ze.createContext(null);function oh(e){let t=Ze.useContext(hp),r=Ze.useRef(null),o=e??r,[n,a]=Ze.useState(()=>t||{current:"xl",isSm:true,isMd:true,isLg:true,isXl:true,is2Xl:false,isMobile:false,isDesktop:true});return Ze.useEffect(()=>{if(t){a(t);return}let i=o.current;if(!i||typeof ResizeObserver>"u")return;let s=()=>{let c=i.offsetWidth,l=c>=640,u=c>=768,m=c>=1024,p=c>=1280,g=c>=1536,f="base";g?f="2xl":p?f="xl":m?f="lg":u?f="md":l&&(f="sm"),a({current:f,isSm:l,isMd:u,isLg:m,isXl:p,is2Xl:g,isMobile:!u,isDesktop:u});};s();let d=new ResizeObserver(s);return d.observe(i),()=>d.disconnect()},[t,o]),n}function ah({children:e,className:t}){let r=Ze.useRef(null),[o,n]=Ze.useState({current:"base",isSm:false,isMd:false,isLg:false,isXl:false,is2Xl:false,isMobile:true,isDesktop:false});return Ze.useEffect(()=>{let a=r.current;if(!a||typeof ResizeObserver>"u")return;let i=()=>{let d=a.offsetWidth,c=d>=640,l=d>=768,u=d>=1024,m=d>=1280,p=d>=1536,g="base";p?g="2xl":m?g="xl":u?g="lg":l?g="md":c&&(g="sm"),n({current:g,isSm:c,isMd:l,isLg:u,isXl:m,is2Xl:p,isMobile:!l,isDesktop:l});};i();let s=new ResizeObserver(i);return s.observe(a),()=>s.disconnect()},[]),jsxRuntime.jsx(hp.Provider,{value:o,children:jsxRuntime.jsx("div",{ref:r,className:t,style:{width:"100%"},children:e})})}var Fl={duration:.5,ease:"easeInOut"},Qr=Ze.createContext(null);function Bl(){let e=Ze.useRef({played:false});return Ze.useEffect(()=>{e.current.played=true;},[]),e.current}var ra=()=>{let e=Ze.useContext(Qr);if(!e)throw new Error("useChartContext must be used within a ChartContextProvider");return e};function Vl(e,t){if(t<=0||e.length<2)return e;let r=[e[0]];for(let o=1;o<e.length;o++)e[o].xValue.getTime()-e[o-1].xValue.getTime()>t&&r.push(null),r.push(e[o]);return r}var Pn=({data:e,color:t="var(--color-viz-default)",baseline:r,fillOpacity:o=.1,showLine:n=true,maxGapMs:a,animate:i=true})=>{let s=Ze.useId(),d=Ze.useId(),{xScale:c,yScale:l,animationSettings:u,entrance:m}=ra(),[p]=Ze__namespace.default.useState(()=>m?.played!==true),g=i&&p,f=c.range(),x=l.range(),h=(N,k)=>typeof r=="function"?r(N,k):r??0,y=N=>N.chartYValue??N.yValue,v=a!=null?Vl(e,a):e,C=i?void 0:"non-scaling-stroke",w={transformOrigin:`0 ${x[0]}px`,transformBox:"fill-box",isolation:"isolate"},S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r===void 0?jsxRuntime.jsx(shape.AreaClosed,{data:v,x:N=>N?c(N.xValue):0,y:N=>N?l(y(N)):0,yScale:l,defined:N=>N!=null,fill:`url(#${s})`,curve:curve.curveLinear}):jsxRuntime.jsx(shape.Area,{data:v,x:N=>N?c(N.xValue):0,y0:(N,k)=>N?l(h(N,k)):0,y1:N=>N?l(y(N)):0,defined:N=>N!=null,fill:t,fillOpacity:o,curve:curve.curveLinear}),n?jsxRuntime.jsx(shape.LinePath,{data:v,x:N=>N?c(N.xValue):0,y:N=>N?l(y(N)):0,defined:N=>N!=null,stroke:t,strokeWidth:3,vectorEffect:C,curve:curve.curveLinear}):null]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsxs("linearGradient",{id:s,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"50%",stopColor:t,stopOpacity:o}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]}),g&&jsxRuntime.jsx("clipPath",{id:d,children:jsxRuntime.jsx("rect",{x:f[0],y:x[1],width:f[1]-f[0],height:x[0]-x[1]})})]}),g?jsxRuntime.jsx("g",{clipPath:`url(#${d})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:u.duration,ease:u.ease},style:w,children:S})}):jsxRuntime.jsx("g",{style:w,children:S})]})};var zl=({data:e,color:t="var(--color-viz-default)",opacity:r=1,categoryColors:o={}})=>{let{xScale:n,yScale:a,animationSettings:i}=ra(),s=Ze.useId(),d=n.range(),c=a.range(),l=[...e].sort((p,g)=>p.xValue.getTime()-g.xValue.getTime());if(l.length===0)return null;let u=l.length>1?l[1].xValue.getTime()-l[0].xValue.getTime():15*6e4,m=Math.abs(n(new Date(l[0].xValue.getTime()+u))-n(l[0].xValue));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:s,children:jsxRuntime.jsx("rect",{x:d[0],y:c[1],width:d[1]-d[0],height:c[0]-c[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${s})`,children:jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:i.duration,ease:i.ease},style:{transformOrigin:`0 ${a(0)}px`,isolation:"isolate"},children:l.map((p,g)=>{let f=n(p.xValue),x=p.chartYValue??p.yValue,h=p.baselineValue??0,y=a(x),v=a(h),C=Math.min(y,v),w=Math.abs(y-v),S=l[g+1],N=S?Math.abs(n(S.xValue)-f):m,k=p.category&&o[p.category]?o[p.category]:t;return jsxRuntime.jsx(shape.Bar,{x:f-N/2,y:C,width:N,height:w,fill:k,opacity:r,rx:1},p.xValue.getTime())})})})]})};function sP(e,t){return e.length*(t*.6)}var oa;function lP(){if(oa!==void 0)return oa;if(typeof window>"u"||typeof document>"u")return oa=null,oa;try{oa=document.createElement("canvas").getContext("2d");}catch{oa=null;}return oa}function Hl(e,t=12,r="system-ui"){let o=lP();return o?(o.font=`${t}px ${r}`,o.measureText(e).width):sP(e,t)}function Rn(e,t=12,r="system-ui"){return e.length===0?0:Math.max(...e.map(o=>Hl(o,t,r)))}function lh(e,t,r=12,o="system-ui"){if(t<=0)return "";if(Hl(e,r,o)<=t)return e;let n="\u2026";if(Hl(n,r,o)>t)return "";let a=0,i=e.length;for(;a<i;){let s=Math.ceil((a+i)/2);Hl(e.slice(0,s)+n,r,o)<=t?a=s:i=s-1;}return e.slice(0,a)+n}var Gl=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function mP(e){return e>=1e9?"GW":e>=1e6?"MW":e>=1e3?"kW":"W"}function fP(e){return e>=1e3?"kA":e<1?"mA":"A"}function gP(e){return e>=1e3?"kV":e<1?"mV":"V"}function bP(e){return e>=1e6?"M\u03A9":e>=1e3?"k\u03A9":e<1?"m\u03A9":"\u03A9"}function ai(e,t){if(typeof e!="object"||e===null)return e;switch(e.type){case "energy":{if(e.unit||e.autoScale===false)return e;let r=e.sourceUnit?lu[e.sourceUnit]:1;return {...e,unit:su(t*r)}}case "power":return e.unit||e.autoScale===false?e:{...e,unit:mP(t)};case "current":return e.unit||e.autoScale===false?e:{...e,unit:fP(t)};case "voltage":return e.unit||e.autoScale===false?e:{...e,unit:gP(t)};case "resistance":return e.unit||e.autoScale===false?e:{...e,unit:bP(t)};default:return e}}var hP=e=>e.baselineValue??0,Ye={top:8,right:0,bottom:50,left:60};function Or(e={type:"number"}){let t=i=>{if(i==null)return "-";let s=yo({value:i,formatter:e});if(s===null)return "-";if(typeof s=="string")return s;if(typeof s=="number")return s.toString();if(typeof s=="object"&&s!==null&&"props"in s){let d=l=>{if(l==null)return "";if(typeof l=="string")return l;if(typeof l=="number")return l.toString();if(typeof l=="object"&&"props"in l){let u=l.props;if(u?.children)return Array.isArray(u.children)?u.children.map(d).join(""):d(u.children)}return ""};return d(s)||i.toString()}return i.toString()},r=i=>{if(i==null)return "-";if(typeof e=="string"){let s=yo({value:i,formatter:e});return s===null?"-":String(s)}if(typeof e=="object"&&e.type)switch(e.type){case "energy":case "power":case "voltage":case "current":case "resistance":case "temperature":case "distance":return t(i);case "currency":return t(i);default:return t(i)}return t(i)},o,n,a;return typeof e=="object"&&e.type&&e.type==="number"&&("min"in e&&(o=e.min),"max"in e&&(n=e.max)),{format:t,tickFormat:r,min:o,max:n,tickInterval:a}}var yp=(e,t)=>{let r=d3Array.extent(e,o=>o.xValue);return scale.scaleTime({range:[Ye.left,t-Ye.right],domain:r,nice:true})},Zi=(e,t,r,o)=>{let n=Or(r);if(o)return scale.scaleLinear({range:[t-Ye.bottom,Ye.top],domain:o,nice:true});let a=d3Array.min(e,c=>Math.min(c.yValue,c.chartYValue??c.yValue,c.baselineValue??c.yValue))||0,i=d3Array.max(e,c=>Math.max(c.yValue,c.chartYValue??c.yValue,c.baselineValue??c.yValue))||0,s=n.min!==void 0?n.min:a>=0?0:a*1.1,d=n.max!==void 0?n.max:i<=0?0:i*1.1;return scale.scaleLinear({range:[t-Ye.bottom,Ye.top],domain:[s,d],nice:true})};function _i(e){return e instanceof Date&&!Number.isNaN(e.getTime())}var $i=12;function xP(e,t,r=12,o=false){if(!_i(t[0])||!_i(t[1]))return console.warn("ChartAxis: Invalid date in domain, skipping tick calculation"),[];let n=t[0].getTime(),a=t[1].getTime(),i=a-n;if(i===0||i<1e3)return [t[0]];let s=Cu({start:t[0],end:t[1]},{compact:o}),c=[t[0],new Date((t[0].getTime()+t[1].getTime())/2),t[1]].map(y=>s(y)),l=Rn(c,r),m=l+l,p=Math.floor(e/m),g=Math.max(2,Math.min(8,p));if(g<=2)return [t[0],t[1]];let f=[t[0]],x=i/36e5,h;x<=1?h=6e4:x<=6?h=5*6e4:x<=48?h=60*6e4:x<=168?h=360*6e4:h=1440*6e4;for(let y=1;y<g-1;y++){let v=y/(g-1),C=n+i*v,w=Math.round(C/h)*h,S=f[f.length-1].getTime(),N=w>S?w:S+h;if(N>=a)break;f.push(new Date(N));}return f.push(t[1]),f}var yP=({top:e,scale:t,width:r})=>{let o=t.domain(),n=[o[0],o[o.length-1]],a=_i(n[0])&&_i(n[1]),i=r<400,s=a?n[0].getTime():0,d=a?n[1].getTime():0,c=Ze.useMemo(()=>a?Cu({start:n[0],end:n[1]},{compact:i}):()=>"",[s,d,i,a]),l=Ze.useMemo(()=>xP(r,n,12,i),[r,s,d,i]);return l.length===0?null:jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,tickValues:l,tickFormat:u=>{let m=u;return _i(m)?c(m):""},stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:(u,m,p)=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:m===0?"start":m===p.length-1?"end":"middle"}),rangePadding:0})};function ii(e,t=12){let r=t*2.5,o=Math.floor(e/r);return Math.max(2,Math.min(6,o))}var vp=12,vP=({left:e,scale:t,yFormatter:r,height:o})=>{let n=Or(r),a=Ze.useMemo(()=>!o||o<=0?5:ii(o),[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:i=>{let s={fill:"var(--color-text-secondary)",fontSize:vp,textAnchor:"end"},d=t(i),[c,l]=t.range(),u=Math.min(c,l),m=Math.max(c,l);return d-u<vp/2?{...s,verticalAnchor:"start"}:m-d<vp/2?{...s,verticalAnchor:"end"}:{...s,dy:"0.33em"}}})},CP=({top:e,scale:t})=>jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})}),SP=({left:e,scale:t,availableWidth:r})=>jsxRuntime.jsx(axis.Axis,{orientation:"left",left:e,scale:t,stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickFormat:r===void 0?void 0:o=>lh(String(o),r,$i),tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:$i,textAnchor:"end",dx:"-0.25em",dy:"0.33em"})}),wP=({top:e,scale:t,yFormatter:r,width:o})=>{let n=Or(r),a=Ze.useMemo(()=>{if(!o||o<=0)return 5;let s=Math.floor(o/60);return Math.max(2,Math.min(8,s))},[o]);return jsxRuntime.jsx(axis.Axis,{orientation:"bottom",top:e,scale:t,numTicks:a,tickFormat:i=>(n.tickFormat||n.format)(i),stroke:"var(--color-border-muted)",tickStroke:"var(--color-border-muted)",tickLabelProps:()=>({fill:"var(--color-text-secondary)",fontSize:12,textAnchor:"middle",dy:"0.25em"})})},Zr={Bottom:yP,Left:vP,CategoryBottom:CP,CategoryLeft:SP,NumericBottom:wP};var ko=({data:e,formatter:t,label:r,categoryLabels:o})=>{let n=Ze__namespace.default.useContext(Qr),a=o??n?.categoryLabels,i=n?.xScale,s=n?.width,d=n?.height,c=Or(t),l=y=>{if(y.baselineValue===void 0)return c.format(y.value);let v=Math.min(y.baselineValue,y.value),C=Math.max(y.baselineValue,y.value);return `${c.format(v)} \u2013 ${c.format(C)}`},u=Ze__namespace.default.useRef(null),[m,p]=Ze__namespace.default.useState({x:0,y:0,translate:"translate(-50%, -100%)"});if(Ze__namespace.default.useEffect(()=>{if(!e||!u.current)return;let v=u.current.getBoundingClientRect(),C=s??window.innerWidth,w=d??window.innerHeight,S=e.x,N=e.y,k=16,T=e.x+v.width+k<=C,E=e.x-v.width-k>=0,A;e.position==="left"?A=E||!T:A=!T&&E;let P=A?"translate(calc(-100% - 16px), -50%)":"translate(16px, -50%)";if(!T&&!E){let I=C-e.x,R=e.x;I<=R?(S=C,P="translate(-100%, -50%)"):(S=0,P="translate(0, -50%)");}N-v.height/2<0?N=v.height/2:N+v.height/2>w&&(N=w-v.height/2),p({x:S,y:N,translate:P});},[e?.x,e?.y,e?.position,s,d]),!e)return null;let g=i?.domain(),x=g&&g.length===2&&g.every(y=>y instanceof Date)?Cg({start:g[0],end:g[1]}):null,h=r||(x&&e.xValue instanceof Date?x(e.xValue):String(e.xValue));return jsxRuntime.jsx(framerMotion.AnimatePresence,{children:jsxRuntime.jsxs(framerMotion.motion.div,{ref:u,role:"tooltip","aria-live":"polite",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},"data-testid":"tooltip",className:"pointer-events-none absolute z-50 rounded-lg bg-background-surface p-4 text-sm shadow-xl ring-1 ring-border-default whitespace-nowrap",style:{left:m.x,top:m.y,transform:m.translate},children:[jsxRuntime.jsx("div",{className:"mb-1 font-medium text-text-primary",children:h}),e.isEvent?jsxRuntime.jsxs("div",{className:"space-y-2",children:[e.series.length>1&&jsxRuntime.jsx("ul",{className:"list-none p-0 border-b border-border-default pb-2",children:e.series.slice(0,-1).map(y=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[y.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:l(y)})]}),y.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:y.categoryColor||y.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[y.category]||y.category})]}),y.extraTooltipRows&&y.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:y.extraTooltipRows.map(v=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:v.value})]},v.label))})]},y.label))}),(()=>{let y=e.series[e.series.length-1],v=e.eventItems?.length?e.eventItems:[{label:y.label,color:y.color,metadata:e.eventMetadata}];return jsxRuntime.jsx("div",{className:"space-y-2",children:v.map((C,w)=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:C.color}}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:C.label})]}),C.metadata&&Object.keys(C.metadata).length>0&&jsxRuntime.jsx("div",{className:"ml-4 mt-1 space-y-0.5 text-xs text-text-secondary",children:Object.entries(C.metadata).map(([S,N])=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"capitalize",children:[S,":"]}),jsxRuntime.jsx("span",{className:"font-medium",children:N})]},S))})]},`${C.label}-${w}`))})})()]}):jsxRuntime.jsx("ul",{className:"list-none p-0",children:e.series.map(y=>jsxRuntime.jsxs("li",{className:"py-0.5",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsxs("span",{className:"font-medium text-text-primary",children:[y.label,":"]}),jsxRuntime.jsx("span",{className:"text-text-secondary",children:l(y)})]}),y.category&&jsxRuntime.jsxs("div",{className:"mt-0.5 flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-3 w-3",style:{backgroundColor:y.categoryColor||y.color,borderRadius:"1px"}}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:a?.[y.category]||y.category})]}),y.extraTooltipRows&&y.extraTooltipRows.length>0&&jsxRuntime.jsx("div",{className:"mt-0.5 space-y-0.5",children:y.extraTooltipRows.map(v=>jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[jsxRuntime.jsxs("span",{children:[v.label,":"]}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:v.value})]},v.label))})]},y.label))})]})})};var gh={top:20,right:20,bottom:50,left:60},yh=12,LP=.4,bh=60;function DP({margin:e,orientation:t,labelsKey:r,width:o}){return Ze.useMemo(()=>{if(e)return e;if(t!=="horizontal")return gh;let n=Rn(r.split("\0"),$i,"system-ui"),a=Math.max(bh,Math.floor(o*LP)),i=Math.ceil(n)+yh;return {...gh,left:Math.min(Math.max(i,bh),a)}},[e,t,r,o])}var vh=({data:e,width:t,height:r,margin:o,color:n,yFormatter:a={type:"number"},showGrid:i=true,showAxes:s=true,animate:d=true,barRadius:c=4,barPadding:l=.3,onBarClick:u,onBarHover:m,activeIndex:p,className:g,style:f,"aria-label":x,orientation:h="horizontal",showTooltip:y=true})=>{let[v,C]=Ze.useState(null),[w,S]=Ze.useState(null),[N,k]=Ze.useState(null),[T,E]=Ze.useState(t??600),[A,P]=Ze.useState(r??300),I=Ze.useRef(null),R=p??v,O=Ze.useId(),W=n||"var(--color-viz-default)";Ze.useEffect(()=>{if(t!==void 0&&r!==void 0){E(t),P(r);return}if(!I.current)return;let L=new ResizeObserver(b=>{for(let M of b)t===void 0&&E(M.contentRect.width),r===void 0&&P(M.contentRect.height);});return L.observe(I.current),t===void 0&&E(I.current.offsetWidth),r===void 0&&P(I.current.offsetHeight||300),()=>{L.disconnect();}},[t,r]);let z=e.map(L=>L.label).join("\0"),F=DP({margin:o,orientation:h,labelsKey:z,width:T}),Y=Math.max(0,F.left-yh),{xScale:U,yScale:V,innerWidth:J,innerHeight:G}=Ze.useMemo(()=>{let L=T-F.left-F.right,b=A-F.top-F.bottom;if(h==="horizontal"){let D=d3Array.max(e,q=>q.value)||0;return {xScale:scale.scaleLinear({range:[0,L],domain:[0,D*1.1],nice:true}),yScale:scale.scaleBand({range:[0,b],domain:e.map(q=>q.label),padding:l}),innerWidth:L,innerHeight:b}}let M=d3Array.max(e,D=>D.value)||0;return {xScale:scale.scaleBand({range:[0,L],domain:e.map(D=>D.label),padding:l}),yScale:scale.scaleLinear({range:[b,0],domain:[0,M*1.1],nice:true}),innerWidth:L,innerHeight:b}},[e,T,A,F,l,h]);if(e.length===0)return jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:r!==void 0?{height:r,...f}:f,children:"No data available"});let B=(L,b)=>{if(C(L),m?.(b,L),L!==null&&b){let M,D;if(h==="horizontal"){let ae=U(b.value),_=V(b.label)||0,ee=V.bandwidth();M=F.left+ae,D=F.top+_+ee/2;}else {let ae=U,_=V,ee=ae(b.label)??0,ie=ae.bandwidth(),Me=_(b.value);M=F.left+ee+ie/2,D=F.top+Me;}let q=M>T/2;k(b.label),S({xValue:new Date,series:[{label:"Value",value:b.value,color:b.color||W}],x:M,y:D,position:q?"left":"right"});}else S(null),k(null);};return jsxRuntime.jsxs("div",{ref:I,className:tailwindMerge.twMerge("relative h-full w-full overflow-hidden rounded-lg bg-background-surface",g),style:r!==void 0?{height:r,...f}:f,"aria-label":x,role:"img",children:[jsxRuntime.jsxs("svg",{width:T,height:A,children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx(gradient.LinearGradient,{id:`${O}-bar`,from:W,to:W,toOpacity:.85})}),jsxRuntime.jsxs(group.Group,{left:F.left,top:F.top,children:[i&&jsxRuntime.jsx("g",{className:"grid-lines",children:(h==="horizontal"?U.ticks(5):V.ticks(5)).map(L=>{let b=h==="horizontal"?0:V(L),M=h==="horizontal"?U(L):0;return jsxRuntime.jsx("line",{x1:h==="horizontal"?M:0,y1:h==="horizontal"?0:b,x2:h==="horizontal"?M:J,y2:h==="horizontal"?G:b,stroke:"var(--color-border-default)",strokeOpacity:.5,strokeDasharray:"2,3"},L)})}),e.map((L,b)=>{let M=R===b||R==null,D=L.color||`url(#${O}-bar)`;if(h==="horizontal"){let le=U(L.value),ge=V.bandwidth(),ce=V(L.label)||0;return jsxRuntime.jsx(framerMotion.motion.rect,{x:0,y:ce,width:le,height:ge,fill:D,rx:c,ry:c,initial:d?{width:0,opacity:.5}:void 0,animate:{width:le,opacity:M?1:.5},transition:{duration:.5,delay:b*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:u||m?"pointer":"default"},onMouseEnter:()=>B(b,L),onMouseLeave:()=>B(null,null),onClick:()=>u?.(L,b)},L.label)}let q=U,ae=V,_=q.bandwidth(),ee=q(L.label)??0,ie=ae(L.value),Me=Math.max(0,G-ie);return d?jsxRuntime.jsx(framerMotion.motion.rect,{x:ee,width:_,fill:D,rx:c,ry:c,initial:{y:G,height:0,opacity:.5},animate:{y:ie,height:Me,opacity:M?1:.5},transition:{duration:.5,delay:b*.05,ease:"easeOut",opacity:{duration:.15,delay:0}},style:{cursor:u||m?"pointer":"default"},onMouseEnter:()=>B(b,L),onMouseLeave:()=>B(null,null),onClick:()=>u?.(L,b)},L.label):jsxRuntime.jsx("rect",{x:ee,y:ie,width:_,height:Me,fill:D,rx:c,ry:c,opacity:M?1:.5,style:{cursor:u||m?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>B(b,L),onMouseLeave:()=>B(null,null),onClick:()=>u?.(L,b)},L.label)}),s&&h==="vertical"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Zr.CategoryBottom,{top:G,scale:U}),jsxRuntime.jsx(Zr.Left,{left:0,scale:V,yFormatter:a,height:G})]}),s&&h==="horizontal"&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Zr.NumericBottom,{top:G,scale:U,yFormatter:a,width:J}),jsxRuntime.jsx(Zr.CategoryLeft,{left:0,scale:V,availableWidth:Y})]})]})]}),y&&jsxRuntime.jsx(ko,{data:w,formatter:a,label:N??void 0})]})};var Ch=({item:e,onToggle:t})=>{let r=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"h-3 w-3 shrink-0",style:{backgroundColor:e.fill,borderRadius:"1px",opacity:e.isHidden?.35:1}}),jsxRuntime.jsx("span",{className:`text-sm whitespace-nowrap ${e.isHidden?"text-text-disabled line-through":"text-text-secondary"}`,children:e.category})]});return t?jsxRuntime.jsx("button",{type:"button",className:"flex items-center gap-2 shrink-0 rounded-sm focus:outline-none focus:ring-2 focus:ring-border-focus disabled:cursor-not-allowed disabled:opacity-60","aria-pressed":!e.isHidden,"aria-label":`${e.isHidden?"Show":"Hide"} ${e.category}`,disabled:e.isDisabled,onClick:()=>t(e.category),children:r}):jsxRuntime.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})},FP=({items:e,onToggle:t})=>e.length===0?null:jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:e.map(r=>jsxRuntime.jsx(Ch,{item:r,onToggle:t},r.category))}),li=({items:e,onExport:t,marginLeft:r=0,marginRight:o=0,isZoomed:n=false,onResetZoom:a,onLegendItemToggle:i})=>{let[s,d]=Ze__namespace.default.useState(false),[c,l]=Ze__namespace.default.useState(null),[u,m]=Ze__namespace.default.useState(false),[p,g]=Ze__namespace.default.useState(false),f=Ze__namespace.default.useCallback(async h=>{d(true),l(h),g(false);try{await t(h);}catch(y){console.error("Export failed:",y);}finally{d(false),l(null);}},[t]),x=Ze__namespace.default.useCallback(async h=>{await f(h);},[f]);return jsxRuntime.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 min-h-[32px]",style:{marginLeft:r,marginRight:o},children:[jsxRuntime.jsx("div",{className:"hidden sm:block flex-1 min-w-0",children:jsxRuntime.jsx(FP,{items:e,onToggle:i})}),jsxRuntime.jsx("div",{className:"sm:hidden flex items-center gap-3",children:e.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{onClick:()=>m(true),className:"text-sm text-text-secondary hover:text-text-primary transition-colors underline decoration-dotted underline-offset-4",children:"Legend"}),jsxRuntime.jsx(wt,{isOpen:u,onClose:()=>m(false),title:"Legend",children:jsxRuntime.jsx("div",{className:"grid grid-cols-1 gap-3 p-4",children:e.map(h=>jsxRuntime.jsx(Ch,{item:h,onToggle:i},h.category))})})]})}),jsxRuntime.jsxs("div",{className:"sm:hidden flex items-center gap-2 shrink-0",children:[n&&a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",onPress:a,children:jsxRuntime.jsx(H,{name:"ArrowsOut",size:16})}),jsxRuntime.jsx(re,{variant:"secondary",size:"sm",onPress:()=>g(true),isDisabled:s,children:jsxRuntime.jsx(H,{name:"Export",size:16})}),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),title:"Export Chart",contentPadding:false,children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[jsxRuntime.jsxs("button",{onClick:()=>f("csv"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"List",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="csv"?"Exporting...":"Export as CSV"})]}),jsxRuntime.jsxs("button",{onClick:()=>f("svg"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"Code",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="svg"?"Exporting...":"Export as SVG"})]}),jsxRuntime.jsxs("button",{onClick:()=>f("png"),disabled:s,className:"flex items-center gap-3 px-6 py-4 text-left hover:bg-background-hover active:bg-background-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[jsxRuntime.jsx(H,{name:"DownloadSimple",size:20,className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:c==="png"?"Exporting...":"Export as PNG"})]})]})})]}),jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[n&&a&&jsxRuntime.jsxs(re,{variant:"secondary",size:"sm",onPress:a,children:[jsxRuntime.jsx(H,{name:"ArrowsOut",size:16}),jsxRuntime.jsx("span",{className:"hidden sm:inline",children:"Reset Zoom"})]}),jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{variant:"secondary",size:"sm",isDisabled:s,children:[jsxRuntime.jsx(H,{name:"Export",size:16}),s?"Exporting...":"Export"]}),jsxRuntime.jsx(St,{placement:"top end",className:"min-w-48 p-1 bg-background-surface rounded-lg shadow-xl ring-1 ring-border-default",children:jsxRuntime.jsxs(reactAriaComponents.Menu,{onAction:x,className:"outline-none",children:[jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"csv",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"List",size:14}),c==="csv"?"Exporting...":"Export as CSV"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"svg",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"Code",size:14}),c==="svg"?"Exporting...":"Export as SVG"]})}),jsxRuntime.jsx(reactAriaComponents.MenuItem,{id:"png",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-primary rounded cursor-pointer hover:bg-background-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background-surface data-[focused]:bg-background-hover data-[focused]:ring-2 data-[focused]:ring-border-focus data-[focused]:ring-offset-1 data-[focused]:ring-offset-background-surface",isDisabled:s,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"DownloadSimple",size:14}),c==="png"?"Exporting...":"Export as PNG"]})})]})})]})]})]})};var Kl=Cf(Np());var wh=["stroke","fill","color","stop-color","flood-color","lighting-color"],Nh=/var\s*\(/;function Th(e,t){let r=[e,...Array.from(e.querySelectorAll("*"))],o=[t,...Array.from(t.querySelectorAll("*"))],n=Math.min(r.length,o.length);for(let a=0;a<n;a++){let i=r[a],s=o[a];if(!(i instanceof Element)||!(s instanceof Element))continue;let d=window.getComputedStyle(i);for(let c of wh){let l=s.getAttribute(c);if(l&&Nh.test(l)){let u=d.getPropertyValue(c);u&&s.setAttribute(c,u.trim());}}if(s instanceof HTMLElement||s instanceof SVGElement)for(let c of wh){let l=c,u=s.style.getPropertyValue(l);if(u&&Nh.test(u)){let m=d.getPropertyValue(l);m&&s.style.setProperty(l,m.trim());}}}}function Tp(e,t,r=true){let o=e||"chart";if(r){let n=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);return `${o}-${n}.${t}`}return `${o}.${t}`}async function kp(e,t,r={},o){let n=Array.isArray(t[0])?t:[t];try{switch(e){case "csv":await VP(n,r);break;case "svg":await OP(o,r);break;case "png":await zP(o,r);break;default:throw new Error(`Unsupported export type: ${e}`)}}catch(a){throw console.error("Export failed:",a),new Error(`Failed to export chart as ${e}: ${a instanceof Error?a.message:"Unknown error"}`)}}async function VP(e,t){try{let r=t.yFormat?vu(t.yFormat):null,o=t.yFormat,n=m=>{if(m==null||m==="")return "";if(!o)return typeof m=="number"?m:String(m);let p=vg(m,o);return p===null?typeof m=="number"?m:String(m):p},a=new Map;e.forEach(m=>{m.forEach(p=>{let g=p.xValue.getTime();a.has(g)||a.set(g,p.xValue);});});let i=Array.from(a.values()).sort((m,p)=>m.getTime()-p.getTime()),s=e.map((m,p)=>{let g=t.seriesLabels?.[p]||`Series ${p+1}`;return r&&!g.includes(`(${r})`)?`${g} (${r})`:g}),d=i.map(m=>{let p={[t.xLabel||"Date"]:m.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return e.forEach((g,f)=>{let x=s[f],h=g.find(y=>y.xValue.getTime()===m.getTime());p[x]=h?n(h.yValue):"",h?.category&&(p[`${x} Category`]=h.category);}),p}),c=BP__default.default.unparse(d,{header:!0,skipEmptyLines:!0}),l=new Blob([c],{type:"text/csv;charset=utf-8;"}),u=Tp(t.filename||"chart-data","csv",t.timestamp!==!1);(0,Kl.saveAs)(l,u);}catch(r){throw new Error(`CSV export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function OP(e,t){if(!e.current)throw new Error("SVG element not found");try{let r=e.current,o=r.cloneNode(!0);if(Th(r,o),!o.querySelector("rect[data-background]")){let c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("width",o.getAttribute("width")||"100%"),c.setAttribute("height",o.getAttribute("height")||"100%"),c.setAttribute("fill","white"),c.setAttribute("data-background","true"),o.insertBefore(c,o.firstChild);}let i=new XMLSerializer().serializeToString(o);i.includes("<?xml")||(i=`<?xml version="1.0" encoding="UTF-8"?>
118
+ `+i),i.includes("xmlns=")||(i=i.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let s=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),d=Tp(t.filename||"chart","svg",t.timestamp!==!1);(0,Kl.saveAs)(s,d);}catch(r){throw new Error(`SVG export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function zP(e,t,r=2){if(!e.current)throw new Error("SVG element not found");let o="";try{let n=e.current,a=n.getBoundingClientRect(),i=n.cloneNode(!0);Th(n,i),i.setAttribute("width",String(a.width)),i.setAttribute("height",String(a.height)),i.removeAttribute("transform");let s=i.getElementsByTagName("text");Array.from(s).forEach(m=>{m.style.fontFamily||(m.style.fontFamily="system-ui, -apple-system, sans-serif"),m.style.fontSize||(m.style.fontSize="12px");});let d=document.createElementNS("http://www.w3.org/2000/svg","rect");d.setAttribute("width",String(a.width)),d.setAttribute("height",String(a.height)),d.setAttribute("fill","white"),i.insertBefore(d,i.firstChild);let l=new XMLSerializer().serializeToString(i);l.includes("xmlns=")||(l=l.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let u=new Blob([l],{type:"image/svg+xml;charset=utf-8"});return o=URL.createObjectURL(u),new Promise((m,p)=>{let g=new Image,f=setTimeout(()=>{o&&URL.revokeObjectURL(o),p(new Error("Image loading timeout"));},1e4);g.onload=()=>{clearTimeout(f);try{let x=document.createElement("canvas");x.width=a.width*r,x.height=a.height*r;let h=x.getContext("2d");if(!h)throw new Error("Canvas context not available");h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.scale(r,r),h.fillStyle="white",h.fillRect(0,0,a.width,a.height),h.drawImage(g,0,0,a.width,a.height),x.toBlob(y=>{if(y){let v=Tp(t.filename||"chart","png",t.timestamp!==!1);(0,Kl.saveAs)(y,v),m();}else p(new Error("Failed to create PNG blob"));o&&URL.revokeObjectURL(o);},"image/png",1);}catch(x){o&&URL.revokeObjectURL(o),p(x);}},g.onerror=()=>{clearTimeout(f),o&&URL.revokeObjectURL(o),p(new Error("Failed to load SVG as image"));},g.src=o;})}catch(n){throw o&&URL.revokeObjectURL(o),new Error(`PNG export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function HP(e){if(typeof window>"u")return false;switch(e){case "csv":return true;case "svg":return typeof XMLSerializer<"u";case "png":return typeof HTMLCanvasElement<"u"&&typeof HTMLCanvasElement.prototype.toBlob=="function";default:return false}}function GP(e){return {csv:"CSV Spreadsheet",svg:"SVG Vector Image",png:"PNG Image"}[e]||"Unknown Format"}function Yl({datasets:e,metadata:t,svgRef:r}){return Ze.useCallback(async o=>{try{await kp(o,e,t,r);}catch(n){throw console.error("Chart export failed:",n),n}},[e,t,r])}var Pp=({data:e,seriesMetadata:t,width:r,height:o,onBrushChange:n,brushRegion:a,margin:i=Ye,yDomain:s})=>{let d=Ze.useRef(null),c=Ze.useRef(false),l=Ze.useMemo(()=>e.flat(),[e]),u=Ze.useMemo(()=>({top:10,bottom:15,left:i.left,right:i.right}),[i]),m=r-u.left-u.right,p=Ze.useMemo(()=>{if(l.length===0)return scale.scaleTime({domain:[new Date,new Date],range:[0,m]});let y=new Date(Math.min(...l.map(C=>C.xValue.getTime()))),v=new Date(Math.max(...l.map(C=>C.xValue.getTime())));return scale.scaleTime({domain:[y,v],range:[0,m]})},[l,m]),g=Ze.useMemo(()=>{let y=l.length>0?Math.max(0,...l.map(v=>v.yValue)):1;return scale.scaleLinear({domain:s??[0,y],range:[o-u.bottom,u.top]})},[l,o,s,u.top,u.bottom]),f=y=>{if(c.current)return;if(!y){n(null);return}let{x0:v,x1:C}=y;if(v===C)return;let w=new Date(v),S=new Date(C);if(!(Number.isNaN(w.getTime())||Number.isNaN(S.getTime()))){if(l.length>0){let N=Math.min(...l.map(P=>P.xValue.getTime())),k=Math.max(...l.map(P=>P.xValue.getTime())),E=(k-N)*.05;if(Math.abs(w.getTime()-N)<E&&Math.abs(S.getTime()-k)<E){n(null);return}}n([w,S]);}},x=Ze.useMemo(()=>{if(l.length!==0)return {start:{x:0,y:u.top},end:{x:m,y:o-u.bottom}}},[m,o,l]);Ze.useEffect(()=>{if(!d.current||l.length===0)return;let y=d.current.state;if(y?.isBrushing||y?.activeHandle)return;let v=Math.min(...l.map(T=>T.xValue.getTime())),C=Math.max(...l.map(T=>T.xValue.getTime())),w=a?a[0]:new Date(v),S=a?a[1]:new Date(C),N=d.current.state?.extent;if(N){let T=p.invert(N.x0),E=p.invert(N.x1),A=Math.abs(T.getTime()-w.getTime()),P=Math.abs(E.getTime()-S.getTime());if(A<1e3&&P<1e3)return}c.current=true;let k=T=>{let E=d.current.getExtent({x:p(w),y:u.top},{x:p(S),y:o-u.bottom});return {...T,start:{y:E.y0,x:E.x0},end:{y:E.y1,x:E.x1},extent:E}};d.current.updateBrush(k),setTimeout(()=>{c.current=false;},50);},[a,p,o,l]);let h={fill:"url(#brush_pattern)",fillOpacity:.15,stroke:"var(--color-border-focus)",strokeWidth:1.5,strokeOpacity:.3};return jsxRuntime.jsx("div",{className:"mt-2",children:jsxRuntime.jsxs("svg",{width:r,height:o,children:[jsxRuntime.jsx(pattern.PatternLines,{id:"brush_pattern",height:8,width:8,stroke:"var(--color-text-secondary)",strokeWidth:1,orientation:["diagonal"]}),jsxRuntime.jsxs("g",{transform:`translate(${u.left}, 0)`,children:[e.map((y,v)=>jsxRuntime.jsx(shape.LinePath,{data:y,x:C=>p(C.xValue),y:C=>g(C.yValue),stroke:t[v]?.color||"var(--color-gray-500)",strokeWidth:1.5,opacity:.8},`brush-series-${v}`)),jsxRuntime.jsx(brush.Brush,{xScale:p,yScale:g,width:m,height:o-u.top-u.bottom,margin:{top:u.top,bottom:u.bottom,left:0,right:0},handleSize:8,innerRef:d,resizeTriggerAreas:["left","right"],brushDirection:"horizontal",initialBrushPosition:x,onChange:f,onClick:()=>n(null),selectedBoxStyle:h,useWindowMoveEvents:true})]})]})})};function Xo(e){switch(e){case "command":return Wt("--color-action-brand","#111111");case "success":return Wt("--color-feedback-success-border","#278a4a");case "warning":return Wt("--color-feedback-warning-border","#c88420");case "error":return Wt("--color-feedback-error-border","#c42d2d");case "alert":return Wt("--color-feedback-warning-border","#c88420");default:return Wt("--color-text-secondary","#525250")}}function Xl({events:e,color:t,showLabels:r=false}){let o=Ze.useContext(Qr),[n,a]=Ze.useState(null);if(!o)return console.warn("ChartEventMarkers must be used within a ChartContainer"),null;let{xScale:i,yScale:s,height:d,tooltip:c,datasets:l,seriesMetadata:u,seriesTypes:m,categoryColors:p}=o,g=e.filter(h=>{let y=i(h.timestamp);return y>=Ye.left&&y<=i.range()[1]}),f=Ze.useCallback((h,y)=>{a(y);let v=i(h.timestamp),C=v>(i.range()[1]-Ye.right-Ye.left)/2+Ye.left,w=[];l&&u&&l.forEach((k,T)=>{if(k.length===0)return;let E=d3Array.bisector(O=>O.xValue).left,A=E(k,h.timestamp),P=k[A-1],I=k[A],R;if(!P)R=I;else if(!I)R=P;else {let O=Math.abs(h.timestamp.getTime()-P.xValue.getTime()),W=Math.abs(h.timestamp.getTime()-I.xValue.getTime());R=O<W?P:I;}R&&u[T]&&w.push({label:u[T].label,value:R.yValue,color:u[T].color,type:m?.[T]||"line",...R.category&&{category:R.category,categoryColor:p?.[R.category]}});});let N=g.filter(k=>Math.abs(i(k.timestamp)-v)<=10).map(k=>({label:k.label,color:k.color??t??Xo(k.type),metadata:k.metadata}));w.push({label:N.length>1?`${N.length} events`:h.label,value:0,color:h.color??t??Xo(h.type),type:"event"}),c.show({xValue:h.timestamp,series:w,x:v,y:w.length>1&&typeof w[0].value=="number"?s(w[0].value):d/2,position:C?"left":"right",isEvent:true,eventMetadata:h.metadata,eventItems:N});},[i,s,d,c,t,l,u,m,p,g]),x=Ze.useCallback(()=>{a(null),c.hide();},[c]);return g.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-markers","data-testid":"chart-event-markers",children:g.map((h,y)=>{let v=i(h.timestamp),C=h.color??t??Xo(h.type),w=n===y;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:v,y1:Ye.top,x2:v,y2:d-Ye.bottom,stroke:C,strokeWidth:w?3:2,strokeDasharray:"4 4",strokeOpacity:w?.9:.6,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:v,cy:Ye.top,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),jsxRuntime.jsx("circle",{cx:v,cy:d-Ye.bottom,r:w?5:4,fill:C,stroke:"var(--color-background-surface)",strokeWidth:2,pointerEvents:"none"}),r&&jsxRuntime.jsx("text",{x:v,y:Ye.top-8,textAnchor:"middle",fill:"var(--color-text-secondary)",fontSize:11,fontWeight:500,pointerEvents:"none",children:h.label}),jsxRuntime.jsx("rect",{x:v-10,y:Ye.top,width:20,height:d-Ye.top-Ye.bottom,fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(h,y),onMouseLeave:x})]},`${h.timestamp.getTime()}-${y}`)})})}var r1=d3Array.bisector(e=>e.xValue).left;function o1(e,t){if(e.length===0)return;let r=r1(e,t),o=e[r-1],n=e[r];return o?n?Math.abs(t.getTime()-o.xValue.getTime())<Math.abs(t.getTime()-n.xValue.getTime())?{point:o,index:r-1}:{point:n,index:r}:{point:o,index:r-1}:n?{point:n,index:r}:void 0}function ql({spans:e,opacity:t=.25,color:r}){let o=Ze.useContext(Qr),[n,a]=Ze.useState(null),i=Ze.useRef(Number.NEGATIVE_INFINITY),s=o?.xScale,d=o?.yScale,c=o?.height,l=o?.tooltip,u=o?.datasets,m=o?.seriesMetadata,p=o?.seriesTypes,g=o?.categoryColors,[f,x]=s?.domain()??[new Date(0),new Date(0)],[h,y]=s?.range()??[0,0],v=Ze.useCallback((A,P,I)=>{if(!s||!l||(a(I),A.timeStamp-i.current<16))return;i.current=A.timeStamp;let{left:R}=A.currentTarget.ownerSVGElement?.getBoundingClientRect()??{left:0},O=A.clientX-R,W=s.invert(O),z=[];u&&m&&u.forEach((J,G)=>{let B=m[G],L=o1(J,W);if(!L||!B)return;let{point:b,index:M}=L,D=Gl(B,b,M);z.push({label:B.label,value:b.yValue,...D!==void 0?{baselineValue:D}:{},chartY:b.chartYValue??b.yValue,showMarker:b.showTooltipMarker??true,color:B.color,type:p?.[G]??"line",...b.category?{category:b.category,categoryColor:g?.[b.category]}:{},...b.extraTooltipRows&&b.extraTooltipRows.length>0?{extraTooltipRows:b.extraTooltipRows}:{}});});let F=O>(y-h)/2+h,U=e.filter(J=>J.end>J.start&&J.start<P.end&&J.end>P.start).map(J=>({label:J.label,color:J.color??r??Xo(J.type),metadata:J.metadata}));z.push({label:U.length>1?`${U.length} scheduled commands`:P.label,value:0,color:P.color??r??Xo(P.type),type:"event"});let V=z.length>1?z[0]?.chartY??z[0]?.value:void 0;l.show({xValue:W,series:z,x:O,y:typeof V=="number"&&d?d(V):(c??0)/2,position:F?"left":"right",isEvent:true,eventMetadata:P.metadata,eventItems:U});},[s,d,c,l,u,m,p,g,r,h,y,e]),C=Ze.useCallback(()=>{a(null),l?.hide();},[l]);if(!o)return console.warn("ChartEventSpans must be used within a ChartContainer"),null;let{xScale:w,height:S}=o,N=Ye.top,T=S-Ye.bottom-N,E=e.filter(A=>A.end>A.start);return E.length===0?null:jsxRuntime.jsx("g",{className:"chart-event-spans","data-testid":"chart-event-spans",children:E.map((A,P)=>{let I=A.start<f?f:A.start,R=A.end>x?x:A.end;if(I>=x||R<=f)return null;let O=w(I),z=w(R)-O;if(z<=0)return null;let F=A.color??r??Xo(A.type);return jsxRuntime.jsx("rect",{x:O,y:N,width:z,height:T,fill:F,fillOpacity:n===P?Math.min((t??.25)*1.8,1):t??.25,pointerEvents:"all",style:{cursor:"pointer"},onMouseMove:U=>v(U,A,P),onMouseLeave:C},`${A.start.getTime()}-${A.end.getTime()}-${P}`)})})}var Ah=Ze.createContext(false);function Ep({children:e}){return jsxRuntime.jsx(Ah.Provider,{value:true,children:e})}function na(e){let t=Ze.useContext(Ah),[r,o]=Ze.useState(false),[n,a]=Ze.useState(null),i=Ze.useRef(null),s=Ze.useCallback(u=>{if(i.current?.disconnect(),i.current=null,!u||typeof ResizeObserver>"u")return;let m=new ResizeObserver(([p])=>{if(!p)return;let{width:g,height:f}=p.contentRect;a(x=>x&&x.width===g&&x.height===f?x:{width:g,height:f});});m.observe(u),i.current=m;},[]);Ze.useEffect(()=>()=>i.current?.disconnect(),[]);let d=Ze.useCallback(()=>{o(false),a(null);},[]),c=t?null:jsxRuntime.jsx(re,{variant:"icon",size:"sm",icon:"ArrowsOutSimple","aria-label":`Expand ${e} chart`,onPress:()=>o(true)}),l=Ze.useCallback(u=>r&&!t?jsxRuntime.jsx(yr,{isOpen:true,onClose:d,title:e,contentPadding:false,maxWidth:"min(1200px, 100vw)",minWidth:"min(360px, 100vw)",height:"82vh",mobileHeight:"82vh",children:jsxRuntime.jsx("div",{ref:s,className:"h-full w-full p-4",children:u})}):u,[r,t,d,e,s]);return {isExpanded:r,action:c,expandedSize:n,present:l}}var aa=({data:e,color:t="var(--color-viz-default)",strokeWidth:r=3,strokeDasharray:o,categoryColors:n={},maxGapMs:a,animate:i=true})=>{let{xScale:s,yScale:d,animationSettings:c,entrance:l}=ra(),[u]=Ze__namespace.default.useState(()=>l?.played!==true),m=i&&u,p=d.range(),g=Object.keys(n).length>0,f=S=>S.category?n[S.category]??t:t,x=S=>S.chartYValue??S.yValue,h=e.length===1?e[0]:void 0,y=a!=null?Vl(e,a):e,v=i?void 0:"non-scaling-stroke",C=h?jsxRuntime.jsx("circle",{cx:s(h.xValue),cy:d(x(h)),r,fill:g?f(h):t}):g?e.slice(0,-1).map((S,N)=>{let k=e[N+1];return a!=null&&a>0&&k.xValue.getTime()-S.xValue.getTime()>a?null:jsxRuntime.jsx(shape.LinePath,{data:[S,k],x:T=>s(T.xValue),y:T=>d(x(T)),stroke:f(S),strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:v,curve:curve.curveLinear},`${S.xValue.getTime()}-${k.xValue.getTime()}`)}):jsxRuntime.jsx(shape.LinePath,{data:y,x:S=>S?s(S.xValue):0,y:S=>S?d(x(S)):0,defined:S=>S!=null,stroke:t,strokeWidth:r,strokeDasharray:o,strokeLinecap:"round",vectorEffect:v,curve:curve.curveLinear}),w={transformOrigin:`0 ${p[0]}px`,transformBox:"fill-box",isolation:"isolate"};return m?jsxRuntime.jsx(framerMotion.motion.g,{initial:{scaleY:0},animate:{scaleY:1},transition:{duration:c.duration,ease:c.ease},style:w,children:C}):jsxRuntime.jsx("g",{style:w,children:C})};var zh=e=>e.type===Pn||e.type===aa||e.type===zl,b1=e=>e.type===Xl||e.type===ql,Hh=280,h1=d3Array.bisector(e=>e.xValue).left,x1=()=>jsxRuntime.jsx("div",{className:"flex h-full items-center justify-center",children:jsxRuntime.jsx("p",{className:"text-text-secondary",children:"No data available"})}),y1=()=>jsxRuntime.jsxs("div",{className:"flex h-full flex-col gap-4 p-4",children:[jsxRuntime.jsx(j,{className:"h-full w-full"}),jsxRuntime.jsxs("div",{className:"flex gap-4",children:[jsxRuntime.jsx(j,{className:"h-4 w-24"}),jsxRuntime.jsx(j,{className:"h-4 w-24"})]})]}),v1=({parentWidth:e,parentHeight:t,yFormatter:r={type:"number"},yDomain:o,referenceLines:n,isLoading:a=false,enableZoom:i=false,enableBrush:s=false,brushHeight:d=60,onZoomChange:c,zoomDomain:l,hiddenSeriesLabels:u,onHiddenSeriesChange:m,hideBottomBar:p=false,headerActions:g,headerControls:f,title:x,children:h})=>{let y=u!==void 0,v=l!==void 0,[C,w]=Ze.useState(null),[S,N]=Ze.useState(null),k=v?l:S,[T,E]=Ze.useState(()=>new Set),A=y?u:T,P=Ze.useRef(null),I=Ze.useId(),R=Ze.useRef(0),O=Ze.useRef(""),W=Ze.useRef(null),{colorMode:z}=er(),F=Ze.useMemo(()=>Wo(),[z]),Y=Ze.useMemo(()=>Di(),[z]),{datasets:U,seriesMetadata:V,categoryInfo:J,categoryColors:G,categoryLabels:B,seriesTypes:L}=Ze.useMemo(()=>{let fe=Ze.Children.toArray(h).filter(ze=>Ze.isValidElement(ze)&&zh(ze)),Ve=fe.filter(ze=>ze.props.data).length,Re=[],Ge=[],rt=[],mt=null,Fe=null;fe.forEach((ze,Ct)=>{let Ae=ze.props;if(!Ae.data)return;Re.push(Ae.data);let Ho=("color"in Ae&&Ae.color?Ae.color:void 0)||(Ve===1?Y:F[Ct%F.length]),Go=ze.type===Pn;Ge.push({label:"label"in Ae&&Ae.label||`Series ${Re.length}`,color:Ho,...Go&&"baseline"in Ae&&Ae.baseline!==void 0?{baseline:Ae.baseline,tooltipRange:"tooltipRange"in Ae&&Ae.tooltipRange||false}:{}});let Gn=Go?"area":ze.type===aa?"line":"bar";rt.push(Gn),"categoryColors"in Ae&&Ae.categoryColors&&(mt=Ae.categoryColors),"categoryLabels"in Ae&&Ae.categoryLabels&&(Fe=Ae.categoryLabels);});let dt=null;if(mt){let ze=new Set;Re.forEach(Ct=>{Ct.forEach(Ae=>{Ae.category&&ze.add(Ae.category);});}),dt=Array.from(ze).map(Ct=>({label:Fe?.[Ct]||Ct,color:mt[Ct]||"#6b7280"}));}return {datasets:Re,seriesMetadata:Ge,categoryInfo:dt,categoryColors:mt,categoryLabels:Fe,seriesTypes:rt}},[h,Y,F,z]),b=na(x),M=b.expandedSize?.width??e,D=b.expandedSize?.height??t,ae=!p?b.action:null,_=g||ae?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g,ae]}):void 0,{headerRef:ee,headerHeight:ie}=Xa(!!_,!!f),Me=p?0:60,le=s?d+8:0,ge=D-ie-Me-le,ce=Math.max(100,ge),pe=Ze.useCallback(Q=>Q?A.has(Q):false,[A]),Te=Ze.useMemo(()=>V.map((Q,fe)=>pe(Q.label)?null:fe).filter(Q=>Q!==null),[V,pe]),et=Ze.useMemo(()=>Te.map(Q=>U[Q]).filter(Q=>!!Q),[U,Te]),Be=Ze.useMemo(()=>Te.map(Q=>V[Q]).filter(Q=>!!Q),[V,Te]),$t=Ze.useMemo(()=>Te.map(Q=>L[Q]).filter(Q=>!!Q),[L,Te]),yt=$t.findIndex(Q=>Q==="bar"),ir=yt!==-1,Rt=Ze.useCallback((Q,fe)=>{let Ve=Q.has(fe);if(!Ve&&V.reduce((rt,mt)=>Q.has(mt.label)||mt.label===fe?rt:rt+1,0)<1)return Q;let Re=new Set(Q);return Ve?Re.delete(fe):Re.add(fe),Re},[V]),tt=Ze.useCallback(Q=>{if(y){let fe=u;if(!fe.has(Q)&&V.reduce((Ge,rt)=>fe.has(rt.label)||rt.label===Q?Ge:Ge+1,0)<1){w(null);return}m?.(Re=>Rt(Re,Q));}else E(fe=>Rt(fe,Q));w(null);},[y,u,m,V,Rt]),Gt=Ze.useMemo(()=>V.map(Q=>Q.label).join(""),[V]),te=Ze.useRef(Gt);Ze.useEffect(()=>{te.current!==Gt&&(te.current=Gt,y||E(Q=>Q.size===0?Q:new Set));},[Gt,y]);let Oe=Ze.useMemo(()=>et.flat(),[et]),Ue=Ze.useMemo(()=>{if(Oe.length===0)return null;let Q=[...Oe].sort((fe,Ve)=>fe.xValue.getTime()-Ve.xValue.getTime());return [Q[0].xValue,Q[Q.length-1].xValue]},[Oe]),oe=k||Ue,we=Ze.useCallback(Q=>{v?c?.(Q):N(Q);},[v,c]),X=Ze.useMemo(()=>oe?U.map(fe=>fe.filter(Ve=>Ve.xValue>=oe[0]&&Ve.xValue<=oe[1])):U,[U,oe]),K=Ze.useMemo(()=>Te.map(Q=>X[Q]??[]),[Te,X]);Ze.useEffect(()=>{c&&c(k);},[k,c]);let de=Ze.useMemo(()=>Te.flatMap(Q=>X[Q]??[]),[X,Te]),ne=Ze.useMemo(()=>Zi(de,ce,r,o),[de,ce,r,o]),ke=Ze.useRef(JSON.stringify(r)),ve=Ze.useRef(null),$=Ze.useMemo(()=>{let[Q,fe]=ne.domain(),Ve=Math.max(Math.abs(Q),Math.abs(fe)),Re=JSON.stringify(r);if(Re!==ke.current&&(ke.current=Re,ve.current=null),ve.current!==null)return ve.current;if(Ve===0)return ai(r,0);let Ge=ai(r,Ve);return ve.current=Ge,Ge},[ne,r]),ue=Ze.useMemo(()=>{let Q=ce-Ye.top-Ye.bottom;return ii(Q)},[ce]),Z=Ze.useMemo(()=>{let Q=Or($),fe=Q.tickFormat||Q.format,Re=ne.ticks(ue).map(mt=>fe(mt)),Ge=Rn(Re,12,"system-ui"),rt=Math.ceil(Ge)+12;return {...Ye,left:Math.max(rt,30),right:8}},[ne,$,ue]),be=Ze.useMemo(()=>oe?scale.scaleTime({domain:oe,range:[Z.left,M-Z.right]}):yp(Oe,M),[oe,Oe,M,Z]),sr=Ze.useCallback(Q=>{if(!Ue)return;let{scaleX:fe,translateX:Ve}=Q,Re=M-Z.left-Z.right,[Ge,rt]=Ue,mt=rt.getTime()-Ge.getTime();if(mt<=0){we(null);return}let Fe=-Ve,dt=Fe+Re,ze=Re*fe/mt,Ct=Fe/ze,Ae=dt/ze,zo=new Date(Ge.getTime()+Ct),Ho=new Date(Ge.getTime()+Ae),Go=Math.abs(zo.getTime()-Ge.getTime()),Gn=Math.abs(Ho.getTime()-rt.getTime()),qs=mt*.02;Go<qs&&Gn<qs?we(null):we([zo,Ho]);},[Ue,M,Z,we]),ln=Ze.useCallback(Q=>{let{left:fe}=P.current?.getBoundingClientRect()||{left:0},Ve=Q.clientX-fe;if(Q.timeStamp-(R.current||0)<16)return;R.current=Q.timeStamp;let Re=be.invert(Ve),Ge=K.map((Fe,dt)=>{if(!Fe||Fe.length===0)return null;let ze=h1(Fe,Re,1);if(ze===0)return {point:Fe[0],index:0,datasetIndex:dt};if(ze>=Fe.length)return {point:Fe[Fe.length-1],index:Fe.length-1,datasetIndex:dt};let Ct=Fe[ze-1],Ae=Fe[ze];if(!Ct||!Ae)return null;let zo=Math.abs(Ct.xValue.getTime()-Re.getTime()),Ho=Math.abs(Ae.xValue.getTime()-Re.getTime()),Go=zo<Ho;return {point:Go?Ct:Ae,index:Go?ze-1:ze,datasetIndex:dt}}).filter(Fe=>Fe!==null&&Be[Fe.datasetIndex]!==void 0).map(({point:Fe,index:dt,datasetIndex:ze})=>({label:Be[ze].label,value:Fe.yValue,baselineValue:Gl(Be[ze],Fe,dt),color:Be[ze].color,point:Fe,type:$t[ze]}));if(Ge.length===0){w(null);return}let rt=be(Ge[0].point.xValue),mt=rt>(M-Z.right-Z.left)/2+Z.left;w({xValue:Ge[0].point.xValue,series:Ge.map(({label:Fe,value:dt,baselineValue:ze,color:Ct,point:Ae,type:zo})=>({label:Fe,value:dt,...ze!==void 0?{baselineValue:ze}:{},chartY:Ae.chartYValue??dt,showMarker:Ae.showTooltipMarker??true,color:Ct,type:zo,category:Ae.category,categoryColor:Ae.category&&G?G[Ae.category]:void 0,...Ae.extraTooltipRows&&Ae.extraTooltipRows.length>0?{extraTooltipRows:Ae.extraTooltipRows}:{}})),x:rt,y:ne(Ge[0].point.chartYValue??Ge[0].value),position:mt?"left":"right"});},[K,Be,$t,be,ne,M,G,Z]),oo=()=>{w(null);},Le=Ze.useCallback(()=>{we(null),W.current&&W.current.reset();},[we]),vt=Ze.useCallback(Q=>{let fe={scaleX:1,scaleY:1,translateX:0,translateY:0,skewX:0,skewY:0};if(!Q||!Ue)return fe;let[Ve,Re]=Ue,Ge=Re.getTime()-Ve.getTime();if(Ge<=0)return fe;let[rt,mt]=Q,Fe=mt.getTime()-rt.getTime();if(Fe<=0)return fe;let dt=Ge/Fe,ze=M-Z.left-Z.right,Ct=rt.getTime()-Ve.getTime();return {scaleX:dt,scaleY:1,translateX:-(Ct/Ge)*ze*dt,translateY:0,skewX:0,skewY:0}},[Ue,M,Z]),Bt=Ze.useCallback(Q=>{if(!(W.current&&Ue))return;let[fe,Ve]=Ue,Re=Ve.getTime()-fe.getTime();if(Re<=0){W.current.reset();return}if(!Q){W.current.reset();return}let[Ge,rt]=Q,mt=rt.getTime()-Ge.getTime();if(mt<=0){W.current.reset();return}let Fe=Re/mt,dt=M-Z.left-Z.right,Ct=-((Ge.getTime()-fe.getTime())/Re)*dt*Fe;W.current.setTransformMatrix({scaleX:Fe,scaleY:1,translateX:Ct,translateY:0,skewX:0,skewY:0});},[Ue,M,Z]),no=Ze.useCallback(Q=>{we(Q),Bt(Q);},[we,Bt]);Ze.useEffect(()=>{v&&Bt(l??null);},[v,l,Bt]);let Xs=Bl(),zd={width:M,height:ce,xScale:be,yScale:ne,yFormatter:$,animationSettings:Fl,entrance:Xs,tooltip:{data:C,show:w,hide:()=>w(null)},datasets:K,seriesMetadata:Be,seriesTypes:$t,categoryColors:G||void 0,categoryLabels:B||void 0},B0=Ze.Children.toArray(h),hf=0,xf=[],yf=[],Hd=[];B0.forEach(Q=>{if(!Ze.isValidElement(Q)){Hd.push(Q);return}if(b1(Q))yf.push(Q);else if(zh(Q)){let fe=hf;hf++;let Ve=Q.props,Re=V[fe]?.label;if(pe(Re))return;xf.push(Ze__namespace.default.cloneElement(Q,{...Ve,data:X[fe]||Ve.data,color:V[fe]?.color}));}else Hd.push(Q);});let V0=Te.length,O0=(J||V).map(Q=>{let fe=!J&&pe(Q.label);return {category:Q.label,fill:Q.color,isHidden:fe,isDisabled:!J&&!fe&&V0<=1}}),z0=typeof r=="object"&&r!==null&&typeof r.type=="string",H0=Yl({datasets:et,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:Be.map(Q=>Q.label),timestamp:true,...z0?{yFormat:r}:{}},svgRef:P}),Gd=jsxRuntime.jsx(qa,{title:x,controls:f,actions:_,containerRef:ee});if(a)return b.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Gd,jsxRuntime.jsx(y1,{})]}));if(U.length===0)return b.present(jsxRuntime.jsxs("div",{className:"relative flex h-full flex-col",children:[Gd,jsxRuntime.jsx(x1,{})]}));let vf=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:x}),jsxRuntime.jsx("g",{children:ne.ticks(ue).map(Q=>{let fe=Math.abs(Q)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:ne(Q)},to:{x:M-Z.right,y:ne(Q)},stroke:fe?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:fe?1.5:1},`grid-line-${Q}`)})}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:I,children:jsxRuntime.jsx("rect",{x:be.range()[0],y:ne.range()[1],width:be.range()[1]-be.range()[0],height:ne.range()[0]-ne.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${I})`,children:xf}),Hd,n&&n.length>0&&jsxRuntime.jsx("g",{children:n.map((Q,fe)=>{let Ve=ne(Q.value),Re=Q.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:Z.left,y:Ve},to:{x:M-Z.right,y:Ve},stroke:Re,strokeWidth:1.5,strokeDasharray:"6 4"}),Q.label&&jsxRuntime.jsx("text",{x:M-Z.right-4,y:Ve-4,textAnchor:"end",fontSize:11,fill:Re,children:Q.label})]},`ref-line-${fe}`)})}),jsxRuntime.jsx(Zr.Bottom,{top:ce-Z.bottom,scale:be,width:M-Z.left-Z.right}),jsxRuntime.jsx(Zr.Left,{left:Z.left,scale:ne,yFormatter:$,height:ce-Z.top-Z.bottom}),C&&!C.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ir?(()=>{let Q=et[yt]??[];if(Q.length===0)return null;let fe=[...Q].sort((Gn,qs)=>Gn.xValue.getTime()-qs.xValue.getTime()),Ve=fe.findIndex(Gn=>Gn.xValue.getTime()===C.xValue.getTime()),Re=fe[Ve+1],Ge=fe.length>1&&Re?Re.xValue.getTime()-C.xValue.getTime():15*6e4,rt=Math.abs(be(new Date(C.xValue.getTime()+Ge))-be(C.xValue)),Fe=be(C.xValue)-rt/2,dt=ne.range(),[ze,Ct]=be.range(),Ae=Math.min(ze,Ct),zo=Math.max(ze,Ct),Ho=Math.max(Fe,Ae),Go=Math.max(0,Math.min(Fe+rt,zo)-Ho);return jsxRuntime.jsx("rect",{x:Ho,y:dt[1],width:Go,height:dt[0]-dt[1],className:"fill-background-muted",opacity:.5,pointerEvents:"none",style:{transition:"all 100ms ease-out"}})})():null,C.series.filter(Q=>Q.type!=="bar"&&Q.showMarker!==false).map(Q=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:be(C.xValue),cy:ne(Q.chartY??Q.value),r:8,fill:"white",stroke:Q.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:be(C.xValue),cy:ne(Q.chartY??Q.value),r:4,fill:Q.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${Q.label}`))]}),jsxRuntime.jsx("rect",{x:Z.left,y:Z.top,width:M-Z.left-Z.right,height:ce-Z.top-Z.bottom,fill:"transparent",style:{cursor:i?"grab":"crosshair",touchAction:"none"},onMouseMove:ln,onMouseLeave:oo}),yf]});return b.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(Qr.Provider,{value:zd,children:[Gd,i?jsxRuntime.jsx(zoom.Zoom,{initialTransformMatrix:vt(k),width:M,height:ce,scaleXMin:1,scaleXMax:20,scaleYMin:1,scaleYMax:1,constrain:Q=>{let{scaleX:fe,translateX:Ve}=Q,Re=Math.max(1,Math.min(20,fe)),Ge=1,rt=M-Z.left-Z.right,mt=0,Fe=rt*(1-Re),dt=Math.max(Fe,Math.min(mt,Ve));return {...Q,scaleX:Re,scaleY:Ge,translateX:dt,translateY:0}},children:Q=>{if(W.current=Q,Q.transformMatrix){let{scaleX:fe,translateX:Ve}=Q.transformMatrix,Re=`${fe.toFixed(4)}-${Ve.toFixed(2)}`;Re!==O.current&&(O.current=Re,setTimeout(()=>{sr(Q.transformMatrix);},0));}return jsxRuntime.jsx("svg",{width:M,height:ce,className:"overflow-visible",ref:fe=>{P.current=fe,Q.containerRef.current!==fe&&(Q.containerRef.current=fe);},role:"img","aria-label":x,style:{cursor:Q.isDragging?"grabbing":"grab",touchAction:"none"},onMouseDown:Q.dragStart,onMouseMove:Q.dragMove,onMouseUp:Q.dragEnd,onMouseLeave:()=>{Q.isDragging&&Q.dragEnd();},onTouchStart:Q.dragStart,onTouchMove:Q.dragMove,onTouchEnd:Q.dragEnd,children:vf})}},`zoom-${Math.round(M)}x${Math.round(ce)}`):jsxRuntime.jsx("svg",{width:M,height:ce,className:"overflow-visible",ref:P,role:"img","aria-label":x,children:vf}),jsxRuntime.jsx(ko,{data:C,formatter:$}),s&&Ue&&jsxRuntime.jsx(Pp,{data:et,seriesMetadata:Be,width:M,height:d,onBrushChange:no,brushRegion:k,margin:Z,...o?{yDomain:o}:{}}),!p&&jsxRuntime.jsx(li,{onExport:H0,items:O0,isZoomed:k!==null,onResetZoom:Le,onLegendItemToggle:J?void 0:tt})]})}))},Gh=responsive.withParentSize(v1);var k1=e=>e.toLocaleString(),P1=e=>`${Math.round(e*100)}%`,Yh=({data:e,width:t=800,height:r=400,padding:o=0,barGap:n=30,formatValue:a=k1,formatPercentage:i=P1,color:s,showScale:d=true,showOverallConversion:c=true,overallConversionLabel:l="Overall Conversion:",activeStageId:u,onStageClick:m,onStageHover:p,className:g,style:f,"aria-label":x="Funnel chart"})=>{let[h,y]=Ze.useState(null),[v,C]=Ze.useState(t),w=Ze.useRef(null),S=u??h,N=Ze.useId(),k=s||"var(--color-viz-default)";Ze.useEffect(()=>{if(!w.current)return;let R=new ResizeObserver(O=>{for(let W of O)C(W.contentRect.width);});return R.observe(w.current),()=>{R.disconnect();}},[]);let{layout:T,overallConversion:E}=Ze.useMemo(()=>{if(e.length===0)return {layout:[],overallConversion:0};let R=e[0].value,O=c?60:0,W=r-o*2-O,z=(e.length-1)*n,F=(W-z)/e.length,Y=e.map((V,J)=>{let G=o+O+J*(F+n),B=R===0?0:V.value/R,L=B,b=J===0?null:e[J-1].value,M=b==null||b===0?0:1-V.value/b;return {stage:V,index:J,y:G,barHeight:F,widthPercent:B,conversionRate:L,dropOff:M}}),U=R===0?0:e[e.length-1].value/R;return {layout:Y,overallConversion:U,maxValue:R}},[e,v,r,o,n,d,c]);if(e.length===0)return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex h-full min-h-[280px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",g),style:{width:t,height:r,...f},children:"No funnel data available"});let A=d?60:0,P=o+A,I=v-o*2-A;return jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("relative w-full overflow-hidden rounded-lg bg-background-surface",g),style:{height:r,...f},"aria-label":x,role:"img",children:jsxRuntime.jsxs("svg",{width:"100%",height:r,className:"relative",children:[jsxRuntime.jsxs("defs",{children:[jsxRuntime.jsx(gradient.LinearGradient,{id:`${N}-bar`,from:k,to:k,toOpacity:.85}),jsxRuntime.jsx(gradient.LinearGradient,{id:`${N}-bg`,from:k,to:k,fromOpacity:.01,toOpacity:.15,x1:"0",y1:"0",x2:"1",y2:"0"})]}),c&&jsxRuntime.jsxs("text",{x:P,y:o+20,className:"fill-text-primary text-sm font-medium",children:[jsxRuntime.jsx("tspan",{className:"fill-text-secondary",children:l})," ",i(E)]}),d&&jsxRuntime.jsx("g",{children:T.map(R=>{let O=R.y+R.barHeight/2;return jsxRuntime.jsx("text",{x:o+A-12,y:O,textAnchor:"end",dominantBaseline:"middle",className:"fill-text-secondary text-xs",children:i(R.conversionRate)},R.stage.id)})}),T.map(R=>{let O=S===R.stage.id,W=I*R.widthPercent;return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:P,y:R.y,width:I,height:R.barHeight,fill:`url(#${N}-bg)`,rx:4}),jsxRuntime.jsx(framerMotion.motion.rect,{x:P,y:R.y,width:W,height:R.barHeight,fill:`url(#${N}-bar)`,rx:4,initial:{width:0},animate:{width:W},transition:{duration:.6,delay:R.index*.1,ease:"easeOut"},opacity:O||S==null?1:.5,style:{cursor:m||p?"pointer":"default",transition:"opacity 150ms ease"},onMouseEnter:()=>{y(R.stage.id),p?.(R.stage);},onMouseLeave:()=>{y(null),p?.(null);},onClick:()=>m?.(R.stage)}),jsxRuntime.jsx("rect",{x:P+10,y:R.y+R.barHeight/2-10,width:70,height:20,className:"fill-background-surface stroke-border-default",strokeWidth:1,rx:4,style:{pointerEvents:"none"}}),jsxRuntime.jsx("text",{x:P+16,y:R.y+R.barHeight/2+4,className:"fill-text-primary text-xs font-semibold",style:{pointerEvents:"none"},children:a(R.stage.value)}),jsxRuntime.jsxs("text",{x:P,y:R.y-8,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:[jsxRuntime.jsx("tspan",{children:R.index+1})," ",R.stage.label]}),R.stage.secondaryValue&&jsxRuntime.jsx("text",{x:P+16,y:R.y-24,className:"fill-text-secondary text-xs",style:{pointerEvents:"none"},children:R.stage.secondaryValue}),R.index>0&&R.dropOff>0&&jsxRuntime.jsxs("text",{x:P+I,y:R.y-8,textAnchor:"end",className:"fill-text-secondary text-xs",children:[i(R.dropOff)," drop"]}),R.stage.annotation&&jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("rect",{x:P+W+8,y:R.y+8,width:60,height:24,rx:3,className:"fill-background-muted"}),jsxRuntime.jsx("text",{x:P+W+16,y:R.y+20,className:"fill-text-secondary text-xs font-medium",children:R.stage.annotation})]})]},R.stage.id)})]})})};var D1=.005,qh=320;function Ql(e){return e>0?e:0}function A1(e,t,r){let o=t===0?0:Ql(e.value)/t*100;return `${e.label}: ${r(e.value)}, ${o.toFixed(1)}%`}var jh=({data:e,width:t,height:r,innerRadiusRatio:o=0,yFormatter:n={type:"number"},showLegend:a=true,showTooltip:i=true,onSliceClick:s,onSliceHover:d,className:c,style:l,"aria-label":u})=>{let[m,p]=Ze.useState(null),[g,f]=Ze.useState(null),[x,h]=Ze.useState(null),[y,v]=Ze.useState(t??600),[C,w]=Ze.useState(r??300),S=Ze.useRef(null);Ze.useEffect(()=>{if(t!==void 0&&r!==void 0){v(t),w(r);return}if(!S.current)return;let z=new ResizeObserver(F=>{for(let Y of F)t===void 0&&v(Y.contentRect.width),r===void 0&&w(Y.contentRect.height);});return z.observe(S.current),t===void 0&&v(S.current.offsetWidth),r===void 0&&w(S.current.offsetHeight||300),()=>{z.disconnect();}},[t,r]);let N=Ze.useMemo(()=>e.reduce((z,F)=>z+Ql(F.value),0),[e]),k=Ze.useMemo(()=>{let z=Ai(e.map(F=>F.label));return e.map(F=>({...F,color:F.color||z[F.label]||"var(--color-viz-default)"}))},[e]),T=Or(n),E=s!==void 0,A=a&&y>=qh,P=A?Math.max(y*.45,qh*.45):y,R=Math.max(0,Math.min(P,C)-8)/2,O=R*Math.min(Math.max(o,0),.95);if(e.length===0||N===0)return jsxRuntime.jsx("div",{ref:S,className:tailwindMerge.twMerge("flex h-full min-h-[200px] w-full items-center justify-center rounded-lg border border-dashed border-border-default bg-background-surface text-sm font-medium text-text-secondary",c),style:r!==void 0?{height:r,...l}:l,children:"No data available"});let W=(z,F,Y)=>{if(p(z),d?.(F,z),z!==null&&F&&Y){let U=P/2+Y[0],V=C/2+Y[1];h(F.label),f({xValue:new Date,series:[{label:"Value",value:F.value,color:F.color||"var(--color-viz-default)"}],x:U,y:V,position:U>y/2?"left":"right"});}else f(null),h(null);};return jsxRuntime.jsxs("div",{ref:S,className:tailwindMerge.twMerge("relative flex h-full w-full items-center gap-4 rounded-lg bg-background-surface",c),style:r!==void 0?{height:r,...l}:l,children:[jsxRuntime.jsx("svg",{width:P,height:C,className:"flex-shrink-0",role:E?"group":"img","aria-label":u,children:jsxRuntime.jsx(group.Group,{top:C/2,left:P/2,children:jsxRuntime.jsx(shape.Pie,{data:k,pieValue:z=>Ql(z.value),pieSort:null,pieSortValues:null,outerRadius:R,innerRadius:O,padAngle:D1,children:z=>z.arcs.map((F,Y)=>{let U=m===Y||m===null,V=z.path.centroid(F);return jsxRuntime.jsx("path",{d:z.path(F)??void 0,fill:F.data.color,opacity:U?1:.5,style:{cursor:s||d?"pointer":"default",transition:"opacity 150ms ease-out"},onMouseEnter:()=>W(Y,F.data,V),onMouseLeave:()=>W(null,null),onClick:()=>s?.(F.data,Y),...E?{role:"button",tabIndex:0,"aria-label":A1(F.data,N,T.format),onFocus:()=>W(Y,F.data,V),onBlur:()=>W(null,null),onKeyDown:J=>{J.key!=="Enter"&&J.key!==" "||(J.preventDefault(),s?.(F.data,Y));}}:{}},F.data.label)})})})}),A?jsxRuntime.jsx("ul",{className:"flex min-w-0 flex-col gap-1 overflow-y-auto py-2 text-xs",children:k.map((z,F)=>jsxRuntime.jsxs("li",{className:"flex items-center gap-2",style:{opacity:m===F||m===null?1:.5},onMouseEnter:()=>W(F,z),onMouseLeave:()=>W(null,null),children:[jsxRuntime.jsx("span",{className:"h-3 w-3 flex-shrink-0 rounded-sm",style:{backgroundColor:z.color}}),jsxRuntime.jsx("span",{className:"truncate text-text-primary",title:z.label,children:z.label}),jsxRuntime.jsxs("span",{className:"ml-auto flex-shrink-0 tabular-nums text-text-secondary",children:[T.format(z.value)," (",(Ql(z.value)/N*100).toFixed(1),"%)"]})]},z.label))}):null,i&&jsxRuntime.jsx(ko,{data:g,formatter:n,label:x??void 0})]})};function Qh(){let e=new Map;return {publish(t,r){for(let[o,n]of e)o!==t&&n(r);},subscribe(t,r){return e.set(t,r),()=>{e.delete(t);}}}}var F1=d3Array.bisector(e=>e.xValue).left,B1=(e,t,r)=>{if(!e.tooltipRange||e.baseline===void 0)return;let o=typeof e.baseline=="function"?e.baseline(t,r):e.baseline;return typeof o=="number"&&Number.isFinite(o)&&o!==t.yValue?o:void 0};function Zh(e){let{mouseX:t,datasets:r,seriesMetadata:o,seriesTypes:n,xScale:a,yScale:i,plotLeft:s,plotRight:d}=e,c=a.invert(t),l=r.map((p,g)=>{if(!p||p.length===0)return null;let f=F1(p,c,1);if(f===0)return {point:p[0],index:0,datasetIndex:g};if(f>=p.length)return {point:p[p.length-1],index:p.length-1,datasetIndex:g};let x=p[f-1],h=p[f];if(!x||!h)return null;let y=Math.abs(x.xValue.getTime()-c.getTime()),v=Math.abs(h.xValue.getTime()-c.getTime()),C=y<v;return {point:C?x:h,index:C?f-1:f,datasetIndex:g}}).filter(p=>p!==null&&o[p.datasetIndex]!==void 0).map(({point:p,index:g,datasetIndex:f})=>({label:o[f].label,value:p.yValue,baselineValue:B1(o[f],p,g),color:o[f].color,point:p,type:n[f]}));if(l.length===0)return null;let u=a(l[0].point.xValue),m=u>(s+d)/2;return {xValue:l[0].point.xValue,series:l.map(({label:p,value:g,baselineValue:f,color:x,point:h,type:y})=>({label:p,value:g,...f!==void 0?{baselineValue:f}:{},chartY:h.chartYValue??g,showMarker:h.showTooltipMarker??true,color:x,type:y,...h.category!==void 0?{category:h.category}:{},...h.extraTooltipRows&&h.extraTooltipRows.length>0?{extraTooltipRows:h.extraTooltipRows}:{}})),x:u,y:i(l[0].point.chartYValue??l[0].value),position:m?"left":"right"}}var ex=e=>e instanceof Date&&!Number.isNaN(e.getTime()),H1=160;function Zl(e,t,r){let[o,n]=Ze.useState(null);Ze.useImperativeHandle(r,()=>({setPreview:n}),[]);let[a,i]=e.range(),s=Ze.useMemo(()=>o?d3Scale.scaleTime().domain([new Date(o[0]),new Date(o[1])]).range([a,i]):e,[o,e,a,i]),d=s.domain(),c=d[0],l=d[d.length-1],u=ex(c)&&ex(l),m=t<400,p=Math.max(2,Math.min(8,Math.floor(t/(m?70:110)))),g=Ze.useMemo(()=>{if(!u)return [];let f=i-a;if(f<=0)return s.ticks(p);let[x,h]=s.domain(),y=x.getTime(),v=h.getTime(),C=(v-y)/f,w=Math.min(H1,f),S=w*C,N=d3Scale.scaleTime().domain([new Date(y-S),new Date(v+S)]).range([a-w,i+w]),k=d3Time.timeTickInterval(x,h,p);if(k)return N.ticks(k);let T=Math.max(2,Math.round(p*(f+2*w)/f));return N.ticks(T)},[s,p,u,a,i]);return {activeScale:s,ticks:g,start:c,end:l,valid:u,compact:m,rangeStart:a,rangeEnd:i}}var K1=6,tx=20,Fp=Ze.forwardRef(({top:e,scale:t,width:r},o)=>{let{activeScale:n,ticks:a,start:i,end:s,valid:d,compact:c,rangeStart:l,rangeEnd:u}=Zl(t,r,o),m=a.length>=2?a[1].getTime()-a[0].getTime():s.getTime()-i.getTime(),p=Ze.useMemo(()=>d?Sg(m,{compact:c}):()=>"",[m,c,d]),g=Ze.useId(),f=Math.min(l,u),x=Math.abs(u-l);return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("line",{x1:l,x2:u,y1:e,y2:e,stroke:"var(--color-border-muted)",strokeWidth:1}),a.length>0&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:g,children:jsxRuntime.jsx("rect",{x:f,y:e-4,width:x,height:tx+16})})}),jsxRuntime.jsx("g",{clipPath:`url(#${g})`,children:a.map(h=>jsxRuntime.jsxs("g",{transform:`translate(${n(h)},${e})`,children:[jsxRuntime.jsx("line",{x1:0,x2:0,y1:0,y2:K1,stroke:"var(--color-border-muted)",strokeWidth:1}),jsxRuntime.jsx("text",{x:0,y:tx,textAnchor:"middle",fontSize:12,fill:"var(--color-text-secondary)",children:p(h)})]},h.getTime()))})]})]})});Fp.displayName="LiveTimeAxisBottom";var Bp=Ze.forwardRef(({scale:e,width:t,top:r,bottom:o},n)=>{let{activeScale:a,ticks:i,rangeStart:s,rangeEnd:d}=Zl(e,t,n),c=Ze.useId(),l=Math.min(s,d),u=Math.abs(d-s);return jsxRuntime.jsxs("g",{"aria-hidden":"true",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:c,children:jsxRuntime.jsx("rect",{x:l,y:r,width:u,height:o-r})})}),jsxRuntime.jsx("g",{clipPath:`url(#${c})`,children:i.map(m=>{let p=a(m);return jsxRuntime.jsx("line",{x1:p,x2:p,y1:r,y2:o,stroke:"var(--color-border-muted)",strokeWidth:1},m.getTime())})})]})});Bp.displayName="LiveTimeGridlines";function _l(e,t,r){let o=e[1]-e[0],n=t/Math.max(1,r)*o;return [e[0]-n,e[1]-n]}function rx(e,t,r){let o=e[1]-e[0],n=e[0]+t*o,a=o/r,i=n-t*a;return [i,i+a]}function Vp(e,t,r=16,o=800){return t===1?e*r:t===2?e*o:e}var ox=(e,t,r,o,n)=>{let a=t!==1?rx(e,r,t):e;return o!==0&&(a=_l(a,o,n)),a},nx=(e,t)=>{if(!t)return e;let r=e[1]-e[0];if(r>=t[1]-t[0])return [t[0],t[1]];let[o,n]=e;return n>t[1]&&(n=t[1],o=n-r),o<t[0]&&(o=t[0],n=o+r),[o,n]},Q1=e=>typeof requestAnimationFrame=="function"?requestAnimationFrame(e):setTimeout(()=>e(0),0),Z1=e=>{typeof cancelAnimationFrame=="function"?cancelAnimationFrame(e):clearTimeout(e);};function ax(e){let{groupRef:t}=e,r=Ze.useRef({xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0});r.current={xDomain:e.xDomain,plotWidthPx:e.plotWidthPx,plotLeftPx:e.plotLeftPx??0};let o=Ze.useRef(e.onCommit);o.current=e.onCommit;let n=Ze.useRef(e.panBoundsMs);n.current=e.panBoundsMs;let a=Ze.useRef(e.getPanBoundsMs);a.current=e.getPanBoundsMs;let i=Ze.useRef(e.settleMs??140);i.current=e.settleMs??140;let s=Ze.useRef(e.zoomIntent??(I=>I.ctrlKey));s.current=e.zoomIntent??(I=>I.ctrlKey);let d=Ze.useRef(e.onGestureStart);d.current=e.onGestureStart;let c=Ze.useRef(e.onFramePreview);c.current=e.onFramePreview;let l=Ze.useRef(null),u=Ze.useRef({scale:1,cursorFrac:.5,panDxPx:0,timer:null}),m=Ze.useRef(null),p=Ze.useRef(null),g=Ze.useRef(false),f=Ze.useCallback((I,R,O)=>{p.current={translateX:I,scaleX:R,preview:O},m.current==null&&(m.current=Q1(()=>{m.current=null;let W=p.current;W!=null&&(t.current?.setAttribute("transform",`translate(${W.translateX},0) scale(${W.scaleX},1)`),c.current?.(W.preview));}));},[t]),x=Ze.useCallback(()=>{m.current!=null&&(Z1(m.current),m.current=null),p.current=null,t.current?.removeAttribute("transform"),c.current?.(null);},[t]),h=Ze.useCallback(()=>{g.current||(g.current=true,d.current?.());},[]),y=Ze.useCallback(()=>{g.current=false;},[]),v=Ze.useCallback(()=>{u.current.timer!=null&&(clearTimeout(u.current.timer),u.current.timer=null);},[]),C=Ze.useCallback(()=>{u.current={scale:1,cursorFrac:.5,panDxPx:0,timer:null};},[]),w=Ze.useCallback(()=>{let{xDomain:I,plotWidthPx:R}=r.current,{scale:O,cursorFrac:W,panDxPx:z}=u.current;O===1&&z===0||o.current(nx(ox(I,O,W,z,R),a.current?.()??n.current));},[]),S=Ze.useCallback(()=>{u.current.timer!=null&&(v(),w(),C(),x());},[v,w,C,x]),N=Ze.useCallback(I=>{S(),I.currentTarget.setPointerCapture?.(I.pointerId),l.current={startX:I.clientX,dxPx:0},h();},[S,h]),k=Ze.useCallback(I=>{if(!l.current)return;l.current.dxPx=I.clientX-l.current.startX;let{xDomain:R,plotWidthPx:O}=r.current;f(l.current.dxPx,1,_l(R,l.current.dxPx,O));},[f]),T=Ze.useCallback(I=>{if(!l.current)return;let{dxPx:R}=l.current;l.current=null,x(),y(),R!==0&&o.current(nx(_l(r.current.xDomain,R,r.current.plotWidthPx),a.current?.()??n.current));},[x,y]),E=Ze.useCallback(()=>{l.current&&(l.current=null,x(),y());},[x,y]),A=Ze.useRef(null),P=Ze.useCallback(I=>{if(A.current?.(),A.current=null,!I)return;let R=O=>{if(l.current)return;let{plotWidthPx:W,plotLeftPx:z}=r.current,F=Vp(O.deltaY,O.deltaMode),Y=Vp(O.deltaX,O.deltaMode),U=s.current(O);if(!U&&Y===0)return;if(O.preventDefault(),h(),U){let B=Math.min(1,Math.max(0,(O.clientX-I.getBoundingClientRect().left)/Math.max(1,W)));u.current.scale*=Math.exp(-F/200),u.current.cursorFrac=B;}else u.current.panDxPx-=Y;let{scale:V,cursorFrac:J,panDxPx:G}=u.current;f((z+J*W)*(1-V)+G,V,ox(r.current.xDomain,V,J,G,W)),v(),u.current.timer=setTimeout(()=>{w(),C(),x(),y();},i.current);};I.addEventListener("wheel",R,{passive:false}),A.current=()=>I.removeEventListener("wheel",R);},[f,x,v,w,C,h,y]);return Ze.useEffect(()=>()=>{A.current?.(),A.current=null,x(),u.current.timer!=null&&clearTimeout(u.current.timer);},[x]),{onPointerDown:N,onPointerMove:k,onPointerUp:T,onPointerCancel:E,wheelTargetRef:P,gestureActiveRef:g}}var cx=e=>e.type===Pn||e.type===aa,oR=({children:e,title:t,headerActions:r,headerControls:o,viewport:n,panBounds:a,getPanBounds:i,onViewportChange:s,onPlotWidthChange:d,yFormatter:c={type:"number"},yDomain:l,referenceLines:u,cameraSync:m,parentWidth:p=0,parentHeight:g=0})=>{let[f,x]=Ze.useState(null),h=Ze.useRef(null),y=Ze.useRef(0),v=Ze.useId(),C=Ze.useRef(null),w=Ze.useRef(null),S=Ze.useRef(null),{colorMode:N}=er(),k=Ze.useMemo(()=>Wo(),[N]),T=Ze.useMemo(()=>Di(),[N]),{datasets:E,seriesMetadata:A,seriesTypes:P}=Ze.useMemo(()=>{let oe=Ze.Children.toArray(e).filter(ne=>Ze.isValidElement(ne)&&cx(ne)),we=oe.filter(ne=>ne.props.data).length,X=[],K=[],de=[];return oe.forEach((ne,ke)=>{let ve=ne.props;if(!ve.data)return;X.push(ve.data);let ue=("color"in ve&&ve.color?ve.color:void 0)||(we===1?T:k[ke%k.length]),Z=ne.type===Pn;K.push({label:"label"in ve&&ve.label||`Series ${X.length}`,color:ue,...Z&&"baseline"in ve&&ve.baseline!==void 0?{baseline:ve.baseline,tooltipRange:"tooltipRange"in ve&&ve.tooltipRange||false}:{}}),de.push(Z?"area":"line");}),{datasets:X,seriesMetadata:K,seriesTypes:de}},[e,T,k]),I=na(t),R=I.expandedSize?.width??p,O=r||I.action?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r,I.action]}):void 0,{headerRef:W,headerHeight:z}=Xa(!!O,!!o),F=Math.max(100,(I.expandedSize?.height??g)-z-60),Y=Ze.useMemo(()=>[new Date(n.startMs),new Date(n.endMs)],[n.startMs,n.endMs]),U=Ze.useMemo(()=>{let oe=E.flat(),we=oe.filter(X=>{let K=X.xValue.getTime();return K>=n.startMs&&K<=n.endMs});return we.length>0?we:oe},[E,n.startMs,n.endMs]),V=Ze.useMemo(()=>{let oe=Zi(U,F,c,l);if(!l){let[we,X]=oe.domain();X>we&&oe.domain([we,X+(X-we)*.05]);}return oe},[U,F,c,l]),J=Ze.useRef(JSON.stringify(c)),G=Ze.useRef(null),B=Ze.useMemo(()=>{let[oe,we]=V.domain(),X=Math.max(Math.abs(oe),Math.abs(we)),K=JSON.stringify(c);if(K!==J.current&&(J.current=K,G.current=null),G.current!==null)return G.current;if(X===0)return ai(c,0);let de=ai(c,X);return G.current=de,de},[V,c]),L=Ze.useMemo(()=>{let oe=F-Ye.top-Ye.bottom;return ii(oe)},[F]),b=Ze.useMemo(()=>{let oe=Or(B),we=oe.tickFormat||oe.format,K=V.ticks(L).map(ke=>we(ke)),de=Rn(K,12,"system-ui"),ne=Math.ceil(de)+12;return {...Ye,left:Math.max(ne,30)}},[V,B,L]),M=Ze.useMemo(()=>scale.scaleTime({domain:Y,range:[b.left,R-b.right]}),[Y,R,b]),D=Ze.useMemo(()=>[n.startMs,n.endMs],[n.startMs,n.endMs]),q=Ze.useMemo(()=>a?[a.startMs,a.endMs]:void 0,[a]),ae=Ze.useCallback(oe=>{s({startMs:oe[0],endMs:oe[1]});},[s]),_=R-b.left-b.right,ee=Ze.useCallback(()=>x(null),[]),ie=Ze.useRef({}),Me=Ze.useRef(m);Me.current=m;let le=Ze.useCallback(oe=>{w.current?.setPreview(oe),S.current?.setPreview(oe),Me.current?.publish(ie.current,oe);},[]),{onPointerDown:ge,onPointerMove:ce,onPointerUp:pe,onPointerCancel:Te,wheelTargetRef:et,gestureActiveRef:Be}=ax({xDomain:D,plotWidthPx:_,plotLeftPx:b.left,groupRef:C,onCommit:ae,onGestureStart:ee,onFramePreview:le,...q?{panBoundsMs:q}:{},...i?{getPanBoundsMs:()=>{let oe=i();return [oe.startMs,oe.endMs]}}:{}}),$t=Ze.useRef({startMs:n.startMs,endMs:n.endMs,left:0,width:0});$t.current={startMs:n.startMs,endMs:n.endMs,left:b.left,width:_},Ze.useEffect(()=>{if(!m)return;let oe=()=>{C.current?.removeAttribute("transform"),w.current?.setPreview(null),S.current?.setPreview(null);},we=K=>{if(Be.current)return;if(K==null){oe();return}let{startMs:de,endMs:ne,left:ke,width:ve}=$t.current,$=ne-de,ue=K[1]-K[0];if($<=0||ue<=0||ve<=0)return;let Z=$/ue,be=ke*(1-Z)+(de-K[0])*ve/ue;C.current?.setAttribute("transform",`translate(${be},0) scale(${Z},1)`),w.current?.setPreview(K),S.current?.setPreview(K);},X=m.subscribe(ie.current,we);return ()=>{X(),Be.current||oe();}},[m,Be]),Ze.useEffect(()=>{d?.(Math.max(0,R-b.left-b.right));},[R,b,d]);let yt=Ze.useCallback(oe=>{if(Be.current)return;let{left:we}=h.current?.getBoundingClientRect()||{left:0},X=oe.clientX-we;oe.timeStamp-(y.current||0)<16||(y.current=oe.timeStamp,x(Zh({mouseX:X,datasets:E,seriesMetadata:A,seriesTypes:P,xScale:M,yScale:V,plotLeft:b.left,plotRight:R-b.right})));},[E,A,P,M,V,R,b,Be]),ir=Ze.useCallback(()=>x(null),[]),Rt=Bl(),tt={width:R,height:F,xScale:M,yScale:V,yFormatter:B,animationSettings:Fl,entrance:Rt,tooltip:{data:f,show:x,hide:()=>x(null)},datasets:E,seriesMetadata:A,seriesTypes:P},Gt=0,te=[];Ze.Children.toArray(e).forEach(oe=>{if(!Ze.isValidElement(oe)){te.push(oe);return}if(cx(oe)){let we=Gt;Gt++;let X=oe.props;te.push(Ze__namespace.default.cloneElement(oe,{...X,color:A[we]?.color,animate:false}));}else te.push(oe);});let Oe=A.map(oe=>({category:oe.label,fill:oe.color})),Ue=Yl({datasets:E,metadata:{xLabel:"Date",yLabel:"Value",seriesLabels:A.map(oe=>oe.label),timestamp:true},svgRef:h}),Dt=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("title",{children:t}),jsxRuntime.jsx("g",{children:V.ticks(L).map(oe=>{let we=Math.abs(oe)<Number.EPSILON;return jsxRuntime.jsx(shape.Line,{from:{x:b.left,y:V(oe)},to:{x:R-b.right,y:V(oe)},stroke:we?"var(--color-border-default)":"var(--color-border-muted)",strokeWidth:we?1.5:1},`grid-line-${oe}`)})}),jsxRuntime.jsx(Bp,{ref:S,scale:M,width:R-b.left-b.right,top:V.range()[1],bottom:V.range()[0]}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsx("clipPath",{id:v,children:jsxRuntime.jsx("rect",{x:M.range()[0],y:V.range()[1],width:M.range()[1]-M.range()[0],height:V.range()[0]-V.range()[1]})})}),jsxRuntime.jsx("g",{clipPath:`url(#${v})`,children:jsxRuntime.jsx("g",{"data-camera-plot-group":"",ref:C,children:te})}),u&&u.length>0&&jsxRuntime.jsx("g",{children:u.map((oe,we)=>{let X=V(oe.value),K=oe.color??"var(--color-error-base)";return jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx(shape.Line,{from:{x:b.left,y:X},to:{x:R-b.right,y:X},stroke:K,strokeWidth:1.5,strokeDasharray:"6 4"}),oe.label&&jsxRuntime.jsx("text",{x:R-b.right-4,y:X-4,textAnchor:"end",fontSize:11,fill:K,children:oe.label})]},`ref-line-${we}`)})}),jsxRuntime.jsx(Fp,{ref:w,top:F-b.bottom,scale:M,width:R-b.left-b.right}),jsxRuntime.jsx(Zr.Left,{left:b.left,scale:V,yFormatter:B,height:F-b.top-b.bottom}),f&&!f.isEvent&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(shape.Line,{"data-testid":"chart-hover-crosshair",from:{x:M(f.xValue),y:V.range()[1]},to:{x:M(f.xValue),y:V.range()[0]},stroke:"var(--color-text-secondary)",strokeWidth:1,strokeDasharray:"3 3",opacity:.7}),f.series.filter(oe=>oe.type!=="bar"&&oe.showMarker!==false).map(oe=>jsxRuntime.jsxs("g",{children:[jsxRuntime.jsx("circle",{cx:M(f.xValue),cy:V(oe.chartY??oe.value),r:8,fill:"white",stroke:oe.color,strokeWidth:2,style:{transition:"all 100ms ease-out"}}),jsxRuntime.jsx("circle",{cx:M(f.xValue),cy:V(oe.chartY??oe.value),r:4,fill:oe.color,style:{transition:"all 100ms ease-out"}})]},`highlight-${oe.label}`))]}),jsxRuntime.jsx("rect",{"data-camera-surface":"",x:b.left,y:b.top,width:R-b.left-b.right,height:F-b.top-b.bottom,fill:"transparent",style:{cursor:"grab",touchAction:"none"},onMouseMove:yt,onMouseLeave:ir,onPointerDown:ge,onPointerMove:ce,onPointerUp:pe,onPointerCancel:Te,ref:et})]});return I.present(jsxRuntime.jsx("div",{className:"relative flex h-full flex-col",children:jsxRuntime.jsxs(Qr.Provider,{value:tt,children:[jsxRuntime.jsx(qa,{title:t,controls:o,actions:O,containerRef:W}),jsxRuntime.jsx("svg",{width:R,height:F,className:"overflow-visible",ref:h,role:"img","aria-label":t,children:Dt}),jsxRuntime.jsx(ko,{data:f,formatter:B}),jsxRuntime.jsx(li,{onExport:Ue,items:Oe})]})}))},$l=responsive.withParentSize(oR);function ec(e,t,r,o){if(r.length===0)throw new Error("tierForViewport: resolution ladder is empty");let n=[...r].sort((s,d)=>s.bucketMs-d.bucketMs),a=e/Math.max(1,t*o.targetPointsPerPx),i=Math.max(o.nativeMs,a);return n.find(s=>s.bucketMs>=i)??n[n.length-1]}function nR(e,t){return Math.floor(e/t.tileSpanMs)}function jo(e,t,r){let o=nR(e.startMs,t)-r,n=Math.ceil(e.endMs/t.tileSpanMs)-1+r,a=[];for(let i=o;i<=n;i++)a.push({tierId:t.id,index:i,startMs:i*t.tileSpanMs,endMs:(i+1)*t.tileSpanMs});return a}var or=(e,t)=>`${e}:${t}`,ca=e=>!!e&&(e.line.length>0||(e.band?.length??0)>0||Object.values(e.lines??{}).some(t=>t.length>0));var dx={erroredTiles:0};function Hp(e,t){let r=new Map,o=new Map,n=new Map,a=0;for(let m of e){let p=t.get(or(m.tierId,m.index));if(p&&(p.error&&(a+=1),!!p.data)){for(let g of p.data.line)r.set(g.xValue.getTime(),g);for(let g of p.data.band??[])o.set(g.xValue.getTime(),g);for(let[g,f]of Object.entries(p.data.lines??{})){let x=n.get(g);x||(x=new Map,n.set(g,x));for(let h of f)x.set(h.xValue.getTime(),h);}}}let i=(m,p)=>m.xValue.getTime()-p.xValue.getTime(),s=[...r.values()].sort(i),d=[...o.values()].sort(i),c=Object.fromEntries([...n.entries()].map(([m,p])=>[m,[...p.values()].sort(i)])),l,u;for(let m of [s,d,...Object.values(c)]){if(!m.length)continue;let p=m[0].xValue.getTime(),g=m[m.length-1].xValue.getTime();l=Math.min(l??p,p),u=Math.max(u??g,g);}return {line:s,band:d,lines:c,coverage:{earliestMs:l,latestMs:u,erroredTiles:a}}}function aR(e,t,r,o){let n=jo(e,t,0).filter(a=>o==null||a.startMs<o);return n.length===0?false:n.every(a=>{let i=r.get(or(a.tierId,a.index));return i!=null&&(i.status==="loaded"||i.status==="empty")})}function ux(e,t,r){return jo(e,t,0).some(n=>{let a=r.get(or(n.tierId,n.index));return a?.status==="loaded"&&ca(a.data)})}function iR(e,t){if(!ca(e))return false;let r=e.coverage.earliestMs,o=e.coverage.latestMs;return r==null||o==null?false:r<t.endMs&&o>t.startMs}function px({viewport:e,targetTier:t,ladder:r,store:o,overscanTiles:n,prev:a,prevViewport:i,maxFutureMs:s}){let d=aR(e,t,o,s),c=jo(e,t,0).filter(p=>s==null||p.startMs<s).map(p=>o.get(or(p.tierId,p.index))),l=c.every(p=>p?.revalidated&&!p.refreshing&&!p.error),u=ux(e,t,o);if(d&&(!u||a?.isFallback)&&c.some(p=>p?.refreshing||p?.error||p?.revalidated===false)&&a&&a.targetTier.id===t.id&&i?.startMs===e.startMs&&i?.endMs===e.endMs)return a;if(d&&(l||u)){let p=jo(e,t,n),{line:g,band:f,lines:x,coverage:h}=Hp(p,o);return {line:g,band:f,lines:x,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:h}}let m=r.findIndex(p=>p.id===t.id);for(let p=m+1;p<r.length;p++){let g=r[p];if(ux(e,g,o)){let f=jo(e,g,n),{line:x,band:h,lines:y,coverage:v}=Hp(f,o);return {line:x,band:h,lines:y,renderTier:g,targetTier:t,isFallback:true,isStale:false,coverage:v}}}if(d){let p=jo(e,t,n),{line:g,band:f,lines:x,coverage:h}=Hp(p,o);return {line:g,band:f,lines:x,renderTier:t,targetTier:t,isFallback:false,isStale:false,coverage:h}}return a?iR(a,e)?{...a,targetTier:t,isFallback:true,isStale:false}:{line:a.line,band:a.band,lines:a.lines,renderTier:null,targetTier:t,isFallback:true,isStale:true,coverage:dx}:{line:[],band:[],lines:{},renderTier:null,targetTier:t,isFallback:false,isStale:false,coverage:dx}}var Gp=new Map;function mx(e,t){switch(t.type){case "reset":return new Map;case "request":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);t.refresh&&n?.data?r.set(o,{...n,refreshing:true,error:void 0,revalidated:false}):(!n||n.status==="error")&&r.set(o,{status:"loading",refreshing:!!t.refresh});}return r}case "cancel":{let r=new Map(e);for(let o of t.ids){let n=r.get(o);n&&r.set(o,{...n,refreshing:false,status:n.data?n.status:"error"});}return r}case "fulfilled":{let r=new Map(e);return r.set(t.id,{status:ca(t.data)?"loaded":"empty",data:t.data,revision:(e.get(t.id)?.revision??0)+1,revalidated:t.refresh||e.get(t.id)?.revalidated}),r}case "failed":{let r=new Map(e),o=e.get(t.id);return r.set(t.id,o?.data?{...o,refreshing:false,error:t.error}:{status:"error",error:t.error}),r}default:return e}}function gx({refs:e,refsKey:t,store:r,tier:o,viewport:n,fetchTile:a,dispatch:i,concurrency:s,maxFutureMs:d,resetKey:c,refreshKey:l,refreshEnabled:u=true,automaticLoads:m=false}){let p=Ze.useRef({resetKey:c,refreshKey:l,refreshEnabled:u});Ze.useLayoutEffect(()=>{p.current={resetKey:c,refreshKey:l,refreshEnabled:u};},[c,l,u]);let g=Ze.useRef(new Map),f=Ze.useRef(new Map),x=Ze.useRef(0),h=Ze.useRef(false),y=Ze.useRef(null),v=Ze.useRef(new Map),C=Ze.useRef({resetKey:c,refreshKey:l,refreshEnabled:u}),w=Ze.useRef(`${o.id}:${n.startMs}:${n.endMs}`),[S,N]=Ze.useReducer(T=>T+1,0),k=Ze.useCallback(()=>{for(let T of g.current.values())T.ac.abort();g.current.clear(),f.current.clear(),y.current=null,h.current=false,v.current.clear();},[]);return Ze.useEffect(()=>{let T=`${o.id}:${n.startMs}:${n.endMs}`,E=C.current.resetKey!==c,A=C.current.refreshKey!==l,P=C.current.refreshEnabled&&!u;if(E&&k(),u)(A||h.current)&&!E&&(h.current=false,x.current+=1,y.current={generation:x.current,seen:new Set});else {h.current||(h.current=f.current.size>0||[...g.current.values()].some(Y=>Y.refresh));let F=[...f.current.keys()];for(let Y of F)v.current.set(Y,w.current);f.current.clear(),y.current=null;for(let[Y,U]of g.current)!U.refresh&&!(P&&U.automatic)||(U.ac.abort(),g.current.delete(Y),F.push(Y),v.current.set(Y,P&&w.current===T?T:U.viewportKey));F.length&&i({type:"cancel",ids:F});}C.current={resetKey:c,refreshKey:u||E?l:C.current.refreshKey,refreshEnabled:u},w.current=T;let I=y.current;if(I){let F=[];for(let Y of e){let U=or(Y.tierId,Y.index);I.seen.has(U)||d!=null&&Y.startMs>=d||(I.seen.add(U),f.current.set(U,I.generation),F.push(U));}F.length&&i({type:"request",ids:F,refresh:true});}let R=new Set(e.map(F=>or(F.tierId,F.index)));for(let F of f.current.keys())R.has(F)||(f.current.delete(F),v.current.set(F,T),i({type:"cancel",ids:[F]}));for(let[F,Y]of g.current)(Y.tierId!==o.id||Y.refresh&&!R.has(F))&&(Y.ac.abort(),g.current.delete(F),v.current.set(F,T),i({type:"cancel",ids:[F]}));let O=e.filter(F=>{if(d!=null&&F.startMs>=d)return false;let Y=or(F.tierId,F.index);if(g.current.has(Y))return false;let U=r.get(Y),V=v.current.get(Y);return V===T&&!f.current.has(Y)?false:f.current.has(Y)||V!=null||!U||U.status==="loading"}),W=(n.startMs+n.endMs)/2;O.sort((F,Y)=>Math.abs((F.startMs+F.endMs)/2-W)-Math.abs((Y.startMs+Y.endMs)/2-W));let z=O.slice(0,Math.max(0,s-g.current.size));for(let F of z){let Y=or(F.tierId,F.index),U=f.current.get(Y),V=U!==void 0,J={ac:new AbortController,tierId:F.tierId,generation:U??x.current,refresh:V,automatic:m&&u,viewportKey:T};v.current.delete(Y),g.current.set(Y,J),i({type:"request",ids:[Y],refresh:V});let G=d!=null?Math.min(F.endMs,d):F.endMs,B=()=>!J.ac.signal.aborted&&p.current.resetKey===c&&g.current.get(Y)===J&&(!J.automatic||p.current.refreshEnabled)&&(!V||p.current.refreshEnabled&&p.current.refreshKey===l)&&(f.current.get(Y)??J.generation)===J.generation;Promise.resolve().then(()=>{if(J.ac.signal.aborted)throw new DOMException("Aborted","AbortError");return a(o,F.startMs,G,J.ac.signal,{reason:V?"refresh":"load",isCurrent:B})}).then(L=>{B()&&i({type:"fulfilled",id:Y,data:L,refresh:V});}).catch(L=>{if(!B())return;let b=L instanceof Error?L.message:String(L);i({type:"failed",id:Y,error:new Error(`tile fetch failed (tile ${Y}, tier ${o.id}): ${b}`)});}).finally(()=>{g.current.get(Y)===J&&(g.current.delete(Y),f.current.get(Y)===J.generation&&f.current.delete(Y),!f.current.size&&![...g.current.values()].some(L=>L.refresh)&&(y.current=null),N());});}},[e,t,r,a,o,n,i,s,d,c,l,u,m,k,S]),Ze.useEffect(()=>k,[k]),{abortAll:k}}var hx=1.3,pR=25e4,mR=3;function fR(e,t,r){let o=t.tileSpanMs/t.bucketMs,n=Math.max(1,Math.floor(pR/o/r));return Math.min(Math.max(1,Math.ceil(.5*e/t.tileSpanMs)),n)}function xx(e){let{fetchTile:t,ladder:r,nativeMs:o,viewport:n,widthPx:a,maxFutureMs:i,targetPointsPerPx:s=1,concurrency:d=3,tileCostSeriesCount:c=mR,resetKey:l,refreshKey:u,refreshEnabled:m,automaticLoads:p}=e,g=Ze.useMemo(()=>({targetPointsPerPx:s,nativeMs:o}),[s,o]),[f,x]=Ze.useState(()=>ec(n.endMs-n.startMs,Math.max(1,a),r,g)),[h,y]=Ze.useReducer(mx,Gp),[v,C]=Ze.useState(l),w=v===l?h:Gp,S=Ze.useRef(null),N=Ze.useRef(null);v!==l&&(C(l),S.current=null,N.current=null,y({type:"reset"}));let k=Ze.useRef(n.endMs-n.startMs),T=Ze.useRef(g);Ze.useEffect(()=>{let B=n.endMs-n.startMs,L=ec(B,Math.max(1,a),r,g);if(L.id===f.id){T.current=g;return}let M=ec(B,Math.max(1,a),r,T.current).id!==L.id,D=B/k.current;(M||D>hx||D<1/hx)&&(k.current=B,T.current=g,x(L));},[n,a,r,f.id,g]);let E=n.endMs-n.startMs,A=Ze.useMemo(()=>fR(E,f,c),[E,f,c]),P=Ze.useMemo(()=>jo(n,f,A),[n,f,A]),I=Ze.useMemo(()=>P.map(B=>or(B.tierId,B.index)).join(","),[P]),R=Ze.useRef(P);R.current=P;let O=Ze.useRef(n);O.current=n;let W=Ze.useRef(w);W.current=w,gx({refs:P,refsKey:I,store:w,tier:f,viewport:n,fetchTile:t,dispatch:y,concurrency:d,resetKey:l,refreshKey:u,refreshEnabled:m,automaticLoads:p,...i!=null?{maxFutureMs:i}:{}});let z=Ze.useMemo(()=>R.current.map(B=>{let L=or(B.tierId,B.index),b=w.get(L);return `${L}:${b?.status??"\u2205"}:${b?.revision??0}:${!!b?.error}`}).join("|"),[I,w]),F=Ze.useMemo(()=>{let B=px({viewport:O.current,targetTier:f,ladder:r,store:W.current,overscanTiles:A,prev:S.current,prevViewport:N.current,maxFutureMs:i});return S.current=B,N.current=O.current,B},[z,f,r,A,n.startMs,n.endMs,i,l]),Y=Ze.useMemo(()=>R.current.some(B=>W.current.get(or(B.tierId,B.index))?.status==="loading"),[z]),U=Ze.useMemo(()=>{let B=R.current[0];return B?W.current.get(or(B.tierId,B.index))?.status==="empty":false},[z]),V=P.map(B=>w.get(or(B.tierId,B.index))),J=V.some(B=>B?.refreshing),G=V.find(B=>B?.error)?.error;return {tier:f,series:F,loading:Y,refreshing:J,refreshError:G,atDataStart:U}}function Up(e){let{initialViewport:t,...r}=e,[o,n]=Ze.useState(t),a=xx({...r,viewport:o}),i=Ze.useCallback(d=>n(d),[]),s=Ze.useCallback(d=>n(d),[]);return {viewport:o,onViewportChange:i,jumpTo:s,...a}}var gR={sm:"gap-4 px-6 py-8",md:"gap-5 px-8 py-12",lg:"gap-6 px-10 py-16"},bR={sm:"xs",md:"sm",lg:"md"},hR={sm:Et("bodySm"),md:Et("bodySm"),lg:Et("bodyMd")},xR={sm:"h-10 w-10",md:"h-12 w-12",lg:"h-16 w-16"},yR={sm:20,md:24,lg:32},vR={center:"items-center text-center [&_.empty-state-actions]:justify-center [&_.empty-state-actions]:text-center",start:"items-start text-left [&_.empty-state-actions]:justify-start [&_.empty-state-actions]:text-left"},CR={mesh:"radial-gradient(at 20% 20%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 80% 80%, rgba(68, 74, 225, 0.045) 0px, transparent 45%), radial-gradient(at 50% 50%, rgba(68, 74, 225, 0.03) 0px, transparent 50%)","top-fade":"linear-gradient(to bottom, rgba(68, 74, 225, 0.06) 0%, rgba(68, 74, 225, 0.02) 60%, transparent 100%)",center:"radial-gradient(ellipse 600px 400px at center, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",corners:"radial-gradient(at 0% 0%, rgba(68, 74, 225, 0.06) 0px, transparent 40%), radial-gradient(at 100% 100%, rgba(68, 74, 225, 0.045) 0px, transparent 40%)",bottom:"radial-gradient(ellipse 700px 300px at 50% 100%, rgba(68, 74, 225, 0.06) 0px, transparent 60%)",asymmetric:"radial-gradient(at 15% 30%, rgba(68, 74, 225, 0.06) 0px, transparent 45%), radial-gradient(at 85% 70%, rgba(68, 74, 225, 0.04) 0px, transparent 50%)"};function tc({icon:e,title:t,description:r,primaryAction:o,secondaryAction:n,actions:a,size:i="md",alignment:s="center",variant:d="default",spotlightPattern:c="mesh",fullHeight:l=false,className:u}){let m=i==="sm"?"sm":"md",p=d==="spotlight",g=p?{background:CR[c]}:void 0,f=()=>a?jsxRuntime.jsx("div",{className:"empty-state-actions mt-2 flex flex-wrap items-center gap-3",children:a}):o||n?jsxRuntime.jsxs("div",{className:"empty-state-actions mt-2 flex flex-col gap-3",children:[o&&(o.href?jsxRuntime.jsx(re,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,href:o.href,children:o.label}):jsxRuntime.jsx(re,{variant:"secondary",size:m,onPress:o.onPress,isDisabled:o.isDisabled,isLoading:o.isLoading,children:o.label})),n&&jsxRuntime.jsx(pt,{href:n.href||"#",variant:"muted",onPress:n.onPress,className:Et("labelMd"),children:n.label})]}):null;return jsxRuntime.jsxs("section",{"data-testid":"empty-state",role:"status","aria-live":"polite",className:tailwindMerge.twMerge("flex w-full flex-col rounded-xl text-text-primary",gR[i],vR[s],l?"h-full justify-center":"",p?"relative overflow-hidden":"",u),style:g,children:[e&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center rounded-full border border-border-muted bg-background-muted text-text-secondary",xR[i]),children:jsxRuntime.jsx(H,{name:e,size:yR[i]})}),jsxRuntime.jsx(xr,{size:bR[i],tag:"h2",className:"text-text-secondary",children:t}),r&&jsxRuntime.jsx("p",{className:tailwindMerge.twMerge("max-w-xs text-text-secondary whitespace-pre-line",hR[i]),children:r}),f()]})}var wR=1440*60*1e3,NR=[{id:"5y",label:"5 years",days:5*365},{id:"year",label:"Year",days:365},{id:"month",label:"Month",days:30},{id:"week",label:"Week",days:7},{id:"day",label:"24h",days:1}],TR=[{id:"day",days:1},{id:"week",days:7},{id:"month",days:30}];function vx(e,t=Date.now){return TR.map(({id:r,days:o})=>({id:r,label:e[r],getRange:()=>{let n=new Date(t());return {after:dateFns.subDays(n,o),before:n}}}))}function rc(e=Date.now){return NR.map(({id:t,label:r,days:o})=>({id:t,label:r,getRange:()=>{let n=e();return {after:new Date(n-o*wR),before:new Date(n)}}}))}function LR({selectionState:e,isDisabled:t}){let r=`${ot} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`,o={none:"text-text-primary group-hover:bg-background-muted group-pressed:bg-background-muted",middle:["bg-background-selected group-hover:bg-background-muted forced-colors:group-hover:bg-[Highlight]","group-invalid:group-hover:bg-feedback-error-background forced-colors:group-invalid:group-hover:bg-[Mark]","group-pressed:bg-background-muted forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]","group-invalid:group-pressed:bg-feedback-error-background forced-colors:group-invalid:group-pressed:bg-[Mark]"].join(" "),cap:"bg-action-default text-[color:var(--color-action-default-text)] group-invalid:bg-feedback-error-border forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] forced-colors:text-[HighlightText]"},n=t?"text-text-disabled forced-colors:text-text-disabled font-light":"";return [r,o[e],n].filter(Boolean).join(" ")}function pi({errorMessage:e,...t}){return jsxRuntime.jsxs(reactAriaComponents.RangeCalendar,{...t,children:[jsxRuntime.jsx(Ml,{}),jsxRuntime.jsxs(reactAriaComponents.CalendarGrid,{className:"w-full border-separate [border-spacing:0] [&_td]:p-0 [&_td]:!border-0",children:[jsxRuntime.jsx(Ll,{}),jsxRuntime.jsx(reactAriaComponents.CalendarGridBody,{children:r=>jsxRuntime.jsx(reactAriaComponents.CalendarCell,{date:r,className:"selection-start:rounded-s-full selection-end:rounded-e-full [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm border-0 outside-month:text-text-disabled invalid:selected:bg-feedback-error-background forced-colors:selected:bg-[Highlight] forced-colors:selected:text-[HighlightText] forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full [&]:border-0",children:({formattedDate:o,isSelected:n,isSelectionStart:a,isSelectionEnd:i,isFocusVisible:s,isDisabled:d})=>jsxRuntime.jsx("span",{className:LR({selectionState:n&&(a||i)?"cap":n?"middle":"none",isDisabled:d}),children:o})})})]}),e&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"errorMessage",className:"text-sm text-feedback-error-text",children:e})]})}function Sx(e){return e==="brand"?"primary":e==="default"||e==="secondary"||!e?"subtle":e}var AR={sm:"h-[var(--control-sm-height)] text-xs",md:"h-[var(--control-md-height)] text-sm",lg:"h-[var(--control-lg-height)] text-base",xl:"h-[var(--control-xl-height)] text-lg"},IR={sm:14,md:16,lg:18,xl:20},FR=({isSelected:e,isFirst:t,isLast:r,isDisabled:o,variant:n="subtle"})=>{let a=Sx(n),i=a==="primary"?"focus-visible:outline-action-primary":"focus-visible:outline-[color:var(--color-action-secondary-text)]";return a==="subtle"?tailwindMerge.twMerge(ot(),"focus-visible:outline-[color:var(--color-action-secondary-text)]","px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-background-muted text-text-primary font-medium forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText]",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed"):tailwindMerge.twMerge(ot(),i,"px-3 text-center transition cursor-pointer forced-color-adjust-none -ml-px first:ml-0 flex items-center justify-center h-full gap-2",e?"bg-action-primary text-[color:var(--color-action-primary-text)] font-semibold forced-colors:!bg-[Highlight] forced-colors:!text-[HighlightText]":"text-text-secondary hover:bg-background-hover pressed:bg-background-hover forced-colors:!bg-[ButtonFace] forced-colors:!text-[ButtonText] hover:font-semibold",!r&&"border-r border-border-muted",o&&"bg-background-muted text-text-disabled forced-colors:!bg-[ButtonFace] forced-colors:!text-[GrayText] border-border-muted forced-colors:border-[GrayText] cursor-not-allowed")};function nc({options:e,value:t,onChange:r,size:o="md",className:n,isDisabled:a,variant:i="subtle",iconOnly:s=false,"aria-label":d}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("inline-flex overflow-hidden rounded-[var(--control-border-radius)]",Sx(i)==="subtle"?"border border-border-muted":"border-2 border-border-muted",AR[o],n),role:"group","aria-label":d,children:e.map((c,l)=>{let u=s&&!!c.icon;return jsxRuntime.jsxs(reactAriaComponents.ToggleButton,{isSelected:t===c.id,onChange:()=>r(c.id),className:FR({isSelected:t===c.id,isFirst:l===0,isLast:l===e.length-1,isDisabled:a,variant:i}),isDisabled:a,"aria-label":c.label,children:[c.icon&&jsxRuntime.jsx(H,{name:c.icon,size:IR[o]}),u?jsxRuntime.jsx("span",{className:"sr-only",children:c.label}):jsxRuntime.jsx("span",{className:"inline-flex flex-col items-center after:content-[attr(data-label)] after:font-semibold after:h-0 after:overflow-hidden after:invisible","data-label":c.label,children:c.label})]},c.id)})})}function zR(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function Xp(e){return zR(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var Rx=120*1e3,HR=.02,Ex={FIVE_MINUTES:0,FIFTEEN_MINUTES:1,HOUR:2,DAY:3,WEEK:4,MONTH:5,YEAR:6},GR=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function ac({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,showReset:d=true,restrictToSingleDay:c=false,presetRanges:l=[],windowSizeOptions:u=GR,autoAdjustWindowSize:m=false,size:p="md",className:g}){let[f,x]=Ze.useState(0),h=Ze.useRef(null),[y,v]=Ze.useState(false),[C,w]=Ze.useState(null),S=b=>{let D=(b.before.getTime()-b.after.getTime())/(1e3*60*60);return D<=24?"FIFTEEN_MINUTES":D<=72||D<=168?"HOUR":("DAY")};Ze.useEffect(()=>{if(m&&!y&&o){let b=S(e);o(b);}},[e,m,y,o]);let N=b=>{let M;for(let D of l){let q=D.getRange(),ae=(q.before.getTime()-q.after.getTime())*HR,_=Math.abs(q.after.getTime()-b.after.getTime()),ee=Math.abs(q.before.getTime()-b.before.getTime());if(_>ae||ee>ae)continue;let ie=_+ee;(!M||ie<M.distance)&&(M={id:D.id,distance:ie});}return M?.id},k=C&&l.some(b=>b.id===C.id)&&Math.abs(C.after-e.after.getTime())<=Rx&&Math.abs(C.before-e.before.getTime())<=Rx?C.id:N(e),T=Xp(e.after),E=Xp(e.before),A=new Date(E.getTime()-1),P={start:date.fromDate(T,date.getLocalTimeZone()),end:date.fromDate(A,date.getLocalTimeZone())};Ze.useEffect(()=>{let b=new ResizeObserver(M=>{for(let D of M)x(D.contentRect.width);});return h.current&&b.observe(h.current),()=>{h.current&&b.unobserve(h.current);}},[]);let I=[...u].sort((b,M)=>Ex[b.id]-Ex[M.id]),R=b=>{let M=b.toString(),D=l.find(q=>q.id===M);if(D){let q=D.getRange();w({id:M,after:q.after.getTime(),before:q.before.getTime()}),v(false),t(q,{presetId:M});}},O=b=>{if(b?.start&&b?.end){w(null);let M=new Date(b.start.year,b.start.month-1,b.start.day,0,0,0,0),D=new Date(b.end.year,b.end.month-1,b.end.day+1,0,0,0,0);t({after:M,before:D});}},W=b=>{if(b){w(null);let M=new Date(b.year,b.month-1,b.day,0,0,0,0),D=new Date(b.year,b.month-1,b.day+1,0,0,0,0);t({after:M,before:D});}},z=b=>{o&&(v(true),o(b.toString()));},F=()=>{l.length>0&&R(l[0].id);},Y=b=>Xp(b).toLocaleDateString("en-US"),U=I.map(b=>({id:b.id,label:b.label,value:b.id})),V=l.map(b=>({id:b.id,label:b.label,value:b.id})),J=s?jsxRuntime.jsx("div",{className:"flex items-center rounded-md border border-border-muted bg-background-muted px-3 py-2 text-sm text-text-secondary",children:I.find(b=>b.id===r)?.label||r}):jsxRuntime.jsx(Ko,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:z,items:U,size:p,"aria-label":"Select Window Size",children:b=>jsxRuntime.jsx(Cr,{id:b.id,"aria-label":b.label,size:p,children:b.label},b.id)}),G=d&&!k&&l.length>0,B=c?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{className:"border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",size:p,children:[jsxRuntime.jsx(H,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:Y(e.after)})]}),jsxRuntime.jsx(St,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ti,{"aria-label":"Select date",value:date.parseDate(T.toISOString().split("T")[0]),onChange:W})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(re,{className:tailwindMerge.twMerge("border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",G&&"rounded-r-none"),variant:"secondary",size:p,children:[jsxRuntime.jsx(H,{name:"CalendarBlank",size:18}),!k&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${Y(e.after)} - ${Y(A)}`})]}),jsxRuntime.jsx(St,{className:"z-50 w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(pi,{"aria-label":"Date range calendar",value:P,onChange:O})})]}),G&&jsxRuntime.jsx(re,{variant:"ghost",size:p,onPress:F,children:"Reset"})]}),L=f<600;return jsxRuntime.jsx("div",{ref:h,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",g),children:L?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&B,a&&l.length>0&&jsxRuntime.jsx(Ko,{selectedKey:k??"",onSelectionChange:R,items:V,size:p,"aria-label":"Select Date Range",children:b=>jsxRuntime.jsx(Cr,{id:b.id,size:p,children:b.label},b.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&J})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&B,a&&l.length>0&&jsxRuntime.jsx(nc,{options:l.map(b=>({id:b.id,label:b.label})),value:k??"",onChange:R,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&J})]})})}var KR={live:"Receiving updates",connecting:"Waiting for next update",reconnecting:"Reconnecting\u2026",stale:"No recent updates",delayed:"Measurements delayed","refresh-failed":"Update delayed"};function Lx({label:e,checked:t,onChange:r,status:o,disabledReason:n,waitingDescription:a}){let i=Ze.useId(),s=t&&o==="live",d=n||(t?KR[o]:void 0);return jsxRuntime.jsxs("div",{className:"flex max-w-full shrink-0 flex-col items-end gap-1",children:[jsxRuntime.jsxs(re,{variant:"ghost",size:"sm","aria-label":e,"aria-pressed":t,...d&&{"aria-describedby":i},isDisabled:!!n,onPress:()=>r(!t),className:t?"text-text-primary":"text-text-secondary",children:[jsxRuntime.jsx("span",{"aria-hidden":"true","data-live-indicator":s?"live":"neutral",className:`size-1.5 shrink-0 rounded-full ${s?"bg-error-base":"bg-text-secondary"}`}),jsxRuntime.jsx("span",{children:t?"Live":"Static"})]}),jsxRuntime.jsxs("span",{id:i,role:"status","aria-atomic":"true",className:"max-w-64 text-right text-xs text-text-secondary",children:[d,!n&&t&&o==="connecting"&&a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[". ",a]})]})]})}var qR=1440*60*1e3,Qp=6e4,Dx=(e,t)=>({startMs:t-e*qR,endMs:t}),jR=e=>({after:new Date(e.startMs),before:new Date(e.endMs)});function Ax({source:e,title:t,liveControl:r,initialRange:o,viewportEnd:n,yFormatter:a,yDomain:i,referenceLines:s,emptyState:d,presetRanges:c,tierToWindow:l,windowSizeOptions:u,height:m=360,hint:p,dataBounds:g,onViewChange:f,followLatest:x=false,followLatestKey:h,children:y}){let[v,C]=Ze.useState(900),w=e.refreshEnabled!==false,S=g?.endMs,[N,k]=Ze.useState(()=>S??Date.now()),T=n?.getTime()??S,E=x&&n===void 0&&g===void 0,[A,P]=Ze.useState(true),[I,R]=Ze.useState(null),O=E&&A,[W,z]=Ze.useState({resetKey:e.resetKey,automatic:false}),F=n===void 0&&g===void 0&&A,Y=o?.days??30,U=Ze.useMemo(()=>Dx(Y,T??Date.now()),[Y,T]),V=Ze.useRef({resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:w,followLatestKey:h}),J=w&&(V.current.resetKey!==e.resetKey||V.current.refreshKey!==e.refreshKey||V.current.refreshEnabled===false),G=V.current.resetKey===e.resetKey,B=E&&V.current.followLatestKey!==h,L=S??(J||B?Date.now():N);Ze.useEffect(()=>{V.current={resetKey:e.resetKey,refreshKey:e.refreshKey,refreshEnabled:w,followLatestKey:h},(J||B)&&(G&&z({resetKey:e.resetKey,automatic:true}),k(L));},[e.resetKey,e.refreshKey,w,h,J,B,L,G]);let[b,M]=Ze.useState(null),[D,q]=Ze.useState(null),ae=b??U,_=Up({fetchTile:e.fetchTile,ladder:e.ladder,nativeMs:e.nativeMs,initialViewport:U,widthPx:v,maxFutureMs:L,tileCostSeriesCount:e.tileCostSeriesCount,resetKey:e.resetKey,...e.refreshKey!==void 0&&{refreshKey:e.refreshKey},refreshEnabled:w&&I===null,automaticLoads:(O||B)&&(W.resetKey===e.resetKey&&W.automatic||G&&(J||B))}),ee=_.series.targetTier.bucketMs,ie=E?(Math.floor(L/ee)+1)*ee:L,Me=T==null?Math.max(ie,_.viewport.endMs):ie,le=Ze.useMemo(()=>({startMs:g?.startMs??0,endMs:Me}),[g?.startMs,Me]),ge=Le=>{let vt=T==null?Math.max(le.endMs,Date.now()):le.endMs,Bt=Math.min(Le.endMs-Le.startMs,vt-le.startMs),no=Math.max(Math.min(Le.endMs,vt),le.startMs+Bt);return {startMs:no-Bt,endMs:no}},ce=(Le,vt=true)=>{z({resetKey:e.resetKey,automatic:false});let Bt=Math.abs(le.endMs-Le)<=Qp||Math.abs(Date.now()-Le)<=Qp,no=vt&&Bt;w&&R(""),P(no),S==null&&k(Date.now());};Ze.useEffect(()=>{if(S!=null){k(S);return}if(!w)return;let Le,vt=(no=true)=>{let Xs=Date.now();no&&O&&z({resetKey:e.resetKey,automatic:true}),k(Xs);let zd=ee-Xs%ee;Le=setTimeout(vt,Math.min(Qp,zd));},Bt=()=>{document.visibilityState==="visible"&&(clearTimeout(Le),vt());};return vt(false),document.addEventListener("visibilitychange",Bt),()=>{clearTimeout(Le),document.removeEventListener("visibilitychange",Bt);}},[S,ee,w,O,e.resetKey]);let pe=Ze.useRef(h);Ze.useEffect(()=>{let Le=pe.current!==h;pe.current=h,!(!Le||!E)&&(P(true),k(Date.now()));},[E,h]),Ze.useEffect(()=>{O&&w&&k(Date.now());},[O,w,e.resetKey,e.refreshKey]);let Te=_.jumpTo,{startMs:et,endMs:Be}=_.viewport;Ze.useEffect(()=>{if(!O)return;let Le=Math.max(Be-et,ee);ie===Be&&Le===Be-et||(z({resetKey:e.resetKey,automatic:true}),Te({startMs:ie-Le,endMs:ie}));},[O,ie,et,Be,ee,Te,e.resetKey]);let $t=Ze.useMemo(()=>rc(()=>T??Date.now()),[T]),yt=c??$t,ir=()=>{if(D&&"presetId"in D){let Le=yt.find(vt=>vt.id===D.presetId);if(Le){let vt=Le.getRange();return {startMs:vt.after.getTime(),endMs:vt.before.getTime()}}}return D&&"range"in D?D.range:Dx(Y,T??Date.now())},{coverage:Rt,renderTier:tt,targetTier:Gt,isFallback:te,isStale:Oe}=_.series,Ue=Gt.id,Dt=tt?.id??null,{startMs:oe,endMs:we}=_.viewport,X=Ze.useRef(f);Ze.useEffect(()=>{X.current=f;},[f]),Ze.useEffect(()=>{X.current?.({targetTierId:Ue,renderedTierId:Dt,viewport:{startMs:oe,endMs:we},followingLatest:O,atLiveEdge:F});},[Ue,Dt,oe,we,O,F]),Ze.useEffect(()=>{if(I===null)return;let Le=`${Ue}:${oe}:${we}`;R(I===Le?null:Le);},[I,Ue,oe,we]);let K=tt?tt.bucketMs*1.5:0,de=Le=>Le==null?"\u2014":new Date(Le).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),ne=(Le,vt)=>{let Bt=vt-Le<1728e5?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{month:"short",day:"numeric",year:"numeric"},no=new Intl.DateTimeFormat("en-US",Bt);return `${no.format(new Date(Le))} \u2013 ${no.format(new Date(vt))}`},ke=O?_.viewport.endMs-_.viewport.startMs!==ae.endMs-ae.startMs:_.viewport.startMs!==ae.startMs||_.viewport.endMs!==ae.endMs,ve=Oe||_.loading&&Rt.earliestMs==null,$=(_.viewport.endMs-_.viewport.startMs)*.03,ue=!ve&&Rt.earliestMs!=null&&Rt.earliestMs>_.viewport.startMs+$,Z=!_.loading&&Rt.earliestMs==null&&Rt.latestMs==null&&!ca(_.series)&&!Oe,be=na(t),sr=y({series:_.series,gapMs:K}),ln=Ze.isValidElement(sr)&&sr.type===Ze.Fragment?sr.props.children:sr,oo=jsxRuntime.jsxs("div",{className:`flex flex-col gap-3${be.isExpanded?" h-full":""}`,children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap items-start gap-2",children:[jsxRuntime.jsx("div",{className:"min-w-0 flex-[1_1_16rem]",children:jsxRuntime.jsx(ac,{dateRange:jR(_.viewport),onDateRangeChange:(Le,vt)=>{let Bt=ge({startMs:Le.after.getTime(),endMs:Le.before.getTime()});ce(Bt.endMs,!!vt?.presetId),q(vt?.presetId?{presetId:vt.presetId}:{range:Bt}),M(Bt),_.jumpTo(Bt);},windowSize:l[Gt.id],windowSizeOptions:u,lockWindowSize:true,presetRanges:yt,allowDatePicker:true,showReset:false})}),jsxRuntime.jsxs("div",{className:"ml-auto flex max-w-full flex-wrap items-start gap-2",children:[r&&jsxRuntime.jsx(Lx,{...r,status:_.refreshError?"refresh-failed":r.status}),!be.isExpanded&&!Z&&be.action]})]}),jsxRuntime.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-text-secondary",children:[jsxRuntime.jsxs("span",{children:["Window"," ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:ne(_.viewport.startMs,_.viewport.endMs)})]}),jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"\u2022"}),jsxRuntime.jsxs("span",{children:["Resolution ",jsxRuntime.jsx("span",{className:"font-medium text-text-primary",children:tt?.id??Gt.id}),te&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:[" \xB7 loading ",Gt.id]})]}),_.loading&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"loading\u2026"}),_.refreshError&&jsxRuntime.jsx("span",{role:"status",className:"text-text-tertiary",children:Rt.earliestMs==null?"Unable to load telemetry":"Refresh failed \xB7 showing previous data"}),ue&&jsxRuntime.jsxs("span",{className:"text-text-tertiary",children:["showing available history from ",de(Rt.earliestMs)]}),!ue&&!ve&&_.atDataStart&&jsxRuntime.jsx("span",{className:"text-text-tertiary",children:"no earlier data loaded"}),ke&&jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onPress:()=>{let Le=ge(ir());ce(Le.endMs,!(D&&"range"in D)),M(Le),_.jumpTo(Le);},children:"\u27F2 Reset"})]}),jsxRuntime.jsx("div",{className:`relative overflow-hidden rounded-md border border-border-subtle${be.isExpanded?" min-h-0 flex-1":""}`,style:be.isExpanded?void 0:{height:m},children:Z?jsxRuntime.jsx(tc,{title:d.title,description:d.description}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx($l,{title:t,viewport:_.viewport,panBounds:le,getPanBounds:()=>({startMs:le.startMs,endMs:S??Math.max(le.endMs,Date.now())}),onViewportChange:Le=>{ce(Le.endMs),_.onViewportChange(Le);},onPlotWidthChange:C,...a&&{yFormatter:a},...i&&{yDomain:i},...s&&{referenceLines:s},children:ln}),_.loading&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-0.5 animate-pulse bg-[var(--color-viz-categorical-1)] opacity-60"})]})}),p&&jsxRuntime.jsx("p",{className:"text-xs text-text-tertiary",children:p})]});return jsxRuntime.jsx(Ep,{children:be.present(oo)})}function cs({count:e,label:t="results",suffix:r,unknownLabel:o="\u2014",isLoading:n=false,className:a="",testId:i}){if(n)return jsxRuntime.jsx("div",{className:`flex items-center ${a}`,children:jsxRuntime.jsx(j,{width:80,height:16})});if(e===null)return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:o});let s=t.endsWith("s")?t.slice(0,-1):t,d=e===1&&!r?s:t,c=`${e.toLocaleString()}${r??""}${d?` ${d}`:""}`;return jsxRuntime.jsx("div",{"data-testid":i,className:`text-sm text-text-secondary whitespace-nowrap ${a}`,children:c})}var e2=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=[e.showSearchIcon?"":"pl-3",e.isClearable&&e.hasValue||e.isPassword?"pr-8":"pr-3"].join(" ");return tailwindMerge.twMerge(t,r,e.className)};function $r({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,showSearchIcon:s,isClearable:d,onClear:c,type:l,validationResult:u,reserveErrorSpace:m=true,isLoading:p=false,descriptionPlacement:g="below",...f}){let[x,h]=Ze__namespace.default.useState(false),{isFocused:y,handleFocus:v,handleBlur:C}=vr(),w=l==="password",S=vl(p,300);return jsxRuntime.jsx(reactAriaComponents.TextField,{...f,isRequired:a,className:Ie(f.className,"group flex flex-col"),children:({isDisabled:N,isInvalid:k})=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:g==="tooltip"||g==="inline"?t:void 0,descriptionPlacement:g,isRequired:a,children:e}),jsxRuntime.jsxs(Nt,{children:[s&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute top-1/2 -translate-y-1/2 transform flex items-center z-10",style:{left:9},children:(()=>{let T={sm:14,md:16,lg:18,xl:20}[o];return S?jsxRuntime.jsx(Jr,{size:T,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:T,className:`transition-colors ${y?"text-action-brand":"text-text-secondary"}`})})()}),jsxRuntime.jsx(Sl,{size:o,disabled:N,type:w?x?"text":"password":l,name:f.name,autoComplete:f.autoComplete,value:f.value,defaultValue:f.defaultValue,placeholder:f.placeholder,onFocus:T=>v(T,f.onFocus),onBlur:T=>C(T,f.onBlur),onChange:T=>f.onChange?.(T.target.value),style:s?{paddingLeft:{sm:28,md:32,lg:36,xl:37}[o]}:void 0,className:e2({isInvalid:k,isDisabled:N,isFocused:y,size:o,transparent:i,showSearchIcon:s,isClearable:d,hasValue:!!f.value,isPassword:w,className:typeof f.className=="string"?f.className:void 0})}),d&&f.value&&!N&&jsxRuntime.jsx(Yi,{onClick:()=>{c?c():f.onChange&&f.onChange("");},size:o}),w&&!N&&jsxRuntime.jsx("button",{type:"button",onClick:()=>h(!x),className:"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-secondary hover:text-text-primary","aria-label":x?"Hide password":"Show password",onMouseDown:T=>{T.preventDefault(),T.stopPropagation();},children:jsxRuntime.jsx(H,{name:x?"EyeSlash":"Eye",size:o==="sm"?16:20,className:"text-text-primary"})})]}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)}):t&&g==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}function pa({value:e,onChange:t,onClear:r,placeholder:o="Search...",size:n="sm",className:a="",isLoading:i=false}){return jsxRuntime.jsx("div",{className:`flex-1 min-w-0 sm:max-w-sm ${a}`,children:jsxRuntime.jsx($r,{value:e,onChange:t,placeholder:o,showSearchIcon:true,isClearable:!!e&&!!r,onClear:r,size:n,"aria-label":o,reserveErrorSpace:false,isLoading:i})})}function ds({value:e,options:t,onChange:r,direction:o,onDirectionChange:n,showLabel:a=true,size:i="sm",className:s="",compact:d=false}){let[c,l]=Ze.useState(false),u=o!==void 0&&n!==void 0,m=t.find(p=>p.value===e);return d?jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[jsxRuntime.jsx(re,{variant:"secondary",size:i,icon:"ArrowsDownUp","aria-label":`Sort by: ${m?.label||"Select"}`,onPress:()=>l(true)}),jsxRuntime.jsx(wt,{isOpen:c,onClose:()=>l(false),title:"Sort by",contentPadding:false,children:jsxRuntime.jsx(reactAriaComponents.ListBox,{items:t.map(p=>({id:p.value,label:p.label,value:p.value})),className:"w-full bg-background-surface p-0 outline-0 [&_[role=option]]:border-b [&_[role=option]]:border-border-default [&_[role=option]:last-child]:border-0 [&_[role=option]]:!px-6 [&_[role=option]]:!py-4 [&_[role=option]]:rounded-none",selectionMode:"single",selectedKeys:e?[e]:[],onSelectionChange:p=>{let g=Array.from(p)[0];g!=null&&(r(g),l(false));},children:p=>jsxRuntime.jsx(Cr,{id:p.id,textValue:p.label,children:jsxRuntime.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap min-w-0 flex-1",children:p.label})},p.id)})})]}):jsxRuntime.jsxs("div",{className:`flex items-center gap-2 ${s}`,children:[a&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary whitespace-nowrap",children:"Sort by:"}),jsxRuntime.jsx(Ko,{selectedKey:e,onSelectionChange:p=>r(p),size:i,className:"min-w-32",items:t.map(p=>({id:p.value,label:p.label,value:p.value})),renderItem:p=>p.label,"aria-label":"Sort by",reserveErrorSpace:false}),u&&jsxRuntime.jsx(re,{variant:"ghost",size:i,onClick:()=>n(o==="asc"?"desc":"asc"),"aria-label":`Sort ${o==="asc"?"descending":"ascending"}`,className:"p-1.5",children:o==="asc"?jsxRuntime.jsx(lucideReact.ArrowUp,{className:"w-4 h-4"}):jsxRuntime.jsx(lucideReact.ArrowDown,{className:"w-4 h-4"})})]})}function Vx({search:e,searchMobileMode:t="expanded",filters:r=[],onRemoveFilter:o,onClearAllFilters:n,onManageFilters:a,exportControl:i,maxVisibleFilterChips:s=3,sort:d,resultsCount:c,leftControls:l,onManageColumns:u,columnPicker:m,customControls:p,actions:g,interactionMode:f="auto",sticky:x,stickyTop:h="0",zIndex:y=10,className:v="",style:C}){let w=r.length>0;if(!(e||w||a||d||c||l||u||m||p||g||i))return null;let N=x?"sticky bg-background-surface":"",k=x?{top:h,zIndex:y}:{};return jsxRuntime.jsxs("div",{className:`@container flex flex-col gap-3 bg-background-surface py-3 border-b border-border-default ${N} ${v}`,style:{...C,...k},children:[jsxRuntime.jsxs("div",{className:"hidden @[640px]:flex @[640px]:items-center @[640px]:justify-between @[640px]:gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[l,l&&c&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),c&&jsxRuntime.jsx(cs,{count:c.count,label:c.label,suffix:c.suffix,unknownLabel:c.unknownLabel,isLoading:c.isLoading,testId:c.testId}),c&&d&&jsxRuntime.jsx("div",{className:"h-4 w-px bg-border-default"}),d&&jsxRuntime.jsx(ds,{value:d.value,options:d.options,onChange:d.onChange,showLabel:d.showLabel,direction:d.direction,onDirectionChange:d.onDirectionChange}),u?jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Columns",onClick:u,children:"Columns"}):m,w&&o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.slice(0,s).map(T=>jsxRuntime.jsxs(jr,{variant:"primary",size:"sm",onRemove:()=>o(T.id),isRemovable:true,children:[T.label,": ",T.value]},T.id)),r.length>s&&a&&jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",onClick:a,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",r.length-s," more"]}),n&&jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onClick:n,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-3 flex-shrink-0",children:p||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:g.items.map(T=>jsxRuntime.jsx(re,{variant:T.variant||"secondary",size:"sm",icon:T.icon,onPress:T.onClick,isDisabled:T.disabled,children:T.label},T.id))}),e&&jsxRuntime.jsx("div",{className:"w-64",children:jsxRuntime.jsx(pa,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,children:"Filters"}),i&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})]}),jsxRuntime.jsxs("div",{className:"@[640px]:hidden",children:[jsxRuntime.jsx("div",{className:"flex flex-col gap-3 mb-3",children:jsxRuntime.jsx("div",{className:"flex items-center gap-3",children:p?jsxRuntime.jsx("div",{className:"flex-1",children:p}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&g.items.length>0&&jsxRuntime.jsx(Qa,{items:g.items.map(T=>({id:T.id,name:T.label,iconName:T.icon,variant:T.variant==="destructive"?"destructive":"primary",disabled:T.disabled,onAction:T.onClick})),align:"left",size:"sm",children:jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"DotsThreeVertical","aria-label":g.menuLabel||"Actions"})}),e&&jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx(pa,{value:e.value,onChange:e.onChange,onClear:e.onClear,placeholder:e.placeholder,isLoading:e.isLoading})}),a&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:"Sliders",badgeNumber:r.length>0?r.length:void 0,onClick:a,"aria-label":`Filters${r.length>0?` (${r.length} active)`:""}`}),i&&jsxRuntime.jsx(re,{variant:"secondary",size:"sm",icon:i.icon??"Upload",onClick:i.onClick,isDisabled:i.isDisabled,isLoading:i.isLoading,children:i.label})]})})}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[l,c&&jsxRuntime.jsx(cs,{count:c.count,label:c.label,suffix:c.suffix,unknownLabel:c.unknownLabel,isLoading:c.isLoading})]}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:d&&jsxRuntime.jsx(ds,{value:d.value,options:d.options,onChange:d.onChange,showLabel:false,direction:d.direction,onDirectionChange:d.onDirectionChange,compact:f!=="desktop"})})]})]})]})}function Ox({filters:e,onRemove:t,onClearAll:r,onManageFilters:o,maxVisibleChips:n=3,mode:a="chips",showManageButton:i=true,size:s="sm",className:d=""}){let c=e.length>0,l=e.slice(0,n),u=Math.max(0,e.length-n),m=u>0,p=a==="button"&&!!o,g=a==="chips"&&i&&!!o;if(!c&&!p&&!g)return null;let f=p&&jsxRuntime.jsxs(re,{variant:"secondary",size:s,onClick:o,className:"whitespace-nowrap",children:[e.length," ",e.length===1?"filter":"filters"]}),x=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[g&&jsxRuntime.jsx(re,{variant:"secondary",size:s,icon:"Sliders",onClick:o,className:"whitespace-nowrap",children:"Filters"}),c&&l.map(y=>jsxRuntime.jsxs(jr,{variant:"secondary",size:s,onRemove:()=>t(y.id),isRemovable:true,children:[y.label,": ",y.value]},y.id)),c&&m&&o&&jsxRuntime.jsxs(re,{variant:"ghost",size:s,onClick:o,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:["+",u," more"]}),c&&r&&jsxRuntime.jsx(re,{variant:"ghost",size:s,onClick:r,className:"text-text-secondary hover:text-text-primary whitespace-nowrap",children:"Clear all"})]}),h=a==="button"?f:x;return jsxRuntime.jsx("div",{className:`flex flex-wrap items-center gap-2 ${d}`,children:h})}var zx=["isEmpty","isNotEmpty"];function Hx(e){return zx.includes(e)}var Gx={isEmpty:"is empty",isNotEmpty:"is not empty"};function s2(e,t,r){return {field:e,operator:t,value:r}}function l2(e,t="AND"){return {logic:t,conditions:e}}function us(){return {logic:"AND",conditions:[]}}function dc(e){return !e||e.conditions.length===0?true:e.conditions.every(t=>"conditions"in t?dc(t):false)}function c2(e,t){if(!e)return [];let r=new Map(t?.map(i=>[i.field,i])),o=new Map;function n(i){if("conditions"in i)i.conditions.forEach(s=>n(s));else {let s=o.get(i.field)||[];s.push(i),o.set(i.field,s);}}e.conditions.forEach(i=>n(i));let a=[];for(let[i,s]of o.entries()){let d=r.get(i),c=d?.label||i,l=[],u=[],m=[];for(let p of s)p.operator==="in"&&Array.isArray(p.value)?l.push(...p.value):p.operator==="eq"?p.value!==void 0&&typeof p.value!="boolean"&&!Array.isArray(p.value)?l.push(p.value):m.push(p):["gte","gt","lte","lt"].includes(p.operator)&&p.value!==void 0?u.push({operator:p.operator,value:typeof p.value=="boolean"||Array.isArray(p.value)?String(p.value):p.value}):m.push(p);if(l.length>0){let g=Array.from(new Set(l)).map(f=>d?.values?.find(h=>String(h.value)===String(f))?.label??f);a.push({id:`${i}-in`,label:c,value:g.join(", ")});}if(u.length>0){let p=u.find(f=>f.operator==="gte"||f.operator==="gt"),g=u.find(f=>f.operator==="lte"||f.operator==="lt");if(p&&g){let f=p.operator==="gte"?"\u2265":">",x=g.operator==="lte"?"\u2264":"<";a.push({id:`${i}-range`,label:c,value:`${f} ${p.value} and ${x} ${g.value}`});}else for(let f of u){let x;f.operator==="gte"?x="\u2265":f.operator==="gt"?x=">":f.operator==="lte"?x="\u2264":x="<",a.push({id:`${i}-${f.operator}`,label:c,value:`${x} ${f.value}`});}}for(let p of m){let g;p.operator==="neq"?g=`\u2260 ${p.value}`:p.operator==="contains"?g=`contains "${p.value}"`:p.operator==="startsWith"?g=`starts with "${p.value}"`:p.operator==="endsWith"?g=`ends with "${p.value}"`:Hx(p.operator)?g=Gx[p.operator]:g=String(p.value),a.push({id:`${i}-${p.operator}`,label:c,value:g});}}return a}function Dn(e,t){let r=e||us();return {...r,conditions:[...r.conditions,t]}}function ma(e,t){if(!e)return us();let r=e.conditions.filter(o=>"conditions"in o?ma(o,t).conditions.length>0:o.field!==t);return {...e,conditions:r}}function fa(e){if(!e)return [];let t=new Set;function r(o){"conditions"in o?o.conditions.forEach(r):t.add(o.field);}return e.conditions.forEach(r),Array.from(t)}function Ux({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,showCalendar:d=true,reserveErrorSpace:c=true,validationResult:l,className:u,...m}){let[p,g]=Ze.useState(false),f=x=>{m.onChange&&x&&m.onChange(x),g(false);};return jsxRuntime.jsxs(reactAriaComponents.DateField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Ie(u,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsxs("div",{className:"relative w-full",children:[jsxRuntime.jsx(ps,{size:o,isDisabled:i,isInvalid:s,hasCalendar:d}),d&&!i&&jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[jsxRuntime.jsx(re,{variant:"unstyled",className:"absolute right-2 top-1/2 -translate-y-1/2 flex h-8 w-8 items-center justify-center rounded hover:bg-background-hover text-text-secondary hover:text-text-primary transition-colors","aria-label":"Open calendar",children:jsxRuntime.jsx(H,{name:"Calendar",size:18})}),jsxRuntime.jsx(reactAriaComponents.Popover,{className:"bg-background-surface rounded-lg border border-border-default shadow-xl",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"p-4 outline-none",children:jsxRuntime.jsx(ti,{value:m.value,onChange:f,minValue:m.minValue,maxValue:m.maxValue,isDisabled:i,isReadOnly:m.isReadOnly,isDateUnavailable:m.isDateUnavailable})})})]})]})}),c?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(xe,{size:o,children:r(l)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(l)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})}function h2({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.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 ps({size:e="md",isDisabled:t,isInvalid:r,hasCalendar:o,className:n,...a}){return jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(xn({isInvalid:r,isDisabled:t}),"px-3 py-2 flex items-center gap-0.5 w-full",o&&"pr-10",n),...a,children:i=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:i,className:h2({isPlaceholder:i.isPlaceholder,isDisabled:!i.isEditable||t,size:e})})})}function uc({label:e,description:t,errorMessage:r,...o}){return jsxRuntime.jsxs(reactAriaComponents.DateRangePicker,{...o,className:Ie(o.className,"group flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{children:e}),jsxRuntime.jsxs(ub,{className:"w-auto min-w-[208px]",children:[jsxRuntime.jsx(ps,{slot:"start",className:"px-2 py-1.5 text-sm"}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:"text-text-primary group-disabled:text-text-disabled forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]",children:"\u2013"}),jsxRuntime.jsx(ps,{slot:"end",className:"flex-1 px-2 py-1.5 text-sm"}),jsxRuntime.jsx(re,{variant:"icon",className:"mr-1 w-6 rounded outline-offset-0",children:jsxRuntime.jsx(lucideReact.CalendarIcon,{"aria-hidden":true,className:"h-4 w-4"})})]}),t&&jsxRuntime.jsx(Pe,{children:t}),typeof r=="string"?jsxRuntime.jsx(xe,{children:r}):null,jsxRuntime.jsx(St,{children:jsxRuntime.jsx(pi,{})})]})}var k2=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size});return tailwindMerge.twMerge(t,"pr-9","[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",e.className)};function ms({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,transparent:i,validationResult:s,reserveErrorSpace:d=true,descriptionPlacement:c="below",...l}){let u=Ze.useId(),{isFocused:m,handleFocus:p,handleBlur:g}=vr();return jsxRuntime.jsx(reactAriaComponents.NumberField,{...l,id:u,isRequired:a,className:Ie(l.className,"group flex flex-col gap-1"),step:l.step??1,onChange:f=>{typeof f=="number"&&(l.maxValue!=null&&f>l.maxValue?l.onChange?.(l.maxValue):l.minValue!=null&&f<l.minValue?l.onChange?.(l.minValue):l.onChange?.(f));},isInvalid:!!r||typeof l.value=="number"&&(l.maxValue!=null&&l.value>l.maxValue||l.minValue!=null&&l.value<l.minValue),children:({isDisabled:f,isInvalid:x})=>jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:c==="tooltip"||c==="inline"?t:void 0,descriptionPlacement:c,isRequired:a,htmlFor:u,children:e}),jsxRuntime.jsx("div",{className:"relative",children:jsxRuntime.jsxs(reactAriaComponents.Group,{className:"relative",children:[jsxRuntime.jsx(reactAriaComponents.Input,{onFocus:y=>p(y,l.onFocus),onBlur:y=>g(y,l.onBlur),className:k2({isInvalid:x||!!r,isDisabled:f,isFocused:m,transparent:i,size:o,className:typeof l.className=="string"?l.className:void 0})}),jsxRuntime.jsxs("div",{className:"absolute inset-y-[2px] right-[2px] flex flex-col divide-y divide-border-default border-l border-border-default overflow-hidden rounded-r-[calc(var(--control-border-radius)-2px)]",children:[jsxRuntime.jsx(reactAriaComponents.Button,{slot:"increment",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(H,{name:"CaretUp",size:14})}),jsxRuntime.jsx(reactAriaComponents.Button,{slot:"decrement",isDisabled:f,className:"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50",children:jsxRuntime.jsx(H,{name:"CaretDown",size:14})})]})]})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:r?jsxRuntime.jsx(xe,{size:o,children:typeof r=="function"?r(s):r}):t&&c==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:r?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:typeof r=="function"?r(s):r}):t&&c==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}var tm={sm:{track:"h-4 w-7",handle:"h-3.5 w-3.5",text:"text-xs"},md:{track:"h-5 w-9",handle:"h-4 w-4",text:"text-sm"},lg:{track:"h-6 w-11",handle:"h-5 w-5",text:"text-base"},xl:{track:"h-7 w-14",handle:"h-6 w-6",text:"text-lg"}};function E2({isSelected:e,isDisabled:t,size:r="md"}){let o="flex px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent",n=tm[r].track,a=ot,i="focus-visible:outline-action-primary",s="";return e?s="bg-action-primary forced-colors:!bg-[Highlight] group-pressed:bg-action-primary-hover":s="bg-border-input group-pressed:bg-border-focus",[o,n,a,i,s,t?"bg-background-muted forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]":""].filter(Boolean).join(" ")}function M2({isSelected:e,isDisabled:t,size:r="md"}){let o="transform rounded-full bg-background-surface outline-none shadow transition duration-200 ease-in-out",n=tm[r].handle;return [o,n,e?"translate-x-[100%]":"translate-x-0",t?"forced-colors:outline-[GrayText]":""].filter(Boolean).join(" ")}function pc({children:e,variant:t="primary",size:r="md",...o}){return jsxRuntime.jsx(reactAriaComponents.Switch,{...o,className:Ie(o.className,`relative group flex items-center gap-2 ${tm[r].text} text-text-primary transition disabled:text-text-disabled forced-colors:disabled:text-[GrayText]`),children:n=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:E2({...n,size:r}),children:jsxRuntime.jsx("span",{className:M2({...n,size:r})})}),e]})})}function Jx(e){return new Intl.NumberFormat("en-US").format(e)}function Xx({isOpen:e,onClose:t,facetConfigs:r,facetCounts:o={},currentFilters:n,onApply:a,onClear:i,title:s="Filters",resultCount:d}){let[c,l]=Ze.useState(n),[u,m]=Ze.useState({}),[p,g]=Ze.useState({}),[f,x]=Ze.useState(null),{isMobile:h}=gr(),y=Ze.useMemo(()=>r.some(b=>b.group),[r]),{groups:v,ungroupedFacets:C,facetsByGroup:w}=Ze.useMemo(()=>{let b=new Set,M=[],D={};for(let q of r)q.group?(b.has(q.group)||(b.add(q.group),D[q.group]=[]),D[q.group].push(q)):M.push(q);return {groups:Array.from(b),ungroupedFacets:M,facetsByGroup:D}},[r]);Ze.useEffect(()=>{e&&(l(n),m({}),g({}),x(!h&&v.length>0?v[0]:null));},[e,n,v,h]);let S=Ze.useMemo(()=>!c||dc(c)?0:fa(c).length,[c]),N=()=>{a(c),t();},k=()=>{let b=us();l(b),i?i():a(b),t();},T=b=>{if(!c)return [];if(!fa(c).includes(b))return [];let D=[];function q(ae){if(ae)for(let _ of ae.conditions)"conditions"in _?q(_):_.field===b&&_.operator==="in"&&Array.isArray(_.value)&&D.push(..._.value.map(String));}return q(c),D},E=(b,M,D)=>{let q=ma(c,b);M!==void 0&&(q=Dn(q,{field:b,operator:"gte",value:M})),D!==void 0&&(q=Dn(q,{field:b,operator:"lte",value:D})),l(q);},A=b=>{if(!c)return;let M;function D(q){if(q)for(let ae of q.conditions)"conditions"in ae?D(ae):ae.field===b&&ae.operator==="eq"&&typeof ae.value=="boolean"&&(M=ae.value);}return D(c),M},P=(b,M)=>{let D=ma(c,b);M!==void 0&&(D=Dn(D,{field:b,operator:"eq",value:M})),l(D);},I=(b,M,D)=>{let q=ma(c,b);M&&(q=Dn(q,{field:b,operator:"gte",value:M.toString()})),D&&(q=Dn(q,{field:b,operator:"lte",value:D.toString()})),l(q);},R=b=>{let M=w[b]||[],D=c?fa(c):[];return M.filter(q=>D.includes(q.field)).length},O="pr-9 bg-background-muted/50",W="border-t border-border-muted",z="text-sm font-medium text-text-link-default",F=b=>jsxRuntime.jsx("span",{className:z,children:b}),Y=b=>{let M=o[b.field]||{},D=u[b.field]||"",q=[];b.values?q=b.values.map(ee=>({value:String(ee.value),label:ee.label,count:M[String(ee.value)]})):q=Object.entries(M).map(([ee,ie])=>({value:ee,label:ee,count:ie}));let ae=q.length;if(D){let ee=D.toLowerCase();q=q.filter(ie=>ie.label.toLowerCase().includes(ee));}q.sort((ee,ie)=>ee.count!==void 0&&ie.count!==void 0&&ie.count!==ee.count?ie.count-ee.count:ee.label.localeCompare(ie.label));let _=b.type||"string";if(_==="string"||!b.type){let ee=T(b.field),ie=b.searchThreshold??10,Me=b.maxVisibleOptions??50,le=p[b.field]??false,ge=le||q.length<=Me?q:q.slice(0,Me),ce=q.length>Me&&!le;return jsxRuntime.jsxs(wn,{id:b.field,children:[jsxRuntime.jsx(Nn,{title:b.label,description:b.description,className:O,endContent:ee.length>0?F(`${ee.length} selected`):void 0}),jsxRuntime.jsx(Tn,{className:W,children:jsxRuntime.jsxs("div",{className:"space-y-4 pt-4 pb-4",children:[ae>ie&&jsxRuntime.jsx(pa,{value:D,onChange:pe=>m(Te=>({...Te,[b.field]:pe})),onClear:()=>m(pe=>({...pe,[b.field]:""})),placeholder:`Search ${b.label.toLowerCase()}...`,size:"sm",className:"w-full !max-w-none pr-4"}),jsxRuntime.jsx(ip,{value:ee,onChange:pe=>{let Te=ma(c,b.field);pe.length>0&&(Te=Dn(Te,{field:b.field,operator:"in",value:pe})),l(Te);},children:jsxRuntime.jsx("div",{className:"space-y-1.5",children:ge.map(pe=>jsxRuntime.jsx("div",{className:"rounded-md py-2 pr-4 transition-colors hover:bg-background-hover",children:jsxRuntime.jsx(io,{value:pe.value,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-3 flex-1",children:[b.renderLabel?b.renderLabel(pe.value,pe.label):jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:pe.label}),pe.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs font-medium text-text-secondary tabular-nums",children:Jx(pe.count)})]})})},pe.value))})}),ce&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",onPress:()=>g(pe=>({...pe,[b.field]:true})),className:"w-full",children:["Show all ",q.length," options"]})}),le&&q.length>Me&&jsxRuntime.jsx("div",{className:"pt-2 border-t border-border-muted",children:jsxRuntime.jsx(re,{variant:"ghost",size:"sm",onPress:()=>g(pe=>({...pe,[b.field]:false})),className:"w-full",children:"Show less"})})]})})]},b.field)}if(_==="number"){let ee,ie,Me=ge=>{if(ge)for(let ce of ge.conditions)"conditions"in ce?Me(ce):ce.field===b.field&&(ce.operator==="gte"&&typeof ce.value=="number"&&(ee=ce.value),ce.operator==="lte"&&typeof ce.value=="number"&&(ie=ce.value));};Me(c);let le=ee!==void 0||ie!==void 0;return jsxRuntime.jsxs(wn,{id:b.field,children:[jsxRuntime.jsx(Nn,{title:b.label,description:b.description,className:O,endContent:le?F(ee!==void 0&&ie!==void 0?`${ee} - ${ie}`:ee!==void 0?`\u2265 ${ee}`:`\u2264 ${ie}`):void 0}),jsxRuntime.jsx(Tn,{className:W,children:jsxRuntime.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-4 pb-4",children:[jsxRuntime.jsx(ms,{label:"Min",value:ee,onChange:ge=>E(b.field,ge,ie)},`${b.field}-min`),jsxRuntime.jsx(ms,{label:"Max",value:ie,onChange:ge=>E(b.field,ee,ge)},`${b.field}-max`)]})})]},b.field)}if(_==="boolean"){let ee=A(b.field);return jsxRuntime.jsxs(wn,{id:b.field,children:[jsxRuntime.jsx(Nn,{title:b.label,description:b.description,className:O,endContent:ee!==void 0?F(ee?"Yes":"No"):void 0}),jsxRuntime.jsx(Tn,{className:W,children:jsxRuntime.jsxs("div",{className:"flex items-center justify-between pt-4 pb-4",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:ee!==void 0?ee?"Enabled":"Disabled":"No filter applied"}),jsxRuntime.jsx(pc,{size:"lg",isSelected:ee??false,onChange:ie=>P(b.field,ie?true:void 0),children:ee?"Yes":"No"})]})})]},b.field)}if(_==="date"){let ee,ie,Me=Te=>{if(Te)for(let et of Te.conditions)"conditions"in et?Me(et):et.field===b.field&&(et.operator==="gte"&&(ee=String(et.value)),et.operator==="lte"&&(ie=String(et.value)));};Me(c);let le=ee!==void 0||ie!==void 0,ge=Te=>{if(Te)try{return /^\d{4}-\d{2}-\d{2}$/.test(Te)?date.parseDate(Te):void 0}catch{return}},ce=ge(ee),pe=ge(ie);return jsxRuntime.jsxs(wn,{id:b.field,children:[jsxRuntime.jsx(Nn,{title:b.label,description:b.description,className:O,endContent:le?F("Date range selected"):void 0}),jsxRuntime.jsx(Tn,{className:W,children:jsxRuntime.jsx("div",{className:"pt-4 pb-4",children:jsxRuntime.jsx(uc,{label:"Date Range",value:ce&&pe?{start:ce,end:pe}:void 0,onChange:Te=>{Te?I(b.field,Te.start,Te.end):I(b.field,void 0,void 0);}})})})]},b.field)}return null},U=()=>jsxRuntime.jsxs("div",{className:"flex flex-col",children:[C.map(b=>{let D=(c?fa(c):[]).includes(b.field);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(`__ungrouped__${b.field}`),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:b.label}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[D&&jsxRuntime.jsx("span",{className:z,children:"1 active"}),jsxRuntime.jsx(H,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},b.field)}),v.map(b=>{let M=R(b);return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(b),className:"flex items-center justify-between px-6 py-3 text-left hover:bg-background-hover border-b border-border-muted transition-colors",children:[jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:b}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[M>0&&jsxRuntime.jsxs("span",{className:z,children:[M," active"]}),jsxRuntime.jsx(H,{name:"CaretRight",size:"sm",className:"text-text-secondary"})]})]},b)})]}),V=b=>{if(b.startsWith("__ungrouped__")){let D=b.replace("__ungrouped__",""),q=C.find(ae=>ae.field===D);return q?jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[q.field],children:Y(q)}):null}let M=w[b]||[];return M.length===0?null:jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[M[0].field],children:M.map(D=>Y(D))})},J=()=>{if(f){let b=f.startsWith("__ungrouped__")&&C.find(M=>M.field===f.replace("__ungrouped__",""))?.label||f;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(null),className:"flex items-center gap-2 px-4 py-3 border-b border-border-muted hover:bg-background-hover transition-colors",children:[jsxRuntime.jsx(H,{name:"CaretLeft",size:"sm",className:"text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm font-medium text-text-primary",children:b})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:V(f)})]})}return U()},G=()=>jsxRuntime.jsxs("div",{className:"flex h-full",children:[jsxRuntime.jsxs("div",{className:"w-48 flex-shrink-0 border-r border-border-muted overflow-y-auto bg-background-muted/30",children:[C.map(b=>{let D=(c?fa(c):[]).includes(b.field),q=f===`__ungrouped__${b.field}`;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(`__ungrouped__${b.field}`),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${q?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${q?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:b.label}),D&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},b.field)}),v.map(b=>{let M=R(b),D=f===b;return jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(b),className:`flex items-center justify-between w-full px-4 py-3 text-left border-b border-border-muted transition-colors ${D?"bg-background-selected":"hover:bg-background-hover"}`,children:[jsxRuntime.jsx("span",{className:`text-sm truncate ${D?"font-semibold text-text-primary":"font-medium text-text-primary"}`,children:b}),M>0&&jsxRuntime.jsx("span",{className:"w-2 h-2 rounded-full bg-action-primary flex-shrink-0 ml-2"})]},b)})]}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto",children:f?V(f):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-full text-text-secondary text-sm",children:"Select a category to view filters"})})]}),B=()=>jsxRuntime.jsx(ri,{variant:"contained",density:"comfortable",showDividers:true,defaultExpandedKeys:[r[0].field],children:r.map(b=>Y(b))});return jsxRuntime.jsx(yr,{isOpen:e,onClose:t,title:y&&h&&f?f.startsWith("__ungrouped__")?C.find(b=>b.field===f.replace("__ungrouped__",""))?.label||s:f:S>0?`${s} (${S} active)`:s,hideCloseIcon:false,primaryAction:{label:"Apply filters",onPress:N,variant:"primary"},secondaryAction:{label:"Clear all",onPress:k},maxWidth:y?"800px":"700px",height:"600px",mobileHeight:"85vh",contentPadding:false,footerContent:d!==void 0?jsxRuntime.jsxs("div",{className:"text-sm text-text-secondary text-center",children:[jsxRuntime.jsx("span",{className:"font-semibold text-text-primary",children:Jx(d)})," ",d===1?"result":"results"," with current filters"]}):void 0,children:r.length===0?jsxRuntime.jsx("div",{className:"py-12 text-center",children:jsxRuntime.jsx("div",{className:"text-sm font-medium text-text-secondary",children:"No filters available"})}):y?h?J():G():B()})}function om(e="left"){switch(e){case "center":return "justify-center text-center";case "right":return "justify-end text-right";default:return "justify-start text-left"}}function Rr(e="normal",t){return tailwindMerge.twMerge({strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[e],t&&"hover:text-action-primary cursor-pointer transition-colors")}function Se(e="left",t){return tailwindMerge.twMerge("flex items-center gap-1 min-w-0 overflow-hidden",om(e),t)}function gc(e,t="\u2014"){return e==null||e===""?t:String(e)}var An={xs:"h-4 w-12",sm:"h-4 w-20",md:"h-4 w-24",lg:"h-4 w-32",xl:"h-4 w-40"};function Pt(e="normal"){return {strong:An.lg,high:An.lg,normal:An.md,low:An.sm}[e]}function me(e,...t){return typeof e=="function"?e(...t):e}function qx(e="neutral",t="sm"){return tailwindMerge.twMerge("inline-flex items-center rounded-full font-medium",t==="sm"?"px-2 py-0.5 text-xs":"px-2.5 py-1 text-sm",{success:"bg-feedback-success-background text-feedback-success-text",error:"bg-feedback-error-background text-feedback-error-text",warning:"bg-feedback-warning-background text-feedback-warning-text",info:"bg-feedback-info-background text-feedback-info-text",neutral:"bg-background-muted text-text-secondary"}[e])}function jx(e){return e?"success":"neutral"}function bc(e,t=false){return t?e>0?"text-feedback-success-text":e<0?"text-feedback-error-text":"text-text-primary":"text-text-primary"}function nm(e="hover",t="secondary"){let r={primary:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",secondary:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",default:"text-text-link-default hover:text-text-link-hover visited:text-text-link-default",brand:"text-action-primary hover:text-action-primary-hover visited:text-action-primary",muted:"text-text-secondary hover:text-text-secondary visited:text-text-secondary",unstyled:""},o={visible:"underline underline-offset-4 decoration-1 cursor-pointer",hover:"hover:underline hover:underline-offset-4 hover:decoration-1 cursor-pointer transition-colors",none:"cursor-pointer"},n=r[t],a=o[e]||"";return `${n} ${a}`.trim()}function Do(e,t,r,o="hover",n="secondary",a,i){if(!t)return e;let s=typeof t=="function"&&r?t(r):t,d=nm(o,n);return jsxRuntime.jsx("a",{href:s,className:tailwindMerge.twMerge(d,a==="strong"||a==="high"?"font-semibold":"",i),onClick:l=>{l.metaKey||l.ctrlKey;},children:e})}function Qx({row:e,context:t,actions:r,align:o="right",size:n="sm"}){let{isLoading:a}=t;if(a)return jsxRuntime.jsx(j,{className:An.sm});let s=(typeof r=="function"?r(e):r).filter(c=>!me(c.hidden,e));if(s.length===0)return null;let d=Se(o);return jsxRuntime.jsx("div",{className:d,children:s.map(c=>{let l=me(c.disabled,e);return c.variant==="icon"||!c.label?jsxRuntime.jsx(re,{variant:"icon",size:n,onPress:()=>{c.onClick(e);},isDisabled:l,"aria-label":c.label||c.id,children:jsxRuntime.jsx(H,{name:c.icon||"DotsThree",size:n==="sm"?16:20})},c.id):jsxRuntime.jsxs(re,{variant:c.variant||"secondary",size:n,onPress:()=>{c.onClick(e);},isDisabled:l,children:[c.icon&&jsxRuntime.jsx(H,{name:c.icon,size:n==="sm"?14:16}),c.label]},c.id)})})}function _x({value:e,row:t,context:r,variant:o="default",label:n,size:a="sm",shape:i="square",dot:s,dotPosition:d="left",dotPulse:c,align:l="left",emptyText:u="\u2014",className:m,maxVisible:p=2,maxLabelLength:g}){let{isLoading:f}=r,x=(S,N)=>{if(!g||S.length<=g)return jsxRuntime.jsx(jsxRuntime.Fragment,{children:S});let k=S.slice(0,g-1)+"\u2026";return jsxRuntime.jsx(tr,{content:N,children:jsxRuntime.jsx("span",{children:k})})};if(f)return jsxRuntime.jsx(j,{className:Pt("normal")});if(e==null||e==="")return jsxRuntime.jsx("div",{className:Se(l,"text-text-secondary"),children:u});if(Array.isArray(e)&&e.length===0)return jsxRuntime.jsx("div",{className:Se(l,"text-text-secondary"),children:u});let h=Se(l,m);if(Array.isArray(e)){let S=e.slice(0,p),N=e.slice(p),k=N.length>0;return jsxRuntime.jsx("div",{className:h,children:jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[S.map((T,E)=>{let A=me(o,T,t),P=n!==void 0?me(n,T,t):String(T),I=me(s,T,t),R=me(c,T,t);return jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsx(gt,{variant:A,size:a,shape:i,dot:I,dotPosition:d,dotPulse:R,children:x(P,P)})},E)}),k&&jsxRuntime.jsx(tr,{content:N.join(", "),children:jsxRuntime.jsx("span",{className:"flex-shrink-0 whitespace-nowrap",children:jsxRuntime.jsxs(gt,{variant:"neutral",size:a,shape:i,children:["+",N.length]})})})]})})}let y=me(o,e,t),v=n!==void 0?me(n,e,t):String(e),C=me(s,e,t),w=me(c,e,t);return jsxRuntime.jsx("div",{className:h,children:jsxRuntime.jsx(gt,{variant:y,size:a,shape:i,dot:C,dotPosition:d,dotPulse:w,children:x(v,v)})})}function $x({value:e,context:t,format:r="icon",trueText:o="Yes",falseText:n="No",trueIcon:a="Check",falseIcon:i="X",showFalse:s=true,align:d="center",emphasis:c="normal",className:l}){let{isLoading:u}=t;if(u)return jsxRuntime.jsx(j,{className:Pt(c)});let m=!!e;if(!m&&!s)return jsxRuntime.jsx("div",{className:Se(d,l)});let p=Se(d,l);switch(r){case "icon":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(H,{name:m?a:i,size:16,className:m?"text-feedback-success-text":"text-text-disabled"})});case "text":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx("span",{className:Rr(c),children:m?o:n})});case "badge":return jsxRuntime.jsx("div",{className:p,children:jsxRuntime.jsx(gt,{variant:m?"success":"neutral",size:"sm",children:m?o:n})});default:return null}}var hc="var(--color-text-subtle)",ey=_s().map((e,t)=>`var(--color-viz-categorical-${t+1})`);function ry({value:e,row:t,context:r,color:o,swatch:n="dot",emptyText:a="\u2014",align:i="left",className:s}){let{isLoading:d}=r;if(d)return jsxRuntime.jsx(j,{className:Pt("normal")});let c=me(e,t),l=c==null?"":String(c);return l.length===0?jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a}):jsxRuntime.jsxs("div",{className:Se(i,tailwindMerge.twMerge("gap-2",s)),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:tailwindMerge.twMerge("h-2 w-2 flex-shrink-0",n==="dot"?"rounded-full":"rounded-sm"),style:{backgroundColor:o??hc}}),jsxRuntime.jsx("span",{className:"truncate",children:l})]})}function ny({row:e,context:t,firstName:r,lastName:o,email:n,avatarUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",showEmail:u=false,badge:m,emphasis:p="normal",align:g="left",className:f,piiEntity:x}){let{isLoading:h}=t,y=me(r,e),v=me(o,e),C=me(n,e),w=me(a,e),S=me(d,e),N=me(m,e),k=me(x,e),T=Se(g,f);return jsxRuntime.jsx("div",{className:T,children:jsxRuntime.jsx(Il,{firstName:y,lastName:v,email:C,avatarUrl:w,layout:i,size:s,href:S,LinkComponent:c,linkVariant:l,showEmail:u,badge:N,emphasis:p,isLoading:h,piiEntity:k})})}function ay({value:e,row:t,context:r,render:o,className:n}){let a=o(e,t,r);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("h-full w-full",n),children:a})}function iy({value:e,row:t,context:r,format:o="date",customFormat:n,emptyText:a="\u2014",align:i="left",emphasis:s="normal",href:d,linkBehavior:c="hover",className:l}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(j,{className:Pt(s)});if(!e)return jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a});let m=e instanceof Date?e:new Date(e);if(isNaN(m.getTime()))return jsxRuntime.jsx("div",{className:Se(i,"text-text-secondary"),children:a});let p;switch(o){case "date":p=m.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});break;case "time":p=m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"});break;case "datetime":p=m.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});break;case "relative":p=W2(m);break;case "custom":p=n?m.toLocaleString("en-US",n):m.toISOString();break;default:p=m.toLocaleDateString();}let g=Se(i,tailwindMerge.twMerge(Rr(s),l)),f=me(d,t);return f?jsxRuntime.jsx("div",{className:g,children:Do(p,f,t,c)}):jsxRuntime.jsx("div",{className:g,children:p})}function W2(e){let r=new Date().getTime()-e.getTime(),o=Math.floor(r/1e3),n=Math.floor(o/60),a=Math.floor(n/60),i=Math.floor(a/24);return o<60?"just now":n<60?`${n} minute${n!==1?"s":""} ago`:a<24?`${a} hour${a!==1?"s":""} ago`:i<7?`${i} day${i!==1?"s":""} ago`:e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}var K2={up:"ArrowUp",down:"ArrowDown",flat:"Minus"},Y2={positive:"text-feedback-success-text",negative:"text-feedback-error-text",neutral:"text-text-secondary"};function am(e){return e>0?"up":e<0?"down":"flat"}function J2(e,t,r){switch(e){case "percent":return {type:"percentage",decimals:t};case "currency":return {type:"currency",currency:r,minimumFractionDigits:t,maximumFractionDigits:t};case "compact":return {type:"number",notation:"compact",decimals:t,thousandsSeparator:true};default:return {type:"number",decimals:t,thousandsSeparator:true}}}function sy({value:e,row:t,context:r,direction:o,tone:n="neutral",format:a="number",decimals:i=0,currency:s="USD",showIcon:d=true,align:c="right",emphasis:l="normal",emptyText:u="\u2014",className:m}){let{isLoading:p}=r;if(p)return jsxRuntime.jsx(j,{className:Pt(l)});let g=typeof e=="number"?e:Number(e);if(e==null||e===""||!Number.isFinite(g))return jsxRuntime.jsx("div",{className:Se(c,"text-text-secondary"),children:u});let f=me(o,t)??am(g),x=me(n,t)??"neutral",h=Ar(g,J2(a,i,s))??u,y=g>0?"+":"",C=Se(c,tailwindMerge.twMerge(l==="strong"||l==="high"?"font-semibold":void 0,m,Y2[x]));return jsxRuntime.jsxs("div",{className:C,children:[d&&jsxRuntime.jsx(H,{name:K2[f],size:"xs","aria-hidden":true}),jsxRuntime.jsx("span",{children:`${y}${h}`})]})}function vc({manufacturer:e,model:t,deviceType:r,deviceTypeIconName:o,logoUrl:n,layout:a="stacked",size:i="md",href:s,LinkComponent:d,linkVariant:c="unstyled",showDeviceTypeIcon:l=true,showLogo:u=true,emphasis:m="normal",isLoading:p=false,className:g,piiEntity:f}){let[x,h]=Ze.useState(false),y=o||(r?j2(r):"DeviceMobile"),C={xs:{iconSize:28,logoSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",iconInTextSize:12,skeletonIcon:28,skeletonText:80,skeletonSecondary:60},sm:{iconSize:32,logoSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",iconInTextSize:14,skeletonIcon:32,skeletonText:96,skeletonSecondary:72},md:{iconSize:32,logoSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",iconInTextSize:16,skeletonIcon:36,skeletonText:128,skeletonSecondary:96},lg:{iconSize:40,logoSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",iconInTextSize:18,skeletonIcon:40,skeletonText:160,skeletonSecondary:120}}[i],w=n&&!x&&u,N={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[m],k=({children:T,className:E})=>s?d?jsxRuntime.jsx(d,{href:s,className:E,children:T}):jsxRuntime.jsx(pt,{href:s,variant:c,className:tailwindMerge.twMerge("hover:underline",E),asButton:false,children:T}):jsxRuntime.jsx("span",{className:E,children:T});if(p)return a==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(j,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(j,{width:C.skeletonText,height:C.skeletonIcon*.6})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx(j,{width:C.skeletonIcon,height:C.skeletonIcon,className:"flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(j,{width:C.skeletonText,height:16}),jsxRuntime.jsx(j,{width:C.skeletonSecondary,height:12})]})]});if(a==="inline"){let T=`${e} ${t}`;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",C.gap,g),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:w?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>h(true)}):jsxRuntime.jsx(H,{name:y,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsx(k,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",N,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:T})})]})}return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",C.gap,g),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",C.logoSize),children:w?jsxRuntime.jsx("img",{src:n,alt:`${e} logo`,className:"w-full h-full object-contain",onError:()=>h(true)}):jsxRuntime.jsx(H,{name:y,size:C.iconSize*.6,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(k,{className:tailwindMerge.twMerge("truncate leading-normal hover:text-text-primary",N,C.textSize,s&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:e})}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1.5 text-text-secondary leading-normal",C.secondaryTextSize),children:[l&&jsxRuntime.jsx(H,{name:y,size:C.iconInTextSize,className:"flex-shrink-0"}),jsxRuntime.jsx("span",{className:"truncate","data-pii-type":f?"device-name":void 0,"data-pii-entity":f,children:t})]})]})]})}function j2(e){switch(e){case "battery":return "BatteryHigh";case "charger":return "ChargingStation";case "inverter":return "Power";case "thermostat":return "ThermometerSimple";case "vehicle":return "CarSimple";case "water_heater":return "DropHalfBottom";case "meter":return "Gauge";default:return "DeviceMobile"}}function cy({row:e,context:t,manufacturer:r,model:o,deviceType:n,logoUrl:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",showDeviceTypeIcon:u=true,showLogo:m=true,emphasis:p="normal",align:g="left",className:f,piiEntity:x}){let{isLoading:h}=t,y=me(r,e),v=me(o,e),C=me(n,e),w=me(a,e),S=me(d,e),N=me(x,e),k=Se(g,f);return jsxRuntime.jsx("div",{className:k,children:jsxRuntime.jsx(vc,{manufacturer:y,model:v,deviceType:C,logoUrl:w,layout:i,size:s,href:S,LinkComponent:c,linkVariant:l,showDeviceTypeIcon:u,showLogo:m,emphasis:p,isLoading:h,piiEntity:N})})}var jX={charging:"percentage",discharging:"percentage",on:"kW",idle:void 0,off:void 0,heat:"temperature",cool:"temperature",auto:"temperature",eco:"temperature",circulate:void 0,unknown:void 0,connected:void 0,disconnected:void 0},Q2=["charging","discharging","heat","cool","on","circulate","connected"],Z2={unknown:"Unknown",on:"On",off:"Off",idle:"Idle",charging:"Charging",discharging:"Discharging",heat:"Heating",eco:"Eco Mode",cool:"Cooling",auto:"Auto",circulate:"Circulating",connected:"Connected",disconnected:"Disconnected"};function im(e){return Q2.includes(e)}function sm(e){return Z2[e]}function ba({state:e,label:t,icon:r,isLoading:o,size:n="sm",shape:a="pill",dot:i,dotPulse:s,fixedWidth:d,className:c,...l}){if(o)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-20"});let u=t??sm(e),m=im(e);return jsxRuntime.jsxs(gt,{variant:e,size:n,shape:a,dot:i??m,dotPulse:s??m,className:d?`w-28 justify-center ${c||""}`:c,...l,children:[r&&jsxRuntime.jsx(H,{name:r,size:n==="sm"?12:n==="md"?14:16}),u]})}var $2={importing:"Importing",exporting:"Exporting",idle:"Idle",unknown:"Unknown"};function uy(e){return $2[e]}var eE={importing:"ArrowDown",exporting:"ArrowUp"};function Sc({state:e,label:t,showIcon:r=false,isLoading:o,size:n="sm",shape:a="pill",fixedWidth:i,className:s,...d}){if(o)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-24"});let c=t??uy(e),l=eE[e],u=n==="sm"?12:n==="md"?14:16;return r&&l?jsxRuntime.jsx(gt,{variant:e,size:n,shape:a,className:`w-6 justify-center ${s||""}`,...d,children:jsxRuntime.jsx(H,{name:l,size:u})}):jsxRuntime.jsx(gt,{variant:e,size:n,shape:a,className:i?`w-28 justify-center ${s||""}`:s,...d,children:c})}function wc({state:e,stateLabel:t,metric:r,metricFormatter:o,secondaryState:n,layout:a="horizontal",isLoading:i,size:s="sm",shape:d="pill",icon:c,fixedWidth:l,secondaryStateIconOnly:u=false,className:m}){if(i)return jsxRuntime.jsx(j,{className:tailwindMerge.twMerge("inline-flex h-6 w-32",m)});let p=r!=null&&o?Ar(r,o):null,g=a==="horizontal",f=o&&!p;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",g?"gap-2":"flex-col gap-1",m),children:[(p||f)&&jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("font-medium inline-block",p?"text-text-primary":"text-text-secondary",s==="sm"&&"text-xs min-w-12",s==="md"&&"text-sm min-w-14",s==="lg"&&"text-base min-w-16"),children:p||"\u2014"}),jsxRuntime.jsx(ba,{state:e,label:t,icon:c,size:s,shape:d,fixedWidth:l}),n&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n==="importing"||n==="exporting"?jsxRuntime.jsx(Sc,{state:n,size:s,shape:d,fixedWidth:l,showIcon:u}):jsxRuntime.jsx(ba,{state:n,size:s,shape:d,fixedWidth:l})})]})}function py({value:e,row:t,context:r,metric:o,metricFormatter:n,secondaryState:a,size:i="sm",shape:s="pill",label:d,icon:c,fixedWidth:l=true,align:u="left",compact:m=false,className:p}){let{isLoading:g}=r;if(g){let C={pill:"rounded-full",rounded:"rounded-lg",square:"rounded-sm"}[s],w=o!=null||n!=null;return jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:w?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(j,{className:"h-4 w-12"}),jsxRuntime.jsx(j,{className:`h-6 w-24 ${C}`}),jsxRuntime.jsx(j,{className:`h-6 w-20 ${C}`})]}):jsxRuntime.jsx(j,{className:`h-6 w-24 ${C}`})})}if(!e)return jsxRuntime.jsx("div",{className:Se(u,p),children:jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"})});let f=me(o,t),x=me(a,t),h=typeof d=="function"?d(e,t):d,y=Se(u,p);return f!=null||n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(y),children:jsxRuntime.jsx(wc,{state:e,stateLabel:h,metric:f,metricFormatter:n,secondaryState:x||void 0,size:i,shape:s,icon:c,fixedWidth:l,secondaryStateIconOnly:m,layout:"horizontal"})}):jsxRuntime.jsx("div",{className:y,children:jsxRuntime.jsx(ba,{state:e,label:h,icon:c,size:i,shape:s,fixedWidth:l})})}function fy({value:e,row:t,context:r,formatter:o,align:n="left",emphasis:a="normal",href:i,linkBehavior:s="hover",className:d,emptyText:c="\u2014",emptyClassName:l="text-text-secondary"}){let{isLoading:u}=r;if(u)return jsxRuntime.jsx(j,{className:Pt(a)});let m=yo({value:e,formatter:o,emptyText:c,emptyClassName:l}),p=Rr(a),g=Se(n,tailwindMerge.twMerge(p,d)),f=jsxRuntime.jsx("div",{className:g,children:m}),x=me(i,t);return x?Do(f,x,t,s):f}var cm=Ze__namespace.default.memo(({value:e,min:t,max:r,color:o="var(--color-viz-default)",backgroundColor:n="var(--color-background-muted)",colorScale:a,showLabel:i=true,formatLabel:s,height:d=20,minWidth:c=4,segments:l,segmentGap:u=2,barWidth:m,context:p})=>{let g=Ze.useMemo(()=>r===t?100:Math.max(0,Math.min(100,(e-t)/(r-t)*100)),[e,t,r]),f=Ze.useMemo(()=>o==="auto"&&a?a.type==="diverging"&&a.center!==void 0?Vi(e,t,r,a.center,a.scheme):Bi(e,t,r,a.scheme):o,[o,a,e,t,r]);if(p.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2 w-full",style:{height:d},children:jsxRuntime.jsx("div",{className:"h-full flex-1 animate-pulse bg-border-default rounded"})});if(l&&l>0){let y=`calc((100% - ${u*(l-1)}px) / ${l})`,v=Math.ceil(g/100*l),C={height:d,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`flex gap-0.5 ${m?"":"flex-1"}`,style:C,children:Array.from({length:l}).map((w,S)=>{let N=S<v;return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:y,backgroundColor:N?f:n==="none"?"transparent":n,marginRight:S<l-1?`${u}px`:0}},S)})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})}let x={height:d,backgroundColor:n==="none"?"transparent":n,...m&&{width:typeof m=="number"?`${m}px`:m,flexShrink:0}};return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full",children:[jsxRuntime.jsx("div",{className:`relative rounded-sm ${m?"":"flex-1"}`,style:x,children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm",style:{width:`${g}%`,minWidth:g>0?c:0,backgroundColor:f}})}),i&&jsxRuntime.jsx("span",{className:"text-sm text-text-primary whitespace-nowrap",children:s?s(e):e.toLocaleString()})]})});cm.displayName="HorizontalBarCell";function cE(e){return Math.max(1,String(Math.max(1,Math.trunc(e))).length)}function hy({context:e,startAt:t=1,padTo:r,rowCount:o,align:n="right",className:a}){let{isLoading:i,rowIndex:s}=e;if(i)return jsxRuntime.jsx(j,{className:Pt("normal")});if(typeof s!="number"||!Number.isFinite(s))return jsxRuntime.jsx("div",{className:Se(n,"text-text-muted"),children:"\u2014"});let d=s+t,c=r??(o===void 0?void 0:cE(o+t-1)),l=c===void 0?String(d):String(d).padStart(c,"0");return jsxRuntime.jsx("div",{className:Se(n,tailwindMerge.twMerge("font-mono text-text-muted tabular-nums",a)),children:jsxRuntime.jsx("span",{children:l})})}var dm=Ze__namespace.default.memo(({value:e,data:t,color:r="var(--color-viz-default)",categoryColors:o,context:n,width:a,height:i=40})=>{let s=e||t||[],d=x=>"xValue"in x?x.xValue:x.x,c=x=>"yValue"in x?x.yValue:x.y,l=a||100,u=i,{xScale:m,yScale:p,barWidth:g}=Ze.useMemo(()=>{if(s.length===0)return {xScale:scale.scaleTime({range:[0,l],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]}),barWidth:2};let x=d3Array.extent(s,N=>d(N)),h=d3Array.min(s,N=>c(N))??0,y=d3Array.max(s,N=>c(N))??0,v=h<0?h:0,C=scale.scaleTime({range:[0,l],domain:x}),w=scale.scaleLinear({range:[u,0],domain:[v,y*1.05]}),S=s.length>1?l/s.length*.8:8;return {xScale:C,yScale:w,barWidth:Math.max(2,S)}},[s,l,u]);if(n.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-0.5",style:{width:l,height:u},children:Array.from({length:5}).map((x,h)=>jsxRuntime.jsx("div",{className:"flex-1 animate-pulse bg-border-default rounded"},h))});if(!s||s.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:l,height:u},children:"No data"});let f=p(0);return jsxRuntime.jsx("svg",{width:l,height:u,children:s.map((x,h)=>{let y=c(x),v=m(d(x)),C=p(y),w=Math.abs(f-C),S=x.category&&o?.[x.category]?o[x.category]:r;return jsxRuntime.jsx(shape.Bar,{x:v-g/2,y:y>=0?C:f,width:g,height:w,fill:S,rx:1},`bar-${h}`)})})});dm.displayName="MiniBarCell";function vy({value:e,row:t,context:r,format:o="number",decimals:n=0,prefix:a,suffix:i,emptyText:s="\u2014",align:d="right",emphasis:c="normal",href:l,linkBehavior:u="hover",showPositiveSign:m=false,colorCode:p=false,className:g}){let{isLoading:f}=r;if(f)return jsxRuntime.jsx(j,{className:Pt(c)});if(e==null||isNaN(Number(e)))return jsxRuntime.jsx("div",{className:Se(d,"text-text-secondary"),children:s});let x=Number(e),h;switch(o){case "currency":h=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:n,maximumFractionDigits:n}).format(x);break;case "percent":h=new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:n,maximumFractionDigits:n}).format(x/100);break;case "compact":h=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:n>0?1:0,maximumFractionDigits:n}).format(x);break;default:h=new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(x);}let v=`${m&&x>0?"+":""}${h}`,C=p?bc(x,true):Rr(c),w=Se(d,tailwindMerge.twMerge(C,g)),S=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a}),jsxRuntime.jsx("span",{children:v}),i&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:i})]}),N=me(l,t);return N?jsxRuntime.jsx("div",{className:w,children:Do(S,N,t,u)}):jsxRuntime.jsx("div",{className:w,children:S})}var vE={low:"var(--color-feedback-warning-text)",critical:"var(--color-feedback-error-text)"};function pm(e,t){if(t){if(t.critical!==void 0&&e<=t.critical)return "critical";if(t.low!==void 0&&e<=t.low)return "low"}}var mm=Ze__namespace.default.memo(({value:e,showLabel:t=true,color:r="var(--color-viz-categorical-1)",backgroundColor:o="var(--color-background-muted)",height:n=20,segments:a,segmentGap:i=2,colorScale:s,thresholds:d,context:c})=>{let l=Ze.useMemo(()=>Math.max(0,Math.min(100,e)),[e]),u=Ze.useMemo(()=>pm(l,d),[l,d]),m=Ze.useMemo(()=>u?vE[u]:r==="auto"&&s?s.type==="diverging"&&s.center!==void 0?Vi(e,0,100,s.center,s.scheme):Bi(e,0,100,s.scheme):r,[r,s,u,e]);if(c.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center gap-2",style:{height:n},children:jsxRuntime.jsx("div",{className:"h-full w-full animate-pulse bg-border-default rounded"})});if(a&&a>0){let g=`calc((100% - ${i*(a-1)}px) / ${a})`,f=Math.ceil(l/100*a);return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"flex gap-0.5 flex-1",style:{height:n},children:Array.from({length:a}).map((x,h)=>{let y=h<f,v=m;if(!u&&r==="auto"&&s&&y){let C=(h+1)/a*100;s.type==="diverging"&&s.center!==void 0?v=Vi(C,0,100,s.center,s.scheme):v=Bi(C,0,100,s.scheme);}return jsxRuntime.jsx("div",{className:"rounded-sm",style:{width:g,backgroundColor:y?v:o==="none"?"transparent":o,marginRight:h<a-1?`${i}px`:0}},h)})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[l.toFixed(0),"%"]})]})}return jsxRuntime.jsxs("div",{className:"flex items-center gap-2 w-full","data-threshold":u,children:[jsxRuntime.jsx("div",{className:"relative flex-1 rounded-sm",style:{height:n,backgroundColor:o==="none"?"transparent":o},children:jsxRuntime.jsx("div",{className:"absolute left-0 top-0 h-full rounded-sm transition-all duration-300",style:{width:`${l}%`,backgroundColor:m}})}),t&&jsxRuntime.jsxs("span",{className:"text-sm text-text-primary whitespace-nowrap",children:[l.toFixed(0),"%"]})]})});mm.displayName="PercentBarCell";var SE="\u2013",Cy="\u200A";function Sy(e){if(e==null||e==="")return;let t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?t:void 0}function wy({row:e,context:t,min:r,max:o,decimals:n=0,unit:a,emptyText:i="\u2014",align:s="right",emphasis:d="normal",className:c}){let{isLoading:l}=t;if(l)return jsxRuntime.jsx(j,{className:Pt(d)});let u=Sy(me(r,e)),m=Sy(me(o,e));if(u===void 0&&m===void 0)return jsxRuntime.jsx("div",{className:Se(s,"text-text-secondary"),children:i});let p=x=>new Intl.NumberFormat("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).format(x),g=u!==void 0&&m!==void 0?`${p(u)}${Cy}${SE}${Cy}${p(m)}`:p(u!==void 0?u:m),f=Se(s,tailwindMerge.twMerge("tabular-nums",Rr(d),c));return jsxRuntime.jsxs("div",{className:f,children:[jsxRuntime.jsx("span",{children:g}),a&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:a})]})}function Rc({row:e,context:t,isSelected:r=false,onSelect:o,isDisabled:n=false,align:a="center"}){let{isLoading:i}=t;if(i)return jsxRuntime.jsx("div",{className:Se(a),children:jsxRuntime.jsx(j,{className:"h-4 w-4 rounded"})});let s=me(n,e),d=Se(a);return jsxRuntime.jsx("div",{className:d,children:jsxRuntime.jsx(io,{isSelected:r,onChange:c=>{o?.(e,c);},isDisabled:s,"aria-label":"Select row"})})}function Ec({streetAddress:e,city:t,state:r,postalCode:o,layout:n="stacked",size:a="md",href:i,LinkComponent:s,linkVariant:d="unstyled",emphasis:c="normal",isLoading:l=false,showIcon:u=true,className:m,piiEntity:p}){let f={xs:{iconSize:16,iconContainerSize:"w-7 h-7",gap:"gap-1.5",textSize:"text-xs",secondaryTextSize:"text-xs",skeletonIconStacked:28,skeletonIconInline:16,skeletonText:80,skeletonSecondary:60},sm:{iconSize:20,iconContainerSize:"w-8 h-8",gap:"gap-2",textSize:"text-sm",secondaryTextSize:"text-xs",skeletonIconStacked:32,skeletonIconInline:20,skeletonText:96,skeletonSecondary:72},md:{iconSize:24,iconContainerSize:"w-9 h-9",gap:"gap-3",textSize:"text-base",secondaryTextSize:"text-sm",skeletonIconStacked:36,skeletonIconInline:24,skeletonText:128,skeletonSecondary:96},lg:{iconSize:28,iconContainerSize:"w-10 h-10",gap:"gap-3",textSize:"text-lg",secondaryTextSize:"text-base",skeletonIconStacked:40,skeletonIconInline:28,skeletonText:160,skeletonSecondary:120}}[a],h={strong:"font-semibold text-text-primary",high:"font-semibold text-text-primary",normal:"text-text-primary",low:"text-text-secondary"}[c],y=[];t&&y.push(t),r&&o?y.push(`${r} ${o}`):r?y.push(r):o&&y.push(o);let v=y.join(", "),C=({children:S,className:N})=>i?s?jsxRuntime.jsx(s,{href:i,className:N,children:S}):jsxRuntime.jsx(pt,{href:i,variant:d,className:tailwindMerge.twMerge("hover:underline",N),asButton:false,children:S}):jsxRuntime.jsx("span",{className:N,children:S});if(l)return n==="inline"?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(j,{width:f.skeletonIconInline,height:f.skeletonIconInline,className:"flex-shrink-0 rounded"}),jsxRuntime.jsx(j,{width:f.skeletonText,height:f.skeletonIconInline*.8})]}):jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center",f.gap,m),children:[u&&jsxRuntime.jsx(j,{width:f.skeletonIconStacked,height:f.skeletonIconStacked,className:"flex-shrink-0 rounded"}),jsxRuntime.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntime.jsx(j,{width:f.skeletonText,height:16}),jsxRuntime.jsx(j,{width:f.skeletonSecondary,height:12})]})]});if(n==="inline")return jsxRuntime.jsxs(C,{className:tailwindMerge.twMerge("flex items-center",f.gap,i&&"hover:bg-background-hover transition-colors",m),children:[u&&jsxRuntime.jsx(H,{name:"MapPin",size:f.iconSize,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",h,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})]});let w=()=>{if(p){if(t&&r&&o)return "city-state-zip";if(t&&r)return "city-state";if(t)return "city";if(r)return "state";if(o)return "postal-code"}};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center justify-start",f.gap,m),children:[u&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-shrink-0 flex items-center justify-center rounded border border-border-muted",f.iconContainerSize),children:jsxRuntime.jsx(H,{name:"MapPin",size:f.iconSize,className:"text-text-secondary"})}),jsxRuntime.jsxs("div",{className:"flex flex-col items-start min-w-0",children:[jsxRuntime.jsx(C,{className:tailwindMerge.twMerge("leading-normal truncate hover:text-text-primary",h,f.textSize,i&&"hover:underline hover:decoration-1 hover:underline-offset-4"),children:jsxRuntime.jsx("span",{"data-pii-type":p?"address":void 0,"data-pii-entity":p,children:e})}),v&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary leading-normal truncate",f.secondaryTextSize),"data-pii-type":w(),"data-pii-entity":p,children:v})]})]})}function Ty({row:e,context:t,streetAddress:r,city:o,state:n,postalCode:a,layout:i="stacked",size:s="sm",href:d,LinkComponent:c,linkVariant:l="secondary",emphasis:u="normal",align:m="left",className:p,piiEntity:g}){let{isLoading:f}=t,x=me(r,e),h=me(o,e),y=me(n,e),v=me(a,e),C=me(d,e),w=me(g,e),S=Se(m,p);return jsxRuntime.jsx("div",{className:S,children:jsxRuntime.jsx(Ec,{streetAddress:x,city:h,state:y,postalCode:v,layout:i,size:s,href:C,LinkComponent:c,linkVariant:l,emphasis:u,isLoading:f,piiEntity:w})})}var fm=Ze__namespace.default.memo(({value:e,data:t,type:r="line",color:o="var(--color-viz-default)",strokeWidth:n=2,categoryColors:a,context:i,width:s,height:d=40})=>{let c=e||t||[],l=s||100,u=d,{xScale:m,yScale:p}=Ze.useMemo(()=>{if(c.length===0)return {xScale:scale.scaleTime({range:[0,l],domain:[new Date,new Date]}),yScale:scale.scaleLinear({range:[u,0],domain:[0,1]})};let f=d3Array.extent(c,v=>v.xValue),x=d3Array.min(c,v=>v.yValue)||0,h=d3Array.max(c,v=>v.yValue)||0,y=(h-x)*.1||1;return {xScale:scale.scaleTime({range:[0,l],domain:f}),yScale:scale.scaleLinear({range:[u,0],domain:[x-y,h+y]})}},[c,l,u]);if(i.isLoading)return jsxRuntime.jsx("div",{className:"flex items-center",style:{width:l,height:u},children:jsxRuntime.jsx("div",{className:"h-1 w-full animate-pulse bg-border-default rounded"})});if(!c||c.length===0)return jsxRuntime.jsx("div",{className:"flex items-center justify-center text-text-secondary text-xs",style:{width:l,height:u},children:"No data"});let g=a&&c[0]?.category&&a[c[0].category]?a[c[0].category]:o;return jsxRuntime.jsxs("svg",{width:l,height:u,className:"overflow-visible",children:[(r==="area"||r==="both")&&jsxRuntime.jsx(shape.AreaClosed,{data:c,x:f=>m(f.xValue),y:f=>p(f.yValue),yScale:p,fill:g,fillOpacity:.15,curve:curve.curveLinear}),(r==="line"||r==="both")&&jsxRuntime.jsx(shape.LinePath,{data:c,x:f=>m(f.xValue),y:f=>p(f.yValue),stroke:g,strokeWidth:n,strokeLinecap:"round",curve:curve.curveLinear})]})});fm.displayName="SparklineCell";function Ey({value:e,row:t,context:r,prefix:o,suffix:n,emptyText:a="\u2014",href:i,linkBehavior:s="hover",linkVariant:d="secondary",emphasis:c="normal",truncate:l=true,copyable:u=false,align:m="left",className:p,piiType:g,piiEntity:f}){let{isLoading:x}=r;if(x)return jsxRuntime.jsx(j,{className:Pt(c)});let h=gc(e,a),y=me(i,t),v=me(f,t),C=h,w=false,S=false;if(l&&h&&typeof h=="string")if(typeof l=="boolean")S=true;else {let{position:R="end",length:O=16,ellipsis:W="...",tooltip:z=true}=l;if(h.length>O){switch(R){case "start":C=al(h,O);break;case "middle":C=Ka(h,O);break;case "end":C=il(h,O,W);break}w=z;}}let N=g&&v?{"data-pii-type":g,"data-pii-entity":v}:{},k=Object.keys(N).length>0,T=jsxRuntime.jsx("span",{className:S?"truncate":"",...N,children:C}),E=w?jsxRuntime.jsx(tr,{content:k?jsxRuntime.jsx("span",{...N,children:String(h)}):String(h),children:T}):T,A=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[o&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:o}),E,n&&jsxRuntime.jsx("span",{className:"text-text-secondary",children:n})]}),P=A;if(u&&h&&h!==a){let R=typeof u=="function"?u(t):String(h);P=jsxRuntime.jsx(yn,{value:R,size:"sm",children:A});}if(y){let R=Se(m,p);return jsxRuntime.jsx("div",{className:R,children:Do(P,y,t,s,d,c)})}let I=Se(m,tailwindMerge.twMerge(Rr(c),p));return jsxRuntime.jsx("div",{className:I,children:P})}var FE={sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden"},BE={sm:"hidden sm:grid",md:"hidden md:grid",lg:"hidden lg:grid",xl:"hidden xl:grid"};function Mc(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function Lc(e,t,r,o){if(r.cell){let n=r.cell,a=typeof r.cellProps=="function"?r.cellProps(e,t):r.cellProps;return jsxRuntime.jsx(n,{value:e,row:t,context:o,...a})}return r.render?r.render(e,t,o):e?.toString()??"\u2014"}function Ac({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(u=>u.mobile!==false).map(u=>{let m=u.mobile===false?null:u.mobile;return {...u,mobilePriority:m?.priority??2,mobileFormat:m?.format??"secondary",showLabel:m?.label??m?.format==="secondary",icon:m?.icon}}).sort((u,m)=>u.mobilePriority-m.mobilePriority),i=a.filter(u=>u.mobilePriority===1||u.mobileFormat==="primary"),s=a.filter(u=>u.mobilePriority===2&&u.mobileFormat!=="primary"),d=a.filter(u=>u.mobileFormat==="badge"),c={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:[i.length>0&&jsxRuntime.jsxs("div",{className:"mb-2 flex items-start justify-between",children:[jsxRuntime.jsx("div",{className:"flex-1",children:i.map(u=>{let m=Mc(e,u);return jsxRuntime.jsx("div",{className:"font-medium text-text-primary [&>*]:!justify-start [&>*]:!text-left",children:Lc(m,e,u,c)},u.id)})}),d.length>0&&jsxRuntime.jsx("div",{className:"ml-2 flex flex-wrap gap-1",children:d.map(u=>{let m=Mc(e,u);return jsxRuntime.jsx("div",{className:"inline-flex",children:Lc(m,e,u,c)},u.id)})})]}),s.length>0&&jsxRuntime.jsx("div",{className:"space-y-1",children:s.map(u=>{let m=Mc(e,u),p=u.showLabel&&u.label;return jsxRuntime.jsxs("div",{className:"flex items-center text-sm text-text-secondary",children:[u.icon&&jsxRuntime.jsx(H,{name:u.icon,className:"mr-1.5 h-4 w-4 flex-shrink-0"}),p&&jsxRuntime.jsxs("span",{className:"mr-1 font-medium",children:[u.label,":"]}),jsxRuntime.jsx("span",{className:"truncate [&>*]:!justify-start [&>*]:!text-left",children:Lc(m,e,u,c)})]},u.id)})})]})}function Ic({row:e,columns:t,density:r,isLoading:o,onClick:n}){let a=t.filter(d=>d.mobile!==false),i={isLoading:!!o,rowIndex:0,columnIndex:0,density:r};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface transition-colors",n&&"cursor-pointer hover:bg-background-hover active:bg-background-pressed",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[r]),onClick:n,role:n?"button":void 0,tabIndex:n?0:void 0,children:jsxRuntime.jsx("div",{className:"space-y-2",children:a.map((d,c)=>{let l=Mc(e,d),u=c===0;return jsxRuntime.jsxs("div",{children:[!u&&jsxRuntime.jsx("div",{className:"text-xs text-text-secondary",children:d.label}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(u?"font-medium text-text-primary":"text-sm text-text-primary","[&>*]:!justify-start [&>*]:!text-left"),children:Lc(l,e,d,i)})]},d.id)})})})}function My(e="md"){return {mobile:FE[e],desktop:BE[e]}}function Ly({density:e}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("border-b border-border-default bg-background-surface",{compact:"px-3 py-2",default:"px-4 py-3",relaxed:"px-4 py-4"}[e]),children:[jsxRuntime.jsx("div",{className:"mb-2 h-5 w-3/4 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsxs("div",{className:"space-y-1",children:[jsxRuntime.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-background-muted"}),jsxRuntime.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-background-muted"})]})]})}var jE={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},QE={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};function ZE(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function _E({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:c}){let l=e.reorderable!==false,{attributes:u,listeners:m,setNodeRef:p,transform:g,transition:f,isDragging:x}=sortable.useSortable({id:e.id,disabled:!l||s}),{role:h,"aria-pressed":y,...v}=u,C=t?.columnId===e.id,w=C?t.direction:null,S=n&&a,N=C?c:void 0,k={...ZE(e),transform:utilities.CSS.Transform.toString(g),transition:f,opacity:x?.8:1,zIndex:x?50:void 0};return jsxRuntime.jsx("div",{ref:p,className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",jE[i],QE[e.align||"left"],o&&"sticky top-0 z-10",S&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&S&&"z-30",e.sortable&&!s&&"hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",C?"font-bold text-text-primary":"font-medium text-text-secondary",x&&"bg-background-hover"),style:k,...v,...m,role:"columnheader","aria-sort":C?w==="asc"?"ascending":"descending":"none","aria-disabled":s,title:N,"data-sort-note":N,children:s?jsxRuntime.jsx(j,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:"flex-1 truncate cursor-pointer",onClick:()=>!s&&e.sortable&&r(e.id),children:e.label}),N&&jsxRuntime.jsx("span",{className:"sr-only",children:N}),e.sortable&&jsxRuntime.jsx("button",{type:"button",className:"flex flex-shrink-0 cursor-pointer",onClick:()=>!s&&r(e.id),"aria-label":`Sort by ${e.label}`,children:C?jsxRuntime.jsx(H,{name:w==="asc"?"CaretUp":"CaretDown",size:14,weight:N?"regular":"bold",className:N?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(H,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function Ay({columns:e,columnOrder:t,onColumnOrderChange:r,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,density:s="default",isLoading:d=false,renderHeaderContent:c,sortNote:l}){let u=core.useSensors(core.useSensor(core.PointerSensor,{activationConstraint:{distance:5}}),core.useSensor(core.KeyboardSensor,{coordinateGetter:sortable.sortableKeyboardCoordinates})),m=new Map(e.map(f=>[f.id,f])),p=f=>{let{active:x,over:h}=f;if(h&&x.id!==h.id){let y=t.indexOf(x.id),v=t.indexOf(h.id);if(m.get(h.id)?.reorderable===false)return;let w=0;for(let T=0;T<t.length&&m.get(t[T])?.reorderable===false;T++)w=T+1;if(v<w)return;let S=Math.min(y,v),N=Math.max(y,v);for(let T=S;T<=N;T++){if(T===y)continue;if(m.get(t[T])?.reorderable===false)return}let k=sortable.arrayMove(t,y,v);r(k);}},g=t.map(f=>m.get(f)).filter(f=>f!==void 0);return jsxRuntime.jsx(core.DndContext,{sensors:u,collisionDetection:core.closestCenter,onDragEnd:p,children:jsxRuntime.jsx(sortable.SortableContext,{items:t,strategy:sortable.horizontalListSortingStrategy,children:jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:g.map((f,x)=>jsxRuntime.jsx(_E,{column:f,sortConfig:o,onSort:n,stickyHeader:a,stickyFirstColumn:i,isFirstColumn:x===0,density:s,isLoading:d,headerContent:c?.(f),sortNote:l},f.id))})})})}var Fc="__select",nM=new Set,bm={compact:"py-1.5 px-3 text-sm",default:"py-3 px-4 text-sm",relaxed:"py-4 px-4 text-base"},hm={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},aM={full:"w-full",auto:"w-auto inline-block",contained:"w-full max-w-6xl mx-auto"},iM={auto:"table-auto",fixed:"table-fixed",responsive:"table-auto"};function Iy(e){if(typeof e=="number")return e;let t=/^(\d+(?:\.\d+)?)px$/.exec(e.trim());return t?Number(t[1]):0}function xm(e){let t={};return e.width!==void 0&&(t.width=typeof e.width=="number"?`${e.width}px`:e.width),e.minWidth!==void 0&&(t.minWidth=typeof e.minWidth=="number"?`${e.minWidth}px`:e.minWidth),e.maxWidth!==void 0&&(t.maxWidth=typeof e.maxWidth=="number"?`${e.maxWidth}px`:e.maxWidth),e.flex!==void 0&&(t.flex=`${e.flex} 1 0`),t}function sM(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function lM({column:e,sortConfig:t,onSort:r,stickyHeader:o,stickyFirstColumn:n,isFirstColumn:a,density:i="default",isLoading:s=false,headerContent:d,sortNote:c}){let l=t?.columnId===e.id,u=l?t.direction:null,m=n&&a,p=l?c:void 0;return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.sortable?"gap-2":"gap-1",bm[i],hm[e.align||"left"],o&&"sticky top-0 z-10",m&&"sticky left-0 z-20 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",o&&m&&"z-30",e.sortable&&!s&&"cursor-pointer hover:bg-background-hover",s&&"cursor-not-allowed opacity-60",l?"font-bold text-text-primary":"font-medium text-text-secondary"),onClick:()=>!s&&e.sortable&&r(e.id),role:"columnheader","aria-sort":l?u==="asc"?"ascending":"descending":"none","aria-disabled":s,title:p,"data-sort-note":p,style:xm(e),children:s?jsxRuntime.jsx(j,{className:"h-4 w-24"}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[d??jsxRuntime.jsx("span",{className:"truncate",children:e.label}),e.headerTooltip&&jsxRuntime.jsx(tr,{content:e.headerTooltip,children:jsxRuntime.jsx(re,{variant:"ghost","aria-label":`About ${e.label}`,onClick:g=>g.stopPropagation(),className:"h-auto min-h-0 flex-shrink-0 p-0 text-text-tertiary hover:text-text-secondary",children:jsxRuntime.jsx(H,{name:"Info",size:12,"aria-hidden":true})})}),p&&jsxRuntime.jsx("span",{className:"sr-only",children:p}),e.sortable&&jsxRuntime.jsx("div",{className:"flex flex-shrink-0",children:l?jsxRuntime.jsx(H,{name:u==="asc"?"CaretUp":"CaretDown",size:14,weight:p?"regular":"bold",className:p?"text-text-secondary opacity-40":"text-text-primary"}):jsxRuntime.jsx(H,{name:"CaretUpDown",size:12,className:"text-text-secondary opacity-40"})})]})})}function cM({column:e,row:t,rowIndex:r,columnIndex:o,isHovered:n,isSelected:a,density:i="default",className:s,stickyFirstColumn:d}){let c=d&&o===0,l=sM(t,e),u={isLoading:false,isHovered:n,...a===void 0?{}:{isSelected:a},rowIndex:r,columnIndex:o,density:i},m;if(e.cell){let p=e.cell,g=typeof e.cellProps=="function"?e.cellProps(l,t):e.cellProps;m=jsxRuntime.jsx(p,{value:l,row:t,context:u,...g});}else e.render?m=e.render(l,t,u):m=jsxRuntime.jsx("span",{className:"truncate",children:l?.toString()??""});if(e.popover){let p=e.popover,g,f="top",x=false,h="hover";typeof p=="string"?g=p:typeof p=="function"?g=p(l,t):(g=typeof p.content=="function"?p.content(l,t):p.content,f=p.placement||"top",x=p.showArrow??false,h=p.trigger||"hover"),m=jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{...h==="hover"?{trigger:"longPress"}:{},children:[jsxRuntime.jsx("div",{className:"cursor-help",children:m}),jsxRuntime.jsx(St,{placement:f,showArrow:x,children:jsxRuntime.jsx("div",{className:"p-2",children:g})})]});}return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":bm[i],hm[e.align||"left"],c&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]",s),role:"cell",style:xm(e),children:m})}function dM({column:e,rowIndex:t,columnIndex:r,density:o="default",stickyFirstColumn:n}){let a=n&&r===0,i={isLoading:true,rowIndex:t,columnIndex:r,density:o},s;if(e.cell){let d=e.cell,c=typeof e.cellProps=="function"?e.cellProps(null,{}):e.cellProps;s=jsxRuntime.jsx(d,{value:null,row:{},context:i,...c});}else e.render?s=e.render(null,{},i):s=jsxRuntime.jsx(j,{className:"h-4 w-full max-w-[200px]"});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center border-b border-border-default bg-background-surface",e.noCellPadding?"":bm[o],hm[e.align||"left"],a&&"sticky left-0 z-10 shadow-[2px_0_4px_-2px_rgba(0,0,0,0.1)]"),role:"cell",style:xm(e),children:s})}function uM(e,t){let r=new Set(["BUTTON","A","INPUT","SELECT","TEXTAREA"]),o=new Set(["button","link","checkbox","switch","menuitem","option"]),n=e;for(;n&&n!==t;){if(r.has(n.tagName))return true;let a=n.getAttribute("role");if(a&&o.has(a))return true;n=n.parentElement;}return false}function Fy({columns:e,row:t,rowIndex:r,density:o="default",onClick:n,stickyFirstColumn:a,isSelected:i}){let[s,d]=Ze.useState(false),c=Ze.useCallback(l=>{if(!n)return;let u=l.target,m=l.currentTarget;uM(u,m)||n(t);},[n,t]);return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("contents group",n&&"cursor-pointer"),role:"row","aria-selected":i===void 0?void 0:i,onClick:c,onMouseEnter:()=>d(true),onMouseLeave:()=>d(false),children:e.map((l,u)=>jsxRuntime.jsx(cM,{column:l,row:t,rowIndex:r,columnIndex:u,isHovered:s,isSelected:i,density:o,className:tailwindMerge.twMerge(n?"group-hover:bg-background-hover":"",i&&"bg-background-selected"),stickyFirstColumn:a},l.id))})}function pM({columns:e,rowIndex:t,density:r="default",stickyFirstColumn:o}){return jsxRuntime.jsx("div",{className:"contents",role:"row",children:e.map((n,a)=>jsxRuntime.jsx(dM,{column:n,rowIndex:t,columnIndex:a,density:r,stickyFirstColumn:o},n.id))})}function By({columns:e,data:t,className:r,density:o="default",width:n="full",height:a,maxHeight:i,layout:s="auto",mobileRenderer:d="auto",customMobileRowRender:c,mobileBreakpoint:l="md",isLoading:u=false,loadingState:m,loadingRowCount:p=5,onLoadMore:g,hasMore:f=false,enableVirtualization:x,estimatedRowHeight:h,loadingIndicator:y,stickyHeader:v=false,stickyFirstColumn:C=false,onRowClick:w,getRowId:S,selectedRowIds:N,onSelectionChange:k,selectionMode:T="multi",hideHeader:E=false,sortConfig:A,onSort:P,sortNote:I,"aria-label":R,enableColumnReorder:O=false,columnOrder:W,onColumnOrderChange:z}){let F=k!==void 0,Y=N??nM,U=Ze.useCallback(($,ue)=>{if(S)return S($);let Z=$.id;return typeof Z=="string"&&Z.length>0?Z:typeof Z=="number"&&Number.isFinite(Z)?String(Z):`row-${ue}`},[S]),V=Ze.useMemo(()=>t.map(($,ue)=>U($,ue)),[t,U]),J=Ze.useCallback(($,ue)=>{if(!k)return;if(T==="single"){k(ue?new Set([$]):new Set);return}let Z=new Set(Y);ue?Z.add($):Z.delete($),k(Z);},[k,Y,T]),G=V.filter($=>Y.has($)).length,B=V.length>0&&G===V.length,L=G>0&&!B,b=Ze.useCallback($=>{if(!k)return;let ue=new Set(Y);for(let Z of V)$?ue.add(Z):ue.delete(Z);k(ue);},[k,V,Y]),M=Ze.useMemo(()=>F?[{id:Fc,label:"",width:44,align:"center",sortable:false,reorderable:false,exportable:false,mobile:false,render:(ue,Z,be)=>{let sr=U(Z,be.rowIndex);return jsxRuntime.jsx(Rc,{value:void 0,row:Z,context:be,isSelected:Y.has(sr),onSelect:(ln,oo)=>J(sr,oo)})}},...e]:e,[e,F,Y,U,J]),D=F&&T==="multi"?jsxRuntime.jsx(io,{isSelected:B,isIndeterminate:L,onChange:$=>b($),isDisabled:V.length===0,"aria-label":B?"Deselect all rows on this page":"Select all rows on this page"}):void 0,q=Ze.useCallback($=>$.id===Fc?D:void 0,[D]),[ae,_]=Ze.useState(null),ee=A!==void 0,ie=ee?A:ae,Me=Ze.useRef(null),le=Ze.useMemo(()=>M.map($=>$.id),[M]),[ge,ce]=Ze.useState(le),pe=W!==void 0,Te=pe?W:ge;Ze.useEffect(()=>{pe||ce($=>{let ue=M.map(oo=>oo.id),Z=new Set(ue),be=new Set($),sr=$.filter(oo=>Z.has(oo)),ln=ue.filter(oo=>!be.has(oo));return [...sr,...ln]});},[M,pe]);let et=Ze.useCallback($=>{pe||ce($),z?.($);},[pe,z]),Be=Ze.useMemo(()=>{if(!O&&!W)return M;let $=new Map(M.map(be=>[be.id,be])),ue=Te.map(be=>$.get(be)).filter(be=>be!==void 0),Z=$.get(Fc);return Z&&!ue.some(be=>be.id===Fc)?[Z,...ue]:ue},[M,Te,O,W]),$t=gn({items:t,onLoadMore:g,hasMore:f,isLoading:u,loadingState:m,enableVirtualization:x,estimatedItemSize:h||(o==="compact"?40:o==="relaxed"?60:48),overscan:5}),yt=g||x?$t:null,ir=yt?.scrollRef??Me,{loadMoreRef:Rt,virtualizer:tt,virtualItems:Gt,isLoadingMore:te,computedLoadingState:Oe}=yt||{},{gridTemplateColumns:Ue,totalMinWidth:Dt}=Ze.useMemo(()=>{let $=0;return {gridTemplateColumns:Be.map(Z=>{if(Z.minWidth?$+=Iy(Z.minWidth):Z.width&&($+=Iy(Z.width)),Z.width)return typeof Z.width=="number"?`${Z.width}px`:Z.width;if(Z.flex)return `${Z.flex}fr`;if(Z.minWidth&&Z.maxWidth){let be=typeof Z.minWidth=="number"?`${Z.minWidth}px`:Z.minWidth,sr=typeof Z.maxWidth=="number"?`${Z.maxWidth}px`:Z.maxWidth;return `minmax(${be}, ${sr})`}return Z.minWidth?`minmax(${typeof Z.minWidth=="number"?`${Z.minWidth}px`:Z.minWidth}, 1fr)`:Z.maxWidth?`minmax(0, ${typeof Z.maxWidth=="number"?`${Z.maxWidth}px`:Z.maxWidth})`:"1fr"}).join(" "),totalMinWidth:$}},[Be]),oe=Ze.useCallback($=>{if(!M.find(be=>be.id===$)?.sortable)return;let Z;ie?.columnId===$?Z={columnId:$,direction:ie.direction==="asc"?"desc":"asc"}:Z={columnId:$,direction:"asc"},ee||_(Z),P?.(Z);},[M,ie,P,ee]),we=Oe==="loading"||u&&t.length===0,X={};a?(X.height=typeof a=="number"?`${a}px`:a,X.overflowY="auto"):i?(X.maxHeight=typeof i=="number"?`${i}px`:i,X.overflowY="auto"):g&&(X.height="600px",X.overflowY="auto"),g&&(X.overflowX="auto");let K=tailwindMerge.twMerge(aM[n],!g&&(s==="responsive"?"overflow-x-auto scrollbar-visible":"overflow-auto scrollbar-visible"),r),de=My(l),ne=d!=="none",ke=($,ue)=>ne?d==="custom"&&c?c($,ue):jsxRuntime.jsx(d==="cards"?Ic:Ac,{row:$,columns:Be,density:o,isLoading:u,onClick:w?()=>w($):void 0}):null,ve=tt?Gt?.map($=>({virtualItem:$,row:t[$.index],index:$.index}))||[]:t.map(($,ue)=>({row:$,index:ue,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:ir,className:K,style:{...X,position:tt?"relative":void 0},children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("grid border-separate border-spacing-0",iM[s],n==="auto"?"inline-grid w-auto":"w-full",ne&&de.desktop),role:"table","aria-label":R,style:{gridTemplateColumns:Ue,minWidth:Dt>0?`${Dt}px`:void 0},children:[!E&&(O?jsxRuntime.jsx(Ay,{columns:M,columnOrder:Te,onColumnOrderChange:et,sortConfig:ie,onSort:oe,stickyHeader:v,stickyFirstColumn:C,density:o,isLoading:we,renderHeaderContent:q,sortNote:I}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:Be.map(($,ue)=>jsxRuntime.jsx(lM,{column:$,sortConfig:ie,onSort:oe,stickyHeader:v,stickyFirstColumn:C,isFirstColumn:ue===0,density:o,isLoading:we,headerContent:q($),sortNote:I},$.id))})),tt&&!we?jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1",height:`${tt.getTotalSize()}px`,position:"relative"},role:"rowgroup",children:t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue,virtualItem:Z})=>{if(!$||!Z)return null;let be=S?S($):`row-${ue}`;return jsxRuntime.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",display:"grid",gridTemplateColumns:Ue,transform:`translateY(${Z.start}px)`},"data-index":Z.index,ref:tt.measureElement,children:jsxRuntime.jsx(Fy,{columns:Be,row:$,rowIndex:ue,density:o,onClick:w,stickyFirstColumn:C,isSelected:F?Y.has(U($,ue)):void 0})},be)}),te&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${tt.getTotalSize()}px`,left:0,width:"100%"},children:y||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}):jsxRuntime.jsx("div",{className:"contents",role:"rowgroup",children:we?Array.from({length:p}).map(($,ue)=>jsxRuntime.jsx(pM,{columns:Be,rowIndex:ue,density:o,stickyFirstColumn:C},`loading-${ue}`)):t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue})=>{if(!$)return null;let Z=S?S($):`row-${ue}`;return jsxRuntime.jsx(Fy,{columns:Be,row:$,rowIndex:ue,density:o,onClick:w,stickyFirstColumn:C,isSelected:F?Y.has(U($,ue)):void 0},Z)}),te&&jsxRuntime.jsx("div",{className:"col-span-full",style:{gridColumn:"1 / -1"},children:y||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}):jsxRuntime.jsx("div",{className:"col-span-full py-12 text-center text-text-secondary",role:"row",children:jsxRuntime.jsx("div",{role:"cell",children:"No data available"})})})]}),ne&&jsxRuntime.jsx("div",{className:de.mobile,children:we?Array.from({length:p}).map(($,ue)=>jsxRuntime.jsx(Ly,{density:o},`mobile-loading-${ue}`)):t.length>0?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[ve.map(({row:$,index:ue})=>{if(!$)return null;let Z=S?S($):`mobile-row-${ue}`;return jsxRuntime.jsx("div",{className:"border-b border-border-default last:border-b-0",children:ke($,ue)},Z)}),te&&(y||jsxRuntime.jsx(Xr,{state:"loading-more"}))]}):jsxRuntime.jsx("div",{className:"py-12 text-center text-text-secondary",children:"No data available"})}),g&&f&&!we&&(tt?jsxRuntime.jsx("div",{ref:Rt,style:{position:"absolute",top:`${tt.getTotalSize()}px`,left:0,width:"100%",height:1}}):jsxRuntime.jsx("div",{ref:Rt,className:"h-px w-full"}))]})}function Oy({status:e,alertCount:t,showCount:r=false,isLoading:o,size:n="sm",shape:a="pill",...i}){if(o)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-20"});let s={healthy:"success",warning:"warning",error:"error",unknown:"neutral"},d={healthy:"Healthy",warning:"Warning",error:"Error",unknown:"Unknown"},c=e==="warning"||e==="error",l=r&&t?`${d[e]} (${t})`:d[e];return jsxRuntime.jsx(gt,{variant:s[e],size:n,shape:a,dot:c,dotPulse:c,...i,children:l})}var fM={battery:"BatteryHigh",charger:"ChargingStation",thermostat:"ThermometerSimple",inverter:"Power",vehicle:"Car",water_heater:"DropHalfBottom",meter:"Gauge",gateway:"WifiHigh",other:"Cube",unknown:"Question"},gM={battery:"Battery",charger:"Charger",thermostat:"Thermostat",inverter:"Inverter",vehicle:"Vehicle",water_heater:"Water Heater",meter:"Meter",gateway:"Gateway",other:"Other",unknown:"Unknown"};function Hy({deviceType:e,iconName:t,size:r="md",showLabel:o=false,className:n}){let a=t||(e?fM[e]:"Question"),i=e?gM[e]:void 0;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center",o?"flex-col gap-1":"gap-0",n),children:[jsxRuntime.jsx(H,{name:a,size:r}),o&&i&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:i})]})}function ys({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,slideInFrom:d="right",transparentOverlay:c=false,onClose:l,className:u,primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f,contentPadding:x=true,maxWidth:h="400px"}){if(!s)return null;let y=t||r,v=m||p||g||f;return jsxRuntime.jsx(ao,{children:jsxRuntime.jsx(Dr,{isOpen:s,onOpenChange:C=>!C&&l?.(),isDismissable:true,transparent:c,children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsxs(reactAriaComponents.Dialog,{className:tailwindMerge.twMerge("fixed top-0 bottom-0 flex flex-col bg-background-surface shadow-xl overflow-hidden",d==="right"?"right-0":"left-0",d==="right"?"animate-in slide-in-from-right duration-300 ease-out":"animate-in slide-in-from-left duration-300 ease-out","data-[exiting]:animate-out",d==="right"?"data-[exiting]:slide-out-to-right":"data-[exiting]:slide-out-to-left","data-[exiting]:duration-200 data-[exiting]:ease-in","outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-action-default focus-visible:outline-offset-0",u),style:{maxWidth:h,width:"100%"},children:[y&&(a&&i?jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,hasBackArrow:true,onBack:i,onClose:l}):jsxRuntime.jsx(lr,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n,onClose:l})),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-y-auto overscroll-contain",x?"px-6 py-6":"p-0"),children:e}),v&&jsxRuntime.jsx(pn,{primaryAction:m,secondaryAction:p,tertiaryAction:g,footerContent:f})]})})})})}ys.displayName="Drawer";function Wy({status:e,programName:t,isLoading:r,size:o="sm",shape:n="pill",...a}){if(r)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-20"});let i={enrolled:"success",eligible:"info",pending:"warning",not_eligible:"neutral",opted_out:"neutral"},s={enrolled:"Enrolled",eligible:"Eligible",pending:"Pending",not_eligible:"Not Eligible",opted_out:"Opted Out"},d=jsxRuntime.jsx(gt,{variant:i[e],size:o,shape:n,...a,children:s[e]});return t?jsxRuntime.jsx(tr,{content:t,children:d}):d}function Ky({value:e,onChange:t,onUrlChange:r,accept:o="image/*",maxSize:n,isDisabled:a=false,onUpload:i,className:s,showPreview:d=true,placeholder:c="Drop files here or click to browse"}){let[l,u]=Ze.useState(false),[m,p]=Ze.useState(false),[g,f]=Ze.useState(null),[x,h]=Ze.useState(e),y=Ze.useRef(null),v=async S=>{if(f(null),n&&S.size>n){f(`File size must be less than ${(n/1024/1024).toFixed(2)}MB`);return}if(d&&S.type.startsWith("image/")){let N=new FileReader;N.onloadend=()=>{h(N.result);},N.readAsDataURL(S);}if(i){p(true);try{let N=await i(S);h(N),r?.(N);}catch(N){f("Failed to upload file"),console.error("Upload error:",N);}finally{p(false);}}t?.(S,x);},C=async S=>{try{let N=S.items;if(N.length>0){let k=N[0];if(k.kind==="file"){let T=await k.getFile();T&&v(T);}}}catch(N){f("Failed to upload file"),console.error("Upload error:",N);}finally{u(false);}},w=()=>{h(void 0),f(null),t?.(null),r?.(""),y.current&&(y.current.value="");};return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("w-full",s),children:[jsxRuntime.jsxs(reactAriaComponents.DropZone,{className:tailwindMerge.twMerge("relative flex min-h-[200px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed transition-colors",l?"border-action-brand bg-action-brand/5":"border-border-muted hover:border-border-default",a&&"pointer-events-none opacity-50",g&&"border-feedback-error-border bg-feedback-error-background/50"),onDrop:C,onDropEnter:()=>u(true),onDropExit:()=>u(false),children:[x?jsxRuntime.jsxs("div",{className:"relative flex h-full w-full items-center justify-center p-4",children:[d&&(x.startsWith("data:image")||x.startsWith("http"))?jsxRuntime.jsx("img",{src:x,alt:"Preview",className:"max-h-48 max-w-full rounded-md object-contain"}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx(lucideReact.Image,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"File uploaded"})]}),!a&&jsxRuntime.jsx(re,{variant:"icon",size:"sm",onPress:w,className:"absolute right-2 top-2 bg-background-surface shadow-md",children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})})]}):jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-4 p-6",children:[jsxRuntime.jsx(lucideReact.Upload,{className:"h-12 w-12 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("p",{className:"text-sm text-text-primary",children:c}),jsxRuntime.jsx("p",{className:"mt-1 text-xs text-text-secondary",children:o==="image/*"?"PNG, JPG, GIF up to 10MB":`Accepts ${o}`})]}),jsxRuntime.jsx(reactAriaComponents.FileTrigger,{acceptedFileTypes:o.split(","),onSelect:S=>{let N=Array.from(S||[]);N.length>0&&v(N[0]);},children:jsxRuntime.jsx(re,{variant:"secondary",size:"sm",isDisabled:a,children:"Choose File"})})]}),m&&jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-lg bg-background-surface/80",children:jsxRuntime.jsxs("div",{className:"flex flex-col items-center gap-2",children:[jsxRuntime.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-action-brand border-t-transparent"}),jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:"Uploading..."})]})})]}),g&&jsxRuntime.jsx("p",{className:"mt-2 text-sm text-feedback-error-text",children:g})]})}function Jy({version:e,isLatest:t,updateAvailable:r,isLoading:o,size:n="sm",shape:a="rounded",...i}){if(o)return jsxRuntime.jsx(j,{className:"inline-flex h-6 w-16"});let s="neutral",d=e;return t?s="success":r&&(s="warning",d=`${e} (Update)`),jsxRuntime.jsx(gt,{variant:s,size:n,shape:a,...i,children:d})}function bi(e){return jsxRuntime.jsx(reactAriaComponents.Form,{validationBehavior:"aria",...e,className:tailwindMerge.twMerge("flex flex-col gap-6",e.className)})}function qy({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,trigger:a,children:i,showShortcutHint:s=true,showInput:d=true,className:c}){let[l,u]=Ze.useState(false),m=fr("(max-width: 767px)"),p=o!==void 0?o:l,g=Ze.useCallback(y=>{n?n(y):u(y);},[n]);Ze.useEffect(()=>{let y=v=>{(v.metaKey||v.ctrlKey)&&v.key==="k"&&(v.preventDefault(),g(!p)),v.key==="Escape"&&p&&g(false);};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[p,g]);let f=Ze.useCallback(y=>{r?.(y);},[r]),x=jsxRuntime.jsxs("button",{type:"button",className:"flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-text-primary hover:bg-background-hover rounded-md transition-colors","aria-label":"Open search",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:18}),!m&&s&&jsxRuntime.jsxs("span",{className:"hidden md:flex items-center gap-1 text-xs",children:[jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:navigator.platform.includes("Mac")?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:"px-1.5 py-0.5 bg-background-muted border border-border-muted rounded text-xs",children:"K"})]})]}),h=a===null||Ze.isValidElement(a)&&a.type===Ze.Fragment&&!a.props.children;return m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!h&&(a?jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:a}):jsxRuntime.jsx("button",{type:"button",onClick:()=>g(true),className:"appearance-none bg-transparent border-none p-0 cursor-pointer",children:x})),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),hideCloseIcon:false,contentPadding:false,maxHeight:"90vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted flex-shrink-0",children:jsxRuntime.jsx($r,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:c,autoFocus:true})}),jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:i})]})})]}):h?null:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{isOpen:p,onOpenChange:g,children:[a||x,jsxRuntime.jsx(St,{placement:"bottom",className:"w-[600px] max-w-[90vw] bg-background-surface shadow-xl border border-border-default rounded-lg overflow-hidden",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[d&&jsxRuntime.jsx("div",{className:"p-4 border-b border-border-muted",children:jsxRuntime.jsx($r,{value:t,onChange:f,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:c,autoFocus:true})}),jsxRuntime.jsx("div",{className:"max-h-[500px] overflow-hidden",children:i})]})})]})}function Zy({placeholder:e="Search...",value:t,onChange:r,isOpen:o,onOpenChange:n,children:a,maxHeight:i="400px",variant:s="default",className:d}){let[c,l]=Ze.useState(false),u=fr("(max-width: 767px)"),m=Ze.useRef(null),p=Ze.useRef(null),g=o!==void 0?o:c,f=Ze.useCallback(E=>{n?n(E):l(E);},[n]);Ze.useEffect(()=>{let E=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),f(!g)),A.key==="Escape"&&g&&f(false);};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[g,f]),Ze.useEffect(()=>{g&&!u&&m.current&&setTimeout(()=>{m.current?.querySelector("input")?.focus();},0);},[g,u]),Ze.useEffect(()=>{if(!g||u)return;let E=A=>{let P=A.target,I=m.current?.contains(P),R=p.current?.contains(P);!I&&!R&&f(false);};return document.addEventListener("mousedown",E,true),()=>document.removeEventListener("mousedown",E,true)},[g,u,f]);let x=E=>{r?.(E);},h=Ze.useCallback(()=>{f(false);},[f]),y=Ze.useCallback(()=>{r?.("");},[r]),[v,C]=Ze.useState(null);Ze.useEffect(()=>{if(g&&!u&&m.current){let E=null,A=()=>{let I=m.current?.getBoundingClientRect();I&&C({top:I.bottom+8,left:I.left,width:I.width});},P=()=>{E===null&&(E=requestAnimationFrame(()=>{A(),E=null;}));};return A(),window.addEventListener("resize",P),window.addEventListener("scroll",P,true),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",P,true),E!==null&&cancelAnimationFrame(E);}}},[g,u]);let w=Ze.useCallback(()=>{f(true);},[f]);if(u)return jsxRuntime.jsxs("div",{className:d,children:[jsxRuntime.jsx("button",{type:"button",onClick:w,className:"flex items-center justify-center w-10 h-10 rounded-lg hover:bg-background-hover transition-colors","aria-label":"Open search",children:jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:"md"})}),jsxRuntime.jsxs(wt,{isOpen:g,onClose:h,contentPadding:false,height:"80vh",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2 px-4 pt-4",children:[jsxRuntime.jsx("div",{className:"flex-1",children:jsxRuntime.jsx($r,{value:t,onChange:x,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:y,reserveErrorSpace:false,autoFocus:true})}),jsxRuntime.jsx(re,{variant:"icon",onPress:h,"aria-label":"Close search",className:"flex-shrink-0",children:jsxRuntime.jsx(H,{name:"X",size:"md"})})]}),jsxRuntime.jsx("div",{className:"mt-4",children:a})]})]},"mobile");let S=E=>{let P=E.target.tagName==="INPUT";if(E.key==="ArrowDown"&&g&&P){E.preventDefault();let I=p.current?.querySelector("[data-search-result]");I&&I.focus();}},N=E=>{let A=E.target;if(!A.hasAttribute("data-search-result"))return;let I=Array.from(p.current?.querySelectorAll("[data-search-result]")||[]),R=I.indexOf(A);if(E.key==="ArrowDown"){E.preventDefault(),E.stopPropagation();let O=Math.min(R+1,I.length-1);I[O]?.focus();}else if(E.key==="ArrowUp")if(E.preventDefault(),E.stopPropagation(),R===0)m.current?.querySelector("input")?.focus();else {let O=Math.max(R-1,0);I[O]?.focus();}else E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),f(false),m.current?.querySelector("input")?.focus());},k=g&&v&&typeof document<"u"?reactDom.createPortal(jsxRuntime.jsx("div",{ref:p,style:{position:"fixed",top:`${v.top}px`,left:`${v.left}px`,width:`${v.width}px`,zIndex:9999},role:"listbox",onKeyDown:N,children:jsxRuntime.jsx("div",{className:"bg-background-surface shadow-2xl border border-border-default rounded-lg overflow-hidden animate-in fade-in zoom-in-95 duration-200",children:jsxRuntime.jsx("div",{className:"overflow-y-auto",style:{maxHeight:i},children:a})})}),document.body):null,T=s==="elevated"?"bg-background-muted/50 border-border-subtle/50 focus-within:bg-background-body focus-within:border-border-focus focus-within:shadow-md backdrop-blur-sm transition-all duration-200":"";return jsxRuntime.jsxs("div",{ref:m,className:`relative w-full ${d||""}`,onKeyDown:S,children:[jsxRuntime.jsx($r,{value:t,onChange:x,placeholder:e,showSearchIcon:true,isClearable:!!t,onClear:()=>r?.(""),reserveErrorSpace:false,className:T,onFocus:()=>f(true)}),k]},"desktop")}function _y({message:e="No results found",suggestion:t,icon:r="MagnifyingGlass",className:o=""}){return jsxRuntime.jsxs("div",{className:`flex flex-col items-center justify-center py-12 px-4 text-center ${o}`,children:[jsxRuntime.jsx("div",{className:"text-text-secondary mb-3",children:jsxRuntime.jsx(H,{name:r,size:48})}),jsxRuntime.jsx("p",{className:"text-base font-medium text-text-primary mb-1",children:e}),t&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary max-w-xs",children:t})]})}function ev({count:e=3,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`,children:Array.from({length:e}).map((r,o)=>jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[jsxRuntime.jsx(j,{width:20,height:20,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[jsxRuntime.jsx(j,{width:"60%",height:16}),jsxRuntime.jsx(j,{width:"40%",height:12})]}),jsxRuntime.jsx(j,{width:16,height:16})]},o))})}function rv({title:e,count:t,isLoading:r,footer:o,children:n,className:a}){return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex flex-col",a),children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-1.5 px-4 pt-4 pb-2 border-t border-border-muted first:border-t-0",children:[jsxRuntime.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:e}),!r&&t!==void 0&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary",children:t}),r&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary animate-pulse",children:"Loading..."})]}),jsxRuntime.jsx("div",{className:"flex flex-col",children:n}),o&&jsxRuntime.jsx("div",{className:"px-4 py-2 border-t border-border-subtle",children:o})]})}function ov({id:e,title:t,subtitle:r,metadata:o,icon:n,customIcon:a,onSelect:i,isFocused:s=false,className:d,testId:c}){return jsxRuntime.jsxs("div",{role:"option",tabIndex:0,onClick:()=>{i?.(e);},onKeyDown:m=>{let p=m.currentTarget;switch(m.key){case "Enter":case " ":{m.preventDefault(),i?.(e);break}case "ArrowDown":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);f!==-1&&f<g.length-1&&g[f+1].focus();break}case "ArrowUp":{m.preventDefault();let g=Array.from(document.querySelectorAll("[data-search-result]")),f=g.indexOf(p);if(f>0)g[f-1].focus();else {let x=document.querySelector('input[type="text"][placeholder*="Search"]');x&&x.focus();}break}case "Escape":{m.preventDefault();let g=document.querySelector('input[type="text"][placeholder*="Search"]');g&&g.focus();break}}},"data-testid":c,"data-search-result":true,className:tailwindMerge.twMerge("group flex items-center gap-3 px-4 py-3 cursor-pointer outline-none transition-colors","text-text-primary hover:bg-background-hover","focus-visible:bg-background-muted focus-visible:outline-none","data-[focused]:bg-background-hover",s&&"bg-background-hover",d),"data-focused":s||void 0,children:[a?jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a}):n?jsxRuntime.jsx("div",{className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx(H,{name:n,size:20})}):null,jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("span",{className:"font-medium text-text-primary truncate",children:t}),o&&jsxRuntime.jsx("span",{className:"text-xs text-text-secondary flex-shrink-0",children:o})]}),r&&jsxRuntime.jsx("div",{className:"text-sm text-text-secondary truncate mt-0.5",children:r})]}),jsxRuntime.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 group-data-[focused]:opacity-100 transition-opacity",children:jsxRuntime.jsx(H,{name:"ArrowRight",size:16,className:"text-text-secondary"})})]})}function nv({children:e,maxHeight:t="400px",className:r}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-y-auto overscroll-contain","divide-y divide-border-muted",r),style:{maxHeight:t},children:e})}function iv({placeholder:e="Search...",onClick:t,showShortcut:r=true,variant:o="default",className:n=""}){let a=typeof navigator<"u"&&navigator.platform.includes("Mac");return jsxRuntime.jsxs("button",{type:"button",onClick:t,className:`
32
119
  flex items-center gap-3 w-full px-4 py-2.5 rounded-lg
33
120
  transition-all duration-200 cursor-text
34
121
  ${{default:`
@@ -40,12 +127,12 @@
40
127
  backdrop-blur-sm
41
128
  `}[o]}
42
129
  ${n}
43
- `,"aria-label":"Open search",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:18,className:"flex-shrink-0 transition-colors text-text-secondary"}),jsxRuntime.jsx("span",{className:`flex-1 text-left text-sm transition-colors ${o==="elevated"?"text-text-secondary font-normal":"text-text-disabled"}`,children:e}),r&&jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-1 flex-shrink-0",children:[jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:a?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:"K"})]})]})}var VE={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none"},OE={sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12",none:"sm:grid-cols-none"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12",none:"md:grid-cols-none"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12",none:"lg:grid-cols-none"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12",none:"xl:grid-cols-none"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12",none:"2xl:grid-cols-none"}},zE={none:"gap-0",xs:"gap-x-2 gap-y-1",sm:"gap-x-3 gap-y-2",md:"gap-x-4 gap-y-3",lg:"gap-x-6 gap-y-4",xl:"gap-x-8 gap-y-6","2xl":"gap-x-12 gap-y-8"},HE={none:"gap-x-0",xs:"gap-x-2",sm:"gap-x-3",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},GE={none:"gap-y-0",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-3",lg:"gap-y-4",xl:"gap-y-6","2xl":"gap-y-8"},WE={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},UE={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},KE={row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},YE={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full",auto:"col-auto"},JE={sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full",auto:"sm:col-auto"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full",auto:"md:col-auto"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full",auto:"lg:col-auto"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full",auto:"xl:col-auto"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full",auto:"2xl:col-auto"}};function tv(e,t,r){if(!e)return "";if(typeof e!="object")return t[e]||"";let o=[];return "base"in e&&e.base!==void 0&&o.push(t[e.base]),Object.entries(r).forEach(([n,a])=>{let i=e[n];i!==void 0&&o.push(a[i]);}),o.join(" ")}function vm({cols:e=1,gap:t="md",gapX:r,gapY:o,align:n="stretch",justify:a="start",flow:i="row",autoFit:s,autoFill:d,className:l,children:c}){let u=tailwindMerge.twMerge("grid",s||d?"":tv(e,VE,OE),!r&&!o&&zE[t],r&&HE[r],o&&GE[o],WE[n],UE[a],KE[i],l),m={};return s?m.gridTemplateColumns=`repeat(auto-fit, minmax(${s}, 1fr))`:d&&(m.gridTemplateColumns=`repeat(auto-fill, minmax(${d}, 1fr))`),jsxRuntime.jsx("div",{className:u,style:m,children:c})}function XE({span:e,className:t,children:r}){let o=tailwindMerge.twMerge(tv(e,YE,JE),t);return jsxRuntime.jsx("div",{className:o,children:r})}vm.Item=XE;function qE(e,t){return Ze__namespace.default.isValidElement(e)?e:yo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function jE(e){if(e.thresholds&&e.value!==null&&e.value!==void 0){for(let t of e.thresholds)if(t.when(e.value))return t.tone}return e.tone}var QE={neutral:"text-text-primary",success:"text-feedback-success",warning:"text-feedback-warning",error:"text-feedback-error",info:"text-feedback-info"},ZE=24,_E=20;function $E({item:e,dense:t,valueAlign:r}){let o=jE(e),n=o?QE[o]:"",a=e.stackOnMobile,i=typeof e.value=="string"&&e.value.length>ZE&&!e.formatter&&!Ze__namespace.default.isValidElement(e.value),s=qE(e.value,e.formatter),d=i?Ua(e.value,_E):null,l=typeof e.copyable=="function"?e.copyable(e.value):String(e.value),c=e.piiType&&e.piiEntity?{"data-pii-type":e.piiType,"data-pii-entity":e.piiEntity}:{},u=Object.keys(c).length>0,m=i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(tr,{content:u?jsxRuntime.jsx("span",{...c,children:String(e.value)}):String(e.value),children:jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("md:hidden",e.href?"hover:underline cursor-pointer":""),...c,children:d})}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("hidden md:inline",e.href?"hover:underline cursor-pointer":""),...c,children:s})]}):jsxRuntime.jsx("span",{className:e.href?"hover:underline cursor-pointer":"",...c,children:s}),p=e.copyable?jsxRuntime.jsx(xn,{value:l,size:"sm",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Copy"})}):null,g=e.copyable&&(e.copyIconPosition==="left"||!e.copyIconPosition),f=e.copyable&&e.copyIconPosition==="right",b=jsxRuntime.jsxs("dd",{className:tailwindMerge.twMerge(t?"text-sm":"text-base","font-medium",a?r==="start"?"text-left":"text-left sm:text-right":r==="start"?"text-left":"text-right",n,e.disabled&&"opacity-50","overflow-hidden min-w-0"),children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-1 max-w-full",r==="start"?"justify-start":"justify-end"),children:[jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 min-w-0",children:[m,e.iconRight]}),f&&p]}),e.meta&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-xs text-text-secondary mt-0.5",r==="start"?"text-left":"text-right"),children:e.meta})]}),y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dt",{className:tailwindMerge.twMerge(t?"text-xs":"text-sm","text-text-secondary truncate","flex items-center gap-1",e.disabled&&"opacity-50"),children:[e.iconLeft,jsxRuntime.jsx("span",{title:typeof e.label=="string"?e.label:void 0,children:e.label}),e.tooltip&&jsxRuntime.jsx(H,{name:"Question",size:10,className:"text-text-secondary","aria-label":"More information"})]}),g&&jsxRuntime.jsx("div",{className:"flex items-center",children:p}),e.href?jsxRuntime.jsx("a",{href:e.href,onClick:e.onAction,className:"block",children:b}):b]});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",a?"items-start sm:items-center":g?"items-center":"items-start",a?g?"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_auto_auto] sm:gap-x-1 sm:gap-y-0":t?"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_1fr] sm:gap-x-2 sm:gap-y-0":"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_1fr] sm:gap-x-4 sm:gap-y-0":g?"grid-cols-[minmax(120px,1fr)_auto_auto] gap-x-1":t?"grid-cols-[minmax(120px,1fr)_1fr] gap-x-2":"grid-cols-[minmax(120px,1fr)_1fr] gap-x-4"),children:y})}function Gc({items:e,layout:t="one-column",dense:r=false,valueAlign:o="end",showDividers:n=false,skeleton:a=false,empty:i=false,error:s,className:d}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",t==="two-column"?"md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:Array.from({length:e.length||4}).map((l,c)=>jsxRuntime.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-x-4",children:[jsxRuntime.jsx(q,{className:"h-4 w-24"}),jsxRuntime.jsx(q,{className:"h-5 w-16"})]},c))}):s?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-feedback-error",d),children:s}):i||!e.length?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-text-secondary",d),children:"No data available"}):jsxRuntime.jsx("dl",{className:tailwindMerge.twMerge("grid",t==="two-column"?"md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:e.map((l,c)=>jsxRuntime.jsxs(Ze__namespace.default.Fragment,{children:[n&&c>0&&t==="one-column"&&jsxRuntime.jsx("div",{className:"col-span-full border-t border-border-default -mt-1 mb-1"}),jsxRuntime.jsx($E,{item:l,dense:r,valueAlign:o})]},l.id))})}function nv({node:e,renderNodeList:t}){let r=e.children||[],o=e.metadata&&Object.keys(e.metadata).length>0;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0 px-4 py-4",children:jsxRuntime.jsx("h3",{className:"font-semibold text-text-primary text-lg",children:e.name})}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-y border-border-default px-4 py-4 bg-background-muted",children:jsxRuntime.jsx(Gc,{items:Object.entries(e.metadata||{}).map(([n,a])=>({id:n,label:n,value:a??"\u2014"})),dense:true,layout:"one-column",valueAlign:"end",showDividers:true})}),r.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:t(r,false)})]})}var ht={xs:{node:"px-2 py-2 text-xs",icon:"xs",bullet:24,spacing:{x:8,y:8}},sm:{node:"px-3 py-2.5 text-sm",icon:"xs",bullet:28,spacing:{x:12,y:10}},md:{node:"px-4 py-3 text-base",icon:"sm",bullet:32,spacing:{x:16,y:12}}};var Sm=Ze__namespace.createContext(null);function av(){let e=Ze__namespace.useContext(Sm);if(!e)throw new Error("Hierarchy components must be used within HierarchyExplorer");return e}function sv({node:e,renderNode:t}){let{selectedId:r,selectNode:o,navigateToNode:n,variant:a,size:i,showBullets:s,rootNodeId:d,stickyRootNode:l,navigationStack:c,setRootNodeSticky:u,useSplitLayout:m}=av(),p=Ze__namespace.useRef(null),g=Ze__namespace.useRef(null),f=r===e.id,x=e.disabled||false,b=!!(e.children&&e.children.length>0),y=!!(e.metadata&&Object.keys(e.metadata).length>0),v=b||y,C=d!==void 0&&e.id!==void 0&&d===e.id&&c.length===0;Ze__namespace.useLayoutEffect(()=>{C&&l&&p.current&&g.current===null&&requestAnimationFrame(()=>{p.current&&(g.current=p.current.offsetTop);});},[C,l]),Ze__namespace.useEffect(()=>{if(!C||!l||!p.current)return;let D=p.current.parentElement;for(;D;){let I=window.getComputedStyle(D).overflowY;if(I==="auto"||I==="scroll")break;D=D.parentElement;}if(!D)return;let R=()=>{if(!p.current||g.current===null)return;let I=D.getBoundingClientRect(),E=D.scrollTop,O=I.height,W=p.current.offsetHeight,F=g.current-E,Y=F+W,U=F<0,V=Y>O;U?u("top",e):V?u("bottom",e):u(null,null);};return D.addEventListener("scroll",R),R(),()=>{D.removeEventListener("scroll",R);}},[C,l,e,u]);let w=()=>{x||(m?o(e):v?n(e):o(e));},S=D=>{x||(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),w());},T={isSelected:f,isDisabled:x,hasChildren:b,hasMetadata:y,level:0},P=tailwindMerge.twMerge("relative cursor-pointer group",x&&"opacity-50 cursor-not-allowed"),k=tailwindMerge.twMerge("absolute inset-0 transition-colors",C&&!f&&!x&&"group-hover:bg-background-hover",C&&f&&!x&&a==="subtle"&&"bg-background-selected group-hover:bg-background-hover",C&&f&&x&&a==="subtle"&&"bg-background-selected",C&&f&&!x&&a==="solid"&&"bg-action-brand group-hover:bg-action-brand-hover",C&&f&&x&&a==="solid"&&"bg-action-brand",!C&&a==="subtle"&&!f&&!x&&"group-hover:bg-background-hover",!C&&a==="subtle"&&f&&!x&&"bg-background-selected group-hover:bg-background-hover",!C&&a==="subtle"&&f&&x&&"bg-background-selected",!C&&a==="solid"&&!f&&!x&&"group-hover:bg-background-hover",!C&&a==="solid"&&f&&!x&&"bg-action-brand group-hover:bg-action-brand-hover",!C&&a==="solid"&&f&&x&&"bg-action-brand"),M=tailwindMerge.twMerge("relative flex items-center gap-2 text-text-primary hover:text-text-primary transition-colors",ht[i].node,C&&!f&&"font-semibold",a==="subtle"&&f&&"text-text-link-default",a==="solid"&&f&&"text-[color:var(--color-action-brand-text)]");return jsxRuntime.jsxs("div",{ref:p,className:P,onClick:w,onKeyDown:S,role:"treeitem","aria-selected":f,"aria-disabled":x,tabIndex:0,"data-node-id":e.id,children:[jsxRuntime.jsx("div",{className:k}),jsxRuntime.jsxs("div",{className:M,children:[s&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full flex items-center justify-center flex-shrink-0 z-20",C&&"bg-action-brand border-action-brand",!C&&"bg-background-muted border border-border-default"),style:{width:ht[i].bullet,height:ht[i].bullet},children:e.icon&&jsxRuntime.jsx(H,{name:e.icon,size:ht[i].icon,weight:C?"fill":"regular",className:C?"text-[color:var(--color-action-brand-text)]":"text-text-primary"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:t?t(e,T):jsxRuntime.jsx("span",{className:"truncate",children:e.name})}),v&&!m&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:jsxRuntime.jsx(H,{name:"CaretRight",size:ht[i].icon,className:"text-text-secondary"})})]})]})}function cv({items:e,showConnector:t=false,scrollContainerRef:r,showBullets:o,size:n,renderNode:a}){return jsxRuntime.jsxs("div",{className:"relative",ref:t&&r?r:void 0,children:[o&&e.length>0&&t&&jsxRuntime.jsx("div",{className:"absolute w-px bg-text-secondary z-10 pointer-events-none",style:{left:`${ht[n].spacing.x+ht[n].bullet/2}px`,top:`${ht[n].spacing.y+ht[n].bullet/2}px`,bottom:`${ht[n].spacing.y+ht[n].bullet/2}px`},"aria-hidden":"true"}),e.map(i=>jsxRuntime.jsx(sv,{node:i,renderNode:a},i.id))]})}function ws({children:e,mode:t="sync",presenceKey:r}){let o=r!==void 0&&Ze__namespace.default.isValidElement(e)?Ze__namespace.default.cloneElement(e,{key:r}):r!==void 0?jsxRuntime.jsx("div",{children:e},r):e;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:t,children:o})}function pv(){let[e,t]=Ze.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return Ze.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>{r.removeEventListener("change",o);}},[]),e}var iL={instant:0,fast:150,normal:250,slow:350,slower:500},wm={xs:"4px",sm:"8px",md:"16px"};function sL(e){return e?typeof e=="string"&&e in wm?wm[e]:typeof e=="number"?`${e}px`:e:wm.sm}function Ns({children:e,direction:t,distance:r="sm",duration:o="normal",delay:n=0,className:a}){let i=pv(),s=typeof o=="number"?o:iL[o],d=sL(r),l=p=>{switch(t){case "left":return {x:`-${p}`};case "right":return {x:p};case "up":return {y:`-${p}`};case "down":return {y:p}}},c=i?{opacity:0}:{opacity:0,...l(d)},u={opacity:1,x:0,y:0},m=i?{opacity:0}:{opacity:0,...l(d)};return jsxRuntime.jsx(framerMotion.motion.div,{className:a,initial:c,animate:u,exit:m,transition:{duration:i?0:s/1e3,delay:i?0:n/1e3,ease:[.4,0,.2,1]},children:e})}function Kc({navigationStack:e,onNavigateBack:t,size:r}){let o=e.length===1?"Back to main":`Back to ${e[e.length-2]?.name}`;return jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-surface border-b border-border-default flex-shrink-0",children:jsxRuntime.jsxs("button",{type:"button",onClick:t,className:tailwindMerge.twMerge("w-full flex items-center gap-2 transition-colors text-left group",ht[r].node),children:[jsxRuntime.jsx(H,{name:"CaretLeft",size:ht[r].icon,className:"text-text-secondary group-hover:text-text-primary transition-colors"}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary group-hover:text-text-link-hover transition-colors",children:o})]})})}function Yc({node:e,position:t,selectedId:r,variant:o,size:n,showBullets:a}){let i=r===e.id;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("absolute z-30 left-0 right-0 border-border-default transition-all duration-200 bg-background-surface",ht[n].node,i?o==="subtle"?"text-text-link-default":"bg-action-brand text-[color:var(--color-action-brand-text)]":"font-semibold",t==="top"&&"top-0 border-b shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1)]",t==="bottom"&&"bottom-0 border-t shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]"),children:[i&&o==="subtle"&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background-selected"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 cursor-pointer relative z-10",children:[a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 rounded-full flex items-center justify-center bg-action-brand border-action-brand",style:{width:ht[n].bullet,height:ht[n].bullet},children:e.icon&&jsxRuntime.jsx(H,{name:e.icon,size:ht[n].icon,weight:"fill",className:"text-[color:var(--color-action-brand-text)]"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("span",{className:"truncate",children:e.name})})]})]})}function fv({currentItems:e,currentParent:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,slideDirection:s,viewKey:d,hasHeight:l,rootNodeStickyState:c,renderNodeList:u,renderDetailContent:m,onNavigateBack:p}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.length===0&&c.position&&c.node&&jsxRuntime.jsx(Yc,{node:c.node,position:c.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Kc,{navigationStack:r,onNavigateBack:p,size:a}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative",l&&"overflow-auto h-full"),children:jsxRuntime.jsx(ws,{mode:"wait",presenceKey:d,children:r.length===0?u(e,true):jsxRuntime.jsx(Ns,{direction:s,distance:"100%",duration:"normal",children:m(t)})})})]})}function Tm(e,t){for(let r of e){if(r.id===t)return r;if(r.children&&r.children.length>0){let o=Tm(r.children,t);if(o)return o}}return null}function Jc(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function gv(e,t){if(process.env.NODE_ENV!=="development")return;let r=new Set,o=(n,a="root")=>{for(let i=0;i<n.length;i++){let s=n[i],d=`${a}[${i}]`;s.id?r.has(s.id)?console.warn(`[HierarchyExplorer] Duplicate node ID found: "${s.id}". Each node must have a unique ID.`):r.add(s.id):console.warn(`[HierarchyExplorer] Node at ${d} is missing an "id" field. Node name: "${s.name||"(unnamed)"}"`),s.children&&o(s.children,`${d}.children`);}};o(e),t&&!r.has(t)&&console.warn(`[HierarchyExplorer] Root node ID "${t}" not found in data. No node will be highlighted as root.`);}function hv({data:e,currentItems:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,rootNodeStickyState:s,renderNodeList:d,renderDetailContent:l,renderEmptyState:c,onNavigateBack:u}){let m=o?Tm(e,o):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 border-r border-border-default flex flex-col relative",children:[r.length===0&&s.position&&s.node&&jsxRuntime.jsx(Yc,{node:s.node,position:s.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Kc,{navigationStack:r,onNavigateBack:u,size:a}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:d(t,r.length===0)})]}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 overflow-auto bg-background-body",children:jsxRuntime.jsx(ws,{mode:"wait",presenceKey:m?.id||"empty",children:m?jsxRuntime.jsx(Ns,{direction:"left",duration:"fast",children:l(m)}):c?c():jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary text-center",ht[a].node,"py-8"),children:"Select an item to view details"})})})]})}function xv({data:e,renderNode:t,onNodeSelect:r,onNavigate:o,selectedId:n,rootNodeId:a,stickyRootNode:i=true,height:s,minHeight:d,maxHeight:l,variant:c="subtle",size:u="md",showBullets:m=true,layout:p="auto",splitBreakpoint:g=768,renderEmptyState:f,renderDetailView:x,className:b,"aria-label":y="Hierarchy explorer"}){let[v,C]=Ze__namespace.useState(null),[w,S]=Ze__namespace.useState([]),[T,P]=Ze__namespace.useState("left"),[k,M]=Ze__namespace.useState({position:null,node:null}),{ref:D,width:R}=ei(),I=Ze__namespace.useMemo(()=>p==="split"?true:p==="single"?false:R>=g,[p,R,g]),E=n!==void 0?n:v;Ze__namespace.useEffect(()=>{gv(e,a);},[e,a]);let O=w.length>0?w[w.length-1]:null,W=O?O.children||[]:e,z=Ze__namespace.useCallback(A=>{P("left"),S(j=>[...j,A]),o?.(A,[...w,A]);},[w,o]),F=Ze__namespace.useCallback(()=>{P("right"),S(A=>{let j=A.slice(0,-1);return o?.(j.length>0?j[j.length-1]:null,j),j});},[o]),Y=Ze__namespace.useCallback(A=>{n===void 0&&C(A.id),r?.(A,[...w,A]);},[n,w,r]),U=Ze__namespace.useCallback((A,j)=>{M({position:A,node:j});},[]),V=Ze__namespace.useMemo(()=>({selectedId:E,selectNode:Y,navigateToNode:z,navigateBack:F,rootNodeId:a,stickyRootNode:i,variant:c,size:u,showBullets:m,onNodeSelect:r,onNavigate:o,navigationStack:w,setRootNodeSticky:U,useSplitLayout:I}),[E,Y,z,F,a,i,c,u,m,r,o,w,U,I]),J=Ze__namespace.useRef(null);Ze__namespace.useEffect(()=>{if(!a||!J.current||w.length>0||I)return;let A=J.current,j=setTimeout(()=>{let ae=A.querySelector(`[data-node-id="${a}"]`);ae&&ae.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"});},100);return ()=>clearTimeout(j)},[a,w.length,I]);let G={height:Jc(s),minHeight:Jc(d),maxHeight:Jc(l)},B=s!==void 0||l!==void 0,N=O?O.id:"root",h=Ze__namespace.useCallback((A,j=false)=>jsxRuntime.jsx(cv,{items:A,showConnector:j,scrollContainerRef:j?J:null,showBullets:m,size:u,renderNode:t}),[m,u,t]),L=Ze__namespace.useCallback(A=>A?x?x(A,h):jsxRuntime.jsx(nv,{node:A,renderNodeList:h}):null,[x,h]);return jsxRuntime.jsx(Sm.Provider,{value:V,children:jsxRuntime.jsx("div",{ref:D,className:tailwindMerge.twMerge("select-none bg-background-surface rounded-lg border border-border-default relative",B&&"overflow-hidden",!B&&"h-full flex flex-col",I&&!B&&"flex-row",I&&B&&"flex",b),style:G,role:"tree","aria-label":y,children:I?jsxRuntime.jsx(hv,{data:e,currentItems:W,navigationStack:w,selectedId:E,variant:c,size:u,showBullets:m,rootNodeStickyState:k,renderNodeList:h,renderDetailContent:L,renderEmptyState:f,onNavigateBack:F}):jsxRuntime.jsx(fv,{currentItems:W,currentParent:O,navigationStack:w,selectedId:E,variant:c,size:u,showBullets:m,slideDirection:T,viewKey:N,hasHeight:B,rootNodeStickyState:k,renderNodeList:h,renderDetailContent:L,onNavigateBack:F})})})}function SL({isEntering:e,isExiting:t,className:r=""}){let o=["group","bg-background-surface","forced-colors:bg-[Canvas]","text-text-primary","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none","p-4","min-w-[260px]","max-w-[360px]"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","zoom-in-95","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",a=t?["animate-out","fade-out","zoom-out-95","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,n,a,r].filter(Boolean).join(" ")}var yv=({children:e,delay:t=700,closeDelay:r=0,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i=false,...s})=>jsxRuntime.jsx(reactAriaComponents.TooltipTrigger,{delay:t,closeDelay:r,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i,...s,children:e}),vv=({children:e,className:t,showArrow:r=false,offset:o,...n})=>jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...n,offset:o??(r?12:8),className:reactAriaComponents.composeRenderProps(t,(i,s)=>SL({...s,className:i})),children:[r&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});vv.displayName="HoverCardContent";var wL=Object.assign(yv,{Root:yv,Content:vv});var kL={md:{fontFamily:"var(--font-family-brand)",fontSize:24,lineHeight:1,letterSpacing:"-0.02em"},lg:{fontFamily:"var(--font-family-brand)",fontSize:34,lineHeight:1.1}},PL={md:{fontSize:12},lg:{fontSize:16}},RL={fontSize:11};function ML(e,t){return yo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function EL(e,t="upIsGood"){if(e===0)return "text-text-secondary";let r=e>0;return t==="upIsGood"?r?"text-feedback-success-text":"text-feedback-error-text":r?"text-feedback-error-text":"text-feedback-success-text"}function LL({points:e,className:t,ariaLabel:r}){let i=e.map(p=>typeof p.y=="number"?p.y:0);if(i.length===0)return null;let s=Math.min(...i),l=Math.max(...i)-s,c=p=>l===0?20/2:18-(p-s)/l*16,u=60/Math.max(e.length-1,1),m=e.map((p,g)=>{let f=2+g*u,x=c(typeof p.y=="number"?p.y:0);return `${g===0?"M":"L"} ${f} ${x}`}).join(" ");return jsxRuntime.jsx("svg",{width:64,height:20,role:"img","aria-label":r,className:tailwindMerge.twMerge("overflow-visible",t),children:jsxRuntime.jsx("path",{d:m,fill:"none",strokeWidth:"1.5",className:"stroke-border-muted"})})}var Cv=100,ka=30,Sv=1.5,wv=4,DL=12;function AL(e,t){if(e.length<=t)return e;let r=(e.length-1)/(t-1),o=[];for(let n=0;n<t;n++)o.push(e[Math.round(n*r)]);return o}function IL(e){if(e.length<2)return e.length===1?`M ${e[0][0]} ${e[0][1]}`:"";let t=`M ${e[0][0]} ${e[0][1]}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],a=e[r+1],i=e[r+2]??a,s=n[0]+(a[0]-o[0])/6,d=n[1]+(a[1]-o[1])/6,l=a[0]-(i[0]-n[0])/6,c=a[1]-(i[1]-n[1])/6;t+=` C ${s} ${d} ${l} ${c} ${a[0]} ${a[1]}`;}return t}function FL({points:e,gradientId:t,tone:r,className:o}){if(!e||e.length<2)return null;let n=AL(e,DL),a=n.map(x=>typeof x.y=="number"?x.y:0),i=Math.min(...a),d=Math.max(...a)-i,l=x=>d===0?ka/2:ka-wv-(x-i)/d*(ka-2*wv),c=(Cv-2*Sv)/Math.max(n.length-1,1),u=n.map((x,b)=>[Sv+b*c,l(typeof x.y=="number"?x.y:0)]),m=IL(u),p=u[u.length-1],g=u[0],f=`${m} L ${p[0]} ${ka} L ${g[0]} ${ka} Z`;return jsxRuntime.jsxs("svg",{width:"100%",height:ka,viewBox:`0 0 ${Cv} ${ka}`,preserveAspectRatio:"none",role:"img","aria-label":"Trend",className:tailwindMerge.twMerge("mt-2 block w-full",r,o),children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:.22}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:0})]})}),jsxRuntime.jsx("path",{d:f,fill:`url(#${t})`,stroke:"none"}),jsxRuntime.jsx("path",{d:m,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}function Nv({label:e,value:t,formatter:r,delta:o,deltaPeriodLabel:n,deltaIntent:a="upIsGood",trend:i,status:s,helpText:d,size:l="md",orientation:c="vertical",isLoading:u,empty:m,error:p,onClick:g,className:f,labelClassName:x,renderValue:b,renderDelta:y,renderTrend:v,unit:C,sub:w,dashed:S,sparkVariant:T="line",sparkTone:P,tileValueSize:k}){let M=Ze.useId(),R={sm:{label:Mt("labelSm"),value:Mt("displaySm"),delta:Mt("labelSm"),gap:"gap-1"},md:{label:Mt("labelMd"),value:Mt("displayMd"),delta:Mt("bodySm"),gap:"gap-2"},lg:{label:Mt("labelLg"),value:Mt("displayLg"),delta:Mt("bodyMd"),gap:"gap-3"}}[l],I=F=>k?jsxRuntime.jsxs("span",{style:kL[k],className:S?"opacity-45":void 0,children:[F,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",style:PL[k],children:[" ",C]}):null]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[F,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",children:[" ",C]}):null]}),E=u?jsxRuntime.jsx(q,{className:"h-7 w-20"}):m?jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"}):p?jsxRuntime.jsx("span",{className:Mt("bodySm","text-feedback-error"),children:typeof p=="string"?p:"Error"}):S?I("\u2014"):b?b(t):I(k?t:ML(t,r)),O=y?y(o):o!==void 0&&!u&&!m&&!p&&!S?jsxRuntime.jsxs("div",{className:br(R.delta,EL(o,a),"flex items-center gap-1"),children:[o>0&&jsxRuntime.jsx(H,{name:"ArrowUp",size:12}),o<0&&jsxRuntime.jsx(H,{name:"ArrowDown",size:12}),o===0&&jsxRuntime.jsx(H,{name:"Minus",size:12}),jsxRuntime.jsxs("span",{children:[o>0?"+":"",Math.abs(o).toFixed(1),"%"]}),n&&jsxRuntime.jsxs("span",{className:"text-text-secondary",children:["\xB7 ",n]})]}):u&&o!==void 0?jsxRuntime.jsx(q,{className:"h-4 w-24"}):null,W=v?v(i):i&&i.length>0&&!u&&!p&&!S?T==="area"?jsxRuntime.jsx(FL,{points:i,gradientId:M,tone:P,className:m?"opacity-30":""}):jsxRuntime.jsx(LL,{points:i,ariaLabel:`${e} trend`,className:m?"opacity-30":""}):u&&i!==void 0?jsxRuntime.jsx(q,{className:"h-5 w-16"}):null,z=w&&!u&&!p?jsxRuntime.jsx("div",{className:"text-text-secondary",style:RL,children:w}):null;return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("flex min-w-0",c==="horizontal"?`items-center ${R.gap}`:`flex-col ${R.gap}`,g&&"cursor-pointer hover:bg-background-muted rounded-lg px-3 py-2 -mx-3 -my-2 transition-colors",f),"aria-labelledby":`kpi-${e}`,onClick:g,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{id:`kpi-${e}`,className:tailwindMerge.twMerge(br(R.label,"text-text-secondary truncate"),x),children:u?jsxRuntime.jsx(q,{className:"h-4 w-24"}):e}),d&&!u&&jsxRuntime.jsx(H,{name:"Question",size:12,className:"text-text-secondary cursor-help","aria-label":"Help"})]}),jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("output",{className:br(k?void 0:R.value,p?"text-feedback-error":"text-text-primary"),"aria-label":`Value: ${t}`,children:E}),s&&!u&&!p&&jsxRuntime.jsx(gt,{variant:s.tone||"neutral",size:"sm",children:s.value})]}),z,(O||W)&&jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[O,W]})]})}var Tv={xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-6",xl:"gap-8"},kv={start:"items-start",center:"items-center",stretch:"items-stretch"};function Pv(e){if(typeof e=="number")return `grid-cols-${e}`;let t=[];return e.base!==void 0&&t.push(`grid-cols-${e.base}`),e.sm!==void 0&&t.push(`sm:grid-cols-${e.sm}`),e.md!==void 0&&t.push(`md:grid-cols-${e.md}`),e.lg!==void 0&&t.push(`lg:grid-cols-${e.lg}`),e.xl!==void 0&&t.push(`xl:grid-cols-${e.xl}`),e["2xl"]!==void 0&&t.push(`2xl:grid-cols-${e["2xl"]}`),t.join(" ")}function Rm({children:e,cols:t={base:1,sm:2,md:3,lg:4},gap:r="md",align:o="stretch",equalizeHeights:n=true,header:a,isLoading:i,scrollOnMobile:s=false,scrollItemMinWidth:d="140px",className:l}){let c=i?Ze__namespace.default.Children.map(e,p=>Ze__namespace.default.isValidElement(p)&&p.type&&typeof p.type!="string"&&"displayName"in p.type?Ze__namespace.default.cloneElement(p,{isLoading:true}):p):e,u=s?Ze__namespace.default.Children.map(c,p=>jsxRuntime.jsx("div",{className:"shrink-0",style:{minWidth:d},children:p})):c,m=s?tailwindMerge.twMerge("flex overflow-x-auto pb-2 -mb-2",Tv[r],"sm:grid sm:overflow-visible sm:pb-0 sm:-mb-0",Pv({...typeof t=="object"?t:{base:t},base:void 0}),kv[o],n&&"sm:auto-rows-fr"):tailwindMerge.twMerge("grid",Pv(t),Tv[r],kv[o],n&&"auto-rows-fr","w-full");return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("w-full",l),"aria-label":"Key metrics",children:[a&&jsxRuntime.jsx("div",{className:"mb-4",children:a}),jsxRuntime.jsx("div",{className:m,children:s?u:c})]})}Rm.displayName="KpiGroup";function Ev({items:e,renderItem:t,selectedId:r,onSelect:o,onHoverChange:n,isLoading:a=false,loadingState:i,error:s=null,renderLoadingSkeleton:d,loadingSkeletonCount:l=5,emptyMessage:c="No results found.",variant:u="relaxed",showDividers:m=true,onLoadMore:p,hasMore:g=false,enableVirtualization:f,estimatedItemSize:x=60,loadingIndicator:b,"aria-label":y,className:v="",style:C}){let[w,S]=Ze.useState(null),T=Ze.useRef(null),P=Ze.useRef(new Map),{scrollRef:k,loadMoreRef:M,virtualizer:D,virtualItems:R,isLoadingMore:I,computedLoadingState:E}=fn({items:e,onLoadMore:p,hasMore:g,isLoading:a,loadingState:i,enableVirtualization:f,estimatedItemSize:x,overscan:5}),O=k??T,W=Ze.useCallback((h,L)=>{o?.(h,L);},[o]),z=Ze.useCallback((h,L)=>{S(h),n?.(h,L);},[n]),F=Ze.useCallback((h,L)=>{let A=h?.id;return typeof A=="string"&&A?A:`item-${L}`},[]),Y=Ze.useCallback(h=>{if(!O.current||e.length===0)return;let L=document.activeElement,A=e.findIndex((ee,ie)=>{let Ee=F(ee,ie),le=P.current.get(Ee);return le&&(le===L||le.contains(L))}),j=A;switch(h.key){case "ArrowDown":h.preventDefault(),j=A===-1?0:Math.min(A+1,e.length-1);break;case "ArrowUp":h.preventDefault(),j=A===-1?0:Math.max(A-1,0);break;case "Home":h.preventDefault(),j=0;break;case "End":h.preventDefault(),j=e.length-1;break;default:return}let ae=F(e[j],j);P.current.get(ae)?.focus();},[e,F,O]),U=["flex flex-col","bg-background-surface","focus:outline-none focus:ring-2 focus:ring-border-focus focus:ring-offset-2"],V={dense:"gap-0",relaxed:"gap-0"},J=m?"divide-y divide-border-muted":"",G=[...U,V[u],J,v].filter(Boolean).join(" ");if(E==="loading"||a&&e.length===0){let h=d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:l}).map((L,A)=>jsxRuntime.jsx("div",{children:d()},`skeleton-${A}`))}):jsxRuntime.jsx(Mg,{count:l,className:"space-y-0",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[jsxRuntime.jsx(q,{width:16,height:16,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(q,{width:"75%",height:16}),jsxRuntime.jsx(q,{width:"50%",height:14})]}),jsxRuntime.jsx(q,{width:60,height:20})]})});return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-busy":"true","aria-live":"polite",children:h})}if(s)return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:s})});if(e.length===0)return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:c})});let N=D?R?.map(h=>({virtualItem:h,item:e[h.index],index:h.index}))||[]:e.map((h,L)=>({item:h,index:L,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:O,className:G,style:{...C,...p&&{overflow:"auto",height:C?.height||"600px"}},role:"listbox","aria-label":y,"aria-live":"polite",onKeyDown:Y,tabIndex:0,children:[D&&jsxRuntime.jsxs("div",{style:{height:`${D.getTotalSize()}px`,width:"100%",position:"relative"},children:[N.map(({virtualItem:h,item:L,index:A})=>{if(!h)return null;let j=F(L,A),ae=r===j,_=w===j,ee={id:j,role:"option","aria-selected":ae,"aria-current":ae?"page":void 0,tabIndex:ae||r==null&&A===0?0:-1,onClick:ie=>W(ie,L),onMouseEnter:ie=>z(ie,L),onMouseLeave:ie=>z(null),onFocus:ie=>z(ie,L),onBlur:ie=>z(null),ref:ie=>{ie?P.current.set(j,ie):P.current.delete(j);}};return jsxRuntime.jsx("div",{"data-index":h.index,ref:D.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${h.start}px)`},children:t({item:L,index:A,isSelected:ae,isHovered:_,rowProps:ee})},j)}),p&&g&&jsxRuntime.jsx("div",{ref:M,style:{position:"absolute",top:`${D.getTotalSize()}px`,left:0,width:"100%",height:1,pointerEvents:"none"}}),I&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${D.getTotalSize()}px`,left:0,width:"100%"},children:b||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}),!D&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[N.map(({item:h,index:L})=>{let A=F(h,L),j=r===A,ae=w===A,_={id:A,role:"option","aria-selected":j,"aria-current":j?"page":void 0,tabIndex:j||r==null&&L===0?0:-1,onClick:ee=>W(ee,h),onMouseEnter:ee=>z(ee,h),onMouseLeave:ee=>z(null),onFocus:ee=>z(ee,h),onBlur:ee=>z(null),ref:ee=>{ee?P.current.set(A,ee):P.current.delete(A);}};return jsxRuntime.jsx("div",{children:t({item:h,index:L,isSelected:j,isHovered:ae,rowProps:_})},A)}),p&&g&&jsxRuntime.jsx("div",{ref:M,style:{height:1}}),I&&(b||jsxRuntime.jsx(Xr,{state:"loading-more"}))]})]})}function Dv({id:e,title:t,subtitle:r,meta:o,leading:n,trailing:a,isSelected:i=false,isHovered:s=false,disabled:d=false,href:l,size:c="md",onClick:u,onMouseEnter:m,onMouseLeave:p,className:g="",style:f,piiTitleType:x,piiSubtitleType:b,piiEntity:y}){let v=()=>{!d&&u&&u(e);},C=()=>{!d&&m&&m(e);},w=()=>{!d&&p&&p(e);},T={sm:{container:"px-3 py-2 gap-2",title:"text-sm leading-tight",subtitle:"text-xs leading-tight",meta:"text-xs leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},md:{container:"px-4 py-3 gap-3",title:"text-base leading-tight",subtitle:"text-sm leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},lg:{container:"px-4 py-4 gap-3",title:"text-lg leading-tight",subtitle:"text-base leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},xl:{container:"px-5 py-5 gap-4",title:"text-xl leading-tight",subtitle:"text-base leading-tight",meta:"text-base leading-tight",subtitleSpacing:"mt-1.5",metaSpacing:"mt-1.5"}}[c],P=["flex items-center w-full text-left transition-all duration-200 ease-in-out",T.container,"border-l-2 border-l-transparent","rounded-sm",ot()],k=[s&&!i&&"bg-background-hover",i&&"bg-action-default/5 border-l-action-default shadow-sm",d&&"opacity-50 cursor-not-allowed",!d&&!i&&"hover:bg-background-hover"],M=[...P,...k,g].filter(Boolean).join(" "),D=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("div",{className:"flex items-start justify-between gap-2",children:jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:`text-text-primary font-medium truncate ${T.title}`,title:typeof t=="string"?t:void 0,"data-pii-type":x&&y?x:void 0,"data-pii-entity":x&&y?y:void 0,children:t}),r&&jsxRuntime.jsx("div",{className:`text-text-secondary truncate ${T.subtitle} ${T.subtitleSpacing}`,title:typeof r=="string"?r:void 0,"data-pii-type":b&&y?b:void 0,"data-pii-entity":b&&y?y:void 0,children:r}),o&&jsxRuntime.jsx("div",{className:`text-text-secondary ${T.meta} ${T.metaSpacing}`,children:o})]})})}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a})]});return l?jsxRuntime.jsx("a",{href:l,className:M,style:f,onMouseEnter:C,onMouseLeave:w,"aria-selected":i,"aria-current":i?"page":void 0,tabIndex:d?-1:0,children:D}):jsxRuntime.jsx("button",{type:"button",className:M,style:f,onClick:v,onMouseEnter:C,onMouseLeave:w,disabled:d,"aria-selected":i,tabIndex:d?-1:0,children:D})}function Av({header:e,children:t,footer:r,width:o="md",tone:n="neutral",elevation:a="sm",showDivider:i=true,"aria-label":s,"aria-labelledby":d,className:l="",style:c}){let u={sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[28rem]","2xl":"w-[32rem]",auto:"w-auto"},m={neutral:"bg-background-surface",subtle:"bg-background-subtle",brand:"bg-background-brand"},p={none:"",sm:"shadow-sm",md:"shadow-md"},g=tailwindMerge.twMerge("flex flex-col h-full",u[o],m[n],p[a],i&&"border-r border-border-muted",l);return jsxRuntime.jsxs("div",{className:g,style:c,role:"complementary","aria-label":s,"aria-labelledby":d,children:[e&&jsxRuntime.jsx("div",{className:"flex-shrink-0 sticky top-0 z-10 bg-inherit border-b border-border-muted",children:e}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:t}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-muted bg-inherit",children:r})]})}function UL({children:e,...t}){return jsxRuntime.jsx(reactAriaComponents.ListBox,{...t,className:Ie(t.className,"outline-0"),children:e})}function Zc(){try{if(typeof process<"u"){let e=process.env.MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{if(typeof process<"u"){let e=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{let e=undefined.VITE_MAPBOX_ACCESS_TOKEN;if(e)return e}catch{}}function _c(e,t){let[r,o]=Ze.useState(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.error(`Error reading localStorage key "${e}":`,i),t}});Ze.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(r));}catch(i){console.error(`Error writing to localStorage key "${e}":`,i);}},[e,r]);let n=Ze.useCallback(i=>{try{o(s=>i instanceof Function?i(s):i);}catch(s){console.error(`Error setting value for localStorage key "${e}":`,s);}},[e]),a=Ze.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e),o(t);}catch(i){console.error(`Error removing localStorage key "${e}":`,i);}},[e,t]);return [r,n,a]}var Em=[{type:"navigation",position:"bottom-right",showCompass:true,showGeolocate:true,showResetZoom:true}];function Fv(e="top-right"){switch(e){case "top-left":return "absolute top-4 left-4 z-10";case "top-right":return "absolute top-4 right-4 z-10";case "bottom-left":return "absolute bottom-4 left-4 z-10";case "bottom-right":return "absolute bottom-4 right-4 z-10";default:return "absolute top-4 right-4 z-10"}}var qL="h-12 w-12 md:h-10 md:w-10 p-0 bg-background-surface hover:bg-background-hover shadow-lg border border-border";function Bv(e){return tailwindMerge.twMerge(qL,e)}var Vv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAACXCAYAAAAYn8l5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABtCSURBVHgB7Z2Jkty0GoV7hlz2HcIeSPGkPCmELRC2sO8kN5+L03XmR7IlW3LbSZ+qrp7pdtuydPTvki9u3Lhx/7ASLi4uDvfv973cvXv3Dn/++efh2rVrx2vyAo899tjwThu8Hfo+1d5SLLkv2vXzzz8fnnvuucPff/99eFhw7bAi/vnnn8Pl5eWVz3IDOHewGKgnnnjiCoEgHH///vvvh8cff3z4nrbE63lb+LvFQHMe2jR2P7p2bNMe4f24Grk02LkOjCQTCfmNE3KKdLo5l1jCk08+efjtt98OP/300yAlUgRTW3RdiLkEJZOEa4hccfItuWaN5O2B1cg1daNxEHzg4wCj8koGLXVOCMbnP/zww+GZZ54ZpIoGV8eLoC3IVYNWZPDzRIncG36t5dNkZ5CKfPHFFw9//PHH4ddffz3aYi7tJGkjkXvZjCJy6/P7/bRAzaTeJblaSJO//vrr8PTTTw/2F1IMSCX5gHAtV1VzpEBJe//3v/8NNl4vKdNDKo4dM5gVhxXR21OsgWwc3l944YXBFsPglxQDfM9rjXbTDqnnhwWrkStlYJ8aag8Ekv31448/DpJK3021me9RnU7KiOhktAh9zMWaE3zVUMSWgdSAIHiRxJxQU5CmVAWPOQAMaAxrOIH1++hYtIYb92sY+o+cQT8FpBgEo/NRlaWhgVpCxOPXkFqRzL2vdSZXgGyxp556avh/K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SLSZBQSF3maHFuDcVGsLHjqrgKZLUX5JqjGehdg3ULYhq7fAkpy5voaGxxtFgmygtNBJMSfalN4Ghq0DVGhNw+TbZUJBvl6KdlImJXLsphrcJtyi/rBx7bNiPF3drqCfiaI7S/0yAfzPgdNJKqQ+lwh1XfSmYClPT+R2b/03chQhh/fQH7Dav+EOO2oojEn8WdyuYzZbw6+e/WpX6eGYK0xR3BJhumCL/0lYS1EWShiFKXp4HOjIdwcvzNzjuNg4uobmh3lmZNljg+RHIokP7iJ+//S9/0JF4UWgALQSUifcPn+AvCxKcp8u7vR5XAiSC3WYDByQWZ1myzFUtOgbu577+f5ZPq/B5Pf+nAAAAAElFTkSuQmCC";function $c(e){return e.selection?.mode==="single"}function Vn(e){let t=[],r=o=>{o.layerId&&t.push(o.layerId);for(let n of o.children??[])r(n);};return r(e),t}function Lm(e,t){let r=Vn(e);if(r.length===0)return "unchecked";let o=0;for(let n of r)t(n)&&o++;return o===0?"unchecked":$c(e)||o===r.length?"checked":"indeterminate"}var Pa=(e,t)=>Object.fromEntries(e.map(r=>[r,t]));function Wv(e,t){let r=Vn(e);if(!(Lm(e,t)!=="checked"))return Pa(r,false);if($c(e)){let n=e.children?.[0],a=n?Vn(n):[];return {...Pa(r,false),...Pa(a,true)}}return Pa(r,true)}function Uv(e,t,r){let o=e.children?.find(s=>s.id===t);if(!o)return {};let n=Vn(e),a=Vn(o);return a.length>0&&a.every(r)?e.selection?.mode==="single"&&e.selection.allowNone?Pa(a,false):{}:{...Pa(n,false),...Pa(a,true)}}function Dm(e,t){for(let r of e){if(r.id===t)return r;let o=Dm(r.children??[],t);if(o)return o}}function Am(e,t){for(let r of e){if(r.children?.some(n=>n.id===t))return r;let o=Am(r.children??[],t);if(o)return o}}function Kv(e){let t=new Set,r=new Set,o=new Set,n=(i,s)=>{i&&(s.has(i)?o.add(i):s.add(i));},a=i=>{n(i.id,t),n(i.layerId,r);for(let s of i.children??[])a(s);};for(let i of e)a(i);return [...o]}function Jv(e){return e.map(t=>({id:t.id,label:t.label,...t.children?.length?{children:Jv(t.children)}:{}}))}function Xv(e){let t=e.length;for(let r of e)r.children?.length&&(t=Math.max(t,Xv(r.children)));return t}function Yv({type:e,color:t}){let r=t?{backgroundColor:t}:void 0;switch(e){case "line":return jsxRuntime.jsx("span",{className:"inline-block h-0.5 w-4 flex-shrink-0 rounded-full",style:r});case "polygon":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-3.5 flex-shrink-0 rounded-sm border border-border",style:r});case "pin":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-2.5 flex-shrink-0 rotate-45 rounded-full rounded-bl-none border border-border",style:r});default:return null}}function jL({isSelected:e,onPress:t,label:r}){return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":e,"aria-label":r,onClick:t,className:`grid h-4 w-4 flex-shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-transparent p-0 ${e?"border-action-primary":"border-border-default"}`,children:e?jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-action-primary"}):null})}function QL(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx("path",{d:"M4.5 2.5 8 6l-3.5 3.5"})})}var ZL=41,_L=44,$L=132,eD=360;function qv({tree:e,layers:t,onVisibilityChange:r}){let o=new Map(t.map(s=>[s.id,s])),n=s=>{let d=o.get(s);return !!d&&d.visible!==false};if(process.env.NODE_ENV!=="production"){let s=Kv(e);s.length>0&&console.warn(`[LayersPanel] Duplicate id(s) in \`layerTree\`: ${s.join(", ")}. Row lookups and pane keys resolve to the first match, so the later entry is unreachable. Node ids must be unique among node ids, and layer ids unique among layer ids.`);let d=e.flatMap(Vn).filter(l=>!o.has(l));d.length>0&&console.warn(`[LayersPanel] \`layerTree\` references layer id(s) not present in \`layers\`: ${d.join(", ")}. Those rows render as hidden and cannot be turned on.`);}let a=Jv(e),i=Math.min(eD,Math.max($L,Xv(e)*ZL+_L));return jsxRuntime.jsx("div",{className:"overflow-hidden",style:{height:i},"data-layers-panel":"",children:jsxRuntime.jsx($a,{items:a,ariaLabel:"Map layers",animated:false,width:null,sticky:false,theme:{background:"transparent",borderColor:"transparent"},className:"h-full w-full",renderRow:({item:s,hasChildren:d,select:l})=>{let c=Dm(e,s.id);if(!c)return null;let u=Lm(c,n),p=(c.layerId?o.get(c.layerId):void 0)?.legend,g=Vn(c),f=g.filter(n).length,x=d&&u==="indeterminate"?`${f} of ${g.length} on`:null,b=Am(e,c.id),y=!!b&&$c(b),v=S=>{Object.keys(S).length>0&&r?.(S);},C=y?jsxRuntime.jsx(jL,{isSelected:u!=="unchecked",onPress:()=>v(Uv(b,c.id,n)),label:c.label}):jsxRuntime.jsx(io,{isSelected:u==="checked",isIndeterminate:u==="indeterminate",onChange:()=>v(Wv(c,n)),"aria-label":c.label}),w=jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[jsxRuntime.jsx("span",{className:`truncate text-sm ${u==="unchecked"?"text-text-secondary":"text-text-primary"}`,children:c.label}),x?jsxRuntime.jsx("span",{className:"text-[10px] text-text-secondary",children:x}):null]});return jsxRuntime.jsxs("div",{className:"edges-layers-panel__row flex cursor-default items-center gap-2 py-2.5",children:[C,d?jsxRuntime.jsxs("button",{type:"button",onClick:l,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left","aria-label":`Open ${c.label}`,children:[p?jsxRuntime.jsx(Yv,{type:p.swatch,color:p.color}):null,w,jsxRuntime.jsx(QL,{})]}):jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[p?jsxRuntime.jsx(Yv,{type:p.swatch,color:p.color}):null,w]})]})}})})}function On({position:e="top-right",className:t,style:r,children:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(Fv(e),t),style:r,children:o})}function Kr({icon:e,iconSize:t=24,onPress:r,isDisabled:o=false,className:n,iconClassName:a="text-text-primary",variant:i="secondary",isActive:s=false,ariaLabel:d,iconWeight:l="regular",...c}){let u=tailwindMerge.twMerge(Bv(),s&&"bg-action-brand hover:bg-action-brand-hover border-action-brand",n),m=tailwindMerge.twMerge(a,s&&"text-text-inverse");return jsxRuntime.jsx(re,{...c,className:u,onPress:r,variant:i,size:"sm",isDisabled:o,"aria-label":d,"aria-pressed":s||void 0,type:"button",children:jsxRuntime.jsx(H,{name:e,size:t,className:m,weight:l})})}var iD=e=>[{id:"streets",name:"Streets",description:"Standard street map with traffic data",preview:e?Hv:Gv},{id:"satellite",name:"Satellite",description:"Aerial imagery with street labels",preview:zv},{id:"neutral",name:"Neutral",description:"Clean design with light/dark variants",preview:e?Vv:Ov}];function sD({type:e,color:t}){let r="inline-block",o=t?{backgroundColor:t}:{};switch(e){case "dot":return null;case "line":return jsxRuntime.jsx("span",{className:`${r} h-0.5 w-6 rounded-full`,style:o});case "polygon":return jsxRuntime.jsx("span",{className:`${r} h-3 w-4 rounded-sm border border-border`,style:o});case "pin":return jsxRuntime.jsx("span",{className:`${r} h-3 w-3 rounded-full rounded-bl-none border border-border transform rotate-45`,style:o});default:return null}}function Zv({position:e="bottom-left",className:t,style:r,currentMapType:o="streets",onMapTypeChange:n,layers:a=[],onLayerToggle:i,onClearAll:s,onLayerVariantChange:d,layerTree:l,onVisibilityChange:c}){let{isDarkTheme:u}=er(),{isMobile:m}=gr(),[p,g]=Ze.useState(false),f=iD(u),x=v=>{n?.(v);},b=a.filter(v=>v.legend),y=jsxRuntime.jsxs("div",{className:m?"space-y-6 pb-6":"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary mb-3",children:"Map type"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-3",children:f.map(v=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(v.id),className:"flex flex-col items-center space-y-2 p-3 rounded-lg text-center hover:bg-background-muted transition-colors border border-transparent "+(o===v.id?"bg-background-muted border-border":"hover:border-border"),children:[jsxRuntime.jsx("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-background-surface "+(o===v.id?"border-2 border-action-default":"border border-border-default"),children:jsxRuntime.jsx("img",{src:v.preview,alt:`${v.name} map preview`,className:"w-full h-full object-cover"})}),jsxRuntime.jsx("div",{className:"text-sm "+(o===v.id?"font-bold text-text-primary":"font-normal text-text-secondary"),children:v.name})]},v.id))})]}),l?.length?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx(qv,{tree:l,layers:a,onVisibilityChange:c})]}):null,!l?.length&&b.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx("div",{className:"space-y-2",children:b.map(v=>{let C=v.visible!==false,w=v.legend?.variants;return jsxRuntime.jsxs("div",{className:w?"space-y-1.5":void 0,children:[jsxRuntime.jsx(io,{isSelected:C,onChange:()=>i?.(v.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[v.legend&&jsxRuntime.jsx(sD,{type:v.legend.swatch,color:v.legend.color}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:v.legend?.label})]})}),w&&jsxRuntime.jsx("div",{className:"pl-6",children:jsxRuntime.jsx(Ko,{"aria-label":`${v.legend?.label} mode`,size:"sm",isDisabled:!C,items:w.options.map(S=>({...S,value:S.id})),renderItem:S=>S.label,selectedKey:w.selectedId,onSelectionChange:S=>d?.(v.id,String(S))})})]},v.id)})})]})]});return jsxRuntime.jsx(On,{position:e,className:t,style:r,children:jsxRuntime.jsx("div",{className:"relative",children:m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kr,{icon:"Stack",ariaLabel:"Map layers and settings",onPress:()=>g(true)}),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),title:"Map layers",animationVariant:"scale",children:y})]}):jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsx(Kr,{icon:"Stack",ariaLabel:"Map layers and settings"}),jsxRuntime.jsx(St,{placement:"top start",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{"aria-label":"Map layers and settings",className:"p-4 min-w-80 bg-background-surface border border-border rounded-lg shadow-xl focus:outline-none focus:ring-0",children:y})})]})})})}function $v({position:e="top-right",className:t,style:r,onToggle:o,isActive:n=false}){return jsxRuntime.jsx(On,{position:e,className:tailwindMerge.twMerge("md:hidden",t),style:r,children:jsxRuntime.jsx(Kr,{icon:"ListDashes",onPress:o,isActive:n,ariaLabel:n?"Hide list view":"Show list view"})})}var uD={sm:"gap-2",md:"gap-4",lg:"gap-6"};function td({position:e="top-right",className:t,style:r,children:o,orientation:n="vertical",spacing:a="md"}){return jsxRuntime.jsx(On,{position:e,style:r,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex",n==="vertical"?"flex-col":"flex-row",uD[a],t),children:o})})}function tC({mapRef:e,position:t="bottom-right",className:r,style:o,showCompass:n=true,showGeolocate:a=true,showResetZoom:i=true,onResetZoom:s,onCompassClick:d,onGeolocateClick:l}){let[c,u]=Ze.useState(false),m=Ze.useRef(true);Ze.useEffect(()=>()=>{m.current=false;},[]);let p=()=>{d?d():e.current&&e.current.easeTo({bearing:0,duration:500});},g=async()=>{if(!c)if(l)l();else {if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}if(navigator.permissions?.query)try{if((await navigator.permissions.query({name:"geolocation"})).state==="denied"){console.warn("Geolocation permission was previously denied. Please enable location services in your browser settings.");return}}catch{}u(true),navigator.geolocation.getCurrentPosition(v=>{if(!m.current)return;let{latitude:C,longitude:w}=v.coords;e.current&&e.current.flyTo({center:[w,C],zoom:15,duration:2e3}),u(false);},v=>{if(m.current){switch(console.warn("Geolocation error:",{code:v.code,message:v.message,PERMISSION_DENIED:v.PERMISSION_DENIED,POSITION_UNAVAILABLE:v.POSITION_UNAVAILABLE,TIMEOUT:v.TIMEOUT}),v.code){case v.PERMISSION_DENIED:console.warn("Location access denied. Please enable location services in your browser settings.");break;case v.POSITION_UNAVAILABLE:console.warn("Location information unavailable.");break;case v.TIMEOUT:console.warn("Location request timed out.");break;default:console.warn("Error getting location:",v.message);break}u(false);}},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});}};if(!n&&!a&&!i)return null;let f=!i&&n,x=!i&&!n&&a,b=!a&&n;return jsxRuntime.jsxs(td,{position:t,className:r,style:o,spacing:"sm",children:[i&&jsxRuntime.jsx(Kr,{icon:"ArrowsOut",onPress:s,ariaLabel:"Reset zoom to show all points",className:tailwindMerge.twMerge(!(!a&&!n&&i)&&"rounded-b-none",n&&"border-b-0")}),n&&jsxRuntime.jsx(Kr,{icon:"Compass",onPress:p,ariaLabel:"Reset map orientation",className:tailwindMerge.twMerge(!f&&"rounded-t-none border-t-0",!b&&"rounded-b-none border-b-0")}),a&&jsxRuntime.jsx(Kr,{icon:c?"Spinner":"NavigationArrow",onPress:g,isDisabled:c,ariaLabel:"Go to my location",iconClassName:tailwindMerge.twMerge("text-text-primary",c&&"animate-spin"),className:tailwindMerge.twMerge(!x&&"rounded-t-none border-t-0",!x&&n&&"lg:rounded-t lg:border-t")})]})}function aC({position:e="top-left",className:t,style:r,onSearch:o,placeholder:n="Search places...",showSearchInput:a=true}){let[i,s]=Ze.useState(false),[d,l]=Ze.useState(""),c=()=>{a?s(!i):o&&o("");},u=p=>{p.preventDefault(),o&&d.trim()&&(o(d.trim()),s(false));},m=p=>{p.key==="Escape"&&s(false);};return jsxRuntime.jsx(On,{position:e,className:t,style:r,children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(Kr,{icon:"MagnifyingGlass",onPress:c,ariaLabel:"Search"}),i&&a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute top-12 left-0 min-w-64","bg-background-surface border border-border rounded-lg shadow-xl p-3"),children:jsxRuntime.jsx("form",{onSubmit:u,children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"text",value:d,onChange:p=>l(p.target.value),onKeyDown:m,placeholder:n,className:tailwindMerge.twMerge("flex-1 px-3 py-2 text-sm rounded border","bg-background border-border text-text-primary placeholder:text-text-secondary","focus:outline-none focus:ring-2 focus:ring-action-brand"),autoFocus:true}),jsxRuntime.jsx(re,{type:"submit",variant:"primary",size:"sm",className:"px-3 py-2",children:"Search"})]})})})]})})}var bD={navigation:"bottom-right",layers:"bottom-left",search:"top-left",list:"top-right",custom:"top-right"};function Fm(e){return e.position??bD[e.type]}function iC(e,t,r){let o=Fm(e),n=e.id??`${e.type}-${t}`;switch(e.type){case "navigation":{let i=e.showResetZoom!==false&&r.showResetButton;return jsxRuntime.jsx(tC,{mapRef:r.mapRef,position:o,showCompass:e.showCompass,showGeolocate:e.showGeolocate,showResetZoom:i,onResetZoom:e.onResetZoom,onCompassClick:e.onCompassClick,onGeolocateClick:e.onGeolocateClick,style:e.style,className:e.className},n)}case "layers":return jsxRuntime.jsx(Zv,{position:o,currentMapType:e.currentMapType,onMapTypeChange:e.onMapTypeChange,layers:e.layers??r.layers,onLayerToggle:e.onLayerToggle,onClearAll:e.onClearAll,onLayerVariantChange:e.onLayerVariantChange,layerTree:e.layerTree,onVisibilityChange:e.onVisibilityChange,style:e.style,className:e.className},n);case "search":return jsxRuntime.jsx(aC,{position:o,onSearch:e.onSearch,placeholder:e.placeholder,showSearchInput:e.showSearchInput,style:e.style,className:e.className},n);case "list":return jsxRuntime.jsx($v,{position:o,onToggle:e.onToggle,isActive:e.isActive,style:e.style,className:e.className},n);case "custom":return jsxRuntime.jsx("div",{children:e.render(r)},n);default:return null}}function Bm(e,t){let r=e.reduce((n,a,i)=>{let s=Fm(a);return n[s]||(n[s]=[]),n[s].push({control:a,index:i}),n},{}),o=[];for(let[n,a]of Object.entries(r)){if(a.length===1){o.push(iC(a[0].control,a[0].index,t));continue}let i={position:"static",top:"auto",right:"auto",bottom:"auto",left:"auto"};o.push(jsxRuntime.jsx(td,{position:n,spacing:"sm",children:a.map(({control:s,index:d})=>{let l={...s,style:{...s.style,...i}};return iC(l,d,t)})},`group-${n}`));}return o}var Vm={vector:e=>({kind:"vector",...e}),geojson:e=>({kind:"geojson",...e}),customPins:e=>({kind:"customPins",...e}),raster:e=>({kind:"raster",...e}),clusteredVector:e=>({kind:"clusteredVector",...e})};function Om(e){return e.kind==="vector"}function zm(e){return e.kind==="geojson"}function Hm(e){return e.kind==="customPins"}function Gm(e){return e.kind==="raster"}var Rs=(e,t)=>({id:e,label:t,kind:"sequential",hint:"Low \u2192 High",stops:()=>Ii(e),toColorSpec:({by:r,scale:o="auto"})=>({by:r,palette:"sequential",scheme:e,scale:o})}),Wm=(e,t)=>({id:e,label:t,kind:"diverging",hint:"Low \u2192 Mid \u2192 High",stops:()=>Fi(e),toColorSpec:({by:r,scale:o="auto",center:n=0})=>({by:r,palette:"diverging",scheme:e,center:n,scale:o})}),od=[Rs("viridis","Viridis"),Rs("magma","Magma"),Rs("cerulean","Cerulean"),Rs("forest","Forest"),Rs("rose","Rose")],nd=[Wm("redYellowBlue","Red \u2192 Blue"),Wm("orangeYellowSeafoam","Orange \u2192 Seafoam"),Wm("redBlue","Red / Blue")],ad={id:"categorical",label:"Categorical",kind:"categorical",hint:"Distinct per value",stops:()=>Wo(),toColorSpec:({by:e})=>({by:e,palette:"categorical",scale:"auto"})},Ms=[...od,...nd,ad];function Um(e){return Ms.find(t=>t.id===e)}function Km(e){return Ms.filter(t=>t.kind===e)}function cC(e){return !e.includes("{z}")}function Ls(e,t="streets"){let r=[...e].sort((o,n)=>(o.z??0)-(n.z??0));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map(o=>{if(!o.visible&&o.visible!==void 0)return null;switch(o.kind){case "vector":return jsxRuntime.jsx(xD,{spec:o,mapType:t},o.id);case "geojson":return jsxRuntime.jsx(vD,{spec:o,mapType:t},o.id);case "customPins":return jsxRuntime.jsx(CD,{spec:o,mapType:t},o.id);case "raster":return jsxRuntime.jsx(SD,{spec:o},o.id);case "clusteredVector":return jsxRuntime.jsx(yD,{spec:o,mapType:t},o.id);default:return console.warn("[Layers] Unknown layer kind:",o.kind),null}})})}function xD({spec:e,mapType:t}){let{colorMode:r}=er(),o=Ze.useMemo(()=>{let d=uC(e.style,e.renderAs,r,t);if((e.hideChipWhen||e.revealChipOnHover)&&e.renderAs==="circle"){let l=d,c=u=>{let m=u;return e.revealChipOnHover&&(m=["case",["boolean",["feature-state","hover"],false],u,0]),e.hideChipWhen&&(m=["case",e.hideChipWhen,0,m]),m};return {...d,"circle-opacity":c(l["circle-opacity"]??1),"circle-stroke-opacity":c(l["circle-stroke-opacity"]??1)}}return d},[e.style,e.renderAs,e.hideChipWhen,e.revealChipOnHover,r,t]),n=Ze.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),a={id:e.id,type:dC(e.renderAs),"source-layer":e.sourceLayer,paint:o,layout:n};if(e.filter!==void 0&&(a.filter=e.filter),e.minZoom!==void 0&&(a.minzoom=e.minZoom),e.maxZoom!==void 0&&(a.maxzoom=e.maxZoom),e.beforeId!==void 0&&(a.beforeId=e.beforeId),e.sourceId)return jsxRuntime.jsx(BD.Layer,{...a,source:e.sourceId});let i=cC(e.tileset),s={id:`${e.id}-source`,type:"vector"};return e.promoteId!==void 0&&(s.promoteId=e.promoteId),i?s.url=e.tileset:(s.tiles=[e.tileset],s.minzoom=0,s.maxzoom=22),jsxRuntime.jsx(BD.Source,{...s,children:jsxRuntime.jsx(BD.Layer,{...a})},`${e.tileset}:${e.renderAs}`)}function yD({spec:e}){let{colorMode:t,isDarkTheme:r}=er(),o=1.25,n=9,a=3,i=n*1.4,s=.2,d=[0,5],l=Ze.useMemo(()=>r?{clusters:e.clusterStyle?.color?eo(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.5)",point:{fill:e.pointStyle?.color?eo(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.5)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?eo(e.selectedStyle.color):"#444ae1"}}:{clusters:e.clusterStyle?.color?eo(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.3)",point:{fill:e.pointStyle?.color?eo(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.3)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?eo(e.selectedStyle.color):"#444ae1"}},[r,t,e.clusterStyle,e.pointStyle,e.selectedStyle]),c=10,u=30,m=Math.log(2),p=Math.log(2e3),g=(e.clusterStyle?.sizes?.length??0)>0,f=Ze.useMemo(()=>g?e.clusterStyle.sizes.map(({threshold:w,radius:S})=>({threshold:w,radius:S,color:l.clusters})):[{threshold:30,radius:20,color:l.clusters},{threshold:200,radius:35,color:l.clusters},{threshold:1e3,radius:50,color:l.clusters}],[g,e.clusterStyle?.sizes,l.clusters]),x=w=>g?["step",["get","point_count"],w[0].radius,...w.flatMap(({threshold:S,radius:T})=>[S,T])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,c,p,u],b=w=>g?["step",["get","point_count"],w[0].radius*o,...w.flatMap(({threshold:S,radius:T})=>[S,T*o])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,c*o,p,u*o],y=cC(e.tileset),v={id:`${e.id}-source`,type:"vector"};y?v.url=e.tileset:(v.tiles=[e.tileset],v.minzoom=0,v.maxzoom=22);let C=Ze.useMemo(()=>{let w=e.pointStyle?.radius??n,S=e.pointStyle?.borderWidth??a,T=e.selectedStyle?.radius??n*1.5,P=k=>{let M={...k};return e.minZoom!==void 0&&(M.minzoom=e.minZoom),e.maxZoom!==void 0&&(M.maxzoom=e.maxZoom),M};return [P({id:`${e.id}-cluster-shadows`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":b(f),"circle-color":l.shadow,"circle-blur":.5,"circle-translate":[0,8]}}),P({id:`${e.id}-points-shadow`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":i,"circle-color":l.point.shadow,"circle-blur":s,"circle-translate":d}}),P({id:`${e.id}-clusters`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":x(f),"circle-color":["step",["get","point_count"],f[0].color,...f.flatMap(({threshold:k,color:M})=>[k,M])]}}),P({id:`${e.id}-cluster-count`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],layout:{"text-field":["case",["has","point_count_abbreviated"],["get","point_count_abbreviated"],["to-string",["get","point_count"]]],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":14,"text-offset":[0,.1]},paint:{"text-color":l.text.onCluster}}),P({id:`${e.id}-points`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":w,"circle-color":l.point.fill,"circle-stroke-width":S,"circle-stroke-color":l.point.stroke}}),P({id:`${e.id}-selected-point`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],paint:{"circle-radius":T,"circle-color":l.selected.fill,"circle-stroke-width":S,"circle-stroke-color":"#ffffff"}}),...e.pointStyle?.icon?[P({id:`${e.id}-points-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":sC(w,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}}),P({id:`${e.id}-selected-point-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":sC(T,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}})]:[]]},[e.id,e.sourceLayer,e.selectedId,e.minZoom,e.maxZoom,e.pointStyle,e.selectedStyle,f,l,n,a,i,s]);return jsxRuntime.jsx(BD.Source,{...v,children:C.map(w=>jsxRuntime.jsx(BD.Layer,{...w},w.id))},e.tileset)}function vD({spec:e,mapType:t}){let{colorMode:r}=er(),o=Ze.useMemo(()=>typeof e.data=="string"?null:e.data,[e.data]),n=Ze.useMemo(()=>uC(e.style,e.renderAs,r,t,o),[e.style,e.renderAs,r,t,o]),a=Ze.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),i=Ze.useMemo(()=>(typeof e.data=="string",e.data),[e.data]),s={id:`${e.id}-source`,type:"geojson",data:i};e.cluster?.enabled&&(s.cluster=true,s.clusterRadius=e.cluster.radius??50,s.clusterMaxZoom=e.cluster.maxZoom??14);let d={id:e.id,type:dC(e.renderAs),paint:n,layout:a};return e.minZoom!==void 0&&(d.minzoom=e.minZoom),e.maxZoom!==void 0&&(d.maxzoom=e.maxZoom),jsxRuntime.jsx(BD.Source,{...s,children:jsxRuntime.jsx(BD.Layer,{...d})})}function CD({spec:e,mapType:t}){let r=e.pin;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.data.map((o,n)=>{let[a,i]=e.getPosition(o),s=e.pinProps?e.pinProps(o):{};return jsxRuntime.jsx(BD.Marker,{longitude:a,latitude:i,anchor:"bottom",children:jsxRuntime.jsx(r,{...s})},`${e.id}-${n}`)})})}function SD({spec:e}){let t=Ze.useMemo(()=>{if(!e.style)return {};let n={};return e.style.opacity!==void 0&&(n["raster-opacity"]=e.style.opacity),e.style.brightnessMin!==void 0&&(n["raster-brightness-min"]=e.style.brightnessMin),e.style.brightnessMax!==void 0&&(n["raster-brightness-max"]=e.style.brightnessMax),e.style.contrast!==void 0&&(n["raster-contrast"]=e.style.contrast),e.style.saturation!==void 0&&(n["raster-saturation"]=e.style.saturation),e.style.hueRotate!==void 0&&(n["raster-hue-rotate"]=e.style.hueRotate),e.style.fadeDuration!==void 0&&(n["raster-fade-duration"]=e.style.fadeDuration),n},[e.style]),r={id:`${e.id}-source`,type:"raster",tiles:[e.tileset]};e.tileSize&&(r.tileSize=e.tileSize);let o={id:e.id,type:"raster",paint:t};return e.minZoom!==void 0&&(o.minzoom=e.minZoom),e.maxZoom!==void 0&&(o.maxzoom=e.maxZoom),jsxRuntime.jsx(BD.Source,{...r,children:jsxRuntime.jsx(BD.Layer,{...o})},e.tileset)}var go="#666";function sC(e,t){let r=t??64;return e*2/r}function dC(e){switch(e){case "line":return "line";case "fill":return "fill";case "circle":return "circle";case "symbol":return "symbol";case "heatmap":return "heatmap";default:return "circle"}}function uC(e,t,r,o,n){if(!e)return {};let a={};if(e.color){let i=eo(e.color,r,n);switch(t){case "line":a["line-color"]=i;break;case "fill":a["fill-color"]=i;break;case "circle":a["circle-color"]=i;break}}if(e.width&&t==="line"&&(a["line-width"]=id(e.width)),e.radius&&t==="circle"&&(a["circle-radius"]=id(e.radius)),e.opacity!==void 0)switch(t){case "line":a["line-opacity"]=e.opacity;break;case "fill":a["fill-opacity"]=e.opacity;break;case "circle":a["circle-opacity"]=e.opacity;break}if(e.fillOpacity!==void 0&&t==="fill"&&(a["fill-opacity"]=e.fillOpacity),t==="fill"&&e.borderWidth&&(a["fill-outline-color"]=e.borderColor?eo(e.borderColor,r,n):eo(e.color||"#000",r,n)),t==="circle"&&e.borderWidth){a["circle-stroke-width"]=e.borderWidth;let i=e.borderColor?eo(e.borderColor,r,n):Wt(`map-${o}-border`,"#ffffff");a["circle-stroke-color"]=i;}return t==="heatmap"&&(e.weight!==void 0&&(a["heatmap-weight"]=typeof e.weight=="string"?["get",e.weight]:id(e.weight)),e.intensity!==void 0&&(a["heatmap-intensity"]=e.intensity),e.radius!==void 0&&(a["heatmap-radius"]=id(e.radius)),e.opacity!==void 0&&(a["heatmap-opacity"]=e.opacity)),a}function wD(e,t){let r=e.by,o=e.mapping,n=["match",["get",r]];for(let[i,s]of Object.entries(o))n.push(i),n.push(eo(s));let a=e.fallback?eo(e.fallback):go;return n.push(a),n}function ND(e,t){let r=If(t,e);r.length>20&&console.warn(`[Layers] Categorical auto-assignment found ${r.length} unique values for property "${e}". The 6-color palette will repeat ${Math.ceil(r.length/6)} times. Consider using explicit color mapping or reducing categories.`);let o=Ai(r),n=["match",["get",e]];for(let[a,i]of Object.entries(o))n.push(a),n.push(i);return n.push(go),n}function TD(e,t="viridis",r,o){let n=Yd(r,e),a;if(o&&o!=="auto")a=o;else {if(a=Jd(n),n.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),go;console.log(`[Layers] Auto-calculated sequential scale for "${e}": ${a.min} to ${a.max}`);}let i=Ii(t),s=["interpolate",["linear"],["get",e]];return i.forEach((d,l)=>{let c=l/(i.length-1),u=a.min+c*(a.max-a.min);s.push(u,d);}),s}function kD(e,t="redYellowBlue",r,o,n){let a=Yd(r,e),i=Ff(a,o),s;if(n&&n!=="auto")s=n;else {if(s=Jd(a),a.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),go;console.log(`[Layers] Auto-calculated diverging scale for "${e}": ${s.min} \u2190 ${i} \u2192 ${s.max}`);}let d=Fi(t),l=4,c=["interpolate",["linear"],["get",e]];for(let u=0;u<=l;u++){let m=u/l,p=s.min+m*(i-s.min);c.push(p,d[u]);}for(let u=l+1;u<d.length;u++){let m=(u-l)/(d.length-1-l),p=i+m*(s.max-i);c.push(p,d[u]);}return c}function lC(e){if(!(e.startsWith("var(")||e.startsWith("--")||e.startsWith("color-")))return e;let r=Wt(e,go);return r.includes("var(")?go:r}function eo(e,t,r){if(typeof e=="string")return lC(e);if("token"in e)return Wt(e.token,go);if("hex"in e)return lC(e.hex);if("by"in e){if("palette"in e){if(e.palette==="categorical")return r?ND(e.by,r):(console.warn("[Layers] Categorical auto-assignment requires GeoJSON data (not URL-based data)"),go);if(e.palette==="sequential")return r?TD(e.by,e.scheme,r,e.scale):(console.warn("[Layers] Sequential palette requires GeoJSON data (not URL-based data)"),go);if(e.palette==="diverging")return r?kD(e.by,e.scheme,r,e.center,e.scale):(console.warn("[Layers] Diverging palette requires GeoJSON data (not URL-based data)"),go)}if("mapping"in e)return wD(e)}return go}function id(e){return typeof e=="number"?e:"byZoom"in e?["interpolate",["linear"],["zoom"],...e.byZoom.flatMap(([t,r])=>[t,r])]:e}var ld=null;function cd(){return typeof window>"u"||process.env.NODE_ENV==="test"||typeof process<"u"&&process.env?.CHROMATIC||typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) })<"u"&&undefined?.CHROMATIC?Promise.resolve():(ld||(ld=import('mapbox-gl/dist/mapbox-gl.css').then(()=>{}).catch(t=>{console.error("Failed to load Mapbox CSS",t),ld=null;})),ld)}function dd(){return jsxRuntime.jsx("div",{className:"absolute inset-0 z-50 bg-background-surface/90 backdrop-blur-sm pointer-events-none","data-testid":"map-loading-overlay",children:jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-20",children:jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundImage:`
130
+ `,"aria-label":"Open search",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",size:18,className:"flex-shrink-0 transition-colors text-text-secondary"}),jsxRuntime.jsx("span",{className:`flex-1 text-left text-sm transition-colors ${o==="elevated"?"text-text-secondary font-normal":"text-text-disabled"}`,children:e}),r&&jsxRuntime.jsxs("div",{className:"hidden sm:flex items-center gap-1 flex-shrink-0",children:[jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:a?"\u2318":"Ctrl"}),jsxRuntime.jsx("kbd",{className:`px-2 py-1 text-xs font-medium rounded transition-colors ${o==="elevated"?"bg-background-surface/80 border border-border-muted text-text-secondary":"bg-background-muted border border-border-muted"}`,children:"K"})]})]})}var GM={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12",none:"grid-cols-none"},WM={sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12",none:"sm:grid-cols-none"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12",none:"md:grid-cols-none"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12",none:"lg:grid-cols-none"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12",none:"xl:grid-cols-none"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12",none:"2xl:grid-cols-none"}},UM={none:"gap-0",xs:"gap-x-2 gap-y-1",sm:"gap-x-3 gap-y-2",md:"gap-x-4 gap-y-3",lg:"gap-x-6 gap-y-4",xl:"gap-x-8 gap-y-6","2xl":"gap-x-12 gap-y-8"},KM={none:"gap-x-0",xs:"gap-x-2",sm:"gap-x-3",md:"gap-x-4",lg:"gap-x-6",xl:"gap-x-8","2xl":"gap-x-12"},YM={none:"gap-y-0",xs:"gap-y-1",sm:"gap-y-2",md:"gap-y-3",lg:"gap-y-4",xl:"gap-y-6","2xl":"gap-y-8"},JM={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},XM={start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},qM={row:"grid-flow-row",col:"grid-flow-col",dense:"grid-flow-dense","row-dense":"grid-flow-row-dense","col-dense":"grid-flow-col-dense"},jM={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full",auto:"col-auto"},QM={sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full",auto:"sm:col-auto"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full",auto:"md:col-auto"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full",auto:"lg:col-auto"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full",auto:"xl:col-auto"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full",auto:"2xl:col-auto"}};function lv(e,t,r){if(!e)return "";if(typeof e!="object")return t[e]||"";let o=[];return "base"in e&&e.base!==void 0&&o.push(t[e.base]),Object.entries(r).forEach(([n,a])=>{let i=e[n];i!==void 0&&o.push(a[i]);}),o.join(" ")}function Cm({cols:e=1,gap:t="md",gapX:r,gapY:o,align:n="stretch",justify:a="start",flow:i="row",autoFit:s,autoFill:d,className:c,children:l}){let u=tailwindMerge.twMerge("grid",s||d?"":lv(e,GM,WM),!r&&!o&&UM[t],r&&KM[r],o&&YM[o],JM[n],XM[a],qM[i],c),m={};return s?m.gridTemplateColumns=`repeat(auto-fit, minmax(${s}, 1fr))`:d&&(m.gridTemplateColumns=`repeat(auto-fill, minmax(${d}, 1fr))`),jsxRuntime.jsx("div",{className:u,style:m,children:l})}function ZM({span:e,className:t,children:r}){let o=tailwindMerge.twMerge(lv(e,jM,QM),t);return jsxRuntime.jsx("div",{className:o,children:r})}Cm.Item=ZM;function _M(e,t){return Ze__namespace.default.isValidElement(e)?e:yo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function $M(e){if(e.thresholds&&e.value!==null&&e.value!==void 0){for(let t of e.thresholds)if(t.when(e.value))return t.tone}return e.tone}var eL={neutral:"text-text-primary",success:"text-feedback-success",warning:"text-feedback-warning",error:"text-feedback-error",info:"text-feedback-info"},tL=24,rL=20;function oL({item:e,dense:t,valueAlign:r}){let o=$M(e),n=o?eL[o]:"",a=e.stackOnMobile,i=typeof e.value=="string"&&e.value.length>tL&&!e.formatter&&!Ze__namespace.default.isValidElement(e.value),s=_M(e.value,e.formatter),d=i?Ka(e.value,rL):null,c=typeof e.copyable=="function"?e.copyable(e.value):String(e.value),l=e.piiType&&e.piiEntity?{"data-pii-type":e.piiType,"data-pii-entity":e.piiEntity}:{},u=Object.keys(l).length>0,m=i?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(tr,{content:u?jsxRuntime.jsx("span",{...l,children:String(e.value)}):String(e.value),children:jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("md:hidden",e.href?"hover:underline cursor-pointer":""),...l,children:d})}),jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("hidden md:inline",e.href?"hover:underline cursor-pointer":""),...l,children:s})]}):jsxRuntime.jsx("span",{className:e.href?"hover:underline cursor-pointer":"",...l,children:s}),p=e.copyable?jsxRuntime.jsx(yn,{value:c,size:"sm",children:jsxRuntime.jsx("span",{className:"sr-only",children:"Copy"})}):null,g=e.copyable&&(e.copyIconPosition==="left"||!e.copyIconPosition),f=e.copyable&&e.copyIconPosition==="right",h=jsxRuntime.jsxs("dd",{className:tailwindMerge.twMerge(t?"text-sm":"text-base","font-medium",a?r==="start"?"text-left":"text-left sm:text-right":r==="start"?"text-left":"text-right",n,e.disabled&&"opacity-50","overflow-hidden min-w-0"),children:[jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("inline-flex items-center gap-1 max-w-full",r==="start"?"justify-start":"justify-end"),children:[jsxRuntime.jsxs("span",{className:"inline-flex items-center gap-1 min-w-0",children:[m,e.iconRight]}),f&&p]}),e.meta&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-xs text-text-secondary mt-0.5",r==="start"?"text-left":"text-right"),children:e.meta})]}),y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("dt",{className:tailwindMerge.twMerge(t?"text-xs":"text-sm","text-text-secondary truncate","flex items-center gap-1",e.disabled&&"opacity-50"),children:[e.iconLeft,jsxRuntime.jsx("span",{title:typeof e.label=="string"?e.label:void 0,children:e.label}),e.tooltip&&jsxRuntime.jsx(H,{name:"Question",size:10,className:"text-text-secondary","aria-label":"More information"})]}),g&&jsxRuntime.jsx("div",{className:"flex items-center",children:p}),e.href?jsxRuntime.jsx("a",{href:e.href,onClick:e.onAction,className:"block",children:h}):h]});return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",a?"items-start sm:items-center":g?"items-center":"items-start",a?g?"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_auto_auto] sm:gap-x-1 sm:gap-y-0":t?"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_1fr] sm:gap-x-2 sm:gap-y-0":"grid-cols-1 gap-y-1 sm:grid-cols-[minmax(120px,1fr)_1fr] sm:gap-x-4 sm:gap-y-0":g?"grid-cols-[minmax(120px,1fr)_auto_auto] gap-x-1":t?"grid-cols-[minmax(120px,1fr)_1fr] gap-x-2":"grid-cols-[minmax(120px,1fr)_1fr] gap-x-4"),children:y})}function Uc({items:e,layout:t="one-column",dense:r=false,valueAlign:o="end",showDividers:n=false,skeleton:a=false,empty:i=false,error:s,className:d}){return a?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("grid",t==="two-column"?"md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:Array.from({length:e.length||4}).map((c,l)=>jsxRuntime.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-start gap-x-4",children:[jsxRuntime.jsx(j,{className:"h-4 w-24"}),jsxRuntime.jsx(j,{className:"h-5 w-16"})]},l))}):s?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-feedback-error",d),children:s}):i||!e.length?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-sm text-text-secondary",d),children:"No data available"}):jsxRuntime.jsx("dl",{className:tailwindMerge.twMerge("grid",t==="two-column"?"md:grid-cols-2 gap-x-6":"grid-cols-1",r?"gap-y-1":"gap-y-2",d),children:e.map((c,l)=>jsxRuntime.jsxs(Ze__namespace.default.Fragment,{children:[n&&l>0&&t==="one-column"&&jsxRuntime.jsx("div",{className:"col-span-full border-t border-border-default -mt-1 mb-1"}),jsxRuntime.jsx(oL,{item:c,dense:r,valueAlign:o})]},c.id))})}function uv({node:e,renderNodeList:t}){let r=e.children||[],o=e.metadata&&Object.keys(e.metadata).length>0;return jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-shrink-0 px-4 py-4",children:jsxRuntime.jsx("h3",{className:"font-semibold text-text-primary text-lg",children:e.name})}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-y border-border-default px-4 py-4 bg-background-muted",children:jsxRuntime.jsx(Uc,{items:Object.entries(e.metadata||{}).map(([n,a])=>({id:n,label:n,value:a??"\u2014"})),dense:true,layout:"one-column",valueAlign:"end",showDividers:true})}),r.length>0&&jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:t(r,false)})]})}var ht={xs:{node:"px-2 py-2 text-xs",icon:"xs",bullet:24,spacing:{x:8,y:8}},sm:{node:"px-3 py-2.5 text-sm",icon:"xs",bullet:28,spacing:{x:12,y:10}},md:{node:"px-4 py-3 text-base",icon:"sm",bullet:32,spacing:{x:16,y:12}}};var wm=Ze__namespace.createContext(null);function pv(){let e=Ze__namespace.useContext(wm);if(!e)throw new Error("Hierarchy components must be used within HierarchyExplorer");return e}function fv({node:e,renderNode:t}){let{selectedId:r,selectNode:o,navigateToNode:n,variant:a,size:i,showBullets:s,rootNodeId:d,stickyRootNode:c,navigationStack:l,setRootNodeSticky:u,useSplitLayout:m}=pv(),p=Ze__namespace.useRef(null),g=Ze__namespace.useRef(null),f=r===e.id,x=e.disabled||false,h=!!(e.children&&e.children.length>0),y=!!(e.metadata&&Object.keys(e.metadata).length>0),v=h||y,C=d!==void 0&&e.id!==void 0&&d===e.id&&l.length===0;Ze__namespace.useLayoutEffect(()=>{C&&c&&p.current&&g.current===null&&requestAnimationFrame(()=>{p.current&&(g.current=p.current.offsetTop);});},[C,c]),Ze__namespace.useEffect(()=>{if(!C||!c||!p.current)return;let A=p.current.parentElement;for(;A;){let I=window.getComputedStyle(A).overflowY;if(I==="auto"||I==="scroll")break;A=A.parentElement;}if(!A)return;let P=()=>{if(!p.current||g.current===null)return;let I=A.getBoundingClientRect(),R=A.scrollTop,O=I.height,W=p.current.offsetHeight,F=g.current-R,Y=F+W,U=F<0,V=Y>O;U?u("top",e):V?u("bottom",e):u(null,null);};return A.addEventListener("scroll",P),P(),()=>{A.removeEventListener("scroll",P);}},[C,c,e,u]);let w=()=>{x||(m?o(e):v?n(e):o(e));},S=A=>{x||(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),w());},N={isSelected:f,isDisabled:x,hasChildren:h,hasMetadata:y,level:0},k=tailwindMerge.twMerge("relative cursor-pointer group",x&&"opacity-50 cursor-not-allowed"),T=tailwindMerge.twMerge("absolute inset-0 transition-colors",C&&!f&&!x&&"group-hover:bg-background-hover",C&&f&&!x&&a==="subtle"&&"bg-background-selected group-hover:bg-background-hover",C&&f&&x&&a==="subtle"&&"bg-background-selected",C&&f&&!x&&a==="solid"&&"bg-action-brand group-hover:bg-action-brand-hover",C&&f&&x&&a==="solid"&&"bg-action-brand",!C&&a==="subtle"&&!f&&!x&&"group-hover:bg-background-hover",!C&&a==="subtle"&&f&&!x&&"bg-background-selected group-hover:bg-background-hover",!C&&a==="subtle"&&f&&x&&"bg-background-selected",!C&&a==="solid"&&!f&&!x&&"group-hover:bg-background-hover",!C&&a==="solid"&&f&&!x&&"bg-action-brand group-hover:bg-action-brand-hover",!C&&a==="solid"&&f&&x&&"bg-action-brand"),E=tailwindMerge.twMerge("relative flex items-center gap-2 text-text-primary hover:text-text-primary transition-colors",ht[i].node,C&&!f&&"font-semibold",a==="subtle"&&f&&"text-text-link-default",a==="solid"&&f&&"text-[color:var(--color-action-brand-text)]");return jsxRuntime.jsxs("div",{ref:p,className:k,onClick:w,onKeyDown:S,role:"treeitem","aria-selected":f,"aria-disabled":x,tabIndex:0,"data-node-id":e.id,children:[jsxRuntime.jsx("div",{className:T}),jsxRuntime.jsxs("div",{className:E,children:[s&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full flex items-center justify-center flex-shrink-0 z-20",C&&"bg-action-brand border-action-brand",!C&&"bg-background-muted border border-border-default"),style:{width:ht[i].bullet,height:ht[i].bullet},children:e.icon&&jsxRuntime.jsx(H,{name:e.icon,size:ht[i].icon,weight:C?"fill":"regular",className:C?"text-[color:var(--color-action-brand-text)]":"text-text-primary"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:t?t(e,N):jsxRuntime.jsx("span",{className:"truncate",children:e.name})}),v&&!m&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:jsxRuntime.jsx(H,{name:"CaretRight",size:ht[i].icon,className:"text-text-secondary"})})]})]})}function bv({items:e,showConnector:t=false,scrollContainerRef:r,showBullets:o,size:n,renderNode:a}){return jsxRuntime.jsxs("div",{className:"relative",ref:t&&r?r:void 0,children:[o&&e.length>0&&t&&jsxRuntime.jsx("div",{className:"absolute w-px bg-text-secondary z-10 pointer-events-none",style:{left:`${ht[n].spacing.x+ht[n].bullet/2}px`,top:`${ht[n].spacing.y+ht[n].bullet/2}px`,bottom:`${ht[n].spacing.y+ht[n].bullet/2}px`},"aria-hidden":"true"}),e.map(i=>jsxRuntime.jsx(fv,{node:i,renderNode:a},i.id))]})}function ws({children:e,mode:t="sync",presenceKey:r}){let o=r!==void 0&&Ze__namespace.default.isValidElement(e)?Ze__namespace.default.cloneElement(e,{key:r}):r!==void 0?jsxRuntime.jsx("div",{children:e},r):e;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:t,children:o})}function yv(){let[e,t]=Ze.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return Ze.useEffect(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)");t(r.matches);let o=n=>{t(n.matches);};return r.addEventListener("change",o),()=>{r.removeEventListener("change",o);}},[]),e}var dL={instant:0,fast:150,normal:250,slow:350,slower:500},Nm={xs:"4px",sm:"8px",md:"16px"};function uL(e){return e?typeof e=="string"&&e in Nm?Nm[e]:typeof e=="number"?`${e}px`:e:Nm.sm}function Ns({children:e,direction:t,distance:r="sm",duration:o="normal",delay:n=0,className:a}){let i=yv(),s=typeof o=="number"?o:dL[o],d=uL(r),c=p=>{switch(t){case "left":return {x:`-${p}`};case "right":return {x:p};case "up":return {y:`-${p}`};case "down":return {y:p}}},l=i?{opacity:0}:{opacity:0,...c(d)},u={opacity:1,x:0,y:0},m=i?{opacity:0}:{opacity:0,...c(d)};return jsxRuntime.jsx(framerMotion.motion.div,{className:a,initial:l,animate:u,exit:m,transition:{duration:i?0:s/1e3,delay:i?0:n/1e3,ease:[.4,0,.2,1]},children:e})}function Jc({navigationStack:e,onNavigateBack:t,size:r}){let o=e.length===1?"Back to main":`Back to ${e[e.length-2]?.name}`;return jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-surface border-b border-border-default flex-shrink-0",children:jsxRuntime.jsxs("button",{type:"button",onClick:t,className:tailwindMerge.twMerge("w-full flex items-center gap-2 transition-colors text-left group",ht[r].node),children:[jsxRuntime.jsx(H,{name:"CaretLeft",size:ht[r].icon,className:"text-text-secondary group-hover:text-text-primary transition-colors"}),jsxRuntime.jsx("span",{className:"font-medium text-text-primary group-hover:text-text-link-hover transition-colors",children:o})]})})}function Xc({node:e,position:t,selectedId:r,variant:o,size:n,showBullets:a}){let i=r===e.id;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("absolute z-30 left-0 right-0 border-border-default transition-all duration-200 bg-background-surface",ht[n].node,i?o==="subtle"?"text-text-link-default":"bg-action-brand text-[color:var(--color-action-brand-text)]":"font-semibold",t==="top"&&"top-0 border-b shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1)]",t==="bottom"&&"bottom-0 border-t shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)]"),children:[i&&o==="subtle"&&jsxRuntime.jsx("div",{className:"absolute inset-0 bg-background-selected"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 cursor-pointer relative z-10",children:[a&&jsxRuntime.jsx("div",{className:"flex-shrink-0 rounded-full flex items-center justify-center bg-action-brand border-action-brand",style:{width:ht[n].bullet,height:ht[n].bullet},children:e.icon&&jsxRuntime.jsx(H,{name:e.icon,size:ht[n].icon,weight:"fill",className:"text-[color:var(--color-action-brand-text)]"})}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("span",{className:"truncate",children:e.name})})]})]})}function Cv({currentItems:e,currentParent:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,slideDirection:s,viewKey:d,hasHeight:c,rootNodeStickyState:l,renderNodeList:u,renderDetailContent:m,onNavigateBack:p}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r.length===0&&l.position&&l.node&&jsxRuntime.jsx(Xc,{node:l.node,position:l.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Jc,{navigationStack:r,onNavigateBack:p,size:a}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative",c&&"overflow-auto h-full"),children:jsxRuntime.jsx(ws,{mode:"wait",presenceKey:d,children:r.length===0?u(e,true):jsxRuntime.jsx(Ns,{direction:s,distance:"100%",duration:"normal",children:m(t)})})})]})}function km(e,t){for(let r of e){if(r.id===t)return r;if(r.children&&r.children.length>0){let o=km(r.children,t);if(o)return o}}return null}function qc(e){if(e!==void 0)return typeof e=="number"?`${e}px`:e}function Sv(e,t){if(process.env.NODE_ENV!=="development")return;let r=new Set,o=(n,a="root")=>{for(let i=0;i<n.length;i++){let s=n[i],d=`${a}[${i}]`;s.id?r.has(s.id)?console.warn(`[HierarchyExplorer] Duplicate node ID found: "${s.id}". Each node must have a unique ID.`):r.add(s.id):console.warn(`[HierarchyExplorer] Node at ${d} is missing an "id" field. Node name: "${s.name||"(unnamed)"}"`),s.children&&o(s.children,`${d}.children`);}};o(e),t&&!r.has(t)&&console.warn(`[HierarchyExplorer] Root node ID "${t}" not found in data. No node will be highlighted as root.`);}function Nv({data:e,currentItems:t,navigationStack:r,selectedId:o,variant:n,size:a,showBullets:i,rootNodeStickyState:s,renderNodeList:d,renderDetailContent:c,renderEmptyState:l,onNavigateBack:u}){let m=o?km(e,o):null;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex-1 min-w-0 border-r border-border-default flex flex-col relative",children:[r.length===0&&s.position&&s.node&&jsxRuntime.jsx(Xc,{node:s.node,position:s.position,selectedId:o,variant:n,size:a,showBullets:i}),r.length>0&&jsxRuntime.jsx(Jc,{navigationStack:r,onNavigateBack:u,size:a}),jsxRuntime.jsx("div",{className:"flex-1 overflow-auto",children:d(t,r.length===0)})]}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0 overflow-auto bg-background-body",children:jsxRuntime.jsx(ws,{mode:"wait",presenceKey:m?.id||"empty",children:m?jsxRuntime.jsx(Ns,{direction:"left",duration:"fast",children:c(m)}):l?l():jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("text-text-secondary text-center",ht[a].node,"py-8"),children:"Select an item to view details"})})})]})}function Tv({data:e,renderNode:t,onNodeSelect:r,onNavigate:o,selectedId:n,rootNodeId:a,stickyRootNode:i=true,height:s,minHeight:d,maxHeight:c,variant:l="subtle",size:u="md",showBullets:m=true,layout:p="auto",splitBreakpoint:g=768,renderEmptyState:f,renderDetailView:x,className:h,"aria-label":y="Hierarchy explorer"}){let[v,C]=Ze__namespace.useState(null),[w,S]=Ze__namespace.useState([]),[N,k]=Ze__namespace.useState("left"),[T,E]=Ze__namespace.useState({position:null,node:null}),{ref:A,width:P}=ei(),I=Ze__namespace.useMemo(()=>p==="split"?true:p==="single"?false:P>=g,[p,P,g]),R=n!==void 0?n:v;Ze__namespace.useEffect(()=>{Sv(e,a);},[e,a]);let O=w.length>0?w[w.length-1]:null,W=O?O.children||[]:e,z=Ze__namespace.useCallback(D=>{k("left"),S(q=>[...q,D]),o?.(D,[...w,D]);},[w,o]),F=Ze__namespace.useCallback(()=>{k("right"),S(D=>{let q=D.slice(0,-1);return o?.(q.length>0?q[q.length-1]:null,q),q});},[o]),Y=Ze__namespace.useCallback(D=>{n===void 0&&C(D.id),r?.(D,[...w,D]);},[n,w,r]),U=Ze__namespace.useCallback((D,q)=>{E({position:D,node:q});},[]),V=Ze__namespace.useMemo(()=>({selectedId:R,selectNode:Y,navigateToNode:z,navigateBack:F,rootNodeId:a,stickyRootNode:i,variant:l,size:u,showBullets:m,onNodeSelect:r,onNavigate:o,navigationStack:w,setRootNodeSticky:U,useSplitLayout:I}),[R,Y,z,F,a,i,l,u,m,r,o,w,U,I]),J=Ze__namespace.useRef(null);Ze__namespace.useEffect(()=>{if(!a||!J.current||w.length>0||I)return;let D=J.current,q=setTimeout(()=>{let ae=D.querySelector(`[data-node-id="${a}"]`);ae&&ae.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"});},100);return ()=>clearTimeout(q)},[a,w.length,I]);let G={height:qc(s),minHeight:qc(d),maxHeight:qc(c)},B=s!==void 0||c!==void 0,L=O?O.id:"root",b=Ze__namespace.useCallback((D,q=false)=>jsxRuntime.jsx(bv,{items:D,showConnector:q,scrollContainerRef:q?J:null,showBullets:m,size:u,renderNode:t}),[m,u,t]),M=Ze__namespace.useCallback(D=>D?x?x(D,b):jsxRuntime.jsx(uv,{node:D,renderNodeList:b}):null,[x,b]);return jsxRuntime.jsx(wm.Provider,{value:V,children:jsxRuntime.jsx("div",{ref:A,className:tailwindMerge.twMerge("select-none bg-background-surface rounded-lg border border-border-default relative",B&&"overflow-hidden",!B&&"h-full flex flex-col",I&&!B&&"flex-row",I&&B&&"flex",h),style:G,role:"tree","aria-label":y,children:I?jsxRuntime.jsx(Nv,{data:e,currentItems:W,navigationStack:w,selectedId:R,variant:l,size:u,showBullets:m,rootNodeStickyState:T,renderNodeList:b,renderDetailContent:M,renderEmptyState:f,onNavigateBack:F}):jsxRuntime.jsx(Cv,{currentItems:W,currentParent:O,navigationStack:w,selectedId:R,variant:l,size:u,showBullets:m,slideDirection:N,viewKey:L,hasHeight:B,rootNodeStickyState:T,renderNodeList:b,renderDetailContent:M,onNavigateBack:F})})})}function kL({isEntering:e,isExiting:t,className:r=""}){let o=["group","bg-background-surface","forced-colors:bg-[Canvas]","text-text-primary","shadow-lg","rounded-[var(--control-border-radius)]","bg-clip-padding","border","border-border-default","outline-none","p-4","min-w-[260px]","max-w-[360px]"].filter(Boolean).join(" "),n=e?["animate-in","fade-in","zoom-in-95","placement-bottom:slide-in-from-top-1","placement-top:slide-in-from-bottom-1","placement-left:slide-in-from-right-1","placement-right:slide-in-from-left-1","ease-out","duration-200"].join(" "):"",a=t?["animate-out","fade-out","zoom-out-95","placement-bottom:slide-out-to-top-1","placement-top:slide-out-to-bottom-1","placement-left:slide-out-to-right-1","placement-right:slide-out-to-left-1","ease-in","duration-150"].join(" "):"";return [o,n,a,r].filter(Boolean).join(" ")}var kv=({children:e,delay:t=700,closeDelay:r=0,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i=false,...s})=>jsxRuntime.jsx(reactAriaComponents.TooltipTrigger,{delay:t,closeDelay:r,isOpen:o,defaultOpen:n,onOpenChange:a,isDisabled:i,...s,children:e}),Pv=({children:e,className:t,showArrow:r=false,offset:o,...n})=>jsxRuntime.jsxs(reactAriaComponents.Tooltip,{...n,offset:o??(r?12:8),className:reactAriaComponents.composeRenderProps(t,(i,s)=>kL({...s,className:i})),children:[r&&jsxRuntime.jsx(reactAriaComponents.OverlayArrow,{children:jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",className:"block fill-background-surface stroke-border-default stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]",children:jsxRuntime.jsx("path",{d:"M0 0 L6 6 L12 0"})})}),e]});Pv.displayName="HoverCardContent";var PL=Object.assign(kv,{Root:kv,Content:Pv});var ML={md:{fontFamily:"var(--font-family-brand)",fontSize:24,lineHeight:1,letterSpacing:"-0.02em"},lg:{fontFamily:"var(--font-family-brand)",fontSize:34,lineHeight:1.1}},LL={md:{fontSize:12},lg:{fontSize:16}},DL={fontSize:11};function AL(e,t){return yo({value:e,formatter:t,emptyClassName:"text-text-secondary",emptyText:"\u2014"})}function IL(e,t="upIsGood"){if(e===0)return "text-text-secondary";let r=e>0;return t==="upIsGood"?r?"text-feedback-success-text":"text-feedback-error-text":r?"text-feedback-error-text":"text-feedback-success-text"}function FL({points:e,className:t,ariaLabel:r}){let i=e.map(p=>typeof p.y=="number"?p.y:0);if(i.length===0)return null;let s=Math.min(...i),c=Math.max(...i)-s,l=p=>c===0?20/2:18-(p-s)/c*16,u=60/Math.max(e.length-1,1),m=e.map((p,g)=>{let f=2+g*u,x=l(typeof p.y=="number"?p.y:0);return `${g===0?"M":"L"} ${f} ${x}`}).join(" ");return jsxRuntime.jsx("svg",{width:64,height:20,role:"img","aria-label":r,className:tailwindMerge.twMerge("overflow-visible",t),children:jsxRuntime.jsx("path",{d:m,fill:"none",strokeWidth:"1.5",className:"stroke-border-muted"})})}var Rv=100,Pa=30,Ev=1.5,Mv=4,BL=12;function VL(e,t){if(e.length<=t)return e;let r=(e.length-1)/(t-1),o=[];for(let n=0;n<t;n++)o.push(e[Math.round(n*r)]);return o}function OL(e){if(e.length<2)return e.length===1?`M ${e[0][0]} ${e[0][1]}`:"";let t=`M ${e[0][0]} ${e[0][1]}`;for(let r=0;r<e.length-1;r++){let o=e[r-1]??e[r],n=e[r],a=e[r+1],i=e[r+2]??a,s=n[0]+(a[0]-o[0])/6,d=n[1]+(a[1]-o[1])/6,c=a[0]-(i[0]-n[0])/6,l=a[1]-(i[1]-n[1])/6;t+=` C ${s} ${d} ${c} ${l} ${a[0]} ${a[1]}`;}return t}function zL({points:e,gradientId:t,tone:r,className:o}){if(!e||e.length<2)return null;let n=VL(e,BL),a=n.map(x=>typeof x.y=="number"?x.y:0),i=Math.min(...a),d=Math.max(...a)-i,c=x=>d===0?Pa/2:Pa-Mv-(x-i)/d*(Pa-2*Mv),l=(Rv-2*Ev)/Math.max(n.length-1,1),u=n.map((x,h)=>[Ev+h*l,c(typeof x.y=="number"?x.y:0)]),m=OL(u),p=u[u.length-1],g=u[0],f=`${m} L ${p[0]} ${Pa} L ${g[0]} ${Pa} Z`;return jsxRuntime.jsxs("svg",{width:"100%",height:Pa,viewBox:`0 0 ${Rv} ${Pa}`,preserveAspectRatio:"none",role:"img","aria-label":"Trend",className:tailwindMerge.twMerge("mt-2 block w-full",r,o),children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"0",y2:"1",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:.22}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:0})]})}),jsxRuntime.jsx("path",{d:f,fill:`url(#${t})`,stroke:"none"}),jsxRuntime.jsx("path",{d:m,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})}function Lv({label:e,value:t,formatter:r,delta:o,deltaPeriodLabel:n,deltaIntent:a="upIsGood",trend:i,status:s,helpText:d,size:c="md",orientation:l="vertical",isLoading:u,empty:m,error:p,onClick:g,className:f,labelClassName:x,renderValue:h,renderDelta:y,renderTrend:v,unit:C,sub:w,dashed:S,sparkVariant:N="line",sparkTone:k,tileValueSize:T}){let E=Ze.useId(),P={sm:{label:Et("labelSm"),value:Et("displaySm"),delta:Et("labelSm"),gap:"gap-1"},md:{label:Et("labelMd"),value:Et("displayMd"),delta:Et("bodySm"),gap:"gap-2"},lg:{label:Et("labelLg"),value:Et("displayLg"),delta:Et("bodyMd"),gap:"gap-3"}}[c],I=F=>T?jsxRuntime.jsxs("span",{style:ML[T],className:S?"opacity-45":void 0,children:[F,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",style:LL[T],children:[" ",C]}):null]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[F,C?jsxRuntime.jsxs("span",{className:"text-text-secondary",children:[" ",C]}):null]}),R=u?jsxRuntime.jsx(j,{className:"h-7 w-20"}):m?jsxRuntime.jsx("span",{className:"text-text-secondary",children:"\u2014"}):p?jsxRuntime.jsx("span",{className:Et("bodySm","text-feedback-error"),children:typeof p=="string"?p:"Error"}):S?I("\u2014"):h?h(t):I(T?t:AL(t,r)),O=y?y(o):o!==void 0&&!u&&!m&&!p&&!S?jsxRuntime.jsxs("div",{className:br(P.delta,IL(o,a),"flex items-center gap-1"),children:[o>0&&jsxRuntime.jsx(H,{name:"ArrowUp",size:12}),o<0&&jsxRuntime.jsx(H,{name:"ArrowDown",size:12}),o===0&&jsxRuntime.jsx(H,{name:"Minus",size:12}),jsxRuntime.jsxs("span",{children:[o>0?"+":"",Math.abs(o).toFixed(1),"%"]}),n&&jsxRuntime.jsxs("span",{className:"text-text-secondary",children:["\xB7 ",n]})]}):u&&o!==void 0?jsxRuntime.jsx(j,{className:"h-4 w-24"}):null,W=v?v(i):i&&i.length>0&&!u&&!p&&!S?N==="area"?jsxRuntime.jsx(zL,{points:i,gradientId:E,tone:k,className:m?"opacity-30":""}):jsxRuntime.jsx(FL,{points:i,ariaLabel:`${e} trend`,className:m?"opacity-30":""}):u&&i!==void 0?jsxRuntime.jsx(j,{className:"h-5 w-16"}):null,z=w&&!u&&!p?jsxRuntime.jsx("div",{className:"text-text-secondary",style:DL,children:w}):null;return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("flex min-w-0",l==="horizontal"?`items-center ${P.gap}`:`flex-col ${P.gap}`,g&&"cursor-pointer hover:bg-background-muted rounded-lg px-3 py-2 -mx-3 -my-2 transition-colors",f),"aria-labelledby":`kpi-${e}`,onClick:g,children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("h3",{id:`kpi-${e}`,className:tailwindMerge.twMerge(br(P.label,"text-text-secondary truncate"),x),children:u?jsxRuntime.jsx(j,{className:"h-4 w-24"}):e}),d&&!u&&jsxRuntime.jsx(H,{name:"Question",size:12,className:"text-text-secondary cursor-help","aria-label":"Help"})]}),jsxRuntime.jsxs("div",{className:"flex items-baseline gap-2",children:[jsxRuntime.jsx("output",{className:br(T?void 0:P.value,p?"text-feedback-error":"text-text-primary"),"aria-label":`Value: ${t}`,children:R}),s&&!u&&!p&&jsxRuntime.jsx(gt,{variant:s.tone||"neutral",size:"sm",children:s.value})]}),z,(O||W)&&jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[O,W]})]})}var Dv={xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-6",xl:"gap-8"},Av={start:"items-start",center:"items-center",stretch:"items-stretch"};function Iv(e){if(typeof e=="number")return `grid-cols-${e}`;let t=[];return e.base!==void 0&&t.push(`grid-cols-${e.base}`),e.sm!==void 0&&t.push(`sm:grid-cols-${e.sm}`),e.md!==void 0&&t.push(`md:grid-cols-${e.md}`),e.lg!==void 0&&t.push(`lg:grid-cols-${e.lg}`),e.xl!==void 0&&t.push(`xl:grid-cols-${e.xl}`),e["2xl"]!==void 0&&t.push(`2xl:grid-cols-${e["2xl"]}`),t.join(" ")}function Em({children:e,cols:t={base:1,sm:2,md:3,lg:4},gap:r="md",align:o="stretch",equalizeHeights:n=true,header:a,isLoading:i,scrollOnMobile:s=false,scrollItemMinWidth:d="140px",className:c}){let l=i?Ze__namespace.default.Children.map(e,p=>Ze__namespace.default.isValidElement(p)&&p.type&&typeof p.type!="string"&&"displayName"in p.type?Ze__namespace.default.cloneElement(p,{isLoading:true}):p):e,u=s?Ze__namespace.default.Children.map(l,p=>jsxRuntime.jsx("div",{className:"shrink-0",style:{minWidth:d},children:p})):l,m=s?tailwindMerge.twMerge("flex overflow-x-auto pb-2 -mb-2",Dv[r],"sm:grid sm:overflow-visible sm:pb-0 sm:-mb-0",Iv({...typeof t=="object"?t:{base:t},base:void 0}),Av[o],n&&"sm:auto-rows-fr"):tailwindMerge.twMerge("grid",Iv(t),Dv[r],Av[o],n&&"auto-rows-fr","w-full");return jsxRuntime.jsxs("section",{className:tailwindMerge.twMerge("w-full",c),"aria-label":"Key metrics",children:[a&&jsxRuntime.jsx("div",{className:"mb-4",children:a}),jsxRuntime.jsx("div",{className:m,children:s?u:l})]})}Em.displayName="KpiGroup";function Vv({items:e,renderItem:t,selectedId:r,onSelect:o,onHoverChange:n,isLoading:a=false,loadingState:i,error:s=null,renderLoadingSkeleton:d,loadingSkeletonCount:c=5,emptyMessage:l="No results found.",variant:u="relaxed",showDividers:m=true,onLoadMore:p,hasMore:g=false,enableVirtualization:f,estimatedItemSize:x=60,loadingIndicator:h,"aria-label":y,className:v="",style:C}){let[w,S]=Ze.useState(null),N=Ze.useRef(null),k=Ze.useRef(new Map),{scrollRef:T,loadMoreRef:E,virtualizer:A,virtualItems:P,isLoadingMore:I,computedLoadingState:R}=gn({items:e,onLoadMore:p,hasMore:g,isLoading:a,loadingState:i,enableVirtualization:f,estimatedItemSize:x,overscan:5}),O=T??N,W=Ze.useCallback((b,M)=>{o?.(b,M);},[o]),z=Ze.useCallback((b,M)=>{S(b),n?.(b,M);},[n]),F=Ze.useCallback((b,M)=>{let D=b?.id;return typeof D=="string"&&D?D:`item-${M}`},[]),Y=Ze.useCallback(b=>{if(!O.current||e.length===0)return;let M=document.activeElement,D=e.findIndex((ee,ie)=>{let Me=F(ee,ie),le=k.current.get(Me);return le&&(le===M||le.contains(M))}),q=D;switch(b.key){case "ArrowDown":b.preventDefault(),q=D===-1?0:Math.min(D+1,e.length-1);break;case "ArrowUp":b.preventDefault(),q=D===-1?0:Math.max(D-1,0);break;case "Home":b.preventDefault(),q=0;break;case "End":b.preventDefault(),q=e.length-1;break;default:return}let ae=F(e[q],q);k.current.get(ae)?.focus();},[e,F,O]),U=["flex flex-col","bg-background-surface","focus:outline-none focus:ring-2 focus:ring-border-focus focus:ring-offset-2"],V={dense:"gap-0",relaxed:"gap-0"},J=m?"divide-y divide-border-muted":"",G=[...U,V[u],J,v].filter(Boolean).join(" ");if(R==="loading"||a&&e.length===0){let b=d?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:c}).map((M,D)=>jsxRuntime.jsx("div",{children:d()},`skeleton-${D}`))}):jsxRuntime.jsx(Bg,{count:c,className:"space-y-0",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[jsxRuntime.jsx(j,{width:16,height:16,variant:"circle"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-2",children:[jsxRuntime.jsx(j,{width:"75%",height:16}),jsxRuntime.jsx(j,{width:"50%",height:14})]}),jsxRuntime.jsx(j,{width:60,height:20})]})});return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-busy":"true","aria-live":"polite",children:b})}if(s)return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:s})});if(e.length===0)return jsxRuntime.jsx("div",{ref:O,className:G,style:C,role:"listbox","aria-label":y,"aria-live":"polite",children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:l})});let L=A?P?.map(b=>({virtualItem:b,item:e[b.index],index:b.index}))||[]:e.map((b,M)=>({item:b,index:M,virtualItem:null}));return jsxRuntime.jsxs("div",{ref:O,className:G,style:{...C,...p&&{overflow:"auto",height:C?.height||"600px"}},role:"listbox","aria-label":y,"aria-live":"polite",onKeyDown:Y,tabIndex:0,children:[A&&jsxRuntime.jsxs("div",{style:{height:`${A.getTotalSize()}px`,width:"100%",position:"relative"},children:[L.map(({virtualItem:b,item:M,index:D})=>{if(!b)return null;let q=F(M,D),ae=r===q,_=w===q,ee={id:q,role:"option","aria-selected":ae,"aria-current":ae?"page":void 0,tabIndex:ae||r==null&&D===0?0:-1,onClick:ie=>W(ie,M),onMouseEnter:ie=>z(ie,M),onMouseLeave:ie=>z(null),onFocus:ie=>z(ie,M),onBlur:ie=>z(null),ref:ie=>{ie?k.current.set(q,ie):k.current.delete(q);}};return jsxRuntime.jsx("div",{"data-index":b.index,ref:A.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${b.start}px)`},children:t({item:M,index:D,isSelected:ae,isHovered:_,rowProps:ee})},q)}),p&&g&&jsxRuntime.jsx("div",{ref:E,style:{position:"absolute",top:`${A.getTotalSize()}px`,left:0,width:"100%",height:1,pointerEvents:"none"}}),I&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${A.getTotalSize()}px`,left:0,width:"100%"},children:h||jsxRuntime.jsx(Xr,{state:"loading-more"})})]}),!A&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[L.map(({item:b,index:M})=>{let D=F(b,M),q=r===D,ae=w===D,_={id:D,role:"option","aria-selected":q,"aria-current":q?"page":void 0,tabIndex:q||r==null&&M===0?0:-1,onClick:ee=>W(ee,b),onMouseEnter:ee=>z(ee,b),onMouseLeave:ee=>z(null),onFocus:ee=>z(ee,b),onBlur:ee=>z(null),ref:ee=>{ee?k.current.set(D,ee):k.current.delete(D);}};return jsxRuntime.jsx("div",{children:t({item:b,index:M,isSelected:q,isHovered:ae,rowProps:_})},D)}),p&&g&&jsxRuntime.jsx("div",{ref:E,style:{height:1}}),I&&(h||jsxRuntime.jsx(Xr,{state:"loading-more"}))]})]})}function zv({id:e,title:t,subtitle:r,meta:o,leading:n,trailing:a,isSelected:i=false,isHovered:s=false,disabled:d=false,href:c,size:l="md",onClick:u,onMouseEnter:m,onMouseLeave:p,className:g="",style:f,piiTitleType:x,piiSubtitleType:h,piiEntity:y}){let v=()=>{!d&&u&&u(e);},C=()=>{!d&&m&&m(e);},w=()=>{!d&&p&&p(e);},N={sm:{container:"px-3 py-2 gap-2",title:"text-sm leading-tight",subtitle:"text-xs leading-tight",meta:"text-xs leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},md:{container:"px-4 py-3 gap-3",title:"text-base leading-tight",subtitle:"text-sm leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},lg:{container:"px-4 py-4 gap-3",title:"text-lg leading-tight",subtitle:"text-base leading-tight",meta:"text-sm leading-tight",subtitleSpacing:"mt-1",metaSpacing:"mt-1"},xl:{container:"px-5 py-5 gap-4",title:"text-xl leading-tight",subtitle:"text-base leading-tight",meta:"text-base leading-tight",subtitleSpacing:"mt-1.5",metaSpacing:"mt-1.5"}}[l],k=["flex items-center w-full text-left transition-all duration-200 ease-in-out",N.container,"border-l-2 border-l-transparent","rounded-sm",ot()],T=[s&&!i&&"bg-background-hover",i&&"bg-action-default/5 border-l-action-default shadow-sm",d&&"opacity-50 cursor-not-allowed",!d&&!i&&"hover:bg-background-hover"],E=[...k,...T,g].filter(Boolean).join(" "),A=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",children:n}),jsxRuntime.jsx("div",{className:"flex-1 min-w-0",children:jsxRuntime.jsx("div",{className:"flex items-start justify-between gap-2",children:jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsx("div",{className:`text-text-primary font-medium truncate ${N.title}`,title:typeof t=="string"?t:void 0,"data-pii-type":x&&y?x:void 0,"data-pii-entity":x&&y?y:void 0,children:t}),r&&jsxRuntime.jsx("div",{className:`text-text-secondary truncate ${N.subtitle} ${N.subtitleSpacing}`,title:typeof r=="string"?r:void 0,"data-pii-type":h&&y?h:void 0,"data-pii-entity":h&&y?y:void 0,children:r}),o&&jsxRuntime.jsx("div",{className:`text-text-secondary ${N.meta} ${N.metaSpacing}`,children:o})]})})}),a&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:a})]});return c?jsxRuntime.jsx("a",{href:c,className:E,style:f,onMouseEnter:C,onMouseLeave:w,"aria-selected":i,"aria-current":i?"page":void 0,tabIndex:d?-1:0,children:A}):jsxRuntime.jsx("button",{type:"button",className:E,style:f,onClick:v,onMouseEnter:C,onMouseLeave:w,disabled:d,"aria-selected":i,tabIndex:d?-1:0,children:A})}function Hv({header:e,children:t,footer:r,width:o="md",tone:n="neutral",elevation:a="sm",showDivider:i=true,"aria-label":s,"aria-labelledby":d,className:c="",style:l}){let u={sm:"w-64",md:"w-80",lg:"w-96",xl:"w-[28rem]","2xl":"w-[32rem]",auto:"w-auto"},m={neutral:"bg-background-surface",subtle:"bg-background-subtle",brand:"bg-background-brand"},p={none:"",sm:"shadow-sm",md:"shadow-md"},g=tailwindMerge.twMerge("flex flex-col h-full",u[o],m[n],p[a],i&&"border-r border-border-muted",c);return jsxRuntime.jsxs("div",{className:g,style:l,role:"complementary","aria-label":s,"aria-labelledby":d,children:[e&&jsxRuntime.jsx("div",{className:"flex-shrink-0 sticky top-0 z-10 bg-inherit border-b border-border-muted",children:e}),jsxRuntime.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:t}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0 border-t border-border-muted bg-inherit",children:r})]})}function XL({children:e,...t}){return jsxRuntime.jsx(reactAriaComponents.ListBox,{...t,className:Ie(t.className,"outline-0"),children:e})}function $c(){try{if(typeof process<"u"){let e=process.env.MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{if(typeof process<"u"){let e=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN;if(e)return e}}catch{}try{let e=undefined.VITE_MAPBOX_ACCESS_TOKEN;if(e)return e}catch{}}function ed(e,t){let[r,o]=Ze.useState(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.error(`Error reading localStorage key "${e}":`,i),t}});Ze.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(r));}catch(i){console.error(`Error writing to localStorage key "${e}":`,i);}},[e,r]);let n=Ze.useCallback(i=>{try{o(s=>i instanceof Function?i(s):i);}catch(s){console.error(`Error setting value for localStorage key "${e}":`,s);}},[e]),a=Ze.useCallback(()=>{try{typeof window<"u"&&window.localStorage.removeItem(e),o(t);}catch(i){console.error(`Error removing localStorage key "${e}":`,i);}},[e,t]);return [r,n,a]}var Lm=[{type:"navigation",position:"bottom-right",showCompass:true,showGeolocate:true,showResetZoom:true}];function Wv(e="top-right"){switch(e){case "top-left":return "absolute top-4 left-4 z-10";case "top-right":return "absolute top-4 right-4 z-10";case "bottom-left":return "absolute bottom-4 left-4 z-10";case "bottom-right":return "absolute bottom-4 right-4 z-10";default:return "absolute top-4 right-4 z-10"}}var _L="h-12 w-12 md:h-10 md:w-10 p-0 bg-background-surface hover:bg-background-hover shadow-lg border border-border";function Uv(e){return tailwindMerge.twMerge(_L,e)}var Kv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAACXCAYAAAAYn8l5AAAAC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p8u7vR5XAiSC3WYDByQWZ1myzFUtOgbu577+f5ZPq/B5Pf+nAAAAAElFTkSuQmCC";function td(e){return e.selection?.mode==="single"}function On(e){let t=[],r=o=>{o.layerId&&t.push(o.layerId);for(let n of o.children??[])r(n);};return r(e),t}function Dm(e,t){let r=On(e);if(r.length===0)return "unchecked";let o=0;for(let n of r)t(n)&&o++;return o===0?"unchecked":td(e)||o===r.length?"checked":"indeterminate"}var Ra=(e,t)=>Object.fromEntries(e.map(r=>[r,t]));function jv(e,t){let r=On(e);if(!(Dm(e,t)!=="checked"))return Ra(r,false);if(td(e)){let n=e.children?.[0],a=n?On(n):[];return {...Ra(r,false),...Ra(a,true)}}return Ra(r,true)}function Qv(e,t,r){let o=e.children?.find(s=>s.id===t);if(!o)return {};let n=On(e),a=On(o);return a.length>0&&a.every(r)?e.selection?.mode==="single"&&e.selection.allowNone?Ra(a,false):{}:{...Ra(n,false),...Ra(a,true)}}function Am(e,t){for(let r of e){if(r.id===t)return r;let o=Am(r.children??[],t);if(o)return o}}function Im(e,t){for(let r of e){if(r.children?.some(n=>n.id===t))return r;let o=Im(r.children??[],t);if(o)return o}}function Zv(e){let t=new Set,r=new Set,o=new Set,n=(i,s)=>{i&&(s.has(i)?o.add(i):s.add(i));},a=i=>{n(i.id,t),n(i.layerId,r);for(let s of i.children??[])a(s);};for(let i of e)a(i);return [...o]}function $v(e){return e.map(t=>({id:t.id,label:t.label,...t.children?.length?{children:$v(t.children)}:{}}))}function eC(e){let t=e.length;for(let r of e)r.children?.length&&(t=Math.max(t,eC(r.children)));return t}function _v({type:e,color:t}){let r=t?{backgroundColor:t}:void 0;switch(e){case "line":return jsxRuntime.jsx("span",{className:"inline-block h-0.5 w-4 flex-shrink-0 rounded-full",style:r});case "polygon":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-3.5 flex-shrink-0 rounded-sm border border-border",style:r});case "pin":return jsxRuntime.jsx("span",{className:"inline-block h-2.5 w-2.5 flex-shrink-0 rotate-45 rounded-full rounded-bl-none border border-border",style:r});default:return null}}function $L({isSelected:e,onPress:t,label:r}){return jsxRuntime.jsx("button",{type:"button",role:"radio","aria-checked":e,"aria-label":r,onClick:t,className:`grid h-4 w-4 flex-shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-transparent p-0 ${e?"border-action-primary":"border-border-default"}`,children:e?jsxRuntime.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-action-primary"}):null})}function eD(){return jsxRuntime.jsx("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 text-text-secondary",children:jsxRuntime.jsx("path",{d:"M4.5 2.5 8 6l-3.5 3.5"})})}var tD=41,rD=44,oD=132,nD=360;function tC({tree:e,layers:t,onVisibilityChange:r}){let o=new Map(t.map(s=>[s.id,s])),n=s=>{let d=o.get(s);return !!d&&d.visible!==false};if(process.env.NODE_ENV!=="production"){let s=Zv(e);s.length>0&&console.warn(`[LayersPanel] Duplicate id(s) in \`layerTree\`: ${s.join(", ")}. Row lookups and pane keys resolve to the first match, so the later entry is unreachable. Node ids must be unique among node ids, and layer ids unique among layer ids.`);let d=e.flatMap(On).filter(c=>!o.has(c));d.length>0&&console.warn(`[LayersPanel] \`layerTree\` references layer id(s) not present in \`layers\`: ${d.join(", ")}. Those rows render as hidden and cannot be turned on.`);}let a=$v(e),i=Math.min(nD,Math.max(oD,eC(e)*tD+rD));return jsxRuntime.jsx("div",{className:"overflow-hidden",style:{height:i},"data-layers-panel":"",children:jsxRuntime.jsx($a,{items:a,ariaLabel:"Map layers",animated:false,width:null,sticky:false,theme:{background:"transparent",borderColor:"transparent"},className:"h-full w-full",renderRow:({item:s,hasChildren:d,select:c})=>{let l=Am(e,s.id);if(!l)return null;let u=Dm(l,n),p=(l.layerId?o.get(l.layerId):void 0)?.legend,g=On(l),f=g.filter(n).length,x=d&&u==="indeterminate"?`${f} of ${g.length} on`:null,h=Im(e,l.id),y=!!h&&td(h),v=S=>{Object.keys(S).length>0&&r?.(S);},C=y?jsxRuntime.jsx($L,{isSelected:u!=="unchecked",onPress:()=>v(Qv(h,l.id,n)),label:l.label}):jsxRuntime.jsx(io,{isSelected:u==="checked",isIndeterminate:u==="indeterminate",onChange:()=>v(jv(l,n)),"aria-label":l.label}),w=jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 flex-col text-left",children:[jsxRuntime.jsx("span",{className:`truncate text-sm ${u==="unchecked"?"text-text-secondary":"text-text-primary"}`,children:l.label}),x?jsxRuntime.jsx("span",{className:"text-[10px] text-text-secondary",children:x}):null]});return jsxRuntime.jsxs("div",{className:"edges-layers-panel__row flex cursor-default items-center gap-2 py-2.5",children:[C,d?jsxRuntime.jsxs("button",{type:"button",onClick:c,className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 border-0 bg-transparent p-0 text-left","aria-label":`Open ${l.label}`,children:[p?jsxRuntime.jsx(_v,{type:p.swatch,color:p.color}):null,w,jsxRuntime.jsx(eD,{})]}):jsxRuntime.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[p?jsxRuntime.jsx(_v,{type:p.swatch,color:p.color}):null,w]})]})}})})}function zn({position:e="top-right",className:t,style:r,children:o}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(Wv(e),t),style:r,children:o})}function Kr({icon:e,iconSize:t=24,onPress:r,isDisabled:o=false,className:n,iconClassName:a="text-text-primary",variant:i="secondary",isActive:s=false,ariaLabel:d,iconWeight:c="regular",...l}){let u=tailwindMerge.twMerge(Uv(),s&&"bg-action-brand hover:bg-action-brand-hover border-action-brand",n),m=tailwindMerge.twMerge(a,s&&"text-text-inverse");return jsxRuntime.jsx(re,{...l,className:u,onPress:r,variant:i,size:"sm",isDisabled:o,"aria-label":d,"aria-pressed":s||void 0,type:"button",children:jsxRuntime.jsx(H,{name:e,size:t,className:m,weight:c})})}var dD=e=>[{id:"streets",name:"Streets",description:"Standard street map with traffic data",preview:e?Xv:qv},{id:"satellite",name:"Satellite",description:"Aerial imagery with street labels",preview:Jv},{id:"neutral",name:"Neutral",description:"Clean design with light/dark variants",preview:e?Kv:Yv}];function uD({type:e,color:t}){let r="inline-block",o=t?{backgroundColor:t}:{};switch(e){case "dot":return null;case "line":return jsxRuntime.jsx("span",{className:`${r} h-0.5 w-6 rounded-full`,style:o});case "polygon":return jsxRuntime.jsx("span",{className:`${r} h-3 w-4 rounded-sm border border-border`,style:o});case "pin":return jsxRuntime.jsx("span",{className:`${r} h-3 w-3 rounded-full rounded-bl-none border border-border transform rotate-45`,style:o});default:return null}}function nC({position:e="bottom-left",className:t,style:r,currentMapType:o="streets",onMapTypeChange:n,layers:a=[],onLayerToggle:i,onClearAll:s,onLayerVariantChange:d,layerTree:c,onVisibilityChange:l}){let{isDarkTheme:u}=er(),{isMobile:m}=gr(),[p,g]=Ze.useState(false),f=dD(u),x=v=>{n?.(v);},h=a.filter(v=>v.legend),y=jsxRuntime.jsxs("div",{className:m?"space-y-6 pb-6":"space-y-6",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary mb-3",children:"Map type"}),jsxRuntime.jsx("div",{className:"grid grid-cols-3 gap-3",children:f.map(v=>jsxRuntime.jsxs("button",{type:"button",onClick:()=>x(v.id),className:"flex flex-col items-center space-y-2 p-3 rounded-lg text-center hover:bg-background-muted transition-colors border border-transparent "+(o===v.id?"bg-background-muted border-border":"hover:border-border"),children:[jsxRuntime.jsx("div",{className:"w-12 h-12 rounded-lg overflow-hidden bg-background-surface "+(o===v.id?"border-2 border-action-default":"border border-border-default"),children:jsxRuntime.jsx("img",{src:v.preview,alt:`${v.name} map preview`,className:"w-full h-full object-cover"})}),jsxRuntime.jsx("div",{className:"text-sm "+(o===v.id?"font-bold text-text-primary":"font-normal text-text-secondary"),children:v.name})]},v.id))})]}),c?.length?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx(tC,{tree:c,layers:a,onVisibilityChange:l})]}):null,!c?.length&&h.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-3",children:[jsxRuntime.jsx("div",{className:"text-sm font-semibold text-text-primary",children:"Map details"}),s&&jsxRuntime.jsx("button",{type:"button",onClick:s,className:"text-xs text-text-secondary hover:text-text-primary transition-colors",children:"Clear all"})]}),jsxRuntime.jsx("div",{className:"space-y-2",children:h.map(v=>{let C=v.visible!==false,w=v.legend?.variants;return jsxRuntime.jsxs("div",{className:w?"space-y-1.5":void 0,children:[jsxRuntime.jsx(io,{isSelected:C,onChange:()=>i?.(v.id),children:jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[v.legend&&jsxRuntime.jsx(uD,{type:v.legend.swatch,color:v.legend.color}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:v.legend?.label})]})}),w&&jsxRuntime.jsx("div",{className:"pl-6",children:jsxRuntime.jsx(Ko,{"aria-label":`${v.legend?.label} mode`,size:"sm",isDisabled:!C,items:w.options.map(S=>({...S,value:S.id})),renderItem:S=>S.label,selectedKey:w.selectedId,onSelectionChange:S=>d?.(v.id,String(S))})})]},v.id)})})]})]});return jsxRuntime.jsx(zn,{position:e,className:t,style:r,children:jsxRuntime.jsx("div",{className:"relative",children:m?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Kr,{icon:"Stack",ariaLabel:"Map layers and settings",onPress:()=>g(true)}),jsxRuntime.jsx(wt,{isOpen:p,onClose:()=>g(false),title:"Map layers",animationVariant:"scale",children:y})]}):jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsx(Kr,{icon:"Stack",ariaLabel:"Map layers and settings"}),jsxRuntime.jsx(St,{placement:"top start",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{"aria-label":"Map layers and settings",className:"p-4 min-w-80 bg-background-surface border border-border rounded-lg shadow-xl focus:outline-none focus:ring-0",children:y})})]})})})}function iC({position:e="top-right",className:t,style:r,onToggle:o,isActive:n=false}){return jsxRuntime.jsx(zn,{position:e,className:tailwindMerge.twMerge("md:hidden",t),style:r,children:jsxRuntime.jsx(Kr,{icon:"ListDashes",onPress:o,isActive:n,ariaLabel:n?"Hide list view":"Show list view"})})}var gD={sm:"gap-2",md:"gap-4",lg:"gap-6"};function od({position:e="top-right",className:t,style:r,children:o,orientation:n="vertical",spacing:a="md"}){return jsxRuntime.jsx(zn,{position:e,style:r,children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex",n==="vertical"?"flex-col":"flex-row",gD[a],t),children:o})})}function lC({mapRef:e,position:t="bottom-right",className:r,style:o,showCompass:n=true,showGeolocate:a=true,showResetZoom:i=true,onResetZoom:s,onCompassClick:d,onGeolocateClick:c}){let[l,u]=Ze.useState(false),m=Ze.useRef(true);Ze.useEffect(()=>()=>{m.current=false;},[]);let p=()=>{d?d():e.current&&e.current.easeTo({bearing:0,duration:500});},g=async()=>{if(!l)if(c)c();else {if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}if(navigator.permissions?.query)try{if((await navigator.permissions.query({name:"geolocation"})).state==="denied"){console.warn("Geolocation permission was previously denied. Please enable location services in your browser settings.");return}}catch{}u(true),navigator.geolocation.getCurrentPosition(v=>{if(!m.current)return;let{latitude:C,longitude:w}=v.coords;e.current&&e.current.flyTo({center:[w,C],zoom:15,duration:2e3}),u(false);},v=>{if(m.current){switch(console.warn("Geolocation error:",{code:v.code,message:v.message,PERMISSION_DENIED:v.PERMISSION_DENIED,POSITION_UNAVAILABLE:v.POSITION_UNAVAILABLE,TIMEOUT:v.TIMEOUT}),v.code){case v.PERMISSION_DENIED:console.warn("Location access denied. Please enable location services in your browser settings.");break;case v.POSITION_UNAVAILABLE:console.warn("Location information unavailable.");break;case v.TIMEOUT:console.warn("Location request timed out.");break;default:console.warn("Error getting location:",v.message);break}u(false);}},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});}};if(!n&&!a&&!i)return null;let f=!i&&n,x=!i&&!n&&a,h=!a&&n;return jsxRuntime.jsxs(od,{position:t,className:r,style:o,spacing:"sm",children:[i&&jsxRuntime.jsx(Kr,{icon:"ArrowsOut",onPress:s,ariaLabel:"Reset zoom to show all points",className:tailwindMerge.twMerge(!(!a&&!n&&i)&&"rounded-b-none",n&&"border-b-0")}),n&&jsxRuntime.jsx(Kr,{icon:"Compass",onPress:p,ariaLabel:"Reset map orientation",className:tailwindMerge.twMerge(!f&&"rounded-t-none border-t-0",!h&&"rounded-b-none border-b-0")}),a&&jsxRuntime.jsx(Kr,{icon:l?"Spinner":"NavigationArrow",onPress:g,isDisabled:l,ariaLabel:"Go to my location",iconClassName:tailwindMerge.twMerge("text-text-primary",l&&"animate-spin"),className:tailwindMerge.twMerge(!x&&"rounded-t-none border-t-0",!x&&n&&"lg:rounded-t lg:border-t")})]})}function pC({position:e="top-left",className:t,style:r,onSearch:o,placeholder:n="Search places...",showSearchInput:a=true}){let[i,s]=Ze.useState(false),[d,c]=Ze.useState(""),l=()=>{a?s(!i):o&&o("");},u=p=>{p.preventDefault(),o&&d.trim()&&(o(d.trim()),s(false));},m=p=>{p.key==="Escape"&&s(false);};return jsxRuntime.jsx(zn,{position:e,className:t,style:r,children:jsxRuntime.jsxs("div",{className:"relative",children:[jsxRuntime.jsx(Kr,{icon:"MagnifyingGlass",onPress:l,ariaLabel:"Search"}),i&&a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute top-12 left-0 min-w-64","bg-background-surface border border-border rounded-lg shadow-xl p-3"),children:jsxRuntime.jsx("form",{onSubmit:u,children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"text",value:d,onChange:p=>c(p.target.value),onKeyDown:m,placeholder:n,className:tailwindMerge.twMerge("flex-1 px-3 py-2 text-sm rounded border","bg-background border-border text-text-primary placeholder:text-text-secondary","focus:outline-none focus:ring-2 focus:ring-action-brand"),autoFocus:true}),jsxRuntime.jsx(re,{type:"submit",variant:"primary",size:"sm",className:"px-3 py-2",children:"Search"})]})})})]})})}var vD={navigation:"bottom-right",layers:"bottom-left",search:"top-left",list:"top-right",custom:"top-right"};function Bm(e){return e.position??vD[e.type]}function mC(e,t,r){let o=Bm(e),n=e.id??`${e.type}-${t}`;switch(e.type){case "navigation":{let i=e.showResetZoom!==false&&r.showResetButton;return jsxRuntime.jsx(lC,{mapRef:r.mapRef,position:o,showCompass:e.showCompass,showGeolocate:e.showGeolocate,showResetZoom:i,onResetZoom:e.onResetZoom,onCompassClick:e.onCompassClick,onGeolocateClick:e.onGeolocateClick,style:e.style,className:e.className},n)}case "layers":return jsxRuntime.jsx(nC,{position:o,currentMapType:e.currentMapType,onMapTypeChange:e.onMapTypeChange,layers:e.layers??r.layers,onLayerToggle:e.onLayerToggle,onClearAll:e.onClearAll,onLayerVariantChange:e.onLayerVariantChange,layerTree:e.layerTree,onVisibilityChange:e.onVisibilityChange,style:e.style,className:e.className},n);case "search":return jsxRuntime.jsx(pC,{position:o,onSearch:e.onSearch,placeholder:e.placeholder,showSearchInput:e.showSearchInput,style:e.style,className:e.className},n);case "list":return jsxRuntime.jsx(iC,{position:o,onToggle:e.onToggle,isActive:e.isActive,style:e.style,className:e.className},n);case "custom":return jsxRuntime.jsx("div",{children:e.render(r)},n);default:return null}}function Vm(e,t){let r=e.reduce((n,a,i)=>{let s=Bm(a);return n[s]||(n[s]=[]),n[s].push({control:a,index:i}),n},{}),o=[];for(let[n,a]of Object.entries(r)){if(a.length===1){o.push(mC(a[0].control,a[0].index,t));continue}let i={position:"static",top:"auto",right:"auto",bottom:"auto",left:"auto"};o.push(jsxRuntime.jsx(od,{position:n,spacing:"sm",children:a.map(({control:s,index:d})=>{let c={...s,style:{...s.style,...i}};return mC(c,d,t)})},`group-${n}`));}return o}var Om={vector:e=>({kind:"vector",...e}),geojson:e=>({kind:"geojson",...e}),customPins:e=>({kind:"customPins",...e}),raster:e=>({kind:"raster",...e}),clusteredVector:e=>({kind:"clusteredVector",...e})};function zm(e){return e.kind==="vector"}function Hm(e){return e.kind==="geojson"}function Gm(e){return e.kind==="customPins"}function Wm(e){return e.kind==="raster"}var Rs=(e,t)=>({id:e,label:t,kind:"sequential",hint:"Low \u2192 High",stops:()=>Ii(e),toColorSpec:({by:r,scale:o="auto"})=>({by:r,palette:"sequential",scheme:e,scale:o})}),Um=(e,t)=>({id:e,label:t,kind:"diverging",hint:"Low \u2192 Mid \u2192 High",stops:()=>Fi(e),toColorSpec:({by:r,scale:o="auto",center:n=0})=>({by:r,palette:"diverging",scheme:e,center:n,scale:o})}),ad=[Rs("viridis","Viridis"),Rs("magma","Magma"),Rs("cerulean","Cerulean"),Rs("forest","Forest"),Rs("rose","Rose")],id=[Um("redYellowBlue","Red \u2192 Blue"),Um("orangeYellowSeafoam","Orange \u2192 Seafoam"),Um("redBlue","Red / Blue")],sd={id:"categorical",label:"Categorical",kind:"categorical",hint:"Distinct per value",stops:()=>Wo(),toColorSpec:({by:e})=>({by:e,palette:"categorical",scale:"auto"})},Es=[...ad,...id,sd];function Km(e){return Es.find(t=>t.id===e)}function Ym(e){return Es.filter(t=>t.kind===e)}function bC(e){return !e.includes("{z}")}function Ls(e,t="streets"){let r=[...e].sort((o,n)=>(o.z??0)-(n.z??0));return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r.map(o=>{if(!o.visible&&o.visible!==void 0)return null;switch(o.kind){case "vector":return jsxRuntime.jsx(SD,{spec:o,mapType:t},o.id);case "geojson":return jsxRuntime.jsx(ND,{spec:o,mapType:t},o.id);case "customPins":return jsxRuntime.jsx(TD,{spec:o,mapType:t},o.id);case "raster":return jsxRuntime.jsx(kD,{spec:o},o.id);case "clusteredVector":return jsxRuntime.jsx(wD,{spec:o,mapType:t},o.id);default:return console.warn("[Layers] Unknown layer kind:",o.kind),null}})})}function SD({spec:e,mapType:t}){let{colorMode:r}=er(),o=Ze.useMemo(()=>{let d=xC(e.style,e.renderAs,r,t);if((e.hideChipWhen||e.revealChipOnHover)&&e.renderAs==="circle"){let c=d,l=u=>{let m=u;return e.revealChipOnHover&&(m=["case",["boolean",["feature-state","hover"],false],u,0]),e.hideChipWhen&&(m=["case",e.hideChipWhen,0,m]),m};return {...d,"circle-opacity":l(c["circle-opacity"]??1),"circle-stroke-opacity":l(c["circle-stroke-opacity"]??1)}}return d},[e.style,e.renderAs,e.hideChipWhen,e.revealChipOnHover,r,t]),n=Ze.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),a={id:e.id,type:hC(e.renderAs),"source-layer":e.sourceLayer,paint:o,layout:n};if(e.filter!==void 0&&(a.filter=e.filter),e.minZoom!==void 0&&(a.minzoom=e.minZoom),e.maxZoom!==void 0&&(a.maxzoom=e.maxZoom),e.beforeId!==void 0&&(a.beforeId=e.beforeId),e.sourceId)return jsxRuntime.jsx(HD.Layer,{...a,source:e.sourceId});let i=bC(e.tileset),s={id:`${e.id}-source`,type:"vector"};return e.promoteId!==void 0&&(s.promoteId=e.promoteId),i?s.url=e.tileset:(s.tiles=[e.tileset],s.minzoom=0,s.maxzoom=22),jsxRuntime.jsx(HD.Source,{...s,children:jsxRuntime.jsx(HD.Layer,{...a})},`${e.tileset}:${e.renderAs}`)}function wD({spec:e}){let{colorMode:t,isDarkTheme:r}=er(),o=1.25,n=9,a=3,i=n*1.4,s=.2,d=[0,5],c=Ze.useMemo(()=>r?{clusters:e.clusterStyle?.color?eo(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.5)",point:{fill:e.pointStyle?.color?eo(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.5)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?eo(e.selectedStyle.color):"#444ae1"}}:{clusters:e.clusterStyle?.color?eo(e.clusterStyle.color):"#000000",shadow:e.clusterStyle?.shadowColor||"rgba(0, 0, 0, 0.3)",point:{fill:e.pointStyle?.color?eo(e.pointStyle.color):"#000000",stroke:e.pointStyle?.borderColor||"#ffffff",shadow:"rgba(0, 0, 0, 0.3)"},text:{onCluster:"#ffffff"},selected:{fill:e.selectedStyle?.color?eo(e.selectedStyle.color):"#444ae1"}},[r,t,e.clusterStyle,e.pointStyle,e.selectedStyle]),l=10,u=30,m=Math.log(2),p=Math.log(2e3),g=(e.clusterStyle?.sizes?.length??0)>0,f=Ze.useMemo(()=>g?e.clusterStyle.sizes.map(({threshold:w,radius:S})=>({threshold:w,radius:S,color:c.clusters})):[{threshold:30,radius:20,color:c.clusters},{threshold:200,radius:35,color:c.clusters},{threshold:1e3,radius:50,color:c.clusters}],[g,e.clusterStyle?.sizes,c.clusters]),x=w=>g?["step",["get","point_count"],w[0].radius,...w.flatMap(({threshold:S,radius:N})=>[S,N])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,l,p,u],h=w=>g?["step",["get","point_count"],w[0].radius*o,...w.flatMap(({threshold:S,radius:N})=>[S,N*o])]:["interpolate",["linear"],["ln",["max",2,["get","point_count"]]],m,l*o,p,u*o],y=bC(e.tileset),v={id:`${e.id}-source`,type:"vector"};y?v.url=e.tileset:(v.tiles=[e.tileset],v.minzoom=0,v.maxzoom=22);let C=Ze.useMemo(()=>{let w=e.pointStyle?.radius??n,S=e.pointStyle?.borderWidth??a,N=e.selectedStyle?.radius??n*1.5,k=T=>{let E={...T};return e.minZoom!==void 0&&(E.minzoom=e.minZoom),e.maxZoom!==void 0&&(E.maxzoom=e.maxZoom),E};return [k({id:`${e.id}-cluster-shadows`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":h(f),"circle-color":c.shadow,"circle-blur":.5,"circle-translate":[0,8]}}),k({id:`${e.id}-points-shadow`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":i,"circle-color":c.point.shadow,"circle-blur":s,"circle-translate":d}}),k({id:`${e.id}-clusters`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],paint:{"circle-radius":x(f),"circle-color":["step",["get","point_count"],f[0].color,...f.flatMap(({threshold:T,color:E})=>[T,E])]}}),k({id:`${e.id}-cluster-count`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","cluster"],true],layout:{"text-field":["case",["has","point_count_abbreviated"],["get","point_count_abbreviated"],["to-string",["get","point_count"]]],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":14,"text-offset":[0,.1]},paint:{"text-color":c.text.onCluster}}),k({id:`${e.id}-points`,type:"circle","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],paint:{"circle-radius":w,"circle-color":c.point.fill,"circle-stroke-width":S,"circle-stroke-color":c.point.stroke}}),k({id:`${e.id}-selected-point`,type:"circle","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],paint:{"circle-radius":N,"circle-color":c.selected.fill,"circle-stroke-width":S,"circle-stroke-color":"#ffffff"}}),...e.pointStyle?.icon?[k({id:`${e.id}-points-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["all",["!=",["get","cluster"],true],["!=",["get","id"],e.selectedId||"selected"]],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":fC(w,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}}),k({id:`${e.id}-selected-point-icon`,type:"symbol","source-layer":e.sourceLayer,filter:["==",["get","id"],e.selectedId||"selected"],layout:{"icon-image":e.pointStyle.icon.name,"icon-size":fC(N,e.pointStyle.icon.size),"icon-allow-overlap":true,"icon-ignore-placement":true}})]:[]]},[e.id,e.sourceLayer,e.selectedId,e.minZoom,e.maxZoom,e.pointStyle,e.selectedStyle,f,c,n,a,i,s]);return jsxRuntime.jsx(HD.Source,{...v,children:C.map(w=>jsxRuntime.jsx(HD.Layer,{...w},w.id))},e.tileset)}function ND({spec:e,mapType:t}){let{colorMode:r}=er(),o=Ze.useMemo(()=>typeof e.data=="string"?null:e.data,[e.data]),n=Ze.useMemo(()=>xC(e.style,e.renderAs,r,t,o),[e.style,e.renderAs,r,t,o]),a=Ze.useMemo(()=>({visibility:e.visible===false?"none":"visible"}),[e.visible]),i=Ze.useMemo(()=>(typeof e.data=="string",e.data),[e.data]),s={id:`${e.id}-source`,type:"geojson",data:i};e.cluster?.enabled&&(s.cluster=true,s.clusterRadius=e.cluster.radius??50,s.clusterMaxZoom=e.cluster.maxZoom??14);let d={id:e.id,type:hC(e.renderAs),paint:n,layout:a};return e.minZoom!==void 0&&(d.minzoom=e.minZoom),e.maxZoom!==void 0&&(d.maxzoom=e.maxZoom),jsxRuntime.jsx(HD.Source,{...s,children:jsxRuntime.jsx(HD.Layer,{...d})})}function TD({spec:e,mapType:t}){let r=e.pin;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.data.map((o,n)=>{let[a,i]=e.getPosition(o),s=e.pinProps?e.pinProps(o):{};return jsxRuntime.jsx(HD.Marker,{longitude:a,latitude:i,anchor:"bottom",children:jsxRuntime.jsx(r,{...s})},`${e.id}-${n}`)})})}function kD({spec:e}){let t=Ze.useMemo(()=>{if(!e.style)return {};let n={};return e.style.opacity!==void 0&&(n["raster-opacity"]=e.style.opacity),e.style.brightnessMin!==void 0&&(n["raster-brightness-min"]=e.style.brightnessMin),e.style.brightnessMax!==void 0&&(n["raster-brightness-max"]=e.style.brightnessMax),e.style.contrast!==void 0&&(n["raster-contrast"]=e.style.contrast),e.style.saturation!==void 0&&(n["raster-saturation"]=e.style.saturation),e.style.hueRotate!==void 0&&(n["raster-hue-rotate"]=e.style.hueRotate),e.style.fadeDuration!==void 0&&(n["raster-fade-duration"]=e.style.fadeDuration),n},[e.style]),r={id:`${e.id}-source`,type:"raster",tiles:[e.tileset]};e.tileSize&&(r.tileSize=e.tileSize);let o={id:e.id,type:"raster",paint:t};return e.minZoom!==void 0&&(o.minzoom=e.minZoom),e.maxZoom!==void 0&&(o.maxzoom=e.maxZoom),jsxRuntime.jsx(HD.Source,{...r,children:jsxRuntime.jsx(HD.Layer,{...o})},e.tileset)}var go="#666";function fC(e,t){let r=t??64;return e*2/r}function hC(e){switch(e){case "line":return "line";case "fill":return "fill";case "circle":return "circle";case "symbol":return "symbol";case "heatmap":return "heatmap";default:return "circle"}}function xC(e,t,r,o,n){if(!e)return {};let a={};if(e.color){let i=eo(e.color,r,n);switch(t){case "line":a["line-color"]=i;break;case "fill":a["fill-color"]=i;break;case "circle":a["circle-color"]=i;break}}if(e.width&&t==="line"&&(a["line-width"]=ld(e.width)),e.radius&&t==="circle"&&(a["circle-radius"]=ld(e.radius)),e.opacity!==void 0)switch(t){case "line":a["line-opacity"]=e.opacity;break;case "fill":a["fill-opacity"]=e.opacity;break;case "circle":a["circle-opacity"]=e.opacity;break}if(e.fillOpacity!==void 0&&t==="fill"&&(a["fill-opacity"]=e.fillOpacity),t==="fill"&&e.borderWidth&&(a["fill-outline-color"]=e.borderColor?eo(e.borderColor,r,n):eo(e.color||"#000",r,n)),t==="circle"&&e.borderWidth){a["circle-stroke-width"]=e.borderWidth;let i=e.borderColor?eo(e.borderColor,r,n):Wt(`map-${o}-border`,"#ffffff");a["circle-stroke-color"]=i;}return t==="heatmap"&&(e.weight!==void 0&&(a["heatmap-weight"]=typeof e.weight=="string"?["get",e.weight]:ld(e.weight)),e.intensity!==void 0&&(a["heatmap-intensity"]=e.intensity),e.radius!==void 0&&(a["heatmap-radius"]=ld(e.radius)),e.opacity!==void 0&&(a["heatmap-opacity"]=e.opacity)),a}function PD(e,t){let r=e.by,o=e.mapping,n=["match",["get",r]];for(let[i,s]of Object.entries(o))n.push(i),n.push(eo(s));let a=e.fallback?eo(e.fallback):go;return n.push(a),n}function RD(e,t){let r=Ff(t,e);r.length>20&&console.warn(`[Layers] Categorical auto-assignment found ${r.length} unique values for property "${e}". The 6-color palette will repeat ${Math.ceil(r.length/6)} times. Consider using explicit color mapping or reducing categories.`);let o=Ai(r),n=["match",["get",e]];for(let[a,i]of Object.entries(o))n.push(a),n.push(i);return n.push(go),n}function ED(e,t="viridis",r,o){let n=Xd(r,e),a;if(o&&o!=="auto")a=o;else {if(a=qd(n),n.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),go;console.log(`[Layers] Auto-calculated sequential scale for "${e}": ${a.min} to ${a.max}`);}let i=Ii(t),s=["interpolate",["linear"],["get",e]];return i.forEach((d,c)=>{let l=c/(i.length-1),u=a.min+l*(a.max-a.min);s.push(u,d);}),s}function MD(e,t="redYellowBlue",r,o,n){let a=Xd(r,e),i=Bf(a,o),s;if(n&&n!=="auto")s=n;else {if(s=qd(a),a.length===0)return console.warn(`[Layers] No numeric values found for property "${e}"`),go;console.log(`[Layers] Auto-calculated diverging scale for "${e}": ${s.min} \u2190 ${i} \u2192 ${s.max}`);}let d=Fi(t),c=4,l=["interpolate",["linear"],["get",e]];for(let u=0;u<=c;u++){let m=u/c,p=s.min+m*(i-s.min);l.push(p,d[u]);}for(let u=c+1;u<d.length;u++){let m=(u-c)/(d.length-1-c),p=i+m*(s.max-i);l.push(p,d[u]);}return l}function gC(e){if(!(e.startsWith("var(")||e.startsWith("--")||e.startsWith("color-")))return e;let r=Wt(e,go);return r.includes("var(")?go:r}function eo(e,t,r){if(typeof e=="string")return gC(e);if("token"in e)return Wt(e.token,go);if("hex"in e)return gC(e.hex);if("by"in e){if("palette"in e){if(e.palette==="categorical")return r?RD(e.by,r):(console.warn("[Layers] Categorical auto-assignment requires GeoJSON data (not URL-based data)"),go);if(e.palette==="sequential")return r?ED(e.by,e.scheme,r,e.scale):(console.warn("[Layers] Sequential palette requires GeoJSON data (not URL-based data)"),go);if(e.palette==="diverging")return r?MD(e.by,e.scheme,r,e.center,e.scale):(console.warn("[Layers] Diverging palette requires GeoJSON data (not URL-based data)"),go)}if("mapping"in e)return PD(e)}return go}function ld(e){return typeof e=="number"?e:"byZoom"in e?["interpolate",["linear"],["zoom"],...e.byZoom.flatMap(([t,r])=>[t,r])]:e}var dd=null;function ud(){return typeof window>"u"||process.env.NODE_ENV==="test"||typeof process<"u"&&process.env?.CHROMATIC||typeof ({ url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) })<"u"&&undefined?.CHROMATIC?Promise.resolve():(dd||(dd=import('mapbox-gl/dist/mapbox-gl.css').then(()=>{}).catch(t=>{console.error("Failed to load Mapbox CSS",t),dd=null;})),dd)}function pd(){return jsxRuntime.jsx("div",{className:"absolute inset-0 z-50 bg-background-surface/90 backdrop-blur-sm pointer-events-none","data-testid":"map-loading-overlay",children:jsxRuntime.jsx("div",{className:"absolute inset-0 opacity-20",children:jsxRuntime.jsx("div",{className:"h-full w-full",style:{backgroundImage:`
44
131
  linear-gradient(rgba(0,0,0,0.15) 1px, transparent 1px),
45
132
  linear-gradient(90deg, rgba(0,0,0,0.15) 1px, transparent 1px)
46
- `,backgroundSize:"30px 30px"}})})})}var fC="color-mix(in srgb, var(--color-map-neutral-border) 8%, transparent)",PD={backgroundImage:`linear-gradient(to right, ${fC} 1px, transparent 1px), linear-gradient(to bottom, ${fC} 1px, transparent 1px)`,backgroundSize:"24px 24px"},RD={backgroundColor:"color-mix(in srgb, var(--color-map-marker-default) 12%, transparent)"};function ud({style:e,className:t,message:r="Map requires Mapbox token",schematic:o=false,showMarker:n=true}){return o?jsxRuntime.jsxs("div",{style:e,"data-testid":"map-schematic",className:tailwindMerge.twMerge("relative overflow-hidden border border-map-neutral-border bg-background-muted",t),children:[jsxRuntime.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:PD}),n?jsxRuntime.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:"absolute h-24 w-24 rounded-full",style:RD}),jsxRuntime.jsx(H,{name:"MapPin",size:36,weight:"fill",className:"relative text-map-marker-default"})]}):null]}):jsxRuntime.jsx("div",{style:e,className:tailwindMerge.twMerge("flex items-center justify-center bg-background-muted text-text-secondary",t),children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx(H,{name:"MapPin",size:48,className:"mx-auto mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]})})}var gC=Ze.createContext(null);function bC({mapStyleUrl:e,children:t}){return jsxRuntime.jsx(gC.Provider,{value:e??null,children:t})}function Si(){return Ze.useContext(gC)}var hC={streets:"streets",satellite:"satellite",neutral:"neutral"},pd="streets";function md(e,t,r){if(r)return r;switch(e){case "streets":return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12";case "satellite":return "mapbox://styles/mapbox/satellite-streets-v12";case "neutral":return t?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11";default:return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12"}}function xC({longitude:e,latitude:t,showPulse:r=true,accuracy:o}){return jsxRuntime.jsx(BD.Marker,{longitude:e,latitude:t,anchor:"center",children:jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[r&&jsxRuntime.jsx("div",{className:"absolute h-12 w-12 animate-[ping_2s_ease-in-out_infinite] rounded-full bg-action-brand opacity-30",style:{animationDelay:"0s"}}),jsxRuntime.jsx("div",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-full bg-background-surface shadow-lg",children:jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-action-brand"})}),o&&o>0&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute rounded-full border border-action-brand/20 bg-action-brand/10",style:{width:`${Math.min(o/2,100)}px`,height:`${Math.min(o/2,100)}px`}})]})})}var GD={name:"mercator"},WD=[],As=Ze__namespace.default.forwardRef(({initialViewState:e,mapStyleUrl:t,viewState:r,onViewStateChange:o,scrollEnabled:n=true,className:a,previewMode:i=false,previewModeCta:s,onPreviewModePress:d,mapType:l=pd,layers:c=[],mapboxAccessToken:u,transformRequest:m,isLoading:p=false,onLoad:g,controls:f="default",showUserLocation:x=true,onUserLocationChange:b,children:y,additionalInteractiveLayerIds:v=WD,onMapClick:C,showMarker:w=false,markerLocation:S},T)=>{let P=u??Zc();if(!P)return jsxRuntime.jsx("div",{className:`relative ${a||""}`,style:{width:"100%",height:"100%"},children:jsxRuntime.jsx(ud,{className:"w-full h-full",message:"Map unavailable"})});let{isDarkTheme:k}=er(),M=Si(),D=t??M,R=Ze.useRef(null),I=Ze.useRef(null),[E,O]=Ze.useState(false),[W,z]=Ze.useState(false);Ze.useEffect(()=>{cd();},[]);let[F,Y]=Ze.useState(false),U=Ze.useRef(0),[V,J]=Ze.useState(null),[G,B]=Ze.useState(null),N=Ze.useRef(null),h=Ze.useRef(null),[L,A]=_c("interactiveMap.trackingLocation",false),[j,ae]=Ze.useState(false);Ze.useEffect(()=>{if(!navigator.geolocation){ae(true);return}if(L){if(!navigator.permissions?.query){ae(true);return}navigator.permissions.query({name:"geolocation"}).then(X=>{X.state!=="granted"&&A(false),ae(true);}).catch(()=>{ae(true);});}else ae(true);},[]),Ze.useEffect(()=>{let X=setTimeout(()=>{E||z(true);},200);return ()=>clearTimeout(X)},[E]),Ze.useEffect(()=>{h.current=null;},[l,k]),Ze.useEffect(()=>{if(E)return;let X=setInterval(()=>{if(R.current?.loaded()){O(true),z(false);let K=R.current.getMap?.();K&&h.current!==K&&(h.current=K,g?.()),clearInterval(X);}},200);return ()=>clearInterval(X)},[E,g]),Ze.useEffect(()=>{if(j){if(!L||i){N.current!==null&&(navigator.geolocation.clearWatch(N.current),N.current=null);return}if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}return N.current=navigator.geolocation.watchPosition(X=>{let K={latitude:X.coords.latitude,longitude:X.coords.longitude,accuracy:X.coords.accuracy};B(K),b?.(K);},X=>{console.warn("Geolocation error:",X.message),B(null),b?.(null);},{enableHighAccuracy:true,maximumAge:3e4,timeout:3e4}),()=>{N.current!==null&&(navigator.geolocation.clearWatch(N.current),N.current=null);}}},[L,i,b,j]);let _=Ze.useCallback(()=>{O(true),z(false);let X=R.current?.getMap?.();X&&h.current!==X&&(h.current=X,g?.());},[g]),ee=Ze.useCallback(()=>{R.current&&e&&(Y(false),U.current=0,R.current.flyTo({center:[e.longitude||0,e.latitude||0],zoom:e.zoom||0,bearing:e.bearing||0,pitch:e.pitch||0,duration:1e3}));},[e]),ie=Ze.useMemo(()=>f===false||f===null?[]:f==="default"||f===void 0?Em:f,[f]),Ee=Ze.useCallback(()=>{if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}A(true),navigator.geolocation.getCurrentPosition(X=>{let{latitude:K,longitude:de}=X.coords;R.current&&R.current.jumpTo({center:[de,K],zoom:15});},X=>{console.warn("Geolocation error:",X.message),X.code===X.PERMISSION_DENIED&&A(false);},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});},[]),le=Ze.useMemo(()=>{if(i)return null;let X=ie.map(K=>K.type==="navigation"?{...K,onResetZoom:K.onResetZoom||ee,onGeolocateClick:K.onGeolocateClick||Ee}:K);return Bm(X,{mapRef:R,layers:c,showResetButton:F})},[ie,R,i,c,ee,F,Ee]),ge=Ze.useMemo(()=>{let X=[];return c.filter(K=>K.events?.onClick||K.events?.onMouseEnter||K.events?.onMouseLeave||K.tooltip||K.kind==="vector"&&K.revealChipOnHover).forEach(K=>{K.kind==="clusteredVector"?(X.push(`${K.id}-clusters`),X.push(`${K.id}-points`),X.push(`${K.id}-selected-point`)):X.push(K.id);}),[...X,...v]},[c,v]),ce=Ze.useMemo(()=>{let X=new Map;return c.forEach(K=>{K.events&&(X.set(K.id,K.events),K.kind==="clusteredVector"&&(X.set(`${K.id}-clusters`,K.events),X.set(`${K.id}-points`,K.events),X.set(`${K.id}-selected-point`,K.events)));}),X},[c]),pe=Ze.useMemo(()=>{let X=new Map;return c.forEach(K=>{K.tooltip&&(X.set(K.id,K.tooltip),K.kind==="clusteredVector"&&(X.set(`${K.id}-clusters`,K.tooltip),X.set(`${K.id}-points`,K.tooltip),X.set(`${K.id}-selected-point`,K.tooltip)));}),X},[c]),Te=Ze.useMemo(()=>{let X=new Map;return c.forEach(K=>{K.kind==="clusteredVector"&&(X.set(K.id,K),X.set(`${K.id}-clusters`,K),X.set(`${K.id}-points`,K),X.set(`${K.id}-selected-point`,K));}),X},[c]),et=Ze.useMemo(()=>{if(!w)return null;let X=S?.longitude??r?.longitude??e?.longitude,K=S?.latitude??r?.latitude??e?.latitude;return X===void 0||K===void 0?null:{longitude:X,latitude:K}},[w,S,r,e]),Be=Ze.useCallback(X=>{if(i)return;let K=X.features?.[0];if(!K||!K.layer)return;let de=K.layer.id,ne=ce.get(de),ke=pe.get(de),ve;K.geometry.type==="Point"?ve=K.geometry.coordinates:ve=[X.lngLat.lng,X.lngLat.lat];let $={id:K.id??K.properties?.id,lngLat:ve,properties:K.properties||{},layerId:de},ue=Te.get(de),Z=K.properties?.cluster===true;if(ue&&Z){let be=R.current;if(be){let sr=be.getZoom(),ln=Math.min(sr+3,18);be.flyTo({center:ve,zoom:ln,duration:1e3});}return}if(ne?.onClick&&ne.onClick($),ke&&ke.trigger==="click"){let be;ue&&"cluster"in ke?ke.point&&(be=ke.point($)):"content"in ke&&(be=typeof ke.content=="function"?ke.content($):ke.content),be&&J({feature:$,content:be,bare:ke.bare});}C&&C(X);},[ce,pe,i,C,Te,R,ge]),$t=Ze.useMemo(()=>new Set(c.filter(X=>X.kind==="vector"&&X.revealChipOnHover).map(X=>X.id)),[c]),yt=Ze.useRef(null),ir=Ze.useCallback(()=>{let X=yt.current;if(!(!X||!R.current)){yt.current=null;try{R.current.removeFeatureState({source:X.source,sourceLayer:X.sourceLayer,id:X.id},"hover");}catch{}}},[R]);Ze.useEffect(()=>{yt.current=null;},[l,k,D]);let Rt=Ze.useCallback(X=>{let K=X.features?.find(ne=>ne.layer&&$t.has(ne.layer.id));if(!K||K.id==null){ir();return}let de=yt.current;de&&de.source===K.source&&de.id===K.id||(ir(),R.current&&(yt.current={source:K.source,sourceLayer:K.sourceLayer,id:K.id},R.current.setFeatureState({source:K.source,sourceLayer:K.sourceLayer,id:K.id},{hover:true})));},[$t,ir,R]),tt=Ze.useCallback(X=>{let K=X.features?.[0];if(!K||!K.layer)return null;let de=K.layer.id,ne=pe.get(de);if(!ne||ne.trigger!=="hover"&&ne.trigger!==void 0)return null;let ke;K.geometry.type==="Point"?ke=K.geometry.coordinates:ke=[X.lngLat.lng,X.lngLat.lat];let ve={id:K.id??K.properties?.id,lngLat:ke,properties:K.properties||{},layerId:de},$;if(Te.get(de)&&"cluster"in ne){let Z=K.properties?.cluster===true;if(Z&&ne.cluster){let be=K.properties?.point_count||0;$=ne.cluster(be,ve);}else !Z&&ne.point?$=ne.point(ve):$=Z?`${K.properties?.point_count||0} items`:null;}else "content"in ne&&($=typeof ne.content=="function"?ne.content(ve):ne.content);return $?{feature:ve,content:$,bare:ne.bare}:null},[pe,Te]),Gt=Ze.useCallback(X=>{if(i)return;let K=X.features?.[0];if(!K||!K.layer)return;let de=K.layer.id,ne=ce.get(de);if(ne?.onMouseEnter){let ve;K.geometry.type==="Point"?ve=K.geometry.coordinates:ve=[X.lngLat.lng,X.lngLat.lat];let $={id:K.id??K.properties?.id,lngLat:ve,properties:K.properties||{},layerId:de};ne.onMouseEnter($);}let ke=tt(X);ke&&J(ke),R.current&&(R.current.getCanvas().style.cursor="pointer");},[ce,i,R,tt]),te=Ze.useCallback(X=>{if(i)return;Rt(X);let K=X.features?.[0];if(!K||!K.layer)return;let de=tt(X);if(de){J(ne=>ne&&ne.feature.layerId===de.feature.layerId&&ne.feature.id===de.feature.id?ne:de);return}J(ne=>{if(!ne)return ne;let ke=pe.get(ne.feature.layerId);return ke&&(ke.trigger==="hover"||ke.trigger===void 0)?null:ne});},[i,tt,pe,Rt]),Oe=Ze.useCallback(()=>{if(!i){if(ir(),ce.forEach(X=>{X.onMouseLeave?.();}),V){let X=V.feature.layerId,K=c.find(de=>de.id===X);if(!K){let de=X.replace(/-(?:clusters|points|selected-point|cluster-shadows|points-shadow|cluster-count)$/,"");K=c.find(ne=>ne.id===de);}K?.tooltip&&(K.tooltip.trigger||"hover")==="hover"&&J(null);}R.current&&(R.current.getCanvas().style.cursor="");}},[ce,i,R,V,c,ir]),Ue=Ze.useCallback((X,K)=>{for(let de of c)if(de.tooltip&&!(K&&de.id!==K)){if(de.kind==="geojson"){if(typeof de.data=="string")continue;let ne=de.data,ve=(ne.type==="FeatureCollection"?ne.features:[ne]).find($=>$.id===X);if(ve&&ve.geometry.type==="Point")return {id:ve.id,lngLat:ve.geometry.coordinates,properties:ve.properties||{},layerId:de.id}}else if(de.kind==="customPins"){let ne=de.data.find(ke=>ke.id===X||ke._id===X||ke.key===X);if(ne)return {id:X,lngLat:de.getPosition(ne),properties:ne,layerId:de.id}}}return null},[c]);Ze.useImperativeHandle(T,()=>({showTooltip:(X,K)=>{let de=Ue(X,K);if(!de)return;let ne=c.find(ke=>ke.id===de.layerId);if(ne?.tooltip&&"content"in ne.tooltip){let ke=typeof ne.tooltip.content=="function"?ne.tooltip.content(de):ne.tooltip.content;J({feature:de,content:ke,bare:ne.tooltip.bare});}},hideTooltip:()=>{J(null);},getMap:()=>R.current,markMapAsMoved:()=>{Y(true);}}),[Ue,c]);let Dt=(X,K)=>m?m(X,K):{url:X},oe=p||W,we=Ze.useMemo(()=>Ls(c,l),[c,l]);return jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("relative flex h-full w-full overflow-hidden",i&&"cursor-pointer",a),onClick:i?d:void 0,children:jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsxs(BD__default.default,{ref:R,initialViewState:e,...r&&r,style:{width:"100%",height:"100%"},mapStyle:md(l,k,D),styleDiffing:false,projection:GD,mapboxAccessToken:P,transformRequest:Dt,onLoad:_,onMove:i?void 0:X=>{if(X.originalEvent&&E){let K=X.originalEvent.type,de=Math.abs((X.viewState.latitude??0)-(e?.latitude??0)),ne=Math.abs((X.viewState.longitude??0)-(e?.longitude??0)),ke=Math.abs((X.viewState.zoom??0)-(e?.zoom??0));e&&(de>1e-4||ne>1e-4||ke>.1)&&(K==="mousemove"||K==="touchmove"||K==="pointermove"?Y(true):(K==="wheel"||K==="mousewheel")&&(U.current+=1,U.current>=3&&Y(true)));}o?.(X.viewState);},onClick:i?void 0:Be,onMouseMove:i?void 0:te,onMouseEnter:i?void 0:Gt,onMouseLeave:i?void 0:Oe,interactiveLayerIds:i?[]:ge,scrollZoom:i?false:n,dragPan:!i,dragRotate:!i,doubleClickZoom:!i,interactive:!i,attributionControl:false,children:[jsxRuntime.jsx(BD.AttributionControl,{position:"top-left"}),le,we,y,et&&jsxRuntime.jsx(BD.Marker,{longitude:et.longitude,latitude:et.latitude,anchor:"bottom",children:jsxRuntime.jsx(H,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})}),x&&G&&jsxRuntime.jsx(xC,{longitude:G.longitude,latitude:G.latitude,accuracy:G.accuracy}),V&&jsxRuntime.jsx(BD.Popup,{longitude:V.feature.lngLat[0],latitude:V.feature.lngLat[1],offset:15,closeButton:false,closeOnClick:false,className:V.bare?"map-tooltip map-tooltip-bare":"map-tooltip",maxWidth:"none",children:V.content})]},`map-${l}-${k}-${D??"default"}`),oe&&jsxRuntime.jsx(dd,{}),i&&s&&jsxRuntime.jsx("div",{className:"absolute bottom-8 right-8 z-10",children:s})]})})});As.displayName="InteractiveMap";async function vC(e,t,r,o={}){if(e.hasImage(t))return;let n=o.size??64,a=o.color??"#2c2a26",i=o.weight??"regular",s=server.renderToStaticMarkup(Ze.createElement(r,{size:n,color:a,weight:i})),d=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`;await new Promise((l,c)=>{let u=new Image(n,n);u.onload=()=>{try{e.hasImage(t)||e.addImage(t,u,{sdf:!1}),l();}catch(m){c(m instanceof Error?m:new Error(`Failed to addImage "${t}": ${String(m)}`));}},u.onerror=m=>{c(m instanceof Error?m:new Error(`Failed to load icon "${t}"`));},u.src=d;});}function Ti({width:e="100%",height:t="100%",initialViewState:r={longitude:-122.4194,latitude:37.7749,zoom:14},isLoading:o=false,mapType:n="streets",mapStyleUrl:a,layers:i=[],mapboxAccessToken:s,showMarker:d=true,markerOffsetY:l=0,showAttribution:c=false,onLoad:u,className:m,showExpandToggle:p=false,expandedMapTitle:g="Explore map",expandedMapAddressLabel:f,schematicPlaceholder:x=false}){let b=s??Zc(),{isDarkTheme:y}=er(),[v,C]=Ze.useState(false),[w,S]=Ze.useState(false),T=Si(),P=a??T,[k,M]=Ze.useState(false),D=Ze.useRef(null),R=Ze.useRef(null),I=Ze.useCallback(()=>M(true),[]),E=Ze.useCallback(()=>M(false),[]);Ze.useEffect(()=>{cd();},[]);let O={width:typeof e=="number"?`${e}px`:e,height:typeof t=="number"?`${t}px`:t};Ze.useEffect(()=>{let F=setTimeout(()=>{v||S(true);},200);return ()=>clearTimeout(F)},[v]);let W=Ze.useCallback(()=>{C(true),S(false),u?.();},[u]);Ze.useEffect(()=>{if(!R.current)return;let F=new ResizeObserver(()=>{D.current&&D.current.resize();});return F.observe(R.current),()=>{F.disconnect();}},[]);let z=o||w;return b?jsxRuntime.jsxs("div",{ref:R,style:O,className:`relative ${m||""}`,children:[jsxRuntime.jsxs(BD__default.default,{ref:D,mapboxAccessToken:b,initialViewState:r,style:{width:"100%",height:"100%"},mapStyle:md(n,y,P),onLoad:W,scrollZoom:false,dragPan:false,dragRotate:false,doubleClickZoom:false,touchZoomRotate:false,interactive:false,attributionControl:false,children:[c&&jsxRuntime.jsx(BD.AttributionControl,{position:"top-left"}),Ls(i,n),d&&r.longitude!==void 0&&r.latitude!==void 0&&jsxRuntime.jsx(BD.Marker,{longitude:r.longitude,latitude:r.latitude,anchor:"bottom",offset:[0,l],children:jsxRuntime.jsx(H,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})})]}),p&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-20",children:jsxRuntime.jsx(Kr,{icon:"ArrowsOutSimple",ariaLabel:"Expand map to fullscreen",onPress:I})}),p&&jsxRuntime.jsx(yr,{isOpen:k,onClose:E,title:g,contentPadding:false,maxWidth:"min(1100px, 100vw)",minWidth:"min(360px, 100vw)",height:"80vh",mobileHeight:"82vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden sm:mx-4 sm:mt-4 sm:rounded-xl sm:border sm:border-border-default",children:jsxRuntime.jsx(As,{initialViewState:r,mapType:n,mapStyleUrl:P,mapboxAccessToken:b,showMarker:d,markerLocation:r.longitude!==void 0&&r.latitude!==void 0?{latitude:r.latitude,longitude:r.longitude}:void 0,layers:i})}),f&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary px-4 py-3 flex-shrink-0",children:f})]})}),z&&jsxRuntime.jsx(dd,{})]}):jsxRuntime.jsx(ud,{style:O,className:m,schematic:x,showMarker:d})}var QD={xs:{bar:"h-1 w-14",text:"text-xs",icon:"h-2.5 w-2.5"},sm:{bar:"h-1.5 w-48",text:"text-xs",icon:"h-3 w-3"},md:{bar:"h-2 w-64",text:"text-sm",icon:"h-4 w-4"},lg:{bar:"h-3 w-80",text:"text-base",icon:"h-5 w-5"}};function SC({label:e,size:t="md",variant:r="default",showWarningIndicator:o=true,warningThreshold:n=80,hideValueText:a=false,className:i,...s}){let d=QD[t],l=a&&e&&!s["aria-label"]&&!s["aria-labelledby"]?{"aria-label":e}:{};return jsxRuntime.jsx(reactAriaComponents.Meter,{...s,...l,className:Ie(i,"flex flex-col gap-1"),children:({percentage:c,valueText:u})=>{let m=o&&c>=n,p=r==="default"?ZD(c):r;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!a&&jsxRuntime.jsxs("div",{className:"flex justify-between gap-2",children:[e&&jsxRuntime.jsx(qe,{children:e}),jsxRuntime.jsxs("span",{className:tailwindMerge.twMerge(d.text,m?"text-feedback-error-text":"text-text-secondary"),children:[m&&jsxRuntime.jsx(lucideReact.AlertTriangle,{"aria-label":"Warning: High value",className:tailwindMerge.twMerge("inline-block align-text-bottom mr-1",d.icon)}),u]})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full bg-background-muted","ring-1 ring-inset ring-border-muted",d.bar),children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute left-0 top-0 h-full rounded-full transition-all duration-300","forced-colors:bg-[Highlight]",_D(p)),style:{width:`${Math.min(100,Math.max(0,c))}%`},role:"presentation","aria-hidden":"true"})})]})}})}function ZD(e){return e<50?"success":e<70?"info":e<90?"warning":"error"}function _D(e){switch(e){case "success":return "bg-feedback-success-text";case "warning":return "bg-feedback-warning-text";case "error":return "bg-feedback-error-text";case "info":return "bg-feedback-info-text";case "neutral":return "bg-text-subtle";default:return "bg-action-brand"}}var _m=(e,t)=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase());function $m(e){return [e.value,e.label]}function gd(e,t,r=_m){let o=t.trim();return o===""?[...e]:e.filter(n=>$m(n).some(a=>r(a,o)))}function bd(e){let t=e.query.trim();if(t==="")return false;let r=t.toLocaleLowerCase();return e.options.some(n=>n.value.toLocaleLowerCase()===r||n.label.toLocaleLowerCase()===r)?false:!e.selected.some(n=>n.toLocaleLowerCase()===r)}function hd(e,t){return e.map(r=>{let o=t.find(n=>n.value===r);return o?o.count===void 0?{value:r,label:o.label,isUnknown:false}:{value:r,label:o.label,count:o.count,isUnknown:false}:{value:r,label:r,isUnknown:true}})}var oA=e=>e.kind==="literal"?`literal:${e.value}`:`option:${e.option.value}`,ef=e=>e.kind==="literal"?e.value:e.option.value,wC=e=>e.kind==="literal"?e.value:e.option.label,nA={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},aA={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},iA={sm:"xs",md:"xs",lg:"sm",xl:"sm"};function NC({options:e,value:t,defaultValue:r,onChange:o,label:n,placeholder:a,size:i="md",loading:s=false,disabled:d=false,maxSelected:l,allowLiteral:c=false,onSearchChange:u,truncated:m=false,totalCount:p,emptyMessage:g,showSelectAll:f=false,description:x,errorMessage:b,isRequired:y=false,onBlur:v,inputRef:C,labelHidden:w=false,className:S,id:T}){let P=Ze.useId(),k=T??`multiselect-${P}`,M=`${k}-input`,D=`${k}-listbox`,R=Ze.useRef(null),I=Ze.useCallback(te=>{R.current=te,typeof C=="function"?C(te):C&&(C.current=te);},[C]),{contains:E}=reactAria.useFilter({sensitivity:"base"}),{isFocused:O,handleFocus:W,handleBlur:z}=vr(),[F,Y]=Ze.useState(""),[U,V]=Ze.useState(true),[J,G]=Ze.useState(null),[B,N]=Ze.useState(""),[h,L]=Ze.useState(()=>[...r??[]]),A=Ze.useMemo(()=>t?[...t]:h,[t,h]),j=Ze.useMemo(()=>gd(e,F,E),[e,F,E]),ae=c&&!s&&bd({query:F,options:e,selected:A}),_=Ze.useMemo(()=>{let te=j.map(Oe=>({kind:"option",option:Oe}));return ae?[{kind:"literal",value:F.trim()},...te]:te},[j,ae,F]),ee=Ze.useMemo(()=>hd(A,e),[A,e]),ie=l!==void 0&&A.length>=l,Ee=Ze.useCallback((te,Oe)=>{t||L(te),N(`${Oe} ${te.length} selected.`),o(te);},[o,t]),le=Ze.useCallback((te,Oe)=>{if(!d){if(A.includes(te)){Ee(A.filter(Ue=>Ue!==te),`${Oe} removed.`);return}ie||Ee([...A,te],`${Oe} selected.`);}},[ie,Ee,d,A]),ge=Ze.useCallback(te=>{te.kind==="option"&&te.option.disabled||le(ef(te),wC(te));},[le]),ce=te=>{if(d||te.length===0)return;let Oe=new Set(te),Ue=te.map(Dt=>ee.find(oe=>oe.value===Dt)?.label??Dt);Ee(A.filter(Dt=>!Oe.has(Dt)),`${Ue.join(", ")} removed.`);},pe=te=>{Y(te),G(null),V(true),u?.(te);},Te=te=>{if(_.length===0){G(null);return}G(Oe=>Oe===null?te>0?0:_.length-1:(Oe+te+_.length)%_.length);},et=te=>{if(d)return;let Oe=J===null?void 0:_[J];switch(te.key){case "ArrowDown":te.preventDefault(),V(true),Te(1);break;case "ArrowUp":te.preventDefault(),V(true),Te(-1);break;case "Home":_.length>0&&(te.preventDefault(),V(true),G(0));break;case "End":_.length>0&&(te.preventDefault(),V(true),G(_.length-1));break;case "Enter":Oe&&(te.preventDefault(),ge(Oe));break;case " ":F===""&&Oe&&(te.preventDefault(),ge(Oe));break;case "Escape":te.preventDefault(),F!==""?pe(""):(V(false),G(null));break;case "Backspace":F===""&&A.length>0&&(te.preventDefault(),ce([A[A.length-1]]));break;}},Be=j.filter(te=>!te.disabled&&!A.includes(te.value)).map(te=>te.value),$t=l===void 0?Be.length:Math.max(0,l-A.length),yt=Math.min(Be.length,$t),ir=yt===Be.length?`Select all ${Be.length} matching`:`Select ${yt} of ${Be.length} matching`,Rt=()=>{if(d||yt===0)return;let te=Be.slice(0,yt);Ee([...A,...te],`${te.length} matching options selected.`);},tt=s?"loading":e.length===0?"empty":j.length===0&&F.trim()!==""?"no-match":null,Gt=Je[i].text;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex w-full flex-col gap-1",S),"data-testid":"multiselect",children:[jsxRuntime.jsx(qe,{size:i,htmlFor:M,isRequired:y,...w?{className:"sr-only"}:{},children:n}),jsxRuntime.jsxs(Nt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 z-10 flex -translate-y-1/2 items-center",children:s?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:tailwindMerge.twMerge(nA[i],"text-text-secondary")})}),jsxRuntime.jsx("input",{ref:I,id:M,type:"text",role:"combobox",autoComplete:"off","aria-expanded":U,"aria-controls":D,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":U&&J!==null&&_[J]?`${k}-row-${J}`:void 0,"aria-required":y||void 0,"aria-invalid":b?true:void 0,value:F,placeholder:a,disabled:d,onChange:te=>pe(te.target.value),onKeyDown:et,onFocus:te=>{V(true),W(te);},onBlur:te=>{z(te),v?.(te);},className:Yt({isDisabled:d,isFocused:O,isInvalid:!!b,size:i,className:tailwindMerge.twMerge(aA[i],"pr-3")})})]}),ee.length>0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-selection-region",role:"group","aria-label":`Selected ${n}`,className:"flex flex-wrap gap-1.5 rounded-[var(--control-border-radius)] border border-border-default bg-background-muted p-2",children:ee.map(te=>jsxRuntime.jsx(jr,{size:iA[i],variant:"primary",isDisabled:d,removeLabel:`Remove ${te.label}`,onRemove:()=>ce([te.value]),className:"shrink-0",children:te.isUnknown?jsxRuntime.jsx("span",{"data-testid":`multiselect-selection-unknown-${te.value}`,title:"Not in the current option list",children:`${te.label} (custom)`}):te.label},te.value))}),f&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(re,{variant:"link",size:i,onPress:Rt,isDisabled:d||yt===0,children:ir}),jsxRuntime.jsx(re,{variant:"link",size:i,onPress:()=>ce(A),isDisabled:d||A.length===0,children:"Clear all"})]}),jsxRuntime.jsx("div",{id:D,role:"listbox","aria-multiselectable":"true","aria-label":`${n} options`,hidden:!U,className:tailwindMerge.twMerge(Gt,"max-h-[260px] overflow-y-auto rounded-[var(--control-border-radius)] border border-border-input bg-background-input"),children:U&&_.map((te,Oe)=>{let Ue=A.includes(ef(te)),Dt=d||te.kind==="option"&&te.option.disabled===true||!Ue&&ie;return jsxRuntime.jsxs("div",{id:`${k}-row-${Oe}`,role:"option","aria-selected":Ue,"aria-disabled":Dt||void 0,"data-value":ef(te),"data-literal":te.kind==="literal"?"true":void 0,"data-active":J===Oe?"true":void 0,onMouseDown:oe=>oe.preventDefault(),onClick:()=>{Dt||(ge(te),R.current?.focus());},className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 px-3",Je[i].paddingY,"text-text-primary",J===Oe&&"bg-background-hover",Ue&&"bg-background-selected font-medium",Dt&&"text-text-disabled"),children:[jsxRuntime.jsx(ap,{isSelected:Ue,isDisabled:Dt,className:"!w-4 !h-4"}),jsxRuntime.jsx("span",{className:"flex-1 truncate",children:wC(te)}),te.kind==="literal"&&jsxRuntime.jsx("span",{"data-testid":"multiselect-literal-badge",className:"italic text-text-secondary",children:"Use as typed"}),te.kind==="option"&&te.option.count!==void 0&&jsxRuntime.jsx("span",{"data-testid":`multiselect-count-${te.option.value}`,className:"text-text-secondary",children:te.option.count.toLocaleString()})]},oA(te))})}),tt==="loading"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-loading","data-status":"loading",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(Jr,{size:14,color:"text-text-secondary"}),jsxRuntime.jsx("span",{children:"Loading options\u2026"})]})}),tt==="empty"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-empty","data-status":"empty",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"Tray",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:g??"No options available"})]})}),tt==="no-match"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-no-match","data-status":"no-match",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2 text-feedback-warning-text",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:`No options match \u201C${F.trim()}\u201D`})]})}),m&&jsxRuntime.jsx("div",{"data-testid":"multiselect-truncation",children:jsxRuntime.jsx(Pe,{size:i,children:p===void 0?"Showing a partial list \u2014 refine your search to see more":`Showing ${e.length} of ${p} \u2014 refine your search to see more`})}),l!==void 0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-limit",children:jsxRuntime.jsx(Pe,{size:i,children:ie?`${A.length} of ${l} selected \u2014 limit reached, remove one to choose another`:`${A.length} of ${l} selected`})}),x&&jsxRuntime.jsx(Pe,{size:i,children:x}),b&&jsxRuntime.jsx(xe,{size:i,children:b}),jsxRuntime.jsx("div",{"data-testid":"multiselect-live-region",role:"status","aria-live":"polite",className:"sr-only",children:B})]})}var vd="bg-background-surface border-l-[3px] border-y border-r border-border-default text-text-primary",dA={success:{container:vd,iconName:"CheckCircle",iconColor:"text-feedback-success-text",borderColor:"var(--color-feedback-success-border)"},error:{container:vd,iconName:"XCircle",iconColor:"text-feedback-error-text",borderColor:"var(--color-feedback-error-border)"},warning:{container:vd,iconName:"Warning",iconColor:"text-feedback-warning-text",borderColor:"var(--color-feedback-warning-border)"},info:{container:vd,iconName:"Info",iconColor:"text-feedback-info-text",borderColor:"var(--color-feedback-info-border)"}};function Sd({id:e,message:t,variant:r="info",duration:o=5e3,dismissible:n=true,onDismiss:a,className:i}){let{container:s,iconName:d,iconColor:l,borderColor:c}=dA[r];return Ze.useEffect(()=>{if(o>0){let u=setTimeout(()=>{a?.();},o);return ()=>clearTimeout(u)}},[o,a]),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.2}},className:tailwindMerge.twMerge("pointer-events-auto flex items-center gap-3 rounded-lg p-4 shadow-lg",s,i),style:{borderLeftColor:c},children:[jsxRuntime.jsx(H,{name:d,size:20,className:l}),jsxRuntime.jsx("p",{className:"flex-1 select-text text-sm font-medium",children:t}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex-shrink-0 rounded-md p-1 transition-colors hover:bg-background-hover","aria-label":"Dismiss notification",children:jsxRuntime.jsx(H,{name:"X",size:16})})]})}var hA={"top-left":"top-4 left-4 items-start","top-center":"top-4 left-1/2 -translate-x-1/2 items-start","top-right":"top-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-start","bottom-right":"bottom-4 right-4 items-end"};function wd({notices:e,onDismiss:t,position:r="bottom-center",className:o}){let[n,a]=Ze.useState(false);if(Ze.useEffect(()=>{a(true);},[]),!n)return null;let i=jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none fixed z-50 flex flex-col gap-2",hA[r],o),"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"sync",children:e.map(s=>jsxRuntime.jsx(Sd,{id:s.id,message:s.message,variant:s.variant,duration:s.duration,dismissible:s.dismissible,onDismiss:()=>t(s.id)},s.id))})});return reactDom.createPortal(i,document.body)}var TC=Ze.createContext(void 0);function kC({children:e,position:t="bottom-center",maxNotices:r=5,defaultDuration:o=5e3,defaultDismissible:n=true}){let[a,i]=Ze.useState([]),s=Ze.useCallback((u,m)=>{let p=`notice-${Date.now()}-${Math.random()}`,g={id:p,message:u,variant:m?.variant||"info",duration:m?.duration??o,dismissible:m?.dismissible??n};return i(f=>{let x=[...f,g];return x.length>r?x.slice(-r):x}),p},[r,o,n]),d=Ze.useCallback(u=>{i(m=>m.filter(p=>p.id!==u));},[]),l=Ze.useCallback(()=>{i([]);},[]),c={notices:a,addNotice:s,removeNotice:d,clearNotices:l};return jsxRuntime.jsxs(TC.Provider,{value:c,children:[e,jsxRuntime.jsx(wd,{notices:a,onDismiss:d,position:t})]})}function PC(){let e=Ze.useContext(TC);if(!e)throw new Error("useNoticeContext must be used within a NoticeProvider");return e}function RC(){let{addNotice:e,removeNotice:t,clearNotices:r}=PC(),o=Ze.useCallback((d,l)=>e(d,l),[e]),n=Ze.useCallback((d,l)=>e(d,{...l,variant:"success"}),[e]),a=Ze.useCallback((d,l)=>e(d,{...l,variant:"error"}),[e]),i=Ze.useCallback((d,l)=>e(d,{...l,variant:"warning"}),[e]),s=Ze.useCallback((d,l)=>e(d,{...l,variant:"info"}),[e]);return {show:o,success:n,error:a,warning:i,info:s,dismiss:t,clear:r}}var NA={plain:"",contained:"bg-background-surface rounded-lg border border-border-default p-6",bordered:"border-y border-border-default py-6"},TA={none:"",sm:"my-4",md:"my-6 md:my-8",lg:"my-8 md:my-12"};function ki({id:e,title:t,description:r,actions:o,variant:n="plain",spacing:a="none",withDivider:i=false,headingAs:s="h2",className:d,children:l}){let c=Ze__namespace.default.useId(),u=e?`${e}-heading`:c,m=t||r||o;return jsxRuntime.jsxs("section",{id:e,className:tailwindMerge.twMerge(TA[a],NA[n],d),"aria-labelledby":t?u:void 0,children:[m&&jsxRuntime.jsxs("header",{id:u,className:tailwindMerge.twMerge("flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",i&&"border-b border-border-default pb-4 mb-6",!i&&l&&"mb-6"),children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[t&&jsxRuntime.jsx(xr,{tag:s,size:"md",className:"text-text-primary",children:t}),r&&jsxRuntime.jsx("p",{className:"mt-2 text-base text-text-secondary",children:r})]}),o&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:o})]}),l&&jsxRuntime.jsx("div",{className:"",children:t?jsxRuntime.jsx(mn,{children:l}):l})]})}ki.displayName="Section";function Td({sections:e,activeSection:t,onSectionChange:r,orientation:o="responsive",className:n,scrollBehavior:a="smooth",stickyTop:i="1.5rem",heading:s,sectionIdPrefix:d="section-",filterSection:l,scrollContainerId:c}){let u=Ze__namespace.useRef(null),m=Ze__namespace.useRef(null),[p,g]=Ze__namespace.useState(e[0]?.id||null),f=t??p,x=Ze__namespace.useCallback(()=>c?document.getElementById(c):null,[c]),b=Ze__namespace.useCallback(S=>document.getElementById(`${d}${S}`)??document.getElementById(S),[d]);Ze__namespace.useEffect(()=>{let S=window.location.hash;if(!S)return;let T=S.slice(1),P=T.startsWith(d)?T.slice(d.length):T,k=e.find(M=>M.id===P);k&&requestAnimationFrame(()=>{let M=b(k.id);if(!M)return;let D=x();if(D){let R=D.getBoundingClientRect(),I=M.getBoundingClientRect(),E=D.scrollTop+(I.top-R.top);D.scrollTo({top:Math.max(0,E),behavior:"instant"});}else M.scrollIntoView({behavior:"instant",block:"start"});r?r(k.id):g(k.id);});},[]),Ze__namespace.useEffect(()=>{if(t!==void 0&&r)return;let S=M=>{if(!M)return false;let D=window.getComputedStyle(M);return D.display!=="none"&&D.visibility!=="hidden"&&D.opacity!=="0"},T=()=>{let M=S(u.current),D=S(m.current);if(!M&&!D)return null;let R=x(),I=new IntersectionObserver(E=>{E.forEach(O=>{if(O.isIntersecting){let W=O.target.id.replace(d,"");r?r(W):g(W);}});},{root:R??void 0,rootMargin:"-20% 0px -70% 0px",threshold:0});return e.forEach(E=>{let O=b(E.id);O&&I.observe(O);}),I},P=T(),k=()=>{P&&P.disconnect(),P=T();};return window.addEventListener("resize",k),()=>{P&&P.disconnect(),window.removeEventListener("resize",k);}},[e,d,t,r,o,x,b]);let y=Ze__namespace.useMemo(()=>l?e.filter(l):e,[e,l]),v=Ze__namespace.useCallback((S,T)=>{S.preventDefault();let P=b(T);if(P){let k=x();if(k){let M=k.getBoundingClientRect(),D=P.getBoundingClientRect(),R=k.scrollTop+(D.top-M.top),I=Math.max(0,k.scrollHeight-k.clientHeight);k.scrollTo({top:Math.max(0,Math.min(R,I)),behavior:a});}else {let M=P.getBoundingClientRect().top+window.scrollY,D=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),R=Math.max(0,Math.min(M,D));window.scrollTo({top:R,behavior:a});}window.history.pushState&&window.history.pushState(null,"",`#${d}${T}`),r?r(T):g(T);}},[d,a,r,x,b]);if(y.length===0)return null;let C=o==="vertical"?"":o==="horizontal"?"hidden":"hidden lg:block",w=o==="horizontal"?"":o==="vertical"?"hidden":"lg:hidden";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("nav",{ref:u,className:tailwindMerge.twMerge(C,n),"aria-label":"Section navigation",children:jsxRuntime.jsxs("div",{className:"space-y-1",style:{position:"sticky",top:i},children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 text-label-sm font-semibold uppercase tracking-wide text-text-tertiary",children:s}):null,y.map(S=>{let T=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:P=>v(P,S.id),className:tailwindMerge.twMerge("block w-full text-left px-3 py-2 rounded-md text-sm transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs tabular-nums text-text-secondary",children:S.count})]})},S.id)})]})}),jsxRuntime.jsx("nav",{ref:m,className:tailwindMerge.twMerge(w,"overflow-x-auto scrollbar-hide sticky top-0 z-10 py-4 -mt-4",n),"aria-label":"Section navigation",children:jsxRuntime.jsx("div",{className:"flex gap-2 min-w-max",children:y.map(S=>{let T=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:P=>v(P,S.id),className:tailwindMerge.twMerge("inline-block px-4 py-2 rounded-md text-sm whitespace-nowrap transition-colors no-underline",T?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":T?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsxs("span",{className:"text-xs tabular-nums text-text-secondary",children:["(",S.count,")"]})]})},S.id)})})})]})}function EC(e){return "primary"}var kd=Ze__namespace.createContext({variant:"primary"});function LA({orientation:e,className:t=""}){return `flex flex-col w-full ${{horizontal:"",vertical:"flex-row"}[e]||""} ${t}`.trim()}function Rd({variant:e="primary",...t}){let r=EC();return jsxRuntime.jsx(kd.Provider,{value:{variant:r},children:jsxRuntime.jsx("div",{className:"w-full h-auto",children:jsxRuntime.jsx(reactAriaComponents.Tabs,{...t,className:reactAriaComponents.composeRenderProps(t.className,(o,n)=>LA({...n,className:o}))})})})}function DA({orientation:e,sticky:t=false,className:r=""}){let o="flex gap-10 relative after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-border-muted",n={horizontal:"flex-row w-full flex-nowrap overflow-x-auto scrollbar-hide",vertical:"flex-col items-start"},a=t?"sticky top-0 bg-background-surface z-10":"";return `${o} ${n[e]||""} ${a} ${r}`.trim()}function Md({variant:e,sticky:t=false,...r}){let o=Ze__namespace.useContext(kd),n=EC(e??o.variant);return jsxRuntime.jsx(kd.Provider,{value:{variant:n},children:jsxRuntime.jsx(reactAriaComponents.TabList,{...r,className:reactAriaComponents.composeRenderProps(r.className,(a,i)=>DA({...i,sticky:t,className:a||""}))})})}function AA({isSelected:e,isDisabled:t,variant:r,className:o=""}){let n="flex items-center cursor-default px-1 py-2 font-medium transition-all hover:cursor-pointer relative shrink-0 whitespace-nowrap",a=`${ot()} ${r==="primary"?"focus-visible:outline-action-primary":""}`.trim(),i="";return t?i="text-text-disabled forced-colors:text-[GrayText] cursor-not-allowed":e?i="text-action-primary border-b-2 border-action-primary z-10 forced-colors:bg-[Highlight]":i="text-text-disabled hover:text-text-secondary",`${n} ${a} ${i} ${o}`.trim()}function Ed(e){let{variant:t}=Ze__namespace.useContext(kd);return jsxRuntime.jsx(reactAriaComponents.Tab,{...e,"data-testid":e.id?`tab-${e.id}`:void 0,className:reactAriaComponents.composeRenderProps(e.className,(r,o)=>AA({...o,className:r,isSelected:o.isSelected,variant:t}))})}function IA({className:e=""}){let t="block w-full mt-4 text-text-primary",r=ot();return `${t} ${r} ${e}`.trim()}function LC(e){return jsxRuntime.jsx(reactAriaComponents.TabPanel,{...e,className:reactAriaComponents.composeRenderProps(e.className,(t,r)=>IA({...r,className:t||""}))})}function La({children:e,maxWidth:t=1400,paddingXClass:r="px-4 md:px-6",paddingYClass:o="pt-8 pb-14 md:pt-12 md:pb-28",className:n}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(`w-full ${r} ${o}`,n),style:{marginInline:"auto",maxWidth:t},children:e})}function FA({title:e,subtitle:t,breadcrumbs:r,breadcrumbsNode:o,media:n,actions:a,metadata:i,headingAs:s,sticky:d,stickyTop:l="0",zIndex:c=10,isLoading:u=false,className:m}){let p=d?"sticky bg-background-body":"",g=d?{top:l,zIndex:c}:{};return u?jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o||r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(q,{className:"h-4 w-32"})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(q,{className:"h-8 w-64"})}),t?jsxRuntime.jsx(q,{className:"mt-2 h-5 w-48"}):null,i?jsxRuntime.jsx(q,{className:"mt-2 h-4 w-40"}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,x)=>jsxRuntime.jsx(q,{className:"h-9 w-full"},x))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,x)=>jsxRuntime.jsx(q,{className:"h-9 w-24"},x))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:jsxRuntime.jsx(q,{className:"h-64 w-full"})}):null]}):jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:o}):r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(Pl,{children:r.map((f,x)=>{let{label:b,...y}=f;return jsxRuntime.jsx(Rl,{...y,children:b},`${b}-${x}`)})})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(xr,{tag:s||"h1",size:"xl",children:e})}),t?jsxRuntime.jsx("p",{className:"mt-2 text-base md:text-lg text-text-secondary",children:t}):null,i?jsxRuntime.jsx("div",{className:"mt-2 text-sm text-text-secondary",children:i}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,x)=>jsxRuntime.jsx(Ze__namespace.default.Fragment,{children:f},x))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,x)=>jsxRuntime.jsx(Ze__namespace.default.Fragment,{children:f},x))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:n}):null]})}function BA({tabs:e,value:t,defaultValue:r,onChange:o,className:n,children:a}){let i=s=>{o?.(s);};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("mb-3 md:mb-4 border-b-2 border-border-muted",n),children:jsxRuntime.jsxs(Rd,{selectedKey:t,defaultSelectedKey:r||e[0]?.id,onSelectionChange:i,children:[jsxRuntime.jsx(Md,{className:"after:bg-transparent",children:e.map(s=>jsxRuntime.jsx(Ed,{id:s.id,isDisabled:s.disabled,children:s.label},s.id))}),a]})})}function VA({children:e,className:t,withSectionNav:r,navWidth:o="240px",gap:n="2rem",activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d="section-",scrollContainerId:l,navHeading:c,navStickyTop:u}){return r?jsxRuntime.jsx(zA,{position:r,navWidth:o,gap:n,activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:l,navHeading:c,navStickyTop:u,className:t,children:e}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full space-y-8 md:space-y-12",t),children:e})}function OA({children:e,sticky:t=true,className:r}){return jsxRuntime.jsx("aside",{className:tailwindMerge.twMerge(t?"lg:sticky lg:top-20":"",r),children:e})}function zA({activeSection:e,onSectionChange:t,position:r,navWidth:o,gap:n,children:a,className:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:l,navHeading:c,navStickyTop:u}){let m=Ze__namespace.default.useMemo(()=>{let v=[];return Ze__namespace.default.Children.forEach(a,C=>{if(Ze__namespace.default.isValidElement(C)&&(C.type===ki||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;w.id?v.push({id:w.id,label:w.navLabel||(typeof w.title=="string"?w.title:`Section ${w.id}`)}):process.env.NODE_ENV==="development"&&console.warn("Section component used within PageLayout.Content with withSectionNav must have an id prop");}}),v},[a]),p=Ze__namespace.default.useMemo(()=>{let v=Ze__namespace.default.Children.map(a,C=>{if(Ze__namespace.default.isValidElement(C)&&(C.type===ki||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;if(w.id)return Ze__namespace.default.cloneElement(C,{...w,id:`${d}${w.id}`})}return C});return jsxRuntime.jsx("div",{className:"space-y-8 md:space-y-12",children:v})},[a,d]),g=(v,C)=>jsxRuntime.jsx(Td,{sections:m,activeSection:e,onSectionChange:t,orientation:v,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:l,heading:c,className:C});if(r==="above")return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-4",i),children:[jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-body",children:g("horizontal")}),p]});let f=r==="left"?"var(--nav-width) 1fr":"1fr var(--nav-width)",x=u?"":"top-20",b=u?{top:u}:void 0,y=tailwindMerge.twMerge("hidden lg:block sticky self-start",x);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"lg:hidden sticky top-0 z-10 mt-3 mb-4 bg-background-body border-b border-border-default shadow-sm",children:g("horizontal","py-3 mt-0")}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("lg:grid",i),style:{gridTemplateColumns:f,gap:n,"--nav-width":o},children:[r==="left"&&jsxRuntime.jsx("nav",{className:y,style:b,children:g("vertical")}),p,r==="right"&&jsxRuntime.jsx("nav",{className:y,style:b,children:g("vertical")})]})]})}function HA({children:e,className:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-auto min-h-0",t),children:e})}La.Header=FA;La.Tabs=BA;La.Content=VA;La.Aside=OA;La.ScrollableContent=HA;function WA(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var UA=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function IC({label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:n="Enter a location...",errorMessage:a,description:i,size:s="md",tooltip:d,isRequired:l,isDisabled:c,showErrors:u=true,autoFocus:m=false,onSelect:p,searchTypes:g=["place","address"],defaultFilter:f,validationResult:x,countryRestrictions:b,proximity:y="ip",hideCountry:v=false,showIcon:C=true,useMobileTray:w=true,className:S}){let T=Ze.useRef(new WeakMap),P=Ze.useRef([]),k={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:UA,types:g.join(","),limit:"5",...b?.length?{country:b.join(",").toLowerCase()}:{},...y?{proximity:y==="ip"?"ip":y.join(",")}:{}},shouldLoad:R=>R.length>0,transformResponse:R=>{if(!WA(R))return [];let I=R.features.map(E=>{let O={id:E.id,name:E.place_name};return T.current.set(O,{type:E.place_type[0],center:E.center,context:E.context,address:E.address,text:E.text,properties:E.properties}),O});return I.length>0&&(P.current=I),I}},M=R=>{let I=T.current.get(R),E=R.name.split(", "),O=E[0],W=E.slice(1);v&&W.length>0&&(W=W.slice(0,-1));let z=W.join(", ");return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[C&&jsxRuntime.jsx(H,{name:I?.type==="address"?"MapPin":I?.type==="place"?"Buildings":I?.type==="region"?"MapPinArea":I?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col",children:[jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:O}),z&&jsxRuntime.jsx("span",{className:"truncate text-sm text-text-secondary",children:z})]})]})},D=R=>R?jsxRuntime.jsx(H,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"});return jsxRuntime.jsx(Nl,{"data-testid":"autocomplete","data-config":JSON.stringify({types:g.join(","),country:b?.join(",")?.toLowerCase(),proximity:y==="ip"?"ip":y?.join(",")}),label:e||void 0,selectedKey:t,defaultSelectedKey:r,onSelectionChange:R=>{if(o?.(R),R){let E=P.current.find(O=>O.id===R);if(E){let O=T.current.get(E);O&&p({id:E.id,place_name:E.name,place_type:[O.type],center:O.center,context:O.context,address:O.address,text:O.text,properties:O.properties});}}},requestConfig:k,placeholder:n,errorMessage:a,description:i,size:s,tooltip:d,isRequired:l,isDisabled:c,showErrors:u,autoFocus:m,renderItem:M,renderLeftIcon:D,defaultFilter:f,validationResult:x,hideChevron:true,useMobileTray:w,className:S})}function BC({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...n}){return jsxRuntime.jsx(reactAriaComponents.ProgressBar,{...n,className:Ie(n.className,"flex flex-col gap-1"),children:({percentage:a,valueText:i,isIndeterminate:s})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:e}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:t||i})]}),jsxRuntime.jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline-none`,children:jsxRuntime.jsx("div",{className:`absolute top-0 h-full rounded-full bg-action-default forced-colors:bg-[Highlight] ${s?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(s?40:a)+"%"}})})]})})}function VC({as:e="div",size:t="md",tone:r="editorial",className:o="",children:n,...a}){let i=t==="md"?"":`prose-${t}`,s=r==="editorial"?"":`prose-${r}`;return jsxRuntime.jsx(e,{className:br("prose",i,s,o),...a,children:n})}function QA(e="2"){return {1:"p-2 text-xs",2:"p-3 text-sm",3:"p-4 text-base"}[e]}function ZA(e){return e?"border-action-primary text-action-primary":"border-border text-text-primary"}function _A(){return "opacity-50 cursor-not-allowed"}function OC({value:e,isDisabled:t,className:r,children:o,size:n="2",variant:a="primary"}){return jsxRuntime.jsx(reactAriaComponents.Radio,{value:e,isDisabled:t,className:Ie(r,"relative flex items-center justify-center cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-action-primary focus:ring-offset-2 rounded-lg min-h-[44px]"),children:({isSelected:s,isDisabled:d})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center w-full h-full transition-all duration-200 rounded-lg border-2 bg-background-surface",!(t||d)&&!s&&"hover:bg-background-hover hover:border-border-hover",QA(n),ZA(s),(t||d)&&_A(),r),children:o})})}function zC({value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:i,children:s,size:d="2",variant:l="primary",columns:c="repeat(auto-fit, minmax(160px, 1fr))",gap:u="1"}){return jsxRuntime.jsx(reactAriaComponents.RadioGroup,{value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:Ie(i,"grid"),style:{gridTemplateColumns:/^\d+$/.test(String(c))?`repeat(${c}, minmax(0, 1fr))`:c,gap:u==="1"?"0.25rem":u==="2"?"0.5rem":u==="3"?"0.75rem":u==="4"?"1rem":typeof u=="number"?`${u}px`:u},children:Ze__namespace.default.Children.map(s,m=>Ze__namespace.default.isValidElement(m)?Ze__namespace.default.cloneElement(m,{size:d,variant:l}):m)})}function oI(e){return "primary"}var HC=Ze.createContext({variant:"primary"});function GC(e){let{variant:t="primary",...r}=e,o=oI();return jsxRuntime.jsx(HC.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...r,className:Ie(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(qe,{children:e.label}),jsxRuntime.jsx("div",{className:`flex ${r.orientation==="horizontal"?"flex-row gap-4":"flex-col gap-2"}`,children:e.children}),e.description&&jsxRuntime.jsx(Pe,{children:e.description}),jsxRuntime.jsx(xe,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function nI({isSelected:e,isInvalid:t,isDisabled:r}){let n=[ot(),"focus-visible:outline-action-primary","w-5 h-5 rounded-full border-2 bg-background-surface transition-all"];return r?n.push("border-border-muted forced-colors:!border-[GrayText]"):t?n.push("border-feedback-error-border group-pressed:border-feedback-error-border dark:group-pressed:border-feedback-error-border forced-colors:!border-[Mark]"):e?n.push("border-[7px] border-action-primary forced-colors:!border-[Highlight] group-pressed:border-action-primary-hover dark:group-pressed:border-action-primary-hover"):n.push("border-border-default group-pressed:border-border-focus dark:group-pressed:border-border-focus"),n.join(" ")}function WC(e){return Ze.useContext(HC),jsxRuntime.jsx(reactAriaComponents.Radio,{...e,className:Ie(e.className,"relative group flex items-center gap-2 text-sm text-text-primary transition disabled:text-text-secondary dark:text-text-primary dark:disabled:text-text-secondary forced-colors:disabled:text-[GrayText]"),children:t=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:nI(t)}),e.children]})})}var fI={sm:{toolbar:"p-1.5",contentWrapper:"min-h-[100px]",contentPadding:"p-3",placeholderPos:"left-3 top-3",prose:"prose-xs",h1:"[&_.ProseMirror_h1]:mb-2 [&_.ProseMirror_h1]:text-base [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-1.5 [&_.ProseMirror_h2]:text-sm [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-1",list:"[&_.ProseMirror_ul]:mb-1 [&_.ProseMirror_ul]:ml-4 [&_.ProseMirror_ol]:mb-1 [&_.ProseMirror_ol]:ml-4",li:"[&_.ProseMirror_li]:mb-0.5",placeholderText:"text-xs"},md:{toolbar:"p-2",contentWrapper:"min-h-[200px]",contentPadding:"p-4",placeholderPos:"left-4 top-4",prose:"prose-sm",h1:"[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-2",list:"[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1",placeholderText:"text-sm"},lg:{toolbar:"p-2.5",contentWrapper:"min-h-[250px]",contentPadding:"p-5",placeholderPos:"left-5 top-5",prose:"prose-base",h1:"[&_.ProseMirror_h1]:mb-5 [&_.ProseMirror_h1]:text-3xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-4 [&_.ProseMirror_h2]:text-2xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1.5",placeholderText:"text-base"},xl:{toolbar:"p-3",contentWrapper:"min-h-[300px]",contentPadding:"p-6",placeholderPos:"left-6 top-6",prose:"prose-lg",h1:"[&_.ProseMirror_h1]:mb-6 [&_.ProseMirror_h1]:text-4xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-5 [&_.ProseMirror_h2]:text-3xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-8 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-8",li:"[&_.ProseMirror_li]:mb-2",placeholderText:"text-lg"}},Mi=({isActive:e=false,onPress:t,children:r})=>jsxRuntime.jsx(re,{variant:e?"secondary":"ghost",size:"sm",onPress:t,className:"p-1",children:r});function gI({initialUrl:e,isOpen:t,onClose:r,onSubmit:o}){let[n,a]=Ze.useState(e);return Ze__namespace.default.useEffect(()=>{a(e);},[e]),jsxRuntime.jsx(Dr,{isDismissable:true,isOpen:t,onOpenChange:s=>!s&&r(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),o(n),r();},children:[jsxRuntime.jsx(lr,{title:"Insert Link",onClose:r}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx($r,{label:"URL",type:"url",value:n,onChange:a,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(re,{variant:"secondary",onPress:r,children:"Cancel"}),jsxRuntime.jsx(re,{type:"submit",children:"Save"})]})]})})})})}function YC({initialContent:e="",onChange:t,className:r,isDisabled:o=false,placeholder:n="Start typing...",id:a,size:i="md",headingLevels:s=[1,2]}){let d=fI[i],[l,c]=Ze.useState(false),u=react.useEditor({immediatelyRender:false,extensions:[dI__default.default.configure({heading:s.length>0?{levels:s}:false}),iI__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!o,onUpdate:({editor:g})=>{t?.(g.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge(`prose ${d.prose} max-w-none`,"focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),m=()=>{c(true);},p=g=>{g===""?u?.chain().focus().unsetLink().run():u?.chain().focus().setLink({href:g}).run();};return u?jsxRuntime.jsxs("div",{id:a,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",o&&"opacity-50",r),style:{outline:"none"},children:[!o&&u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:u,shouldShow:({editor:g})=>g.isActive("link")&&!l,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let g=u.getAttributes("link").href;g&&window.open(g,"_blank","noopener,noreferrer");},children:[jsxRuntime.jsx(H,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:m,children:[jsxRuntime.jsx(H,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>u.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(H,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(gI,{isOpen:l,onClose:()=>c(false),onSubmit:p,initialUrl:u.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1 border-b border-border-input",d.toolbar),children:[s.map(g=>jsxRuntime.jsx(Mi,{isActive:u.isActive("heading",{level:g}),onPress:()=>u.chain().focus().toggleHeading({level:g}).run(),children:jsxRuntime.jsxs("span",{className:"text-xs font-bold",children:["H",g]})},g)),jsxRuntime.jsx(Mi,{isActive:u.isActive("bold"),onPress:()=>u.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(Mi,{isActive:u.isActive("italic"),onPress:()=>u.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(Mi,{isActive:u.isActive("bulletList"),onPress:()=>u.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(H,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(Mi,{isActive:u.isActive("orderedList"),onPress:()=>u.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(H,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(Mi,{isActive:u.isActive("link"),onPress:m,children:jsxRuntime.jsx(H,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full outline-none focus:outline-none",d.contentWrapper),children:[jsxRuntime.jsx(react.EditorContent,{editor:u,className:tailwindMerge.twMerge("w-full outline-none focus:outline-none",d.contentPadding,"[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none",d.h1,d.h2,d.p,"[&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:list-decimal",d.list,d.li,"[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",o&&"pointer-events-none")}),u.isEmpty&&!o&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none absolute text-text-secondary",d.placeholderPos,d.placeholderText),children:n})]})]}):null}function JC({streetAddress:e,city:t,state:r,postalCode:o,longitude:n,latitude:a,href:i,LinkComponent:s,variant:d="outlined",layout:l="stacked",showMap:c=true,mapHeight:u=200,mapboxAccessToken:m,isLoading:p=false,className:g,contentClassName:f,showMapExpandToggle:x=false,expandedMapTitle:b="Explore map",expandedMapAddressLabel:y,piiEntity:v}){let C=[];t&&C.push(t),r&&o?C.push(`${r} ${o}`):r?C.push(r):o&&C.push(o);let w=C.join(", "),S=y||[e,w].filter(Boolean).join(", "),T=c&&n!==void 0&&a!==void 0,P=({children:M,className:D})=>i?s?jsxRuntime.jsx(s,{href:i,className:D,children:M}):jsxRuntime.jsx(pt,{href:i,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",D),asButton:false,children:M}):jsxRuntime.jsx("span",{className:D,children:M});if(p){let M=l==="row";return jsxRuntime.jsxs(_e,{variant:d,className:tailwindMerge.twMerge(M?"flex flex-col md:flex-row":"flex flex-col",g),children:[T&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(M&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(q,{width:"100%",height:u})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-2 px-4 md:px-6",M&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]})]})}let k=l==="row";return jsxRuntime.jsxs(_e,{variant:d,className:tailwindMerge.twMerge("group/card relative",i&&"cursor-pointer",k?"flex flex-col md:flex-row":"flex flex-col",g),children:[i&&jsxRuntime.jsx(P,{className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e})}),T&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(k&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(Ti,{height:u,initialViewState:{longitude:n,latitude:a,zoom:14},showMarker:true,mapboxAccessToken:m,showExpandToggle:x,expandedMapTitle:b,expandedMapAddressLabel:S})}),jsxRuntime.jsx(_e.Content,{className:tailwindMerge.twMerge("px-4 md:px-6",k&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",f),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":v?"address":void 0,"data-pii-entity":v,children:e}),w&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":v?"city-state-zip":void 0,"data-pii-entity":v,children:w})]})})]})}function qC({site:e,contact:t,LinkComponent:r,variant:o="outlined",layout:n="stacked",showMap:a=true,mapHeight:i=200,mapboxAccessToken:s,showEmail:d=true,showPhone:l=false,isLoading:c=false,className:u,contentClassName:m,fullHeight:p=false,showMapExpandToggle:g=false,expandedMapTitle:f="Explore map",expandedMapAddressLabel:x}){let b=[];e.city&&b.push(e.city),e.state&&e.postalCode?b.push(`${e.state} ${e.postalCode}`):e.state?b.push(e.state):e.postalCode&&b.push(e.postalCode);let y=b.join(", "),v=x||[e.streetAddress,y].filter(Boolean).join(", "),C=a&&e.longitude!==void 0&&e.latitude!==void 0,w=t?`${t.firstName} ${t.lastName}`.trim():"",S=({children:P,href:k,className:M})=>k?r?jsxRuntime.jsx(r,{href:k,className:M,children:P}):jsxRuntime.jsx(pt,{href:k,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",M),asButton:false,children:P}):jsxRuntime.jsx("span",{className:M,children:P});if(c){let P=n==="row";return jsxRuntime.jsxs(_e,{variant:o,className:tailwindMerge.twMerge(p&&"h-full",P?"flex flex-col md:flex-row":"flex flex-col",u),children:[C&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(P&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(q,{width:"100%",height:p?"100%":i})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",P&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(q,{width:"100%",height:16}),jsxRuntime.jsx(q,{width:"80%",height:16})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(q,{width:40,height:40,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx(q,{width:"50%",height:14}),jsxRuntime.jsx(q,{width:"100%",height:12})]})]})]})]})]})}let T=n==="row";return jsxRuntime.jsxs(_e,{variant:o,className:tailwindMerge.twMerge("group/card relative",e.href&&"cursor-pointer",p&&"h-full",T?"flex flex-col md:flex-row":"flex flex-col",u),children:[e.href&&jsxRuntime.jsx(S,{href:e.href,className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e.streetAddress})}),C&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(T&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(Ti,{height:p?"100%":i,initialViewState:{longitude:e.longitude,latitude:e.latitude,zoom:14},showMarker:true,mapboxAccessToken:s,showExpandToggle:g,expandedMapTitle:f,expandedMapAddressLabel:v})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",T&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":e.piiEntity?"address":void 0,"data-pii-entity":e.piiEntity,children:e.streetAddress}),y&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":e.piiEntity?"city-state-zip":void 0,"data-pii-entity":e.piiEntity,children:y})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 relative",children:[jsxRuntime.jsx(Yo,{firstName:t.firstName,lastName:t.lastName,src:t.avatarUrl,size:"md",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:t.piiEntity}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[t.href?jsxRuntime.jsx(S,{href:t.href,className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5 hover:text-text-brand transition-colors relative z-20",children:jsxRuntime.jsx("span",{"data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w})}):jsxRuntime.jsx("span",{className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5","data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[d&&t.email&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Envelope",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`mailto:${t.email}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"email":void 0,"data-pii-entity":t.piiEntity,children:t.email})]}),l&&t.phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Phone",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`tel:${t.phone}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"phone":void 0,"data-pii-entity":t.piiEntity,children:Wa(t.phone)})]})]})]})]})]})]})]})}function jC({label:e,description:t,tooltip:r,errorMessage:o,size:n="md",className:a,value:i,defaultValue:s=0,onChange:d,min:l=0,max:c=100,step:u=1,disabled:m,showValue:p=true}){let g=typeof i=="number",[f,x]=Ze__namespace.default.useState(s),b=g?i:f,y=Math.min(Math.max(b,l),c),v=Math.max(c-l,1e-5),C=(y-l)/v*100;return jsxRuntime.jsxs("div",{className:Ie(a,"group flex w-full flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:n,tooltip:r,className:"mb-1",children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsxs("div",{className:"relative w-full select-none",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full rounded-full bg-background-muted"}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-action-brand",style:{width:`${C}%`},"aria-hidden":true}),jsxRuntime.jsx("input",{type:"range",min:l,max:c,step:u,value:b,disabled:m,"aria-invalid":!!o,onChange:w=>{let S=Number(w.currentTarget.value);g||x(S),d?.(S);},className:tailwindMerge.twMerge("absolute inset-0 w-full cursor-pointer appearance-none bg-transparent outline-none","[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-background-input [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-border-input","hover:[&::-webkit-slider-thumb]:shadow-sm focus-visible:[&::-webkit-slider-thumb]:outline-2 focus-visible:[&::-webkit-slider-thumb]:outline-action-default","[&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-background-input [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-border-input","hover:[&::-moz-range-thumb]:shadow-sm focus-visible:[&::-moz-range-thumb]:outline-2 focus-visible:[&::-moz-range-thumb]:outline-action-default",m?"cursor-not-allowed opacity-60":void 0)})]}),p&&jsxRuntime.jsx("div",{className:"min-w-10 text-right text-sm text-text-primary tabular-nums",children:Math.round(y)})]}),t&&jsxRuntime.jsx(Pe,{className:"mt-2 text-text-secondary",children:t}),o&&jsxRuntime.jsx(xe,{className:"mt-1",children:o})]})}var CI=Ze__namespace.default.createContext({orientation:"horizontal",isResizing:false});function ZC(e,t){return e===void 0?t:e}function SI(e,t){return typeof e=="number"?e:typeof e=="string"&&e.endsWith("%")?Number.parseFloat(e)/100*t:Number.parseFloat(e.toString())}function Dd({asideWidth:e,asideHeight:t,minAsideWidth:r=240,minAsideHeight:o=200,minMainWidth:n=400,minMainHeight:a=300,orientation:i="horizontal",resizable:s=false,onAsideResize:d,onResizeStart:l,onResizeEnd:c,className:u,dividerClassName:m,children:p}){let g=Ze.useRef(null),[f,x]=Ze.useState(false),b=i==="horizontal"?400:300,y=ZC(i==="horizontal"?e:t,b),[v,C]=Ze.useState(null),w=Ze.useCallback(R=>{if(!g.current||!f)return;let I=g.current.getBoundingClientRect(),E=i==="horizontal"?I.width:I.height,O=i==="horizontal"?R.clientX:R.clientY,z=(i==="horizontal"?I.right:I.bottom)-O,F=E-z,Y=i==="horizontal"?r:o,U=i==="horizontal"?n:a;z<Y||F<U||(C(z),d?.(z));},[f,i,r,o,n,a,d]),S=Ze.useCallback(()=>{x(false),c?.();},[c]),T=Ze.useCallback(R=>{R.preventDefault(),R.stopPropagation(),x(true),l?.();},[l]);Ze.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),document.body.style.cursor=i==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="";}},[f,w,S,i]);let P=Ze__namespace.default.Children.toArray(p).find(R=>Ze__namespace.default.isValidElement(R)&&R.type===$C),k=Ze__namespace.default.Children.toArray(p).find(R=>Ze__namespace.default.isValidElement(R)&&R.type===e0),M=v??y,D=typeof M=="number"?`${M}px`:M;return jsxRuntime.jsx(CI.Provider,{value:{orientation:i,isResizing:f},children:jsxRuntime.jsxs("div",{ref:g,className:tailwindMerge.twMerge("flex w-full h-full",i==="horizontal"?"flex-row":"flex-col",u),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-1",i==="horizontal"?"h-full":"w-full"),children:P}),s&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative group flex-shrink-0",i==="horizontal"?"w-2 -mx-1 cursor-col-resize":"h-2 -my-1 cursor-row-resize",m),onMouseDown:T,role:"separator","aria-orientation":i,"aria-label":"Resize divider",tabIndex:0,onKeyDown:R=>{if(!g.current)return;let I=g.current.getBoundingClientRect(),E=i==="horizontal"?I.width:I.height,O=v??SI(y,E),W=20,z=i==="horizontal"?r:o,F=i==="horizontal"?n:a;if(i==="horizontal"){if(R.key==="ArrowLeft"){let Y=Math.min(O+W,E-F);C(Y),d?.(Y);}else if(R.key==="ArrowRight"){let Y=Math.max(O-W,z);C(Y),d?.(Y);}}else if(R.key==="ArrowUp"){let Y=Math.min(O+W,E-F);C(Y),d?.(Y);}else if(R.key==="ArrowDown"){let Y=Math.max(O-W,z);C(Y),d?.(Y);}},children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute bg-border-default transition-all",i==="horizontal"?"left-1/2 -translate-x-1/2 w-px h-full group-hover:w-1":"top-1/2 -translate-y-1/2 h-px w-full group-hover:h-1","group-hover:bg-action-brand/50",f&&"bg-action-brand",f&&(i==="horizontal"?"w-1":"h-1"))}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute",i==="horizontal"?"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1 h-8":"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-1","bg-border-muted rounded-full opacity-0 group-hover:opacity-100 transition-opacity")})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-shrink-0",i==="horizontal"?"h-full":"w-full"),style:{[i==="horizontal"?"width":"height"]:D},children:k})]})})}function $C({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}function e0({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}Dd.Main=$C;Dd.Aside=e0;var NI=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(t,r,e.className)};function t0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:l=false,className:c,validationResult:u,reserveErrorSpace:m=true,...p}){let{isFocused:g,handleFocus:f,handleBlur:x}=vr();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("textarea",{...p,required:a,onFocus:b=>{p.onFocus&&p.onFocus(b),f(b);},onBlur:b=>{p.onBlur&&p.onBlur(b),x(b);},className:NI({isInvalid:s,isDisabled:d,isResizable:l,isFocused:g,size:o,transparent:i,className:c}),disabled:d})}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,children:r(u)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}function a0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:l=false,className:c,validationResult:u,value:m="",onChange:p,chips:g=[],onChipsChange:f,triggerPattern:x="{{",onTriggerDetected:b,onTriggerDismissed:y,renderChip:v,chipVariant:C="primary",chipSize:w,...S}){let T=Ze.useRef(null),{isFocused:P,handleFocus:k,handleBlur:M}=vr(),D=w||"sm",R=Ze.useRef(null),I=Ze.useCallback(U=>{let V="",J=G=>{if(G.nodeType===Node.TEXT_NODE){if(!G.parentElement?.closest("[data-chip-id]")){let N=G.textContent||"";V+=N;}}else if(G.nodeType===Node.ELEMENT_NODE){let B=G;if(B.hasAttribute("data-chip-id")){let N=B.getAttribute("data-chip-id");V+=`{{${N}}}`;return}else if(B.tagName==="BR"){V+=`
47
- `;return}else B.tagName;}for(let B=0;B<G.childNodes.length;B++)J(G.childNodes[B]);};return J(U),V},[]),E=Ze.useCallback((U,V)=>{let J=document.createTreeWalker(U,NodeFilter.SHOW_TEXT,{acceptNode:L=>{let A=L.parentElement;return A&&A.closest("[data-chip-id]")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),G=J.nextNode(),B=Math.max(0,V);for(;G;){let L=G.nodeValue||"";if(L.length>=B){let A=document.createRange();A.setStart(G,B),A.collapse(true);let j=window.getSelection();j?.removeAllRanges(),j?.addRange(A);return}B-=L.length,G=J.nextNode();}let N=window.getSelection(),h=document.createRange();h.selectNodeContents(U),h.collapse(false),N?.removeAllRanges(),N?.addRange(h);},[]);Ze.useEffect(()=>{T.current&&!m&&T.current.textContent!==""&&(T.current.textContent="");},[m]),Ze.useLayoutEffect(()=>{if(T.current){if(m===""){if(P)try{T.current.focus({preventScroll:!0}),E(T.current,0);}catch{}return}if(R.current!=null)try{E(T.current,R.current);}finally{R.current=null;}}},[m,E,P]);let O=Ze.useCallback((U,V)=>{if(p?.(U),U===""){y?.();return}if(x&&b&&V!==void 0){let J=U.slice(0,V),G=typeof x=="string"?new RegExp(`\\${x}([^\\s]*)$`):x,B=J.match(G);if(B){let N=B[1]||"",h=V-B[0].length;b({query:N,position:V,startIndex:h});}else y?.();}},[p,x,b,y]),W=Ze.useCallback(U=>{if(!f||!p)return;let V=g.filter(G=>G.id!==U);f(V);let J=m.replace(new RegExp(`\\{\\{${U}\\}\\}`,"g"),"");p(J);},[g,f,m,p]),z=Ze.useCallback(U=>v?v(U,()=>W(U.id)):jsxRuntime.jsx(jr,{variant:C,size:D,onRemove:d?void 0:()=>W(U.id),isDisabled:d,className:"py-0.5 px-1.5 gap-1 text-xs leading-none rounded-md",children:U.label},U.id),[v,C,D,W,d]),F=()=>{let U=Yt({isInvalid:s,isDisabled:d,isFocused:P,transparent:i,size:o}),V=`min-h-[100px] py-2 px-3 ${d?"resize-none":l?"resize-y":"resize-none"}`,J=tailwindMerge.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 tailwindMerge.twMerge(U,V,J,c)},Y=()=>m?m.split(/(\{\{[^}]+\}\})/g).map((V,J)=>{let G=V.match(/\{\{([^}]+)\}\}/);if(G){let B=G[1],N=g.find(h=>h.id===B);if(N)return jsxRuntime.jsx("span",{className:"inline-block align-baseline cursor-pointer",contentEditable:false,suppressContentEditableWarning:true,"data-chip-id":B,style:{userSelect:"none",verticalAlign:"baseline",lineHeight:"1"},onClick:h=>{h.preventDefault();let L=window.getSelection(),A=document.createRange();A.selectNode(h.currentTarget),L?.removeAllRanges(),L?.addRange(A);},children:z(N)},`chip-${B}-${J}`)}return V.includes(`
133
+ `,backgroundSize:"30px 30px"}})})})}var CC="color-mix(in srgb, var(--color-map-neutral-border) 8%, transparent)",LD={backgroundImage:`linear-gradient(to right, ${CC} 1px, transparent 1px), linear-gradient(to bottom, ${CC} 1px, transparent 1px)`,backgroundSize:"24px 24px"},DD={backgroundColor:"color-mix(in srgb, var(--color-map-marker-default) 12%, transparent)"};function md({style:e,className:t,message:r="Map requires Mapbox token",schematic:o=false,showMarker:n=true}){return o?jsxRuntime.jsxs("div",{style:e,"data-testid":"map-schematic",className:tailwindMerge.twMerge("relative overflow-hidden border border-map-neutral-border bg-background-muted",t),children:[jsxRuntime.jsx("div",{"aria-hidden":"true",className:"absolute inset-0",style:LD}),n?jsxRuntime.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[jsxRuntime.jsx("span",{"aria-hidden":"true",className:"absolute h-24 w-24 rounded-full",style:DD}),jsxRuntime.jsx(H,{name:"MapPin",size:36,weight:"fill",className:"relative text-map-marker-default"})]}):null]}):jsxRuntime.jsx("div",{style:e,className:tailwindMerge.twMerge("flex items-center justify-center bg-background-muted text-text-secondary",t),children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx(H,{name:"MapPin",size:48,className:"mx-auto mb-2 opacity-50"}),jsxRuntime.jsx("p",{className:"text-sm",children:r})]})})}var SC=Ze.createContext(null);function wC({mapStyleUrl:e,children:t}){return jsxRuntime.jsx(SC.Provider,{value:e??null,children:t})}function Si(){return Ze.useContext(SC)}var NC={streets:"streets",satellite:"satellite",neutral:"neutral"},fd="streets";function gd(e,t,r){if(r)return r;switch(e){case "streets":return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12";case "satellite":return "mapbox://styles/mapbox/satellite-streets-v12";case "neutral":return t?"mapbox://styles/mapbox/dark-v11":"mapbox://styles/mapbox/light-v11";default:return t?"mapbox://styles/victor-texture/clzwxtrng005s01p93rtr04op":"mapbox://styles/mapbox/streets-v12"}}function TC({longitude:e,latitude:t,showPulse:r=true,accuracy:o}){return jsxRuntime.jsx(HD.Marker,{longitude:e,latitude:t,anchor:"center",children:jsxRuntime.jsxs("div",{className:"relative flex items-center justify-center",children:[r&&jsxRuntime.jsx("div",{className:"absolute h-12 w-12 animate-[ping_2s_ease-in-out_infinite] rounded-full bg-action-brand opacity-30",style:{animationDelay:"0s"}}),jsxRuntime.jsx("div",{className:"relative z-10 flex h-5 w-5 items-center justify-center rounded-full bg-background-surface shadow-lg",children:jsxRuntime.jsx("div",{className:"h-3 w-3 rounded-full bg-action-brand"})}),o&&o>0&&jsxRuntime.jsx("div",{className:"pointer-events-none absolute rounded-full border border-action-brand/20 bg-action-brand/10",style:{width:`${Math.min(o/2,100)}px`,height:`${Math.min(o/2,100)}px`}})]})})}var YD={name:"mercator"},JD=[],As=Ze__namespace.default.forwardRef(({initialViewState:e,mapStyleUrl:t,viewState:r,onViewStateChange:o,scrollEnabled:n=true,className:a,previewMode:i=false,previewModeCta:s,onPreviewModePress:d,mapType:c=fd,layers:l=[],mapboxAccessToken:u,transformRequest:m,isLoading:p=false,onLoad:g,controls:f="default",showUserLocation:x=true,onUserLocationChange:h,children:y,additionalInteractiveLayerIds:v=JD,onMapClick:C,showMarker:w=false,markerLocation:S},N)=>{let k=u??$c();if(!k)return jsxRuntime.jsx("div",{className:`relative ${a||""}`,style:{width:"100%",height:"100%"},children:jsxRuntime.jsx(md,{className:"w-full h-full",message:"Map unavailable"})});let{isDarkTheme:T}=er(),E=Si(),A=t??E,P=Ze.useRef(null),I=Ze.useRef(null),[R,O]=Ze.useState(false),[W,z]=Ze.useState(false);Ze.useEffect(()=>{ud();},[]);let[F,Y]=Ze.useState(false),U=Ze.useRef(0),[V,J]=Ze.useState(null),[G,B]=Ze.useState(null),L=Ze.useRef(null),b=Ze.useRef(null),[M,D]=ed("interactiveMap.trackingLocation",false),[q,ae]=Ze.useState(false);Ze.useEffect(()=>{if(!navigator.geolocation){ae(true);return}if(M){if(!navigator.permissions?.query){ae(true);return}navigator.permissions.query({name:"geolocation"}).then(X=>{X.state!=="granted"&&D(false),ae(true);}).catch(()=>{ae(true);});}else ae(true);},[]),Ze.useEffect(()=>{let X=setTimeout(()=>{R||z(true);},200);return ()=>clearTimeout(X)},[R]),Ze.useEffect(()=>{b.current=null;},[c,T]),Ze.useEffect(()=>{if(R)return;let X=setInterval(()=>{if(P.current?.loaded()){O(true),z(false);let K=P.current.getMap?.();K&&b.current!==K&&(b.current=K,g?.()),clearInterval(X);}},200);return ()=>clearInterval(X)},[R,g]),Ze.useEffect(()=>{if(q){if(!M||i){L.current!==null&&(navigator.geolocation.clearWatch(L.current),L.current=null);return}if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}return L.current=navigator.geolocation.watchPosition(X=>{let K={latitude:X.coords.latitude,longitude:X.coords.longitude,accuracy:X.coords.accuracy};B(K),h?.(K);},X=>{console.warn("Geolocation error:",X.message),B(null),h?.(null);},{enableHighAccuracy:true,maximumAge:3e4,timeout:3e4}),()=>{L.current!==null&&(navigator.geolocation.clearWatch(L.current),L.current=null);}}},[M,i,h,q]);let _=Ze.useCallback(()=>{O(true),z(false);let X=P.current?.getMap?.();X&&b.current!==X&&(b.current=X,g?.());},[g]),ee=Ze.useCallback(()=>{P.current&&e&&(Y(false),U.current=0,P.current.flyTo({center:[e.longitude||0,e.latitude||0],zoom:e.zoom||0,bearing:e.bearing||0,pitch:e.pitch||0,duration:1e3}));},[e]),ie=Ze.useMemo(()=>f===false||f===null?[]:f==="default"||f===void 0?Lm:f,[f]),Me=Ze.useCallback(()=>{if(!navigator.geolocation){console.warn("Geolocation is not supported by this browser.");return}D(true),navigator.geolocation.getCurrentPosition(X=>{let{latitude:K,longitude:de}=X.coords;P.current&&P.current.jumpTo({center:[de,K],zoom:15});},X=>{console.warn("Geolocation error:",X.message),X.code===X.PERMISSION_DENIED&&D(false);},{enableHighAccuracy:true,timeout:1e4,maximumAge:0});},[]),le=Ze.useMemo(()=>{if(i)return null;let X=ie.map(K=>K.type==="navigation"?{...K,onResetZoom:K.onResetZoom||ee,onGeolocateClick:K.onGeolocateClick||Me}:K);return Vm(X,{mapRef:P,layers:l,showResetButton:F})},[ie,P,i,l,ee,F,Me]),ge=Ze.useMemo(()=>{let X=[];return l.filter(K=>K.events?.onClick||K.events?.onMouseEnter||K.events?.onMouseLeave||K.tooltip||K.kind==="vector"&&K.revealChipOnHover).forEach(K=>{K.kind==="clusteredVector"?(X.push(`${K.id}-clusters`),X.push(`${K.id}-points`),X.push(`${K.id}-selected-point`)):X.push(K.id);}),[...X,...v]},[l,v]),ce=Ze.useMemo(()=>{let X=new Map;return l.forEach(K=>{K.events&&(X.set(K.id,K.events),K.kind==="clusteredVector"&&(X.set(`${K.id}-clusters`,K.events),X.set(`${K.id}-points`,K.events),X.set(`${K.id}-selected-point`,K.events)));}),X},[l]),pe=Ze.useMemo(()=>{let X=new Map;return l.forEach(K=>{K.tooltip&&(X.set(K.id,K.tooltip),K.kind==="clusteredVector"&&(X.set(`${K.id}-clusters`,K.tooltip),X.set(`${K.id}-points`,K.tooltip),X.set(`${K.id}-selected-point`,K.tooltip)));}),X},[l]),Te=Ze.useMemo(()=>{let X=new Map;return l.forEach(K=>{K.kind==="clusteredVector"&&(X.set(K.id,K),X.set(`${K.id}-clusters`,K),X.set(`${K.id}-points`,K),X.set(`${K.id}-selected-point`,K));}),X},[l]),et=Ze.useMemo(()=>{if(!w)return null;let X=S?.longitude??r?.longitude??e?.longitude,K=S?.latitude??r?.latitude??e?.latitude;return X===void 0||K===void 0?null:{longitude:X,latitude:K}},[w,S,r,e]),Be=Ze.useCallback(X=>{if(i)return;let K=X.features?.[0];if(!K||!K.layer)return;let de=K.layer.id,ne=ce.get(de),ke=pe.get(de),ve;K.geometry.type==="Point"?ve=K.geometry.coordinates:ve=[X.lngLat.lng,X.lngLat.lat];let $={id:K.id??K.properties?.id,lngLat:ve,properties:K.properties||{},layerId:de},ue=Te.get(de),Z=K.properties?.cluster===true;if(ue&&Z){let be=P.current;if(be){let sr=be.getZoom(),ln=Math.min(sr+3,18);be.flyTo({center:ve,zoom:ln,duration:1e3});}return}if(ne?.onClick&&ne.onClick($),ke&&ke.trigger==="click"){let be;ue&&"cluster"in ke?ke.point&&(be=ke.point($)):"content"in ke&&(be=typeof ke.content=="function"?ke.content($):ke.content),be&&J({feature:$,content:be,bare:ke.bare});}C&&C(X);},[ce,pe,i,C,Te,P,ge]),$t=Ze.useMemo(()=>new Set(l.filter(X=>X.kind==="vector"&&X.revealChipOnHover).map(X=>X.id)),[l]),yt=Ze.useRef(null),ir=Ze.useCallback(()=>{let X=yt.current;if(!(!X||!P.current)){yt.current=null;try{P.current.removeFeatureState({source:X.source,sourceLayer:X.sourceLayer,id:X.id},"hover");}catch{}}},[P]);Ze.useEffect(()=>{yt.current=null;},[c,T,A]);let Rt=Ze.useCallback(X=>{let K=X.features?.find(ne=>ne.layer&&$t.has(ne.layer.id));if(!K||K.id==null){ir();return}let de=yt.current;de&&de.source===K.source&&de.id===K.id||(ir(),P.current&&(yt.current={source:K.source,sourceLayer:K.sourceLayer,id:K.id},P.current.setFeatureState({source:K.source,sourceLayer:K.sourceLayer,id:K.id},{hover:true})));},[$t,ir,P]),tt=Ze.useCallback(X=>{let K=X.features?.[0];if(!K||!K.layer)return null;let de=K.layer.id,ne=pe.get(de);if(!ne||ne.trigger!=="hover"&&ne.trigger!==void 0)return null;let ke;K.geometry.type==="Point"?ke=K.geometry.coordinates:ke=[X.lngLat.lng,X.lngLat.lat];let ve={id:K.id??K.properties?.id,lngLat:ke,properties:K.properties||{},layerId:de},$;if(Te.get(de)&&"cluster"in ne){let Z=K.properties?.cluster===true;if(Z&&ne.cluster){let be=K.properties?.point_count||0;$=ne.cluster(be,ve);}else !Z&&ne.point?$=ne.point(ve):$=Z?`${K.properties?.point_count||0} items`:null;}else "content"in ne&&($=typeof ne.content=="function"?ne.content(ve):ne.content);return $?{feature:ve,content:$,bare:ne.bare}:null},[pe,Te]),Gt=Ze.useCallback(X=>{if(i)return;let K=X.features?.[0];if(!K||!K.layer)return;let de=K.layer.id,ne=ce.get(de);if(ne?.onMouseEnter){let ve;K.geometry.type==="Point"?ve=K.geometry.coordinates:ve=[X.lngLat.lng,X.lngLat.lat];let $={id:K.id??K.properties?.id,lngLat:ve,properties:K.properties||{},layerId:de};ne.onMouseEnter($);}let ke=tt(X);ke&&J(ke),P.current&&(P.current.getCanvas().style.cursor="pointer");},[ce,i,P,tt]),te=Ze.useCallback(X=>{if(i)return;Rt(X);let K=X.features?.[0];if(!K||!K.layer)return;let de=tt(X);if(de){J(ne=>ne&&ne.feature.layerId===de.feature.layerId&&ne.feature.id===de.feature.id?ne:de);return}J(ne=>{if(!ne)return ne;let ke=pe.get(ne.feature.layerId);return ke&&(ke.trigger==="hover"||ke.trigger===void 0)?null:ne});},[i,tt,pe,Rt]),Oe=Ze.useCallback(()=>{if(!i){if(ir(),ce.forEach(X=>{X.onMouseLeave?.();}),V){let X=V.feature.layerId,K=l.find(de=>de.id===X);if(!K){let de=X.replace(/-(?:clusters|points|selected-point|cluster-shadows|points-shadow|cluster-count)$/,"");K=l.find(ne=>ne.id===de);}K?.tooltip&&(K.tooltip.trigger||"hover")==="hover"&&J(null);}P.current&&(P.current.getCanvas().style.cursor="");}},[ce,i,P,V,l,ir]),Ue=Ze.useCallback((X,K)=>{for(let de of l)if(de.tooltip&&!(K&&de.id!==K)){if(de.kind==="geojson"){if(typeof de.data=="string")continue;let ne=de.data,ve=(ne.type==="FeatureCollection"?ne.features:[ne]).find($=>$.id===X);if(ve&&ve.geometry.type==="Point")return {id:ve.id,lngLat:ve.geometry.coordinates,properties:ve.properties||{},layerId:de.id}}else if(de.kind==="customPins"){let ne=de.data.find(ke=>ke.id===X||ke._id===X||ke.key===X);if(ne)return {id:X,lngLat:de.getPosition(ne),properties:ne,layerId:de.id}}}return null},[l]);Ze.useImperativeHandle(N,()=>({showTooltip:(X,K)=>{let de=Ue(X,K);if(!de)return;let ne=l.find(ke=>ke.id===de.layerId);if(ne?.tooltip&&"content"in ne.tooltip){let ke=typeof ne.tooltip.content=="function"?ne.tooltip.content(de):ne.tooltip.content;J({feature:de,content:ke,bare:ne.tooltip.bare});}},hideTooltip:()=>{J(null);},getMap:()=>P.current,markMapAsMoved:()=>{Y(true);}}),[Ue,l]);let Dt=(X,K)=>m?m(X,K):{url:X},oe=p||W,we=Ze.useMemo(()=>Ls(l,c),[l,c]);return jsxRuntime.jsx("div",{ref:I,className:tailwindMerge.twMerge("relative flex h-full w-full overflow-hidden",i&&"cursor-pointer",a),onClick:i?d:void 0,children:jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsxs(HD__default.default,{ref:P,initialViewState:e,...r&&r,style:{width:"100%",height:"100%"},mapStyle:gd(c,T,A),styleDiffing:false,projection:YD,mapboxAccessToken:k,transformRequest:Dt,onLoad:_,onMove:i?void 0:X=>{if(X.originalEvent&&R){let K=X.originalEvent.type,de=Math.abs((X.viewState.latitude??0)-(e?.latitude??0)),ne=Math.abs((X.viewState.longitude??0)-(e?.longitude??0)),ke=Math.abs((X.viewState.zoom??0)-(e?.zoom??0));e&&(de>1e-4||ne>1e-4||ke>.1)&&(K==="mousemove"||K==="touchmove"||K==="pointermove"?Y(true):(K==="wheel"||K==="mousewheel")&&(U.current+=1,U.current>=3&&Y(true)));}o?.(X.viewState);},onClick:i?void 0:Be,onMouseMove:i?void 0:te,onMouseEnter:i?void 0:Gt,onMouseLeave:i?void 0:Oe,interactiveLayerIds:i?[]:ge,scrollZoom:i?false:n,dragPan:!i,dragRotate:!i,doubleClickZoom:!i,interactive:!i,attributionControl:false,children:[jsxRuntime.jsx(HD.AttributionControl,{position:"top-left"}),le,we,y,et&&jsxRuntime.jsx(HD.Marker,{longitude:et.longitude,latitude:et.latitude,anchor:"bottom",children:jsxRuntime.jsx(H,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})}),x&&G&&jsxRuntime.jsx(TC,{longitude:G.longitude,latitude:G.latitude,accuracy:G.accuracy}),V&&jsxRuntime.jsx(HD.Popup,{longitude:V.feature.lngLat[0],latitude:V.feature.lngLat[1],offset:15,closeButton:false,closeOnClick:false,className:V.bare?"map-tooltip map-tooltip-bare":"map-tooltip",maxWidth:"none",children:V.content})]},`map-${c}-${T}-${A??"default"}`),oe&&jsxRuntime.jsx(pd,{}),i&&s&&jsxRuntime.jsx("div",{className:"absolute bottom-8 right-8 z-10",children:s})]})})});As.displayName="InteractiveMap";async function PC(e,t,r,o={}){if(e.hasImage(t))return;let n=o.size??64,a=o.color??"#2c2a26",i=o.weight??"regular",s=server.renderToStaticMarkup(Ze.createElement(r,{size:n,color:a,weight:i})),d=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(s)}`;await new Promise((c,l)=>{let u=new Image(n,n);u.onload=()=>{try{e.hasImage(t)||e.addImage(t,u,{sdf:!1}),c();}catch(m){l(m instanceof Error?m:new Error(`Failed to addImage "${t}": ${String(m)}`));}},u.onerror=m=>{l(m instanceof Error?m:new Error(`Failed to load icon "${t}"`));},u.src=d;});}function Ti({width:e="100%",height:t="100%",initialViewState:r={longitude:-122.4194,latitude:37.7749,zoom:14},isLoading:o=false,mapType:n="streets",mapStyleUrl:a,layers:i=[],mapboxAccessToken:s,showMarker:d=true,markerOffsetY:c=0,showAttribution:l=false,onLoad:u,className:m,showExpandToggle:p=false,expandedMapTitle:g="Explore map",expandedMapAddressLabel:f,schematicPlaceholder:x=false}){let h=s??$c(),{isDarkTheme:y}=er(),[v,C]=Ze.useState(false),[w,S]=Ze.useState(false),N=Si(),k=a??N,[T,E]=Ze.useState(false),A=Ze.useRef(null),P=Ze.useRef(null),I=Ze.useCallback(()=>E(true),[]),R=Ze.useCallback(()=>E(false),[]);Ze.useEffect(()=>{ud();},[]);let O={width:typeof e=="number"?`${e}px`:e,height:typeof t=="number"?`${t}px`:t};Ze.useEffect(()=>{let F=setTimeout(()=>{v||S(true);},200);return ()=>clearTimeout(F)},[v]);let W=Ze.useCallback(()=>{C(true),S(false),u?.();},[u]);Ze.useEffect(()=>{if(!P.current)return;let F=new ResizeObserver(()=>{A.current&&A.current.resize();});return F.observe(P.current),()=>{F.disconnect();}},[]);let z=o||w;return h?jsxRuntime.jsxs("div",{ref:P,style:O,className:`relative ${m||""}`,children:[jsxRuntime.jsxs(HD__default.default,{ref:A,mapboxAccessToken:h,initialViewState:r,style:{width:"100%",height:"100%"},mapStyle:gd(n,y,k),onLoad:W,scrollZoom:false,dragPan:false,dragRotate:false,doubleClickZoom:false,touchZoomRotate:false,interactive:false,attributionControl:false,children:[l&&jsxRuntime.jsx(HD.AttributionControl,{position:"top-left"}),Ls(i,n),d&&r.longitude!==void 0&&r.latitude!==void 0&&jsxRuntime.jsx(HD.Marker,{longitude:r.longitude,latitude:r.latitude,anchor:"bottom",offset:[0,c],children:jsxRuntime.jsx(H,{name:"MapPin",size:36,className:"text-map-marker-default",weight:"fill"})})]}),p&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-20",children:jsxRuntime.jsx(Kr,{icon:"ArrowsOutSimple",ariaLabel:"Expand map to fullscreen",onPress:I})}),p&&jsxRuntime.jsx(yr,{isOpen:T,onClose:R,title:g,contentPadding:false,maxWidth:"min(1100px, 100vw)",minWidth:"min(360px, 100vw)",height:"80vh",mobileHeight:"82vh",children:jsxRuntime.jsxs("div",{className:"flex flex-col h-full",children:[jsxRuntime.jsx("div",{className:"flex-1 min-h-0 overflow-hidden sm:mx-4 sm:mt-4 sm:rounded-xl sm:border sm:border-border-default",children:jsxRuntime.jsx(As,{initialViewState:r,mapType:n,mapStyleUrl:k,mapboxAccessToken:h,showMarker:d,markerLocation:r.longitude!==void 0&&r.latitude!==void 0?{latitude:r.latitude,longitude:r.longitude}:void 0,layers:i})}),f&&jsxRuntime.jsx("p",{className:"text-sm text-text-secondary px-4 py-3 flex-shrink-0",children:f})]})}),z&&jsxRuntime.jsx(pd,{})]}):jsxRuntime.jsx(md,{style:O,className:m,schematic:x,showMarker:d})}var eA={xs:{bar:"h-1 w-14",text:"text-xs",icon:"h-2.5 w-2.5"},sm:{bar:"h-1.5 w-48",text:"text-xs",icon:"h-3 w-3"},md:{bar:"h-2 w-64",text:"text-sm",icon:"h-4 w-4"},lg:{bar:"h-3 w-80",text:"text-base",icon:"h-5 w-5"}};function EC({label:e,size:t="md",variant:r="default",showWarningIndicator:o=true,warningThreshold:n=80,hideValueText:a=false,className:i,...s}){let d=eA[t],c=a&&e&&!s["aria-label"]&&!s["aria-labelledby"]?{"aria-label":e}:{};return jsxRuntime.jsx(reactAriaComponents.Meter,{...s,...c,className:Ie(i,"flex flex-col gap-1"),children:({percentage:l,valueText:u})=>{let m=o&&l>=n,p=r==="default"?tA(l):r;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!a&&jsxRuntime.jsxs("div",{className:"flex justify-between gap-2",children:[e&&jsxRuntime.jsx(qe,{children:e}),jsxRuntime.jsxs("span",{className:tailwindMerge.twMerge(d.text,m?"text-feedback-error-text":"text-text-secondary"),children:[m&&jsxRuntime.jsx(lucideReact.AlertTriangle,{"aria-label":"Warning: High value",className:tailwindMerge.twMerge("inline-block align-text-bottom mr-1",d.icon)}),u]})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("relative rounded-full bg-background-muted","ring-1 ring-inset ring-border-muted",d.bar),children:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute left-0 top-0 h-full rounded-full transition-all duration-300","forced-colors:bg-[Highlight]",rA(p)),style:{width:`${Math.min(100,Math.max(0,l))}%`},role:"presentation","aria-hidden":"true"})})]})}})}function tA(e){return e<50?"success":e<70?"info":e<90?"warning":"error"}function rA(e){switch(e){case "success":return "bg-feedback-success-text";case "warning":return "bg-feedback-warning-text";case "error":return "bg-feedback-error-text";case "info":return "bg-feedback-info-text";case "neutral":return "bg-text-subtle";default:return "bg-action-brand"}}var $m=(e,t)=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase());function ef(e){return [e.value,e.label]}function hd(e,t,r=$m){let o=t.trim();return o===""?[...e]:e.filter(n=>ef(n).some(a=>r(a,o)))}function xd(e){let t=e.query.trim();if(t==="")return false;let r=t.toLocaleLowerCase();return e.options.some(n=>n.value.toLocaleLowerCase()===r||n.label.toLocaleLowerCase()===r)?false:!e.selected.some(n=>n.toLocaleLowerCase()===r)}function yd(e,t){return e.map(r=>{let o=t.find(n=>n.value===r);return o?o.count===void 0?{value:r,label:o.label,isUnknown:false}:{value:r,label:o.label,count:o.count,isUnknown:false}:{value:r,label:r,isUnknown:true}})}var sA=e=>e.kind==="literal"?`literal:${e.value}`:`option:${e.option.value}`,tf=e=>e.kind==="literal"?e.value:e.option.value,MC=e=>e.kind==="literal"?e.value:e.option.label,lA={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6",xl:"h-7 w-7"},cA={sm:"pl-8",md:"pl-10",lg:"pl-11",xl:"pl-13"},dA={sm:"xs",md:"xs",lg:"sm",xl:"sm"};function LC({options:e,value:t,defaultValue:r,onChange:o,label:n,placeholder:a,size:i="md",loading:s=false,disabled:d=false,maxSelected:c,allowLiteral:l=false,onSearchChange:u,truncated:m=false,totalCount:p,emptyMessage:g,showSelectAll:f=false,description:x,errorMessage:h,isRequired:y=false,onBlur:v,inputRef:C,labelHidden:w=false,className:S,id:N}){let k=Ze.useId(),T=N??`multiselect-${k}`,E=`${T}-input`,A=`${T}-listbox`,P=Ze.useRef(null),I=Ze.useCallback(te=>{P.current=te,typeof C=="function"?C(te):C&&(C.current=te);},[C]),{contains:R}=reactAria.useFilter({sensitivity:"base"}),{isFocused:O,handleFocus:W,handleBlur:z}=vr(),[F,Y]=Ze.useState(""),[U,V]=Ze.useState(true),[J,G]=Ze.useState(null),[B,L]=Ze.useState(""),[b,M]=Ze.useState(()=>[...r??[]]),D=Ze.useMemo(()=>t?[...t]:b,[t,b]),q=Ze.useMemo(()=>hd(e,F,R),[e,F,R]),ae=l&&!s&&xd({query:F,options:e,selected:D}),_=Ze.useMemo(()=>{let te=q.map(Oe=>({kind:"option",option:Oe}));return ae?[{kind:"literal",value:F.trim()},...te]:te},[q,ae,F]),ee=Ze.useMemo(()=>yd(D,e),[D,e]),ie=c!==void 0&&D.length>=c,Me=Ze.useCallback((te,Oe)=>{t||M(te),L(`${Oe} ${te.length} selected.`),o(te);},[o,t]),le=Ze.useCallback((te,Oe)=>{if(!d){if(D.includes(te)){Me(D.filter(Ue=>Ue!==te),`${Oe} removed.`);return}ie||Me([...D,te],`${Oe} selected.`);}},[ie,Me,d,D]),ge=Ze.useCallback(te=>{te.kind==="option"&&te.option.disabled||le(tf(te),MC(te));},[le]),ce=te=>{if(d||te.length===0)return;let Oe=new Set(te),Ue=te.map(Dt=>ee.find(oe=>oe.value===Dt)?.label??Dt);Me(D.filter(Dt=>!Oe.has(Dt)),`${Ue.join(", ")} removed.`);},pe=te=>{Y(te),G(null),V(true),u?.(te);},Te=te=>{if(_.length===0){G(null);return}G(Oe=>Oe===null?te>0?0:_.length-1:(Oe+te+_.length)%_.length);},et=te=>{if(d)return;let Oe=J===null?void 0:_[J];switch(te.key){case "ArrowDown":te.preventDefault(),V(true),Te(1);break;case "ArrowUp":te.preventDefault(),V(true),Te(-1);break;case "Home":_.length>0&&(te.preventDefault(),V(true),G(0));break;case "End":_.length>0&&(te.preventDefault(),V(true),G(_.length-1));break;case "Enter":Oe&&(te.preventDefault(),ge(Oe));break;case " ":F===""&&Oe&&(te.preventDefault(),ge(Oe));break;case "Escape":te.preventDefault(),F!==""?pe(""):(V(false),G(null));break;case "Backspace":F===""&&D.length>0&&(te.preventDefault(),ce([D[D.length-1]]));break;}},Be=q.filter(te=>!te.disabled&&!D.includes(te.value)).map(te=>te.value),$t=c===void 0?Be.length:Math.max(0,c-D.length),yt=Math.min(Be.length,$t),ir=yt===Be.length?`Select all ${Be.length} matching`:`Select ${yt} of ${Be.length} matching`,Rt=()=>{if(d||yt===0)return;let te=Be.slice(0,yt);Me([...D,...te],`${te.length} matching options selected.`);},tt=s?"loading":e.length===0?"empty":q.length===0&&F.trim()!==""?"no-match":null,Gt=Je[i].text;return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex w-full flex-col gap-1",S),"data-testid":"multiselect",children:[jsxRuntime.jsx(qe,{size:i,htmlFor:E,isRequired:y,...w?{className:"sr-only"}:{},children:n}),jsxRuntime.jsxs(Nt,{children:[jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-3 top-1/2 z-10 flex -translate-y-1/2 items-center",children:s?jsxRuntime.jsx(Jr,{size:16,color:"text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:tailwindMerge.twMerge(lA[i],"text-text-secondary")})}),jsxRuntime.jsx("input",{ref:I,id:E,type:"text",role:"combobox",autoComplete:"off","aria-expanded":U,"aria-controls":A,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":U&&J!==null&&_[J]?`${T}-row-${J}`:void 0,"aria-required":y||void 0,"aria-invalid":h?true:void 0,value:F,placeholder:a,disabled:d,onChange:te=>pe(te.target.value),onKeyDown:et,onFocus:te=>{V(true),W(te);},onBlur:te=>{z(te),v?.(te);},className:Yt({isDisabled:d,isFocused:O,isInvalid:!!h,size:i,className:tailwindMerge.twMerge(cA[i],"pr-3")})})]}),ee.length>0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-selection-region",role:"group","aria-label":`Selected ${n}`,className:"flex flex-wrap gap-1.5 rounded-[var(--control-border-radius)] border border-border-default bg-background-muted p-2",children:ee.map(te=>jsxRuntime.jsx(jr,{size:dA[i],variant:"primary",isDisabled:d,removeLabel:`Remove ${te.label}`,onRemove:()=>ce([te.value]),className:"shrink-0",children:te.isUnknown?jsxRuntime.jsx("span",{"data-testid":`multiselect-selection-unknown-${te.value}`,title:"Not in the current option list",children:`${te.label} (custom)`}):te.label},te.value))}),f&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(re,{variant:"link",size:i,onPress:Rt,isDisabled:d||yt===0,children:ir}),jsxRuntime.jsx(re,{variant:"link",size:i,onPress:()=>ce(D),isDisabled:d||D.length===0,children:"Clear all"})]}),jsxRuntime.jsx("div",{id:A,role:"listbox","aria-multiselectable":"true","aria-label":`${n} options`,hidden:!U,className:tailwindMerge.twMerge(Gt,"max-h-[260px] overflow-y-auto rounded-[var(--control-border-radius)] border border-border-input bg-background-input"),children:U&&_.map((te,Oe)=>{let Ue=D.includes(tf(te)),Dt=d||te.kind==="option"&&te.option.disabled===true||!Ue&&ie;return jsxRuntime.jsxs("div",{id:`${T}-row-${Oe}`,role:"option","aria-selected":Ue,"aria-disabled":Dt||void 0,"data-value":tf(te),"data-literal":te.kind==="literal"?"true":void 0,"data-active":J===Oe?"true":void 0,onMouseDown:oe=>oe.preventDefault(),onClick:()=>{Dt||(ge(te),P.current?.focus());},className:tailwindMerge.twMerge("flex cursor-default items-center gap-2 px-3",Je[i].paddingY,"text-text-primary",J===Oe&&"bg-background-hover",Ue&&"bg-background-selected font-medium",Dt&&"text-text-disabled"),children:[jsxRuntime.jsx(sp,{isSelected:Ue,isDisabled:Dt,className:"!w-4 !h-4"}),jsxRuntime.jsx("span",{className:"flex-1 truncate",children:MC(te)}),te.kind==="literal"&&jsxRuntime.jsx("span",{"data-testid":"multiselect-literal-badge",className:"italic text-text-secondary",children:"Use as typed"}),te.kind==="option"&&te.option.count!==void 0&&jsxRuntime.jsx("span",{"data-testid":`multiselect-count-${te.option.value}`,className:"text-text-secondary",children:te.option.count.toLocaleString()})]},sA(te))})}),tt==="loading"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-loading","data-status":"loading",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(Jr,{size:14,color:"text-text-secondary"}),jsxRuntime.jsx("span",{children:"Loading options\u2026"})]})}),tt==="empty"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-empty","data-status":"empty",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2",children:[jsxRuntime.jsx(H,{name:"Tray",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:g??"No options available"})]})}),tt==="no-match"&&jsxRuntime.jsx("div",{"data-testid":"multiselect-status-no-match","data-status":"no-match",children:jsxRuntime.jsxs(Pe,{size:i,className:"flex items-center gap-2 text-feedback-warning-text",children:[jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:`No options match \u201C${F.trim()}\u201D`})]})}),m&&jsxRuntime.jsx("div",{"data-testid":"multiselect-truncation",children:jsxRuntime.jsx(Pe,{size:i,children:p===void 0?"Showing a partial list \u2014 refine your search to see more":`Showing ${e.length} of ${p} \u2014 refine your search to see more`})}),c!==void 0&&jsxRuntime.jsx("div",{"data-testid":"multiselect-limit",children:jsxRuntime.jsx(Pe,{size:i,children:ie?`${D.length} of ${c} selected \u2014 limit reached, remove one to choose another`:`${D.length} of ${c} selected`})}),x&&jsxRuntime.jsx(Pe,{size:i,children:x}),h&&jsxRuntime.jsx(xe,{size:i,children:h}),jsxRuntime.jsx("div",{"data-testid":"multiselect-live-region",role:"status","aria-live":"polite",className:"sr-only",children:B})]})}var Sd="bg-background-surface border-l-[3px] border-y border-r border-border-default text-text-primary",fA={success:{container:Sd,iconName:"CheckCircle",iconColor:"text-feedback-success-text",borderColor:"var(--color-feedback-success-border)"},error:{container:Sd,iconName:"XCircle",iconColor:"text-feedback-error-text",borderColor:"var(--color-feedback-error-border)"},warning:{container:Sd,iconName:"Warning",iconColor:"text-feedback-warning-text",borderColor:"var(--color-feedback-warning-border)"},info:{container:Sd,iconName:"Info",iconColor:"text-feedback-info-text",borderColor:"var(--color-feedback-info-border)"}};function Nd({id:e,message:t,variant:r="info",duration:o=5e3,dismissible:n=true,onDismiss:a,className:i}){let{container:s,iconName:d,iconColor:c,borderColor:l}=fA[r];return Ze.useEffect(()=>{if(o>0){let u=setTimeout(()=>{a?.();},o);return ()=>clearTimeout(u)}},[o,a]),jsxRuntime.jsxs(framerMotion.motion.div,{layout:true,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.2}},className:tailwindMerge.twMerge("pointer-events-auto flex items-center gap-3 rounded-lg p-4 shadow-lg",s,i),style:{borderLeftColor:l},children:[jsxRuntime.jsx(H,{name:d,size:20,className:c}),jsxRuntime.jsx("p",{className:"flex-1 select-text text-sm font-medium",children:t}),n&&jsxRuntime.jsx("button",{type:"button",onClick:a,className:"flex-shrink-0 rounded-md p-1 transition-colors hover:bg-background-hover","aria-label":"Dismiss notification",children:jsxRuntime.jsx(H,{name:"X",size:16})})]})}var CA={"top-left":"top-4 left-4 items-start","top-center":"top-4 left-1/2 -translate-x-1/2 items-start","top-right":"top-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-start","bottom-right":"bottom-4 right-4 items-end"};function Td({notices:e,onDismiss:t,position:r="bottom-center",className:o}){let[n,a]=Ze.useState(false);if(Ze.useEffect(()=>{a(true);},[]),!n)return null;let i=jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none fixed z-50 flex flex-col gap-2",CA[r],o),"aria-live":"polite","aria-atomic":"true",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"sync",children:e.map(s=>jsxRuntime.jsx(Nd,{id:s.id,message:s.message,variant:s.variant,duration:s.duration,dismissible:s.dismissible,onDismiss:()=>t(s.id)},s.id))})});return reactDom.createPortal(i,document.body)}var DC=Ze.createContext(void 0);function AC({children:e,position:t="bottom-center",maxNotices:r=5,defaultDuration:o=5e3,defaultDismissible:n=true}){let[a,i]=Ze.useState([]),s=Ze.useCallback((u,m)=>{let p=`notice-${Date.now()}-${Math.random()}`,g={id:p,message:u,variant:m?.variant||"info",duration:m?.duration??o,dismissible:m?.dismissible??n};return i(f=>{let x=[...f,g];return x.length>r?x.slice(-r):x}),p},[r,o,n]),d=Ze.useCallback(u=>{i(m=>m.filter(p=>p.id!==u));},[]),c=Ze.useCallback(()=>{i([]);},[]),l={notices:a,addNotice:s,removeNotice:d,clearNotices:c};return jsxRuntime.jsxs(DC.Provider,{value:l,children:[e,jsxRuntime.jsx(Td,{notices:a,onDismiss:d,position:t})]})}function IC(){let e=Ze.useContext(DC);if(!e)throw new Error("useNoticeContext must be used within a NoticeProvider");return e}function FC(){let{addNotice:e,removeNotice:t,clearNotices:r}=IC(),o=Ze.useCallback((d,c)=>e(d,c),[e]),n=Ze.useCallback((d,c)=>e(d,{...c,variant:"success"}),[e]),a=Ze.useCallback((d,c)=>e(d,{...c,variant:"error"}),[e]),i=Ze.useCallback((d,c)=>e(d,{...c,variant:"warning"}),[e]),s=Ze.useCallback((d,c)=>e(d,{...c,variant:"info"}),[e]);return {show:o,success:n,error:a,warning:i,info:s,dismiss:t,clear:r}}var RA={plain:"",contained:"bg-background-surface rounded-lg border border-border-default p-6",bordered:"border-y border-border-default py-6"},EA={none:"",sm:"my-4",md:"my-6 md:my-8",lg:"my-8 md:my-12"};function ki({id:e,title:t,description:r,actions:o,variant:n="plain",spacing:a="none",withDivider:i=false,headingAs:s="h2",className:d,children:c}){let l=Ze__namespace.default.useId(),u=e?`${e}-heading`:l,m=t||r||o;return jsxRuntime.jsxs("section",{id:e,className:tailwindMerge.twMerge(EA[a],RA[n],d),"aria-labelledby":t?u:void 0,children:[m&&jsxRuntime.jsxs("header",{id:u,className:tailwindMerge.twMerge("flex flex-col sm:flex-row sm:flex-wrap sm:items-start sm:justify-between gap-4",i&&"border-b border-border-default pb-4 mb-6",!i&&c&&"mb-6"),children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[t&&jsxRuntime.jsx(xr,{tag:s,size:"md",className:"text-text-primary",children:t}),r&&jsxRuntime.jsx("p",{className:"mt-2 text-base text-text-secondary",children:r})]}),o&&jsxRuntime.jsx("div",{className:"min-w-0 shrink",children:o})]}),c&&jsxRuntime.jsx("div",{className:"",children:t?jsxRuntime.jsx(fn,{children:c}):c})]})}ki.displayName="Section";function Pd({sections:e,activeSection:t,onSectionChange:r,orientation:o="responsive",className:n,scrollBehavior:a="smooth",stickyTop:i="1.5rem",heading:s,sectionIdPrefix:d="section-",filterSection:c,scrollContainerId:l}){let u=Ze__namespace.useRef(null),m=Ze__namespace.useRef(null),[p,g]=Ze__namespace.useState(e[0]?.id||null),f=t??p,x=Ze__namespace.useCallback(()=>l?document.getElementById(l):null,[l]),h=Ze__namespace.useCallback(S=>document.getElementById(`${d}${S}`)??document.getElementById(S),[d]);Ze__namespace.useEffect(()=>{let S=window.location.hash;if(!S)return;let N=S.slice(1),k=N.startsWith(d)?N.slice(d.length):N,T=e.find(E=>E.id===k);T&&requestAnimationFrame(()=>{let E=h(T.id);if(!E)return;let A=x();if(A){let P=A.getBoundingClientRect(),I=E.getBoundingClientRect(),R=A.scrollTop+(I.top-P.top);A.scrollTo({top:Math.max(0,R),behavior:"instant"});}else E.scrollIntoView({behavior:"instant",block:"start"});r?r(T.id):g(T.id);});},[]),Ze__namespace.useEffect(()=>{if(t!==void 0&&r)return;let S=E=>{if(!E)return false;let A=window.getComputedStyle(E);return A.display!=="none"&&A.visibility!=="hidden"&&A.opacity!=="0"},N=()=>{let E=S(u.current),A=S(m.current);if(!E&&!A)return null;let P=x(),I=new IntersectionObserver(R=>{R.forEach(O=>{if(O.isIntersecting){let W=O.target.id.replace(d,"");r?r(W):g(W);}});},{root:P??void 0,rootMargin:"-20% 0px -70% 0px",threshold:0});return e.forEach(R=>{let O=h(R.id);O&&I.observe(O);}),I},k=N(),T=()=>{k&&k.disconnect(),k=N();};return window.addEventListener("resize",T),()=>{k&&k.disconnect(),window.removeEventListener("resize",T);}},[e,d,t,r,o,x,h]);let y=Ze__namespace.useMemo(()=>c?e.filter(c):e,[e,c]),v=Ze__namespace.useCallback((S,N)=>{S.preventDefault();let k=h(N);if(k){let T=x();if(T){let E=T.getBoundingClientRect(),A=k.getBoundingClientRect(),P=T.scrollTop+(A.top-E.top),I=Math.max(0,T.scrollHeight-T.clientHeight);T.scrollTo({top:Math.max(0,Math.min(P,I)),behavior:a});}else {let E=k.getBoundingClientRect().top+window.scrollY,A=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),P=Math.max(0,Math.min(E,A));window.scrollTo({top:P,behavior:a});}window.history.pushState&&window.history.pushState(null,"",`#${d}${N}`),r?r(N):g(N);}},[d,a,r,x,h]);if(y.length===0)return null;let C=o==="vertical"?"":o==="horizontal"?"hidden":"hidden lg:block",w=o==="horizontal"?"":o==="vertical"?"hidden":"lg:hidden";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("nav",{ref:u,className:tailwindMerge.twMerge(C,n),"aria-label":"Section navigation",children:jsxRuntime.jsxs("div",{className:"space-y-1",style:{position:"sticky",top:i},children:[s?jsxRuntime.jsx("div",{className:"px-3 pb-2 text-label-sm font-semibold uppercase tracking-wide text-text-tertiary",children:s}):null,y.map(S=>{let N=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:k=>v(k,S.id),className:tailwindMerge.twMerge("block w-full text-left px-3 py-2 rounded-md text-sm transition-colors no-underline",N?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":N?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsx("span",{className:"text-xs tabular-nums text-text-secondary",children:S.count})]})},S.id)})]})}),jsxRuntime.jsx("nav",{ref:m,className:tailwindMerge.twMerge(w,"overflow-x-auto scrollbar-hide sticky top-0 z-10 py-4 -mt-4",n),"aria-label":"Section navigation",children:jsxRuntime.jsx("div",{className:"flex gap-2 min-w-max",children:y.map(S=>{let N=f===S.id;return jsxRuntime.jsx("a",{href:`#${d}${S.id}`,onClick:k=>v(k,S.id),className:tailwindMerge.twMerge("inline-block px-4 py-2 rounded-md text-sm whitespace-nowrap transition-colors no-underline",N?"bg-background-muted text-text-primary font-semibold":"text-text-secondary hover:text-text-primary hover:bg-background-hover"),"aria-current":N?"page":void 0,children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{children:S.label}),S.count!==void 0&&jsxRuntime.jsxs("span",{className:"text-xs tabular-nums text-text-secondary",children:["(",S.count,")"]})]})},S.id)})})})]})}function VC(e){return "primary"}var Rd=Ze__namespace.createContext({variant:"primary"});function FA({orientation:e,className:t=""}){return `flex flex-col w-full ${{horizontal:"",vertical:"flex-row"}[e]||""} ${t}`.trim()}function Md({variant:e="primary",...t}){let r=VC();return jsxRuntime.jsx(Rd.Provider,{value:{variant:r},children:jsxRuntime.jsx("div",{className:"w-full h-auto",children:jsxRuntime.jsx(reactAriaComponents.Tabs,{...t,className:reactAriaComponents.composeRenderProps(t.className,(o,n)=>FA({...n,className:o}))})})})}function BA({orientation:e,sticky:t=false,className:r=""}){let o="flex gap-10 relative after:absolute after:bottom-0 after:left-0 after:right-0 after:h-[2px] after:bg-border-muted",n={horizontal:"flex-row w-full flex-nowrap overflow-x-auto scrollbar-hide",vertical:"flex-col items-start"},a=t?"sticky top-0 bg-background-surface z-10":"";return `${o} ${n[e]||""} ${a} ${r}`.trim()}function Ld({variant:e,sticky:t=false,...r}){let o=Ze__namespace.useContext(Rd),n=VC(e??o.variant);return jsxRuntime.jsx(Rd.Provider,{value:{variant:n},children:jsxRuntime.jsx(reactAriaComponents.TabList,{...r,className:reactAriaComponents.composeRenderProps(r.className,(a,i)=>BA({...i,sticky:t,className:a||""}))})})}function VA({isSelected:e,isDisabled:t,variant:r,className:o=""}){let n="flex items-center cursor-default px-1 py-2 font-medium transition-all hover:cursor-pointer relative shrink-0 whitespace-nowrap",a=`${ot()} ${r==="primary"?"focus-visible:outline-action-primary":""}`.trim(),i="";return t?i="text-text-disabled forced-colors:text-[GrayText] cursor-not-allowed":e?i="text-action-primary border-b-2 border-action-primary z-10 forced-colors:bg-[Highlight]":i="text-text-disabled hover:text-text-secondary",`${n} ${a} ${i} ${o}`.trim()}function Dd(e){let{variant:t}=Ze__namespace.useContext(Rd);return jsxRuntime.jsx(reactAriaComponents.Tab,{...e,"data-testid":e.id?`tab-${e.id}`:void 0,className:reactAriaComponents.composeRenderProps(e.className,(r,o)=>VA({...o,className:r,isSelected:o.isSelected,variant:t}))})}function OA({className:e=""}){let t="block w-full mt-4 text-text-primary",r=ot();return `${t} ${r} ${e}`.trim()}function OC(e){return jsxRuntime.jsx(reactAriaComponents.TabPanel,{...e,className:reactAriaComponents.composeRenderProps(e.className,(t,r)=>OA({...r,className:t||""}))})}function Da({children:e,maxWidth:t=1400,paddingXClass:r="px-4 md:px-6",paddingYClass:o="pt-8 pb-14 md:pt-12 md:pb-28",className:n}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(`w-full ${r} ${o}`,n),style:{marginInline:"auto",maxWidth:t},children:e})}function zA({title:e,subtitle:t,breadcrumbs:r,breadcrumbsNode:o,media:n,actions:a,metadata:i,headingAs:s,sticky:d,stickyTop:c="0",zIndex:l=10,isLoading:u=false,className:m}){let p=d?"sticky bg-background-body":"",g=d?{top:c,zIndex:l}:{};return u?jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o||r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(j,{className:"h-4 w-32"})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(j,{className:"h-8 w-64"})}),t?jsxRuntime.jsx(j,{className:"mt-2 h-5 w-48"}):null,i?jsxRuntime.jsx(j,{className:"mt-2 h-4 w-40"}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,x)=>jsxRuntime.jsx(j,{className:"h-9 w-full"},x))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,x)=>jsxRuntime.jsx(j,{className:"h-9 w-24"},x))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:jsxRuntime.jsx(j,{className:"h-64 w-full"})}):null]}):jsxRuntime.jsxs("header",{className:tailwindMerge.twMerge("mb-8 md:mb-12",p,m),style:g,"aria-labelledby":"page-title",children:[o?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:o}):r?.length?jsxRuntime.jsx("div",{className:"mb-2 md:mb-4",children:jsxRuntime.jsx(Rl,{children:r.map((f,x)=>{let{label:h,...y}=f;return jsxRuntime.jsx(El,{...y,children:h},`${h}-${x}`)})})}):null,jsxRuntime.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[jsxRuntime.jsx("div",{id:"page-title",children:jsxRuntime.jsx(xr,{tag:s||"h1",size:"xl",children:e})}),t?jsxRuntime.jsx("p",{className:"mt-2 text-base md:text-lg text-text-secondary",children:t}):null,i?jsxRuntime.jsx("div",{className:"mt-2 text-sm text-text-secondary",children:i}):null,a?.length?jsxRuntime.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-3 md:hidden",children:a.map((f,x)=>jsxRuntime.jsx(Ze__namespace.default.Fragment,{children:f},x))}):null]}),a?.length?jsxRuntime.jsx("div",{className:"hidden md:flex md:items-start gap-2 shrink-0",children:a.map((f,x)=>jsxRuntime.jsx(Ze__namespace.default.Fragment,{children:f},x))}):null]}),n?jsxRuntime.jsx("div",{className:"mt-4 md:mt-6",children:n}):null]})}function HA({tabs:e,value:t,defaultValue:r,onChange:o,className:n,children:a}){let i=s=>{o?.(s);};return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("mb-3 md:mb-4 border-b-2 border-border-muted",n),children:jsxRuntime.jsxs(Md,{selectedKey:t,defaultSelectedKey:r||e[0]?.id,onSelectionChange:i,children:[jsxRuntime.jsx(Ld,{className:"after:bg-transparent",children:e.map(s=>jsxRuntime.jsx(Dd,{id:s.id,isDisabled:s.disabled,children:s.label},s.id))}),a]})})}function GA({children:e,className:t,withSectionNav:r,navWidth:o="240px",gap:n="2rem",activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d="section-",scrollContainerId:c,navHeading:l,navStickyTop:u}){return r?jsxRuntime.jsx(UA,{position:r,navWidth:o,gap:n,activeSection:a,onSectionChange:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,navHeading:l,navStickyTop:u,className:t,children:e}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full space-y-8 md:space-y-12",t),children:e})}function WA({children:e,sticky:t=true,className:r}){return jsxRuntime.jsx("aside",{className:tailwindMerge.twMerge(t?"lg:sticky lg:top-20":"",r),children:e})}function UA({activeSection:e,onSectionChange:t,position:r,navWidth:o,gap:n,children:a,className:i,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,navHeading:l,navStickyTop:u}){let m=Ze__namespace.default.useMemo(()=>{let v=[];return Ze__namespace.default.Children.forEach(a,C=>{if(Ze__namespace.default.isValidElement(C)&&(C.type===ki||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;w.id?v.push({id:w.id,label:w.navLabel||(typeof w.title=="string"?w.title:`Section ${w.id}`)}):process.env.NODE_ENV==="development"&&console.warn("Section component used within PageLayout.Content with withSectionNav must have an id prop");}}),v},[a]),p=Ze__namespace.default.useMemo(()=>{let v=Ze__namespace.default.Children.map(a,C=>{if(Ze__namespace.default.isValidElement(C)&&(C.type===ki||typeof C.type=="object"&&C.type?.displayName==="Section"||typeof C.type=="function"&&C.type?.displayName==="Section")){let w=C.props;if(w.id)return Ze__namespace.default.cloneElement(C,{...w,id:`${d}${w.id}`})}return C});return jsxRuntime.jsx("div",{className:"space-y-8 md:space-y-12",children:v})},[a,d]),g=(v,C)=>jsxRuntime.jsx(Pd,{sections:m,activeSection:e,onSectionChange:t,orientation:v,scrollBehavior:s,sectionIdPrefix:d,scrollContainerId:c,heading:l,className:C});if(r==="above")return jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("space-y-4",i),children:[jsxRuntime.jsx("div",{className:"sticky top-0 z-10 bg-background-body",children:g("horizontal")}),p]});let f=r==="left"?"var(--nav-width) 1fr":"1fr var(--nav-width)",x=u?"":"top-20",h=u?{top:u}:void 0,y=tailwindMerge.twMerge("hidden lg:block sticky self-start",x);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"lg:hidden sticky top-0 z-10 mt-3 mb-4 bg-background-body border-b border-border-default shadow-sm",children:g("horizontal","py-3 mt-0")}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("lg:grid",i),style:{gridTemplateColumns:f,gap:n,"--nav-width":o},children:[r==="left"&&jsxRuntime.jsx("nav",{className:y,style:h,children:g("vertical")}),p,r==="right"&&jsxRuntime.jsx("nav",{className:y,style:h,children:g("vertical")})]})]})}function KA({children:e,className:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex-1 overflow-auto min-h-0",t),children:e})}Da.Header=zA;Da.Tabs=HA;Da.Content=GA;Da.Aside=WA;Da.ScrollableContent=KA;function JA(e){return typeof e=="object"&&e!==null&&"features"in e&&Array.isArray(e.features)&&"type"in e&&typeof e.type=="string"}var XA=process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN||"";function GC({label:e,selectedKey:t,defaultSelectedKey:r,onSelectionChange:o,placeholder:n="Enter a location...",errorMessage:a,description:i,size:s="md",tooltip:d,isRequired:c,isDisabled:l,showErrors:u=true,autoFocus:m=false,onSelect:p,searchTypes:g=["place","address"],defaultFilter:f,validationResult:x,countryRestrictions:h,proximity:y="ip",hideCountry:v=false,showIcon:C=true,useMobileTray:w=true,className:S}){let N=Ze.useRef(new WeakMap),k=Ze.useRef([]),T={requestType:"REST",method:"GET",url:"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json",extraParams:{access_token:XA,types:g.join(","),limit:"5",...h?.length?{country:h.join(",").toLowerCase()}:{},...y?{proximity:y==="ip"?"ip":y.join(",")}:{}},shouldLoad:P=>P.length>0,transformResponse:P=>{if(!JA(P))return [];let I=P.features.map(R=>{let O={id:R.id,name:R.place_name};return N.current.set(O,{type:R.place_type[0],center:R.center,context:R.context,address:R.address,text:R.text,properties:R.properties}),O});return I.length>0&&(k.current=I),I}},E=P=>{let I=N.current.get(P),R=P.name.split(", "),O=R[0],W=R.slice(1);v&&W.length>0&&(W=W.slice(0,-1));let z=W.join(", ");return jsxRuntime.jsxs("div",{className:"flex items-center gap-3 py-0.5",children:[C&&jsxRuntime.jsx(H,{name:I?.type==="address"?"MapPin":I?.type==="place"?"Buildings":I?.type==="region"?"MapPinArea":I?.type==="country"?"Flag":"Circle",className:"h-5 w-5 flex-shrink-0 text-text-secondary"}),jsxRuntime.jsxs("div",{className:"flex min-w-0 flex-col",children:[jsxRuntime.jsx("span",{className:"truncate font-medium text-text-primary",children:O}),z&&jsxRuntime.jsx("span",{className:"truncate text-sm text-text-secondary",children:z})]})]})},A=P=>P?jsxRuntime.jsx(H,{name:"CircleNotch",className:"h-4 w-4 animate-spin text-text-secondary"}):jsxRuntime.jsx(H,{name:"MagnifyingGlass",className:"h-4 w-4 text-text-secondary"});return jsxRuntime.jsx(Tl,{"data-testid":"autocomplete","data-config":JSON.stringify({types:g.join(","),country:h?.join(",")?.toLowerCase(),proximity:y==="ip"?"ip":y?.join(",")}),label:e||void 0,selectedKey:t,defaultSelectedKey:r,onSelectionChange:P=>{if(o?.(P),P){let R=k.current.find(O=>O.id===P);if(R){let O=N.current.get(R);O&&p({id:R.id,place_name:R.name,place_type:[O.type],center:O.center,context:O.context,address:O.address,text:O.text,properties:O.properties});}}},requestConfig:T,placeholder:n,errorMessage:a,description:i,size:s,tooltip:d,isRequired:c,isDisabled:l,showErrors:u,autoFocus:m,renderItem:E,renderLeftIcon:A,defaultFilter:f,validationResult:x,hideChevron:true,useMobileTray:w,className:S})}function UC({label:e,rightLabel:t,progressWidth:r=64,hideLabels:o=false,...n}){return jsxRuntime.jsx(reactAriaComponents.ProgressBar,{...n,className:Ie(n.className,"flex flex-col gap-1"),children:({percentage:a,valueText:i,isIndeterminate:s})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!o&&jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-2",children:[jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:e}),jsxRuntime.jsx("span",{className:"text-sm text-text-primary",children:t||i})]}),jsxRuntime.jsx("div",{className:`relative h-2 w-${r} overflow-hidden rounded-full bg-background-muted outline-none`,children:jsxRuntime.jsx("div",{className:`absolute top-0 h-full rounded-full bg-action-default forced-colors:bg-[Highlight] ${s?"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]":"left-0"}`,style:{width:(s?40:a)+"%"}})})]})})}function KC({as:e="div",size:t="md",tone:r="editorial",className:o="",children:n,...a}){let i=t==="md"?"":`prose-${t}`,s=r==="editorial"?"":`prose-${r}`;return jsxRuntime.jsx(e,{className:br("prose",i,s,o),...a,children:n})}function eI(e="2"){return {1:"p-2 text-xs",2:"p-3 text-sm",3:"p-4 text-base"}[e]}function tI(e){return e?"border-action-primary text-action-primary":"border-border text-text-primary"}function rI(){return "opacity-50 cursor-not-allowed"}function YC({value:e,isDisabled:t,className:r,children:o,size:n="2",variant:a="primary"}){return jsxRuntime.jsx(reactAriaComponents.Radio,{value:e,isDisabled:t,className:Ie(r,"relative flex items-center justify-center cursor-pointer transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-action-primary focus:ring-offset-2 rounded-lg min-h-[44px]"),children:({isSelected:s,isDisabled:d})=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("flex items-center justify-center w-full h-full transition-all duration-200 rounded-lg border-2 bg-background-surface",!(t||d)&&!s&&"hover:bg-background-hover hover:border-border-hover",eI(n),tI(s),(t||d)&&rI(),r),children:o})})}function JC({value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:i,children:s,size:d="2",variant:c="primary",columns:l="repeat(auto-fit, minmax(160px, 1fr))",gap:u="1"}){return jsxRuntime.jsx(reactAriaComponents.RadioGroup,{value:e,defaultValue:t,onChange:r,isDisabled:o,isReadOnly:n,isRequired:a,className:Ie(i,"grid"),style:{gridTemplateColumns:/^\d+$/.test(String(l))?`repeat(${l}, minmax(0, 1fr))`:l,gap:u==="1"?"0.25rem":u==="2"?"0.5rem":u==="3"?"0.75rem":u==="4"?"1rem":typeof u=="number"?`${u}px`:u},children:Ze__namespace.default.Children.map(s,m=>Ze__namespace.default.isValidElement(m)?Ze__namespace.default.cloneElement(m,{size:d,variant:c}):m)})}function sI(e){return "primary"}var XC=Ze.createContext({variant:"primary"});function qC(e){let{variant:t="primary",...r}=e,o=sI();return jsxRuntime.jsx(XC.Provider,{value:{variant:o},children:jsxRuntime.jsxs(reactAriaComponents.RadioGroup,{...r,className:Ie(e.className,"group flex flex-col gap-2"),children:[jsxRuntime.jsx(qe,{children:e.label}),jsxRuntime.jsx("div",{className:`flex ${r.orientation==="horizontal"?"flex-row gap-4":"flex-col gap-2"}`,children:e.children}),e.description&&jsxRuntime.jsx(Pe,{children:e.description}),jsxRuntime.jsx(xe,{children:typeof e.errorMessage=="function"&&e.validationResult?e.errorMessage(e.validationResult):typeof e.errorMessage=="string"?e.errorMessage:null})]})})}function lI({isSelected:e,isInvalid:t,isDisabled:r}){let n=[ot(),"focus-visible:outline-action-primary","w-5 h-5 rounded-full border-2 bg-background-surface transition-all"];return r?n.push("border-border-muted forced-colors:!border-[GrayText]"):t?n.push("border-feedback-error-border group-pressed:border-feedback-error-border dark:group-pressed:border-feedback-error-border forced-colors:!border-[Mark]"):e?n.push("border-[7px] border-action-primary forced-colors:!border-[Highlight] group-pressed:border-action-primary-hover dark:group-pressed:border-action-primary-hover"):n.push("border-border-default group-pressed:border-border-focus dark:group-pressed:border-border-focus"),n.join(" ")}function jC(e){return Ze.useContext(XC),jsxRuntime.jsx(reactAriaComponents.Radio,{...e,className:Ie(e.className,"relative group flex items-center gap-2 text-sm text-text-primary transition disabled:text-text-secondary dark:text-text-primary dark:disabled:text-text-secondary forced-colors:disabled:text-[GrayText]"),children:t=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:lI(t)}),e.children]})})}var xI={sm:{toolbar:"p-1.5",contentWrapper:"min-h-[100px]",contentPadding:"p-3",placeholderPos:"left-3 top-3",prose:"prose-xs",h1:"[&_.ProseMirror_h1]:mb-2 [&_.ProseMirror_h1]:text-base [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-1.5 [&_.ProseMirror_h2]:text-sm [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-1",list:"[&_.ProseMirror_ul]:mb-1 [&_.ProseMirror_ul]:ml-4 [&_.ProseMirror_ol]:mb-1 [&_.ProseMirror_ol]:ml-4",li:"[&_.ProseMirror_li]:mb-0.5",placeholderText:"text-xs"},md:{toolbar:"p-2",contentWrapper:"min-h-[200px]",contentPadding:"p-4",placeholderPos:"left-4 top-4",prose:"prose-sm",h1:"[&_.ProseMirror_h1]:mb-4 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-3 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-2",list:"[&_.ProseMirror_ul]:mb-2 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-2 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1",placeholderText:"text-sm"},lg:{toolbar:"p-2.5",contentWrapper:"min-h-[250px]",contentPadding:"p-5",placeholderPos:"left-5 top-5",prose:"prose-base",h1:"[&_.ProseMirror_h1]:mb-5 [&_.ProseMirror_h1]:text-3xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-4 [&_.ProseMirror_h2]:text-2xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-6 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-6",li:"[&_.ProseMirror_li]:mb-1.5",placeholderText:"text-base"},xl:{toolbar:"p-3",contentWrapper:"min-h-[300px]",contentPadding:"p-6",placeholderPos:"left-6 top-6",prose:"prose-lg",h1:"[&_.ProseMirror_h1]:mb-6 [&_.ProseMirror_h1]:text-4xl [&_.ProseMirror_h1]:font-bold",h2:"[&_.ProseMirror_h2]:mb-5 [&_.ProseMirror_h2]:text-3xl [&_.ProseMirror_h2]:font-semibold",p:"[&_.ProseMirror_p]:mb-3",list:"[&_.ProseMirror_ul]:mb-3 [&_.ProseMirror_ul]:ml-8 [&_.ProseMirror_ol]:mb-3 [&_.ProseMirror_ol]:ml-8",li:"[&_.ProseMirror_li]:mb-2",placeholderText:"text-lg"}},Ei=({isActive:e=false,onPress:t,children:r})=>jsxRuntime.jsx(re,{variant:e?"secondary":"ghost",size:"sm",onPress:t,className:"p-1",children:r});function yI({initialUrl:e,isOpen:t,onClose:r,onSubmit:o}){let[n,a]=Ze.useState(e);return Ze__namespace.default.useEffect(()=>{a(e);},[e]),jsxRuntime.jsx(Dr,{isDismissable:true,isOpen:t,onOpenChange:s=>!s&&r(),children:jsxRuntime.jsx(reactAriaComponents.Modal,{className:"flex items-center justify-center p-4 outline-none focus:outline-none focus-visible:outline-none ring-0 focus:ring-0 focus-visible:ring-0",children:jsxRuntime.jsx(reactAriaComponents.Dialog,{className:"relative bg-background-surface rounded-lg shadow-xl max-w-md w-full",children:jsxRuntime.jsxs("form",{onSubmit:s=>{s.preventDefault(),o(n),r();},children:[jsxRuntime.jsx(lr,{title:"Insert Link",onClose:r}),jsxRuntime.jsx("div",{className:"p-6",children:jsxRuntime.jsx($r,{label:"URL",type:"url",value:n,onChange:a,autoFocus:true,className:"w-full"})}),jsxRuntime.jsxs("div",{className:"flex justify-end gap-2 border-t border-border-muted p-4",children:[jsxRuntime.jsx(re,{variant:"secondary",onPress:r,children:"Cancel"}),jsxRuntime.jsx(re,{type:"submit",children:"Save"})]})]})})})})}function _C({initialContent:e="",onChange:t,className:r,isDisabled:o=false,placeholder:n="Start typing...",id:a,size:i="md",headingLevels:s=[1,2]}){let d=xI[i],[c,l]=Ze.useState(false),u=react.useEditor({immediatelyRender:false,extensions:[fI__default.default.configure({heading:s.length>0?{levels:s}:false}),dI__default.default.configure({openOnClick:false,HTMLAttributes:{class:"text-text-link-default hover:text-text-link-hover underline decoration-text-link-default/30 hover:decoration-text-link-hover cursor-pointer"}})],content:e,editable:!o,onUpdate:({editor:g})=>{t?.(g.getHTML());},editorProps:{attributes:{class:tailwindMerge.twMerge(`prose ${d.prose} max-w-none`,"focus:outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0")}}}),m=()=>{l(true);},p=g=>{g===""?u?.chain().focus().unsetLink().run():u?.chain().focus().setLink({href:g}).run();};return u?jsxRuntime.jsxs("div",{id:a,"data-richtexteditor":true,className:tailwindMerge.twMerge("flex flex-col rounded-md border border-border-input bg-background-input","outline-none focus-within:outline-none focus-within:border-border-input focus-within:ring-0 focus-within:shadow-none",o&&"opacity-50",r),style:{outline:"none"},children:[!o&&u&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(menus.BubbleMenu,{editor:u,shouldShow:({editor:g})=>g.isActive("link")&&!c,className:"flex items-center gap-1 rounded-md border border-border-input bg-background-surface p-1 shadow-md",children:[jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>{let g=u.getAttributes("link").href;g&&window.open(g,"_blank","noopener,noreferrer");},children:[jsxRuntime.jsx(H,{name:"ArrowSquareOut",className:"mr-1 h-4 w-4"}),"Open"]}),jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:m,children:[jsxRuntime.jsx(H,{name:"PencilSimple",className:"mr-1 h-4 w-4"}),"Edit"]}),jsxRuntime.jsxs(re,{variant:"ghost",size:"sm",className:"h-8 px-2",onPress:()=>u.chain().focus().unsetLink().run(),children:[jsxRuntime.jsx(H,{name:"X",className:"mr-1 h-4 w-4"}),"Remove"]})]}),jsxRuntime.jsx(yI,{isOpen:c,onClose:()=>l(false),onSubmit:p,initialUrl:u.getAttributes("link").href||""})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex items-center gap-1 border-b border-border-input",d.toolbar),children:[s.map(g=>jsxRuntime.jsx(Ei,{isActive:u.isActive("heading",{level:g}),onPress:()=>u.chain().focus().toggleHeading({level:g}).run(),children:jsxRuntime.jsxs("span",{className:"text-xs font-bold",children:["H",g]})},g)),jsxRuntime.jsx(Ei,{isActive:u.isActive("bold"),onPress:()=>u.chain().focus().toggleBold().run(),children:jsxRuntime.jsx("span",{className:"text-xs font-bold",children:"B"})}),jsxRuntime.jsx(Ei,{isActive:u.isActive("italic"),onPress:()=>u.chain().focus().toggleItalic().run(),children:jsxRuntime.jsx("span",{className:"text-xs italic",children:"I"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(Ei,{isActive:u.isActive("bulletList"),onPress:()=>u.chain().focus().toggleBulletList().run(),children:jsxRuntime.jsx(H,{name:"ListBullets",className:"h-4 w-4"})}),jsxRuntime.jsx(Ei,{isActive:u.isActive("orderedList"),onPress:()=>u.chain().focus().toggleOrderedList().run(),children:jsxRuntime.jsx(H,{name:"ListNumbers",className:"h-4 w-4"})}),jsxRuntime.jsx("div",{className:"mx-1 h-4 w-px bg-border-muted"}),jsxRuntime.jsx(Ei,{isActive:u.isActive("link"),onPress:m,children:jsxRuntime.jsx(H,{name:"PaperclipHorizontal",className:"h-4 w-4"})})]}),jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative w-full outline-none focus:outline-none",d.contentWrapper),children:[jsxRuntime.jsx(react.EditorContent,{editor:u,className:tailwindMerge.twMerge("w-full outline-none focus:outline-none",d.contentPadding,"[&_.ProseMirror]:min-h-[inherit]","[&_.ProseMirror]:outline-none [&_.ProseMirror]:focus:outline-none",d.h1,d.h2,d.p,"[&_.ProseMirror_ul]:list-disc","[&_.ProseMirror_ol]:list-decimal",d.list,d.li,"[&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border-muted [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:italic","[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-background-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:py-0.5 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-sm","[&_.ProseMirror_pre]:rounded-md [&_.ProseMirror_pre]:bg-background-muted [&_.ProseMirror_pre]:p-3 [&_.ProseMirror_pre]:font-mono [&_.ProseMirror_pre]:text-sm","[&_.ProseMirror_hr]:border-border-muted",o&&"pointer-events-none")}),u.isEmpty&&!o&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("pointer-events-none absolute text-text-secondary",d.placeholderPos,d.placeholderText),children:n})]})]}):null}function $C({streetAddress:e,city:t,state:r,postalCode:o,longitude:n,latitude:a,href:i,LinkComponent:s,variant:d="outlined",layout:c="stacked",showMap:l=true,mapHeight:u=200,mapboxAccessToken:m,isLoading:p=false,className:g,contentClassName:f,showMapExpandToggle:x=false,expandedMapTitle:h="Explore map",expandedMapAddressLabel:y,piiEntity:v}){let C=[];t&&C.push(t),r&&o?C.push(`${r} ${o}`):r?C.push(r):o&&C.push(o);let w=C.join(", "),S=y||[e,w].filter(Boolean).join(", "),N=l&&n!==void 0&&a!==void 0,k=({children:E,className:A})=>i?s?jsxRuntime.jsx(s,{href:i,className:A,children:E}):jsxRuntime.jsx(pt,{href:i,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",A),asButton:false,children:E}):jsxRuntime.jsx("span",{className:A,children:E});if(p){let E=c==="row";return jsxRuntime.jsxs(_e,{variant:d,className:tailwindMerge.twMerge(E?"flex flex-col md:flex-row":"flex flex-col",g),children:[N&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(E&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(j,{width:"100%",height:u})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-2 px-4 md:px-6",E&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsx(j,{width:"100%",height:16}),jsxRuntime.jsx(j,{width:"80%",height:16})]})]})}let T=c==="row";return jsxRuntime.jsxs(_e,{variant:d,className:tailwindMerge.twMerge("group/card relative",i&&"cursor-pointer",T?"flex flex-col md:flex-row":"flex flex-col",g),children:[i&&jsxRuntime.jsx(k,{className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e})}),N&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(T&&"md:order-2 md:flex-[2] md:min-w-0"),children:jsxRuntime.jsx(Ti,{height:u,initialViewState:{longitude:n,latitude:a,zoom:14},showMarker:true,mapboxAccessToken:m,showExpandToggle:x,expandedMapTitle:h,expandedMapAddressLabel:S})}),jsxRuntime.jsx(_e.Content,{className:tailwindMerge.twMerge("px-4 md:px-6",T&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",f),children:jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":v?"address":void 0,"data-pii-entity":v,children:e}),w&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":v?"city-state-zip":void 0,"data-pii-entity":v,children:w})]})})]})}function t0({site:e,contact:t,LinkComponent:r,variant:o="outlined",layout:n="stacked",showMap:a=true,mapHeight:i=200,mapboxAccessToken:s,showEmail:d=true,showPhone:c=false,isLoading:l=false,className:u,contentClassName:m,fullHeight:p=false,showMapExpandToggle:g=false,expandedMapTitle:f="Explore map",expandedMapAddressLabel:x}){let h=[];e.city&&h.push(e.city),e.state&&e.postalCode?h.push(`${e.state} ${e.postalCode}`):e.state?h.push(e.state):e.postalCode&&h.push(e.postalCode);let y=h.join(", "),v=x||[e.streetAddress,y].filter(Boolean).join(", "),C=a&&e.longitude!==void 0&&e.latitude!==void 0,w=t?`${t.firstName} ${t.lastName}`.trim():"",S=({children:k,href:T,className:E})=>T?r?jsxRuntime.jsx(r,{href:T,className:E,children:k}):jsxRuntime.jsx(pt,{href:T,variant:"unstyled",className:tailwindMerge.twMerge("hover:underline",E),asButton:false,children:k}):jsxRuntime.jsx("span",{className:E,children:k});if(l){let k=n==="row";return jsxRuntime.jsxs(_e,{variant:o,className:tailwindMerge.twMerge(p&&"h-full",k?"flex flex-col md:flex-row":"flex flex-col",u),children:[C&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(k&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(j,{width:"100%",height:p?"100%":i})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",k&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center"),children:[jsxRuntime.jsxs("div",{className:"space-y-2",children:[jsxRuntime.jsx(j,{width:"100%",height:16}),jsxRuntime.jsx(j,{width:"80%",height:16})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(j,{width:40,height:40,className:"rounded flex-shrink-0"}),jsxRuntime.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntime.jsx(j,{width:"50%",height:14}),jsxRuntime.jsx(j,{width:"100%",height:12})]})]})]})]})]})}let N=n==="row";return jsxRuntime.jsxs(_e,{variant:o,className:tailwindMerge.twMerge("group/card relative",e.href&&"cursor-pointer",p&&"h-full",N?"flex flex-col md:flex-row":"flex flex-col",u),children:[e.href&&jsxRuntime.jsx(S,{href:e.href,className:"after:absolute after:inset-0 after:z-10",children:jsxRuntime.jsx("span",{className:"sr-only",children:e.streetAddress})}),C&&jsxRuntime.jsx(_e.Media,{aspectRatio:"auto",className:tailwindMerge.twMerge(N&&"md:order-2 md:flex-[2] md:min-w-0",p&&"flex-1"),children:jsxRuntime.jsx(Ti,{height:p?"100%":i,initialViewState:{longitude:e.longitude,latitude:e.latitude,zoom:14},showMarker:true,mapboxAccessToken:s,showExpandToggle:g,expandedMapTitle:f,expandedMapAddressLabel:v})}),jsxRuntime.jsxs(_e.Content,{className:tailwindMerge.twMerge("space-y-4 px-4 py-4",N&&"md:order-1 md:flex-[1] md:flex-shrink-0 md:flex md:flex-col md:justify-center",m),children:[jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 min-w-0 text-left",children:[jsxRuntime.jsx("span",{className:"text-xl font-semibold leading-tight text-text-primary group-hover/card:text-text-brand transition-colors","data-pii-type":e.piiEntity?"address":void 0,"data-pii-entity":e.piiEntity,children:e.streetAddress}),y&&jsxRuntime.jsx("span",{className:"text-lg font-normal leading-relaxed text-text-secondary","data-pii-type":e.piiEntity?"city-state-zip":void 0,"data-pii-entity":e.piiEntity,children:y})]}),t&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"border-t border-border-default"}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2 relative",children:[jsxRuntime.jsx(Yo,{firstName:t.firstName,lastName:t.lastName,src:t.avatarUrl,size:"md",variant:"user",shape:"square",className:"flex-shrink-0",piiEntity:t.piiEntity}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[t.href?jsxRuntime.jsx(S,{href:t.href,className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5 hover:text-text-brand transition-colors relative z-20",children:jsxRuntime.jsx("span",{"data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w})}):jsxRuntime.jsx("span",{className:"text-sm font-semibold leading-tight text-text-primary block mb-0.5","data-pii-type":t.piiEntity?"full-name":void 0,"data-pii-entity":t.piiEntity,children:w}),jsxRuntime.jsxs("div",{className:"space-y-0.5",children:[d&&t.email&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Envelope",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`mailto:${t.email}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"email":void 0,"data-pii-entity":t.piiEntity,children:t.email})]}),c&&t.phone&&jsxRuntime.jsxs("div",{className:"flex items-center gap-1.5 text-text-primary",children:[jsxRuntime.jsx(H,{name:"Phone",size:12,className:"text-text-secondary flex-shrink-0"}),jsxRuntime.jsx(pt,{href:`tel:${t.phone}`,variant:"unstyled",className:"text-xs leading-tight truncate text-text-primary relative z-20","data-pii-type":t.piiEntity?"phone":void 0,"data-pii-entity":t.piiEntity,children:Ua(t.phone)})]})]})]})]})]})]})]})}function r0({label:e,description:t,tooltip:r,errorMessage:o,size:n="md",className:a,value:i,defaultValue:s=0,onChange:d,min:c=0,max:l=100,step:u=1,disabled:m,showValue:p=true}){let g=typeof i=="number",[f,x]=Ze__namespace.default.useState(s),h=g?i:f,y=Math.min(Math.max(h,c),l),v=Math.max(l-c,1e-5),C=(y-c)/v*100;return jsxRuntime.jsxs("div",{className:Ie(a,"group flex w-full flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:n,tooltip:r,className:"mb-1",children:e}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsxs("div",{className:"relative w-full select-none",children:[jsxRuntime.jsx("div",{className:"h-1.5 w-full rounded-full bg-background-muted"}),jsxRuntime.jsx("div",{className:"pointer-events-none absolute left-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-action-brand",style:{width:`${C}%`},"aria-hidden":true}),jsxRuntime.jsx("input",{type:"range",min:c,max:l,step:u,value:h,disabled:m,"aria-invalid":!!o,onChange:w=>{let S=Number(w.currentTarget.value);g||x(S),d?.(S);},className:tailwindMerge.twMerge("absolute inset-0 w-full cursor-pointer appearance-none bg-transparent outline-none","[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-background-input [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-border-input","hover:[&::-webkit-slider-thumb]:shadow-sm focus-visible:[&::-webkit-slider-thumb]:outline-2 focus-visible:[&::-webkit-slider-thumb]:outline-action-default","[&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:bg-background-input [&::-moz-range-thumb]:border [&::-moz-range-thumb]:border-border-input","hover:[&::-moz-range-thumb]:shadow-sm focus-visible:[&::-moz-range-thumb]:outline-2 focus-visible:[&::-moz-range-thumb]:outline-action-default",m?"cursor-not-allowed opacity-60":void 0)})]}),p&&jsxRuntime.jsx("div",{className:"min-w-10 text-right text-sm text-text-primary tabular-nums",children:Math.round(y)})]}),t&&jsxRuntime.jsx(Pe,{className:"mt-2 text-text-secondary",children:t}),o&&jsxRuntime.jsx(xe,{className:"mt-1",children:o})]})}var TI=Ze__namespace.default.createContext({orientation:"horizontal",isResizing:false});function n0(e,t){return e===void 0?t:e}function kI(e,t){return typeof e=="number"?e:typeof e=="string"&&e.endsWith("%")?Number.parseFloat(e)/100*t:Number.parseFloat(e.toString())}function Id({asideWidth:e,asideHeight:t,minAsideWidth:r=240,minAsideHeight:o=200,minMainWidth:n=400,minMainHeight:a=300,orientation:i="horizontal",resizable:s=false,onAsideResize:d,onResizeStart:c,onResizeEnd:l,className:u,dividerClassName:m,children:p}){let g=Ze.useRef(null),[f,x]=Ze.useState(false),h=i==="horizontal"?400:300,y=n0(i==="horizontal"?e:t,h),[v,C]=Ze.useState(null),w=Ze.useCallback(P=>{if(!g.current||!f)return;let I=g.current.getBoundingClientRect(),R=i==="horizontal"?I.width:I.height,O=i==="horizontal"?P.clientX:P.clientY,z=(i==="horizontal"?I.right:I.bottom)-O,F=R-z,Y=i==="horizontal"?r:o,U=i==="horizontal"?n:a;z<Y||F<U||(C(z),d?.(z));},[f,i,r,o,n,a,d]),S=Ze.useCallback(()=>{x(false),l?.();},[l]),N=Ze.useCallback(P=>{P.preventDefault(),P.stopPropagation(),x(true),c?.();},[c]);Ze.useEffect(()=>{if(f)return document.addEventListener("mousemove",w),document.addEventListener("mouseup",S),document.body.style.cursor=i==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none",()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",S),document.body.style.cursor="",document.body.style.userSelect="";}},[f,w,S,i]);let k=Ze__namespace.default.Children.toArray(p).find(P=>Ze__namespace.default.isValidElement(P)&&P.type===i0),T=Ze__namespace.default.Children.toArray(p).find(P=>Ze__namespace.default.isValidElement(P)&&P.type===s0),E=v??y,A=typeof E=="number"?`${E}px`:E;return jsxRuntime.jsx(TI.Provider,{value:{orientation:i,isResizing:f},children:jsxRuntime.jsxs("div",{ref:g,className:tailwindMerge.twMerge("flex w-full h-full",i==="horizontal"?"flex-row":"flex-col",u),children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-1",i==="horizontal"?"h-full":"w-full"),children:k}),s&&jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative group flex-shrink-0",i==="horizontal"?"w-2 -mx-1 cursor-col-resize":"h-2 -my-1 cursor-row-resize",m),onMouseDown:N,role:"separator","aria-orientation":i,"aria-label":"Resize divider",tabIndex:0,onKeyDown:P=>{if(!g.current)return;let I=g.current.getBoundingClientRect(),R=i==="horizontal"?I.width:I.height,O=v??kI(y,R),W=20,z=i==="horizontal"?r:o,F=i==="horizontal"?n:a;if(i==="horizontal"){if(P.key==="ArrowLeft"){let Y=Math.min(O+W,R-F);C(Y),d?.(Y);}else if(P.key==="ArrowRight"){let Y=Math.max(O-W,z);C(Y),d?.(Y);}}else if(P.key==="ArrowUp"){let Y=Math.min(O+W,R-F);C(Y),d?.(Y);}else if(P.key==="ArrowDown"){let Y=Math.max(O-W,z);C(Y),d?.(Y);}},children:[jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute bg-border-default transition-all",i==="horizontal"?"left-1/2 -translate-x-1/2 w-px h-full group-hover:w-1":"top-1/2 -translate-y-1/2 h-px w-full group-hover:h-1","group-hover:bg-action-brand/50",f&&"bg-action-brand",f&&(i==="horizontal"?"w-1":"h-1"))}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("absolute",i==="horizontal"?"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1 h-8":"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-8 h-1","bg-border-muted rounded-full opacity-0 group-hover:opacity-100 transition-opacity")})]}),jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-auto flex-shrink-0",i==="horizontal"?"h-full":"w-full"),style:{[i==="horizontal"?"width":"height"]:A},children:T})]})})}function i0({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}function s0({className:e,children:t}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full h-full",e),children:t})}Id.Main=i0;Id.Aside=s0;var RI=e=>{let t=Yt({isInvalid:e.isInvalid,isDisabled:e.isDisabled,isFocused:e.isFocused,transparent:e.transparent,size:e.size}),r=`min-h-[100px] py-2 ${e.isDisabled?"resize-none":e.isResizable?"resize-y":"resize-none"}`;return tailwindMerge.twMerge(t,r,e.className)};function l0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:c=false,className:l,validationResult:u,reserveErrorSpace:m=true,...p}){let{isFocused:g,handleFocus:f,handleBlur:x}=vr();return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("textarea",{...p,required:a,onFocus:h=>{p.onFocus&&p.onFocus(h),f(h);},onBlur:h=>{p.onBlur&&p.onBlur(h),x(h);},className:RI({isInvalid:s,isDisabled:d,isResizable:c,isFocused:g,size:o,transparent:i,className:l}),disabled:d})}),m?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,children:r(u)}):t?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&u?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)}):t?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})})}function p0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,required:a,transparent:i,isInvalid:s,isDisabled:d,isResizable:c=false,className:l,validationResult:u,value:m="",onChange:p,chips:g=[],onChipsChange:f,triggerPattern:x="{{",onTriggerDetected:h,onTriggerDismissed:y,renderChip:v,chipVariant:C="primary",chipSize:w,...S}){let N=Ze.useRef(null),{isFocused:k,handleFocus:T,handleBlur:E}=vr(),A=w||"sm",P=Ze.useRef(null),I=Ze.useCallback(U=>{let V="",J=G=>{if(G.nodeType===Node.TEXT_NODE){if(!G.parentElement?.closest("[data-chip-id]")){let L=G.textContent||"";V+=L;}}else if(G.nodeType===Node.ELEMENT_NODE){let B=G;if(B.hasAttribute("data-chip-id")){let L=B.getAttribute("data-chip-id");V+=`{{${L}}}`;return}else if(B.tagName==="BR"){V+=`
134
+ `;return}else B.tagName;}for(let B=0;B<G.childNodes.length;B++)J(G.childNodes[B]);};return J(U),V},[]),R=Ze.useCallback((U,V)=>{let J=document.createTreeWalker(U,NodeFilter.SHOW_TEXT,{acceptNode:M=>{let D=M.parentElement;return D&&D.closest("[data-chip-id]")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),G=J.nextNode(),B=Math.max(0,V);for(;G;){let M=G.nodeValue||"";if(M.length>=B){let D=document.createRange();D.setStart(G,B),D.collapse(true);let q=window.getSelection();q?.removeAllRanges(),q?.addRange(D);return}B-=M.length,G=J.nextNode();}let L=window.getSelection(),b=document.createRange();b.selectNodeContents(U),b.collapse(false),L?.removeAllRanges(),L?.addRange(b);},[]);Ze.useEffect(()=>{N.current&&!m&&N.current.textContent!==""&&(N.current.textContent="");},[m]),Ze.useLayoutEffect(()=>{if(N.current){if(m===""){if(k)try{N.current.focus({preventScroll:!0}),R(N.current,0);}catch{}return}if(P.current!=null)try{R(N.current,P.current);}finally{P.current=null;}}},[m,R,k]);let O=Ze.useCallback((U,V)=>{if(p?.(U),U===""){y?.();return}if(x&&h&&V!==void 0){let J=U.slice(0,V),G=typeof x=="string"?new RegExp(`\\${x}([^\\s]*)$`):x,B=J.match(G);if(B){let L=B[1]||"",b=V-B[0].length;h({query:L,position:V,startIndex:b});}else y?.();}},[p,x,h,y]),W=Ze.useCallback(U=>{if(!f||!p)return;let V=g.filter(G=>G.id!==U);f(V);let J=m.replace(new RegExp(`\\{\\{${U}\\}\\}`,"g"),"");p(J);},[g,f,m,p]),z=Ze.useCallback(U=>v?v(U,()=>W(U.id)):jsxRuntime.jsx(jr,{variant:C,size:A,onRemove:d?void 0:()=>W(U.id),isDisabled:d,className:"py-0.5 px-1.5 gap-1 text-xs leading-none rounded-md",children:U.label},U.id),[v,C,A,W,d]),F=()=>{let U=Yt({isInvalid:s,isDisabled:d,isFocused:k,transparent:i,size:o}),V=`min-h-[100px] py-2 px-3 ${d?"resize-none":c?"resize-y":"resize-none"}`,J=tailwindMerge.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 tailwindMerge.twMerge(U,V,J,l)},Y=()=>m?m.split(/(\{\{[^}]+\}\})/g).map((V,J)=>{let G=V.match(/\{\{([^}]+)\}\}/);if(G){let B=G[1],L=g.find(b=>b.id===B);if(L)return jsxRuntime.jsx("span",{className:"inline-block align-baseline cursor-pointer",contentEditable:false,suppressContentEditableWarning:true,"data-chip-id":B,style:{userSelect:"none",verticalAlign:"baseline",lineHeight:"1"},onClick:b=>{b.preventDefault();let M=window.getSelection(),D=document.createRange();D.selectNode(b.currentTarget),M?.removeAllRanges(),M?.addRange(D);},children:z(L)},`chip-${B}-${J}`)}return V.includes(`
48
135
  `)?V.split(`
49
- `).map((B,N)=>jsxRuntime.jsxs(Ze__namespace.default.Fragment,{children:[B,N<V.split(`
50
- `).length-1&&jsxRuntime.jsx("br",{})]},`line-${J}-${N}`)):V}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("div",{ref:T,contentEditable:!d,suppressContentEditableWarning:true,onInput:U=>{if(d)return;let V=U.target,J=V.querySelector("[data-chip-id]")!==null,G;if(J?(G=I(V),G=G.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):G=V.textContent||"",G===""){try{let h=document.createRange();h.selectNodeContents(V),h.collapse(!0);let L=window.getSelection();L?.removeAllRanges(),L?.addRange(h),R.current=0;}catch{}O("",0);return}if(G===m)return;let B=window.getSelection(),N=0;if(B&&B.rangeCount>0)try{let h=B.getRangeAt(0);if(J){let L=0,A=!1,j=ae=>{if(A)return !0;if(ae===h.startContainer)return L+=h.startOffset,A=!0,!0;if(ae.nodeType===Node.TEXT_NODE){if(!ae.parentElement?.closest("[data-chip-id]")){if(ae.contains(h.startContainer))return L+=h.startOffset,A=!0,!0;L+=(ae.textContent||"").length;}}else if(ae.nodeType===Node.ELEMENT_NODE){let _=ae;if(_.hasAttribute("data-chip-id")){if(_.contains(h.startContainer)||_===h.startContainer){let ie=_.getAttribute("data-chip-id");return L+=`{{${ie}}}`.length,A=!0,!0}let ee=_.getAttribute("data-chip-id");return L+=`{{${ee}}}`.length,!1}else if(_.tagName==="BR")return _===h.startContainer?(A=!0,!0):(L+=1,!1)}for(let _=0;_<ae.childNodes.length;_++)if(j(ae.childNodes[_]))return !0;return !1};j(V),N=L;}else {let L=document.createRange();L.setStart(V,0),L.setEnd(h.startContainer,h.startOffset),N=L.toString().length;}}catch{N=G.length;}R.current=N,O(G,N);},onKeyDown:U=>{if(d)return;let V=window.getSelection();if(!(!V||V.rangeCount===0))try{let J=V.getRangeAt(0),G=J.commonAncestorContainer;if(U.key==="ArrowLeft"||U.key==="ArrowRight"){let B=G.nodeType===Node.TEXT_NODE?G.parentElement?.closest("[data-chip-id]"):G.closest("[data-chip-id]");if(B){U.preventDefault();try{let N=document.createRange(),h=window.getSelection();U.key==="ArrowLeft"?N.setStartBefore(B):N.setStartAfter(B),N.collapse(!0),h?.removeAllRanges(),h?.addRange(N);}catch{}}}if(U.key==="Backspace"){let B=null;if(B=(G.nodeType===Node.TEXT_NODE?G.parentElement?.closest("[data-chip-id]"):G.closest("[data-chip-id]"))||null,!B)if(G.nodeType===Node.TEXT_NODE){let N=G;if(J.startOffset===0&&N.parentElement){let h=N.previousSibling;if(h&&h.nodeType===Node.ELEMENT_NODE){let L=h.closest("[data-chip-id]");L&&(B=L);}}}else {let N=G;if(J.startOffset>0){let h=N.childNodes[J.startOffset-1];if(h&&h.nodeType===Node.ELEMENT_NODE){let L=h.closest("[data-chip-id]");L&&(B=L);}}}if(B){U.preventDefault(),U.stopPropagation();let N=B.getAttribute("data-chip-id");if(!N)return;let h=`{{${N}}}`,L=m.indexOf(h);if(L!==-1){let A=m.slice(0,L)+m.slice(L+h.length),j=g.filter(ae=>ae.id!==N);R.current=L;try{window.getSelection()?.removeAllRanges();}catch{}f?.(j),p?.(A);}}}}catch{}},onFocus:U=>{d||(S.onFocus&&S.onFocus(U),k(U));},onBlur:U=>{d||(S.onBlur&&S.onBlur(U),M(U));},className:F(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...S.style},"data-placeholder":S.placeholder,children:Y()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Pe,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)})]})})}function AI({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.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 s0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:d=true,validationResult:l,className:c,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Ie(c,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(hn({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:p,className:AI({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(xe,{size:o,children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})}function l0({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function c0({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 jsxRuntime.jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsxRuntime.jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsxRuntime.jsx(H,{name:r,size:12,className:"text-background-body"})}),!n&&jsxRuntime.jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxRuntime.jsxs("div",{className:"flex-1 pb-6",children:[o&&jsxRuntime.jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsxRuntime.jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function OI(e){return "primary"}var zI="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",d0={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]"}},HI="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",GI="opacity-100 cursor-pointer",WI={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},UI={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function KI(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,d=OI(),l=`${zI} ${n?d0[d].selected:d0[d].unselected}`;return l+=` ${Je[r].text} ${Je[r].height} ${Je[r].padding} ${Je[r].gap}`,l+=` ${o?HI:GI}`,a==="left"&&(l+=" rounded-l-sm"),a==="right"&&(l+=" rounded-r-sm"),i&&(l+=" border-r"),s&&(l+=" border-l"),l+=` ${ot()}`,(l+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(l)}function p0(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:d,loadingIndicator:l,size:c="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(H,{name:n,size:c,weight:i}):null,x=()=>{let y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="left"&&f,r,a==="right"&&f]});return s?jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:l||jsxRuntime.jsx(H,{name:"CircleNotch",size:c,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:y}),d&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:d})]}):y},b=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(KI(e),t),"aria-busy":s,children:x()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[b,jsxRuntime.jsx("span",{className:`absolute ${WI[p]} flex h-5 w-5 items-center justify-center rounded-full ${UI[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var JI={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"}},XI={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}},qI=["energized","customerName","gs_max_continuous_current"],jI=["MOTOR.voltage"],QI=[{key:"total_kvar",label:"Rated kvar",format:{type:"power",unit:"kvar",decimals:1}}],ZI=[{key:"kvar_a",label:"kvar A",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_b",label:"kvar B",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_c",label:"kvar C",format:{type:"power",unit:"kvar",decimals:1}}],ct={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:"max_continuous_current",label:"Max Continuous Current",format:{type:"number",unit:"A",decimals:0}},{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"}},{key:"generator_system_size",label:"System Size",format:{type:"number",decimals:1}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}],DEVICE_LEADER:[],TRANSFORMER_BANK:[]},an={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"},insight:{icon:"LightbulbFilament",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Insight",plural:"Insights"},description:"Derived finding surfaced from platform data"},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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.SUPPORT_STRUCTURE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},deviceLeader:{icon:"FlowArrow",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:ct.DEVICE_LEADER},label:{singular:"Device Leader",plural:"Device Leaders"},description:"Cartographic leader line pointing an offset device symbol to its true location"},transformerBank:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:ct.TRANSFORMER_BANK},label:{singular:"Transformer Bank",plural:"Transformer Banks"},description:"Grouping of single-phase transformer units sharing a bank id"},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"}},m0=Object.freeze(Object.keys(an).filter(e=>an[e].category==="grid")),_I=new Set(m0);function $I(e){return typeof e=="string"&&_I.has(e)}var e5={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",deviceLeader:"DEVICE_LEADER",transformerBank:"TRANSFORMER_BANK"};function Ad(e){return an[e]}function t5(e){return an[e].icon}function r5(e,t=false){return t?an[e].label.plural:an[e].label.singular}function o5(e){return an[e].category}var n5={min:2,max:4};function a5(e){let t=an[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function i5(e){return Ad(e).detailPage}function s5(e){return (Ad(e).fields?.headlineMetrics.length??0)>0}function f0(e){return Ad(e).properties?.statList??[]}function l5(e){return f0(e).length>0}function c5({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:d,...l}){return jsxRuntime.jsx(yr,{title:d,primaryAction:{label:r,onPress:()=>{let u=document.getElementById(e);u&&u.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...l,children:jsxRuntime.jsx(bi,{id:e,onSubmit:t,children:s})})}function d5({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...d}){return jsxRuntime.jsx(ys,{primaryAction:{label:r,onPress:()=>{let c=document.getElementById(e);c&&c.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...d,children:jsxRuntime.jsx(bi,{id:e,onSubmit:t,className:"mt-2",children:s})})}function p5({align:e="end",className:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var g5={sm:"gap-2",md:"gap-4",lg:"gap-6"};function b5(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 h5({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",b5(e),g5[t],r)})}function v5({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",o),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(xr,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Pe,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function C5(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function S5({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",o),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,d=i<n,l=r&&(d||s);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!l,onClick:()=>l&&r?.(a.id),className:tailwindMerge.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",d&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!d&&!s&&"border-border-default bg-background-body text-text-secondary",l&&"cursor-pointer",!l&&"cursor-default"),"aria-current":s?"step":void 0,children:d?jsxRuntime.jsx(H,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsxRuntime.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)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",s&&"text-text-default",d&&"text-text-primary",!s&&!d&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function N5({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.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:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(re,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(re,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function T5({when:e,message:t="You have unsaved changes. Leave anyway?"}){return Ze__namespace.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 k5({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=Ze__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,d=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:d,next:async()=>!s||a===-1?false:d(e[a+1].id),prev:async()=>!i||a===-1?false:d(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Js(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function S0(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function R5(e,t){let r=Js(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 S0(r);case "isNotEmpty":return !S0(r);default:return false}}function w0(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?w0(e,o):R5(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function M5(e,t){return !t||t.conditions.length===0?e:e.filter(r=>w0(r,t))}function E5(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 L5(e,t){return t?[...e].sort((r,o)=>{let n=Js(r,t.field),a=Js(o,t.field);return E5(n,a,t.direction)}):e}function D5(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 P5__default.default(e,{keys:o,threshold:a,ignoreLocation:true,includeScore:true}).search(r).map(l=>l.item);let i=r.toLowerCase();return e.filter(s=>o.some(d=>{let l=Js(s,d);return l==null?false:String(l).toLowerCase().includes(i)}))}function A5(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=Js(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 pf({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=D5(e,o||null);a=M5(a,t||null);let i=A5(a,n);return a=L5(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function Fd({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return Ze.useMemo(()=>pf({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function Bd({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=bn(r,n),i=Ze.useRef(true);Ze.useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function N0(e){return e.mode==="client"?Fd({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(Bd({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 T0=vf(Sp());function O5(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 mf(e){return /^[=+\-@\t\r]/.test(e)?`'${e}`:e}function z5(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function k0(e,t){let r=z5(t,e);if(e.exportValue){let o=e.exportValue(r,t);return o==null?"":typeof o=="string"?mf(o):o}return r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?mf(JSON.stringify(r)):typeof r=="string"?mf(r):r}function ff(e){return e.filter(t=>t.exportable!==false)}function P0(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 gf(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=ff(t);if(n.length===0)throw new Error("No exportable columns found");P0(n);let a=r.map(l=>{let c={};for(let u of n){let m=u.exportLabel||u.label;c[m]=k0(u,l);}return c}),i=AP__default.default.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),d=O5(o.filename||"table-data","csv",o.timestamp!==!1);(0,T0.saveAs)(s,d);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function H5(e){let{columns:t,data:r}=e,o=ff(t);return P0(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=k0(i,n);}return a})}function G5(e){return ff(e).map(t=>t.exportLabel||t.label)}function R0({columns:e,data:t,metadata:r}){let n=e.filter(d=>d.exportable!==false).length>0&&t.length>0,[a,i]=Ze.useState(false);return {exportCSV:Ze.useCallback(async()=>{i(true);try{await gf({columns:e,data:t,metadata:r});}catch(d){throw console.error("Table export failed:",d),d}finally{i(false);}},[e,t,r]),canExport:n,isExporting:a}}function lce(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"}}Object.defineProperty(exports,"DialogTrigger",{enumerable:true,get:function(){return reactAriaComponents.DialogTrigger}});Object.defineProperty(exports,"Focusable",{enumerable:true,get:function(){return reactAriaComponents.Focusable}});exports.ABSENT_GRID_FIELDS=qI;exports.ActionCell=Ux;exports.ActionMenu=Qa;exports.ActivityFeed=Bu;exports.ActivityFeedGroup=fl;exports.ActivityItem=gl;exports.Alert=Jg;exports.AppShell=tb;exports.AreaSeries=kn;exports.AutoMobileRenderer=Lc;exports.Autocomplete=Nl;exports.Avatar=Yo;exports.BREAKPOINTS=Gn;exports.Badge=gt;exports.BadgeCell=Yx;exports.Banner=kl;exports.BarSeries=Ol;exports.BooleanCell=Jx;exports.BrandProvider=Lf;exports.BreadcrumbItem=Rl;exports.Breadcrumbs=Pl;exports.Button=re;exports.CATEGORICAL_RAMP=ad;exports.CATEGORY_COLOR_TOKENS=Xx;exports.CATEGORY_NEUTRAL_COLOR=gc;exports.CHART_HEADER_HEIGHT=Nu;exports.COLOR_RAMPS=Ms;exports.CUSTOM_ICON_REGISTRY=za;exports.Calendar=ti;exports.Card=_e;exports.CardContent=Ru;exports.CardFooter=Mu;exports.CardHeader=ll;exports.CardMedia=Pu;exports.CardMobileRenderer=Dc;exports.CarouselAutoplayTrigger=Eb;exports.CarouselControl=kb;exports.CarouselIndicator=op;exports.CarouselIndicatorGroup=Mb;exports.CarouselItem=Tb;exports.CarouselItemGroup=Nb;exports.CarouselNextTrigger=Rb;exports.CarouselPrevTrigger=Pb;exports.CarouselProgressText=Lb;exports.CarouselRoot=wb;exports.CategoryBarChart=mh;exports.CategoryCell=jx;exports.ChartAxis=Zr;exports.ChartBottomBar=li;exports.ChartContainer=Ih;exports.ChartContext=Qr;exports.ChartEventMarkers=Jl;exports.ChartEventSpans=Xl;exports.ChartExpandOwnedByAncestor=Pp;exports.ChartHeader=qa;exports.ChartLabelledBy=mn;exports.ChartOwnsItsTitle=kg;exports.ChartTooltip=ko;exports.Checkbox=io;exports.CheckboxGroup=np;exports.Chip=jr;exports.ChipInputField=Ob;exports.ClearButton=Yi;exports.CodeEditor=Gb;exports.Collapse=ri;exports.CollapseContent=Nn;exports.CollapseHeader=wn;exports.CollapseItem=Sn;exports.ColorField=Ak;exports.ColorModeProvider=Gf;exports.CommandPalette=Gy;exports.Confirm=Xb;exports.ConnectionStatusBadge=qb;exports.ContactCard=jb;exports.ContactMetaCell=Zx;exports.ContactMetaDisplay=Al;exports.ContainerQueryProvider=_b;exports.CopyToClipboard=xn;exports.CustomCell=_x;exports.DEFAULT_CHART_HEIGHT=Ah;exports.DEFAULT_MAP_TYPE=pd;exports.DIVERGING_RAMPS=nd;exports.DataControls=Ex;exports.DataTable=My;exports.DateCell=$x;exports.DateField=Bx;exports.DateRangePicker=cc;exports.DeltaCell=ey;exports.Description=Pe;exports.DeviceHealthBadge=Ly;exports.DeviceMetaCell=ry;exports.DeviceMetaDisplay=xc;exports.DeviceStateBadge=ga;exports.DeviceStateCell=ay;exports.DeviceStateWithMetric=Cc;exports.DeviceTypeIcon=Ay;exports.Dialog=yr;exports.DialogForm=c5;exports.DialogHeader=lr;exports.Drawer=ys;exports.DrawerForm=d5;exports.ENTITY_CATEGORY_CONFIG=XI;exports.ENTITY_CONFIG=an;exports.EmptyState=ec;exports.EnrollmentStatusBadge=Fy;exports.ErrorBoundary=ao;exports.FieldError=xe;exports.FieldGroup=nb;exports.FileUpload=Vy;exports.FilterChips=Lx;exports.FilterDialog=Hx;exports.FirmwareVersionBadge=zy;exports.Form=bi;exports.FormActions=p5;exports.FormDivider=C5;exports.FormGrid=h5;exports.FormSection=v5;exports.FormStepper=S5;exports.FormatRegistry=se;exports.FormattedCell=sy;exports.FunnelSeries=Oh;exports.GRID_ELEMENT_TYPE_BY_ENTITY=e5;exports.GRID_STATE_COLORS=JI;exports.GRID_STAT_LIST=ct;exports.GRID_STAT_LIST_CAPACITOR_PER_PHASE_KVAR=ZI;exports.GRID_STAT_LIST_CAPACITOR_TOTAL_KVAR=QI;exports.GlobalSearch=Ky;exports.Grid=vm;exports.GridStateBadge=vc;exports.HEADLINE_METRIC_BOUNDS=n5;exports.Heading=xr;exports.HierarchyExplorer=xv;exports.HorizontalBarCell=lm;exports.HoverCard=wL;exports.Icon=H;exports.IndexCell=dy;exports.InfiniteScrollIndicator=Xr;exports.Input=Cl;exports.InputWrapper=Nt;exports.InteractiveMap=As;exports.Kpi=Nv;exports.KpiGroup=Rm;exports.Label=qe;exports.LineSeries=na;exports.List=Ev;exports.ListBox=UL;exports.ListBoxItem=Cr;exports.ListItem=Dv;exports.ListPane=Av;exports.Loader=Jr;exports.Logo=_a;exports.MAP_TYPES=hC;exports.MapStyleProvider=bC;exports.Meter=SC;exports.MiniBarCell=cm;exports.ModalBackdrop=Dr;exports.MultiSelect=NC;exports.Notice=Sd;exports.NoticeContainer=wd;exports.NoticeProvider=kC;exports.NumberCell=my;exports.NumberField=ms;exports.PageBanner=gb;exports.PageLayout=La;exports.PercentBarCell=pm;exports.PieChart=Wh;exports.PlaceSearch=IC;exports.Popover=St;exports.ProgressBar=BC;exports.Prose=VC;exports.Radio=WC;exports.RadioCard=OC;exports.RadioCardGroup=zC;exports.RadioGroup=GC;exports.RangeCalendar=pi;exports.RangeCell=by;exports.ResultsCount=cs;exports.RichTextEditor=YC;exports.SEQUENTIAL_RAMPS=od;exports.SKELETON_SIZES=Dn;exports.SOURCE_UNIT_TO_WH=iu;exports.SaveBar=N5;exports.SearchControl=ua;exports.SearchEmptyState=Yy;exports.SearchLoadingState=Xy;exports.SearchResultGroup=jy;exports.SearchResultItem=Qy;exports.SearchResultsList=Zy;exports.SearchTrigger=$y;exports.Section=ki;exports.SectionNav=Td;exports.SegmentedControl=oc;exports.Select=Ko;exports.SelectCell=kc;exports.SideNav=hl;exports.SiteCard=JC;exports.SiteContactCard=qC;exports.SiteMetaCell=xy;exports.SiteMetaDisplay=Pc;exports.Skeleton=q;exports.Slider=jC;exports.SortControl=ds;exports.SparklineCell=mm;exports.SplitPane=Dd;exports.StackNav=$a;exports.StatList=Gc;exports.StaticMap=Ti;exports.Switch=dc;exports.Tab=Ed;exports.TabList=Md;exports.TabPanel=LC;exports.Tabs=Rd;exports.TextArea=t0;exports.TextAreaWithChips=a0;exports.TextCell=Sy;exports.TextField=$r;exports.TextLink=pt;exports.TiledTimeSeriesChart=_l;exports.TiledTimeSeriesExplorer=kx;exports.TimeControls=nc;exports.TimeField=s0;exports.Timeline=l0;exports.TimelineItem=c0;exports.ToggleButton=p0;exports.Tooltip=tr;exports.TopNav=Ki;exports.Tray=wt;exports.UNARY_FILTER_OPERATORS=Dx;exports.UNARY_OPERATOR_LABELS=Ix;exports.UNVERIFIED_VOLTAGE_UNIT_ROWS=jI;exports.UnsavedChangesPrompt=T5;exports.activeDeviceStates=J2;exports.addFilterCondition=Ln;exports.applyDataOperations=pf;exports.archetypeFor=a5;exports.assembleSeries=ax;exports.autoScaleCurrent=jS;exports.autoScaleDistance=Qf;exports.autoScaleEnergy=eg;exports.autoScalePower=ow;exports.autoScaleResistance=nw;exports.autoScaleVoltage=uw;exports.baselineFromPoint=fP;exports.camelCaseToWords=bg;exports.capitalize=fg;exports.celsiusToFahrenheit=aw;exports.celsiusToKelvin=OF;exports.centimetersToInches=yF;exports.classicPresetRanges=mx;exports.clearColorCache=Zs;exports.createCategoryColorMap=LS;exports.createEmptyFilter=us;exports.createFilter=o2;exports.createFilters=n2;exports.createFormat=u3;exports.createTextureIcon=ft;exports.createTiledCameraSyncGroup=Uh;exports.createXScale=hp;exports.createYScale=Zi;exports.csvUnitFor=xu;exports.csvValueFor=yg;exports.defaultMargin=Ye;exports.defaultMultiSelectMatcher=_m;exports.deltaDirectionFromValue=nm;exports.deviceStateLabels=X2;exports.deviceStateMetricFormats=YX;exports.emptyStore=zp;exports.entityHasDetailPage=i5;exports.entityHasStatList=l5;exports.entityShowsNow=s5;exports.enumToSentenceCase=cw;exports.exportChart=Np;exports.exportTableAsCSV=gf;exports.fahrenheitToCelsius=iw;exports.fahrenheitToKelvin=zF;exports.feetToMeters=dF;exports.feetToMiles=mF;exports.filterMultiSelectOptions=gd;exports.filterToChips=a2;exports.formatBoolean=Wf;exports.formatCapacity=W4;exports.formatComponentValue=yo;exports.formatCurrency=Xf;exports.formatCurrent=Zd;exports.formatDate=qf;exports.formatDistance=Zf;exports.formatEmptyValue=mc;exports.formatEnergy=su;exports.formatFieldValue=Ar;exports.formatInternationalPhone=lu;exports.formatNumber=Jf;exports.formatPercent=Kf;exports.formatPhone=tg;exports.formatPhoneNumber=Wa;exports.formatPower=pu;exports.formatPowerRating=U4;exports.formatResistance=fu;exports.formatTemperature=cg;exports.formatText=xg;exports.formatUSPhone=rl;exports.formatVoltage=hu;exports.getBadgeClasses=Gx;exports.getBooleanBadgeVariant=Wx;exports.getCellAlignmentClasses=rm;exports.getCellContainerClasses=Se;exports.getCellTextClasses=Rr;exports.getColorRamp=Um;exports.getColorRampsByKind=Km;exports.getContrastingTextColor=DS;exports.getDateParts=nF;exports.getDefaultChartColor=Di;exports.getDefaultColors=_s;exports.getDeviceStateDisplayLabel=im;exports.getDeviceStateLabel=im;exports.getEntityCategory=o5;exports.getEntityConfig=Ad;exports.getEntityIcon=t5;exports.getEntityLabel=r5;exports.getEntityStatList=f0;exports.getEventColor=Xo;exports.getExportFormatName=OP;exports.getExportHeaders=G5;exports.getFieldGroupStyles=FN;exports.getFilterFields=ma;exports.getGridStateLabel=ny;exports.getInputBackgroundStyles=ob;exports.getInputBaseStyles=Yt;exports.getInputStateStyles=hn;exports.getLinkClasses=om;exports.getNumericColorClasses=fc;exports.getResolvedColor=Wt;exports.getSkeletonSize=Pt;exports.getStateTone=lce;exports.getThemeCategoricalColors=Wo;exports.getYFormatSettings=Or;exports.gridEntityTypeKeys=m0;exports.gridStateLabels=j2;exports.hasTileData=la;exports.inchesToCentimeters=xF;exports.isActiveDeviceState=am;exports.isActiveState=am;exports.isCustomPinsLayer=Hm;exports.isExportSupported=VP;exports.isFilterEmpty=lc;exports.isGeoJsonLayer=zm;exports.isGridEntityTypeKey=$I;exports.isLightColor=Af;exports.isNil=he;exports.isRasterLayer=Gm;exports.isUnaryFilterOperator=Ax;exports.isVectorLayer=Om;exports.kelvinToCelsius=sw;exports.kelvinToFahrenheit=HF;exports.kilometersToMiles=pF;exports.layer=Vm;exports.mapValuesToCategoricalColors=Ai;exports.metersToFeet=cF;exports.metersToMiles=fF;exports.metersToYards=hF;exports.milesToFeet=jf;exports.milesToKilometers=uF;exports.milesToMeters=gF;exports.multiSelectSearchKeys=$m;exports.multiSelectSelectionEntries=hd;exports.parseBoolean=dn;exports.percentThresholdLevel=um;exports.pickEnergyUnit=au;exports.prepareTableDataForExport=H5;exports.registerPhosphorIcon=vC;exports.removeFilterCondition=pa;exports.resolveValue=me;exports.shouldOfferLiteralOption=bd;exports.snakeCaseToWords=hg;exports.telemetryPresetRanges=tc;exports.temperatureStringToSymbol=ng;exports.tierForViewport=$l;exports.tileIndexAt=tR;exports.tileKey=or;exports.tileReducer=ix;exports.tilesForViewport=jo;exports.toA=$4;exports.toActiveInactive=HS;exports.toAmps=el;exports.toBoolean=cn;exports.toCelsius=ig;exports.toCentimeters=ew;exports.toCheckmark=WS;exports.toCompactNumber=JS;exports.toCurrency=Yf;exports.toCustomDateFormat=$S;exports.toDateString=QS;exports.toEnabledDisabled=OS;exports.toFahrenheit=ag;exports.toFeet=eu;exports.toFloat=KS;exports.toFormattedNumber=YS;exports.toFullDateTime=ZS;exports.toGW=LF;exports.toGWh=$f;exports.toGigawatts=uu;exports.toISOString=_S;exports.toInches=rw;exports.toInteger=US;exports.toKA=eF;exports.toKV=qF;exports.toKW=MF;exports.toKelvin=sg;exports.toKiloamps=Qd;exports.toKilohms=rg;exports.toKilometers=$d;exports.toKilovolts=bu;exports.toKilowatts=cu;exports.toLowerCase=ug;exports.toMA=_4;exports.toMV=JF;exports.toMW=EF;exports.toMWh=_f;exports.toMegawatts=du;exports.toMegohms=og;exports.toMeters=_d;exports.toMiles=tu;exports.toMilliamps=jd;exports.toMillimeters=tw;exports.toMilliohms=mu;exports.toMillivolts=gu;exports.toNauticalMiles=lF;exports.toOhms=nl;exports.toOnOff=zS;exports.toPercentage=Uf;exports.toRelativeTime=tl;exports.toScientificNotation=XS;exports.toSecret=dw;exports.toSentenceCase=pg;exports.toTemperature=lg;exports.toTitleCase=mg;exports.toTrueFalse=GS;exports.toUpperCase=dg;exports.toV=XF;exports.toVolts=sl;exports.toW=RF;exports.toWatts=ol;exports.toWh=ou;exports.toYards=ru;exports.tokWh=nu;exports.truncateEnd=il;exports.truncateMiddle=Ua;exports.truncateStart=al;exports.typeRole=Mt;exports.typographyRole=vo;exports.ucFirst=gg;exports.useBreakpoint=gr;exports.useChartContext=ta;exports.useChartExpand=oa;exports.useChartHeaderMetrics=Xa;exports.useChartOwnsItsTitle=Pg;exports.useClientDataControls=Fd;exports.useColorMode=er;exports.useComponentFormatter=X4;exports.useContainerBreakpoint=Qb;exports.useDataControls=N0;exports.useDebounce=bn;exports.useElementSize=ei;exports.useInfiniteScroll=fn;exports.useInputFocus=vr;exports.useLocalStorage=_c;exports.useMapStyleOverride=Si;exports.useMediaQuery=fr;exports.useNotice=RC;exports.useServerDataControls=Bd;exports.useTableExport=R0;exports.useTileWindow=ux;exports.useTiledTimeSeries=Gp;exports.useWizard=k5;exports.wrapWithLink=Do;exports.yardsToMeters=bF;//# sourceMappingURL=index.cjs.map
136
+ `).map((B,L)=>jsxRuntime.jsxs(Ze__namespace.default.Fragment,{children:[B,L<V.split(`
137
+ `).length-1&&jsxRuntime.jsx("br",{})]},`line-${J}-${L}`)):V}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx("div",{ref:N,contentEditable:!d,suppressContentEditableWarning:true,onInput:U=>{if(d)return;let V=U.target,J=V.querySelector("[data-chip-id]")!==null,G;if(J?(G=I(V),G=G.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):G=V.textContent||"",G===""){try{let b=document.createRange();b.selectNodeContents(V),b.collapse(!0);let M=window.getSelection();M?.removeAllRanges(),M?.addRange(b),P.current=0;}catch{}O("",0);return}if(G===m)return;let B=window.getSelection(),L=0;if(B&&B.rangeCount>0)try{let b=B.getRangeAt(0);if(J){let M=0,D=!1,q=ae=>{if(D)return !0;if(ae===b.startContainer)return M+=b.startOffset,D=!0,!0;if(ae.nodeType===Node.TEXT_NODE){if(!ae.parentElement?.closest("[data-chip-id]")){if(ae.contains(b.startContainer))return M+=b.startOffset,D=!0,!0;M+=(ae.textContent||"").length;}}else if(ae.nodeType===Node.ELEMENT_NODE){let _=ae;if(_.hasAttribute("data-chip-id")){if(_.contains(b.startContainer)||_===b.startContainer){let ie=_.getAttribute("data-chip-id");return M+=`{{${ie}}}`.length,D=!0,!0}let ee=_.getAttribute("data-chip-id");return M+=`{{${ee}}}`.length,!1}else if(_.tagName==="BR")return _===b.startContainer?(D=!0,!0):(M+=1,!1)}for(let _=0;_<ae.childNodes.length;_++)if(q(ae.childNodes[_]))return !0;return !1};q(V),L=M;}else {let M=document.createRange();M.setStart(V,0),M.setEnd(b.startContainer,b.startOffset),L=M.toString().length;}}catch{L=G.length;}P.current=L,O(G,L);},onKeyDown:U=>{if(d)return;let V=window.getSelection();if(!(!V||V.rangeCount===0))try{let J=V.getRangeAt(0),G=J.commonAncestorContainer;if(U.key==="ArrowLeft"||U.key==="ArrowRight"){let B=G.nodeType===Node.TEXT_NODE?G.parentElement?.closest("[data-chip-id]"):G.closest("[data-chip-id]");if(B){U.preventDefault();try{let L=document.createRange(),b=window.getSelection();U.key==="ArrowLeft"?L.setStartBefore(B):L.setStartAfter(B),L.collapse(!0),b?.removeAllRanges(),b?.addRange(L);}catch{}}}if(U.key==="Backspace"){let B=null;if(B=(G.nodeType===Node.TEXT_NODE?G.parentElement?.closest("[data-chip-id]"):G.closest("[data-chip-id]"))||null,!B)if(G.nodeType===Node.TEXT_NODE){let L=G;if(J.startOffset===0&&L.parentElement){let b=L.previousSibling;if(b&&b.nodeType===Node.ELEMENT_NODE){let M=b.closest("[data-chip-id]");M&&(B=M);}}}else {let L=G;if(J.startOffset>0){let b=L.childNodes[J.startOffset-1];if(b&&b.nodeType===Node.ELEMENT_NODE){let M=b.closest("[data-chip-id]");M&&(B=M);}}}if(B){U.preventDefault(),U.stopPropagation();let L=B.getAttribute("data-chip-id");if(!L)return;let b=`{{${L}}}`,M=m.indexOf(b);if(M!==-1){let D=m.slice(0,M)+m.slice(M+b.length),q=g.filter(ae=>ae.id!==L);P.current=M;try{window.getSelection()?.removeAllRanges();}catch{}f?.(q),p?.(D);}}}}catch{}},onFocus:U=>{d||(S.onFocus&&S.onFocus(U),T(U));},onBlur:U=>{d||(S.onBlur&&S.onBlur(U),E(U));},className:F(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...S.style},"data-placeholder":S.placeholder,children:Y()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Pe,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(u)})]})})}function VI({isPlaceholder:e,isDisabled:t,size:r="md"}){return tailwindMerge.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 f0({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:d=true,validationResult:c,className:l,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:Ie(l,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(qe,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(Nt,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(xn({isInvalid:s,isDisabled:i}),"px-3 py-2 flex items-center gap-0.5 w-full"),children:p=>jsxRuntime.jsx(reactAriaComponents.DateSegment,{segment:p,className:VI({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),d?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,children:r}):typeof r=="function"&&c?jsxRuntime.jsx(xe,{size:o,children:r(c)}):t&&u==="below"?jsxRuntime.jsx(Pe,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r}):typeof r=="function"&&c?jsxRuntime.jsx(xe,{size:o,className:"mt-1",children:r(c)}):t&&u==="below"?jsxRuntime.jsx(Pe,{size:o,className:"mt-1",children:t}):null})]})}function g0({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function b0({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 jsxRuntime.jsxs("div",{className:`flex gap-3 ${a}`.trim(),role:"listitem",children:[jsxRuntime.jsxs("div",{className:"flex flex-col items-center",style:{width:"20px"},children:[jsxRuntime.jsx("div",{className:`flex items-center justify-center rounded-full border-2 ${s.dot}`,style:{width:"20px",height:"20px",flexShrink:0},children:r&&jsxRuntime.jsx(H,{name:r,size:12,className:"text-background-body"})}),!n&&jsxRuntime.jsx("div",{className:`w-0.5 flex-1 ${s.line}`,style:{minHeight:"24px"}})]}),jsxRuntime.jsxs("div",{className:"flex-1 pb-6",children:[o&&jsxRuntime.jsx("div",{className:`text-xs mb-1 ${s.label}`,children:o}),jsxRuntime.jsx("div",{className:`text-sm ${s.content}`,children:e})]})]})}function WI(e){return "primary"}var UI="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",h0={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]"}},KI="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",YI="opacity-100 cursor-pointer",JI={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},XI={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function qI(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,d=WI(),c=`${UI} ${n?h0[d].selected:h0[d].unselected}`;return c+=` ${Je[r].text} ${Je[r].height} ${Je[r].padding} ${Je[r].gap}`,c+=` ${o?KI:YI}`,a==="left"&&(c+=" rounded-l-sm"),a==="right"&&(c+=" rounded-r-sm"),i&&(c+=" border-r"),s&&(c+=" border-l"),c+=` ${ot()}`,(c+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(c)}function y0(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:d,loadingIndicator:c,size:l="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(H,{name:n,size:l,weight:i}):null,x=()=>{let y=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[a==="left"&&f,r,a==="right"&&f]});return s?jsxRuntime.jsxs("div",{className:"relative inline-flex items-center justify-center",children:[jsxRuntime.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:c||jsxRuntime.jsx(H,{name:"CircleNotch",size:l,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:y}),d&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:d})]}):y},h=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(qI(e),t),"aria-busy":s,children:x()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[h,jsxRuntime.jsx("span",{className:`absolute ${JI[p]} flex h-5 w-5 items-center justify-center rounded-full ${XI[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):h}var QI={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"}},ZI={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}},_I=["energized","customerName","gs_max_continuous_current"],$I=["MOTOR.voltage"],e5=[{key:"total_kvar",label:"Rated kvar",format:{type:"power",unit:"kvar",decimals:1}}],t5=[{key:"kvar_a",label:"kvar A",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_b",label:"kvar B",format:{type:"power",unit:"kvar",decimals:1}},{key:"kvar_c",label:"kvar C",format:{type:"power",unit:"kvar",decimals:1}}],ct={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:"max_continuous_current",label:"Max Continuous Current",format:{type:"number",unit:"A",decimals:0}},{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"}},{key:"generator_system_size",label:"System Size",format:{type:"number",decimals:1}}],MOTOR:[{key:"ratedPower",label:"Rated Power",format:{type:"power",unit:"kW",decimals:1}},{key:"voltage",label:"Voltage",format:{type:"voltage",unit:"V",decimals:0}}],DEVICE_LEADER:[],TRANSFORMER_BANK:[]},an={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"},insight:{icon:"LightbulbFilament",category:"platform",archetype:"platform",detailPage:false,label:{singular:"Insight",plural:"Insights"},description:"Derived finding surfaced from platform data"},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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.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:ct.SUPPORT_STRUCTURE},label:{singular:"Support Structure",plural:"Support Structures"},description:"Structure carrying overhead line equipment"},deviceLeader:{icon:"FlowArrow",category:"grid",archetype:"grid-line",detailPage:true,properties:{statList:ct.DEVICE_LEADER},label:{singular:"Device Leader",plural:"Device Leaders"},description:"Cartographic leader line pointing an offset device symbol to its true location"},transformerBank:{icon:"TextureTransformer",category:"grid",archetype:"grid-energized",detailPage:true,properties:{statList:ct.TRANSFORMER_BANK},label:{singular:"Transformer Bank",plural:"Transformer Banks"},description:"Grouping of single-phase transformer units sharing a bank id"},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"}},v0=Object.freeze(Object.keys(an).filter(e=>an[e].category==="grid")),r5=new Set(v0);function o5(e){return typeof e=="string"&&r5.has(e)}var n5={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",deviceLeader:"DEVICE_LEADER",transformerBank:"TRANSFORMER_BANK"};function Fd(e){return an[e]}function a5(e){return an[e].icon}function i5(e,t=false){return t?an[e].label.plural:an[e].label.singular}function s5(e){return an[e].category}var l5={min:2,max:4};function c5(e){let t=an[e];if(!t)throw new Error(`archetypeFor: unknown entity type "${String(e)}"`);return t.archetype}function d5(e){return Fd(e).detailPage}function u5(e){return (Fd(e).fields?.headlineMetrics.length??0)>0}function C0(e){return Fd(e).properties?.statList??[]}function p5(e){return C0(e).length>0}function m5({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:d,...c}){return jsxRuntime.jsx(yr,{title:d,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:jsxRuntime.jsx(bi,{id:e,onSubmit:t,children:s})})}function f5({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...d}){return jsxRuntime.jsx(ys,{primaryAction:{label:r,onPress:()=>{let l=document.getElementById(e);l&&l.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...d,children:jsxRuntime.jsx(bi,{id:e,onSubmit:t,className:"mt-2",children:s})})}function b5({align:e="end",className:t,...r}){return jsxRuntime.jsx("div",{...r,className:tailwindMerge.twMerge("flex gap-2",e==="start"?"justify-start":e==="between"?"justify-between":"justify-end",t)})}var y5={sm:"gap-2",md:"gap-4",lg:"gap-6"};function v5(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 C5({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",v5(e),y5[t],r)})}function N5({title:e,description:t,showDivider:r,className:o,children:n,...a}){return jsxRuntime.jsxs("section",{...a,className:tailwindMerge.twMerge("flex flex-col",o),children:[(e||t)&&jsxRuntime.jsxs("div",{className:"flex flex-col gap-1 mb-6",children:[typeof e=="string"?jsxRuntime.jsx(xr,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Pe,{size:"lg",children:t}):null]}),jsxRuntime.jsx("div",{className:"flex flex-col gap-6",children:n}),r&&jsxRuntime.jsx("hr",{className:"mt-2 border-border-muted"})]})}function T5(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function k5({steps:e,currentStepId:t,onStepClick:r,className:o}){let n=e.findIndex(a=>a.id===t);return jsxRuntime.jsx("nav",{"aria-label":"Progress",className:tailwindMerge.twMerge("w-full",o),children:jsxRuntime.jsx("div",{className:"relative mb-12",children:jsxRuntime.jsx("ol",{className:"relative flex items-start justify-between",children:e.map((a,i)=>{let s=a.id===t,d=i<n,c=r&&(d||s);return jsxRuntime.jsxs("li",{className:"relative flex flex-col items-center",style:{flex:`1 1 ${100/e.length}%`},children:[jsxRuntime.jsx("button",{type:"button",disabled:!c,onClick:()=>c&&r?.(a.id),className:tailwindMerge.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",d&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!d&&!s&&"border-border-default bg-background-body text-text-secondary",c&&"cursor-pointer",!c&&"cursor-default"),"aria-current":s?"step":void 0,children:d?jsxRuntime.jsx(H,{name:"Check",size:20,weight:"bold"}):jsxRuntime.jsx("span",{className:"text-sm font-semibold",children:i+1})}),i<e.length-1&&jsxRuntime.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)"}}),jsxRuntime.jsxs("div",{className:"mt-3 flex flex-col items-center text-center w-32",children:[jsxRuntime.jsx("span",{className:tailwindMerge.twMerge("text-sm font-medium",s&&"text-text-default",d&&"text-text-primary",!s&&!d&&"text-text-secondary"),children:a.title}),a.description&&jsxRuntime.jsx("span",{className:"mt-1 text-xs text-text-secondary",children:a.description})]})]},a.id)})})})})}function R5({formId:e,show:t,isSubmitting:r,onCancel:o,primaryLabel:n="Save changes",secondaryLabel:a="Cancel",className:i}){return t?jsxRuntime.jsx("div",{className:tailwindMerge.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:jsxRuntime.jsxs("div",{className:"mx-auto flex max-w-screen-lg items-center justify-between gap-3 p-3",children:[jsxRuntime.jsx("div",{className:"text-sm text-text-secondary",children:"You have unsaved changes"}),jsxRuntime.jsxs("div",{className:"flex gap-2",children:[jsxRuntime.jsx(re,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(re,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function E5({when:e,message:t="You have unsaved changes. Leave anyway?"}){return Ze__namespace.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 M5({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=Ze__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,d=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:d,next:async()=>!s||a===-1?false:d(e[a+1].id),prev:async()=>!i||a===-1?false:d(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Js(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function E0(e){return e==null?true:Array.isArray(e)?e.length===0:typeof e=="string"?e.trim()==="":false}function D5(e,t){let r=Js(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 E0(r);case "isNotEmpty":return !E0(r);default:return false}}function M0(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?M0(e,o):D5(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function A5(e,t){return !t||t.conditions.length===0?e:e.filter(r=>M0(r,t))}function I5(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 F5(e,t){return t?[...e].sort((r,o)=>{let n=Js(r,t.field),a=Js(o,t.field);return I5(n,a,t.direction)}):e}function B5(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 L5__default.default(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(d=>{let c=Js(s,d);return c==null?false:String(c).toLowerCase().includes(i)}))}function V5(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=Js(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 mf({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=B5(e,o||null);a=A5(a,t||null);let i=V5(a,n);return a=F5(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function Vd({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return Ze.useMemo(()=>mf({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function Od({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=hn(r,n),i=Ze.useRef(true);Ze.useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function L0(e){return e.mode==="client"?Vd({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(Od({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 D0=Cf(Np());function W5(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 ff(e){return /^[=+\-@\t\r]/.test(e)?`'${e}`:e}function U5(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function A0(e,t){let r=U5(t,e);if(e.exportValue){let o=e.exportValue(r,t);return o==null?"":typeof o=="string"?ff(o):o}return r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?ff(JSON.stringify(r)):typeof r=="string"?ff(r):r}function gf(e){return e.filter(t=>t.exportable!==false)}function I0(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 bf(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=gf(t);if(n.length===0)throw new Error("No exportable columns found");I0(n);let a=r.map(c=>{let l={};for(let u of n){let m=u.exportLabel||u.label;l[m]=A0(u,c);}return l}),i=BP__default.default.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),d=W5(o.filename||"table-data","csv",o.timestamp!==!1);(0,D0.saveAs)(s,d);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function K5(e){let{columns:t,data:r}=e,o=gf(t);return I0(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=A0(i,n);}return a})}function Y5(e){return gf(e).map(t=>t.exportLabel||t.label)}function F0({columns:e,data:t,metadata:r}){let n=e.filter(d=>d.exportable!==false).length>0&&t.length>0,[a,i]=Ze.useState(false);return {exportCSV:Ze.useCallback(async()=>{i(true);try{await bf({columns:e,data:t,metadata:r});}catch(d){throw console.error("Table export failed:",d),d}finally{i(false);}},[e,t,r]),canExport:n,isExporting:a}}function pce(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"}}Object.defineProperty(exports,"DialogTrigger",{enumerable:true,get:function(){return reactAriaComponents.DialogTrigger}});Object.defineProperty(exports,"Focusable",{enumerable:true,get:function(){return reactAriaComponents.Focusable}});exports.ABSENT_GRID_FIELDS=_I;exports.ActionCell=Qx;exports.ActionMenu=Qa;exports.ActivityFeed=Ou;exports.ActivityFeedGroup=gl;exports.ActivityItem=bl;exports.Alert=$g;exports.AppShell=lb;exports.AreaSeries=Pn;exports.AutoMobileRenderer=Ac;exports.Autocomplete=Tl;exports.Avatar=Yo;exports.BREAKPOINTS=Wn;exports.Badge=gt;exports.BadgeCell=_x;exports.Banner=Pl;exports.BarSeries=zl;exports.BooleanCell=$x;exports.BrandProvider=Df;exports.BreadcrumbItem=El;exports.Breadcrumbs=Rl;exports.Button=re;exports.CATEGORICAL_RAMP=sd;exports.CATEGORY_COLOR_TOKENS=ey;exports.CATEGORY_NEUTRAL_COLOR=hc;exports.CHART_HEADER_HEIGHT=ku;exports.COLOR_RAMPS=Es;exports.CUSTOM_ICON_REGISTRY=Ha;exports.Calendar=ti;exports.Card=_e;exports.CardContent=Mu;exports.CardFooter=Lu;exports.CardHeader=cl;exports.CardMedia=Eu;exports.CardMobileRenderer=Ic;exports.CarouselAutoplayTrigger=Vb;exports.CarouselControl=Ab;exports.CarouselIndicator=ap;exports.CarouselIndicatorGroup=Bb;exports.CarouselItem=Db;exports.CarouselItemGroup=Lb;exports.CarouselNextTrigger=Fb;exports.CarouselPrevTrigger=Ib;exports.CarouselProgressText=Ob;exports.CarouselRoot=Mb;exports.CategoryBarChart=vh;exports.CategoryCell=ry;exports.ChartAxis=Zr;exports.ChartBottomBar=li;exports.ChartContainer=Gh;exports.ChartContext=Qr;exports.ChartEventMarkers=Xl;exports.ChartEventSpans=ql;exports.ChartExpandOwnedByAncestor=Ep;exports.ChartHeader=qa;exports.ChartLabelledBy=fn;exports.ChartOwnsItsTitle=Ag;exports.ChartTooltip=ko;exports.Checkbox=io;exports.CheckboxGroup=ip;exports.Chip=jr;exports.ChipInputField=Yb;exports.ClearButton=Yi;exports.CodeEditor=qb;exports.Collapse=ri;exports.CollapseContent=Tn;exports.CollapseHeader=Nn;exports.CollapseItem=wn;exports.ColorField=Bk;exports.ColorModeProvider=Wf;exports.CommandPalette=qy;exports.Confirm=eh;exports.ConnectionStatusBadge=th;exports.ContactCard=rh;exports.ContactMetaCell=ny;exports.ContactMetaDisplay=Il;exports.ContainerQueryProvider=ah;exports.CopyToClipboard=yn;exports.CustomCell=ay;exports.DEFAULT_CHART_HEIGHT=Hh;exports.DEFAULT_MAP_TYPE=fd;exports.DIVERGING_RAMPS=id;exports.DataControls=Vx;exports.DataTable=By;exports.DateCell=iy;exports.DateField=Ux;exports.DateRangePicker=uc;exports.DeltaCell=sy;exports.Description=Pe;exports.DeviceHealthBadge=Oy;exports.DeviceMetaCell=cy;exports.DeviceMetaDisplay=vc;exports.DeviceStateBadge=ba;exports.DeviceStateCell=py;exports.DeviceStateWithMetric=wc;exports.DeviceTypeIcon=Hy;exports.Dialog=yr;exports.DialogForm=m5;exports.DialogHeader=lr;exports.Drawer=ys;exports.DrawerForm=f5;exports.ENTITY_CATEGORY_CONFIG=ZI;exports.ENTITY_CONFIG=an;exports.EmptyState=tc;exports.EnrollmentStatusBadge=Wy;exports.ErrorBoundary=ao;exports.FieldError=xe;exports.FieldGroup=ub;exports.FileUpload=Ky;exports.FilterChips=Ox;exports.FilterDialog=Xx;exports.FirmwareVersionBadge=Jy;exports.Form=bi;exports.FormActions=b5;exports.FormDivider=T5;exports.FormGrid=C5;exports.FormSection=N5;exports.FormStepper=k5;exports.FormatRegistry=se;exports.FormattedCell=fy;exports.FunnelSeries=Yh;exports.GRID_ELEMENT_TYPE_BY_ENTITY=n5;exports.GRID_STATE_COLORS=QI;exports.GRID_STAT_LIST=ct;exports.GRID_STAT_LIST_CAPACITOR_PER_PHASE_KVAR=t5;exports.GRID_STAT_LIST_CAPACITOR_TOTAL_KVAR=e5;exports.GlobalSearch=Zy;exports.Grid=Cm;exports.GridStateBadge=Sc;exports.HEADLINE_METRIC_BOUNDS=l5;exports.Heading=xr;exports.HierarchyExplorer=Tv;exports.HorizontalBarCell=cm;exports.HoverCard=PL;exports.Icon=H;exports.IndexCell=hy;exports.InfiniteScrollIndicator=Xr;exports.Input=Sl;exports.InputWrapper=Nt;exports.InteractiveMap=As;exports.Kpi=Lv;exports.KpiGroup=Em;exports.Label=qe;exports.LineSeries=aa;exports.List=Vv;exports.ListBox=XL;exports.ListBoxItem=Cr;exports.ListItem=zv;exports.ListPane=Hv;exports.Loader=Jr;exports.Logo=_a;exports.MAP_TYPES=NC;exports.MapStyleProvider=wC;exports.Meter=EC;exports.MiniBarCell=dm;exports.ModalBackdrop=Dr;exports.MultiSelect=LC;exports.Notice=Nd;exports.NoticeContainer=Td;exports.NoticeProvider=AC;exports.NumberCell=vy;exports.NumberField=ms;exports.PageBanner=Sb;exports.PageLayout=Da;exports.PercentBarCell=mm;exports.PieChart=jh;exports.PlaceSearch=GC;exports.Popover=St;exports.ProgressBar=UC;exports.Prose=KC;exports.Radio=jC;exports.RadioCard=YC;exports.RadioCardGroup=JC;exports.RadioGroup=qC;exports.RangeCalendar=pi;exports.RangeCell=wy;exports.ResultsCount=cs;exports.RichTextEditor=_C;exports.SEQUENTIAL_RAMPS=ad;exports.SKELETON_SIZES=An;exports.SOURCE_UNIT_TO_WH=lu;exports.SaveBar=R5;exports.SearchControl=pa;exports.SearchEmptyState=_y;exports.SearchLoadingState=ev;exports.SearchResultGroup=rv;exports.SearchResultItem=ov;exports.SearchResultsList=nv;exports.SearchTrigger=iv;exports.Section=ki;exports.SectionNav=Pd;exports.SegmentedControl=nc;exports.Select=Ko;exports.SelectCell=Rc;exports.SideNav=xl;exports.SiteCard=$C;exports.SiteContactCard=t0;exports.SiteMetaCell=Ty;exports.SiteMetaDisplay=Ec;exports.Skeleton=j;exports.Slider=r0;exports.SortControl=ds;exports.SparklineCell=fm;exports.SplitPane=Id;exports.StackNav=$a;exports.StatList=Uc;exports.StaticMap=Ti;exports.Switch=pc;exports.Tab=Dd;exports.TabList=Ld;exports.TabPanel=OC;exports.Tabs=Md;exports.TextArea=l0;exports.TextAreaWithChips=p0;exports.TextCell=Ey;exports.TextField=$r;exports.TextLink=pt;exports.TiledTimeSeriesChart=$l;exports.TiledTimeSeriesExplorer=Ax;exports.TimeControls=ac;exports.TimeField=f0;exports.Timeline=g0;exports.TimelineItem=b0;exports.ToggleButton=y0;exports.Tooltip=tr;exports.TopNav=Ki;exports.Tray=wt;exports.UNARY_FILTER_OPERATORS=zx;exports.UNARY_OPERATOR_LABELS=Gx;exports.UNVERIFIED_VOLTAGE_UNIT_ROWS=$I;exports.UnsavedChangesPrompt=E5;exports.activeDeviceStates=Q2;exports.addFilterCondition=Dn;exports.applyDataOperations=mf;exports.archetypeFor=c5;exports.assembleSeries=px;exports.autoScaleCurrent=rw;exports.autoScaleDistance=Zf;exports.autoScaleEnergy=tg;exports.autoScalePower=dw;exports.autoScaleResistance=uw;exports.autoScaleVoltage=xw;exports.baselineFromPoint=hP;exports.camelCaseToWords=hg;exports.capitalize=gg;exports.celsiusToFahrenheit=pw;exports.celsiusToKelvin=WF;exports.centimetersToInches=wF;exports.classicPresetRanges=vx;exports.clearColorCache=Zs;exports.createCategoryColorMap=OS;exports.createEmptyFilter=us;exports.createFilter=s2;exports.createFilters=l2;exports.createFormat=g3;exports.createTextureIcon=ft;exports.createTiledCameraSyncGroup=Qh;exports.createXScale=yp;exports.createYScale=Zi;exports.csvUnitFor=vu;exports.csvValueFor=vg;exports.defaultMargin=Ye;exports.defaultMultiSelectMatcher=$m;exports.deltaDirectionFromValue=am;exports.deviceStateLabels=Z2;exports.deviceStateMetricFormats=jX;exports.emptyStore=Gp;exports.entityHasDetailPage=d5;exports.entityHasStatList=p5;exports.entityShowsNow=u5;exports.enumToSentenceCase=bw;exports.exportChart=kp;exports.exportTableAsCSV=bf;exports.fahrenheitToCelsius=mw;exports.fahrenheitToKelvin=UF;exports.feetToMeters=fF;exports.feetToMiles=hF;exports.filterMultiSelectOptions=hd;exports.filterToChips=c2;exports.formatBoolean=Uf;exports.formatCapacity=J4;exports.formatComponentValue=yo;exports.formatCurrency=qf;exports.formatCurrent=$d;exports.formatDate=jf;exports.formatDistance=_f;exports.formatEmptyValue=gc;exports.formatEnergy=cu;exports.formatFieldValue=Ar;exports.formatInternationalPhone=du;exports.formatNumber=Xf;exports.formatPercent=Yf;exports.formatPhone=rg;exports.formatPhoneNumber=Ua;exports.formatPower=fu;exports.formatPowerRating=X4;exports.formatResistance=bu;exports.formatTemperature=dg;exports.formatText=yg;exports.formatUSPhone=rl;exports.formatVoltage=yu;exports.getBadgeClasses=qx;exports.getBooleanBadgeVariant=jx;exports.getCellAlignmentClasses=om;exports.getCellContainerClasses=Se;exports.getCellTextClasses=Rr;exports.getColorRamp=Km;exports.getColorRampsByKind=Ym;exports.getContrastingTextColor=zS;exports.getDateParts=lF;exports.getDefaultChartColor=Di;exports.getDefaultColors=_s;exports.getDeviceStateDisplayLabel=sm;exports.getDeviceStateLabel=sm;exports.getEntityCategory=s5;exports.getEntityConfig=Fd;exports.getEntityIcon=a5;exports.getEntityLabel=i5;exports.getEntityStatList=C0;exports.getEventColor=Xo;exports.getExportFormatName=GP;exports.getExportHeaders=Y5;exports.getFieldGroupStyles=ON;exports.getFilterFields=fa;exports.getGridStateLabel=uy;exports.getInputBackgroundStyles=db;exports.getInputBaseStyles=Yt;exports.getInputStateStyles=xn;exports.getLinkClasses=nm;exports.getNumericColorClasses=bc;exports.getResolvedColor=Wt;exports.getSkeletonSize=Pt;exports.getStateTone=pce;exports.getThemeCategoricalColors=Wo;exports.getYFormatSettings=Or;exports.gridEntityTypeKeys=v0;exports.gridStateLabels=$2;exports.hasTileData=ca;exports.inchesToCentimeters=SF;exports.isActiveDeviceState=im;exports.isActiveState=im;exports.isCustomPinsLayer=Gm;exports.isExportSupported=HP;exports.isFilterEmpty=dc;exports.isGeoJsonLayer=Hm;exports.isGridEntityTypeKey=o5;exports.isLightColor=If;exports.isNil=he;exports.isRasterLayer=Wm;exports.isUnaryFilterOperator=Hx;exports.isVectorLayer=zm;exports.kelvinToCelsius=fw;exports.kelvinToFahrenheit=KF;exports.kilometersToMiles=bF;exports.layer=Om;exports.mapValuesToCategoricalColors=Ai;exports.metersToFeet=mF;exports.metersToMiles=xF;exports.metersToYards=CF;exports.milesToFeet=Qf;exports.milesToKilometers=gF;exports.milesToMeters=yF;exports.multiSelectSearchKeys=ef;exports.multiSelectSelectionEntries=yd;exports.parseBoolean=dn;exports.percentThresholdLevel=pm;exports.pickEnergyUnit=su;exports.prepareTableDataForExport=K5;exports.registerPhosphorIcon=PC;exports.removeFilterCondition=ma;exports.resolveValue=me;exports.shouldOfferLiteralOption=xd;exports.snakeCaseToWords=xg;exports.telemetryPresetRanges=rc;exports.temperatureStringToSymbol=ag;exports.tierForViewport=ec;exports.tileIndexAt=nR;exports.tileKey=or;exports.tileReducer=mx;exports.tilesForViewport=jo;exports.toA=oF;exports.toActiveInactive=XS;exports.toAmps=el;exports.toBoolean=cn;exports.toCelsius=sg;exports.toCentimeters=sw;exports.toCheckmark=jS;exports.toCompactNumber=$S;exports.toCurrency=Jf;exports.toCustomDateFormat=iw;exports.toDateString=ow;exports.toEnabledDisabled=YS;exports.toFahrenheit=ig;exports.toFeet=ru;exports.toFloat=ZS;exports.toFormattedNumber=_S;exports.toFullDateTime=nw;exports.toGW=FF;exports.toGWh=eg;exports.toGigawatts=mu;exports.toISOString=aw;exports.toInches=cw;exports.toInteger=QS;exports.toKA=nF;exports.toKV=_F;exports.toKW=AF;exports.toKelvin=lg;exports.toKiloamps=_d;exports.toKilohms=og;exports.toKilometers=tu;exports.toKilovolts=xu;exports.toKilowatts=uu;exports.toLowerCase=pg;exports.toMA=rF;exports.toMV=QF;exports.toMW=IF;exports.toMWh=$f;exports.toMegawatts=pu;exports.toMegohms=ng;exports.toMeters=eu;exports.toMiles=ou;exports.toMilliamps=Zd;exports.toMillimeters=lw;exports.toMilliohms=gu;exports.toMillivolts=hu;exports.toNauticalMiles=pF;exports.toOhms=nl;exports.toOnOff=JS;exports.toPercentage=Kf;exports.toRelativeTime=tl;exports.toScientificNotation=ew;exports.toSecret=hw;exports.toSentenceCase=mg;exports.toTemperature=cg;exports.toTitleCase=fg;exports.toTrueFalse=qS;exports.toUpperCase=ug;exports.toV=ZF;exports.toVolts=sl;exports.toW=DF;exports.toWatts=ol;exports.toWh=au;exports.toYards=nu;exports.tokWh=iu;exports.truncateEnd=il;exports.truncateMiddle=Ka;exports.truncateStart=al;exports.typeRole=Et;exports.typographyRole=vo;exports.ucFirst=bg;exports.useBreakpoint=gr;exports.useChartContext=ra;exports.useChartExpand=na;exports.useChartHeaderMetrics=Xa;exports.useChartHeaderWidth=Dg;exports.useChartOwnsItsTitle=Ig;exports.useClientDataControls=Vd;exports.useColorMode=er;exports.useComponentFormatter=Z4;exports.useContainerBreakpoint=oh;exports.useDataControls=L0;exports.useDebounce=hn;exports.useElementSize=ei;exports.useInfiniteScroll=gn;exports.useInputFocus=vr;exports.useLocalStorage=ed;exports.useMapStyleOverride=Si;exports.useMediaQuery=fr;exports.useNotice=FC;exports.useServerDataControls=Od;exports.useTableExport=F0;exports.useTileWindow=xx;exports.useTiledTimeSeries=Up;exports.useWizard=M5;exports.wrapWithLink=Do;exports.yardsToMeters=vF;//# sourceMappingURL=index.cjs.map
51
138
  //# sourceMappingURL=index.cjs.map