@texturehq/edges 1.36.0 → 1.36.1

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,7 +1,7 @@
1
1
  'use strict';var reactAriaComponents=require('react-aria-components'),Le=require('react'),n0=require('papaparse'),u0=require('fuse.js'),reactVirtual=require('@tanstack/react-virtual'),jsxRuntime=require('react/jsx-runtime'),luxon=require('luxon'),tailwindMerge=require('tailwind-merge'),bC=require('@phosphor-icons/react'),MS=require('@phosphor-icons/react/ssr'),reactStately=require('react-stately'),lucideReact=require('lucide-react'),framerMotion=require('framer-motion'),Z2=require('react-ace'),reactColorful=require('react-colorful'),curve=require('@visx/curve'),shape=require('@visx/shape'),gradient=require('@visx/gradient'),scale=require('@visx/scale'),d3Array=require('d3-array'),axis=require('@visx/axis'),responsive=require('@visx/responsive'),zoom=require('@visx/zoom'),brush=require('@visx/brush'),pattern=require('@visx/pattern'),core=require('@dnd-kit/core'),sortable=require('@dnd-kit/sortable'),utilities=require('@dnd-kit/utilities'),reactDom=require('react-dom'),g4=require('react-map-gl'),server=require('react-dom/server'),kR=require('@tiptap/extension-link'),react=require('@tiptap/react'),menus=require('@tiptap/react/menus'),DR=require('@tiptap/starter-kit');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 Le__namespace=/*#__PURE__*/_interopNamespace(Le);var n0__default=/*#__PURE__*/_interopDefault(n0);var u0__default=/*#__PURE__*/_interopDefault(u0);var bC__namespace=/*#__PURE__*/_interopNamespace(bC);var MS__namespace=/*#__PURE__*/_interopNamespace(MS);var Z2__default=/*#__PURE__*/_interopDefault(Z2);var g4__default=/*#__PURE__*/_interopDefault(g4);var kR__default=/*#__PURE__*/_interopDefault(kR);var DR__default=/*#__PURE__*/_interopDefault(DR);var Zv=Object.create;var Lc=Object.defineProperty;var Xv=Object.getOwnPropertyDescriptor;var $v=Object.getOwnPropertyNames;var Qv=Object.getPrototypeOf,_v=Object.prototype.hasOwnProperty;var e0=(e,t,r)=>t in e?Lc(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r;var fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var t0=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $v(t))!_v.call(e,n)&&n!==r&&Lc(e,n,{get:()=>t[n],enumerable:!(o=Xv(t,n))||o.enumerable});return e};var Zi=(e,t,r)=>(r=e!=null?Zv(Qv(e)):{},t0(t||!e||!e.__esModule?Lc(r,"default",{value:e,enumerable:true}):r,e));var Ia=(e,t,r)=>e0(e,typeof t!="symbol"?t+"":t,r);var Fc=fr((Ac,Ic)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Ac<"u"?t():(t(),e.FileSaver={});})(Ac,function(){function e(s,c){return typeof c>"u"?c={autoBom:false}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.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,c,l){var d=new XMLHttpRequest;d.open("GET",s),d.responseType="blob",d.onload=function(){i(d.response,c,l);},d.onerror=function(){console.error("could not download file");},d.send();}function r(s){var c=new XMLHttpRequest;c.open("HEAD",s,false);try{c.send();}catch{}return 200<=c.status&&299>=c.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"));}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",true,true,window,0,0,0,80,20,false,false,false,false,0,null),s.dispatchEvent(c);}}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,c,l){var d=n.URL||n.webkitURL,u=document.createElement("a");c=c||s.name||"download",u.download=c,u.rel="noopener",typeof s=="string"?(u.href=s,u.origin===location.origin?o(u):r(u.href)?t(s,c,l):o(u,u.target="_blank")):(u.href=d.createObjectURL(s),setTimeout(function(){d.revokeObjectURL(u.href);},4e4),setTimeout(function(){o(u);},0));}:"msSaveOrOpenBlob"in navigator?function(s,c,l){if(c=c||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(e(s,l),c);else if(r(s))t(s,c,l);else {var d=document.createElement("a");d.href=s,d.target="_blank",setTimeout(function(){o(d);});}}:function(s,c,l,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof s=="string")return t(s,c,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;"),d?d.location.href=b:location=b,d=null;},g.readAsDataURL(s);}else {var f=n.URL||n.webkitURL,x=f.createObjectURL(s);d?d.location=x:location.href=x,d=null,setTimeout(function(){f.revokeObjectURL(x);},4e4);}});n.saveAs=i.saveAs=i,typeof Ic<"u"&&(Ic.exports=i);});});var cb=fr(Fe=>{var Ct=typeof Symbol=="function"&&Symbol.for,Fu=Ct?Symbol.for("react.element"):60103,Bu=Ct?Symbol.for("react.portal"):60106,$s=Ct?Symbol.for("react.fragment"):60107,Qs=Ct?Symbol.for("react.strict_mode"):60108,_s=Ct?Symbol.for("react.profiler"):60114,el=Ct?Symbol.for("react.provider"):60109,tl=Ct?Symbol.for("react.context"):60110,Vu=Ct?Symbol.for("react.async_mode"):60111,rl=Ct?Symbol.for("react.concurrent_mode"):60111,ol=Ct?Symbol.for("react.forward_ref"):60112,nl=Ct?Symbol.for("react.suspense"):60113,Ew=Ct?Symbol.for("react.suspense_list"):60120,al=Ct?Symbol.for("react.memo"):60115,il=Ct?Symbol.for("react.lazy"):60116,Lw=Ct?Symbol.for("react.block"):60121,Aw=Ct?Symbol.for("react.fundamental"):60117,Iw=Ct?Symbol.for("react.responder"):60118,Fw=Ct?Symbol.for("react.scope"):60119;function lr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fu:switch(e=e.type,e){case Vu:case rl:case $s:case _s:case Qs:case nl:return e;default:switch(e=e&&e.$$typeof,e){case tl:case ol:case il:case al:case el:return e;default:return t}}case Bu:return t}}}function lb(e){return lr(e)===rl}Fe.AsyncMode=Vu;Fe.ConcurrentMode=rl;Fe.ContextConsumer=tl;Fe.ContextProvider=el;Fe.Element=Fu;Fe.ForwardRef=ol;Fe.Fragment=$s;Fe.Lazy=il;Fe.Memo=al;Fe.Portal=Bu;Fe.Profiler=_s;Fe.StrictMode=Qs;Fe.Suspense=nl;Fe.isAsyncMode=function(e){return lb(e)||lr(e)===Vu};Fe.isConcurrentMode=lb;Fe.isContextConsumer=function(e){return lr(e)===tl};Fe.isContextProvider=function(e){return lr(e)===el};Fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fu};Fe.isForwardRef=function(e){return lr(e)===ol};Fe.isFragment=function(e){return lr(e)===$s};Fe.isLazy=function(e){return lr(e)===il};Fe.isMemo=function(e){return lr(e)===al};Fe.isPortal=function(e){return lr(e)===Bu};Fe.isProfiler=function(e){return lr(e)===_s};Fe.isStrictMode=function(e){return lr(e)===Qs};Fe.isSuspense=function(e){return lr(e)===nl};Fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===$s||e===rl||e===_s||e===Qs||e===nl||e===Ew||typeof e=="object"&&e!==null&&(e.$$typeof===il||e.$$typeof===al||e.$$typeof===el||e.$$typeof===tl||e.$$typeof===ol||e.$$typeof===Aw||e.$$typeof===Iw||e.$$typeof===Fw||e.$$typeof===Lw)};Fe.typeOf=lr;});var db=fr(Be=>{process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function C(J){return typeof J=="string"||typeof J=="function"||J===o||J===l||J===a||J===n||J===u||J===m||typeof J=="object"&&J!==null&&(J.$$typeof===g||J.$$typeof===p||J.$$typeof===i||J.$$typeof===s||J.$$typeof===d||J.$$typeof===x||J.$$typeof===b||J.$$typeof===v||J.$$typeof===f)}function y(J){if(typeof J=="object"&&J!==null){var re=J.$$typeof;switch(re){case t:var Se=J.type;switch(Se){case c:case l:case o:case a:case n:case u:return Se;default:var ae=Se&&Se.$$typeof;switch(ae){case s:case d:case g:case p:case i:return ae;default:return re}}case r:return re}}}var S=c,N=l,R=s,M=i,T=t,E=d,I=o,F=g,w=p,k=r,H=a,A=n,B=u,Y=false;function q(J){return Y||(Y=true,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),G(J)||y(J)===c}function G(J){return y(J)===l}function U(J){return y(J)===s}function P(J){return y(J)===i}function D(J){return typeof J=="object"&&J!==null&&J.$$typeof===t}function z(J){return y(J)===d}function L(J){return y(J)===o}function h(J){return y(J)===g}function O(J){return y(J)===p}function W(J){return y(J)===r}function K(J){return y(J)===a}function te(J){return y(J)===n}function se(J){return y(J)===u}Be.AsyncMode=S,Be.ConcurrentMode=N,Be.ContextConsumer=R,Be.ContextProvider=M,Be.Element=T,Be.ForwardRef=E,Be.Fragment=I,Be.Lazy=F,Be.Memo=w,Be.Portal=k,Be.Profiler=H,Be.StrictMode=A,Be.Suspense=B,Be.isAsyncMode=q,Be.isConcurrentMode=G,Be.isContextConsumer=U,Be.isContextProvider=P,Be.isElement=D,Be.isForwardRef=z,Be.isFragment=L,Be.isLazy=h,Be.isMemo=O,Be.isPortal=W,Be.isProfiler=K,Be.isStrictMode=te,Be.isSuspense=se,Be.isValidElementType=C,Be.typeOf=y;})();});var Ou=fr((RV,zu)=>{process.env.NODE_ENV==="production"?zu.exports=cb():zu.exports=db();});var mb=fr((DV,pb)=>{var ub=Object.getOwnPropertySymbols,Bw=Object.prototype.hasOwnProperty,Vw=Object.prototype.propertyIsEnumerable;function zw(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Ow(){try{if(!Object.assign)return !1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return !1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(a){return t[a]});if(o.join("")!=="0123456789")return !1;var n={};return "abcdefghijklmnopqrst".split("").forEach(function(a){n[a]=a;}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return false}}pb.exports=Ow()?Object.assign:function(e,t){for(var r,o=zw(e),n,a=1;a<arguments.length;a++){r=Object(arguments[a]);for(var i in r)Bw.call(r,i)&&(o[i]=r[i]);if(ub){n=ub(r);for(var s=0;s<n.length;s++)Vw.call(r,n[s])&&(o[n[s]]=r[n[s]]);}}return o};});var sl=fr((MV,fb)=>{var Hw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";fb.exports=Hw;});var Hu=fr((EV,gb)=>{gb.exports=Function.call.bind(Object.prototype.hasOwnProperty);});var vb=fr((LV,yb)=>{var Wu=function(){};process.env.NODE_ENV!=="production"&&(bb=sl(),ll={},xb=Hu(),Wu=function(e){var t="Warning: "+e;typeof console<"u"&&console.error(t);try{throw new Error(t)}catch{}});var bb,ll,xb;function hb(e,t,r,o,n){if(process.env.NODE_ENV!=="production"){for(var a in e)if(xb(e,a)){var i;try{if(typeof e[a]!="function"){var s=Error((o||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw s.name="Invariant Violation",s}i=e[a](t,a,o,r,null,bb);}catch(l){i=l;}if(i&&!(i instanceof Error)&&Wu((o||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in ll)){ll[i.message]=true;var c=n?n():"";Wu("Failed "+r+" type: "+i.message+(c??""));}}}}hb.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(ll={});};yb.exports=hb;});var wb=fr((AV,Sb)=>{var Ww=Ou(),Gw=mb(),ia=sl(),Gu=Hu(),Cb=vb(),sa=function(){};process.env.NODE_ENV!=="production"&&(sa=function(e){var t="Warning: "+e;typeof console<"u"&&console.error(t);try{throw new Error(t)}catch{}});function cl(){return null}Sb.exports=function(e,t){var r=typeof Symbol=="function"&&Symbol.iterator,o="@@iterator";function n(w){var k=w&&(r&&w[r]||w[o]);if(typeof k=="function")return k}var a="<<anonymous>>",i={array:d("array"),bigint:d("bigint"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:u(),arrayOf:m,element:p(),elementType:g(),instanceOf:f,node:C(),objectOf:b,oneOf:x,oneOfType:v,shape:S,exact:N};function s(w,k){return w===k?w!==0||1/w===1/k:w!==w&&k!==k}function c(w,k){this.message=w,this.data=k&&typeof k=="object"?k:{},this.stack="";}c.prototype=Error.prototype;function l(w){if(process.env.NODE_ENV!=="production")var k={},H=0;function A(Y,q,G,U,P,D,z){if(U=U||a,D=D||G,z!==ia){if(t){var L=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw L.name="Invariant Violation",L}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var h=U+":"+G;!k[h]&&H<3&&(sa("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[h]=true,H++);}}return q[G]==null?Y?q[G]===null?new c("The "+P+" `"+D+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new c("The "+P+" `"+D+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:w(q,G,U,P,D)}var B=A.bind(null,false);return B.isRequired=A.bind(null,true),B}function d(w){function k(H,A,B,Y,q,G){var U=H[A],P=T(U);if(P!==w){var D=E(U);return new c("Invalid "+Y+" `"+q+"` of type "+("`"+D+"` supplied to `"+B+"`, expected ")+("`"+w+"`."),{expectedType:w})}return null}return l(k)}function u(){return l(cl)}function m(w){function k(H,A,B,Y,q){if(typeof w!="function")return new c("Property `"+q+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var G=H[A];if(!Array.isArray(G)){var U=T(G);return new c("Invalid "+Y+" `"+q+"` of type "+("`"+U+"` supplied to `"+B+"`, expected an array."))}for(var P=0;P<G.length;P++){var D=w(G,P,B,Y,q+"["+P+"]",ia);if(D instanceof Error)return D}return null}return l(k)}function p(){function w(k,H,A,B,Y){var q=k[H];if(!e(q)){var G=T(q);return new c("Invalid "+B+" `"+Y+"` of type "+("`"+G+"` supplied to `"+A+"`, expected a single ReactElement."))}return null}return l(w)}function g(){function w(k,H,A,B,Y){var q=k[H];if(!Ww.isValidElementType(q)){var G=T(q);return new c("Invalid "+B+" `"+Y+"` of type "+("`"+G+"` supplied to `"+A+"`, expected a single ReactElement type."))}return null}return l(w)}function f(w){function k(H,A,B,Y,q){if(!(H[A]instanceof w)){var G=w.name||a,U=F(H[A]);return new c("Invalid "+Y+" `"+q+"` of type "+("`"+U+"` supplied to `"+B+"`, expected ")+("instance of `"+G+"`."))}return null}return l(k)}function x(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&(arguments.length>1?sa("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):sa("Invalid argument supplied to oneOf, expected an array.")),cl;function k(H,A,B,Y,q){for(var G=H[A],U=0;U<w.length;U++)if(s(G,w[U]))return null;var P=JSON.stringify(w,function(z,L){var h=E(L);return h==="symbol"?String(L):L});return new c("Invalid "+Y+" `"+q+"` of value `"+String(G)+"` "+("supplied to `"+B+"`, expected one of "+P+"."))}return l(k)}function b(w){function k(H,A,B,Y,q){if(typeof w!="function")return new c("Property `"+q+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var G=H[A],U=T(G);if(U!=="object")return new c("Invalid "+Y+" `"+q+"` of type "+("`"+U+"` supplied to `"+B+"`, expected an object."));for(var P in G)if(Gu(G,P)){var D=w(G,P,B,Y,q+"."+P,ia);if(D instanceof Error)return D}return null}return l(k)}function v(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&sa("Invalid argument supplied to oneOfType, expected an instance of array."),cl;for(var k=0;k<w.length;k++){var H=w[k];if(typeof H!="function")return sa("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(H)+" at index "+k+"."),cl}function A(B,Y,q,G,U){for(var P=[],D=0;D<w.length;D++){var z=w[D],L=z(B,Y,q,G,U,ia);if(L==null)return null;L.data&&Gu(L.data,"expectedType")&&P.push(L.data.expectedType);}var h=P.length>0?", expected one of type ["+P.join(", ")+"]":"";return new c("Invalid "+G+" `"+U+"` supplied to "+("`"+q+"`"+h+"."))}return l(A)}function C(){function w(k,H,A,B,Y){return R(k[H])?null:new c("Invalid "+B+" `"+Y+"` supplied to "+("`"+A+"`, expected a ReactNode."))}return l(w)}function y(w,k,H,A,B){return new c((w||"React class")+": "+k+" type `"+H+"."+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function S(w){function k(H,A,B,Y,q){var G=H[A],U=T(G);if(U!=="object")return new c("Invalid "+Y+" `"+q+"` of type `"+U+"` "+("supplied to `"+B+"`, expected `object`."));for(var P in w){var D=w[P];if(typeof D!="function")return y(B,Y,q,P,E(D));var z=D(G,P,B,Y,q+"."+P,ia);if(z)return z}return null}return l(k)}function N(w){function k(H,A,B,Y,q){var G=H[A],U=T(G);if(U!=="object")return new c("Invalid "+Y+" `"+q+"` of type `"+U+"` "+("supplied to `"+B+"`, expected `object`."));var P=Gw({},H[A],w);for(var D in P){var z=w[D];if(Gu(w,D)&&typeof z!="function")return y(B,Y,q,D,E(z));if(!z)return new c("Invalid "+Y+" `"+q+"` key `"+D+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(H[A],null," ")+`
2
2
  Valid keys: `+JSON.stringify(Object.keys(w),null," "));var L=z(G,D,B,Y,q+"."+D,ia);if(L)return L}return null}return l(k)}function R(w){switch(typeof w){case "number":case "string":case "undefined":return true;case "boolean":return !w;case "object":if(Array.isArray(w))return w.every(R);if(w===null||e(w))return true;var k=n(w);if(k){var H=k.call(w),A;if(k!==w.entries){for(;!(A=H.next()).done;)if(!R(A.value))return false}else for(;!(A=H.next()).done;){var B=A.value;if(B&&!R(B[1]))return false}}else return false;return true;default:return false}}function M(w,k){return w==="symbol"?true:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:false}function T(w){var k=typeof w;return Array.isArray(w)?"array":w instanceof RegExp?"object":M(k,w)?"symbol":k}function E(w){if(typeof w>"u"||w===null)return ""+w;var k=T(w);if(k==="object"){if(w instanceof Date)return "date";if(w instanceof RegExp)return "regexp"}return k}function I(w){var k=E(w);switch(k){case "array":case "object":return "an "+k;case "boolean":case "date":case "regexp":return "a "+k;default:return k}}function F(w){return !w.constructor||!w.constructor.name?a:w.constructor.name}return i.checkPropTypes=Cb,i.resetWarningCache=Cb.resetWarningCache,i.PropTypes=i,i};});var Pb=fr((IV,Tb)=>{var Uw=sl();function Nb(){}function kb(){}kb.resetWarningCache=Nb;Tb.exports=function(){function e(o,n,a,i,s,c){if(c!==Uw){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:kb,resetWarningCache:Nb};return r.PropTypes=r,r};});var Mb=fr((FV,Uu)=>{process.env.NODE_ENV!=="production"?(Rb=Ou(),Db=true,Uu.exports=wb()(Rb.isElement,Db)):Uu.exports=Pb()();var Rb,Db;});var Eb=fr((BV,dl)=>{(function(){var e={}.hasOwnProperty;function t(){for(var n="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(n=o(n,r(i)));}return n}function r(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return "";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var a="";for(var i in n)e.call(n,i)&&n[i]&&(a=o(a,i));return a}function o(n,a){return a?n?n+" "+a:n+a:n}typeof dl<"u"&&dl.exports?(t.default=t,dl.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t;})();});function Ht(e,t=false){let[r,o]=Le.useState(t);return Le.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 Xo={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"};function Wt(e="base"){let t=Ht(`(min-width: ${Xo.sm})`,e!=="base"),r=Ht(`(min-width: ${Xo.md})`,["md","lg","xl","2xl"].includes(e)),o=Ht(`(min-width: ${Xo.lg})`,["lg","xl","2xl"].includes(e)),n=Ht(`(min-width: ${Xo.xl})`,["xl","2xl"].includes(e)),a=Ht(`(min-width: ${Xo["2xl"]})`,e==="2xl"),i=!r,s=r,c="base";return a?c="2xl":n?c="xl":o?c="lg":r?c="md":t&&(c="sm"),{current:c,isSm:t,isMd:r,isLg:o,isXl:n,is2Xl:a,isMobile:i,isDesktop:s}}var Xi=Zi(Fc(),1);var um=["stroke","fill","color","stop-color","flood-color","lighting-color"],pm=/var\s*\(/;function mm(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 c=window.getComputedStyle(i);for(let l of um){let d=s.getAttribute(l);if(d&&pm.test(d)){let u=c.getPropertyValue(l);u&&s.setAttribute(l,u.trim());}}if(s instanceof HTMLElement||s instanceof SVGElement)for(let l of um){let d=l,u=s.style.getPropertyValue(d);if(u&&pm.test(u)){let m=c.getPropertyValue(d);m&&s.style.setProperty(d,m.trim());}}}}function Bc(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 Vc(e,t,r={},o){let n=Array.isArray(t[0])?t:[t];try{switch(e){case "csv":await a0(n,r);break;case "svg":await i0(o,r);break;case "png":await s0(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 a0(e,t){try{let r=new Map;e.forEach(c=>{c.forEach(l=>{let d=l.xValue.getTime();r.has(d)||r.set(d,l.xValue);});});let n=Array.from(r.values()).sort((c,l)=>c.getTime()-l.getTime()).map(c=>{let l={[t.xLabel||"Date"]:c.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})};return e.forEach((d,u)=>{let m=t.seriesLabels?.[u]||`Series ${u+1}`,p=d.find(g=>g.xValue.getTime()===c.getTime());l[m]=p?p.yValue:"",p?.category&&(l[`${m} Category`]=p.category);}),l}),a=n0__default.default.unparse(n,{header:!0,skipEmptyLines:!0}),i=new Blob([a],{type:"text/csv;charset=utf-8;"}),s=Bc(t.filename||"chart-data","csv",t.timestamp!==!1);(0,Xi.saveAs)(i,s);}catch(r){throw new Error(`CSV export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function i0(e,t){if(!e.current)throw new Error("SVG element not found");try{let r=e.current,o=r.cloneNode(!0);if(mm(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"?>
3
3
  `+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"}),c=Bc(t.filename||"chart","svg",t.timestamp!==!1);(0,Xi.saveAs)(s,c);}catch(r){throw new Error(`SVG export failed: ${r instanceof Error?r.message:"Unknown error"}`)}}async function s0(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);mm(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 c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("width",String(a.width)),c.setAttribute("height",String(a.height)),c.setAttribute("fill","white"),i.insertBefore(c,i.firstChild);let d=new XMLSerializer().serializeToString(i);d.includes("xmlns=")||(d=d.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));let u=new Blob([d],{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(v=>{if(v){let C=Bc(t.filename||"chart","png",t.timestamp!==!1);(0,Xi.saveAs)(v,C),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 l0(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 c0(e){return {csv:"CSV Spreadsheet",svg:"SVG Vector Image",png:"PNG Image"}[e]||"Unknown Format"}function fm({datasets:e,metadata:t,svgRef:r}){return Le.useCallback(async o=>{try{await Vc(o,e,t,r);}catch(n){throw console.error("Chart export failed:",n),n}},[e,t,r])}function Fa(e,t){return t.split(".").reduce((r,o)=>r?.[o],e)}function p0(e,t){let r=Fa(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)?o.includes(r):false;case "nin":return Array.isArray(o)?!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());default:return false}}function gm(e,t){if(t.conditions.length===0)return true;let r=t.conditions.map(o=>"conditions"in o?gm(e,o):p0(e,o));return t.logic==="AND"?r.every(Boolean):r.some(Boolean)}function m0(e,t){return !t||t.conditions.length===0?e:e.filter(r=>gm(r,t))}function f0(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 g0(e,t){return t?[...e].sort((r,o)=>{let n=Fa(r,t.field),a=Fa(o,t.field);return f0(n,a,t.direction)}):e}function b0(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 u0__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(c=>{let l=Fa(s,c);return l==null?false:String(l).toLowerCase().includes(i)}))}function x0(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=Fa(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 zc({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){let a=b0(e,o||null);a=m0(a,t||null);let i=x0(a,n);return a=g0(a,r||null),{data:a,facetCounts:i,resultCount:a.length}}function $i({data:e,filters:t,sort:r,search:o,facetConfigs:n=[]}){return Le.useMemo(()=>zc({data:e,filters:t,sort:r,search:o,facetConfigs:n}),[e,t,r,o,n])}function Co(e,t=300){let[r,o]=Le.useState(e);return Le.useEffect(()=>{let n=setTimeout(()=>o(e),t);return ()=>clearTimeout(n)},[e,t]),r}function Qi({filters:e,sort:t,search:r,onStateChange:o,searchDebounce:n=300}){let a=Co(r,n),i=Le.useRef(true);Le.useEffect(()=>{if(i.current){i.current=false;return}o({filters:e,sort:t,search:a});},[e,t,a,o]);}function bm(e){return e.mode==="client"?$i({data:e.data,filters:e.filters,sort:e.sort,search:e.search,facetConfigs:e.facetConfigs}):(Qi({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})}function _i(e,t=300){let[r,o]=Le.useState(false);return Le.useEffect(()=>{if(e){let n=setTimeout(()=>{o(true);},t);return ()=>clearTimeout(n)}o(false);},[e,t]),r}function Jn(){let[e,t]=Le.useState({width:0,height:0}),r=Le.useRef(null),o=Le.useRef(void 0),n=Le.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(c=>{for(let l of s){let{width:d,height:u}=l.contentRect;t(m=>m.width!==d||m.height!==u?{width:d,height:u}:m);}});}),r.current.observe(a);},[]);return Le.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current),r.current&&r.current.disconnect();},[]),{ref:n,width:e.width,height:e.height}}function So({items:e,onLoadMore:t,hasMore:r,isLoading:o=false,loadingState:n,enableVirtualization:a,estimatedItemSize:i=50,overscan:s=5,scrollElement:c,loadMoreThreshold:l=100}){let d=Le.useRef(null),u=Le.useRef(null),m=Le.useRef(false),[p,g]=Le.useState(0);Le.useEffect(()=>{u.current&&(c||d.current)&&g(M=>M+1);},[c,e.length]);let f=n||(o?e.length===0?"loading":"loading-more":"idle"),x=f==="loading",b=f==="loading-more",v=a!==void 0?a:e.length>=100,C=reactVirtual.useVirtualizer({count:e.length,getScrollElement:()=>c||d.current,estimateSize:()=>i,overscan:s}),y=v?C:null,S=v?C.getVirtualItems():[];Le.useEffect(()=>{let M=u.current,T=c||d.current;if(!M||!T||!r||o||!t)return;let E=new IntersectionObserver(I=>{let[F]=I;F?.isIntersecting&&!m.current&&r&&t&&(m.current=true,Promise.resolve(t()).finally(()=>{m.current=false;}));},{root:T,rootMargin:`0px 0px ${l}px 0px`,threshold:0});return E.observe(M),()=>{E.disconnect();}},[r,o,t,c,l,p]);let N=Le.useCallback((M,T)=>{y?y.scrollToIndex(M,T):d.current&&d.current.children[M]?.scrollIntoView({behavior:"smooth",block:T?.align||"start"});},[y]),R=Le.useCallback(()=>{y?y.scrollToIndex(0,{align:"start"}):d.current&&d.current.scrollTo({top:0,behavior:"smooth"});},[y]);return {virtualizer:y,virtualItems:S,computedLoadingState:f,isInitialLoad:x,isLoadingMore:b,scrollRef:d,loadMoreRef:u,scrollToIndex:N,scrollToTop:R}}function es(e,t){let[r,o]=Le.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}});Le.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=Le.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=Le.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 Cm=Zi(Fc(),1);function A0(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 I0(e,t){return t.accessor?typeof t.accessor=="function"?t.accessor(e):e[t.accessor]:null}function Sm(e,t){let r=I0(t,e);return e.exportValue?e.exportValue(r,t)??"":r==null?"":r instanceof Date?r.toISOString():typeof r=="object"?JSON.stringify(r):r}function Hc(e){return e.filter(t=>t.exportable!==false)}function wm(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 Wc(e){let{columns:t,data:r,metadata:o={}}=e;try{let n=Hc(t);if(n.length===0)throw new Error("No exportable columns found");wm(n);let a=r.map(l=>{let d={};for(let u of n){let m=u.exportLabel||u.label;d[m]=Sm(u,l);}return d}),i=n0__default.default.unparse(a,{header:!0,skipEmptyLines:!0}),s=new Blob([i],{type:"text/csv;charset=utf-8;"}),c=A0(o.filename||"table-data","csv",o.timestamp!==!1);(0,Cm.saveAs)(s,c);}catch(n){throw new Error(`CSV export failed: ${n instanceof Error?n.message:"Unknown error"}`)}}function F0(e){let{columns:t,data:r}=e,o=Hc(t);return wm(o),r.map(n=>{let a={};for(let i of o){let s=i.exportLabel||i.label;a[s]=Sm(i,n);}return a})}function B0(e){return Hc(e).map(t=>t.exportLabel||t.label)}function Nm({columns:e,data:t,metadata:r}){let n=e.filter(i=>i.exportable!==false).length>0&&t.length>0;return {exportCSV:Le.useCallback(async()=>{try{await Wc({columns:e,data:t,metadata:r});}catch(i){throw console.error("Table export failed:",i),i}},[e,t,r]),canExport:n}}function ts(e=true){let[t,r]=Le.useState(null);return Le.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 Gc=class{constructor(){Ia(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();}},ee=new Gc;var wo=(e,t="Yes",r="No")=>e==null?null:e?t:r,H0=e=>wo(e,"Enabled","Disabled"),W0=e=>wo(e,"On","Off"),G0=e=>wo(e,"Active","Inactive"),U0=e=>wo(e,"True","False"),Y0=e=>wo(e,"\u2713","\u2717"),No=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},km=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=No(e);return r===null?t.nullText??null:wo(r,t.trueText??"Yes",t.falseText??"No")};ee.register("boolean",(e,t,r)=>{let o=No(e);return o!==null?wo(o,typeof t=="string"?t:"Yes",typeof r=="string"?r:"No"):null});ee.register("yesNo",e=>{let t=No(e);return t!==null?wo(t,"Yes","No"):null});ee.register("enabledDisabled",e=>{let t=No(e);return t!==null?H0(t):null});ee.register("onOff",e=>{let t=No(e);return t!==null?W0(t):null});ee.register("activeInactive",e=>{let t=No(e);return t!==null?G0(t):null});ee.register("trueFalse",e=>{let t=No(e);return t!==null?U0(t):null});ee.register("checkmark",e=>{let t=No(e);return t!==null?Y0(t):null});var le=e=>e==null,Tm=(e,t=0)=>le(e)?null:`${e.toFixed(t)}%`,Pm=(e,t=0)=>Tm(e,t)??"\u2014",K0=e=>le(e)?null:Math.round(e).toString(),J0=(e,t=1)=>le(e)?null:e.toFixed(t),j0=(e,t,r=true)=>{if(le(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)},q0=(e,t="short")=>le(e)?null:new Intl.NumberFormat("en-US",{notation:"compact",compactDisplay:t}).format(e),Z0=(e,t=2)=>le(e)?null:e.toExponential(t),Rm=(e,t="USD",r)=>{if(le(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)},Dm=(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)},Mm=(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:Rm(r,t.currency,t)};ee.register("percentage",(e,t)=>typeof e=="number"?Tm(e,typeof t=="number"?t:0):null);ee.register("integer",e=>typeof e=="number"?K0(e):null);ee.register("float",(e,t)=>typeof e=="number"?J0(e,typeof t=="number"?t:1):null);ee.register("number",(e,t,r)=>{let o=typeof e=="string"?parseFloat(e):Number(e);return isNaN(o)?null:j0(o,typeof t=="number"?t:void 0,typeof r=="boolean"?r:true)});ee.register("compact",(e,t)=>typeof e=="number"?q0(e,t==="long"?"long":"short"):null);ee.register("scientific",(e,t)=>typeof e=="number"?Z0(e,typeof t=="number"?t:2):null);ee.register("currency",(e,t,r)=>typeof e=="number"?Rm(e,typeof t=="string"?t:"USD",typeof r=="object"&&r!==null?r:{}):null);function tM(e,t=1){return le(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MWh`:`${e.toFixed(t)} kWh`}function rM(e,t=1){return le(e)?null:Math.abs(e)>=1e3?`${(e/1e3).toFixed(t)} MW`:`${e.toFixed(t)} kW`}function Br({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=$o(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=$o(e,{type:"date"});return jsxRuntime.jsx("time",{dateTime:e.toISOString(),title:e.toISOString(),children:n})}if(typeof e=="number")return $o(e,{type:"number"});if(typeof e=="boolean")return $o(e,{type:"boolean"})}return String(e)}function iM(e,t,r){return Le__namespace.default.useCallback(o=>Br({value:o,formatter:e,emptyClassName:t,emptyText:r}),[e,t,r])}var Uc=(e,t=0)=>{if(le(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mA`:`${r.toFixed(t)} mA`},os=(e,t=1)=>le(e)?null:`${e.toFixed(t)} A`,Yc=(e,t=2)=>le(e)?null:`${(e/1e3).toFixed(t)} kA`,$0=(e,t)=>{if(le(e))return null;let r=Math.abs(e);return r>=1e3?Yc(e,t??2):r<1?Uc(e,t??0):os(e,t??1)},Kc=(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 Yc(r,o??2);case "mA":return Uc(r,o??0);case "A":return os(r,o??1)}return t.autoScale!==false?$0(r,o):os(r,o??1)};ee.register("current",Kc);var uM=Uc,pM=os,mM=Yc;var Qo=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},Q0=(e,t=false,r)=>{if(!e)return null;let o=Qo(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)},ns=e=>{if(!e)return null;let t=Qo(e);return t?t.toRelative():"Invalid Date"},_0=(e,t)=>{if(!e)return null;let r=Qo(e);return r?(t?r.setZone(t):r).toLocaleString(luxon.DateTime.DATETIME_MED_WITH_WEEKDAY):"Invalid Date"},eC=e=>{if(!e)return null;let t=Qo(e);return t?t.toISO():null},tC=(e,t,r)=>{if(!e)return null;let o=Qo(e);return o?(r?o.setZone(r):o).toFormat(t):"Invalid Date"},xM=e=>{let t=Qo(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},Em=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=Qo(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)};ee.register("date",(e,t,r)=>Q0(e,typeof t=="boolean"?t:false,typeof r=="string"?r:void 0));ee.register("relativeTime",e=>ns(e));ee.register("fullDateTime",(e,t)=>_0(e,typeof t=="string"?t:void 0));ee.register("isoString",e=>eC(e));ee.register("customDateFormat",(e,t,r)=>typeof t=="string"?tC(e,t,typeof r=="string"?r:void 0):null);var Jc=(e,t=1)=>le(e)?null:`${e.toFixed(t)} m`,rC=(e,t=1)=>le(e)?null:`${(e*100).toFixed(t)} cm`,oC=(e,t=0)=>le(e)?null:`${(e*1e3).toFixed(t)} mm`,jc=(e,t=1)=>le(e)?null:`${(e/1e3).toFixed(t)} km`,qc=(e,t=0)=>le(e)?null:`${e.toFixed(t)} ft`,nC=(e,t=1)=>le(e)?null:`${e.toFixed(t)} in`,Zc=(e,t=1)=>le(e)?null:`${e.toFixed(t)} mi`,Xc=(e,t=0)=>le(e)?null:`${e.toFixed(t)} yd`,CM=(e,t=1)=>le(e)?null:`${e.toFixed(t)} nm`,SM=e=>e*3.28084,wM=e=>e/3.28084,NM=e=>e*1.60934,kM=e=>e/1.60934,TM=e=>e/5280,Lm=e=>e*5280,PM=e=>e/1609.34,RM=e=>e*1609.34,DM=e=>e*.9144,MM=e=>e/.9144,EM=e=>e*2.54,LM=e=>e/2.54,Am=(e,t=false,r=1)=>{if(le(e))return null;let o=Math.abs(e);return t?o>=1e3?jc(e,r):o<.01?oC(e,0):o<1?rC(e,r):Jc(e,r):o<.01?qc(Lm(e),0):o<.1?Xc(Lm(e)/3,0):Zc(e,r)},Im=(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 Am(r,n,o)}switch(t.unit){case "km":return jc(r,o);case "ft":return qc(r,o);case "mi":return Zc(r,o);case "yd":return Xc(r,o);default:return Jc(r,o)}};ee.register("miles",(e,t)=>typeof e=="number"?Zc(e,typeof t=="number"?t:1):null);ee.register("kilometers",(e,t)=>typeof e=="number"?jc(e,typeof t=="number"?t:1):null);ee.register("meters",(e,t)=>typeof e=="number"?Jc(e,typeof t=="number"?t:1):null);ee.register("feet",(e,t)=>typeof e=="number"?qc(e,typeof t=="number"?t:0):null);ee.register("yards",(e,t)=>typeof e=="number"?Xc(e,typeof t=="number"?t:0):null);ee.register("inches",(e,t)=>typeof e=="number"?nC(e,typeof t=="number"?t:1):null);ee.register("autoScaleDistance",(e,t,r)=>typeof e=="number"?Am(e,typeof t=="boolean"?t:false,typeof r=="number"?r:1):null);var $c=(e,t=1)=>le(e)?null:`${e.toFixed(t)} Wh`,Qc=(e,t=1)=>le(e)?null:`${(e/1e3).toFixed(t)} kWh`,Fm=(e,t=1)=>le(e)?null:`${(e/1e6).toFixed(t)} MWh`,Bm=(e,t=1)=>le(e)?null:`${(e/1e9).toFixed(t)} GWh`,Vm=(e,t=1)=>{if(le(e))return null;let r=Math.abs(e);return r>=1e9?Bm(e,t):r>=1e6?Fm(e,t):r>=1e3?Qc(e,t):$c(e,t)},aC={Wh:1,kWh:1e3,MWh:1e6,GWh:1e9},_c=(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*aC[t.sourceUnit]:r,n=t.decimals??1;if(t.unit)switch(t.unit){case "GWh":return Bm(o,n);case "MWh":return Fm(o,n);case "kWh":return Qc(o,n);case "Wh":return $c(o,n)}return t.autoScale!==false?Vm(o,n):$c(o,n)};ee.register("kWh",e=>typeof e=="number"?Qc(e):null);ee.register("autoScaleEnergy",(e,t)=>typeof e=="number"?Vm(e,typeof t=="number"?t:1):null);ee.register("energy",_c);var as=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},ed=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():as(e)},jn=e=>e?e.startsWith("+")||e.length>11?ed(e):as(e):null,zm=(e,t)=>{if(t.hideWhenNull&&e==null)return null;if(e==null)return t.nullText??null;let r=String(e);if(t.international)return ed(r);switch(t.country){case "US":case "CA":return as(r);default:return jn(r)}};ee.register("phoneNumber",e=>typeof e=="string"?jn(e):null);ee.register("usPhone",e=>typeof e=="string"?as(e):null);ee.register("internationalPhone",e=>typeof e=="string"?ed(e):null);var is=(e,t=0)=>le(e)?null:t===0?`${Math.round(e)} W`:`${e.toFixed(t)} W`,td=(e,t=1)=>le(e)?null:`${(e/1e3).toFixed(t)} kW`,rd=(e,t=1)=>le(e)?null:`${(e/1e6).toFixed(t)} MW`,od=(e,t=2)=>le(e)?null:`${(e/1e9).toFixed(t)} GW`,iC=(e,t)=>{if(le(e))return null;let r=Math.abs(e);return r>=1e9?od(e,t??2):r>=1e6?rd(e,t??1):r>=1e3?td(e,t??1):is(e,t??0)},nd=(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 od(r,o??2);case "MW":return rd(r,o??1);case "kW":return td(r,o??1);case "W":return is(r,o??0)}return t.autoScale!==false?iC(r,o):is(r,o??0)};ee.register("power",nd);var WM=is,GM=td,UM=rd,YM=od;var ad=(e,t=1)=>le(e)?null:`${(e*1e3).toFixed(t)} m\u03A9`,ss=(e,t=1)=>le(e)?null:`${e.toFixed(t)} \u03A9`,Om=(e,t=1)=>le(e)?null:`${(e/1e3).toFixed(t)} k\u03A9`,Hm=(e,t=2)=>le(e)?null:`${(e/1e6).toFixed(t)} M\u03A9`,sC=(e,t)=>{if(le(e))return null;let r=Math.abs(e);return r>=1e6?Hm(e,t??2):r>=1e3?Om(e,t??1):r<1?ad(e,t??1):ss(e,t??1)},id=(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 Hm(r,o??2);case "k\u03A9":return Om(r,o??1);case "m\u03A9":return ad(r,o??1);case "\u03A9":return ss(r,o??1)}return t.autoScale!==false?sC(r,o):ss(r,o??1)};ee.register("resistance",id);ee.register("ohms",e=>typeof e=="number"?ss(e):null);ee.register("milliohms",e=>typeof e=="number"?ad(e):null);var Wm=e=>{switch(e){case "FAHRENHEIT":return "F";case "CELSIUS":return "C";case "KELVIN":return "K";default:return "F"}},Gm=(e,t=0)=>le(e)?null:`${e.toFixed(t)}\xB0F`,Um=(e,t=true,r=0)=>le(e)?null:`${(t?(e-32)*(5/9):e).toFixed(r)}\xB0C`,Ym=(e,t=true,r=0)=>le(e)?null:`${(t?(e-32)*(5/9)+273.15:e+273.15).toFixed(r)}K`,lC=e=>e*9/5+32,cC=e=>(e-32)*(5/9),$M=e=>e+273.15,dC=e=>e-273.15,QM=e=>cC(e)+273.15,_M=e=>lC(dC(e)),Km=(e,t="F",r=0)=>{if(le(e))return null;switch(typeof t=="string"&&t.length>1?Wm(t):t){case "C":return Um(e,true,r);case "K":return Ym(e,true,r);default:return Gm(e,r)}},Jm=(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?Wm(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 Km(r,n,o)};ee.register("temperature",(e,t,r)=>typeof e=="number"?Km(e,typeof t=="string"?t:"F",typeof r=="number"?r:0):null);ee.register("fahrenheit",(e,t)=>typeof e=="number"?Gm(e,typeof t=="number"?t:0):null);ee.register("celsius",(e,t,r)=>typeof e=="number"?Um(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);ee.register("kelvin",(e,t,r)=>typeof e=="number"?Ym(e,typeof t=="boolean"?t:true,typeof r=="number"?r:0):null);var uC=(e,t)=>!!(t.hideWhenNull&&e==null||t.hideWhenZero&&e===0),jm=e=>e?.toUpperCase()??"",qm=e=>e?.toLowerCase()??"",Zm=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",Xm=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(" ")},$m=e=>e?e.split(/\s+/).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" "):"",Qm=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",_m=e=>e?e.replace(/([A-Z])/g," $1").replace(/^./,t=>t.toUpperCase()).trim():"",ef=e=>e?e.toLowerCase().split("_").map(t=>Qm(t)).join(" "):"",pC=e=>e?e.includes("_")?ef(e):e.toUpperCase()===e?Qm(e.toLowerCase()):_m(e):"",qn=(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)}`},ls=(e,t=8)=>e?e.length<=t?e:`...${e.slice(-t)}`:"",cs=(e,t=16,r="...")=>e?e.length<=t?e:e.slice(0,t)+r:"",mC=e=>{if(!e)return "";let t=e.toString(),r=t.slice(-4),o=t.length-4;return o>0?"*".repeat(o)+r:t},tf=(e,t)=>{if(uC(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=jm(r);break;case "lowercase":r=qm(r);break;case "capitalize":r=$m(r);break;case "titleCase":r=Xm(r);break;case "sentenceCase":r=Zm(r);break}}),t.truncate){let{length:o,position:n,ellipsis:a="..."}=t.truncate;switch(n){case "start":r=ls(r,o);break;case "middle":r=qn(r,o);break;case "end":r=cs(r,o,a);break}}return r};ee.register("uppercase",e=>jm(String(e)));ee.register("lowercase",e=>qm(String(e)));ee.register("sentenceCase",e=>Zm(String(e)));ee.register("titleCase",e=>Xm(String(e)));ee.register("capitalize",e=>$m(String(e)));ee.register("camelCaseToWords",e=>_m(String(e)));ee.register("snakeCaseToWords",e=>ef(String(e)));ee.register("enumToSentenceCase",e=>pC(String(e)));ee.register("truncateMiddle",(e,t)=>qn(String(e),typeof t=="number"?t:16));ee.register("truncateStart",(e,t)=>ls(String(e),typeof t=="number"?t:8));ee.register("truncateEnd",(e,t,r)=>cs(String(e),typeof t=="number"?t:16,typeof r=="string"?r:"..."));ee.register("secret",e=>mC(String(e)));var sd=(e,t=0)=>{if(le(e))return null;let r=e*1e3;return t===0?`${Math.round(r)} mV`:`${r.toFixed(t)} mV`},ds=(e,t=0)=>le(e)?null:t===0?`${Math.round(e)} V`:`${e.toFixed(t)} V`,ld=(e,t=1)=>le(e)?null:`${(e/1e3).toFixed(t)} kV`,fC=(e,t)=>{if(le(e))return null;let r=Math.abs(e);return r>=1e3?ld(e,t??1):r<1?sd(e,t??0):ds(e,t??0)},cd=(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 ld(r,o??1);case "mV":return sd(r,o??0);case "V":return ds(r,o??0)}return t.autoScale!==false?fC(r,o):ds(r,o??0)};ee.register("voltage",cd);var aE=sd,iE=ds,sE=ld;var gC=(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:Pm(r,t.decimals??0)},$o=(e,t)=>{switch(t.type){case "text":return tf(e,t);case "number":return Dm(e,t);case "percentage":return gC(e,t);case "currency":return Mm(e,t);case "date":return Em(e,t);case "boolean":return km(e,t);case "energy":return _c(e,t);case "power":return nd(e,t);case "voltage":return cd(e,t);case "current":return Kc(e,t);case "resistance":return id(e,t);case "temperature":return Jm(e,t);case "distance":return Im(e,t);case "phone":return zm(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}},CE=(e,t)=>({type:e,...t});function Ut(...e){return e.filter(Boolean).join(" ")}var Vr={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 dt(e,...t){return Ut(Vr[e],...t)}var Zn={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},V=Le.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=bC__namespace[e];if(!s)return process.env.NODE_ENV==="development"&&console.error(`Icon "${e}" not found in @phosphor-icons/react`),null;let c=typeof t=="string"&&t in Zn?Zn[t]:t,l=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:c,color:r,weight:o,className:l,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});V.displayName="Icon";var nf=Le.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:c,ariaLabel:l,ref:d,...u})=>{let m=typeof n=="string"&&n in Zn?Zn[n]:n,p=r?typeof r=="string"&&r in Zn?Zn[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(V,{...u,name:i,size:n,color:s,weight:c,className:a,ariaLabel:l})})});nf.displayName="IconWithContainer";function rr({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 PC({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 ot({children:e,showArrow:t=false,withBackdrop:r=false,className:o,isDismissable:n=true,disableGroup:a=false,...i}){let c=reactAriaComponents.useSlottedContext(reactAriaComponents.PopoverContext)?.trigger==="SubmenuTrigger",l=t?12:8;l=c?l-6:l;let d=jsxRuntime.jsxs(reactAriaComponents.Popover,{offset:l,...i,className:reactAriaComponents.composeRenderProps(o,(u,m)=>PC({...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(rr,{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:d})}):d}var MC={"--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 af(e){let t={...e};for(let[r,o]of Object.entries(MC))if(e[r])for(let n of o)e[n]||(t[n]=e[r]);return t}function sf(e){return e.replace(/[{}<>]/g,"")}function lf(e){return Object.entries(e).map(([t,r])=>`${sf(t)}: ${sf(r)};`).join(" ")}function df({variables:e,darkVariables:t,children:r}){let n=Le.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?af(e):null,c=i?af(t):null,l=s?`[data-brand-scope="${n}"] { ${lf(s)} }`:"",d=c?`.theme-dark [data-brand-scope="${n}"] { ${lf(c)} }`:"",u=[l,d].filter(Boolean).join(`
4
- `);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var Va=new Map,Nt=(e,t="#000000")=>{if(typeof window>"u")return t;let r=e.startsWith("var(")?e.slice(4,-1):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!r.startsWith("--color-")&&(r=`--color-${r.slice(2)}`),Va.has(r))return Va.get(r);try{let o=document.body||document.documentElement,a=getComputedStyle(o).getPropertyValue(r).trim();if(a)return Va.set(r,a),a;let i=document.createElement("div");i.style.color=`var(${r})`,document.body.appendChild(i);let s=getComputedStyle(i).color;return document.body.removeChild(i),s&&s!=="rgb(0, 0, 0)"?(Va.set(r,s),s):t}catch(o){return console.warn(`Failed to resolve color for ${e}:`,o),t}},us=()=>{Va.clear();},za=()=>{let e=[];for(let t=1;t<=12;t++){let r=Nt(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?uf():e},uf=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],pd=()=>Nt("--color-viz-default","#444ae1"),LC=(e,t)=>{let r={},o=za();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r};var pf=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},AC=e=>pf(e)?Nt("--color-text-primary","#333333"):Nt("--color-text-inverse","#ffffff"),mf=(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()},ff=e=>{let t=za(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var md=(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)},fd=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]},gf=(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},gd=(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=Nt(i);n.push(s);}return n},bd=(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=Nt(i);n.push(s);}return n},Oa=(e,t,r,o="viridis")=>{let n=gd(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]},Ha=(e,t,r,o,n="redYellowBlue")=>{let a=bd(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 c=(e-t)/(o-t)*i,l=Math.floor(c);return a[Math.min(l,i)]}else {let s=(e-o)/(r-o),c=i+s*(a.length-1-i),l=Math.floor(c);return a[Math.min(l,a.length-1)]}};var xd=Le.createContext({mode:"system",colorMode:"light",isDarkTheme:false,toggleTheme:()=>{}}),Yt=()=>Le.useContext(xd);function zC(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hf(){if(typeof window>"u")return "system";let e=localStorage.getItem("colorModePreference");return e==="light"||e==="dark"||e==="system"?e:"system"}function yf(e){return e==="system"?zC():e}var Cf=({children:e})=>{let[t,r]=Le.useState(hf),[o,n]=Le.useState(()=>yf(hf())),a=o==="dark",i=Le.useCallback(c=>{c==="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")),us();},[]);Le.useEffect(()=>{us();let c=yf(t);if(n(c),i(c),t==="system"){let l=window.matchMedia("(prefers-color-scheme: dark)"),d=u=>{let m=u.matches?"dark":"light";n(m),i(m);};return l.addEventListener("change",d),()=>{l.removeEventListener("change",d);}}},[t,i]);let s=Le.useCallback(()=>{r(c=>{let l=c==="system"?"light":c==="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 Xn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _o(e,t){return Xn(e)?t.format(e):""}function Sf(e){if(!Xn(e.start)||!Xn(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=>_o(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=>_o(i,a)}function hd(e,t){if(!Xn(e.start)||!Xn(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=l=>d=>Xn(d)?l(d):"";if(r<=24){if(o)return n(d=>{let u=d.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let l=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return d=>_o(d,l)}if(r<=48){if(o)return n(d=>{let u=d.getMonth()+1,m=d.getDate(),p=d.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 d=>_o(d,l)}if(r<=168){if(o)return n(d=>{let u=d.getDate();return `${d.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let l=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return d=>_o(d,l)}if(r<=720){if(o)return n(d=>{let u=d.getMonth()+1,m=d.getDate();return `${u}/${m}`});let l=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return d=>_o(d,l)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(l=>{let d=l.getMonth()+1,u=l.getDate(),m=s?`/${l.getFullYear().toString().slice(-2)}`:"";return `${d}/${u}${m}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return l=>_o(l,c)}function Ue(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 ve(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var Ae={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 UC="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",YC="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",KC={primary:YC,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-action-destructive text-[color:var(--color-action-destructive-text)] hover:bg-action-destructive-hover forced-colors:bg-[Mark] forced-colors:text-[MarkText] border-2 border-transparent",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"},Nf={full:"w-full",default:"w-fit"},JC="opacity-50 cursor-not-allowed pointer-events-none",jC="opacity-100 cursor-pointer",qC={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},ZC={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-action-destructive text-[color:var(--color-action-destructive-text)] hover:bg-action-destructive-hover forced-colors:bg-[Mark] forced-colors:text-[MarkText] border-2 border-transparent"};function XC(e){return !e||e==="default"||e==="brand"?"primary":e}function $C(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=XC(t),s=i==="unstyled"?"":`${UC} ${KC[i]}`;i!=="unstyled"&&(s+=` ${Ae[r].text} ${Ae[r].height} ${Ae[r].padding} ${Ae[r].gap}`),o||a?s+=` ${JC}`:s+=` ${jC}`,n?s+=` ${Nf.full}`:s+=` ${Nf.default}`;let c=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,Ue(),c].filter(Boolean).join(" ")}function Q(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:c,href:l,className:d,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:x,...b}=e,v=t?jsxRuntime.jsx(V,{name:t,size:i,weight:c}):null,C=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,typeof r=="function"?null:r,s==="right"&&v]}),y=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(V,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:C}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),S=(u??0)>0,N=tailwindMerge.twMerge($C(e),d),R=l?{href:l,target:f,rel:x,...b}:{};if(l){let{onPress:T,onPressStart:E,onPressEnd:I,onPressChange:F,onPressUp:w,onAuxClick:k,onContextMenu:H,onDoubleClick:A,...B}=b;Object.assign(R,B);}let M=l?jsxRuntime.jsx(reactAriaComponents.Link,{...R,...o&&{"aria-busy":true},style:S?void 0:g,className:N,children:o?y:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(T),s==="right"&&v]})}):C}):jsxRuntime.jsx(reactAriaComponents.Button,{...b,...o&&{"aria-busy":true},style:S?void 0:g,className:N,children:o?y:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(T),s==="right"&&v]})}):C});return S?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",d),style:g,children:[M,jsxRuntime.jsx("span",{className:`absolute ${qC[p]} flex h-5 w-5 items-center justify-center rounded-full ${ZC[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):M}function vd({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(Q,{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 To({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(vd,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(vd,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(vd,{action:e,defaultVariant:"primary"})]})]})]})}var QC={heading:{sm:Vr.headingSm,md:Vr.headingMd,lg:Vr.headingLg,xl:Vr.headingXl},display:{sm:Vr.displaySm,md:Vr.displayMd,lg:Vr.displayLg,xl:Vr.displayXl}},_C={page:"h-16 leading-[62px]"};function Kt({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=QC[t][i],c=o?_C[o]:"";return jsxRuntime.jsx(e,{className:Ut(s,"text-text-primary",c,n),children:a})}var It=({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(Q,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(V,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(Kt,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(Q,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(V,{name:"X","data-testid":"close-button"})})]})]});var j=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:c=0,adjustAnimationSpeedBasedOnWidth:l=false,ariaLabel:d,className:u,"data-testid":m})=>{let[p,g]=Le.useState(c===0);if(Le.useEffect(()=>{if(c>0){let S=setTimeout(()=>g(true),c);return ()=>clearTimeout(S)}},[c]),!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 S=typeof e=="number"?e:parseFloat(String(e));return isNaN(S)?"":`animation-duration-[${Math.max(.8,S/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}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let C=a?"flex-1 min-w-0":"",y=s?Object.entries(s).map(([S,N])=>`${S}:w-[${N}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((S,N)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,C,y,u),style:{width:S,height:t}},N))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,C,y,u),style:{width:e,height:t},role:"presentation","aria-hidden":!d,"aria-label":d??void 0,"data-testid":m})},Pf=({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 aS={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"},iS="rounded-lg",Sd={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},sS={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Ie({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",aS[e],iS,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(j,{width:"100%",height:"100%",className:"rounded-none"}):r})}function wd({title:e,subtitle:t,actions:r,className:o,isLoading:n=false}){return n?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",o),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?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",o),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(Kt,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:dt("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function Nd({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",Sd[r],o),children:jsxRuntime.jsx(j,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Sd[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Sd[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function kd({className:e,children:t,isLoading:r=false,fill:o=false}){let a=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(a,o&&"flex-1 flex flex-col min-h-0",e),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("px-6 py-4 text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),children:t}):null}function Td({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",sS[r],e),children:t}):null}Ie.Header=wd;Ie.Media=Nd;Ie.Content=kd;Ie.Footer=Td;var Tr=class extends Le.Component{constructor(){super(...arguments);Ia(this,"state",{hasError:false});Ia(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(Ie,{children:[this.props.title&&jsxRuntime.jsx(Ie.Header,{title:this.props.title}),jsxRuntime.jsx(Ie.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 uS=.3,pS=.5;function nt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:c,isDismissable:l=true,transparentOverlay:d=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:x="640px",contentPadding:b=true,showHandle:v=true,animationVariant:C="scale",className:y}){let[S,N]=Le.useState(false),[R,M]=Le.useState(0),[T,E]=Le.useState(false),I=ts(s),F=I?.height??null,w=I?.keyboardOffset??0,k=Le.useRef(null),H=Le.useRef(null),A=Le.useRef(null),B=Le.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});Le.useEffect(()=>{if(s){let D=setTimeout(()=>{N(true),setTimeout(()=>N(false),600);},400);return ()=>clearTimeout(D)}},[s]),Le.useEffect(()=>{s||(M(0),E(false),B.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),Le.useEffect(()=>{let D=H.current;if(!D||!s)return;let z=null,L=h=>{let O=h.target;O&&["INPUT","TEXTAREA","SELECT"].includes(O.tagName)&&(z&&clearTimeout(z),z=setTimeout(()=>{O.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return D.addEventListener("focusin",L),()=>{D.removeEventListener("focusin",L),z&&clearTimeout(z);}},[s]);let Y=Le.useCallback(D=>{l&&(D.pointerType!=="touch"&&D.pointerType!=="pen"||(A.current&&(clearTimeout(A.current),A.current=null),B.current={isDragging:true,startY:D.clientY,startTime:Date.now(),pointerId:D.pointerId},E(false),D.currentTarget.setPointerCapture(D.pointerId)));},[l]),q=Le.useCallback(D=>{let{isDragging:z,startY:L,pointerId:h}=B.current;if(!z||D.pointerId!==h)return;let O=D.clientY-L;M(Math.max(0,O));},[]),G=Le.useCallback(D=>{let{isDragging:z,startY:L,startTime:h,pointerId:O}=B.current;if(!z||D.pointerId!==O)return;let W=D.clientY-L,K=Date.now()-h,te=W/K;B.current={isDragging:false,startY:0,startTime:0,pointerId:null};let J=(k.current?.getBoundingClientRect().height??0)*uS;(W>J||te>pS&&W>50)&&l?(c?.(),M(0)):(E(true),M(0),A.current=setTimeout(()=>{E(false),A.current=null;},200));},[l,c]);if(!s)return null;let U=t||r,P=u||m||p;return jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{isOpen:s,onOpenChange:D=>{D||c?.();},isDismissable:l,transparent:d,style:{paddingBottom:w>0?`${w}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:k,className:tailwindMerge.twMerge("w-full",T&&"transition-transform duration-200"),style:{transform:R>0?`translateY(${R}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",C==="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)]",C==="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)]",y),style:{maxWidth:x,...f?{height:f}:{maxHeight:/\d/.test(g)?F!==null?`min(${g}, ${Math.max(F-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[v&&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:Y,onPointerMove:q,onPointerUp:G,onPointerCancel:G,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",S&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),U&&(a?jsxRuntime.jsx(It,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!c,hasBackArrow:true,onBack:i??(()=>{}),onClose:c||(()=>{})}):jsxRuntime.jsx(It,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!c,onClose:c||(()=>{})})),jsxRuntime.jsx("div",{ref:H,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",b?"p-4":"p-0"),children:e}),P&&jsxRuntime.jsx(To,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}nt.displayName="Tray";function _n({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:c,useMobileTray:l=true,popoverClassName:d}){let[u,m]=Le.useState(false),{isMobile:p}=Wt();if(l&&p){let f=Le__namespace.default.isValidElement(e)?Le__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,v=(C=>{if(typeof C=="string")return C;if(Le__namespace.default.isValidElement(C)){let y=C.props;if(typeof y.children=="string")return y.children;if(Array.isArray(y.children))return y.children.find(N=>typeof N=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(nt,{isOpen:u,onClose:()=>m(false),title:v,contentPadding:false,headerContent:s,footerContent:c,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(C=>jsxRuntime.jsxs("button",{onClick:()=>{C.disabled||(C.onAction?C.onAction():i?.(C),m(false));},disabled:C.disabled,"data-testid":C.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!C.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",C.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",C.disabled&&"opacity-50 cursor-not-allowed"),children:[C.iconName&&jsxRuntime.jsx(V,{name:C.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:C.render?C.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:C.subtitle?"font-medium":"",children:C.name}),C.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:C.subtitle})]})})]},C.id))})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(ot,{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",d),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1",d),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(xS,{id:f.id,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))}),c?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:c}):null]})})]})})}function xS({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:c,...l}){let d={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",!c&&d[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",!c&&d[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(V,{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(V,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var ro=({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 gr({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(ro,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}var ea=Le.createContext({variant:"timeline",size:"md"});function Ff(){return Le.useContext(ea)}function gs(e){return Le.isValidElement(e)&&e.type===hs}function kS(e){return Le.isValidElement(e)&&e.type===xs}function Ld({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:c=null,renderLoadingSkeleton:l,loadingSkeletonCount:d=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:x,height:b,maxHeight:v,...C}){let y=Le.useRef(null),{isMobile:S}=Wt(),N=S?"stacked":e,R=n!==void 0&&a!==void 0,{scrollRef:M,loadMoreRef:T,virtualizer:E,virtualItems:I,isLoadingMore:F,computedLoadingState:w}=So({items:n||[],onLoadMore:R?m:void 0,hasMore:R?p:false,isLoading:i,loadingState:s,enableVirtualization:R?g:false,estimatedItemSize:f||(N==="stacked"?120:150),overscan:5}),k=R&&M?M:y,H=Le.useMemo(()=>({variant:N,size:t}),[N,t]),A=N==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",B=N==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",Y={};if(R&&m&&(b?(Y.height=typeof b=="number"?`${b}px`:b,Y.overflowY="auto"):v?(Y.maxHeight=typeof v=="number"?`${v}px`:v,Y.overflowY="auto"):(Y.height="600px",Y.overflowY="auto")),R){let U=w==="loading"||i&&(!n||n.length===0);if(U){let D=l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:d}).map((z,L)=>jsxRuntime.jsx("div",{children:l()},`skeleton-${L}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:d}).map((z,L)=>{let h=t==="sm"?"gap-2":"gap-3";if(N==="timeline"){let O=t==="sm"?"pt-3":"pt-4",W=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 ${O}`,children:[jsxRuntime.jsx(j,{width:32,height:32,variant:"circle"}),L<d-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} ${W} 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 ${h}`,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(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:D})})}if(c)return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:c})})});if(!n||n.length===0)return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let P=E?I?.map(D=>({virtualItem:D,item:n[D.index],index:D.index}))||[]:n.map((D,z)=>({item:D,index:z,virtualItem:null}));return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsxs("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:{...Y,position:E?"relative":void 0},...C,children:[E?jsxRuntime.jsxs("div",{style:{height:`${E.getTotalSize()}px`,position:"relative"},children:[P.map(({item:D,index:z,virtualItem:L})=>{if(!D||!L)return null;let h=a(D,z),O=N==="timeline"&&Le.isValidElement(h)&&gs(h)?Le.cloneElement(h,{showConnector:z!==n.length-1}):h;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:O},`item-${z}`)}),F&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%"},children:x||jsxRuntime.jsx(gr,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[P.map(({item:D,index:z})=>{let L=a(D,z);if(N==="timeline"&&Le.isValidElement(L)&&gs(L)){let h=z===n.length-1;return jsxRuntime.jsx("div",{children:Le.cloneElement(L,{showConnector:!h})},`item-${z}`)}return jsxRuntime.jsx("div",{children:L},`item-${z}`)}),F&&(x||jsxRuntime.jsx(gr,{state:"loading-more"}))]}),m&&p&&!U&&jsxRuntime.jsx("div",{ref:T,style:E?{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let q=Le.Children.toArray(o),G=q.map((U,P)=>{if(gs(U)){let D=U.props.showConnector??(N==="timeline"&&P<q.length-1),z=N==="timeline"&&P>0;return Le.cloneElement(U,{showConnector:D,showIncomingConnector:z})}if(kS(U)){let D=P===q.length-1;return Le.cloneElement(U,{__isLastGroup:D,__isFirstGroup:P===0})}return U});return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),...C,children:G})})}Ld.displayName="ActivityFeed";function xs(e){let{variant:t,size:r}=Ff(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:c=false,__isFirstGroup:l=false,...d}=e,u=Le.Children.toArray(i),m=u.map((f,x)=>{if(gs(f)){let b=f.props.showConnector??(t==="timeline"&&!(c&&x===u.length-1));return Le.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),...d,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})]})}xs.displayName="ActivityFeedGroup";var Af={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"},TS={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"},PS={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 hs(e){let{variant:t,size:r}=Ff(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:c,visual:l,icon:d,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:x=false,interactive:b,className:v,children:C,onKeyDown:y,showIncomingConnector:S,...N}=e,R=l??(d?jsxRuntime.jsx(V,{name:d,weight:u||"fill",className:"h-4 w-4"}):null),M=p??(t==="stacked"?"minimal":"subtle"),T=r==="sm"?"gap-2":"gap-3",E="text-xs text-text-secondary",I=r==="sm"?"text-sm":"text-[15px]",F="text-xs text-text-secondary",w=b??typeof N.onClick=="function",k=P=>{if(!w){y?.(P);return}P.key===" "?P.preventDefault():P.key==="Enter"&&(P.preventDefault(),P.currentTarget.click()),y?.(P);},H=P=>{w&&P.key===" "&&(P.preventDefault(),P.currentTarget.click());},A=w?tailwindMerge.twMerge("group cursor-pointer",Ue()):void 0,Y=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",M==="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",Af[m]),children:R}),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"})]}),q=g?tailwindMerge.twMerge(TS[m],M==="minimal"?"rounded-md border border-border-muted":PS[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:w?"button":void 0,tabIndex:w?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"}[M],q,A,w?"transition-colors hover:bg-background-subtle/80":"",v),onKeyDown:k,onKeyUp:H,...N,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",Af[m]),children:R}),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",I),children:n}),i&&jsxRuntime.jsx("div",{className:F,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),C,c&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:c}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",E),children:a})]})]});let G=M==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",U={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:w?"button":void 0,tabIndex:w?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",A,v),onKeyDown:k,onKeyUp:H,...N,children:[x?jsxRuntime.jsx("div",{}):Y,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",T,G,U[M],q,w?"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",I),children:n}),i&&jsxRuntime.jsx("div",{className:F,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),C,c&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:c})]})]})}hs.displayName="ActivityItem";function br({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:c,primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:x="85vh",height:b,mobileMaxHeight:v="90vh",mobileHeight:C,contentPadding:y=true,className:S}){let N=Ht("(max-width: 767px)"),R=ts(N&&e===void 0),M=R?.height??null,T=R?.keyboardOffset??0,E=Le.useRef(null),I=Le.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]),F=Le.useRef(null),w=Le.useRef(null);Le.useEffect(()=>{let Y=w.current;if(!Y||!N)return;let q=null,G=U=>{let P=U.target;P&&["INPUT","TEXTAREA","SELECT"].includes(P.tagName)&&(q&&clearTimeout(q),q=setTimeout(()=>{P.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return Y.addEventListener("focusin",G),()=>{Y.removeEventListener("focusin",G),q&&clearTimeout(q);}},[N]);let k=Le.useCallback(()=>{F.current&&F.current.scrollTop!==0&&(F.current.scrollTop=0);},[]);if(e===false)return null;let H=r||o,A=l||d||u||m,B=e!==void 0;return N?B?jsxRuntime.jsx(nt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:l,secondaryAction:d,footerContent:m,transparentOverlay:p,maxHeight:v,height:C,maxWidth:g,contentPadding:y,showHandle:true,animationVariant:"scale",className:S,children:c}):jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{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:I,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",S),style:{...C?{height:C}:{maxHeight:/\d/.test(v)?M!==null?`min(${v}, ${Math.max(M-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},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"})}),H&&(i?jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",y?"px-6 py-6":"p-0"),children:c}),A&&jsxRuntime.jsx(To,{primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{...B?{isOpen:e,onOpenChange:Y=>{!Y&&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:F,onScroll:k,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",S),style:{minWidth:f,...b?{height:b}:{maxHeight:x}},children:[H&&(i?jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(It,{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",y?"px-6 py-6":"p-0"),children:c}),A&&jsxRuntime.jsx(To,{primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m})]})})})})}function Wf({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(br,{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 vs=({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 c=r||270,l=c/270*80;return jsxRuntime.jsxs("svg",{width:c,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 Cs=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:c="app-sidebar-collapse"})=>{let l=p=>p.length>0&&"items"in p[0],d=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","data-collapse-hide":"",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","data-collapse-hide":""})]},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","data-collapse-center":"",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","data-collapse-icon":"",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200","data-collapse-hide":"",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1","data-collapse-hide":""}),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","data-collapse-hide":"",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","data-collapse-hide-category":"",children:p.children.map(v=>m(v,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,"data-collapse-center":g?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","data-collapse-icon":"",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200","data-collapse-hide":"",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","data-collapse-hide":"",children:o||jsxRuntime.jsx(vs,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:c,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":"Toggle sidebar","data-collapse-toggle":"",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:"M4 6h16M4 12h16M4 18h16"})})}),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:d(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",{"data-collapse-hide":"",children:r})})]})]})};var Po={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},rn=Le.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=MS__namespace[e];if(!s)return null;let c=typeof t=="string"?t in Po?Po[t]:Po.md:t,l=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:c,color:r,weight:o,className:l,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});rn.displayName="IconSSR";var ES=Le.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:c,ariaLabel:l,ref:d,...u})=>{let m=typeof n=="string"?n in Po?Po[n]:Po.md:n,p=r?typeof r=="string"?r in Po?Po[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(rn,{...u,name:i,size:n,color:s,weight:c,className:a,ariaLabel:l})})});ES.displayName="IconSSRWithContainer";var Ja=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:c,className:l="",mobileMenuId:d="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(rn,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(rn,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(rn,{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:d,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(rn,{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()}),c,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function Kf({sideNav:e,topNav:t,children:r,contentPaddingX:o,contentPaddingY:n,showSidebarBorder:a=true,mainClassName:i,enableJsEnhancements:s=false}){let c="app-mobile-menu",l="app-sidebar-collapse";return jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative",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(Ja,{...t,mobileMenuId:c,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",t?.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("aside",{id:"app-sidebar",className:["bg-background-surface","border-r border-border-default","transition-all duration-300 ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-80 md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",a?"":"!border-r-0",e?.className||""].filter(Boolean).join(" "),children:jsxRuntime.jsx(Cs,{...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",children:jsxRuntime.jsx(Ja,{...t,className:t?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body",o,n,i||""].join(" "),role:"main",children:r})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
4
+ `);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),jsxRuntime.jsx("div",{"data-brand-scope":n,children:r})]})}var Va=new Map,Nt=(e,t="#000000")=>{if(typeof window>"u")return t;let r=e.startsWith("var(")?e.slice(4,-1):e.startsWith("--")?e:`--${e}`;if(!e.startsWith("--")&&!e.startsWith("var(")&&!r.startsWith("--color-")&&(r=`--color-${r.slice(2)}`),Va.has(r))return Va.get(r);try{let o=document.body||document.documentElement,a=getComputedStyle(o).getPropertyValue(r).trim();if(a)return Va.set(r,a),a;let i=document.createElement("div");i.style.color=`var(${r})`,document.body.appendChild(i);let s=getComputedStyle(i).color;return document.body.removeChild(i),s&&s!=="rgb(0, 0, 0)"?(Va.set(r,s),s):t}catch(o){return console.warn(`Failed to resolve color for ${e}:`,o),t}},us=()=>{Va.clear();},za=()=>{let e=[];for(let t=1;t<=12;t++){let r=Nt(`--color-viz-categorical-${t}`,"");r&&e.push(r);}return e.length===0?uf():e},uf=()=>["#5424db","#d92361","#e86a00","#5d89ff","#9a47e2","#f24cb8","#0ba286","#9c28af","#036e45","#52a119","#ff513d","#046691"],pd=()=>Nt("--color-viz-default","#444ae1"),LC=(e,t)=>{let r={},o=za();return e.forEach((n,a)=>{t&&t[n]?r[n]=t[n]:r[n]=o[a%o.length];}),r};var pf=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},AC=e=>pf(e)?Nt("--color-text-primary","#333333"):Nt("--color-text-inverse","#ffffff"),mf=(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()},ff=e=>{let t=za(),r={};return e.forEach((o,n)=>{r[o]=t[n%t.length];}),r};var md=(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)},fd=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]},gf=(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},gd=(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=Nt(i);n.push(s);}return n},bd=(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=Nt(i);n.push(s);}return n},Oa=(e,t,r,o="viridis")=>{let n=gd(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]},Ha=(e,t,r,o,n="redYellowBlue")=>{let a=bd(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 c=(e-t)/(o-t)*i,l=Math.floor(c);return a[Math.min(l,i)]}else {let s=(e-o)/(r-o),c=i+s*(a.length-1-i),l=Math.floor(c);return a[Math.min(l,a.length-1)]}};var xd=Le.createContext({mode:"system",colorMode:"light",isDarkTheme:false,toggleTheme:()=>{}}),Yt=()=>Le.useContext(xd);function zC(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hf(){if(typeof window>"u")return "system";let e=localStorage.getItem("colorModePreference");return e==="light"||e==="dark"||e==="system"?e:"system"}function yf(e){return e==="system"?zC():e}var Cf=({children:e})=>{let[t,r]=Le.useState(hf),[o,n]=Le.useState(()=>yf(hf())),a=o==="dark",i=Le.useCallback(c=>{c==="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")),us();},[]);Le.useEffect(()=>{us();let c=yf(t);if(n(c),i(c),t==="system"){let l=window.matchMedia("(prefers-color-scheme: dark)"),d=u=>{let m=u.matches?"dark":"light";n(m),i(m);};return l.addEventListener("change",d),()=>{l.removeEventListener("change",d);}}},[t,i]);let s=Le.useCallback(()=>{r(c=>{let l=c==="system"?"light":c==="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 Xn(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _o(e,t){return Xn(e)?t.format(e):""}function Sf(e){if(!Xn(e.start)||!Xn(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=>_o(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=>_o(i,a)}function hd(e,t){if(!Xn(e.start)||!Xn(e.end))return ()=>"";let r=(e.end.getTime()-e.start.getTime())/(1e3*60*60),o=t?.compact??false,n=l=>d=>Xn(d)?l(d):"";if(r<=24){if(o)return n(d=>{let u=d.getHours(),m=u>=12?"pm":"am";return `${u%12||12}${m}`});let l=new Intl.DateTimeFormat("en",{hour:"numeric",minute:"2-digit"});return d=>_o(d,l)}if(r<=48){if(o)return n(d=>{let u=d.getMonth()+1,m=d.getDate(),p=d.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 d=>_o(d,l)}if(r<=168){if(o)return n(d=>{let u=d.getDate();return `${d.toLocaleDateString("en",{weekday:"short"}).charAt(0)}${u}`});let l=new Intl.DateTimeFormat("en",{weekday:"short",day:"numeric"});return d=>_o(d,l)}if(r<=720){if(o)return n(d=>{let u=d.getMonth()+1,m=d.getDate();return `${u}/${m}`});let l=new Intl.DateTimeFormat("en",{month:"short",day:"numeric"});return d=>_o(d,l)}let a=e.start.getFullYear(),i=e.end.getFullYear(),s=a!==i;if(o)return n(l=>{let d=l.getMonth()+1,u=l.getDate(),m=s?`/${l.getFullYear().toString().slice(-2)}`:"";return `${d}/${u}${m}`});let c=new Intl.DateTimeFormat("en",{month:"short",day:"numeric",...s&&{year:"numeric"}});return l=>_o(l,c)}function Ue(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 ve(e,t){return reactAriaComponents.composeRenderProps(e,r=>tailwindMerge.twMerge(t,r))}var Ae={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 UC="flex font-medium justify-center items-center gap-2 text-center transition rounded-[var(--control-border-radius)] whitespace-nowrap box-border",YC="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",KC={primary:YC,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"},Nf={full:"w-full",default:"w-fit"},JC="opacity-50 cursor-not-allowed pointer-events-none",jC="opacity-100 cursor-pointer",qC={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},ZC={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function XC(e){return !e||e==="default"||e==="brand"?"primary":e}function $C(e){let{variant:t="primary",size:r="md",isDisabled:o,fullWidth:n=false,isLoading:a=false}=e,i=XC(t),s=i==="unstyled"?"":`${UC} ${KC[i]}`;i!=="unstyled"&&(s+=` ${Ae[r].text} ${Ae[r].height} ${Ae[r].padding} ${Ae[r].gap}`),o||a?s+=` ${JC}`:s+=` ${jC}`,n?s+=` ${Nf.full}`:s+=` ${Nf.default}`;let c=i==="primary"?"focus-visible:outline-action-primary":void 0;return [s,Ue(),c].filter(Boolean).join(" ")}function Q(e){let{icon:t,children:r,isLoading:o=false,loadingText:n,loadingIndicator:a,size:i="md",iconPosition:s="left",iconWeight:c,href:l,className:d,badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",style:g,target:f,rel:x,...b}=e,v=t?jsxRuntime.jsx(V,{name:t,size:i,weight:c}):null,C=jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,typeof r=="function"?null:r,s==="right"&&v]}),y=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(V,{name:"CircleNotch",size:i,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:C}),n&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:n})]}),S=(u??0)>0,N=tailwindMerge.twMerge($C(e),d),R=l?{href:l,target:f,rel:x,...b}:{};if(l){let{onPress:T,onPressStart:E,onPressEnd:I,onPressChange:F,onPressUp:w,onAuxClick:k,onContextMenu:H,onDoubleClick:A,...B}=b;Object.assign(R,B);}let M=l?jsxRuntime.jsx(reactAriaComponents.Link,{...R,...o&&{"aria-busy":true},style:S?void 0:g,className:N,children:o?y:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(T),s==="right"&&v]})}):C}):jsxRuntime.jsx(reactAriaComponents.Button,{...b,...o&&{"aria-busy":true},style:S?void 0:g,className:N,children:o?y:typeof r=="function"?(function(T){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s==="left"&&v,r(T),s==="right"&&v]})}):C});return S?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("relative flex",d),style:g,children:[M,jsxRuntime.jsx("span",{className:`absolute ${qC[p]} flex h-5 w-5 items-center justify-center rounded-full ${ZC[m]} text-xs font-medium`,"aria-label":`${u} items`,children:u})]}):M}function vd({action:e,defaultVariant:t,defaultSize:r="lg"}){let o=!!e.formId;return jsxRuntime.jsx(Q,{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 To({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(vd,{action:r,defaultVariant:"destructive"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[t&&jsxRuntime.jsx(vd,{action:t,defaultVariant:"secondary"}),e&&jsxRuntime.jsx(vd,{action:e,defaultVariant:"primary"})]})]})]})}var QC={heading:{sm:Vr.headingSm,md:Vr.headingMd,lg:Vr.headingLg,xl:Vr.headingXl},display:{sm:Vr.displaySm,md:Vr.displayMd,lg:Vr.displayLg,xl:Vr.displayXl}},_C={page:"h-16 leading-[62px]"};function Kt({tag:e="h1",variant:t="heading",size:r="lg",height:o,className:n="",children:a}){let i=r==="xs"?"sm":r,s=QC[t][i],c=o?_C[o]:"";return jsxRuntime.jsx(e,{className:Ut(s,"text-text-primary",c,n),children:a})}var It=({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(Q,{variant:"icon",onPress:a,className:"absolute left-6","aria-label":"Go back",children:jsxRuntime.jsx(V,{name:"CaretLeft","data-testid":"back-arrow"})}),i||jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[e&&jsxRuntime.jsx(Kt,{size:"xs",children:e}),t&&!r&&jsxRuntime.jsx(Q,{variant:"icon",onPress:t,"aria-label":"Close dialog",children:jsxRuntime.jsx(V,{name:"X","data-testid":"close-button"})})]})]});var j=({width:e,height:t,variant:r="rect",animation:o="pulse",gradient:n=false,flex:a=false,stack:i,responsive:s,delay:c=0,adjustAnimationSpeedBasedOnWidth:l=false,ariaLabel:d,className:u,"data-testid":m})=>{let[p,g]=Le.useState(c===0);if(Le.useEffect(()=>{if(c>0){let S=setTimeout(()=>g(true),c);return ()=>clearTimeout(S)}},[c]),!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 S=typeof e=="number"?e:parseFloat(String(e));return isNaN(S)?"":`animation-duration-[${Math.max(.8,S/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}`:"",v="rounded-sm";r==="circle"&&(v="rounded-full"),r==="text"&&(v="h-4 w-full rounded-sm");let C=a?"flex-1 min-w-0":"",y=s?Object.entries(s).map(([S,N])=>`${S}:w-[${N}]`).join(" "):"";return i?jsxRuntime.jsx("div",{className:"space-y-2","data-testid":m,children:i.map((S,N)=>jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,C,y,u),style:{width:S,height:t}},N))}):jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(f,b,v,C,y,u),style:{width:e,height:t},role:"presentation","aria-hidden":!d,"aria-label":d??void 0,"data-testid":m})},Pf=({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 aS={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"},iS="rounded-lg",Sd={square:"aspect-square",video:"aspect-video",wide:"aspect-[2/1]",auto:""},sS={start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between"};function Ie({variant:e="outlined",className:t,children:r,isLoading:o=false,layout:n="default"}){return jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("w-full overflow-hidden",aS[e],iS,n==="flex"&&"flex flex-col",t),"data-testid":"card",children:o?jsxRuntime.jsx(j,{width:"100%",height:"100%",className:"rounded-none"}):r})}function wd({title:e,subtitle:t,actions:r,className:o,isLoading:n=false}){return n?jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("p-6 pb-4",o),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?null:jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("p-6 pb-4",o),children:jsxRuntime.jsxs("div",{className:"flex justify-between items-start gap-4",children:[jsxRuntime.jsxs("div",{className:"min-w-0 flex-1",children:[e&&jsxRuntime.jsx("div",{className:"mb-1",children:typeof e=="string"?jsxRuntime.jsx(Kt,{tag:"h3",size:"sm",className:"text-text-primary",children:e}):e}),t&&jsxRuntime.jsx("div",{className:dt("bodySm","text-text-secondary"),children:t})]}),r&&jsxRuntime.jsx("div",{className:"flex-shrink-0",children:r})]})})}function Nd({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",Sd[r],o),children:jsxRuntime.jsx(j,{width:"100%",height:"100%"})}):n?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Sd[r],o),children:n}):e?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("overflow-hidden",Sd[r],o),children:jsxRuntime.jsx("img",{src:e,alt:t||"",className:"w-full h-full object-cover",loading:"lazy"})}):null}function kd({className:e,children:t,isLoading:r=false,fill:o=false}){let a=e?.match(/p(?:t|b|l|r|x|y)?-(?:\d+(?:\.\d+)?|px|\[.+?\])/)?"":"px-6 py-4";return r?jsxRuntime.jsx("div",{className:tailwindMerge.twMerge(a,o&&"flex-1 flex flex-col min-h-0",e),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("px-6 py-4 text-text-primary",o&&"flex-1 flex flex-col min-h-0",e),children:t}):null}function Td({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",sS[r],e),children:t}):null}Ie.Header=wd;Ie.Media=Nd;Ie.Content=kd;Ie.Footer=Td;var Tr=class extends Le.Component{constructor(){super(...arguments);Ia(this,"state",{hasError:false});Ia(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(Ie,{children:[this.props.title&&jsxRuntime.jsx(Ie.Header,{title:this.props.title}),jsxRuntime.jsx(Ie.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 uS=.3,pS=.5;function nt({children:e,title:t,headerContent:r,titleAlign:o="left",hideCloseIcon:n=false,hasBackArrow:a=false,onBack:i,isOpen:s,onClose:c,isDismissable:l=true,transparentOverlay:d=false,primaryAction:u,secondaryAction:m,footerContent:p,maxHeight:g="80vh",height:f,maxWidth:x="640px",contentPadding:b=true,showHandle:v=true,animationVariant:C="scale",className:y}){let[S,N]=Le.useState(false),[R,M]=Le.useState(0),[T,E]=Le.useState(false),I=ts(s),F=I?.height??null,w=I?.keyboardOffset??0,k=Le.useRef(null),H=Le.useRef(null),A=Le.useRef(null),B=Le.useRef({isDragging:false,startY:0,startTime:0,pointerId:null});Le.useEffect(()=>{if(s){let D=setTimeout(()=>{N(true),setTimeout(()=>N(false),600);},400);return ()=>clearTimeout(D)}},[s]),Le.useEffect(()=>{s||(M(0),E(false),B.current={isDragging:false,startY:0,startTime:0,pointerId:null});},[s]),Le.useEffect(()=>{let D=H.current;if(!D||!s)return;let z=null,L=h=>{let O=h.target;O&&["INPUT","TEXTAREA","SELECT"].includes(O.tagName)&&(z&&clearTimeout(z),z=setTimeout(()=>{O.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return D.addEventListener("focusin",L),()=>{D.removeEventListener("focusin",L),z&&clearTimeout(z);}},[s]);let Y=Le.useCallback(D=>{l&&(D.pointerType!=="touch"&&D.pointerType!=="pen"||(A.current&&(clearTimeout(A.current),A.current=null),B.current={isDragging:true,startY:D.clientY,startTime:Date.now(),pointerId:D.pointerId},E(false),D.currentTarget.setPointerCapture(D.pointerId)));},[l]),q=Le.useCallback(D=>{let{isDragging:z,startY:L,pointerId:h}=B.current;if(!z||D.pointerId!==h)return;let O=D.clientY-L;M(Math.max(0,O));},[]),G=Le.useCallback(D=>{let{isDragging:z,startY:L,startTime:h,pointerId:O}=B.current;if(!z||D.pointerId!==O)return;let W=D.clientY-L,K=Date.now()-h,te=W/K;B.current={isDragging:false,startY:0,startTime:0,pointerId:null};let J=(k.current?.getBoundingClientRect().height??0)*uS;(W>J||te>pS&&W>50)&&l?(c?.(),M(0)):(E(true),M(0),A.current=setTimeout(()=>{E(false),A.current=null;},200));},[l,c]);if(!s)return null;let U=t||r,P=u||m||p;return jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{isOpen:s,onOpenChange:D=>{D||c?.();},isDismissable:l,transparent:d,style:{paddingBottom:w>0?`${w}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:k,className:tailwindMerge.twMerge("w-full",T&&"transition-transform duration-200"),style:{transform:R>0?`translateY(${R}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",C==="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)]",C==="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)]",y),style:{maxWidth:x,...f?{height:f}:{maxHeight:/\d/.test(g)?F!==null?`min(${g}, ${Math.max(F-8,0)}px, 100dvh)`:`min(${g}, 100dvh)`:g}},children:[v&&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:Y,onPointerMove:q,onPointerUp:G,onPointerCancel:G,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",S&&"animate-[handle-wiggle_0.6s_ease-in-out]")})}),U&&(a?jsxRuntime.jsx(It,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!c,hasBackArrow:true,onBack:i??(()=>{}),onClose:c||(()=>{})}):jsxRuntime.jsx(It,{title:t,headerContent:r,titleAlign:o,hideCloseIcon:n||!c,onClose:c||(()=>{})})),jsxRuntime.jsx("div",{ref:H,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",b?"p-4":"p-0"),children:e}),P&&jsxRuntime.jsx(To,{primaryAction:u,secondaryAction:m,footerContent:p})]})})})})})}nt.displayName="Tray";function _n({children:e,items:t,className:r,align:o="left",textAlign:n="left",size:a="md",onAction:i,header:s,footer:c,useMobileTray:l=true,popoverClassName:d}){let[u,m]=Le.useState(false),{isMobile:p}=Wt();if(l&&p){let f=Le__namespace.default.isValidElement(e)?Le__namespace.default.cloneElement(e,{onPress:()=>m(true)}):e,v=(C=>{if(typeof C=="string")return C;if(Le__namespace.default.isValidElement(C)){let y=C.props;if(typeof y.children=="string")return y.children;if(Array.isArray(y.children))return y.children.find(N=>typeof N=="string")||""}return ""})(e)||"Actions";return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:r,children:f}),jsxRuntime.jsx(nt,{isOpen:u,onClose:()=>m(false),title:v,contentPadding:false,headerContent:s,footerContent:c,children:jsxRuntime.jsx("div",{className:"flex flex-col",children:t.map(C=>jsxRuntime.jsxs("button",{onClick:()=>{C.disabled||(C.onAction?C.onAction():i?.(C),m(false));},disabled:C.disabled,"data-testid":C.testId,className:tailwindMerge.twMerge("flex w-full items-center text-start transition-colors",!C.noPadding&&"px-6 py-3","border-b border-border-muted last:border-0",C.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",C.disabled&&"opacity-50 cursor-not-allowed"),children:[C.iconName&&jsxRuntime.jsx(V,{name:C.iconName,size:20,className:"mr-3 flex-shrink-0"}),jsxRuntime.jsx("div",{className:"flex flex-1 flex-col",children:C.render?C.render():jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:C.subtitle?"font-medium":"",children:C.name}),C.subtitle&&jsxRuntime.jsx("span",{className:"text-sm text-text-secondary",children:C.subtitle})]})})]},C.id))})})]})}return jsxRuntime.jsx("div",{className:r,children:jsxRuntime.jsxs(reactAriaComponents.MenuTrigger,{children:[e,jsxRuntime.jsx(ot,{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",d),placement:o==="right"?"bottom end":"bottom start",children:jsxRuntime.jsxs("div",{className:tailwindMerge.twMerge("flex min-w-[180px] flex-col gap-1",d),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(xS,{id:f.id,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))}),c?jsxRuntime.jsx("div",{className:"px-3 pb-3 pt-2",children:c}):null]})})]})})}function xS({textAlign:e="left",iconName:t,size:r="md",isDisabled:o,children:n,variant:a="default",subtitle:i,render:s,noPadding:c,...l}){let d={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",!c&&d[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",!c&&d[r],m[a],e==="right"?"justify-end":"justify-start",o&&"pointer-events-none opacity-50"),children:[t&&e==="left"&&jsxRuntime.jsx(V,{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(V,{name:t,size:r==="sm"?16:20,className:"ml-3 flex-shrink-0"})]})}var ro=({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 gr({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(ro,{size:20,color:"text-text-secondary"}),t&&jsxRuntime.jsx("span",{className:"text-sm","aria-hidden":"true",children:t})]});return o||n}var ea=Le.createContext({variant:"timeline",size:"md"});function Ff(){return Le.useContext(ea)}function gs(e){return Le.isValidElement(e)&&e.type===hs}function kS(e){return Le.isValidElement(e)&&e.type===xs}function Ld({variant:e="timeline",size:t="md",className:r,children:o,items:n,renderItem:a,isLoading:i=false,loadingState:s,error:c=null,renderLoadingSkeleton:l,loadingSkeletonCount:d=5,emptyMessage:u="No activity found.",onLoadMore:m,hasMore:p=false,enableVirtualization:g,estimatedItemSize:f,loadingIndicator:x,height:b,maxHeight:v,...C}){let y=Le.useRef(null),{isMobile:S}=Wt(),N=S?"stacked":e,R=n!==void 0&&a!==void 0,{scrollRef:M,loadMoreRef:T,virtualizer:E,virtualItems:I,isLoadingMore:F,computedLoadingState:w}=So({items:n||[],onLoadMore:R?m:void 0,hasMore:R?p:false,isLoading:i,loadingState:s,enableVirtualization:R?g:false,estimatedItemSize:f||(N==="stacked"?120:150),overscan:5}),k=R&&M?M:y,H=Le.useMemo(()=>({variant:N,size:t}),[N,t]),A=N==="timeline"?t==="sm"?"gap-4":"gap-6":"gap-0",B=N==="stacked"?"divide-y divide-border-subtle rounded-lg border border-border-subtle bg-background-surface":"",Y={};if(R&&m&&(b?(Y.height=typeof b=="number"?`${b}px`:b,Y.overflowY="auto"):v?(Y.maxHeight=typeof v=="number"?`${v}px`:v,Y.overflowY="auto"):(Y.height="600px",Y.overflowY="auto")),R){let U=w==="loading"||i&&(!n||n.length===0);if(U){let D=l?jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:d}).map((z,L)=>jsxRuntime.jsx("div",{children:l()},`skeleton-${L}`))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:Array.from({length:d}).map((z,L)=>{let h=t==="sm"?"gap-2":"gap-3";if(N==="timeline"){let O=t==="sm"?"pt-3":"pt-4",W=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 ${O}`,children:[jsxRuntime.jsx(j,{width:32,height:32,variant:"circle"}),L<d-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} ${W} 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 ${h}`,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(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:D})})}if(c)return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-feedback-error-text",children:c})})});if(!n||n.length===0)return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:Y,...C,children:jsxRuntime.jsx("div",{className:"p-4 text-center text-text-secondary",children:u})})});let P=E?I?.map(D=>({virtualItem:D,item:n[D.index],index:D.index}))||[]:n.map((D,z)=>({item:D,index:z,virtualItem:null}));return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsxs("div",{ref:k,"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),style:{...Y,position:E?"relative":void 0},...C,children:[E?jsxRuntime.jsxs("div",{style:{height:`${E.getTotalSize()}px`,position:"relative"},children:[P.map(({item:D,index:z,virtualItem:L})=>{if(!D||!L)return null;let h=a(D,z),O=N==="timeline"&&Le.isValidElement(h)&&gs(h)?Le.cloneElement(h,{showConnector:z!==n.length-1}):h;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:O},`item-${z}`)}),F&&jsxRuntime.jsx("div",{style:{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%"},children:x||jsxRuntime.jsx(gr,{state:"loading-more"})})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[P.map(({item:D,index:z})=>{let L=a(D,z);if(N==="timeline"&&Le.isValidElement(L)&&gs(L)){let h=z===n.length-1;return jsxRuntime.jsx("div",{children:Le.cloneElement(L,{showConnector:!h})},`item-${z}`)}return jsxRuntime.jsx("div",{children:L},`item-${z}`)}),F&&(x||jsxRuntime.jsx(gr,{state:"loading-more"}))]}),m&&p&&!U&&jsxRuntime.jsx("div",{ref:T,style:E?{position:"absolute",top:`${E.getTotalSize()}px`,left:0,width:"100%",height:1}:{height:1,width:"100%"}})]})})}let q=Le.Children.toArray(o),G=q.map((U,P)=>{if(gs(U)){let D=U.props.showConnector??(N==="timeline"&&P<q.length-1),z=N==="timeline"&&P>0;return Le.cloneElement(U,{showConnector:D,showIncomingConnector:z})}if(kS(U)){let D=P===q.length-1;return Le.cloneElement(U,{__isLastGroup:D,__isFirstGroup:P===0})}return U});return jsxRuntime.jsx(ea.Provider,{value:H,children:jsxRuntime.jsx("div",{"data-slot":"feed","data-variant":N,className:tailwindMerge.twMerge("flex flex-col",A,B,r),...C,children:G})})}Ld.displayName="ActivityFeed";function xs(e){let{variant:t,size:r}=Ff(),{title:o,description:n,actions:a,children:i,className:s,__isLastGroup:c=false,__isFirstGroup:l=false,...d}=e,u=Le.Children.toArray(i),m=u.map((f,x)=>{if(gs(f)){let b=f.props.showConnector??(t==="timeline"&&!(c&&x===u.length-1));return Le.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),...d,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})]})}xs.displayName="ActivityFeedGroup";var Af={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"},TS={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"},PS={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 hs(e){let{variant:t,size:r}=Ff(),{title:o,description:n,timestamp:a,meta:i,media:s,actions:c,visual:l,icon:d,iconWeight:u,tone:m="neutral",surface:p,isHighlighted:g=false,showConnector:f=true,hideIndicator:x=false,interactive:b,className:v,children:C,onKeyDown:y,showIncomingConnector:S,...N}=e,R=l??(d?jsxRuntime.jsx(V,{name:d,weight:u||"fill",className:"h-4 w-4"}):null),M=p??(t==="stacked"?"minimal":"subtle"),T=r==="sm"?"gap-2":"gap-3",E="text-xs text-text-secondary",I=r==="sm"?"text-sm":"text-[15px]",F="text-xs text-text-secondary",w=b??typeof N.onClick=="function",k=P=>{if(!w){y?.(P);return}P.key===" "?P.preventDefault():P.key==="Enter"&&(P.preventDefault(),P.currentTarget.click()),y?.(P);},H=P=>{w&&P.key===" "&&(P.preventDefault(),P.currentTarget.click());},A=w?tailwindMerge.twMerge("group cursor-pointer",Ue()):void 0,Y=jsxRuntime.jsxs("div",{"data-slot":"connector",className:tailwindMerge.twMerge("relative flex h-full flex-col items-center",M==="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",Af[m]),children:R}),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"})]}),q=g?tailwindMerge.twMerge(TS[m],M==="minimal"?"rounded-md border border-border-muted":PS[m]):"";if(t==="stacked")return jsxRuntime.jsxs("div",{"data-slot":"item","data-variant":"stacked",role:w?"button":void 0,tabIndex:w?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"}[M],q,A,w?"transition-colors hover:bg-background-subtle/80":"",v),onKeyDown:k,onKeyUp:H,...N,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",Af[m]),children:R}),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",I),children:n}),i&&jsxRuntime.jsx("div",{className:F,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),C,c&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:c}),a&&jsxRuntime.jsx("div",{className:tailwindMerge.twMerge("-mt-1.5",E),children:a})]})]});let G=M==="minimal"?r==="sm"?"py-2":"py-3":r==="sm"?"p-3":"p-4",U={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:w?"button":void 0,tabIndex:w?0:void 0,className:tailwindMerge.twMerge("group relative grid items-start gap-4 grid-cols-[3rem_1fr]",A,v),onKeyDown:k,onKeyUp:H,...N,children:[x?jsxRuntime.jsx("div",{}):Y,jsxRuntime.jsxs("div",{"data-slot":"content",className:tailwindMerge.twMerge("min-w-0 flex flex-col",T,G,U[M],q,w?"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",I),children:n}),i&&jsxRuntime.jsx("div",{className:F,children:i}),s&&jsxRuntime.jsx("div",{className:"flex flex-col gap-2 text-sm text-text-secondary",children:s}),C,c&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:c})]})]})}hs.displayName="ActivityItem";function br({isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n="left",hideCloseIcon:a=false,hasBackArrow:i=false,onBack:s,children:c,primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m,transparentOverlay:p=false,maxWidth:g="600px",minWidth:f="400px",maxHeight:x="85vh",height:b,mobileMaxHeight:v="90vh",mobileHeight:C,contentPadding:y=true,className:S}){let N=Ht("(max-width: 767px)"),R=ts(N&&e===void 0),M=R?.height??null,T=R?.keyboardOffset??0,E=Le.useRef(null),I=Le.useCallback(()=>{E.current&&E.current.scrollTop!==0&&(E.current.scrollTop=0);},[]),F=Le.useRef(null),w=Le.useRef(null);Le.useEffect(()=>{let Y=w.current;if(!Y||!N)return;let q=null,G=U=>{let P=U.target;P&&["INPUT","TEXTAREA","SELECT"].includes(P.tagName)&&(q&&clearTimeout(q),q=setTimeout(()=>{P.scrollIntoView({block:"nearest",behavior:"smooth"});},320));};return Y.addEventListener("focusin",G),()=>{Y.removeEventListener("focusin",G),q&&clearTimeout(q);}},[N]);let k=Le.useCallback(()=>{F.current&&F.current.scrollTop!==0&&(F.current.scrollTop=0);},[]);if(e===false)return null;let H=r||o,A=l||d||u||m,B=e!==void 0;return N?B?jsxRuntime.jsx(nt,{isOpen:e,onClose:t,title:r,headerContent:o,titleAlign:n,hideCloseIcon:a,hasBackArrow:i,onBack:s,primaryAction:l,secondaryAction:d,footerContent:m,transparentOverlay:p,maxHeight:v,height:C,maxWidth:g,contentPadding:y,showHandle:true,animationVariant:"scale",className:S,children:c}):jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{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:I,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",S),style:{...C?{height:C}:{maxHeight:/\d/.test(v)?M!==null?`min(${v}, ${Math.max(M-8,0)}px, 100dvh)`:`min(${v}, 100dvh)`:v}},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"})}),H&&(i?jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,onClose:t||(()=>{})})),jsxRuntime.jsx("div",{ref:w,className:tailwindMerge.twMerge("flex-1 min-h-0 overflow-y-auto overscroll-contain",y?"px-6 py-6":"p-0"),children:c}),A&&jsxRuntime.jsx(To,{primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m})]})})})}):jsxRuntime.jsx(Tr,{children:jsxRuntime.jsx(rr,{...B?{isOpen:e,onOpenChange:Y=>{!Y&&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:F,onScroll:k,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",S),style:{minWidth:f,...b?{height:b}:{maxHeight:x}},children:[H&&(i?jsxRuntime.jsx(It,{title:r,headerContent:o,titleAlign:n,hideCloseIcon:a||!t,hasBackArrow:true,onBack:s,onClose:t||(()=>{})}):jsxRuntime.jsx(It,{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",y?"px-6 py-6":"p-0"),children:c}),A&&jsxRuntime.jsx(To,{primaryAction:l,secondaryAction:d,tertiaryAction:u,footerContent:m})]})})})})}function Wf({isOpen:e,onClose:t,title:r,message:o,confirmLabel:n="OK",confirmVariant:a="primary",maxWidth:i="400px",minWidth:s="320px"}){return jsxRuntime.jsx(br,{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 vs=({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 c=r||270,l=c/270*80;return jsxRuntime.jsxs("svg",{width:c,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 Cs=({topItems:e=[],bottomItems:t=[],bottomContent:r,logo:o,showLogo:n=true,linkComponent:a="a",className:i="",mobileMenuId:s="app-mobile-menu",sidebarCollapseId:c="app-sidebar-collapse"})=>{let l=p=>p.length>0&&"items"in p[0],d=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","data-collapse-hide":"",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","data-collapse-hide":""})]},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","data-collapse-center":"",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","data-collapse-icon":"",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200","data-collapse-hide":"",children:p.label}),jsxRuntime.jsx("span",{className:"flex-1","data-collapse-hide":""}),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","data-collapse-hide":"",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","data-collapse-hide-category":"",children:p.children.map(v=>m(v,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,"data-collapse-center":g?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","data-collapse-icon":"",children:p.icon}),jsxRuntime.jsx("span",{className:"transition-all duration-200","data-collapse-hide":"",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","data-collapse-hide":"",children:o||jsxRuntime.jsx(vs,{showWordmark:true,width:120})}),jsxRuntime.jsx("label",{htmlFor:c,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":"Toggle sidebar","data-collapse-toggle":"",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:"M4 6h16M4 12h16M4 18h16"})})}),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:d(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",{"data-collapse-hide":"",children:r})})]})]})};var Po={xs:16,sm:20,md:24,lg:32,xl:40,"2xl":48},rn=Le.memo(({name:e,size:t="md",color:r,weight:o="regular",className:n,ariaLabel:a,...i})=>{let s=MS__namespace[e];if(!s)return null;let c=typeof t=="string"?t in Po?Po[t]:Po.md:t,l=tailwindMerge.twMerge("inline-block flex-shrink-0",!r&&"text-current",n);return jsxRuntime.jsx(s,{...i,size:c,color:r,weight:o,className:l,"aria-label":a||`${e} icon`,"data-testid":`icon-${e}`})});rn.displayName="IconSSR";var ES=Le.memo(({variant:e="subtle",shape:t="square",containerSize:r,containerClassName:o,size:n="md",className:a,name:i,color:s,weight:c,ariaLabel:l,ref:d,...u})=>{let m=typeof n=="string"?n in Po?Po[n]:Po.md:n,p=r?typeof r=="string"?r in Po?Po[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(rn,{...u,name:i,size:n,color:s,weight:c,className:a,ariaLabel:l})})});ES.displayName="IconSSRWithContainer";var Ja=({rightContent:e,centerContent:t,showMobileMenu:r=true,avatar:o,showColorModeSwitcher:n=false,toggleTheme:a,isDarkThemeEnabled:i=false,colorMode:s,actions:c,className:l="",mobileMenuId:d="app-mobile-menu"})=>{let u=()=>{switch(s||(i?"dark":"light")){case "system":return jsxRuntime.jsx(rn,{name:"Monitor",size:"sm"});case "light":return jsxRuntime.jsx(rn,{name:"Sun",size:"sm"});case "dark":return jsxRuntime.jsx(rn,{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:d,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(rn,{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()}),c,o&&jsxRuntime.jsx("div",{className:"flex items-center",children:o})]})]})})};function Kf({sideNav:e,topNav:t,children:r,contentPaddingX:o,contentPaddingY:n,showSidebarBorder:a=true,mainClassName:i,enableJsEnhancements:s=false}){let c="app-mobile-menu",l="app-sidebar-collapse";return jsxRuntime.jsxs("div",{className:"min-h-[100dvh] bg-background text-text-primary relative",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(Ja,{...t,mobileMenuId:c,className:["sticky top-0 flex-shrink-0 z-30 md:hidden",t?.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("aside",{id:"app-sidebar",className:["bg-background-surface","border-r border-border-default","transition-all duration-300 ease-in-out","fixed md:relative","left-0 top-0 bottom-0","z-[60] md:z-10","w-80 md:w-64","h-[100dvh] md:h-full","-translate-x-full","peer-checked/mobile:translate-x-0","md:translate-x-0",a?"":"!border-r-0",e?.className||""].filter(Boolean).join(" "),children:jsxRuntime.jsx(Cs,{...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",children:jsxRuntime.jsx(Ja,{...t,className:t?.className})}),jsxRuntime.jsx("main",{id:"app-content",className:["flex-1 overflow-y-auto overflow-x-hidden bg-background-body",o,n,i||""].join(" "),role:"main",children:r})]})]}),jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:`
5
5
  @media (min-width: 768px) {
6
6
  /* Collapse sidebar width */
7
7
  #${l}:checked ~ * #app-sidebar {
@@ -111,7 +111,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var L=z(G,D,B,Y,q+"."+D,
111
111
  `;return}else z.tagName;}for(let z=0;z<D.childNodes.length;z++)P(D.childNodes[z]);};return P(G),U},[]),k=Le.useCallback((G,U)=>{let P=document.createTreeWalker(G,NodeFilter.SHOW_TEXT,{acceptNode:O=>{let W=O.parentElement;return W&&W.closest("[data-chip-id]")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),D=P.nextNode(),z=Math.max(0,U);for(;D;){let O=D.nodeValue||"";if(O.length>=z){let W=document.createRange();W.setStart(D,z),W.collapse(true);let K=window.getSelection();K?.removeAllRanges(),K?.addRange(W);return}z-=O.length,D=P.nextNode();}let L=window.getSelection(),h=document.createRange();h.selectNodeContents(G),h.collapse(false),L?.removeAllRanges(),L?.addRange(h);},[]);Le.useEffect(()=>{R.current&&!m&&R.current.textContent!==""&&(R.current.textContent="");},[m]),Le.useLayoutEffect(()=>{if(R.current){if(m===""){if(M)try{R.current.focus({preventScroll:!0}),k(R.current,0);}catch{}return}if(F.current!=null)try{k(R.current,F.current);}finally{F.current=null;}}},[m,k,M]);let H=Le.useCallback((G,U)=>{if(p?.(G),G===""){v?.();return}if(x&&b&&U!==void 0){let P=G.slice(0,U),D=typeof x=="string"?new RegExp(`\\${x}([^\\s]*)$`):x,z=P.match(D);if(z){let L=z[1]||"",h=U-z[0].length;b({query:L,position:U,startIndex:h});}else v?.();}},[p,x,b,v]),A=Le.useCallback(G=>{if(!f||!p)return;let U=g.filter(D=>D.id!==G);f(U);let P=m.replace(new RegExp(`\\{\\{${G}\\}\\}`,"g"),"");p(P);},[g,f,m,p]),B=Le.useCallback(G=>C?C(G,()=>A(G.id)):jsxRuntime.jsx(Ur,{variant:y,size:I,onRemove:c?void 0:()=>A(G.id),isDisabled:c,className:"py-0.5 px-1.5 gap-1 text-xs leading-none rounded-md",children:G.label},G.id),[C,y,I,A,c]),Y=()=>{let G=Rt({isInvalid:s,isDisabled:c,isFocused:M,transparent:i,size:o}),U=`min-h-[100px] py-2 px-3 ${c?"resize-none":l?"resize-y":"resize-none"}`,P=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(G,U,P,d)},q=()=>m?m.split(/(\{\{[^}]+\}\})/g).map((U,P)=>{let D=U.match(/\{\{([^}]+)\}\}/);if(D){let z=D[1],L=g.find(h=>h.id===z);if(L)return jsxRuntime.jsx("span",{className:"inline-block align-baseline cursor-pointer",contentEditable:false,suppressContentEditableWarning:true,"data-chip-id":z,style:{userSelect:"none",verticalAlign:"baseline",lineHeight:"1"},onClick:h=>{h.preventDefault();let O=window.getSelection(),W=document.createRange();W.selectNode(h.currentTarget),O?.removeAllRanges(),O?.addRange(W);},children:B(L)},`chip-${z}-${P}`)}return U.includes(`
112
112
  `)?U.split(`
113
113
  `).map((z,L)=>jsxRuntime.jsxs(Le__namespace.default.Fragment,{children:[z,L<U.split(`
114
- `).length-1&&jsxRuntime.jsx("br",{})]},`line-${P}-${L}`)):U}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(Ee,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(ft,{children:jsxRuntime.jsx("div",{ref:R,contentEditable:!c,suppressContentEditableWarning:true,onInput:G=>{if(c)return;let U=G.target,P=U.querySelector("[data-chip-id]")!==null,D;if(P?(D=w(U),D=D.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):D=U.textContent||"",D===""){try{let h=document.createRange();h.selectNodeContents(U),h.collapse(!0);let O=window.getSelection();O?.removeAllRanges(),O?.addRange(h),F.current=0;}catch{}H("",0);return}if(D===m)return;let z=window.getSelection(),L=0;if(z&&z.rangeCount>0)try{let h=z.getRangeAt(0);if(P){let O=0,W=!1,K=te=>{if(W)return !0;if(te===h.startContainer)return O+=h.startOffset,W=!0,!0;if(te.nodeType===Node.TEXT_NODE){if(!te.parentElement?.closest("[data-chip-id]")){if(te.contains(h.startContainer))return O+=h.startOffset,W=!0,!0;O+=(te.textContent||"").length;}}else if(te.nodeType===Node.ELEMENT_NODE){let se=te;if(se.hasAttribute("data-chip-id")){if(se.contains(h.startContainer)||se===h.startContainer){let re=se.getAttribute("data-chip-id");return O+=`{{${re}}}`.length,W=!0,!0}let J=se.getAttribute("data-chip-id");return O+=`{{${J}}}`.length,!1}else if(se.tagName==="BR")return se===h.startContainer?(W=!0,!0):(O+=1,!1)}for(let se=0;se<te.childNodes.length;se++)if(K(te.childNodes[se]))return !0;return !1};K(U),L=O;}else {let O=document.createRange();O.setStart(U,0),O.setEnd(h.startContainer,h.startOffset),L=O.toString().length;}}catch{L=D.length;}F.current=L,H(D,L);},onKeyDown:G=>{if(c)return;let U=window.getSelection();if(!(!U||U.rangeCount===0))try{let P=U.getRangeAt(0),D=P.commonAncestorContainer;if(G.key==="ArrowLeft"||G.key==="ArrowRight"){let z=D.nodeType===Node.TEXT_NODE?D.parentElement?.closest("[data-chip-id]"):D.closest("[data-chip-id]");if(z){G.preventDefault();try{let L=document.createRange(),h=window.getSelection();G.key==="ArrowLeft"?L.setStartBefore(z):L.setStartAfter(z),L.collapse(!0),h?.removeAllRanges(),h?.addRange(L);}catch{}}}if(G.key==="Backspace"){let z=null;if(z=(D.nodeType===Node.TEXT_NODE?D.parentElement?.closest("[data-chip-id]"):D.closest("[data-chip-id]"))||null,!z)if(D.nodeType===Node.TEXT_NODE){let L=D;if(P.startOffset===0&&L.parentElement){let h=L.previousSibling;if(h&&h.nodeType===Node.ELEMENT_NODE){let O=h.closest("[data-chip-id]");O&&(z=O);}}}else {let L=D;if(P.startOffset>0){let h=L.childNodes[P.startOffset-1];if(h&&h.nodeType===Node.ELEMENT_NODE){let O=h.closest("[data-chip-id]");O&&(z=O);}}}if(z){G.preventDefault(),G.stopPropagation();let L=z.getAttribute("data-chip-id");if(!L)return;let h=`{{${L}}}`,O=m.indexOf(h);if(O!==-1){let W=m.slice(0,O)+m.slice(O+h.length),K=g.filter(te=>te.id!==L);F.current=O;try{window.getSelection()?.removeAllRanges();}catch{}f?.(K),p?.(W);}}}}catch{}},onFocus:G=>{c||(N.onFocus&&N.onFocus(G),T(G));},onBlur:G=>{c||(N.onBlur&&N.onBlur(G),E(G));},className:Y(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...N.style},"data-placeholder":N.placeholder,children:q()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Ce,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r(u)})]})})}function p3(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function im(e){return p3(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var Lv={FIFTEEN_MINUTES:1,HOUR:2,DAY:3,WEEK:4,MONTH:5,YEAR:6},m3=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function Av({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,restrictToSingleDay:c=false,presetRanges:l=[],windowSizeOptions:d=m3,autoAdjustWindowSize:u=false,className:m}){let[p,g]=Le.useState(0),f=Le.useRef(null),[x,b]=Le.useState(false),v=P=>{let z=(P.before.getTime()-P.after.getTime())/(1e3*60*60);return z<=24?"FIFTEEN_MINUTES":z<=72||z<=168?"HOUR":("DAY")};Le.useEffect(()=>{if(u&&!x&&o){let P=v(e);o(P);}},[e,u,x,o]);let C=P=>l.find(D=>{let z=D.getRange();return Math.abs(z.after.getTime()-P.after.getTime())<1e3*60*60*24&&Math.abs(z.before.getTime()-P.before.getTime())<1e3*60*60*24})?.id,[y,S]=Le.useState(()=>C(e)),N=im(e.after),R=im(e.before),M=new Date(R);M.setDate(M.getDate()-1);let T={start:Ds(N,an()),end:Ds(M,an())};Le.useEffect(()=>{let P=new ResizeObserver(D=>{for(let z of D)g(z.contentRect.width);});return f.current&&P.observe(f.current),()=>{f.current&&P.unobserve(f.current);}},[]);let E=[...d].sort((P,D)=>Lv[P.id]-Lv[D.id]),I=P=>{let D=P.toString(),z=l.find(L=>L.id===D);z&&(S(D),b(false),t(z.getRange()));},F=P=>{if(P?.start&&P?.end){S(void 0);let D=new Date(P.start.year,P.start.month-1,P.start.day,0,0,0,0),z=new Date(P.end.year,P.end.month-1,P.end.day+1,0,0,0,0);t({after:D,before:z});}},w=P=>{if(P){S(void 0);let D=new Date(P.year,P.month-1,P.day,0,0,0,0),z=new Date(P.year,P.month-1,P.day+1,0,0,0,0);t({after:D,before:z});}},k=P=>{o&&(b(true),o(P.toString()));},H=()=>{if(l.length>0){let P=l[0];S(P.id),b(false),t(P.getRange());}},A=(P,D=0)=>{let z=im(P),L=new Date(z);return D!==0&&L.setDate(L.getDate()+D),L.toLocaleDateString("en-US")},B=E.map(P=>({id:P.id,label:P.label,value:P.id})),Y=l.map(P=>({id:P.id,label:P.label,value:P.id})),q=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:E.find(P=>P.id===r)?.label||r}):jsxRuntime.jsx(ln,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:k,items:B,size:"md","aria-label":"Select Window Size",children:P=>jsxRuntime.jsx(jt,{id:P.id,"aria-label":P.label,size:"md",children:P.label},P.id)}),G=c?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(Q,{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(V,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:A(e.after)})]}),jsxRuntime.jsx(ot,{className:"w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ra,{"aria-label":"Select date",value:Qa(N.toISOString().split("T")[0]),onChange:w})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(Q,{className:"rounded-r-none border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",children:[jsxRuntime.jsx(V,{name:"CalendarBlank",size:18}),!y&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${A(e.after)} - ${A(e.before,-1)}`})]}),jsxRuntime.jsx(ot,{className:"w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ma,{"aria-label":"Date range calendar",value:T,onChange:F})})]}),!y&&jsxRuntime.jsx(Q,{variant:"ghost",size:"md",onPress:H,children:"Reset"})]}),U=p<600;return jsxRuntime.jsx("div",{ref:f,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",m),children:U?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&G,a&&y!==void 0&&jsxRuntime.jsx(ln,{selectedKey:y,onSelectionChange:I,items:Y,size:"md","aria-label":"Select Date Range",children:P=>jsxRuntime.jsx(jt,{id:P.id,size:"md",children:P.label},P.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&q})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&G,a&&y!==void 0&&jsxRuntime.jsx(Rc,{options:l.map(P=>({id:P.id,label:P.label})),value:y,onChange:I,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&q})]})})}function h3({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 Fv({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:c=true,validationResult:l,className:d,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:ve(d,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(Ee,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(ft,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Do({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:h3({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),c?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(de,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(de,{size:o,children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Ce,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Ce,{size:o,className:"mt-1",children:t}):null})]})}function Bv({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function Vv({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(V,{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 w3(e){return "primary"}var N3="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",zv={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]"}},k3="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",T3="opacity-100 cursor-pointer",P3={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},R3={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-action-destructive text-[color:var(--color-action-destructive-text)]"};function D3(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,c=w3(),l=`${N3} ${n?zv[c].selected:zv[c].unselected}`;return l+=` ${Ae[r].text} ${Ae[r].height} ${Ae[r].padding} ${Ae[r].gap}`,l+=` ${o?k3:T3}`,a==="left"&&(l+=" rounded-l-sm"),a==="right"&&(l+=" rounded-r-sm"),i&&(l+=" border-r"),s&&(l+=" border-l"),l+=` ${Ue()}`,(l+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(l)}function Hv(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:c,loadingIndicator:l,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(V,{name:n,size:d,weight:i}):null,x=()=>{let v=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(V,{name:"CircleNotch",size:d,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),c&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:c})]}):v},b=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(D3(e),t),"aria-busy":s,children:x()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[b,jsxRuntime.jsx("span",{className:`absolute ${P3[p]} flex h-5 w-5 items-center justify-center rounded-full ${R3[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var Ji={app:{icon:"AppWindow",label:{singular:"App",plural:"Apps"},description:"Workspace and integration apps"},site:{icon:"MapPin",label:{singular:"Site",plural:"Sites"},description:"Physical locations with energy systems"},device:{icon:"ShareNetwork",label:{singular:"Device",plural:"Devices"},description:"Connected energy devices"},customer:{icon:"Users",label:{singular:"Customer",plural:"Customers"},description:"End customers and site owners"},contact:{icon:"Users",label:{singular:"Contact",plural:"Contacts"},description:"Contact persons"},program:{icon:"ClipboardText",label:{singular:"Program",plural:"Programs"},description:"Demand response and VPP programs"},workflow:{icon:"FlowArrow",label:{singular:"Workflow",plural:"Workflows"},description:"Automated workflows and rules"},collection:{icon:"Stack",label:{singular:"Collection",plural:"Collections"},description:"Grouped entities"},board:{icon:"SquaresFour",label:{singular:"Board",plural:"Boards"},description:"Dashboard and monitoring boards"},report:{icon:"ChartLine",label:{singular:"Report",plural:"Reports"},description:"Analytics and reports"},event:{icon:"ClockCounterClockwise",label:{singular:"Event",plural:"Events"},description:"System events and activity"},alert:{icon:"Warning",label:{singular:"Alert",plural:"Alerts"},description:"Notifications and alerts"},monitor:{icon:"Pulse",label:{singular:"Monitor",plural:"Monitors"},description:"Threshold and status monitors"},command:{icon:"Play",label:{singular:"Command",plural:"Commands"},description:"Device commands and control"}};function E3(e){return Ji[e]}function L3(e){return Ji[e].icon}function A3(e,t=false){return t?Ji[e].label.plural:Ji[e].label.singular}function I3({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:c,...l}){return jsxRuntime.jsx(br,{title:c,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(ha,{id:e,onSubmit:t,children:s})})}function F3({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...c}){return jsxRuntime.jsx(Ni,{primaryAction:{label:r,onPress:()=>{let d=document.getElementById(e);d&&d.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...c,children:jsxRuntime.jsx(ha,{id:e,onSubmit:t,className:"mt-2",children:s})})}function V3({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 H3={sm:"gap-2",md:"gap-4",lg:"gap-6"};function W3(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 G3({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",W3(e),H3[t],r)})}function K3({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(Kt,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Ce,{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 J3(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function j3({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,c=i<n,l=r&&(c||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",c&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!c&&!s&&"border-border-default bg-background-body text-text-secondary",l&&"cursor-pointer",!l&&"cursor-default"),"aria-current":s?"step":void 0,children:c?jsxRuntime.jsx(V,{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",c&&"text-text-primary",!s&&!c&&"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 Z3({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(Q,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(Q,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function X3({when:e,message:t="You have unsaved changes. Leave anyway?"}){return Le__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 $3({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=Le__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,c=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:c,next:async()=>!s||a===-1?false:c(e[a+1].id),prev:async()=>!i||a===-1?false:c(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Voe(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"}}/*! Bundled license information:
114
+ `).length-1&&jsxRuntime.jsx("br",{})]},`line-${P}-${L}`)):U}):null;return jsxRuntime.jsx("div",{className:"group flex flex-col",children:jsxRuntime.jsxs("div",{className:"flex flex-col",children:[e&&jsxRuntime.jsx(Ee,{size:o,tooltip:n,isRequired:a,children:e}),jsxRuntime.jsx(ft,{children:jsxRuntime.jsx("div",{ref:R,contentEditable:!c,suppressContentEditableWarning:true,onInput:G=>{if(c)return;let U=G.target,P=U.querySelector("[data-chip-id]")!==null,D;if(P?(D=w(U),D=D.replace(/(\{\{[^}]+\}\})\s{2,}/g,"$1 ").replace(/\s{2,}(\{\{[^}]+\}\})/g," $1")):D=U.textContent||"",D===""){try{let h=document.createRange();h.selectNodeContents(U),h.collapse(!0);let O=window.getSelection();O?.removeAllRanges(),O?.addRange(h),F.current=0;}catch{}H("",0);return}if(D===m)return;let z=window.getSelection(),L=0;if(z&&z.rangeCount>0)try{let h=z.getRangeAt(0);if(P){let O=0,W=!1,K=te=>{if(W)return !0;if(te===h.startContainer)return O+=h.startOffset,W=!0,!0;if(te.nodeType===Node.TEXT_NODE){if(!te.parentElement?.closest("[data-chip-id]")){if(te.contains(h.startContainer))return O+=h.startOffset,W=!0,!0;O+=(te.textContent||"").length;}}else if(te.nodeType===Node.ELEMENT_NODE){let se=te;if(se.hasAttribute("data-chip-id")){if(se.contains(h.startContainer)||se===h.startContainer){let re=se.getAttribute("data-chip-id");return O+=`{{${re}}}`.length,W=!0,!0}let J=se.getAttribute("data-chip-id");return O+=`{{${J}}}`.length,!1}else if(se.tagName==="BR")return se===h.startContainer?(W=!0,!0):(O+=1,!1)}for(let se=0;se<te.childNodes.length;se++)if(K(te.childNodes[se]))return !0;return !1};K(U),L=O;}else {let O=document.createRange();O.setStart(U,0),O.setEnd(h.startContainer,h.startOffset),L=O.toString().length;}}catch{L=D.length;}F.current=L,H(D,L);},onKeyDown:G=>{if(c)return;let U=window.getSelection();if(!(!U||U.rangeCount===0))try{let P=U.getRangeAt(0),D=P.commonAncestorContainer;if(G.key==="ArrowLeft"||G.key==="ArrowRight"){let z=D.nodeType===Node.TEXT_NODE?D.parentElement?.closest("[data-chip-id]"):D.closest("[data-chip-id]");if(z){G.preventDefault();try{let L=document.createRange(),h=window.getSelection();G.key==="ArrowLeft"?L.setStartBefore(z):L.setStartAfter(z),L.collapse(!0),h?.removeAllRanges(),h?.addRange(L);}catch{}}}if(G.key==="Backspace"){let z=null;if(z=(D.nodeType===Node.TEXT_NODE?D.parentElement?.closest("[data-chip-id]"):D.closest("[data-chip-id]"))||null,!z)if(D.nodeType===Node.TEXT_NODE){let L=D;if(P.startOffset===0&&L.parentElement){let h=L.previousSibling;if(h&&h.nodeType===Node.ELEMENT_NODE){let O=h.closest("[data-chip-id]");O&&(z=O);}}}else {let L=D;if(P.startOffset>0){let h=L.childNodes[P.startOffset-1];if(h&&h.nodeType===Node.ELEMENT_NODE){let O=h.closest("[data-chip-id]");O&&(z=O);}}}if(z){G.preventDefault(),G.stopPropagation();let L=z.getAttribute("data-chip-id");if(!L)return;let h=`{{${L}}}`,O=m.indexOf(h);if(O!==-1){let W=m.slice(0,O)+m.slice(O+h.length),K=g.filter(te=>te.id!==L);F.current=O;try{window.getSelection()?.removeAllRanges();}catch{}f?.(K),p?.(W);}}}}catch{}},onFocus:G=>{c||(N.onFocus&&N.onFocus(G),T(G));},onBlur:G=>{c||(N.onBlur&&N.onBlur(G),E(G));},className:Y(),style:{whiteSpace:"pre-wrap",wordBreak:"break-word",...N.style},"data-placeholder":N.placeholder,children:q()},m===""?"empty":"content")}),t&&jsxRuntime.jsx(Ce,{size:o,className:"mt-3",children:t}),typeof r=="string"&&jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r}),typeof r=="function"&&u&&jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r(u)})]})})}function p3(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function im(e){return p3(e)?e:(console.warn("Invalid date detected in TimeControls, using fallback:",e),new Date)}var Lv={FIFTEEN_MINUTES:1,HOUR:2,DAY:3,WEEK:4,MONTH:5,YEAR:6},m3=[{id:"FIFTEEN_MINUTES",label:"15m"},{id:"HOUR",label:"1h"},{id:"DAY",label:"1d"},{id:"WEEK",label:"1w"}];function Av({dateRange:e,onDateRangeChange:t,windowSize:r,onWindowSizeChange:o,showWindowSize:n=true,showRangeSelector:a=true,allowDatePicker:i=false,lockWindowSize:s=false,restrictToSingleDay:c=false,presetRanges:l=[],windowSizeOptions:d=m3,autoAdjustWindowSize:u=false,className:m}){let[p,g]=Le.useState(0),f=Le.useRef(null),[x,b]=Le.useState(false),v=P=>{let z=(P.before.getTime()-P.after.getTime())/(1e3*60*60);return z<=24?"FIFTEEN_MINUTES":z<=72||z<=168?"HOUR":("DAY")};Le.useEffect(()=>{if(u&&!x&&o){let P=v(e);o(P);}},[e,u,x,o]);let C=P=>l.find(D=>{let z=D.getRange();return Math.abs(z.after.getTime()-P.after.getTime())<1e3*60*60*24&&Math.abs(z.before.getTime()-P.before.getTime())<1e3*60*60*24})?.id,[y,S]=Le.useState(()=>C(e)),N=im(e.after),R=im(e.before),M=new Date(R);M.setDate(M.getDate()-1);let T={start:Ds(N,an()),end:Ds(M,an())};Le.useEffect(()=>{let P=new ResizeObserver(D=>{for(let z of D)g(z.contentRect.width);});return f.current&&P.observe(f.current),()=>{f.current&&P.unobserve(f.current);}},[]);let E=[...d].sort((P,D)=>Lv[P.id]-Lv[D.id]),I=P=>{let D=P.toString(),z=l.find(L=>L.id===D);z&&(S(D),b(false),t(z.getRange()));},F=P=>{if(P?.start&&P?.end){S(void 0);let D=new Date(P.start.year,P.start.month-1,P.start.day,0,0,0,0),z=new Date(P.end.year,P.end.month-1,P.end.day+1,0,0,0,0);t({after:D,before:z});}},w=P=>{if(P){S(void 0);let D=new Date(P.year,P.month-1,P.day,0,0,0,0),z=new Date(P.year,P.month-1,P.day+1,0,0,0,0);t({after:D,before:z});}},k=P=>{o&&(b(true),o(P.toString()));},H=()=>{if(l.length>0){let P=l[0];S(P.id),b(false),t(P.getRange());}},A=(P,D=0)=>{let z=im(P),L=new Date(z);return D!==0&&L.setDate(L.getDate()+D),L.toLocaleDateString("en-US")},B=E.map(P=>({id:P.id,label:P.label,value:P.id})),Y=l.map(P=>({id:P.id,label:P.label,value:P.id})),q=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:E.find(P=>P.id===r)?.label||r}):jsxRuntime.jsx(ln,{className:"w-full md:w-auto",selectedKey:r,onSelectionChange:k,items:B,size:"md","aria-label":"Select Window Size",children:P=>jsxRuntime.jsx(jt,{id:P.id,"aria-label":P.label,size:"md",children:P.label},P.id)}),G=c?jsxRuntime.jsx("div",{className:"flex items-center",children:jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(Q,{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(V,{name:"CalendarBlank",size:18}),jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:A(e.after)})]}),jsxRuntime.jsx(ot,{className:"w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ra,{"aria-label":"Select date",value:Qa(N.toISOString().split("T")[0]),onChange:w})})]})}):jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsxs(reactAriaComponents.DialogTrigger,{children:[jsxRuntime.jsxs(Q,{className:"rounded-r-none border-l pl-2 pr-2 hover:border-border-default hover:bg-background-muted hover:text-text-link-hover",variant:"secondary",children:[jsxRuntime.jsx(V,{name:"CalendarBlank",size:18}),!y&&jsxRuntime.jsx("span",{className:"ml-2 hidden md:block",children:`${A(e.after)} - ${A(e.before,-1)}`})]}),jsxRuntime.jsx(ot,{className:"w-auto p-3",disableGroup:true,children:jsxRuntime.jsx(ma,{"aria-label":"Date range calendar",value:T,onChange:F})})]}),!y&&jsxRuntime.jsx(Q,{variant:"ghost",size:"md",onPress:H,children:"Reset"})]}),U=p<600;return jsxRuntime.jsx("div",{ref:f,className:tailwindMerge.twMerge("flex w-full flex-wrap items-center justify-between gap-4",m),children:U?jsxRuntime.jsxs("div",{className:"flex w-full justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[i&&G,a&&y!==void 0&&jsxRuntime.jsx(ln,{selectedKey:y,onSelectionChange:I,items:Y,size:"md","aria-label":"Select Date Range",children:P=>jsxRuntime.jsx(jt,{id:P.id,size:"md",children:P.label},P.id)})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&q})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-4",children:[i&&G,a&&y!==void 0&&jsxRuntime.jsx(Rc,{options:l.map(P=>({id:P.id,label:P.label})),value:y,onChange:I,size:"sm",variant:"secondary","aria-label":"Select Date Range"})]}),jsxRuntime.jsx("div",{className:"flex items-center",children:n&&r&&q})]})})}function h3({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 Fv({label:e,description:t,errorMessage:r,size:o="md",tooltip:n,isRequired:a,isDisabled:i,isInvalid:s,reserveErrorSpace:c=true,validationResult:l,className:d,descriptionPlacement:u="below",...m}){return jsxRuntime.jsxs(reactAriaComponents.TimeField,{...m,isDisabled:i,isRequired:a,isInvalid:s,className:ve(d,"flex flex-col gap-1"),children:[e&&jsxRuntime.jsx(Ee,{size:o,tooltip:n,description:u==="tooltip"||u==="inline"?t:void 0,descriptionPlacement:u,isRequired:a,children:e}),jsxRuntime.jsx(ft,{children:jsxRuntime.jsx(reactAriaComponents.DateInput,{className:tailwindMerge.twMerge(Do({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:h3({isPlaceholder:p.isPlaceholder,isDisabled:!p.isEditable||i,size:o})})})}),c?jsxRuntime.jsx("div",{className:"mt-1 min-h-[20px]",children:typeof r=="string"?jsxRuntime.jsx(de,{size:o,children:r}):typeof r=="function"&&l?jsxRuntime.jsx(de,{size:o,children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Ce,{size:o,children:t}):null}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:typeof r=="string"?jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r}):typeof r=="function"&&l?jsxRuntime.jsx(de,{size:o,className:"mt-1",children:r(l)}):t&&u==="below"?jsxRuntime.jsx(Ce,{size:o,className:"mt-1",children:t}):null})]})}function Bv({children:e,className:t=""}){return jsxRuntime.jsx("div",{className:`flex flex-col ${t}`.trim(),role:"list",children:e})}function Vv({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(V,{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 w3(e){return "primary"}var N3="flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border",zv={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]"}},k3="opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale",T3="opacity-100 cursor-pointer",P3={"top-right":"-right-2 -top-2","top-left":"-left-2 -top-2","bottom-right":"-right-2 -bottom-2","bottom-left":"-left-2 -bottom-2"},R3={primary:"bg-action-primary text-[color:var(--color-action-primary-text)]",destructive:"bg-feedback-error-border text-text-inverse"};function D3(e){let{variant:t="primary",size:r="md",isDisabled:o,isSelected:n,borderRadius:a,borderRight:i,borderLeft:s}=e,c=w3(),l=`${N3} ${n?zv[c].selected:zv[c].unselected}`;return l+=` ${Ae[r].text} ${Ae[r].height} ${Ae[r].padding} ${Ae[r].gap}`,l+=` ${o?k3:T3}`,a==="left"&&(l+=" rounded-l-sm"),a==="right"&&(l+=" rounded-r-sm"),i&&(l+=" border-r"),s&&(l+=" border-l"),l+=` ${Ue()}`,(l+=" focus-visible:outline-action-primary"),tailwindMerge.twMerge(l)}function Hv(e){let{className:t,children:r,onPress:o,icon:n,iconPosition:a="left",iconWeight:i,isLoading:s=false,loadingText:c,loadingIndicator:l,size:d="md",badgeNumber:u,badgeVariant:m="primary",badgePosition:p="top-right",...g}=e,f=n?jsxRuntime.jsx(V,{name:n,size:d,weight:i}):null,x=()=>{let v=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(V,{name:"CircleNotch",size:d,className:"animate-spin","aria-hidden":"true"})}),jsxRuntime.jsx("div",{className:"invisible","aria-hidden":"true",children:v}),c&&jsxRuntime.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:c})]}):v},b=jsxRuntime.jsx(reactAriaComponents.ToggleButton,{onPress:o,...g,className:tailwindMerge.twMerge(D3(e),t),"aria-busy":s,children:x()});return u&&u>0?jsxRuntime.jsxs("div",{className:"relative",children:[b,jsxRuntime.jsx("span",{className:`absolute ${P3[p]} flex h-5 w-5 items-center justify-center rounded-full ${R3[m]} text-xs`,"aria-label":`${u} items`,children:u})]}):b}var Ji={app:{icon:"AppWindow",label:{singular:"App",plural:"Apps"},description:"Workspace and integration apps"},site:{icon:"MapPin",label:{singular:"Site",plural:"Sites"},description:"Physical locations with energy systems"},device:{icon:"ShareNetwork",label:{singular:"Device",plural:"Devices"},description:"Connected energy devices"},customer:{icon:"Users",label:{singular:"Customer",plural:"Customers"},description:"End customers and site owners"},contact:{icon:"Users",label:{singular:"Contact",plural:"Contacts"},description:"Contact persons"},program:{icon:"ClipboardText",label:{singular:"Program",plural:"Programs"},description:"Demand response and VPP programs"},workflow:{icon:"FlowArrow",label:{singular:"Workflow",plural:"Workflows"},description:"Automated workflows and rules"},collection:{icon:"Stack",label:{singular:"Collection",plural:"Collections"},description:"Grouped entities"},board:{icon:"SquaresFour",label:{singular:"Board",plural:"Boards"},description:"Dashboard and monitoring boards"},report:{icon:"ChartLine",label:{singular:"Report",plural:"Reports"},description:"Analytics and reports"},event:{icon:"ClockCounterClockwise",label:{singular:"Event",plural:"Events"},description:"System events and activity"},alert:{icon:"Warning",label:{singular:"Alert",plural:"Alerts"},description:"Notifications and alerts"},monitor:{icon:"Pulse",label:{singular:"Monitor",plural:"Monitors"},description:"Threshold and status monitors"},command:{icon:"Play",label:{singular:"Command",plural:"Commands"},description:"Device commands and control"}};function E3(e){return Ji[e]}function L3(e){return Ji[e].icon}function A3(e,t=false){return t?Ji[e].label.plural:Ji[e].label.singular}function I3({formId:e="dialog-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,title:c,...l}){return jsxRuntime.jsx(br,{title:c,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(ha,{id:e,onSubmit:t,children:s})})}function F3({formId:e="drawer-form",onSubmit:t,primaryLabel:r="Save",secondaryLabel:o="Cancel",onCancel:n,primaryVariant:a,secondaryVariant:i="secondary",children:s,...c}){return jsxRuntime.jsx(Ni,{primaryAction:{label:r,onPress:()=>{let d=document.getElementById(e);d&&d.requestSubmit();},variant:a},secondaryAction:n?{label:o,onPress:n,variant:i}:void 0,...c,children:jsxRuntime.jsx(ha,{id:e,onSubmit:t,className:"mt-2",children:s})})}function V3({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 H3={sm:"gap-2",md:"gap-4",lg:"gap-6"};function W3(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 G3({cols:e={base:1},gap:t="lg",className:r,...o}){return jsxRuntime.jsx("div",{...o,className:tailwindMerge.twMerge("grid",W3(e),H3[t],r)})}function K3({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(Kt,{tag:"h3",size:"sm",children:e}):e,t?jsxRuntime.jsx(Ce,{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 J3(){return jsxRuntime.jsx("hr",{className:"border-border-muted"})}function j3({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,c=i<n,l=r&&(c||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",c&&"border-action-primary bg-action-primary text-text-inverse hover:bg-action-primary/90",s&&"border-action-primary bg-background-body text-action-primary",!c&&!s&&"border-border-default bg-background-body text-text-secondary",l&&"cursor-pointer",!l&&"cursor-default"),"aria-current":s?"step":void 0,children:c?jsxRuntime.jsx(V,{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",c&&"text-text-primary",!s&&!c&&"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 Z3({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(Q,{variant:"secondary",onPress:o,children:a}),jsxRuntime.jsx(Q,{type:"submit",form:e,isDisabled:!!r,children:r?"Saving...":n})]})]})}):null}function X3({when:e,message:t="You have unsaved changes. Leave anyway?"}){return Le__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 $3({steps:e,initialStepId:t,canNavigate:r}){if(e.length===0)throw new Error("useWizard: steps array cannot be empty");let[o,n]=Le__namespace.useState(t||e[0].id),a=e.findIndex(u=>u.id===o),i=a>0,s=a<e.length-1,c=async u=>u===o?true:r&&!await r(o,u)?false:(n(u),true);return {steps:e,currentStepId:o,setCurrentStepId:c,next:async()=>!s||a===-1?false:c(e[a+1].id),prev:async()=>!i||a===-1?false:c(e[a-1].id),hasNext:s,hasPrev:i,stepIndex:a}}function Voe(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"}}/*! Bundled license information:
115
115
 
116
116
  react-is/cjs/react-is.production.min.js:
117
117
  (** @license React v16.13.1