@asymmetric-effort/specifyjs 0.2.25 → 0.2.26

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.
@@ -1,2 +1,2 @@
1
- "use strict";const e=Symbol.for("spec.element"),t=Symbol.for("spec.provider"),n=Symbol.for("spec.consumer");function o(t,n,...o){let r=null,i=null;const l={};if(null!=n){void 0!==n.key&&(r=""+n.key),void 0!==n.ref&&(i=n.ref);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&"key"!==e&&"ref"!==e&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(l[e]=n[e])}if(1===o.length?l.children=o[0]:o.length>1&&(l.children=o),"function"==typeof t&&t.defaultProps){const e=t.defaultProps;for(const t of Object.keys(e))"__proto__"!==t&&"constructor"!==t&&void 0===l[t]&&(l[t]=e[t])}return{$$typeof:e,type:t,props:l,key:r,ref:i}}function r(e){const o={$$typeof:Symbol.for("spec.context"),Provider:null,Consumer:null,_currentValue:e,_defaultValue:e},r={$$typeof:t,_context:o},i={$$typeof:n,_context:o};return o.Provider=r,o.Consumer=i,o}function i(){throw new Error("Invalid hook call. Hooks can only be called inside the body of a function component.")}function l(e){return i().useState(e)}function a(e,t){return i().useEffect(e,t)}function s(e,t){return i().useCallback(e,t)}function d(e,t){return i().useMemo(e,t)}function c(e){return i().useRef(e)}function f(){return i().useId()}function p(){const e=("undefined"!=typeof window?window.location.hash:"").replace(/^#\/?/,"/");return""===e?"/":e}r({pathname:"/",params:{},navigate:()=>{throw new Error("useNavigate must be used inside a <Router> component.")},basePath:""}),p();const u=new Set;function h(e){if(!e)return new Date;const t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date),n=e=>Number(t.find(t=>t.type===e)?.value??0);return new Date(n("year"),n("month")-1,n("day"),n("hour"),n("minute"),n("second"))}"undefined"!=typeof window&&window.addEventListener("hashchange",function(){p(),"undefined"!=typeof window&&window.location.hash;for(const e of u)e()}),r({flags:{},isEnabled:()=>!1,setFlag:()=>{},loading:!1});const g="#334155",x="#1e293b",y="#374151",m={xs:24,sm:32,md:40,lg:56,xl:80},b=["#3b82f6","#ef4444","#22c55e","#a855f7","#f97316","#ec4899","#14b8a6","#6366f1","#eab308","#06b6d4"],v={online:"#22c55e",offline:"#9ca3af",busy:"#ef4444",away:"#eab308"};function S(e,t){const n=-t/4+"px";switch(e){case"top-left":return{top:n,left:n};case"bottom-right":return{bottom:n,right:n};case"bottom-left":return{bottom:n,left:n};default:return{top:n,right:n}}}const k={sm:{minWidth:"16px",height:"16px",fontSize:"10px",padding:"0 4px"},md:{minWidth:"20px",height:"20px",fontSize:"12px",padding:"0 6px"},lg:{minWidth:"24px",height:"24px",fontSize:"14px",padding:"0 8px"}},w={sm:{width:"6px",height:"6px"},md:{width:"8px",height:"8px"},lg:{width:"10px",height:"10px"}},$={width:"100%",borderCollapse:"collapse",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",color:"#1f2937"},M={padding:"10px 12px",textAlign:"left",fontWeight:"600",backgroundColor:"#f9fafb",borderBottom:"2px solid #e5e7eb",userSelect:"none",whiteSpace:"nowrap"},C={padding:"10px 12px",borderBottom:"1px solid #e5e7eb"},z={marginLeft:"4px",fontSize:"12px",color:"#6b7280"},I={width:"100%",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",fontSize:"12px",boxSizing:"border-box"},A={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",fontSize:"13px",color:"#6b7280"},F={padding:"4px 10px",margin:"0 2px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",fontSize:"13px"},R={...F,backgroundColor:"#3b82f6",color:"#fff",borderColor:"#3b82f6"},D={...F,opacity:"0.5",cursor:"default"},L={cursor:"pointer",width:"16px",height:"16px"};function N(e,t,n){return e!==t?"↕":"asc"===n?"↑":"↓"}function T(e){return e<10?`0${e}`:String(e)}const W={fontFamily:'"SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace',backgroundColor:"#1e293b",color:"#e2e8f0",padding:"16px 24px",borderRadius:"8px",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"4px"},B={fontSize:"2rem",fontWeight:"600",letterSpacing:"2px",lineHeight:"1"},E={fontSize:"0.875rem",fontWeight:"400",marginLeft:"4px",verticalAlign:"super"},P={fontSize:"0.75rem",color:"#94a3b8",marginTop:"4px"},H={listStyle:"none",margin:"0",padding:"0",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px"},j={padding:"10px 14px",color:"var(--color-text, #1f2937)"},Y={borderBottom:"1px solid var(--color-border, #e5e7eb)"},_={cursor:"pointer",transition:"background-color 0.15s ease"},q={backgroundColor:"var(--color-bg-muted, #eff6ff)"},O={padding:"24px",textAlign:"center",color:"var(--color-text-muted, #9ca3af)",fontSize:"14px"},U={padding:"10px 14px",borderBottom:"1px solid var(--color-border, #e5e7eb)",backgroundColor:"var(--color-bg-subtle, #f9fafb)",fontWeight:"600",fontSize:"13px",color:"var(--color-text-muted, #6b7280)"};function G(e,t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec({red:"#ef4444",blue:"#3b82f6",green:"#22c55e",yellow:"#eab308",purple:"#a855f7",pink:"#ec4899",orange:"#f97316",gray:"#6b7280",indigo:"#6366f1",teal:"#14b8a6",cyan:"#06b6d4"}[e]??e);return n?`rgba(${parseInt(n[1],16)}, ${parseInt(n[2],16)}, ${parseInt(n[3],16)}, ${t})`:e}const V={sm:{fontSize:"11px",padding:"2px 8px",gap:"4px"},md:{fontSize:"13px",padding:"4px 10px",gap:"6px"},lg:{fontSize:"15px",padding:"6px 14px",gap:"8px"}},X={display:"inline-flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",fontSize:"inherit",lineHeight:"1",opacity:"0.7",color:"inherit"},K={overflow:"auto",position:"relative",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},Z={info:{icon:"ℹ️",bg:"#eff6ff",border:"#3b82f6",text:"#1e40af",filledBg:"#3b82f6",filledText:"#ffffff"},success:{icon:"✅",bg:"#f0fdf4",border:"#22c55e",text:"#166534",filledBg:"#22c55e",filledText:"#ffffff"},warning:{icon:"⚠️",bg:"#fffbeb",border:"#f59e0b",text:"#92400e",filledBg:"#f59e0b",filledText:"#ffffff"},error:{icon:"❌",bg:"#fef2f2",border:"#ef4444",text:"#991b1b",filledBg:"#ef4444",filledText:"#ffffff"}};function J(e){const t={width:e.width,height:e.height,borderRadius:e.borderRadius,backgroundColor:"#e5e7eb"};return e.animated&&(t.backgroundImage="linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",t.backgroundSize="200% 100%",t.animation=`liq-shimmer-${e.animId} 1.5s ease-in-out infinite`),e.marginBottom&&(t.marginBottom=e.marginBottom),t}const Q={sm:16,md:24,lg:40},ee={slow:"1.2s",normal:"0.75s",fast:"0.45s"};function te(e){const t=e.styling??{},n=!!e.error,r={display:"flex",flexDirection:"column",gap:t.gap??"4px",width:"number"==typeof t.width?`${t.width}px`:t.width??"100%",fontFamily:t.fontFamily??"inherit",fontSize:t.fontSize??"14px",opacity:e.disabled?"0.6":"1",...t.custom??{}},i={color:t.labelColor??"#374151",fontWeight:t.labelFontWeight??"500",fontSize:t.labelFontSize??"14px"},l={fontSize:"12px",color:n?t.errorColor??"#ef4444":t.helpColor??"#6b7280",marginTop:"2px"};return o("div",{className:`form-field ${n?"form-field--error":""} ${e.className??""}`.trim(),style:r},e.label?o("label",{htmlFor:e.htmlFor,style:i},e.label,e.required?o("span",{style:{color:t.errorColor??"#ef4444",marginLeft:"2px"}},"*"):null):null,e.children,e.error?o("div",{className:"form-field__error",style:l,role:"alert"},e.error):e.helpText?o("div",{className:"form-field__help",style:l},e.helpText):null)}function ne(e,t){const n=t.error?e.errorBorderColor??"#ef4444":t.focused?e.focusBorderColor??"#3b82f6":void 0;return{padding:e.padding??"8px 12px",border:n?`1px solid ${n}`:e.border??"1px solid #d1d5db",borderRadius:e.borderRadius??"6px",fontSize:e.fontSize??"14px",fontFamily:e.fontFamily??"inherit",backgroundColor:e.backgroundColor??"#ffffff",color:e.color??"#1f2937",outline:"none",transition:e.transition??"border-color 0.15s",width:"100%",boxSizing:"border-box",...t.focused&&n?{boxShadow:`0 0 0 3px ${n}22`}:{},...e.custom??{}}}const oe={sm:{box:14,icon:10,fontSize:"12px"},md:{box:18,icon:12,fontSize:"14px"},lg:{box:22,icon:16,fontSize:"16px"}},re=["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#f3f3f3","#ffffff","#980000","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#4a86e8","#0000ff","#9900ff","#ff00ff","#e6b8af","#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#c9daf8","#cfe2f3","#d9d2e9","#ead1dc"];function ie(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)}function le(e){let t=e.startsWith("#")?e:`#${e}`;return/^#[0-9a-fA-F]{3}$/.test(t)&&(t=`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`),t.toLowerCase()}const ae=["January","February","March","April","May","June","July","August","September","October","November","December"],se=["Su","Mo","Tu","We","Th","Fr","Sa"];function de(e){if(!e)return null;if(e instanceof Date)return e;const t=new Date(e);return isNaN(t.getTime())?null:t}function ce(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function fe(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["B","KB","MB","GB"][t]}`}const pe=["bold","italic","underline","strikethrough","heading1","heading2","bulletList","orderedList","blockquote","link","unlink","insertHR","removeFormat","undo","redo"],ue={bold:{label:"Bold",icon:"B",command:"bold"},italic:{label:"Italic",icon:"I",command:"italic"},underline:{label:"Underline",icon:"U",command:"underline"},strikethrough:{label:"Strikethrough",icon:"S",command:"strikethrough"},heading1:{label:"Heading 1",icon:"H1",command:"formatBlock",value:"h1"},heading2:{label:"Heading 2",icon:"H2",command:"formatBlock",value:"h2"},heading3:{label:"Heading 3",icon:"H3",command:"formatBlock",value:"h3"},bulletList:{label:"Bullet list",icon:"•",command:"insertUnorderedList"},orderedList:{label:"Numbered list",icon:"1.",command:"insertOrderedList"},blockquote:{label:"Blockquote",icon:"“",command:"formatBlock",value:"blockquote"},link:{label:"Insert link",icon:"🔗",command:"createLink"},unlink:{label:"Remove link",icon:"⛔",command:"unlink"},insertHR:{label:"Horizontal rule",icon:"―",command:"insertHorizontalRule"},removeFormat:{label:"Clear format",icon:"✘",command:"removeFormat"},undo:{label:"Undo",icon:"↩",command:"undo"},redo:{label:"Redo",icon:"↪",command:"redo"}},he=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Europe/London","Europe/Paris","Asia/Tokyo"];function ge(e){return String(e).padStart(2,"0")}const xe={sm:{trackW:32,trackH:18,thumbSize:14,offset:2},md:{trackW:44,trackH:24,thumbSize:20,offset:2},lg:{trackW:56,trackH:30,thumbSize:26,offset:2}},ye={none:"none",sm:"0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06)",md:"0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06)",lg:"0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05)"},me={none:"none",sm:"0 1px 3px rgba(0,0,0,0.12)",md:"0 4px 6px rgba(0,0,0,0.1)"};function be(e,t){return"both"===e?"auto":"horizontal"===e?"x"===t?"auto":"hidden":"y"===t?"auto":"hidden"}function ve(e){switch(e){case"never":return{scrollbarWidth:"none"};case"always":case"hover":return{scrollbarWidth:"thin"};default:return{scrollbarWidth:"auto"}}}function Se(e){return!isFinite(e)||e<0?"0:00":`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function ke(e){const t=e.orientation??"vertical",n=e.role??"navigation",r=e.keyboardNav??!0,i=e.styling??{},l=c(null),a={display:"flex",flexDirection:"horizontal"===t?"row":"column",backgroundColor:i.backgroundColor??"#ffffff",color:i.color??"#1f2937",fontFamily:i.fontFamily??"inherit",fontSize:i.fontSize??"14px",border:i.border??"1px solid #e5e7eb",borderRadius:i.borderRadius??"8px",padding:i.padding??"0",width:"number"==typeof i.width?`${i.width}px`:i.width??"auto",overflow:"auto",boxSizing:"border-box",listStyle:"none",margin:"0",...i.boxShadow?{boxShadow:i.boxShadow}:{},...i.maxHeight?{maxHeight:"number"==typeof i.maxHeight?`${i.maxHeight}px`:i.maxHeight}:{},...i.custom??{}},d=s(e=>{if(!r)return;const n=e,o=l.current;if(!o)return;const i=Array.from(o.querySelectorAll('button, [tabindex]:not([tabindex="-1"]), a[href], [role="menuitem"], [role="treeitem"]')),a=i.indexOf(document.activeElement);if(a<0)return;const s="vertical"===t,d=s?"ArrowDown":"ArrowRight",c=s?"ArrowUp":"ArrowLeft";if(n.key===d){n.preventDefault();const e=i[a+1];e&&e.focus()}else if(n.key===c){n.preventDefault();const e=i[a-1];e&&e.focus()}else"Home"===n.key?(n.preventDefault(),i[0]?.focus()):"End"===n.key&&(n.preventDefault(),i[i.length-1]?.focus())},[r,t]);return o("nav",{ref:l,role:n,"aria-label":e.ariaLabel??void 0,"aria-orientation":t,className:`nav-wrapper ${e.className??""}`.trim(),style:a,onKeyDown:d},e.children)}function we(e,t){return{display:"flex",alignItems:"center",padding:e.padding??"10px 16px",cursor:e.cursor??"pointer",transition:e.transition??"background-color 0.15s",backgroundColor:t.active?e.activeBackground??"#eff6ff":t.hover?e.hoverBackground??"#f3f4f6":"transparent",color:t.active?e.activeColor??"#2563eb":"inherit",border:"none",outline:"none",width:"100%",textAlign:"left",font:"inherit",...e.separator?{borderBottom:e.separator}:{}}}function $e(){const[e,t]=l(!1);return{hover:e,onMouseEnter:s(()=>t(!0),[]),onMouseLeave:s(()=>t(!1),[])}}function Me(e){const{section:t,expanded:n,onToggle:r,headerStyle:i,expandIcon:l,collapseIcon:a,iconPosition:d}=e,{hover:c,onMouseEnter:f,onMouseLeave:p}=$e(),u=!0===t.disabled,h={display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",boxSizing:"border-box",padding:i.padding??"12px 16px",backgroundColor:u?"#f9fafb":c?i.hoverBackground??"#f3f4f6":i.backgroundColor??"transparent",color:u?"#9ca3af":i.color??"inherit",fontWeight:i.fontWeight??"600",fontSize:i.fontSize??"inherit",border:"none",outline:"none",cursor:u?"not-allowed":"pointer",font:"inherit",textAlign:"left",transition:"background-color 0.15s",...i.borderBottom?{borderBottom:i.borderBottom}:{}};"left"===d&&(h.flexDirection="row");const g=s(e=>{const t=e;u||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r())},[u,r]),x=s(()=>{u||r()},[u,r]),y=o("span",{"aria-hidden":"true",style:{display:"inline-block",transition:"transform 0.2s ease",transform:n?"rotate(180deg)":"rotate(0deg)",flexShrink:"0",marginLeft:"right"===d?"auto":"0",marginRight:"left"===d?"8px":"0",paddingLeft:"right"===d?"8px":"0"}},n?a:l),m=t.icon?o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},o("span",{"aria-hidden":"true"},t.icon),t.header):t.header,b="left"===d?[y,m]:[m,y];return o("button",{id:`accordion-header-${t.id}`,role:"button","aria-expanded":String(n),"aria-controls":`accordion-panel-${t.id}`,"aria-disabled":u?"true":void 0,"data-section-id":t.id,tabIndex:u?-1:0,style:h,onClick:x,onKeyDown:g,onMouseEnter:f,onMouseLeave:p},...b)}function Ce(e){const{section:t,expanded:n,contentStyle:r,animated:i}=e,l={overflow:"hidden",boxSizing:"border-box",...i?{maxHeight:n?"2000px":"0",transition:"max-height 0.3s ease"}:{display:n?"block":"none"}},a={padding:r.padding??"12px 16px",backgroundColor:r.backgroundColor??"transparent",...r.borderBottom?{borderBottom:r.borderBottom}:{}};return o("div",{id:`accordion-panel-${t.id}`,role:"region","aria-labelledby":`accordion-header-${t.id}`,"aria-hidden":String(!n),"data-section-content":t.id,style:l},o("div",{style:a},t.content))}const ze={sm:{fontSize:"12px",padding:"4px 0"},md:{fontSize:"14px",padding:"6px 0"},lg:{fontSize:"16px",padding:"8px 0"}};function Ie(e){const{item:t,itemStyle:n,closeOnSelect:r,onClose:i}=e,{hover:a,onMouseEnter:d,onMouseLeave:c}=$e(),[f,p]=l(!1),u=t.children&&t.children.length>0;if(t.divider)return o("div",{role:"separator",style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const h=!0===t.disabled,g={...we(n,{hover:!h&&a,active:!1}),position:"relative",justifyContent:"space-between",...h?{color:"#9ca3af",cursor:"default",opacity:"0.6"}:{}},x=s(()=>{h||(u?p(e=>!e):(t.onClick&&t.onClick(),r&&i()))},[h,u,t,r,i]),y=s(()=>{d(),u&&p(!0)},[u,d]),m=s(()=>{c(),u&&p(!1)},[u,c]),b=o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.icon?o("span",{style:{flexShrink:"0"},"aria-hidden":"true"},t.icon):null,o("span",null,t.label)),v=u?o("span",{style:{marginLeft:"8px",fontSize:"10px",lineHeight:"1"},"aria-hidden":"true"},"›"):null,S=u&&f?o("div",{style:{position:"absolute",left:"100%",top:"0",zIndex:"1000"}},o(ke,{orientation:"vertical",role:"menu",styling:{boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"1px solid #e5e7eb",borderRadius:"6px",width:"200px",backgroundColor:"#ffffff"}},...t.children.map(e=>o(Ie,{key:e.id,item:e,itemStyle:n,closeOnSelect:r,onClose:i})))):null;return o("div",{style:{position:"relative"},onMouseEnter:y,onMouseLeave:m},o("button",{type:"button",role:"menuitem",style:g,onClick:x,disabled:h||void 0,tabIndex:h?-1:0,"aria-disabled":h?"true":void 0,"aria-haspopup":u||void 0,"aria-expanded":u?String(f):void 0},b,v),S)}function Ae(e){const{item:t,onClose:n,index:r}=e,{hover:i,onMouseEnter:a,onMouseLeave:d}=$e(),[c,f]=l(!1),p=t.children&&t.children.length>0;if(t.divider)return o("div",{role:"separator",style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const u=!0===t.disabled,h=s(()=>{u||(p?f(e=>!e):(t.onClick&&t.onClick(),n()))},[u,p,t,n]),g=s(()=>{a(),p&&f(!0)},[p,a]),x=s(()=>{d(),p&&f(!1)},[p,d]),y={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 16px",fontSize:"13px",fontFamily:"inherit",border:"none",outline:"none",width:"100%",textAlign:"left",cursor:u?"default":"pointer",backgroundColor:!u&&i?"#f3f4f6":"transparent",color:u?"#9ca3af":"#1f2937",opacity:u?"0.6":"1",transition:"background-color 0.1s",boxSizing:"border-box"},m=o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.icon?o("span",{style:{width:"16px",textAlign:"center"},"aria-hidden":"true"},t.icon):o("span",{style:{width:"16px"}}),o("span",null,t.label)),b=p?o("span",{style:{fontSize:"10px",color:"#9ca3af"},"aria-hidden":"true"},"▶"):t.shortcut?o("span",{style:{fontSize:"11px",color:"#9ca3af",marginLeft:"24px"}},t.shortcut):null,v=p&&c?o("div",{style:{position:"absolute",left:"100%",top:"0",zIndex:"1001"}},o("div",{role:"menu",style:{backgroundColor:"#ffffff",border:"1px solid #e5e7eb",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",minWidth:"180px"}},...t.children.map((e,t)=>o(Ae,{key:String(t),item:e,onClose:n,index:t})))):null;return o("div",{style:{position:"relative"},onMouseEnter:g,onMouseLeave:x},o("button",{type:"button",role:"menuitem",style:y,onClick:h,disabled:u||void 0,tabIndex:-1,"aria-disabled":u||void 0,"aria-haspopup":p||void 0,"aria-expanded":p?c:void 0},m,b),v)}function Fe(e){const{menu:t,index:n,isOpen:r,anyOpen:i,onOpen:l,onClose:a}=e,{hover:d,onMouseEnter:f,onMouseLeave:p}=$e(),u=c(null),h=s(()=>{r?a():l(n)},[r,n,l,a]),g=s(()=>{f(),i&&!r&&l(n)},[i,r,n,l,f]),x={display:"inline-flex",alignItems:"center",padding:"6px 12px",fontSize:"13px",fontFamily:"inherit",border:"none",outline:"none",cursor:"pointer",backgroundColor:r?"#e5e7eb":d?"#f3f4f6":"transparent",color:"#1f2937",borderRadius:"4px",transition:"background-color 0.1s"},y=r?o("div",{style:{position:"absolute",top:"100%",left:"0",zIndex:"1000",marginTop:"2px"}},o("div",{role:"menu","aria-label":`${t.label} menu`,style:{backgroundColor:"#ffffff",border:"1px solid #e5e7eb",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",minWidth:"200px"}},...t.items.map((e,t)=>o(Ae,{key:String(t),item:e,onClose:a,index:t})))):null;return o("div",{style:{position:"relative",display:"inline-block"},onMouseEnter:g,onMouseLeave:p},o("button",{ref:u,type:"button",role:"menuitem",style:x,onClick:h,"aria-haspopup":"true","aria-expanded":String(r),tabIndex:0},t.label),y)}function Re(e,t){const n=[];for(let o=e;o<=t;o++)n.push(o);return n}const De={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"36px",height:"36px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"#ffffff",color:"#374151",fontSize:"14px",fontFamily:"inherit",cursor:"pointer",transition:"background-color 0.15s, color 0.15s",outline:"none",userSelect:"none"},Le={...De,backgroundColor:"#2563eb",color:"#ffffff",borderColor:"#2563eb",fontWeight:"600"},Ne={...De,color:"#9ca3af",cursor:"default",opacity:"0.5"},Te={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"36px",height:"36px",color:"#6b7280",fontSize:"14px",userSelect:"none"};function We(e){const{item:t,collapsed:n,selectedId:r,onSelect:i,depth:a}=e,{hover:d,onMouseEnter:c,onMouseLeave:f}=$e(),[p,u]=l(!1),h=t.children&&t.children.length>0,g=t.id===r,x=s(()=>{h&&!n&&u(e=>!e),i&&i(t.id)},[h,n,i,t.id]),y={display:"flex",alignItems:"center",padding:n?"10px 0":"10px 12px 10px "+(n?"0":16+16*a+"px"),justifyContent:n?"center":"flex-start",cursor:"pointer",backgroundColor:g?"#eff6ff":d?"#f3f4f6":"transparent",color:g?"#2563eb":"#1f2937",border:"none",outline:"none",width:"100%",textAlign:"left",font:"inherit",fontSize:"14px",transition:"background-color 0.15s",position:"relative",gap:"10px",boxSizing:"border-box"},m=t.icon?o("span",{style:{flexShrink:"0",fontSize:"16px"},"aria-hidden":"true"},t.icon):null,b=n?null:o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},t.label),v=!n&&t.badge?o("span",{style:{backgroundColor:"#ef4444",color:"#ffffff",fontSize:"11px",fontWeight:"600",padding:"1px 6px",borderRadius:"10px",marginLeft:"4px",flexShrink:"0"}},t.badge):null,S=!n&&h?o("span",{style:{fontSize:"10px",transition:"transform 0.15s",transform:p?"rotate(90deg)":"rotate(0deg)",marginLeft:"4px"},"aria-hidden":"true"},"▶"):null,k=n&&d?o("div",{style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px",padding:"4px 10px",backgroundColor:"#1f2937",color:"#ffffff",fontSize:"12px",borderRadius:"4px",whiteSpace:"nowrap",zIndex:"1000",pointerEvents:"none"},role:"tooltip"},t.label):null,w=o("button",{type:"button",style:y,onClick:x,onMouseEnter:c,onMouseLeave:f,"aria-selected":g?"true":"false",title:n?t.label:void 0},m,b,v,S,k),$=!n&&h&&p?t.children.map(e=>o(We,{key:e.id,item:e,collapsed:n,selectedId:r,onSelect:i,depth:a+1})):null;return o("div",{key:t.id,style:{position:"relative"}},w,$?o("div",{role:"group"},...$):null)}const Be={sm:{height:"28px",padding:"4px 8px",fontSize:"12px",iconSize:"14px"},md:{height:"36px",padding:"6px 12px",fontSize:"14px",iconSize:"16px"},lg:{height:"44px",padding:"8px 16px",fontSize:"16px",iconSize:"18px"}};function Ee(e){const{item:t,size:n,variant:r}=e,{hover:i,onMouseEnter:a,onMouseLeave:d}=$e(),c=Be[n],f=!0===t.disabled,p="toggle"===t.type,[u,h]=l(!1),g=p?!0===t.active:u,x=s(()=>{!f&&t.onClick&&t.onClick()},[f,t]),y=s(()=>{f||p||h(!0)},[f,p]),m=s(()=>{p||h(!1)},[p]),b=s(()=>{d(),p||h(!1)},[p,d]),v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6px",height:c.height,padding:c.padding,fontSize:c.fontSize,fontFamily:"inherit",border:"raised"===r?"1px solid #d1d5db":"1px solid transparent",borderRadius:"4px",backgroundColor:g?"#e0e7ff":!f&&i?"#f3f4f6":"raised"===r?"#ffffff":"transparent",color:f?"#9ca3af":g?"#2563eb":"#374151",cursor:f?"default":"pointer",opacity:f?"0.5":"1",outline:"none",transition:"background-color 0.15s"},S=t.icon?o("span",{style:{fontSize:c.iconSize},"aria-hidden":"true"},t.icon):null,k=t.label?o("span",null,t.label):null,w="dropdown"===t.type?o("span",{style:{fontSize:"10px",marginLeft:"2px"},"aria-hidden":"true"},"▼"):null;return o("button",{type:"button",style:v,onClick:x,onMouseDown:y,onMouseUp:m,onMouseEnter:a,onMouseLeave:b,disabled:f||void 0,"aria-pressed":p?g:void 0,"aria-label":t.label||t.id,title:t.label||t.id},S,k,w)}class Pe{constructor(e,t){this.id=e.id,this.label=e.label,this.expanded=e.expanded??!1,this.icon=e.icon??null,this.metadata=e.metadata??{},this.parent=t??null,this.depth=t?t.depth+1:0,this.children=(e.children??[]).map(e=>new Pe(e,this))}static fromData(e){return new Pe(e)}isLeaf(){return 0===this.children.length}isRoot(){return null===this.parent}walk(e){e(this,this.depth);for(const t of this.children)t.walk(e)}find(e){if(this.id===e)return this;for(const t of this.children){const n=t.find(e);if(n)return n}return null}toggle(){this.expanded=!this.expanded}expand(){this.expanded=!0}collapse(){this.expanded=!1}addChild(e){const t=new Pe(e,this);return this.children.push(t),t}removeChild(e){const t=this.children.findIndex(t=>t.id===e);return-1!==t&&(this.children.splice(t,1),!0)}}function He(e){e.expanded=!0;for(const t of e.children)He(t)}function je(e,t=[]){if(t.push(e),e.expanded)for(const n of e.children)je(n,t);return t}function Ye(e){if(!e.parent)return!0;const t=e.parent.children;return t[t.length-1]===e}function _e(e){const{node:t,isSelected:n,indentPx:r,lineColor:i,lineWidth:l,iconExpanded:s,iconCollapsed:d,nodeStyle:f,renderNode:p,onToggle:u,onClick:h,focusedId:g}=e,x=$e(),y=c(null),m=g===t.id;a(()=>{m&&y.current&&y.current.focus()},[m]);const b=t.isLeaf(),v=t.depth,S=[];for(let e=0;e<v;e++){let n=t;for(let t=0;t<v-e;t++)n=n?n.parent:null;const a=!!n&&!Ye(n);S.push(o("span",{key:`connector-${e}`,"aria-hidden":"true",style:{display:"inline-block",width:`${r}px`,height:"100%",position:"relative",flexShrink:"0",...a?{borderLeft:`${l}px solid ${i}`}:{}}}))}const k=v>0?o("span",{"aria-hidden":"true",style:{display:"inline-block",width:`${Math.floor(r/2)}px`,height:"0",borderTop:`${l}px solid ${i}`,flexShrink:"0",alignSelf:"center",marginLeft:`-${r}px`}}):null,w=b?o("span",{"aria-hidden":"true",style:{display:"inline-block",width:"18px",flexShrink:"0",marginRight:"4px"}}):o("span",{"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"18px",height:"18px",fontSize:"14px",lineHeight:"1",cursor:"pointer",userSelect:"none",flexShrink:"0",marginRight:"4px",fontFamily:"monospace"},onClick:e=>{e.stopPropagation(),u(t)}},t.expanded?s:d),$=p?p(t,n):o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},t.icon?o("span",{style:{marginRight:"6px"}},t.icon):null,t.label),M=we(f,{hover:x.hover,active:n});return o("div",{ref:y,role:"treeitem","aria-expanded":b?void 0:String(t.expanded),"aria-selected":n?"true":"false","aria-level":v+1,tabIndex:m?0:-1,style:{...M,display:"flex",alignItems:"stretch",padding:"0"},onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,onClick:()=>h(t)},...S,k,o("span",{style:{display:"flex",alignItems:"center",flex:"1",padding:f.padding??"6px 10px",minWidth:"0"}},w,$))}function qe(e){const{items:t,position:n,onClose:r,depth:i}=e,[s,d]=l(-1),[f,p]=l(null),u=c(null);a(()=>{if(!u.current)return;u.current.focus();const e=e=>{const n=e,o=t.map((e,t)=>({item:e,i:t})).filter(({item:e})=>!e.divider);if("ArrowDown"===n.key)n.preventDefault(),d(e=>{const t=(o.findIndex(({i:t})=>t===e)+1)%o.length;return o[t].i});else if("ArrowUp"===n.key)n.preventDefault(),d(e=>{const t=o.findIndex(({i:t})=>t===e),n=t<=0?o.length-1:t-1;return o[n].i});else if("ArrowRight"===n.key)s>=0&&t[s]?.children&&p(s);else if("ArrowLeft"===n.key)i>0&&r();else if("Enter"===n.key){if(n.preventDefault(),s>=0){const e=t[s];e.children?p(s):!e.disabled&&e.onClick&&(e.onClick(),r())}}else"Escape"===n.key&&r()};u.current.addEventListener("keydown",e);const n=u.current;return()=>n.removeEventListener("keydown",e)},[t,s,i,r]);const h={position:"fixed",left:`${n.x}px`,top:`${n.y}px`,backgroundColor:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",padding:"4px 0",minWidth:"180px",zIndex:`${10200+i}`,outline:"none",overflow:"visible"},g=t.map((e,t)=>{if(e.divider)return o("div",{key:`divider-${t}`,style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const l=s===t,a=!!e.disabled,c=!!(e.children&&e.children.length>0),u={display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",fontSize:"14px",color:a?"#9ca3af":"#1f2937",cursor:a?"default":"pointer",backgroundColor:l&&!a?"#f3f4f6":"transparent",userSelect:"none",position:"relative"},h=[];e.icon&&h.push(o("span",{style:{width:"20px",textAlign:"center",flexShrink:"0"}},e.icon)),h.push(o("span",{style:{flex:"1"}},e.label??"")),c&&h.push(o("span",{style:{fontSize:"10px",color:"#9ca3af",marginLeft:"8px"}},"▶"));const g=[o("div",{key:`item-${t}`,style:u,onMouseEnter:()=>{d(t),p(c?t:null)},onClick:()=>{a||(c?p(t):(e.onClick&&e.onClick(),r()))},role:"menuitem","aria-disabled":a?"true":void 0},...h)];return c&&f===t&&g.push(o(qe,{key:`submenu-${t}`,items:e.children,position:{x:n.x+178,y:n.y+36*t},onClose:()=>p(null),depth:i+1})),o("div",{key:`wrap-${t}`,style:{position:"relative"}},...g)});return o("div",{ref:u,style:h,tabIndex:-1,role:"menu"},...g)}function Oe(e,t){if(t)return"translate3d(0, 0, 0)";switch(e){case"left":return"translate3d(-100%, 0, 0)";case"right":return"translate3d(100%, 0, 0)";case"top":return"translate3d(0, -100%, 0)";case"bottom":return"translate3d(0, 100%, 0)"}}function Ue(e,t){const n={position:"fixed",zIndex:"10001",backgroundColor:"#fff",boxShadow:"0 0 24px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"};switch(e){case"left":return{...n,top:"0",left:"0",bottom:"0",width:t};case"right":return{...n,top:"0",right:"0",bottom:"0",width:t};case"top":return{...n,top:"0",left:"0",right:"0",height:t};case"bottom":return{...n,bottom:"0",left:"0",right:"0",height:t}}}const Ge={sm:"400px",md:"600px",lg:"800px",full:"100vw"};function Ve(e,t){const n=t+8;switch(e){case"top":return{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:`${n}px`};case"bottom":return{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:`${n}px`};case"left":return{position:"absolute",right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:`${n}px`};case"right":return{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:`${n}px`}}}function Xe(e){const t={position:"absolute",width:"0",height:"0",borderStyle:"solid"},n="8px",o="transparent";switch(e){case"top":return{...t,bottom:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`${n} ${n} 0 ${n}`,borderColor:`#fff ${o} ${o} ${o}`};case"bottom":return{...t,top:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`0 ${n} ${n} ${n}`,borderColor:`${o} ${o} #fff ${o}`};case"left":return{...t,right:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} 0 ${n} ${n}`,borderColor:`${o} ${o} ${o} #fff`};case"right":return{...t,left:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} ${n} ${n} 0`,borderColor:`${o} #fff ${o} ${o}`}}}let Ke=0;function Ze(e={}){const t={position:e.position??"top-right",maxToasts:e.maxToasts??5,defaultDuration:e.defaultDuration??4e3};let n=[];const o=new Set;function r(){o.forEach(e=>e())}return{toast:function(e,o={}){const i=`toast-${++Ke}-${Date.now()}`,l={id:i,message:e,type:o.type??"info",duration:o.duration??t.defaultDuration,action:o.action,createdAt:Date.now()};return n=[l,...n].slice(0,t.maxToasts),r(),i},dismiss:function(e){n=n.filter(t=>t.id!==e),r()},dismissAll:function(){n=[],r()},subscribe:e=>(o.add(e),()=>{o.delete(e)}),getToasts:()=>n,config:t}}const Je={info:{bg:"#eff6ff",border:"#3b82f6",icon:"ℹ️"},success:{bg:"#f0fdf4",border:"#22c55e",icon:"✅"},warning:{bg:"#fffbeb",border:"#f59e0b",icon:"⚠️"},error:{bg:"#fef2f2",border:"#ef4444",icon:"❌"}};function Qe(e){const{item:t,onDismiss:n}=e,r=Je[t.type];a(()=>{if(t.duration<=0)return;const e=setTimeout(()=>n(t.id),t.duration);return()=>clearTimeout(e)},[t.id,t.duration,n]);const i={backgroundColor:r.bg,borderLeft:`4px solid ${r.border}`,borderRadius:"6px",padding:"12px 16px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",gap:"10px",pointerEvents:"auto",minWidth:"280px",maxWidth:"420px",animation:"specifyjs-toast-slide-in 0.3s ease forwards"},l={background:"none",border:`1px solid ${r.border}`,borderRadius:"4px",cursor:"pointer",fontSize:"12px",fontWeight:"600",color:r.border,padding:"4px 10px",flexShrink:"0"},s=[o("span",null,r.icon),o("span",{style:{flex:"1",fontSize:"14px",color:"#1f2937",lineHeight:"1.4"}},t.message)];return t.action&&s.push(o("button",{type:"button",style:l,onClick:t.action.onClick},t.action.label)),s.push(o("button",{type:"button",style:{background:"none",border:"none",cursor:"pointer",fontSize:"16px",color:"#9ca3af",padding:"2px 6px",lineHeight:"1",flexShrink:"0"},onClick:()=>n(t.id),"aria-label":"Dismiss toast"},"×")),o("div",{style:i,role:"alert"},...s)}function et(e){const{toaster:t}=e,[,n]=l(0);a(()=>t.subscribe(()=>n(e=>e+1)),[t]);const r=t.getToasts();if(0===r.length)return null;const i=function(e){const t={position:"fixed",zIndex:"10100",display:"flex",flexDirection:"column",gap:"8px",padding:"16px",pointerEvents:"none"},n=e.startsWith("top"),o=e.startsWith("bottom"),r=e.endsWith("left"),i=e.endsWith("right"),l=e.endsWith("center");return n&&(t.top="0"),o&&(t.bottom="0",t.flexDirection="column-reverse"),r&&(t.left="0"),i&&(t.right="0"),l&&(t.left="50%",t.transform="translateX(-50%)"),t}(t.config.position);a(()=>{const e="specifyjs-toast-keyframes";if(document.getElementById(e))return;const t=document.createElement("style");return t.id=e,t.textContent="\n @keyframes specifyjs-toast-slide-in {\n from { opacity: 0; transform: translateY(-12px); }\n to { opacity: 1; transform: translateY(0); }\n }\n ",document.head.appendChild(t),()=>{const t=document.getElementById(e);t&&t.remove()}},[]);const d=s(e=>t.dismiss(e),[t]),c=r.map(e=>o(Qe,{key:e.id,item:e,onDismiss:d}));return o("div",{style:i},...c)}function tt(e){const t={position:"absolute",width:"0",height:"0",borderStyle:"solid"},n="6px",o="transparent",r="#1f2937";switch(e){case"top":return{...t,bottom:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`${n} ${n} 0 ${n}`,borderColor:`${r} ${o} ${o} ${o}`};case"bottom":return{...t,top:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`0 ${n} ${n} ${n}`,borderColor:`${o} ${o} ${r} ${o}`};case"left":return{...t,right:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} 0 ${n} ${n}`,borderColor:`${o} ${o} ${o} ${r}`};case"right":return{...t,left:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} ${n} ${n} 0`,borderColor:`${o} ${r} ${o} ${o}`}}}function nt(e,t,n,o,r){return d(()=>{const i=Math.max(1,(o-r*(e+1))/e);return{valueScale:e=>0===t?0:e/t*n,categoryScale:e=>r+e*(i+r),barThickness:i,maxValue:t,valueAxisLength:n,categoryAxisLength:o}},[e,t,n,o,r])}const ot=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function rt(e,t){return t||ot[e%ot.length]}function it(e){const{start:t,end:n,step:o}=e;if(o<=0||!isFinite(o))return[];const r=Math.ceil((n-t)/o)+1;if(r>1e6)return[];const i=[];for(let e=0;e<r;e++){const r=t+e*o;if(r>n+.001*o)break;i.push(r)}return i}function lt(e,t){const n=[];for(let o=0;o<t.length;o++){const r=t[o],i=e(r);isFinite(i)&&n.push({input:r,output:i})}return n}function at(e,t,n,o){let r=!1,i=0;const l=[],a=()=>{if(r)return;const s=Math.min(i+n,t.length);for(let n=i;n<s;n++){const o=t[n],r=e(o);isFinite(r)&&l.push({input:o,output:r})}i=s,i>=t.length?o(l,!0):(o(l,!1),st(a))};return st(a),()=>{r=!0}}function st(e){"function"==typeof requestIdleCallback?requestIdleCallback(()=>e(),{timeout:16}):setTimeout(e,0)}function dt(e,t){const n=t-e;if(n<=0)return[e];const o=function(e){const t=e/8,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return(o<1.5?1:o<3?2:o<7?5:10)*n}(n),r=[];for(let n=Math.ceil(e/o)*o;n<=t+.001*o;n+=o)r.push(Math.round(1e10*n)/1e10);return r}function ct(e){return Number.isInteger(e)?String(e):e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}const ft=40,pt=1e6;function ut(e,t,n){let o=0,r=0;for(let i=0;i<n;i++){const n=o*o,l=r*r;if(n+l>4)return i;r=2*o*r+t,o=n-l+e}return n}function ht(e,t,n){if(e===t)return[0,0,0];const o=e/t;if("fire"===n)return[Math.floor(255*Math.min(1,3*o)),Math.floor(255*Math.max(0,3*o-1)),Math.floor(255*Math.max(0,3*o-2))];if("ocean"===n)return[Math.floor(255*o*.3),Math.floor(255*o*.6),Math.floor(255*(.4+.6*o))];const r=360*o%360,i=1*(1-Math.abs(0)),l=i*(1-Math.abs(r/60%2-1)),a=.5-i/2;let s=0,d=0,c=0;return r<60?(s=i,d=l):r<120?(s=l,d=i):r<180?(d=i,c=l):r<240?(d=l,c=i):r<300?(s=l,c=i):(s=i,c=l),[Math.floor(255*(s+a)),Math.floor(255*(d+a)),Math.floor(255*(c+a))]}function gt(e,t,n){if(e===t)return[e];const o=(t-e)/(n-1),r=[];for(let t=0;t<n;t++){const n=e+o*t;r.push(Math.round(1e10*n)/1e10)}return r}function xt(e,t,n,o){return d(()=>function(e,t,n,o){if(0===e.length)return{xScale:()=>o,yScale:()=>n-o,xTicks:[],yTicks:[],xMin:0,xMax:0,yMin:0,yMax:0};let r=1/0,i=-1/0,l=1/0,a=-1/0;for(const t of e)t.x<r&&(r=t.x),t.x>i&&(i=t.x),t.y<l&&(l=t.y),t.y>a&&(a=t.y);r===i&&(r-=1,i+=1),l===a&&(l-=1,a+=1);const s=t-2*o,d=n-2*o;return{xScale:e=>o+(e-r)/(i-r)*s,yScale:e=>n-o-(e-l)/(a-l)*d,xTicks:gt(r,i,6),yTicks:gt(l,a,6),xMin:r,xMax:i,yMin:l,yMax:a}}(e,t,n,o),[e,t,n,o])}function yt(e){return Number.isInteger(e)?String(e):e.toFixed(1)}function mt(e,t,n,r,i,l,a){const s={fill:i,key:l,...a};switch(e){case"square":return o("rect",{...s,x:t-r,y:n-r,width:2*r,height:2*r});case"diamond":{const e=`${t},${n-r} ${t+r},${n} ${t},${n+r} ${t-r},${n}`;return o("polygon",{...s,points:e})}case"triangle":{const e=`${t},${n-1.15*r} ${t+r},${n+.6*r} ${t-r},${n+.6*r}`;return o("polygon",{...s,points:e})}case"triangle-down":{const e=`${t-r},${n-.6*r} ${t+r},${n-.6*r} ${t},${n+1.15*r}`;return o("polygon",{...s,points:e})}case"cross":{const e=.35*r;return o("path",{...s,fill:"none",stroke:i,"stroke-width":String(2*e),"stroke-linecap":"round",d:`M${t-r},${n-r}L${t+r},${n+r}M${t+r},${n-r}L${t-r},${n+r}`})}case"plus":{const e=.35*r;return o("path",{...s,fill:"none",stroke:i,"stroke-width":String(2*e),"stroke-linecap":"round",d:`M${t},${n-r}L${t},${n+r}M${t-r},${n}L${t+r},${n}`})}default:return o("circle",{...s,cx:t,cy:n,r:r})}}function bt(e,t,n,o){return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function vt(e,t,n,o,r,i){const l=r-Math.PI/2,a=i-Math.PI/2,s=bt(e,t,o,l),d=bt(e,t,o,a),c=i-r>Math.PI?1:0;if(n<=0)return[`M ${e} ${t}`,`L ${s.x} ${s.y}`,`A ${o} ${o} 0 ${c} 1 ${d.x} ${d.y}`,"Z"].join(" ");const f=bt(e,t,n,a),p=bt(e,t,n,l);return[`M ${s.x} ${s.y}`,`A ${o} ${o} 0 ${c} 1 ${d.x} ${d.y}`,`L ${f.x} ${f.y}`,`A ${n} ${n} 0 ${c} 0 ${p.x} ${p.y}`,"Z"].join(" ")}function St(e,t){const n=t?.padAngle??0,o=function(e,t){const n=t??function(e){const t=[];for(let n=0;n<e;n++){const o=Math.round(360*n/e);t.push(`hsl(${o}, 70%, 55%)`)}return t}(e.length);return e.map((e,t)=>e.color??n[t%n.length])}(e,t?.colors),r=e.reduce((e,t)=>e+t.value,0);if(r<=0)return[];const i=n*e.length,l=2*Math.PI-i,a=[];let s=0;for(let t=0;t<e.length;t++){const i=e[t],d=s+n/2,c=d+i.value/r*l;a.push({label:i.label,value:i.value,startAngle:d,endAngle:c,percentage:i.value/r*100,color:o[t]}),s=c+n/2}return a}function kt(e,t,n,o,r){return{x:n+e*Math.cos(t)*r,y:o-e*Math.sin(t)*r}}function wt(e){const t=1<<e,n=[];for(let o=0;o<t;o++){const t=[];for(let n=0;n<e;n++)t.push(2*(o>>n&1)-1);n.push({coords:t})}return n}function $t(e){const t=1<<e,n=[];for(let o=0;o<t;o++)for(let t=0;t<e;t++){const e=o^1<<t;e>o&&n.push({source:o,target:e})}return n}function Mt(e,t){let n=Ct(e),o=0;for(let r=0;r<e;r++)for(let i=r+1;i<e;i++)o<t.length&&(n=It(n,zt(e,r,i,t[o]))),o++;return n}function Ct(e){const t=[];for(let n=0;n<e;n++){const o=new Array(e).fill(0);o[n]=1,t.push(o)}return t}function zt(e,t,n,o){const r=Ct(e),i=Math.cos(o),l=Math.sin(o);return r[t][t]=i,r[t][n]=-l,r[n][t]=l,r[n][n]=i,r}function It(e,t){const n=e.length,o=[];for(let r=0;r<n;r++){const i=new Array(n).fill(0);for(let o=0;o<n;o++)for(let l=0;l<n;l++)i[o]+=e[r][l]*t[l][o];o.push(i)}return o}function At(e,t){const n=e.length,o=new Array(n).fill(0);for(let r=0;r<n;r++)for(let i=0;i<n;i++)o[r]+=e[r][i]*t.coords[i];return o}function Ft(e,t=0){const n=e[0]??0,o=e[1]??0;let r=0;for(let t=2;t<e.length;t++)r+=e[t]??0;if(e.length>2&&(r/=e.length-2),t>0){const e=1/(1+t*(r+2));return{x:n*e,y:o*e,depth:r}}return{x:n,y:o,depth:r}}function Rt(e,t=[],n=.3,o=1){const r=wt(e),i=$t(e),l=Mt(e,t);return{vertices:r.map((e,t)=>{const r=Ft(At(l,e),n);return{id:t,position:e,x:r.x*o,y:r.y*o,depth:r.depth}}),edges:i,dimension:e}}function Dt(e){return e*(e-1)/2}function Lt(e,t=70,n=55){const o=[];for(let r=0;r<e;r++){const i=Math.round(360*r/e);o.push(`hsl(${i}, ${t}%, ${n}%)`)}return o}const Nt=[{letter:"F",color:"#3465a4",label:"Files"},{letter:"W",color:"#e67e22",label:"Browser"},{letter:"T",color:"#2ecc71",label:"Terminal"},{letter:"M",color:"#3498db",label:"Mail"},{letter:"N",color:"#e74c3c",label:"Music"},{letter:"P",color:"#9b59b6",label:"Photos"},{letter:"S",color:"#f39c12",label:"Software"},{letter:"G",color:"#7f8c8d",label:"Settings"}],Tt=["🔊","📶","🔋"];let Wt=1;const Bt=["File","Edit","View","Insert","Format","Tools","Help"],Et={File:[{label:"New",action:"new"},{label:"Open",action:"open"},{label:"Save",action:"save"},{label:"Print",action:"print"}],Edit:[{label:"Undo",action:"undo"},{label:"Redo",action:"redo"},{label:"Cut",action:"cut"},{label:"Copy",action:"copy"},{label:"Paste",action:"paste"}],View:[{label:"Zoom In",action:"zoomIn"},{label:"Zoom Out",action:"zoomOut"},{label:"Full Screen",action:"fullScreen"}],Insert:[{label:"Image",action:"insertImage"},{label:"Table",action:"insertTable"},{label:"Link",action:"insertLink"}],Format:[{label:"Bold",action:"bold"},{label:"Italic",action:"italic"},{label:"Underline",action:"underline"}],Tools:[{label:"Word Count",action:"wordCount"},{label:"Spell Check",action:"spellCheck"}],Help:[{label:"About",action:"about"},{label:"Keyboard Shortcuts",action:"shortcuts"}]},Pt=[{id:"bold",label:"Bold",text:"B",shortcut:"Ctrl+B",style:{fontWeight:"700"}},{id:"italic",label:"Italic",text:"I",shortcut:"Ctrl+I",style:{fontStyle:"italic"}},{id:"underline",label:"Underline",text:"U",shortcut:"Ctrl+U",style:{textDecoration:"underline"}}],Ht=[{label:"Align left",text:"≡",command:"justifyLeft"},{label:"Align center",text:"≣",command:"justifyCenter"},{label:"Align right",text:"≢",command:"justifyRight"}],jt=["1","2","3","4","5","6","7"],Yt={1:"8",2:"10",3:"12",4:"14",5:"18",6:"24",7:"36"};function _t(e){return e.trim().split(/\s+/).filter(e=>e.length>0).length}const qt=["File","Edit","Selection","View","Go","Run","Terminal","Help"],Ot={File:[{label:"New File",action:"newFile"},{label:"Open",action:"open"},{label:"Save",action:"save"},{label:"Save As",action:"saveAs"}],Edit:[{label:"Undo",action:"undo"},{label:"Redo",action:"redo"},{label:"Cut",action:"cut"},{label:"Copy",action:"copy"},{label:"Paste",action:"paste"}],View:[{label:"Command Palette",action:"commandPalette"},{label:"Explorer",action:"explorer"},{label:"Search",action:"search"}]},Ut=[{name:"src",indent:0,isFolder:!0},{name:"components",indent:1,isFolder:!0,parent:"src"},{name:"App.ts",indent:2,isFolder:!1,parent:"components"},{name:"Header.ts",indent:2,isFolder:!1,parent:"components"},{name:"hooks",indent:1,isFolder:!0,parent:"src"},{name:"useAuth.ts",indent:2,isFolder:!1,parent:"hooks"},{name:"index.ts",indent:1,isFolder:!1,parent:"src"},{name:"main.ts",indent:1,isFolder:!1,parent:"src"},{name:"types.ts",indent:1,isFolder:!1,parent:"src"},{name:"package.json",indent:0,isFolder:!1},{name:"tsconfig.json",indent:0,isFolder:!1}],Gt={"App.ts":['import { createElement, useState } from "specifyjs";',"","interface AppProps {"," title: string;"," version?: number;","}","","export function App(props: AppProps) {"," const [count, setCount] = useState(0);",""," const increment = () => {"," setCount((prev: number) => prev + 1);"," };",""," return createElement(",' "div",',' { className: "app" },',' createElement("h1", null, props.title),',' createElement("p", null, `Count: ${count}`),'," createElement(",' "button",'," { onClick: increment },",' "Increment",'," ),"," );","}"],"Header.ts":['import { createElement } from "specifyjs";',"","interface HeaderProps {"," title: string;"," subtitle?: string;","}","","export function Header(props: HeaderProps) {"," return createElement(",' "header",',' { className: "header" },',' createElement("h1", null, props.title),'," props.subtitle",' ? createElement("p", null, props.subtitle)'," : null,"," );","}"],"useAuth.ts":['import { useState, useCallback } from "specifyjs";',"","interface AuthState {"," user: string | null;"," isLoggedIn: boolean;","}","","export function useAuth() {"," const [auth, setAuth] = useState<AuthState>({"," user: null,"," isLoggedIn: false,"," });",""," const login = useCallback((username: string) => {"," setAuth({ user: username, isLoggedIn: true });"," }, []);",""," const logout = useCallback(() => {"," setAuth({ user: null, isLoggedIn: false });"," }, []);",""," return { ...auth, login, logout };","}"],"index.ts":['export { App } from "./components/App";','export { Header } from "./components/Header";','export { useAuth } from "./hooks/useAuth";'],"main.ts":['import { createElement, createRoot } from "specifyjs";','import { App } from "./components/App";',"","const root = createRoot(",' document.getElementById("root")!',");","","root.render("," createElement(App, {",' title: "My SpecifyJS App",'," version: 1,"," }),",");"],"types.ts":["export interface User {"," id: string;"," name: string;"," email: string;",' role: "admin" | "user" | "guest";',"}","","export interface Config {"," apiUrl: string;"," debug: boolean;"," maxRetries: number;","}","","export type EventHandler<T = void> = (event: T) => void;"],"package.json":["{",' "name": "specifyjs-app",',' "version": "1.0.0",',' "scripts": {',' "dev": "vite",',' "build": "tsc && vite build",',' "preview": "vite preview"'," }","}"],"tsconfig.json":["{",' "compilerOptions": {',' "target": "ES2020",',' "module": "ESNext",',' "strict": true,',' "jsx": "preserve"'," },",' "include": ["src"]',"}"]},Vt=Gt["App.ts"],Xt=new Set(["import","export","from","const","let","var","function","return","if","else","for","while","class","new","throw","try","catch","finally","typeof","instanceof","in","of","default","switch","case","break","continue","do","void","delete","yield","async","await"]),Kt=new Set(["string","number","boolean","void","null","undefined","any","never","unknown","object","interface","type","enum"]),Zt="#569cd6",Jt="#d4d4d4",Qt=[{symbol:"AAPL",price:189.42,change:1.23,volume:523e5,spark:[186,187,188,187,189]},{symbol:"GOOGL",price:141.8,change:-.87,volume:231e5,spark:[143,142,141,142,141]},{symbol:"MSFT",price:378.91,change:2.45,volume:187e5,spark:[375,376,378,377,379]},{symbol:"AMZN",price:185.63,change:-1.12,volume:314e5,spark:[187,186,186,185,185]},{symbol:"TSLA",price:248.5,change:3.78,volume:672e5,spark:[244,245,247,246,249]},{symbol:"NVDA",price:875.3,change:12.5,volume:418e5,spark:[860,865,870,868,876]}],en=[{price:189.4,qty:1200},{price:189.38,qty:3400},{price:189.35,qty:800},{price:189.32,qty:5600},{price:189.3,qty:2100},{price:189.28,qty:4300}],tn=[{price:189.44,qty:900},{price:189.47,qty:2200},{price:189.5,qty:1500},{price:189.53,qty:3800},{price:189.55,qty:1100},{price:189.58,qty:2700}],nn=[{symbol:"AAPL",qty:100,avgPrice:185.2,currentPrice:189.42,pnl:422},{symbol:"MSFT",qty:50,avgPrice:382.1,currentPrice:378.91,pnl:-159.5},{symbol:"NVDA",qty:25,avgPrice:850,currentPrice:875.3,pnl:632.5}],on=[{time:"14:32:01",symbol:"AAPL",side:"BUY",qty:50,price:189.42},{time:"14:31:45",symbol:"MSFT",side:"SELL",qty:25,price:378.95},{time:"14:30:22",symbol:"TSLA",side:"BUY",qty:100,price:247.8},{time:"14:29:58",symbol:"NVDA",side:"BUY",qty:10,price:874.5},{time:"14:28:33",symbol:"GOOGL",side:"SELL",qty:75,price:142.1}],rn=[185.2,186.1,185.8,187.5,188.2,187.9,186.5,187.8,188.4,189.1,188.6,187.2,188.5,189.8,189.2,188.9,189.5,190.1,189.4,188.8,189.6,190.3,189.9,189.42],ln=[{price:189.4,volume:1200},{price:189.35,volume:3400},{price:189.3,volume:2800},{price:189.25,volume:5100},{price:189.2,volume:4200}],an=[{price:189.45,volume:900},{price:189.5,volume:2600},{price:189.55,volume:1800},{price:189.6,volume:4400},{price:189.65,volume:3100}],sn=["09:30","10:00","10:30","11:00","11:30","12:00"];function dn(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function cn(e){return e.toFixed(2)}const fn={backgroundColor:"#1a1a2e",borderRadius:"4px",padding:"12px",border:"1px solid #2a2a4a",overflow:"auto",display:"flex",flexDirection:"column"},pn={fontSize:"12px",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.5px",color:"#8888aa",marginBottom:"8px",flexShrink:"0"},un={width:"100%",borderCollapse:"collapse",fontSize:"12px"},hn={textAlign:"left",padding:"4px 6px",borderBottom:"1px solid #2a2a4a",color:"#8888aa",fontWeight:"600",fontSize:"11px"},gn={padding:"3px 6px",borderBottom:"1px solid #16162a",color:"#ccccdd",fontSize:"12px"},xn={cursor:"default",transition:"background-color 0.1s"};const yn={sm:{padding:"3px 10px",fontSize:"12px",borderRadius:"4px"},md:{padding:"6px 14px",fontSize:"13px",borderRadius:"6px"},lg:{padding:"8px 20px",fontSize:"15px",borderRadius:"6px"}},mn={primary:{bg:"#3b82f6",color:"white",border:"#3b82f6"},secondary:{bg:"#f8fafc",color:"#0f172a",border:"#d1d5db"},outline:{bg:"transparent",color:"#0f172a",border:"#d1d5db"},ghost:{bg:"transparent",color:"#0f172a",border:"transparent"},danger:{bg:"#ef4444",color:"white",border:"#ef4444"}},bn=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],vn=Math.PI/180;function Sn(e,t){const n=e.replace("#","");let o,r,i;return 3===n.length?(o=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),i=parseInt(n[2]+n[2],16)):(o=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)),o=isNaN(o)?0:o,r=isNaN(r)?0:r,i=isNaN(i)?0:i,`rgba(${o},${r},${i},${t})`}function kn(e,t){const n=e.replace("#","");let o,r,i;3===n.length?(o=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),i=parseInt(n[2]+n[2],16)):(o=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)),o=isNaN(o)?0:o,r=isNaN(r)?0:r,i=isNaN(i)?0:i;const l=e=>(e=>Math.max(0,Math.min(255,Math.round(e*t))))(e).toString(16).padStart(2,"0");return"#"+l(o)+l(r)+l(i)}const wn=Math.PI/180;function $n(e){return{x:Math.sin(e.theta)*Math.cos(e.phi),y:Math.sin(e.theta)*Math.sin(e.phi),z:Math.cos(e.theta)}}function Mn(e,t,n){const o=Math.sqrt(e*e+t*t+n*n);if(o<1e-10)return{theta:0,phi:0};const r=e/o,i=t/o,l=n/o,a=Math.acos(Math.max(-1,Math.min(1,l))),s=Math.atan2(i,r);return{theta:a,phi:s<0?s+2*Math.PI:s}}function Cn(e,t,n){const{x:o,y:r,z:i}=$n(e),l=Math.cos(n),a=Math.sin(n);let s,d,c;return"x"===t?(s=o,d=r*l-i*a,c=r*a+i*l):"y"===t?(s=o*l+i*a,d=r,c=-o*a+i*l):(s=o*l-r*a,d=o*a+r*l,c=i),Mn(s,d,c)}function zn(e,t){const n=t.angle??Math.PI;switch(t.gate){case"X":return Cn(e,"x",Math.PI);case"Y":return Cn(e,"y",Math.PI);case"Z":return Cn(e,"z",Math.PI);case"H":{const{x:t,y:n,z:o}=$n(e);return Mn(o,-n,t)}case"S":return Cn(e,"z",Math.PI/2);case"T":return Cn(e,"z",Math.PI/4);case"Rx":return Cn(e,"x",n);case"Ry":return Cn(e,"y",n);case"Rz":return Cn(e,"z",n)}}function In(e,t){if(0===e.length)return 0;if(1===e.length)return e[0];const n=t/100*(e.length-1),o=Math.floor(n),r=Math.ceil(n);if(o===r)return e[o];const i=n-o;return e[o]+i*(e[r]-e[o])}function An(e){const t=function(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];"number"==typeof o&&isFinite(o)&&!isNaN(o)&&t.push(o)}return t.sort((e,t)=>e-t),t}(e);if(0===t.length)return null;const n=In(t,25),o=In(t,50),r=In(t,75),i=r-n,l=n-1.5*i,a=r+1.5*i;let s=t[0];for(const e of t)if(e>=l){s=e;break}let d=t[t.length-1];for(let e=t.length-1;e>=0;e--)if(t[e]<=a){d=t[e];break}let c=0;for(const e of t)c+=e;const f=c/t.length,p=[];for(const e of t)(e<l||e>a)&&p.push(e);return{q1:n,median:o,q3:r,iqr:i,whiskerLow:s,whiskerHigh:d,mean:f,outliers:p,min:t[0],max:t[t.length-1]}}function Fn(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}function Rn(e,t,n){return e<t?t:e>n?n:e}function Dn(e){return"number"==typeof e&&isFinite(e)&&!isNaN(e)}const Ln=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Nn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function Tn(e){const t=e.split("-");return 3!==t.length?new Date(NaN):new Date(parseInt(t[0],10),parseInt(t[1],10)-1,parseInt(t[2],10))}function Wn(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Bn(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function En(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=Bn(t[r]),a=Bn(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}const Pn=["#9be9a8","#40c463","#30a14e","#216e39"],Hn=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function jn(e,t,n,o){const r=o-Math.PI/2;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function Yn(e,t,n,o,r,i){const l=jn(e,t,n,r),a=jn(e,t,n,i),s=jn(e,t,o,r),d=jn(e,t,o,i),c=i-r>Math.PI?1:0;return[`M ${l.x} ${l.y}`,`A ${n} ${n} 0 ${c} 1 ${a.x} ${a.y}`,`L ${d.x} ${d.y}`,`A ${o} ${o} 0 ${c} 0 ${s.x} ${s.y}`,"Z"].join(" ")}function _n(e,t,n,o,r,i,l){const a=jn(e,t,n,o),s=jn(e,t,n,r),d=jn(e,t,n,i),c=jn(e,t,n,l),f=l-i,p=r-o>Math.PI?1:0,u=f>Math.PI?1:0;return[`M ${a.x} ${a.y}`,`A ${n} ${n} 0 ${p} 1 ${s.x} ${s.y}`,`Q ${e} ${t} ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 1 ${c.x} ${c.y}`,`Q ${e} ${t} ${a.x} ${a.y}`,"Z"].join(" ")}const qn=["#3b82f6","#22c55e","#f59e0b","#8b5cf6","#ef4444","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];const On=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Un(e){return On[e%On.length]}function Gn(e,t,n){const o=t/2,r=n/2,i=.3*Math.min(t,n),l=e.length,a=[];for(let t=0;t<l;t++){const n=e[t],s=2*Math.PI*t/Math.max(l,1);a.push({id:n.id,label:n.label??n.id,color:n.color??Un(t),x:n.x??o+i*Math.cos(s),y:n.y??r+i*Math.sin(s),vx:0,vy:0,fixed:n.fixed??!1,solid:n.solid??!0})}return a}function Vn(e,t){const n=2*t;for(let t=0;t<e.length;t++){const o=e[t];if(o.solid)for(let r=t+1;r<e.length;r++){const t=e[r];if(!t.solid)continue;const i=t.x-o.x,l=t.y-o.y,a=i*i+l*l;if(a>=n*n||a<1e-4)continue;const s=Math.sqrt(a),d=i/s,c=l/s,f=n-s;if(o.fixed&&t.fixed)continue;o.fixed?(t.x+=d*f,t.y+=c*f):t.fixed?(o.x-=d*f,o.y-=c*f):(o.x-=d*f*.5,o.y-=c*f*.5,t.x+=d*f*.5,t.y+=c*f*.5);const p=(o.vx-t.vx)*d+(o.vy-t.vy)*c;p<=0||(o.fixed?(t.vx+=p*d,t.vy+=p*c):t.fixed?(o.vx-=p*d,o.vy-=p*c):(o.vx-=p*d,o.vy-=p*c,t.vx+=p*d,t.vy+=p*c))}}}const Xn=["#3b82f6","#6366f1","#8b5cf6","#a855f7","#c084fc","#d8b4fe","#e9d5ff","#f3e8ff"],Kn=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Zn(e){if(e<=0)return 1;const t=e/6,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}function Jn(e,t){return t||Kn[e%Kn.length]}const Qn=Math.PI/180;function eo(e,t,n,o){const r=o*Qn;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function to(e,t,n,o,r){const i=eo(e,t,n,r),l=eo(e,t,n,o),a=r-o,s=Math.abs(a)>180?1:0,d=a>0?1:0;return`M ${i.x} ${i.y} A ${n} ${n} 0 ${s} ${1===d?0:1} ${l.x} ${l.y}`}function no(e){return!isFinite(e)||isNaN(e)?"--":Math.abs(e)>=1e3?Math.round(e).toString():e===Math.floor(e)?e.toString():e.toFixed(1)}const oo={AL:{name:"Alabama",path:"m 643,467.4 .4,-7.3 -.9,-1.2 -1.7,-.7 -2.5,-2.8 .5,-2.9 48.8,-5.1 -.7,-2.2 -1.5,-1.5 -.5,-1.4 .6,-6.3 -2.4,-5.7 .5,-2.6 .3,-3.7 2.2,-3.8 -.2,-1.1 -1.7,-1 v -3.2 l -1.8,-1.9 -2.9,-6.1 -12.9,-45.8 -45.7,4 1.3,2 -1.3,67 4.4,33.2 .9,-.5 1.3,.1 .6,.4 .8,-.1 2,-3.8 v -2.3 l 1.1,-1.1 1.4,.5 3.4,6.4 v .9 l -3.3,2.2 3.5,-.4 4.9,-1.6 z"},AK:{name:"Alaska",path:"m 15.8,572 h 2.4 l .7,.7 -1,1.2 -1.9,.2 -2.5,1.3 -3.7,-.1 2.2,-.9 .3,-1.1 2.5,-.3 z m 8.3,-1.7 1.3,.5 h .9 l .5,1.2 .3,-.6 .9,.2 1.1,1.5 0,.5 -4.2,1.9 -2.4,-.1 -1,-.5 -1.1,.7 -2,0 -1.1,-1.4 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,-1.7 .3,.5 1,-1 2.2,1.6 -.8,1.6 -1.2,1.4 .5,1.5 -1.4,1.6 .4,.9 2.3,-1.1 v -1.4 l 3.3,1.9 1.9,.7 1.9,.7 3,3.8 17,3.8 1.4,1 4,.8 .7,.5 2.8,-.2 4.9,.8 1.4,1.5 -1,1 .8,.8 3.8,.7 1.2,1.2 .1,4.4 -1.3,2.8 2,.1 1,-.8 .9,.8 -1.1,3.1 1,1.6 1.2,.3 z m -49.5,-37.3 -.5,.1 -1.5,1.6 .2,.5 1.5,-.6 v -.6 l .9,-.3 z m 1.6,-1.1 -1,.3 -.2,.7 .9,-.1 z m -1.3,-1.6 -.2,.9 h 1.7 l .6,-.4 .1,-1 z m 2.8,-3 -.3,1.9 1.2,-.5 .1,-1.4 z m 58.3,31.9 -2,.3 -.4,1.3 1.3,1.7 z"},WY:{name:"Wyoming",path:"m 355.3,143.7 -51,-5.3 -57.3,-7.9 -2,10.7 -8.5,54.8 -3.3,21.9 32.1,4.8 44.9,5.7 37.5,3.4 3.7,-44.2 z"},DC:{name:"District of Columbia",path:"m 803.5,252 -2.6,-1.8 -1,1.7 .5,.4 .4,.1 .6,.5 .3,.7 -.1,.5 .2,.5 z"}};function ro(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function io(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=ro(t[r]),a=ro(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}function lo(e){const{r:t,g:n,b:o}=ro(e);return(.299*t+.587*n+.114*o)/255}const ao=["#3b82f6","#fbbf24","#ef4444"];function so(e){return Number.isInteger(e)?String(e):e.toFixed(1)}function co(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function fo(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=co(t[r]),a=co(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}function po(e){const{r:t,g:n,b:o}=co(e);return(.299*t+.587*n+.114*o)/255}const uo=["#f0f9ff","#3b82f6","#1e3a8a"],ho=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function go(e){if(!e.children||0===e.children.length)return Math.max(0,e.value??0);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value??0)}return t}function xo(e,t){const n=[];for(const o of t)n.push(String(e[o]??""));return n.join(" | ")}function yo(e,t){const n=new Set;for(const o of e)n.add(xo(o,t));const o=Array.from(n);return o.sort(),o}function mo(e,t){if(0===e.length)return 0;switch(t){case"count":return e.length;case"sum":{let t=0;for(const n of e)t+=n;return t}case"avg":{let t=0;for(const n of e)t+=n;return t/e.length}case"min":{let t=e[0];for(let n=1;n<e.length;n++)e[n]<t&&(t=e[n]);return t}case"max":{let t=e[0];for(let n=1;n<e.length;n++)e[n]>t&&(t=e[n]);return t}}}function bo(e){return Number.isInteger(e)?String(e):e.toFixed(2)}function vo(e,t){return 2*Math.PI*e/t-Math.PI/2}function So(e,t,n,o){return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}const ko=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];const wo=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],$o=2*Math.PI;function Mo(e){if(!e.children||0===e.children.length)return Math.max(0,e.value??0);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value??0)}return t}function Co(e,t,n,o,r,i){const l=i-r,a=l>Math.PI?1:0,s=r-Math.PI/2,d=i-Math.PI/2,c=e+o*Math.cos(s),f=t+o*Math.sin(s),p=e+o*Math.cos(d),u=t+o*Math.sin(d),h=e+n*Math.cos(d),g=t+n*Math.sin(d),x=e+n*Math.cos(s),y=t+n*Math.sin(s);if(l>=$o-.001){const r=s+Math.PI;return[`M ${c} ${f}`,`A ${o} ${o} 0 1 1 ${e+o*Math.cos(r)} ${t+o*Math.sin(r)}`,`A ${o} ${o} 0 1 1 ${c} ${f}`,`L ${x} ${y}`,`A ${n} ${n} 0 1 0 ${e+n*Math.cos(r)} ${t+n*Math.sin(r)}`,`A ${n} ${n} 0 1 0 ${x} ${y}`,"Z"].join(" ")}return[`M ${c} ${f}`,`A ${o} ${o} 0 ${a} 1 ${p} ${u}`,`L ${h} ${g}`,`A ${n} ${n} 0 ${a} 0 ${x} ${y}`,"Z"].join(" ")}const zo=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Io(e){if(!e.children||0===e.children.length)return Math.max(0,e.value);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value)}return t}function Ao(e,t){if(0===e.length||t<=0)return 1/0;let n=0;for(const t of e)n+=t;if(n<=0)return 1/0;const o=n/t;let r=0;for(const t of e){if(t<=0)continue;const e=t/o,n=Math.max(e/o,o/e);n>r&&(r=n)}return r}function Fo(e){const t=e.replace("#","");let n,o,r;return 3===t.length?(n=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16)):(n=parseInt(t.substring(0,2),16),o=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16)),{r:isNaN(n)?0:n,g:isNaN(o)?0:o,b:isNaN(r)?0:r}}function Ro(e,t){if(0===t.length)return"#3b82f6";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=n*o,i=Math.floor(r),l=Math.min(i+1,o),a=r-i,s=Fo(t[i]),d=Fo(t[l]);return function(e,t,n){const o=e=>(e=>Math.max(0,Math.min(255,Math.round(e))))(e).toString(16).padStart(2,"0");return"#"+o(e)+o(t)+o(n)}(s.r+(d.r-s.r)*a,s.g+(d.g-s.g)*a,s.b+(d.b-s.b)*a)}function Do(e,t){if(e<=0)return 1;const n=e/t,o=Math.pow(10,Math.floor(Math.log10(n))),r=n/o;return r<=1.5?o:r<=3.5?2*o:r<=7.5?5*o:10*o}const Lo=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],No=[0,-45,45,90];function To(e,t,n,o,r){const i=.6*t,l=e.length*i,a=t,s=n*Math.PI/180,d=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s)),f=l*d+a*c,p=l*c+a*d;return{x:o-f/2,y:r-p/2,w:f,h:p}}function Wo(e,t){return!(e.x+e.w<t.x||t.x+t.w<e.x||e.y+e.h<t.y||t.y+t.h<e.y)}function Bo(e,t,n){return e.x>=0&&e.y>=0&&e.x+e.w<=t&&e.y+e.h<=n}function Eo(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}const Po={0:"#1e293b",1:"#3b82f6"};exports.Accordion=function(e){const{sections:t,defaultExpanded:n,allowMultiple:r=!1,headerStyle:i={},contentStyle:a={},wrapperStyle:c,expandIcon:f="+",collapseIcon:p="−",iconPosition:u="right",animated:h=!0,onChange:g}=e,[x,y]=l(()=>n??[]),m=s(e=>{y(t=>{let n;return n=t.includes(e)?t.filter(t=>t!==e):r?[...t,e]:[e],g&&g(n),n})},[r,g]),b=d(()=>t.map(e=>{const t=x.includes(e.id),n=o(Me,{key:`header-${e.id}`,section:e,expanded:t,onToggle:()=>m(e.id),headerStyle:i,expandIcon:f,collapseIcon:p,iconPosition:u}),r=o(Ce,{key:`content-${e.id}`,section:e,expanded:t,contentStyle:a,animated:h});return o("div",{key:e.id,"data-accordion-section":e.id,style:{width:"100%"}},n,r)}),[t,x,i,a,f,p,u,h,m]);return o(ke,{role:"region",ariaLabel:"Accordion",styling:c,keyboardNav:!0},...b)},exports.Alert=function(e){const[t,n]=l(!0),r=e.type??"info",i=e.variant??"subtle",a=Z[r]??Z.info,s=e.icon??a.icon,c=e.message??e.children,f=d(()=>{const e={display:"flex",alignItems:"flex-start",gap:"12px",padding:"12px 16px",borderRadius:"8px",fontSize:"14px",lineHeight:"1.5"};return"filled"===i?(e.backgroundColor=a.filledBg,e.color=a.filledText):"outline"===i?(e.backgroundColor="transparent",e.border=`1px solid ${a.border}`,e.color=a.text):(e.backgroundColor=a.bg,e.color=a.text),e},[i,a]);return t?o("div",{role:"alert",style:f},o("span",{style:{flexShrink:"0",fontSize:"16px",lineHeight:"1.5"}},s),o("div",{style:{flex:"1",minWidth:"0"}},e.title?o("div",{style:{fontWeight:"600",marginBottom:c?"4px":"0"}},e.title):null,c?o("div",null,c):null,e.action?o("button",{onclick:e.action.onClick,style:{marginTop:"8px",padding:"4px 12px",fontSize:"13px",fontWeight:"500",border:"filled"===i?"1px solid currentColor":`1px solid ${a.border}`,borderRadius:"4px",backgroundColor:"transparent",color:"inherit",cursor:"pointer"}},e.action.label):null),e.closable?o("button",{"aria-label":"Close",onclick:()=>{n(!1),e.onClose&&e.onClose()},style:{flexShrink:"0",background:"none",border:"none",cursor:"pointer",fontSize:"18px",lineHeight:"1",color:"inherit",opacity:"0.7",padding:"0"}},"×"):null):null},exports.AnalogClock=function(e){const{format:t="12h",size:n=200,showDate:r=!1,dateFormat:i="short",showSeconds:s=!0,timezone:d,className:c}=e,[f,p]=l(h(d));a(()=>{const e=setInterval(()=>{p(h(d))},1e3);return()=>clearInterval(e)},[d]);const u=f.getHours(),m=f.getMinutes(),b=f.getSeconds(),v=u%12*30+.5*m,S=6*m+.1*b,k=6*b,w=n/2,$=n/2,M=n/2-10,C=M-4,z=M-22,I=[];I.push(o("circle",{cx:String(w),cy:String($),r:String(M),fill:"#f8fafc",stroke:g,"stroke-width":"3"}));for(let e=0;e<12;e++){const r=(30*e-90)*Math.PI/180,i=C-6;I.push(o("line",{x1:String(w+i*Math.cos(r)),y1:String($+i*Math.sin(r)),x2:String(w+C*Math.cos(r)),y2:String($+C*Math.sin(r)),stroke:g,"stroke-width":"2"}));const l=String(0===e?12:e);if(I.push(o("text",{x:String(w+z*Math.cos(r)),y:String($+z*Math.sin(r)),"text-anchor":"middle","dominant-baseline":"central",fill:y,"font-size":String(.08*n),"font-family":"sans-serif","font-weight":"600"},l)),"24h"===t){const t=M-38,i=String(0===e?0:e+12);I.push(o("text",{x:String(w+t*Math.cos(r)),y:String($+t*Math.sin(r)),"text-anchor":"middle","dominant-baseline":"central",fill:y,"font-size":String(.055*n),"font-family":"sans-serif",opacity:"0.6"},i))}}const A=(e,t,n,r)=>{const i=(e-90)*Math.PI/180;return o("line",{x1:String(w),y1:String($),x2:String(w+t*Math.cos(i)),y2:String($+t*Math.sin(i)),stroke:r,"stroke-width":n,"stroke-linecap":"round"})};I.push(A(v,.5*M,"4",x)),I.push(A(S,.75*M,"3",x)),s&&I.push(A(k,.85*M,"1.5","#ef4444")),I.push(o("circle",{cx:String(w),cy:String($),r:"4",fill:x}));const F=[o("svg",{width:String(n),height:String(n),viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg"},...I)];return r&&F.push(o("div",{style:{textAlign:"center",marginTop:"8px",fontFamily:"sans-serif",fontSize:"14px",color:y}},function(e,t){const n=e.getFullYear(),o=e.getMonth(),r=e.getDate();switch(t){case"short":return`${String(o+1).padStart(2,"0")}/${String(r).padStart(2,"0")}/${n}`;case"long":return`${["January","February","March","April","May","June","July","August","September","October","November","December"][o]} ${String(r).padStart(2,"0")}, ${n}`;case"iso":return`${n}-${String(o+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}}(f,i))),o("div",{className:c,style:{display:"inline-flex",flexDirection:"column",alignItems:"center"}},...F)},exports.Avatar=function(e){const{src:t,alt:n,name:r,size:i,shape:a="circle",fallbackColor:s,status:d,statusPosition:c="bottom-right"}=e,[f,p]=l(!1),u=function(e){return null==e?m.md:"number"==typeof e?e:m[e]??m.md}(i),h="circle"===a?"50%":`${Math.round(.15*u)}px`,g=s??function(e){if(!e)return"#9ca3af";let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return b[Math.abs(t)%b.length]}(r),x=`${Math.round(.4*u)}px`,y={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${u}px`,height:`${u}px`,borderRadius:h,overflow:"hidden",flexShrink:"0"};let k;if(t&&!f)k=o("img",{src:t,alt:n??r??"avatar",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"},onError:()=>p(!0)});else{const e=function(e){if(!e)return"?";const t=e.trim().split(/\s+/);return 1===t.length?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}(r);k=o("span",{style:{fontSize:x,fontWeight:"600",color:"#fff",lineHeight:"1",userSelect:"none",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},"aria-hidden":"true"},e)}const w=o("div",{style:{...y,backgroundColor:t&&!f?"transparent":g},role:"img","aria-label":n??r??"avatar"},k);if(!d)return w;const $=Math.max(8,Math.round(.25*u));return o("div",{style:{position:"relative",display:"inline-flex",width:`${u}px`,height:`${u}px`,flexShrink:"0"}},w,o("span",{style:{position:"absolute",width:`${$}px`,height:`${$}px`,borderRadius:"50%",backgroundColor:v[d]??v.offline,border:"2px solid #fff",boxSizing:"border-box",...S(c,$)},"aria-label":d}))},exports.Badge=function(e){const{count:t,max:n,dot:r=!1,color:i="#ef4444",size:l="md",variant:a="solid",children:s}=e;let d=null;r||null==t||(d=null!=n&&t>n?`${n}+`:String(t));const c=r||null!=t&&t>0,f=r?{...w[l],borderRadius:"50%",..."solid"===a?{backgroundColor:i}:{backgroundColor:"transparent",border:`2px solid ${i}`}}:{...k[l],borderRadius:"9999px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontWeight:"600",lineHeight:"1",boxSizing:"border-box",..."solid"===a?{backgroundColor:i,color:"#fff"}:{backgroundColor:"transparent",color:i,border:`2px solid ${i}`}},p=c?o("span",{style:f,"aria-label":r?"notification":`count ${d}`},d):null;if(null==s)return p??o("span",null);const u={...f,position:"absolute",top:"0",right:"0",transform:"translate(50%, -50%)",zIndex:"1"};return o("span",{style:{position:"relative",display:"inline-flex"}},s,c?o("span",{style:u,"aria-label":r?"notification":`count ${d}`},d):null)},exports.BarGraph=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",barColor:l="#3b82f6",barGap:a=8,barRadius:c=4,showValues:f=!0,showGrid:p=!0,gridColor:u="#e5e7eb",title:h,padding:g=50,animate:x=!1,stacked:y,grouped:m=!1}=e,b="vertical"===i,v=n-2*g,S=r-2*g,k=b?S:v,w=b?v:S,$=void 0!==y&&y.length>0,M=d(()=>$?function(e){const t=new Set;for(const n of e)for(const e of n.values)t.add(e.category);return Array.from(t)}(y):[],[$,y]),C=$?y.length:t.length,z=d(()=>function(e,t,n){if(t&&t.length>0){if(n){let e=0;for(const n of t)for(const t of n.values)t.value>e&&(e=t.value);return e}let e=0;for(const n of t){let t=0;for(const e of n.values)t+=e.value;t>e&&(e=t)}return e}let o=0;for(const t of e)t.value>o&&(o=t.value);return o}(t,y,m),[t,y,m]),I=z>0?z:1,A=nt(C,I,k,w,a),F=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(I),t=[];for(let n=e;n<=I;n+=e){const e=A.valueScale(n);if(b){const r=g+S-e;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(r),x2:String(g+v),y2:String(r),stroke:u,"stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-6),y:String(r+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}else{const r=g+e;t.push(o("line",{key:`grid-${n}`,x1:String(r),y1:String(g),x2:String(r),y2:String(g+S),stroke:u,"stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(r),y:String(g+S+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}}return t},[p,I,A,b,g,v,S,u]),R=s(()=>{const e=[];return b?(e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+S),x2:String(g+v),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"}))):(e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+S),x2:String(g+v),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"}))),e},[b,g,v,S]),D=s(()=>{const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=A.valueScale(r.value),a=A.categoryScale(n),s=r.color??l;let d,p,u=String(r.value);if(b){const e=g+a,t=g+S-i;d={x:String(e),y:String(t),width:String(A.barThickness),height:String(i),rx:String(c),ry:String(c),fill:s},p={x:String(e+A.barThickness/2),y:String(t-6),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"}}else{const e=g+a,t=g;d={x:String(t),y:String(e),width:String(i),height:String(A.barThickness),rx:String(c),ry:String(c),fill:s},p={x:String(t+i+6),y:String(e+A.barThickness/2+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"}}if(x&&(d.style=`animation: barGrow 0.6s ease-out ${.05*n}s both`),e.push(o("rect",{key:`bar-${n}`,...d})),f&&e.push(o("text",{key:`val-${n}`,...p},u)),b){const t=g+a+A.barThickness/2,i=g+S+16;e.push(o("text",{key:`cat-${n}`,x:String(t),y:String(i),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${t}, ${i})`},r.label))}else e.push(o("text",{key:`cat-${n}`,x:String(g-6),y:String(g+a+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}return e},[t,A,l,c,f,x,b,g,S]),L=s(()=>{if(!y)return[];const e=[];for(let t=0;t<y.length;t++){const n=y[t],r=A.categoryScale(t);let i=0;for(let l=0;l<n.values.length;l++){const a=n.values[l],s=A.valueScale(a.value),d=A.valueScale(i),p=rt(l,a.color);if(b){const i=g+r,u=g+S-d-s;e.push(o("rect",{key:`sbar-${t}-${l}`,x:String(i),y:String(u),width:String(A.barThickness),height:String(s),rx:l===n.values.length-1?String(c):"0",ry:l===n.values.length-1?String(c):"0",fill:p,...x?{style:`animation: barGrow 0.6s ease-out ${.03*(t*n.values.length+l)}s both`}:{}})),f&&s>14&&e.push(o("text",{key:`sval-${t}-${l}`,x:String(i+A.barThickness/2),y:String(u+s/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#fff"},String(a.value)))}else{const i=g+d,u=g+r;e.push(o("rect",{key:`sbar-${t}-${l}`,x:String(i),y:String(u),width:String(s),height:String(A.barThickness),rx:l===n.values.length-1?String(c):"0",ry:l===n.values.length-1?String(c):"0",fill:p,...x?{style:`animation: barGrow 0.6s ease-out ${.03*(t*n.values.length+l)}s both`}:{}})),f&&s>20&&e.push(o("text",{key:`sval-${t}-${l}`,x:String(i+s/2),y:String(u+A.barThickness/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#fff"},String(a.value)))}i+=a.value}if(f){const n=A.valueScale(i);b?e.push(o("text",{key:`stotal-${t}`,x:String(g+r+A.barThickness/2),y:String(g+S-n-6),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(i))):e.push(o("text",{key:`stotal-${t}`,x:String(g+n+6),y:String(g+r+A.barThickness/2+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(i)))}if(b){const i=g+r+A.barThickness/2,l=g+S+16;e.push(o("text",{key:`scat-${t}`,x:String(i),y:String(l),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${i}, ${l})`},n.label))}else e.push(o("text",{key:`scat-${t}`,x:String(g-6),y:String(g+r+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},n.label))}return e},[y,A,c,f,x,b,g,S]),N=s(()=>{if(!y)return[];const e=M.length,t=[];for(let n=0;n<y.length;n++){const r=y[n],i=A.categoryScale(n),l=2,a=Math.max(1,(A.barThickness-l*(e-1))/e);for(let s=0;s<r.values.length;s++){const d=r.values[s],p=M.indexOf(d.category),u=p*(a+l),h=A.valueScale(d.value),y=rt(p>=0?p:s,d.color);if(b){const r=g+i+u,l=g+S-h;t.push(o("rect",{key:`gbar-${n}-${s}`,x:String(r),y:String(l),width:String(a),height:String(h),rx:String(c),ry:String(c),fill:y,...x?{style:`animation: barGrow 0.6s ease-out ${.04*(n*e+s)}s both`}:{}})),f&&t.push(o("text",{key:`gval-${n}-${s}`,x:String(r+a/2),y:String(l-4),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#374151"},String(d.value)))}else{const r=g,l=g+i+u;t.push(o("rect",{key:`gbar-${n}-${s}`,x:String(r),y:String(l),width:String(h),height:String(a),rx:String(c),ry:String(c),fill:y,...x?{style:`animation: barGrow 0.6s ease-out ${.04*(n*e+s)}s both`}:{}})),f&&t.push(o("text",{key:`gval-${n}-${s}`,x:String(r+h+4),y:String(l+a/2+3),"text-anchor":"start","font-size":"9","font-family":"sans-serif",fill:"#374151"},String(d.value)))}}if(b){const e=g+i+A.barThickness/2,l=g+S+16;t.push(o("text",{key:`gcat-${n}`,x:String(e),y:String(l),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${e}, ${l})`},r.label))}else t.push(o("text",{key:`gcat-${n}`,x:String(g-6),y:String(g+i+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}return t},[y,M,A,c,f,x,b,g,S]),T=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),W=s(()=>x?[o("defs",{key:"anim-defs"},o("style",{key:"anim-style"},b?"@keyframes barGrow { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }":"@keyframes barGrow { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }"))]:[],[x,b]),B=F(),E=R(),P=T(),H=W();let j;return j=$&&m?N():$?L():D(),o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{fontFamily:"sans-serif"}},...H,...P,...B,...E,...j)},exports.BigNumber=function(e){const{value:t,label:n,prefix:r="",suffix:i="",trend:l,trendLabel:a,sparkline:c,width:f=280,height:p=160,valueColor:u="currentColor",trendUpColor:h="#22c55e",trendDownColor:g="#ef4444",backgroundColor:x="#ffffff"}=e,y=d(()=>function(e){if("string"==typeof e)return e;if(!isFinite(e)||isNaN(e))return"--";const t=e.toString().split("."),n=t[0],o=t.length>1?"."+t[1]:"",r=n.startsWith("-"),i=r?n.slice(1):n;let l="";for(let e=0;e<i.length;e++)e>0&&(i.length-e)%3==0&&(l+=","),l+=i[e];return(r?"-":"")+l+o}(t),[t]),m=null!=l&&isFinite(l)&&!isNaN(l),b=null!=c&&c.length>1,v=null!=n&&n.length>0,S=m&&l>=0?h:g,k=v?.38*p:.45*p,w=Math.min(.15*f,48),$=.55*w,M=k+.4*w+8,C=v?M+22:k+.4*w+22,z=b?Math.min(.22*p,36):0,I=p-20-z,A=f-40,F=s(()=>[o("rect",{key:"bg",x:"0",y:"0",width:"100%",rx:"8",ry:"8",fill:x,stroke:"#e5e7eb","stroke-width":"1"})],[f,p,x]),R=s(()=>{const e=[],t=r+y+i;return e.push(o("text",{key:"value",x:String(f/2),y:String(k),"text-anchor":"middle","dominant-baseline":"central","font-size":String(w),"font-weight":"bold","font-family":"sans-serif",fill:u,"aria-label":`Value: ${t}`},r?o("tspan",{key:"prefix","font-size":String($),"font-weight":"normal"},r):null,y,i?o("tspan",{key:"suffix","font-size":String($),"font-weight":"normal"},i):null)),e},[f,k,w,$,y,r,i,u]),D=s(()=>v?[o("text",{key:"label",x:String(f/2),y:String(M),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},n)]:[],[v,f,M,n]),L=s(()=>{if(!m)return[];const e=[],t=l>=0,n=function(e){if(!isFinite(e)||isNaN(e))return"--";const t=Math.abs(e);return t<100&&t!==Math.floor(t)?t.toFixed(1):String(Math.round(t))}(l),r=(t?"+":"-")+n+(a?" "+a:""),i=f/2-40,s=C;if(t){const t=`${i},${s} ${i-4},${s+8} ${i+4},${s+8}`;e.push(o("polygon",{key:"trend-arrow",points:t,fill:S}))}else{const t=`${i},${s+8} ${i-4},${s} ${i+4},${s}`;e.push(o("polygon",{key:"trend-arrow",points:t,fill:S}))}return e.push(o("text",{key:"trend-text",x:String(i+8+4),y:String(s+5.6),"text-anchor":"start","font-size":"12","font-family":"sans-serif",fill:S,"aria-label":`Trend: ${r}`},r)),e},[m,l,a,S,f,C]),N=s(()=>{if(!b)return[];const e=[],t=c,n=[];for(const e of t)"number"==typeof e&&isFinite(e)&&!isNaN(e)&&n.push(e);if(n.length<2)return[];let r=1/0,i=-1/0;for(const e of n)e<r&&(r=e),e>i&&(i=e);r===i&&(r-=1,i+=1);const l=i-r,a=A/(n.length-1);let s="";for(let e=0;e<n.length;e++){const t=20+e*a,o=I+z-(n[e]-r)/l*z;s+=0===e?`M ${t} ${o}`:` L ${t} ${o}`}const d=s+` L ${20+(n.length-1)*a} ${I+z} L 20 ${I+z} Z`;return e.push(o("defs",{key:"spark-defs"},o("linearGradient",{key:"spark-grad",id:"sparkGrad",x1:"0",y1:"0",x2:"0",y2:"1"},o("stop",{key:"stop1",offset:"0%","stop-color":"#3b82f6","stop-opacity":"0.3"}),o("stop",{key:"stop2",offset:"100%","stop-color":"#3b82f6","stop-opacity":"0.05"})))),e.push(o("path",{key:"spark-fill",d:d,fill:"url(#sparkGrad)"})),e.push(o("path",{key:"spark-line",d:s,fill:"none",stroke:"#3b82f6","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),e},[b,c,A,I,z,20]),T=F(),W=R(),B=D(),E=L(),P=N();return o("svg",{width:"100%",viewBox:`0 0 ${f} ${p}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":`${r}${y}${i}${v?`, ${n}`:""}`,style:{fontFamily:"sans-serif"}},...T,...P,...W,...B,...E)},exports.BlochSphere=function(e){const{state:t,gates:n,width:r=400,height:i=400,rotateY:d=-25,rotateX:f=15,zoom:p=1,interactive:u=!0,zoomable:h=!0,showVector:g=!0,showLabels:x=!0,showWireframe:y=!0,showTrail:m=!0,trailMaxPoints:b=200,trailColor:v="#ef4444",wireframeColor:S="#cbd5e1",vectorColor:k="#3b82f6",backgroundColor:w,sphereRadius:$=130,title:M,onStateChange:C}=e,[z,I]=l(t??{theta:0,phi:0}),[A,F]=l(d),[R,D]=l(f),[L,N]=l(p),T=c([]),W=c(!1),B=c(null),E=c(null);a(()=>{t&&I(t)},[t?.theta,t?.phi]);const P=c(0);a(()=>{if(!n||0===n.length)return;P.current=0;let e=0;const t=()=>{P.current>=n.length||(I(e=>{const t=zn(e,n[P.current]);return P.current++,C&&C(t),t}),e=requestAnimationFrame(t))};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[n]),a(()=>{const e=$n(z);T.current.push(e),T.current.length>b&&T.current.splice(0,T.current.length-b)},[z.theta,z.phi]);const H=$*L,j=r/2,Y=i/2,_=s((e,t,n)=>function(e,t,n,o,r,i,l,a){const s=Math.cos(o*wn),d=Math.sin(o*wn),c=Math.cos(r*wn),f=Math.sin(r*wn),p=-e*f+n*c;return{sx:i+(e*c+n*f)*a,sy:l-(t*s-p*d)*a,depth:t*d+p*s}}(e,t,n,R,A,j,Y,H),[R,A,j,Y,H]),q=s(e=>{if(!u)return;const t=e;W.current=!0,B.current={mx:t.clientX,my:t.clientY,rx:R,ry:A}},[u,R,A]),O=s(e=>{if(!W.current||!B.current)return;const t=e,n=B.current;F(n.ry+.5*(t.clientX-n.mx)),D(n.rx-.5*(t.clientY-n.my))},[]),U=s(()=>{W.current=!1},[]),G=s(e=>{if(!h)return;const t=e;t.preventDefault(),N(e=>Math.max(.5,Math.min(3,e*(t.deltaY>0?.95:1.05))))},[h]),V=[];if(w&&V.push(o("rect",{key:"bg",x:"0",y:"0",width:String(r),height:String(i),fill:w,rx:"6"})),M&&V.push(o("text",{key:"title",x:String(j),y:"24","text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},M)),y){const e=60,t=[];for(let n=0;n<=e;n++){const o=n/e*2*Math.PI,r=_(Math.cos(o),Math.sin(o),0);t.push(`${0===n?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"eq",d:t.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.5"}));const n=[];for(let t=0;t<=e;t++){const o=t/e*2*Math.PI,r=_(Math.cos(o),0,Math.sin(o));n.push(`${0===t?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"xz",d:n.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.4"}));const r=[];for(let t=0;t<=e;t++){const n=t/e*2*Math.PI,o=_(0,Math.cos(n),Math.sin(n));r.push(`${0===t?"M":"L"}${o.sx.toFixed(1)},${o.sy.toFixed(1)}`)}V.push(o("path",{key:"yz",d:r.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.4"}))}const X=[{id:"x",dir:[1,0,0],color:"#ef4444"},{id:"y",dir:[0,1,0],color:"#22c55e"},{id:"z",dir:[0,0,1],color:"#3b82f6"}];for(const e of X){const t=_(1.15*e.dir[0],1.15*e.dir[1],1.15*e.dir[2]),n=_(1.15*-e.dir[0],1.15*-e.dir[1],1.15*-e.dir[2]);_(0,0,0),V.push(o("line",{key:`axis-${e.id}`,x1:String(n.sx),y1:String(n.sy),x2:String(t.sx),y2:String(t.sy),stroke:e.color,"stroke-width":"0.8",opacity:"0.4","stroke-dasharray":"3 3"}))}if(x){const e=[{text:"|0⟩",pos:[0,0,1.3]},{text:"|1⟩",pos:[0,0,-1.3]},{text:"|+⟩",pos:[1.3,0,0]},{text:"|-⟩",pos:[-1.3,0,0]},{text:"|+i⟩",pos:[0,1.3,0]},{text:"|-i⟩",pos:[0,-1.3,0]}];for(const t of e){const e=_(t.pos[0],t.pos[1],t.pos[2]);V.push(o("text",{key:`lbl-${t.text}`,x:String(e.sx),y:String(e.sy),"text-anchor":"middle","dominant-baseline":"central","font-size":"11","font-family":"serif",fill:"#475569",style:{pointerEvents:"none"}},t.text))}}if(m&&T.current.length>1){const e=T.current,t=[];for(let n=0;n<e.length;n++){const o=e[n],r=_(o.x,o.y,o.z);t.push(`${0===n?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"trail",d:t.join(" "),fill:"none",stroke:v,"stroke-width":"1.5",opacity:"0.5","stroke-linecap":"round","stroke-linejoin":"round"}))}if(g){const e=$n(z),t=_(0,0,0),n=_(e.x,e.y,e.z);V.push(o("line",{key:"vec-line",x1:String(t.sx),y1:String(t.sy),x2:String(n.sx),y2:String(n.sy),stroke:k,"stroke-width":"2.5","stroke-linecap":"round"})),V.push(o("circle",{key:"vec-point",cx:String(n.sx),cy:String(n.sy),r:"5",fill:k,stroke:"#fff","stroke-width":"1.5"}));const l=(180*z.theta/Math.PI).toFixed(0),a=(180*z.phi/Math.PI).toFixed(0);V.push(o("text",{key:"state-label",x:String(r-10),y:String(i-10),"text-anchor":"end","font-size":"10","font-family":"monospace",fill:"#64748b"},`θ=${l}° φ=${a}°`))}return o("svg",{ref:E,width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":M??"Bloch sphere quantum state visualization",style:{fontFamily:"sans-serif",cursor:u?W.current?"grabbing":"grab":"default"},onMouseDown:u?q:void 0,onMouseMove:u?O:void 0,onMouseUp:u?U:void 0,onMouseLeave:u?U:void 0,onWheel:h?G:void 0},...V)},exports.BoxPlot=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",showOutliers:l=!0,showMean:a=!1,whiskerColor:c="#374151",boxWidth:f=.6,showGrid:p=!0,title:u,padding:h=60}=e,g="vertical"===i,x=n-2*h,y=r-2*h,m=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],b=d(()=>{const e=[];for(const n of t)e.push(An(n.values));return e},[t]),v=d(()=>{let e=1/0,t=-1/0;for(const n of b){if(null===n)continue;const o=l&&n.outliers.length>0?Math.min(n.whiskerLow,n.outliers[0]):n.whiskerLow,r=l&&n.outliers.length>0?Math.max(n.whiskerHigh,n.outliers[n.outliers.length-1]):n.whiskerHigh;o<e&&(e=o),r>t&&(t=r)}isFinite(e)||(e=0,t=1);const n=t-e,o=n>0?.05*n:.5;return{min:e-o,max:t+o}},[b,l]),S=g?y:x,k=(g?x:y)/(t.length>0?t.length:1),w=k*Math.min(Math.max(f,.1),.95),$=s(e=>{const t=v.max-v.min;return 0===t?S/2:(e-v.min)/t*S},[v,S]),M=s(()=>{if(!p)return[];const e=[],t=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(v.max-v.min);for(let n=Math.ceil(v.min/t)*t;n<=v.max;n+=t){const t=$(n),r=String(Math.round(1e3*n)/1e3);if(g){const i=h+y-t;e.push(o("line",{key:`grid-${n}`,x1:String(h),y1:String(i),x2:String(h+x),y2:String(i),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`glabel-${n}`,x:String(h-6),y:String(i+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},r))}else{const i=h+t;e.push(o("line",{key:`grid-${n}`,x1:String(i),y1:String(h),x2:String(i),y2:String(h+y),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`glabel-${n}`,x:String(i),y:String(h+y+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},r))}}return e},[p,v,$,g,h,x,y]),C=s(()=>{const e=[];return e.push(o("line",{key:"axis-value",x1:String(h),y1:String(g?h:h+y),x2:String(h),y2:String(h+y),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-category",x1:String(h),y1:String(h+y),x2:String(h+x),y2:String(h+y),stroke:"#374151","stroke-width":"1.5"})),e},[h,x,y,g]),z=s(()=>{const e=[];for(let n=0;n<t.length;n++){const r=b[n];if(null===r)continue;const i=t[n],s=i.color??m[n%m.length],d=k*n+k/2,f=w/2;if(g){const t=h+y-$(r.q1),p=h+y-$(r.q3),u=h+y-$(r.median),g=h+y-$(r.whiskerLow),x=h+y-$(r.whiskerHigh),m=h+d;e.push(o("line",{key:`wl-${n}`,x1:String(m),y1:String(t),x2:String(m),y2:String(g),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wlc-${n}`,x1:String(m-.4*f),y1:String(g),x2:String(m+.4*f),y2:String(g),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wh-${n}`,x1:String(m),y1:String(p),x2:String(m),y2:String(x),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`whc-${n}`,x1:String(m-.4*f),y1:String(x),x2:String(m+.4*f),y2:String(x),stroke:c,"stroke-width":"1.5"}));const b=Math.min(t,p),v=Math.abs(t-p);if(e.push(o("rect",{key:`box-${n}`,x:String(m-f),y:String(b),width:String(w),height:String(Math.max(v,1)),fill:s,stroke:c,"stroke-width":"1.5",opacity:"0.8","aria-label":`${i.label}: Q1=${r.q1.toFixed(1)}, median=${r.median.toFixed(1)}, Q3=${r.q3.toFixed(1)}`,role:"img"})),e.push(o("line",{key:`med-${n}`,x1:String(m-f),y1:String(u),x2:String(m+f),y2:String(u),stroke:"#fff","stroke-width":"2.5"})),a){const t=h+y-$(r.mean);e.push(o("circle",{key:`mean-${n}`,cx:String(m),cy:String(t),r:"3.5",fill:"#fff",stroke:c,"stroke-width":"1.5","aria-label":`Mean: ${r.mean.toFixed(1)}`}))}if(l)for(let t=0;t<r.outliers.length;t++){const i=h+y-$(r.outliers[t]);e.push(o("circle",{key:`out-${n}-${t}`,cx:String(m),cy:String(i),r:"3",fill:"none",stroke:c,"stroke-width":"1.5","aria-label":`Outlier: ${r.outliers[t]}`}))}e.push(o("text",{key:`cat-${n}`,x:String(m),y:String(h+y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},i.label))}else{const t=h+$(r.q1),p=h+$(r.q3),u=h+$(r.median),g=h+$(r.whiskerLow),x=h+$(r.whiskerHigh),y=h+d;e.push(o("line",{key:`wl-${n}`,x1:String(t),y1:String(y),x2:String(g),y2:String(y),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wlc-${n}`,x1:String(g),y1:String(y-.4*f),x2:String(g),y2:String(y+.4*f),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wh-${n}`,x1:String(p),y1:String(y),x2:String(x),y2:String(y),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`whc-${n}`,x1:String(x),y1:String(y-.4*f),x2:String(x),y2:String(y+.4*f),stroke:c,"stroke-width":"1.5"}));const m=Math.min(t,p),b=Math.abs(p-t);if(e.push(o("rect",{key:`box-${n}`,x:String(m),y:String(y-f),width:String(Math.max(b,1)),height:String(w),fill:s,stroke:c,"stroke-width":"1.5",opacity:"0.8","aria-label":`${i.label}: Q1=${r.q1.toFixed(1)}, median=${r.median.toFixed(1)}, Q3=${r.q3.toFixed(1)}`,role:"img"})),e.push(o("line",{key:`med-${n}`,x1:String(u),y1:String(y-f),x2:String(u),y2:String(y+f),stroke:"#fff","stroke-width":"2.5"})),a){const t=h+$(r.mean);e.push(o("circle",{key:`mean-${n}`,cx:String(t),cy:String(y),r:"3.5",fill:"#fff",stroke:c,"stroke-width":"1.5","aria-label":`Mean: ${r.mean.toFixed(1)}`}))}if(l)for(let t=0;t<r.outliers.length;t++){const i=h+$(r.outliers[t]);e.push(o("circle",{key:`out-${n}-${t}`,cx:String(i),cy:String(y),r:"3",fill:"none",stroke:c,"stroke-width":"1.5","aria-label":`Outlier: ${r.outliers[t]}`}))}e.push(o("text",{key:`cat-${n}`,x:String(h-6),y:String(y+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},i.label))}}return e},[t,b,$,g,h,x,y,k,w,c,l,a,m]),I=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(h/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},u)]:[],[u,n,h]),A=M(),F=C(),R=z(),D=I();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Box plot",style:{fontFamily:"sans-serif"}},...D,...A,...F,...R)},exports.Breadcrumb=function(e){const{items:t,separator:n="/",maxItems:r,size:i="md"}=e,[a,d]=l(!1),c=ze[i],f=s(()=>{d(!0)},[]);let p=t,u=!1;if(r&&r>1&&t.length>r&&!a){u=!0;const e=1,n=r-1;p=[...t.slice(0,e),{label:"..."},...t.slice(t.length-n)]}const h=p.map((e,t)=>((e,t,r)=>{const i=t===r.length-1,l=u&&"..."===e.label&&1===t,a=[];var s;return t>0&&a.push(o("span","string"==typeof(s=n)?{"aria-hidden":"true",style:{margin:"0 8px",color:"#9ca3af",userSelect:"none"}}:{"aria-hidden":"true",style:{margin:"0 8px"}},s)),l?a.push(o("button",{type:"button",onClick:f,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontSize:c.fontSize,color:"#6b7280",fontFamily:"inherit"},"aria-label":"Show all breadcrumb items"},"...")):i?a.push(o("span",{"aria-current":"page",style:{color:"#1f2937",fontWeight:"600",fontSize:c.fontSize}},e.label)):e.href?a.push(o("a",{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick()}:void 0,style:{color:"#2563eb",textDecoration:"none",fontSize:c.fontSize}},e.label)):e.onClick?a.push(o("button",{type:"button",onClick:e.onClick,style:{background:"none",border:"none",cursor:"pointer",color:"#2563eb",padding:"0",fontSize:c.fontSize,fontFamily:"inherit"}},e.label)):a.push(o("span",{style:{color:"#6b7280",fontSize:c.fontSize}},e.label)),o("li",{key:String(t),style:{display:"inline-flex",alignItems:"center"}},...a)})(e,t,p));return o(ke,{orientation:"horizontal",role:"navigation",ariaLabel:"Breadcrumb",keyboardNav:!1,styling:{border:"none",borderRadius:"0",padding:c.padding,backgroundColor:"transparent"}},o("ol",{style:{display:"flex",alignItems:"center",listStyle:"none",margin:"0",padding:"0",flexWrap:"wrap"}},...h))},exports.BubbleChart=function(e){const{data:t=[],width:n=600,height:r=400,xLabel:i,yLabel:l,showGrid:a=!0,showAxes:c=!0,showLabels:f=!1,maxBubbleRadius:p=40,minBubbleRadius:u=4,defaultColor:h="#3b82f6",opacity:g=.7,title:x,padding:y=60}=e,m=d(()=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n];Dn(o.x)&&Dn(o.y)&&Dn(o.r)&&e.push(o)}return e},[t]),b=n-2*y,v=r-2*y,S=d(()=>{if(0===m.length)return{xMin:0,xMax:1,yMin:0,yMax:1,rMin:0,rMax:1};let e=1/0,t=-1/0,n=1/0,o=-1/0,r=1/0,i=-1/0;for(const l of m)l.x<e&&(e=l.x),l.x>t&&(t=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y),l.r<r&&(r=l.r),l.r>i&&(i=l.r);return e===t&&(e-=1,t+=1),n===o&&(n-=1,o+=1),r===i&&(r=0,i=i>0?i:1),{xMin:e,xMax:t,yMin:n,yMax:o,rMin:r,rMax:i}},[m]),k=s(e=>{const t=S.xMax-S.xMin;return y+(e-S.xMin)/t*b},[S,y,b]),w=s(e=>{const t=S.yMax-S.yMin;return y+v-(e-S.yMin)/t*v},[S,y,v]),$=s(e=>{const t=S.rMax-S.rMin;if(0===t)return(u+p)/2;const n=(e-S.rMin)/t;return u+n*(p-u)},[S,u,p]),M=s(()=>{if(!a)return[];const e=[],t=Fn(S.xMax-S.xMin);for(let n=Math.ceil(S.xMin/t)*t;n<=S.xMax;n+=t){const t=k(n);e.push(o("line",{key:`grid-x-${n}`,x1:String(t),y1:String(y),x2:String(t),y2:String(y+v),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`grid-xlabel-${n}`,x:String(t),y:String(y+v+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(Math.round(1e3*n)/1e3)))}const n=Fn(S.yMax-S.yMin);for(let t=Math.ceil(S.yMin/n)*n;t<=S.yMax;t+=n){const n=w(t);e.push(o("line",{key:`grid-y-${t}`,x1:String(y),y1:String(n),x2:String(y+b),y2:String(n),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`grid-ylabel-${t}`,x:String(y-6),y:String(n+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(Math.round(1e3*t)/1e3)))}return e},[a,S,k,w,y,b,v]),C=s(()=>{if(!c)return[];const e=[];return e.push(o("line",{key:"axis-y",x1:String(y),y1:String(y),x2:String(y),y2:String(y+v),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(y),y1:String(y+v),x2:String(y+b),y2:String(y+v),stroke:"#374151","stroke-width":"1.5"})),i&&e.push(o("text",{key:"x-label",x:String(y+b/2),y:String(y+v+40),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"#374151"},i)),l&&e.push(o("text",{key:"y-label",x:String(y-40),y:String(y+v/2),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"#374151",transform:`rotate(-90, ${y-40}, ${y+v/2})`},l)),e},[c,y,b,v,i,l]),z=s(()=>{const e=[];for(let t=0;t<m.length;t++){const n=m[t],r=k(n.x),i=w(n.y),l=Rn($(n.r),u,p),a=n.color??h;e.push(o("circle",{key:`bubble-${t}`,cx:String(r),cy:String(i),r:String(l),fill:a,opacity:String(g),stroke:a,"stroke-width":"1","stroke-opacity":"0.8","aria-label":n.label??`Bubble at (${n.x}, ${n.y}) size ${n.r}`,role:"img"})),f&&n.label&&e.push(o("text",{key:`label-${t}`,x:String(r),y:String(i-l-4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},n.label))}return e},[m,k,w,$,h,g,f,u,p]),I=s(()=>x?[o("text",{key:"title",x:String(n/2),y:String(y/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},x)]:[],[x,n,y]),A=M(),F=C(),R=z(),D=I();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":x??"Bubble chart",style:{fontFamily:"sans-serif"}},...D,...A,...F,...R)},exports.Button=function(e){const{children:t,onClick:n,variant:r="secondary",size:i="md",disabled:l=!1,fullWidth:a=!1,type:s="button",className:c,style:f,ariaLabel:p,active:u=!1}=e,h=d(()=>{const e=yn[i]??yn.md,t=mn[r]??mn.secondary,n={padding:e.padding,fontSize:e.fontSize,borderRadius:e.borderRadius,border:`1px solid ${t.border}`,backgroundColor:u?"#3b82f6":t.bg,color:u?"white":t.color,cursor:l?"default":"pointer",fontFamily:"inherit",lineHeight:"1.4",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"4px",transition:"background-color 0.15s, opacity 0.15s",opacity:l?"0.5":"1"};return a&&(n.width="100%"),f&&Object.assign(n,f),n},[r,i,l,a,u,f]);return o("button",{type:s,onClick:l?void 0:n,disabled:l,className:c,style:h,"aria-label":p,"aria-pressed":u?"true":void 0},t)},exports.CalendarHeatMap=function(e){const{data:t=[],width:n=800,height:r=160,colorScale:i=Pn,cellSize:l=12,cellGap:a=2,showMonthLabels:c=!0,showDayLabels:f=!0,emptyColor:p="#ebedf0",title:u}=e,{dateMap:h,startDate:g,endDate:x,maxVal:y}=d(()=>{const e=new Map;let n=0,o=null,r=null;for(const i of t){const t=Tn(i.date);if(isNaN(t.getTime()))continue;const l=Wn(t);e.set(l,(e.get(l)??0)+i.value);const a=e.get(l);a>n&&(n=a),(null===o||t<o)&&(o=t),(null===r||t>r)&&(r=t)}if(null===o||null===r){const e=new Date;o=new Date(e.getFullYear(),0,1),r=new Date(e.getFullYear(),11,31)}const i=new Date(o);i.setDate(i.getDate()-i.getDay());const l=new Date(r);return l.setDate(l.getDate()+(6-l.getDay())),{dateMap:e,startDate:i,endDate:l,maxVal:n>0?n:1}},[t]),m=f?30:0,b=c?16:0,v=u?28:0,S=m+10,k=v+b+4,w=s(()=>{const e=[],t=new Date(g);let n=0;for(;t<=x;){const r=t.getDay();0===r&&t>g&&n++;const s=Wn(t),d=h.get(s),c=void 0!==d&&d>0?En(d/y,i):p,f=S+n*(l+a),u=k+r*(l+a);e.push(o("rect",{key:`day-${s}`,x:String(f),y:String(u),width:String(l),height:String(l),rx:"2",ry:"2",fill:c,"aria-label":`${s}: ${d??0}`})),t.setDate(t.getDate()+1)}return e},[g,x,h,y,i,p,l,a,S,k]),$=s(()=>{if(!c)return[];const e=[],t=new Date(g);let n=0,r=-1;for(;t<=x;){const i=t.getDay();0===i&&t>g&&n++;const s=t.getMonth();if(s!==r&&0===i){r=s;const t=S+n*(l+a);e.push(o("text",{key:`month-${n}`,x:String(t),y:String(v+b-2),"font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},Ln[s]))}t.setDate(t.getDate()+1)}return e},[c,g,x,l,a,S,v,b]),M=s(()=>{if(!f)return[];const e=[],t=[1,3,5];for(const n of t){const t=k+n*(l+a)+l/2;e.push(o("text",{key:`day-label-${n}`,x:String(m),y:String(t),"text-anchor":"end","dominant-baseline":"central","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},Nn[n]))}return e},[f,l,a,k,m]),C=s(()=>u?[o("text",{key:"title",x:String(n/2),y:"18","text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},u)]:[],[u,n]);if(0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Calendar heat map — no data"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const z=C(),I=$(),A=M(),F=w();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Calendar heat map",style:{fontFamily:"sans-serif"}},...z,...I,...A,...F)},exports.Card=function(e){const t=!1!==e.bordered,n=e.shadow??"sm",r=e.padding??"16px",i=e.borderRadius??"8px",l=d(()=>{const o={display:"flex",flexDirection:"column",borderRadius:i,overflow:"hidden",backgroundColor:"#ffffff",transition:"box-shadow 0.2s, transform 0.2s"};return t&&(o.border="1px solid #e5e7eb"),o.boxShadow=ye[n]??ye.sm,e.hoverable&&(o.cursor="pointer"),{...o,...e.style??{}}},[t,n,i,e.hoverable,e.style]),a={display:"flex",alignItems:"flex-start",justifyContent:"space-between",padding:r,gap:"12px"},s={padding:r,paddingTop:e.title||e.subtitle?"0":r,flex:"1"},c={padding:r,paddingTop:"0",borderTop:"1px solid #f3f4f6",paddingBottom:r,marginTop:"auto"},f=e.title||e.subtitle||e.headerAction;return o("div",{className:`card ${e.hoverable?"card--hoverable":""} ${e.className??""}`.trim(),style:l},e.image?o("img",{src:e.image,alt:e.imageAlt??"",style:{width:"100%",height:"auto",display:"block",objectFit:"cover"}}):null,f?o("div",{className:"card__header",style:a},o("div",{style:{flex:"1",minWidth:"0"}},e.title?o("div",{className:"card__title",style:{fontSize:"16px",fontWeight:"600",color:"#111827",lineHeight:"1.4"}},e.title):null,e.subtitle?o("div",{className:"card__subtitle",style:{fontSize:"14px",color:"#6b7280",marginTop:"2px",lineHeight:"1.4"}},e.subtitle):null),e.headerAction?o("div",{className:"card__header-action"},e.headerAction):null):null,o("div",{className:"card__body",style:s},e.children),e.footer?o("div",{className:"card__footer",style:c},e.footer):null)},exports.Carousel=function(e){const t=e.items??[],n=t.length,r=!1!==e.loop,i=!1!==e.showDots,p=!1!==e.showArrows,u=e.animation??"slide",h=e.interval??5e3,g=f().replace(/[^a-zA-Z0-9_-]/g,""),[x,y]=l(0),m=c(null),b=c(null),v=s(t=>{let o=t;o=r?(t%n+n)%n:Math.max(0,Math.min(t,n-1)),y(o),e.onChange&&e.onChange(o)},[n,r,e.onChange]),S=s(()=>v(x+1),[x,v]),k=s(()=>v(x-1),[x,v]);a(()=>{if(!e.autoPlay||n<=1)return;const t=setInterval(S,h);return()=>clearInterval(t)},[e.autoPlay,h,S,n]),a(()=>{const e=e=>{"ArrowLeft"===e.key?k():"ArrowRight"===e.key&&S()},t=b.current;if(t)return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[S,k]);const w="fade"===u?`@keyframes liq-fade-in-${g}{from{opacity:0}to{opacity:1}}`:"",$=d(()=>"fade"===u?{position:"relative",width:"100%"}:{display:"flex",transition:"transform 0.4s ease",transform:`translateX(-${100*x}%)`,width:"100%"},[x,u]),M={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:"2",background:"rgba(255,255,255,0.8)",border:"none",borderRadius:"50%",width:"36px",height:"36px",fontSize:"18px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"#111827",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"},C=t.map((e,t)=>{const n="fade"===u?{position:t===x?"relative":"absolute",top:"0",left:"0",width:"100%",opacity:t===x?"1":"0",transition:"opacity 0.4s ease"}:{flex:"0 0 100%",width:"100%"};return o("div",{key:String(t),style:n},e.content,e.caption?o("div",{style:{textAlign:"center",padding:"8px 12px",fontSize:"13px",color:"#6b7280"}},e.caption):null)}),z=i?o("div",{style:{display:"flex",justifyContent:"center",gap:"8px",padding:"12px 0"}},...t.map((e,t)=>o("button",{key:String(t),"aria-label":`Go to slide ${t+1}`,onclick:()=>v(t),style:{width:"10px",height:"10px",borderRadius:"50%",border:"none",cursor:"pointer",backgroundColor:t===x?"#3b82f6":"#d1d5db",transition:"background-color 0.2s",padding:"0"}}))):null;return o("div",{ref:b,tabindex:"0",role:"region","aria-label":"Carousel",style:{position:"relative",overflow:"hidden",width:"100%",outline:"none"},onpointerdown:e=>{m.current=e.clientX},onpointerup:e=>{if(null==m.current)return;const t=e.clientX-m.current;t>50?k():t<-50&&S(),m.current=null}},w?o("style",null,w):null,o("div",{style:$},...C),p&&n>1?o("button",{"aria-label":"Previous slide",onclick:k,style:{...M,left:"8px"}},"‹"):null,p&&n>1?o("button",{"aria-label":"Next slide",onclick:S,style:{...M,right:"8px"}},"›"):null,z)},exports.CartesianGraph2D=function(e){const{width:t=400,height:n=300,points:r=[],plotFunction:i,plotResolution:f=200,xStep:p,sync:u=!1,xRange:h=[-5,5],yRange:g=[-5,5],showGrid:x=!0,showAxes:y=!0,pointRadius:m=3,pointColor:b="#3b82f6",curveColor:v="#3b82f6",gridColor:S="#e2e8f0",axisColor:k="#94a3b8",onPointClick:w,onPointDoubleClick:$,onPointContextMenu:M,onPointHover:C}=e,[z,I]=l(h[0]),[A,F]=l(h[1]),[R,D]=l(g[0]),[L,N]=l(g[1]),T=c(!1),W=c(null),B=s(e=>ft+(e-z)/(A-z)*(t-80),[z,A,t]),E=s(e=>n-ft-(e-R)/(L-R)*(n-80),[R,L,n]),P=s(e=>z+(e-ft)/(t-80)*(A-z),[z,A,t]),H=s(e=>R+(n-ft-e)/(n-80)*(L-R),[R,L,n]),j=s(e=>{const t=e;T.current=!0,W.current={mx:t.clientX,my:t.clientY,x0:z,x1:A,y0:R,y1:L}},[z,A,R,L]),Y=s(e=>{if(!T.current||!W.current)return;const o=e,r=W.current,i=o.clientX-r.mx,l=o.clientY-r.my,a=i/(t-80)*(r.x1-r.x0),s=l/(n-80)*(r.y1-r.y0);I(r.x0-a),F(r.x1-a),D(r.y0+s),N(r.y1+s)},[t,n]),_=s(()=>{T.current=!1,W.current=null},[]),q=s(e=>{const t=e;t.preventDefault();const n=t.currentTarget.getBoundingClientRect(),o=t.clientX-n.left,r=t.clientY-n.top,i=P(o),l=H(r),a=t.deltaY>0?1.1:1/1.1,s=(A-z)*a,d=(L-R)*a;if(s<.01||d<.01||s>pt||d>pt)return;const c=(i-z)/(A-z),f=(l-R)/(L-R);I(i-c*s),F(i+(1-c)*s),D(l-f*d),N(l+(1-f)*d)},[z,A,R,L,P,H]),O=[];if(O.push(o("rect",{x:0,y:0,width:t,height:n,fill:"white",key:"bg"})),x){const e=dt(z,A),r=dt(R,L);for(let t=0;t<e.length;t++){const r=B(e[t]);O.push(o("line",{x1:r,y1:ft,x2:r,y2:n-ft,stroke:S,"stroke-width":.5,key:`gx-${t}`})),O.push(o("text",{x:r,y:n-ft+14,"text-anchor":"end","font-size":10,fill:k,transform:`rotate(-45, ${r}, ${n-ft+14})`,key:`lx-${t}`},ct(e[t])))}for(let e=0;e<r.length;e++){const n=E(r[e]);O.push(o("line",{x1:ft,y1:n,x2:t-ft,y2:n,stroke:S,"stroke-width":.5,key:`gy-${e}`})),O.push(o("text",{x:34,y:n+3,"text-anchor":"end","font-size":10,fill:k,key:`ly-${e}`},ct(r[e])))}}if(y){const e=Math.max(ft,Math.min(t-ft,B(0))),r=Math.max(ft,Math.min(n-ft,E(0)));O.push(o("line",{x1:ft,y1:r,x2:t-ft,y2:r,stroke:k,"stroke-width":1,key:"x-axis"})),O.push(o("line",{x1:e,y1:ft,x2:e,y2:n-ft,stroke:k,"stroke-width":1,key:"y-axis"}))}const U=d(()=>{if(!i||!u)return[];const e=it({start:z,end:A,step:p??(A-z)/f});return lt(i,e)},[i,z,A,p,f,u]),[G,V]=l([]),X=c(null);a(()=>{if(!i||u)return void V([]);const e=it({start:z,end:A,step:p??(A-z)/f});return X.current&&X.current(),X.current=at(i,e,200,e=>{V([...e])}),()=>{X.current&&X.current()}},[i,z,A,p,f,u]);const K=u?U:G;if(K.length>0){const e=[];for(let t=0;t<K.length;t++){const n=K[t],o=B(n.input),r=E(n.output);e.push(`${0===e.length?"M":"L"}${o},${r}`)}O.push(o("path",{d:e.join(" "),fill:"none",stroke:v,"stroke-width":1.5,key:"curve"}))}const Z=(e,t,n,o)=>{if(t)return e=>t({x:o.x,y:o.y,index:n,event:e})};for(let e=0;e<r.length;e++){const t=r[e],n={cx:B(t.x),cy:E(t.y),r:m,fill:b,cursor:"pointer",key:`pt-${e}`};w&&(n.onClick=Z(0,w,e,t)),$&&(n.onDblClick=Z(0,$,e,t)),M&&(n.onContextMenu=Z(0,M,e,t)),C&&(n.onMouseOver=Z(0,C,e,t)),O.push(o("circle",n))}const J=o("defs",{key:"defs"},o("clipPath",{id:"plot-clip"},o("rect",{x:ft,y:ft,width:t-80,height:n-80})));return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",style:"user-select: none; touch-action: none;",onMouseDown:j,onMouseMove:Y,onMouseUp:_,onMouseLeave:_,onWheel:q},J,...O)},exports.Checkbox=function(e){const{checked:t,onChange:n,label:r,indeterminate:i=!1,disabled:l=!1,error:d,size:f="md"}=e,p=c(null);a(()=>{p.current&&(p.current.indeterminate=i)},[i]);const u=s(()=>{l||n(!t)},[l,t,n]),h=s(e=>{l||" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),n(!t))},[l,t,n]),g=oe[f],x=`${g.box}px`,y={width:x,height:x,minWidth:x,borderRadius:"4px",border:"2px solid "+(d?"#ef4444":t||i?"#3b82f6":"#d1d5db"),backgroundColor:t||i?"#3b82f6":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",cursor:l?"not-allowed":"pointer",transition:"all 0.15s",boxSizing:"border-box"},m={color:"#ffffff",fontSize:`${g.icon}px`,lineHeight:"1",fontWeight:"700"},b=i?o("span",{style:m},"—"):t?o("span",{style:m},"✓"):null,v={display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer",opacity:l?"0.6":"1",userSelect:"none"},S=o("input",{ref:p,type:"checkbox",checked:t,disabled:l,onChange:()=>n(!t),style:{position:"absolute",opacity:"0",width:"0",height:"0",pointerEvents:"none"},"aria-hidden":"true",tabIndex:-1}),k=o("div",{style:y},b),w=r?o("span",{style:{fontSize:g.fontSize,color:"#374151"}},r):null;return o(te,{error:d},o("div",{style:v,onClick:u,onKeyDown:h,tabIndex:l?-1:0,role:"checkbox","aria-checked":i?"mixed":t?"true":"false","aria-disabled":l?"true":void 0,"aria-label":r},S,k,w))},exports.ChordDiagram=function(e){const{matrix:t,labels:n,width:r=600,height:i=600,colors:l=Hn,padAngle:a=.05,showLabels:c=!0,showValues:f=!1,ribbonOpacity:p=.5,innerRadiusRatio:u=.9,title:h}=e;if(!t||0===t.length||!n||0===n.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty chord diagram"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const g=r/2,x=i/2,y=Math.min(r,i)/2-40,m=y*Math.max(.5,Math.min(.99,u)),b=y+16,v=d(()=>function(e,t,n,o){const r=e.length;if(0===r)return{groups:[],chords:[]};const i=[];let l=0;for(let t=0;t<r;t++){let n=0;for(let o=0;o<r;o++){const r=e[t]?.[o]??0;n+=Math.max(0,r)}i.push(n),l+=n}if(0===l){const e=(2*Math.PI-r*o)/Math.max(r,1),i=[];let l=0;for(let a=0;a<r;a++)i.push({index:a,label:t[a]??`Group ${a}`,color:n[a%n.length],startAngle:l,endAngle:l+e,value:0}),l+=e+o;return{groups:i,chords:[]}}const a=2*Math.PI-r*o,s=[];let d=0;for(let e=0;e<r;e++){const r=i[e]/l*a;s.push({index:e,label:t[e]??`Group ${e}`,color:n[e%n.length],startAngle:d,endAngle:d+r,value:i[e]}),d+=r+o}const c=[];for(let e=0;e<r;e++)c.push(s[e].startAngle);const f=[];for(let t=0;t<r;t++)for(let n=t;n<r;n++){const o=Math.max(0,e[t]?.[n]??0),r=t===n?0:Math.max(0,e[n]?.[t]??0);if(0===o&&0===r)continue;const d=o+r,p=i[t]>0?o/l*a:0,u=c[t],h=u+p;c[t]=h;const g=i[n]>0?o/l*a:0,x=c[n],y=x+g;if(c[n]=y,t===n){o>0&&f.push({sourceIndex:t,targetIndex:n,sourceStartAngle:u,sourceEndAngle:h,targetStartAngle:x,targetEndAngle:y,value:o,color:s[t].color});continue}const m=i[n]>0?r/l*a:0,b=c[n]+m;c[n]=b;const v=i[t]>0?r/l*a:0,S=c[t]+v;c[t]=S,(o>0||r>0)&&f.push({sourceIndex:t,targetIndex:n,sourceStartAngle:u,sourceEndAngle:Math.max(h,u+.001),targetStartAngle:x,targetEndAngle:Math.max(y,x+.001),value:d,color:s[t].color})}return{groups:s,chords:f}}(t,n,l,a),[t,n,l,a]),S=s(()=>{const e=[];for(let t=0;t<v.groups.length;t++){const n=v.groups[t];if(n.endAngle-n.startAngle<.001)continue;const r=Yn(g,x,y,m,n.startAngle,n.endAngle);if(e.push(o("path",{key:`arc-${t}`,d:r,fill:n.color,stroke:"#fff","stroke-width":"1",role:"img","aria-label":`${n.label}: ${n.value}`})),c){const r=(n.startAngle+n.endAngle)/2,i=jn(g,x,b,r),l=((r-Math.PI/2)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)<Math.PI,a=l?"start":"end";let s=180*r/Math.PI-90;l||(s+=180);const d=f?`${n.label} (${n.value})`:n.label;e.push(o("text",{key:`label-${t}`,x:String(i.x),y:String(i.y),"text-anchor":a,"font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(${s}, ${i.x}, ${i.y})`,"dominant-baseline":"central","pointer-events":"none"},d))}}return e},[v,g,x,y,m,b,c,f]),k=s(()=>{const e=[];for(let t=0;t<v.chords.length;t++){const n=v.chords[t],r=_n(g,x,m,n.sourceStartAngle,n.sourceEndAngle,n.targetStartAngle,n.targetEndAngle);e.push(o("path",{key:`ribbon-${t}`,d:r,fill:n.color,"fill-opacity":String(p),stroke:n.color,"stroke-width":"0.5","stroke-opacity":"0.3"}))}return e},[v,g,x,m,p]),w=s(()=>h?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,r]),$=k(),M=S(),C=w();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Chord diagram",style:{fontFamily:"sans-serif"}},...C,...$,...M)},exports.ColorPicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,presets:d=re,showInput:p=!0,showAlpha:u=!1,disabled:h=!1,label:g}=e,[x,y]=l(!1),[m,b]=l(r),v=c(null);a(()=>{b(r)},[r]),a(()=>{const e=e=>{v.current&&!v.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const S=s(e=>{h||i(le(e))},[h,i]),k=s(e=>{const t=e.target.value;b(t);const n=t.startsWith("#")?t:`#${t}`;ie(n)&&i(le(n))},[i]),w=s(()=>{ie(m.startsWith("#")?m:`#${m}`)||b(r)},[m,r]),$={width:"36px",height:"36px",borderRadius:"6px",border:"2px solid #d1d5db",backgroundColor:r,cursor:h?"not-allowed":"pointer",flexShrink:"0"},M={display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:"4px",marginBottom:p?"8px":"0"},C=d.map(e=>{const t=le(e)===le(r);return o("div",{key:e,style:{width:"20px",height:"20px",borderRadius:"3px",backgroundColor:e,cursor:h?"not-allowed":"pointer",border:t?"2px solid #1f2937":"1px solid #e5e7eb",boxSizing:"border-box"},onClick:()=>S(e),onKeyDown:t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),S(e))},role:"button",tabIndex:h?-1:0,title:e,"aria-label":`Select color ${e}`})}),z=p?o("div",{style:{display:"flex",alignItems:"center",gap:"4px"}},o("div",{style:{width:"24px",height:"24px",borderRadius:"4px",backgroundColor:r,border:"1px solid #d1d5db",flexShrink:"0"}}),o("input",{type:"text",value:m,onInput:k,onBlur:w,disabled:h,style:{flex:"1",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",fontSize:"13px",fontFamily:"monospace",outline:"none",color:"#1f2937"},placeholder:"#000000","aria-label":"Hex color value"})):null,I=x?o("div",{style:{position:"absolute",top:"100%",left:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",padding:"12px",width:"240px"}},o("div",{style:M},...C),z):null;return o(te,{label:g,disabled:h,htmlFor:n},o("div",{ref:v,style:{position:"relative"}},o("div",{style:{display:"flex",alignItems:"center",gap:"8px"},onClick:h?void 0:()=>y(!x),onKeyDown:h?void 0:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),y(!x))},role:"button",tabIndex:h?-1:0,"aria-expanded":x?"true":"false","aria-label":"Toggle color picker"},o("div",{id:n,style:$}),p?o("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#1f2937"}},r):null),I))},exports.ColorWheel=function(e){const t=e.id??`cw-${Math.random().toString(36).slice(2,8)}`,{value:n="#000000",onChange:r,size:i=32,showLabel:a=!0,disabled:d=!1,label:f}=e,[p,u]=l(n);return o(te,{label:f,htmlFor:t},o("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"4px"}},o("div",{style:{width:`${i}px`,height:`${i}px`,borderRadius:"6px",border:"2px solid #d1d5db",backgroundColor:p,cursor:d?"not-allowed":"pointer",position:"relative",overflow:"hidden"}},o("input",{id:t,ref:c(null),type:"color",value:p,onInput:s((...e)=>{const t=e[0].target.value;u(t),r?.(t)},[r]),disabled:d,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",cursor:d?"not-allowed":"pointer",border:"none",padding:"0"},"aria-label":f||"Color"})),a?o("span",{style:{fontSize:"11px",fontFamily:"monospace",color:"#64748b"}},p):null))},exports.ComplexGraph2D=function(e){const{width:t=400,height:n=300,realRange:r=[-2.5,1],imagRange:i=[-1.25,1.25],maxIterations:d=100,colorScheme:f="classic",computeFunction:p=ut,data:u,resolution:h=2,onPointClick:g,onPointHover:x,onPointDoubleClick:y,onPointContextMenu:m}=e;if(u){const e=u.length,r=e>0?u[0].length:0,i=r>0?t/r:1,l=e>0?n/e:1,a=[];for(let t=0;t<e;t++){const e=u[t];for(let n=0;n<r;n++){const r=e[n]??0,[s,c,p]=ht(r,d,f);a.push(o("rect",{key:`${t}-${n}`,x:String(n*i),y:String(t*l),width:String(Math.ceil(i)),height:String(Math.ceil(l)),fill:`rgb(${s},${c},${p})`}))}}return o("svg",{width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Complex plane visualization",style:{cursor:"crosshair",borderRadius:"6px",maxWidth:"100%"}},...a)}const[b,v]=l(r[0]),[S,k]=l(r[1]),[w,$]=l(i[0]),[M,C]=l(i[1]),z=c(null),I=c(!1),A=c(null),F=s((e,o)=>({re:b+e/t*(S-b),im:M-o/n*(M-w)}),[b,S,w,M,t,n]);a(()=>{const e=z.current;if(!e)return;const o=e.getContext("2d");if(!o)return;const r=o.createImageData(t,n),i=r.data;for(let e=0;e<n;e++)for(let n=0;n<t;n++){const{re:o,im:r}=F(n,e),l=p(o,r,d),[a,s,c]=ht(l,d,f),u=4*(e*t+n);i[u]=a,i[u+1]=s,i[u+2]=c,i[u+3]=255}o.putImageData(r,0,0)},[b,S,w,M,t,n,d,f,p,F]);const R=s(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,{re:r,im:i}=F(n,o);return{re:r,im:i,iterations:p(r,i,d),event:e}},[F,p,d]),D=s(e=>{I.current=!0,A.current={x:e.clientX,y:e.clientY,rMin:b,rMax:S,iMin:w,iMax:M}},[b,S,w,M]),L=s(e=>{if(x&&x(R(e)),!I.current||!A.current)return;const o=A.current,r=e.clientX-o.x,i=e.clientY-o.y,l=(o.rMax-o.rMin)/t,a=(o.iMax-o.iMin)/n;v(o.rMin-r*l),k(o.rMax-r*l),$(o.iMin+i*a),C(o.iMax+i*a)},[t,n,x,R]),N=s(()=>{I.current=!1},[]),T=s(e=>{e.preventDefault();const t=e.deltaY>0?1.15:1/1.15,n=e.target.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,{re:i,im:l}=F(o,r);v(i+(b-i)*t),k(i+(S-i)*t),$(l+(w-l)*t),C(l+(M-l)*t)},[F,b,S,w,M]),W=s(e=>{g&&g(R(e))},[g,R]),B=s(e=>{y&&y(R(e))},[y,R]),E=s(e=>{e.preventDefault(),m&&m(R(e))},[m,R]);return o("canvas",{ref:z,width:t,height:n,style:{cursor:"crosshair"},onMouseDown:D,onMouseMove:L,onMouseUp:N,onMouseLeave:N,onWheel:T,onClick:W,onDblClick:B,onContextMenu:E})},exports.ContextMenu=function(e){const{items:t,children:n}=e,[r,i]=l(null),d=s(e=>{e.preventDefault();const t=e;i({x:t.clientX,y:t.clientY})},[]),c=s(()=>{i(null)},[]);a(()=>{if(!r)return;const e=e=>{c()},t=setTimeout(()=>{document.addEventListener("mousedown",e)},0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[r,c]),a(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&c()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,c]);const f=[o("div",{onContextMenu:d,style:{display:"contents"}},n)];return r&&f.push(o(qe,{items:t,position:r,onClose:c,depth:0})),o("div",null,...f)},exports.DataGrid=function(e){const{columns:t,data:n,pageSize:r,currentPage:i,onPageChange:a,sortBy:c,sortDir:f,onSort:p,selectable:u=!1,selectedRows:h,onSelectionChange:g,striped:x=!1,bordered:y=!1,compact:m=!1,stickyHeader:b=!1}=e,[v,S]=l(0),[k,w]=l(void 0),[T,W]=l("asc"),[B,E]=l([]),[P,H]=l({}),j=i??v,Y=c??k,_=f??T,q=h??B,O=d(()=>{const e=Object.entries(P).filter(([,e])=>e.length>0);return 0===e.length?n:n.filter(t=>e.every(([e,n])=>String(t[e]??"").toLowerCase().includes(n.toLowerCase())))},[n,P]),U=d(()=>{if(!Y)return O;const e=[...O];return e.sort((e,t)=>{const n=e[Y],o=t[Y];if(null==n&&null==o)return 0;if(null==n)return 1;if(null==o)return-1;if("number"==typeof n&&"number"==typeof o)return"asc"===_?n-o:o-n;const r=String(n),i=String(o),l=r.localeCompare(i);return"asc"===_?l:-l}),e},[O,Y,_]),G=U.length,V=r?Math.max(1,Math.ceil(G/r)):1,X=r?U.slice(j*r,(j+1)*r):U,K=s(e=>{a?a(e):S(e)},[a]),Z=s(e=>{const t=Y===e&&"asc"===_?"desc":"asc";p?p(e,t):(w(e),W(t))},[Y,_,p]),J=s(e=>{const t=q.includes(e)?q.filter(t=>t!==e):[...q,e];g?g(t):E(t)},[q,g]),Q=s(()=>{const e=X.map((e,t)=>r?j*r+t:t),t=e.every(e=>q.includes(e))?q.filter(t=>!e.includes(t)):[...new Set([...q,...e])];g?g(t):E(t)},[X,q,r,j,g]),ee=s((e,t)=>{H(n=>({...n,[e]:t})),K(0)},[K]),te=t.some(e=>e.filterable),ne=m?"6px 8px":C.padding,oe=[];if(u){const e=X.map((e,t)=>r?j*r+t:t),t=e.length>0&&e.every(e=>q.includes(e));oe.push(o("th",{key:"__select_all",style:{...M,padding:ne,width:"40px",textAlign:"center",...b?{position:"sticky",top:"0",zIndex:"2"}:{}}},o("input",{type:"checkbox",checked:t,onChange:Q,style:L,"aria-label":"Select all rows"})))}for(const e of t){const t={...M,padding:ne,...e.width?{width:e.width}:{},...e.sortable?{cursor:"pointer"}:{},...y?{border:"1px solid #e5e7eb"}:{},...b?{position:"sticky",top:"0",zIndex:"2"}:{}},n=[e.header];e.sortable&&n.push(o("span",{style:z},N(e.key,Y,_))),oe.push(o("th",{key:e.key,style:t,onClick:e.sortable?()=>Z(e.key):void 0,onKeyDown:e.sortable?t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),Z(e.key))}:void 0,tabIndex:e.sortable?0:void 0,role:e.sortable?"columnheader":void 0,"aria-sort":Y===e.key?"asc"===_?"ascending":"descending":void 0},...n))}let re=null;if(te){const e=[];u&&e.push(o("th",{key:"__filter_spacer",style:{padding:ne}}));for(const n of t)e.push(o("th",{key:`filter_${n.key}`,style:{padding:"4px 8px",backgroundColor:"#f9fafb"}},n.filterable?o("input",{type:"text",placeholder:`Filter ${n.header}...`,style:I,value:P[n.key]??"",onInput:e=>ee(n.key,e.target.value),"aria-label":`Filter by ${n.header}`}):null));re=o("tr",{key:"__filter_row"},...e)}const ie=[];for(let e=0;e<X.length;e++){const n=X[e],i=r?j*r+e:e,l=q.includes(i),a={};x&&e%2==1&&(a.backgroundColor="#f9fafb"),l&&(a.backgroundColor="#eff6ff");const s=[];u&&s.push(o("td",{key:"__select",style:{padding:ne,textAlign:"center",...C,...y?{border:"1px solid #e5e7eb"}:{}}},o("input",{type:"checkbox",checked:l,onChange:()=>J(i),style:L,"aria-label":`Select row ${i+1}`})));for(const e of t){const t=n[e.key],r=e.render?e.render(t,n):String(t??"");s.push(o("td",{key:e.key,style:{...C,padding:ne,...y?{border:"1px solid #e5e7eb"}:{}}},r))}ie.push(o("tr",{key:String(i),style:a},...s))}let le=null;if(r){const e=0===G?0:j*r+1,t=Math.min((j+1)*r,G),n=[];n.push(o("button",{key:"prev",style:0===j?D:F,onClick:j>0?()=>K(j-1):void 0,disabled:0===j,"aria-label":"Previous page"},"← Prev"));const i=7;let l=Math.max(0,j-Math.floor(i/2));const a=Math.min(V,l+i);a-l<i&&(l=Math.max(0,a-i)),l>0&&(n.push(o("button",{key:"p0",style:F,onClick:()=>K(0)},"1")),l>1&&n.push(o("span",{key:"e1",style:{margin:"0 4px"}},"...")));for(let e=l;e<a;e++)n.push(o("button",{key:`p${e}`,style:e===j?R:F,onClick:e!==j?()=>K(e):void 0,"aria-current":e===j?"page":void 0},String(e+1)));a<V&&(a<V-1&&n.push(o("span",{key:"e2",style:{margin:"0 4px"}},"...")),n.push(o("button",{key:"p"+(V-1),style:F,onClick:()=>K(V-1)},String(V)))),n.push(o("button",{key:"next",style:j>=V-1?D:F,onClick:j<V-1?()=>K(j+1):void 0,disabled:j>=V-1,"aria-label":"Next page"},"Next →")),le=o("div",{style:A},o("span",null,`Showing ${e}–${t} of ${G}`),o("div",{style:{display:"flex",alignItems:"center",gap:"2px"}},...n))}const ae={width:"100%",...b?{overflow:"auto",maxHeight:"600px"}:{}},se={...$,...y?{border:"1px solid #e5e7eb"}:{}},de=o("thead",null,o("tr",null,...oe),re),ce=o("tbody",null,...ie),fe=o("table",{style:se,role:"grid","aria-rowcount":String(G)},de,ce);return o("div",{style:ae},fe,le)},exports.DatePicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,format:p="YYYY-MM-DD",minDate:u,maxDate:h,disabled:g=!1,placeholder:x="Select date...",label:y,error:m}=e,b=d(()=>de(r),[r]),v=d(()=>de(u),[u]),S=d(()=>de(h),[h]),[k,w]=l(!1),[$,M]=l(()=>b?b.getFullYear():(new Date).getFullYear()),[C,z]=l(()=>b?b.getMonth():(new Date).getMonth()),I=c(null),A=d(()=>new Date,[]);a(()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const F=s(()=>{z(e=>0===e?(M(e=>e-1),11):e-1)},[]),R=s(()=>{z(e=>11===e?(M(e=>e+1),0):e+1)},[]),D=s(e=>{const t=new Date($,C,e);v&&t<v||S&&t>S||(i(function(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}(t)),w(!1))},[$,C,i,v,S]),L=b?function(e,t){const n=e.getFullYear(),o=e.getMonth()+1,r=e.getDate();return t.replace("YYYY",String(n)).replace("MM",String(o).padStart(2,"0")).replace("DD",String(r).padStart(2,"0"))}(b,p):"",N=d(()=>{const e=new Date($,C,1).getDay(),t=new Date($,C+1,0).getDate(),n=[];let o=[];for(let t=0;t<e;t++)o.push(null);for(let e=1;e<=t;e++)o.push(e),7===o.length&&(n.push(o),o=[]);for(;o.length>0&&o.length<7;)o.push(null);return o.length&&n.push(o),n},[$,C]),T={...ne({},{focused:k,error:!!m}),cursor:g?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"38px",userSelect:"none"},W={background:"none",border:"none",cursor:"pointer",fontSize:"16px",padding:"4px 8px",color:"#374151",borderRadius:"4px"},B=se.map(e=>o("div",{key:e,style:{padding:"4px"}},e)),E=N.map((e,t)=>{const n=e.map((e,n)=>{if(null===e)return o("div",{key:`empty-${t}-${n}`,style:{padding:"4px"}});const r=new Date($,C,e),i=ce(r,A),l=!!b&&ce(r,b),a=v&&r<v||S&&r>S;return o("div",{key:`day-${e}`,style:{padding:"4px",textAlign:"center",cursor:a?"not-allowed":"pointer",borderRadius:"4px",fontSize:"13px",fontWeight:i?"700":"400",backgroundColor:l?"#3b82f6":"transparent",color:l?"#ffffff":a?"#d1d5db":i?"#3b82f6":"#1f2937",border:i&&!l?"1px solid #3b82f6":"1px solid transparent",lineHeight:"1.8"},onClick:a?void 0:()=>D(e),onKeyDown:a?void 0:t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),D(e))},role:a?void 0:"button",tabIndex:a?void 0:0,"aria-label":`${ae[C]} ${e}, ${$}`,"aria-disabled":a?"true":void 0},String(e))});return o("div",{key:`row-${t}`,style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"}},...n)}),P=k?o("div",{style:{position:"absolute",top:"100%",left:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",padding:"12px",width:"280px"}},o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}},o("button",{type:"button",style:W,onClick:F},"◀"),o("span",{style:{fontWeight:"600",fontSize:"14px",color:"#1f2937"}},`${ae[C]} ${$}`),o("button",{type:"button",style:W,onClick:R},"▶")),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",textAlign:"center",fontSize:"11px",fontWeight:"600",color:"#6b7280",marginBottom:"4px"}},...B),...E):null;return o(te,{label:y,error:m,disabled:g,htmlFor:n},o("div",{ref:I,style:{position:"relative"}},o("div",{id:n,style:T,onClick:g?void 0:()=>w(!k),onKeyDown:g?void 0:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),w(!k))},tabIndex:g?-1:0,role:"button","aria-label":"Pick a date","aria-expanded":k?"true":"false"},o("span",{style:{color:L?"#1f2937":"#9ca3af"}},L||x),o("span",{style:{color:"#6b7280",fontSize:"14px"}},"📅")),P))},exports.DecompositionTree=function(e){const{data:t,width:n=800,height:r=500,orientation:i="horizontal",nodeWidth:l=120,nodeHeight:a=40,showValues:c=!0,showConnectors:f=!0,connectorColor:p="#94a3b8",colors:u=qn,title:h,padding:g=40}=e;if(!t)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty decomposition tree"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const x="horizontal"===i,y=d(()=>function(e,t,n,o,r,i,l,a){const{flatNodes:s,maxDepth:d}=function(e){const t=[];let n=0;const o=[];o.push([e,0,null]);let r=0;for(;o.length>0;){const[e,i,l]=o.shift(),a=n++;r=Math.max(r,i);const s=e.children??[],d=[];for(let e=0;e<s.length;e++)d.push(n+o.length+e);t.push({id:a,node:e,depth:i,parentId:l,childIndices:d});for(let e=0;e<s.length;e++)o.push([s[e],i+1,a])}return{flatNodes:t,maxDepth:r}}(e);if(0===s.length)return[];const c=function(e){const t=e.length,n=new Array(t).fill(0);for(let o=t-1;o>=0;o--){const r=e[o];if(0===r.childIndices.length)n[o]=1;else{let e=0;for(const o of r.childIndices)o<t&&(e+=n[o]);n[o]=Math.max(e,1)}}return n}(s),f=t-2*i,p=n-2*i,u="horizontal"===l,h=d+1,g=u?h>1?(f-o)/d:0:h>1?(p-r)/d:0,x=new Array(s.length),y=c[0],m=u?p:f,b=y>0?m/y:m,v=new Array(s.length);v[0]=[0,y];const S=[0];let k=0;for(;k<S.length;){const e=S[k];k++;const t=s[e],[n,o]=v[e],r=(n+o)/2,l=i+t.depth*g,d=i+(r-.5)*b,f=u?l:d,p=u?d:l,h=t.node.color??a[t.depth%a.length];x[e]={id:t.id,label:t.node.label,value:void 0!==t.node.value?String(t.node.value):"",color:h,depth:t.depth,x:f,y:p,parentId:t.parentId,childCount:t.childIndices.length,subtreeLeafCount:c[e]};let y=n;for(const e of t.childIndices)if(e<s.length){const t=y+c[e];v[e]=[y,t],y=t,S.push(e)}}return x}(t,n,r,l,a,g,i,u),[t,n,r,l,a,g,i,u]),m=d(()=>{const e=new Map;for(let t=0;t<y.length;t++){const n=y[t];e.set(n.id,n)}return e},[y]),b=s(()=>{if(!f)return[];const e=[];for(let t=0;t<y.length;t++){const n=y[t];if(null===n.parentId)continue;const r=m.get(n.parentId);if(!r)continue;let i,s,d,c;x?(i=r.x+l,s=r.y+a/2,d=n.x,c=n.y+a/2):(i=r.x+l/2,s=r.y+a,d=n.x+l/2,c=n.y);const f=(i+d)/2,u=(s+c)/2;let h;h=x?`M ${i} ${s} C ${f} ${s}, ${f} ${c}, ${d} ${c}`:`M ${i} ${s} C ${i} ${u}, ${d} ${u}, ${d} ${c}`,e.push(o("path",{key:`conn-${t}`,d:h,fill:"none",stroke:p,"stroke-width":"1.5","stroke-opacity":"0.7"}))}return e},[y,m,x,l,a,f,p]),v=s(()=>{const e=[];for(let t=0;t<y.length;t++){const n=y[t];e.push(o("rect",{key:`node-rect-${n.id}`,x:String(n.x),y:String(n.y),width:String(l),height:String(a),rx:"4",ry:"4",fill:n.color,stroke:"#374151","stroke-width":"1",role:"img","aria-label":n.value?`${n.label}: ${n.value}`:n.label}));const r=c&&n.value?n.y+a/2-2:n.y+a/2+4;e.push(o("text",{key:`node-label-${n.id}`,x:String(n.x+l/2),y:String(r),"text-anchor":"middle","font-size":"11","font-weight":"bold","font-family":"sans-serif",fill:"#fff","pointer-events":"none"},n.label)),c&&n.value&&e.push(o("text",{key:`node-value-${n.id}`,x:String(n.x+l/2),y:String(n.y+a/2+12),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.85)","pointer-events":"none"},n.value))}return e},[y,l,a,c]),S=s(()=>h?[o("text",{key:"title",x:String(n/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n]),k=b(),w=v(),$=S();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Decomposition tree",style:{fontFamily:"sans-serif"}},...$,...k,...w)},exports.DigitalClock=function(e){const{format:t="12h",showDate:n=!1,dateFormat:r="short",showSeconds:i=!0,timezone:s,className:d}=e,[c,f]=l(new Date);a(()=>{const e=setInterval(()=>{f(new Date)},1e3);return()=>clearInterval(e)},[]);const{hours:p,minutes:u,seconds:h}=function(e,t){if(t){const n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(e),o=e=>Number(n.find(t=>t.type===e)?.value??0);return{hours:o("hour"),minutes:o("minute"),seconds:o("second")}}return{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}}(c,s);let g,x=null;"12h"===t?(x=p>=12?"PM":"AM",g=p%12||12):g=p;let y=`${T(g)}:${T(u)}`;i&&(y+=`:${T(h)}`);const m=[y];null!=x&&m.push(o("span",{style:E},x));const b=[o("span",{style:B},...m)];return n&&b.push(o("span",{style:P},function(e,t,n){if(n){const o={timeZone:n};if("short"===t)return Object.assign(o,{month:"2-digit",day:"2-digit",year:"numeric"}),new Intl.DateTimeFormat("en-US",o).format(e);if("long"===t)return Object.assign(o,{month:"long",day:"numeric",year:"numeric"}),new Intl.DateTimeFormat("en-US",o).format(e);Object.assign(o,{year:"numeric",month:"2-digit",day:"2-digit"});const r=new Intl.DateTimeFormat("en-CA",o).formatToParts(e),i=e=>r.find(t=>t.type===e)?.value??"";return`${i("year")}-${i("month")}-${i("day")}`}return"short"===t?`${T(e.getMonth()+1)}/${T(e.getDate())}/${e.getFullYear()}`:"long"===t?new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(e):`${e.getFullYear()}-${T(e.getMonth()+1)}-${T(e.getDate())}`}(c,r,s))),o("div",{style:W,...d?{class:d}:{}},...b)},exports.DiscreteCartesian2D=function(e){const{data:t=[],colorMap:n,width:r=600,height:i=600,cellGap:l=1,cellRadius:a=0,showGrid:c=!1,gridColor:f="#334155",showIndices:p=!1,backgroundColor:u="#0f172a",padding:h=10,onCellClick:g,onCellHover:x,title:y}=e,m=n??Po,b=t.length,v=d(()=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n];void 0!==o&&o.length>e&&(e=o.length)}return e},[t]),S=p?20:0,k=y?24:0,w=d(()=>{const e=r-2*h-S,t=i-2*h-S-k;return 0===b||0===v?{cellWidth:0,cellHeight:0}:{cellWidth:Math.max(0,(e-l*(v-1))/v),cellHeight:Math.max(0,(t-l*(b-1))/b)}},[r,i,h,b,v,l,S,k]),$=s(e=>{const t=m[e];return void 0!==t?t:"#666"},[m]),M=s(()=>o("rect",{key:"bg",x:"0",y:"0",width:String(r),height:String(i),fill:u}),[r,i,u]),C=s(()=>y?[o("text",{key:"title",x:String(r/2),y:String(h+14),"text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"#e2e8f0"},y)]:[],[y,r,h]),z=s(()=>{if(!c||0===b||0===v)return[];const{cellWidth:e,cellHeight:t}=w,n=h+S,r=h+S+k,i=v*e+(v-1)*l,a=b*t+(b-1)*l,s=[];for(let t=0;t<=v;t++){const i=n+t*(e+l)-l/2;s.push(o("line",{key:`vgrid-${t}`,x1:String(i),y1:String(r-l/2),x2:String(i),y2:String(r+a+l/2),stroke:f,"stroke-width":"0.5"}))}for(let e=0;e<=b;e++){const a=r+e*(t+l)-l/2;s.push(o("line",{key:`hgrid-${e}`,x1:String(n-l/2),y1:String(a),x2:String(n+i+l/2),y2:String(a),stroke:f,"stroke-width":"0.5"}))}return s},[c,b,v,w,h,S,k,l,f]),I=s(()=>{if(!p||0===b||0===v)return[];const{cellWidth:e,cellHeight:t}=w,n=h+S,r=h+S+k,i=[];for(let t=0;t<v;t++){const a=n+t*(e+l)+e/2,s=r-6;i.push(o("text",{key:`col-idx-${t}`,x:String(a),y:String(s),"text-anchor":"middle","font-size":"10","font-family":"monospace",fill:"#94a3b8"},String(t)))}for(let e=0;e<b;e++){const a=n-6,s=r+e*(t+l)+t/2+3;i.push(o("text",{key:`row-idx-${e}`,x:String(a),y:String(s),"text-anchor":"end","font-size":"10","font-family":"monospace",fill:"#94a3b8"},String(e)))}return i},[p,b,v,w,h,S,k,l]),A=s(()=>{if(0===b||0===v)return[];const{cellWidth:e,cellHeight:n}=w,r=h+S,i=h+S+k,s=[];for(let d=0;d<b;d++){const c=t[d];if(void 0!==c)for(let t=0;t<v;t++){const f=t<c.length?c[t]:0,p=r+t*(e+l),u=i+d*(n+l),h=$(f),y={key:`cell-${d}-${t}`,x:String(p),y:String(u),width:String(e),height:String(n),fill:h,rx:String(a),ry:String(a)};if(g){const e=d,n=t,o=f;y.onClick=()=>g(e,n,o),y.role="button",y.tabIndex=0}if(x){const e=d,n=t,o=f;y.onMouseEnter=()=>x(e,n,o)}s.push(o("rect",y))}}return s},[b,v,t,w,h,S,k,l,a,$,g,x]),F=M(),R=C(),D=z(),L=I(),N=A();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":y?`${y} — ${b}x${v} discrete grid`:`${b}x${v} discrete grid`},F,...R,...D,...L,...N)},exports.Drawer=function(e){const{open:t,onClose:n,position:r="right",size:i="320px",title:s,overlay:d=!0,closeOnOverlay:f=!0,closeOnEscape:p=!0,children:u}=e,[h,g]=l(!1),[x,y]=l(!1),m=c(null),b=s?"drawer-title":void 0;if(a(()=>{if(!t){y(!1);const e=setTimeout(()=>g(!1),300);return()=>clearTimeout(e)}g(!0),requestAnimationFrame(()=>y(!0))},[t]),a(()=>{if(!t||!p)return;const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,p,n]),a(()=>{if(!t)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),a(()=>{t&&m.current&&m.current.focus()},[t]),!h)return null;const v={position:"fixed",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:"10000",opacity:x?"1":"0",transition:"opacity 0.3s ease"},S={...Ue(r,i),transform:Oe(r,x),transition:"transform 0.3s ease"},k=[];s&&k.push(o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e7eb",flexShrink:"0"}},o("h3",{id:b,style:{margin:"0",fontSize:"16px",fontWeight:"600",color:"#111827"}},s),o("button",{type:"button",style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#6b7280",padding:"4px 8px",lineHeight:"1"},onClick:n,"aria-label":"Close drawer"},"×"))),k.push(o("div",{style:{padding:"20px",overflow:"auto",flex:"1"}},u));const w=[];return d&&w.push(o("div",{style:v,onClick:()=>{f&&n()}})),w.push(o("div",{ref:m,style:S,role:"dialog","aria-modal":"true","aria-labelledby":b,tabIndex:-1},...k)),o("div",null,...w)},exports.Dropdown=function(e){const{label:t,items:n,triggerStyle:r,menuStyle:i,itemStyle:d={},placement:f="bottom-start",closeOnSelect:p=!0,width:u="220px"}=e,[h,g]=l(!1),x=c(null),y=s(()=>{g(e=>!e)},[]),m=s(()=>{g(!1)},[]);a(()=>{if(!h)return;const e=e=>{const t=x.current;t&&!t.contains(e.target)&&g(!1)};return document.addEventListener("click",e,!0),()=>{document.removeEventListener("click",e,!0)}},[h]),a(()=>{if(!h)return;const e=e=>{"Escape"===e.key&&g(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h]);const b=o("button",{type:"button",style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"8px 16px",fontSize:"14px",fontFamily:"inherit",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"#ffffff",color:"#1f2937",cursor:"pointer",outline:"none",...r??{}},onClick:y,"aria-haspopup":"true","aria-expanded":String(h)},o("span",null,t),o("span",{style:{marginLeft:"4px",fontSize:"10px",transition:"transform 0.15s",transform:h?"rotate(180deg)":"rotate(0deg)"},"aria-hidden":"true"},"▼")),v={position:"absolute",top:"100%",..."bottom-end"===f?{right:"0"}:{left:"0"},marginTop:"4px",zIndex:"999"},S={boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"1px solid #e5e7eb",borderRadius:"6px",padding:"4px 0",width:"number"==typeof u?`${u}px`:u,backgroundColor:"#ffffff",...i??{}},k=h?o("div",{style:v},o(ke,{orientation:"vertical",role:"menu",ariaLabel:`${t} menu`,styling:S},...n.map(e=>o(Ie,{key:e.id,item:e,itemStyle:d,closeOnSelect:p,onClose:m})))):null;return o("div",{ref:x,style:{position:"relative",display:"inline-block"}},b,k)},exports.EmptyState=function(e){return o("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"48px 24px",gap:"16px"}},e.image?o("img",{src:e.image,alt:"",style:{maxWidth:"200px",maxHeight:"160px",objectFit:"contain"}}):null,e.icon?o("div",{style:{fontSize:"48px",lineHeight:"1"}},e.icon):null,e.title?o("h3",{style:{margin:"0",fontSize:"20px",fontWeight:"600",color:"#111827",lineHeight:"1.4"}},e.title):null,e.description?o("p",{style:{margin:"0",fontSize:"14px",color:"#6b7280",maxWidth:"360px",lineHeight:"1.6"}},e.description):null,e.action?o("button",{onclick:e.action.onClick,style:{marginTop:"8px",padding:"10px 24px",fontSize:"14px",fontWeight:"500",color:"#ffffff",backgroundColor:"#3b82f6",border:"none",borderRadius:"6px",cursor:"pointer"}},e.action.label):null)},exports.FileUpload=function(e){const t=e.id??`fu-${Math.random().toString(36).slice(2,8)}`,{onChange:n,accept:r,multiple:i=!1,maxSize:a,disabled:d=!1,label:f,helpText:p}=e,[u,h]=l([]),[g,x]=l(!1),[y,m]=l(""),b=c(null),v=s(e=>{m("");const t=[];for(const n of e)a&&n.size>a?m(`File "${n.name}" exceeds maximum size of ${fe(a)}`):t.push(n);const o=i?[...u,...t]:t.slice(0,1);h(o),n(o)},[u,i,a,n]),S=s(e=>{if(e.preventDefault(),e.stopPropagation(),x(!1),d)return;const t=e.dataTransfer;if(!t)return;const n=Array.from(t.files);v(n)},[d,v]),k=s(e=>{e.preventDefault(),e.stopPropagation(),d||x(!0)},[d]),w=s(e=>{e.preventDefault(),e.stopPropagation(),x(!1)},[]),$=s(e=>{const t=e.target;t.files&&(v(Array.from(t.files)),t.value="")},[v]),M=s(e=>{const t=u.filter((t,n)=>n!==e);h(t),n(t)},[u,n]),C=s(()=>{d||b.current&&b.current.click()},[d]),z={border:"2px dashed "+(g?"#3b82f6":y?"#ef4444":"#d1d5db"),borderRadius:"8px",padding:"24px",textAlign:"center",cursor:d?"not-allowed":"pointer",backgroundColor:g?"#eff6ff":"#fafafa",transition:"all 0.15s",opacity:d?"0.6":"1"},I={fontSize:"12px",color:"#9ca3af"},A=o("input",{id:t,ref:b,type:"file",accept:r,multiple:i,onChange:$,disabled:d,style:{display:"none"},tabIndex:-1}),F=o("div",{style:z,onClick:C,onKeyDown:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),C())},onDrop:S,onDragOver:k,onDragLeave:w,role:"button",tabIndex:d?-1:0,"aria-label":"Upload files"},o("div",{style:{fontSize:"28px",color:"#9ca3af",marginBottom:"8px"}},"↑"),o("div",{style:{fontSize:"14px",color:"#374151",marginBottom:"4px"}},o("span",{style:{color:"#3b82f6",fontWeight:"500"}},"Click to upload")," or drag and drop"),r?o("div",{style:I},r):null,a?o("div",{style:I},`Max size: ${fe(a)}`):null),R=u.length>0?o("div",{style:{marginTop:"8px",display:"flex",flexDirection:"column",gap:"4px"}},...u.map((e,t)=>o("div",{key:`file-${t}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",backgroundColor:"#f9fafb",borderRadius:"6px",border:"1px solid #e5e7eb",fontSize:"13px"}},o("div",{style:{display:"flex",alignItems:"center",gap:"8px",overflow:"hidden"}},o("span",{style:{color:"#374151",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.name),o("span",{style:{color:"#9ca3af",fontSize:"11px",flexShrink:"0"}},fe(e.size))),o("button",{type:"button",style:{background:"none",border:"none",cursor:"pointer",color:"#ef4444",fontSize:"14px",padding:"2px 6px",borderRadius:"4px"},onClick:e=>{e.stopPropagation(),M(t)},"aria-label":`Remove ${e.name}`},"✕")))):null;return o(te,{label:f,helpText:p,error:y||void 0,disabled:d,htmlFor:t},o("div",null,A,F,R))},exports.FlexContainer=function(e){const t=d(()=>{const t={display:e.inline?"inline-flex":"flex"};return e.direction&&(t.flexDirection=e.direction),e.wrap&&(t.flexWrap=e.wrap),e.gap&&(t.gap=e.gap),e.alignItems&&(t.alignItems=e.alignItems),e.justifyContent&&(t.justifyContent=e.justifyContent),{...t,...e.style??{}}},[e.direction,e.wrap,e.gap,e.alignItems,e.justifyContent,e.inline,e.style]);return o("div",{className:`flex-container ${e.className??""}`.trim(),style:t},e.children)},exports.FlexItem=function(e){const t=d(()=>{const t={};return e.flex&&(t.flex=e.flex),void 0!==e.grow&&(t.flexGrow=String(e.grow)),void 0!==e.shrink&&(t.flexShrink=String(e.shrink)),e.basis&&(t.flexBasis=e.basis),e.alignSelf&&(t.alignSelf=e.alignSelf),void 0!==e.order&&(t.order=String(e.order)),{...t,...e.style??{}}},[e.flex,e.grow,e.shrink,e.basis,e.alignSelf,e.order,e.style]);return o("div",{className:`flex-item ${e.className??""}`.trim(),style:t},e.children)},exports.Footer=function(e){const{left:t,center:n,right:r,borderTop:i="1px solid var(--color-border, #e2e8f0)",background:l="var(--color-bg, transparent)",color:a="var(--color-text-muted, #64748b)",fontSize:s="13px",padding:d="24px",maxWidth:c="1200px",className:f,ariaLabel:p="Site footer"}=e;return o("footer",{className:f,role:"contentinfo","aria-label":p,style:{borderTop:i,background:l,color:a,fontSize:s,padding:d,marginTop:"48px"}},o("div",{style:{maxWidth:c,margin:"0 auto",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"}},o("div",{style:{flex:"1",textAlign:"left",minWidth:"150px"}},t??null),o("div",{style:{flex:"1",textAlign:"center",minWidth:"150px"}},n??null),o("div",{style:{flex:"1",textAlign:"right",minWidth:"150px"}},r??null)))},exports.ForceGraph=function(e){const{nodes:t,edges:n,width:r=600,height:i=400,nodeRadius:f=12,nodeStrokeWidth:p=2,solidNodes:u=!0,showLabels:h=!0,showArrows:g=!1,repulsionForce:x=300,attractionForce:y=.01,damping:m=.9,edgeLength:b=100,edgeColor:v="#94a3b8",edgeWidth:S=1.5,title:k,customForce:w,trails:$}=e;if(!t||0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":k??"Empty force-directed graph"},k?o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},k):o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const M=c(Gn(t,r,i)),[C,z]=l(0),I=c(!0),A=c(!1),F=c(n);F.current=n;const R=c(w);R.current=w;const D=c(null),L=c({repulsionForce:x,attractionForce:y,damping:m,edgeLength:b,width:r,height:i,nodeRadius:f,solidNodes:u});L.current={repulsionForce:x,attractionForce:y,damping:m,edgeLength:b,width:r,height:i,nodeRadius:f,solidNodes:u};const N=c(new Map);a(()=>{M.current=Gn(t,r,i),A.current=!1,I.current=!0,N.current=new Map,z(e=>e+1)},[t.length]),a(()=>{let e=0;const t=()=>{if(!I.current)return;const n=L.current,o=R.current;let r;if(o?(r=o(M.current,F.current,n.width,n.height,D.current),n.solidNodes&&Vn(r,n.nodeRadius)):r=function(e,t,n,o,r,i,l,a,s=12){const d=e.length;if(0===d)return e;const c=new Map;for(let t=0;t<d;t++)c.set(e[t].id,t);const f=new Float64Array(d),p=new Float64Array(d);for(let t=0;t<d;t++){const n=e[t];for(let o=t+1;o<d;o++){const i=e[o];let l=n.x-i.x,a=n.y-i.y,s=l*l+a*a;s<1&&(s=1);const d=Math.sqrt(s),c=r/s,u=l/d*c,h=a/d*c;f[t]+=u,p[t]+=h,f[o]-=u,p[o]-=h}}for(let n=0;n<t.length;n++){const o=t[n],r=c.get(o.source),l=c.get(o.target);if(void 0===r||void 0===l)continue;const s=e[r],d=e[l],u=d.x-s.x,h=d.y-s.y,g=Math.sqrt(u*u+h*h);if(g<.1)continue;const x=i*(g-a)*(o.weight??1),y=u/g*x,m=h/g*x;f[r]+=y,p[r]+=m,f[l]-=y,p[l]-=m}const u=n/2,h=o/2;for(let t=0;t<d;t++){const n=e[t];f[t]+=.001*(u-n.x),p[t]+=.001*(h-n.y)}const g=[];for(let t=0;t<d;t++){const r=e[t];if(r.fixed){g.push({...r,vx:0,vy:0});continue}let i=(r.vx+f[t])*l,a=(r.vy+p[t])*l;const s=Math.sqrt(i*i+a*a),d=10;s>d&&(i=i/s*d,a=a/s*d);let c=r.x+i,u=r.y+a;c=Math.max(20,Math.min(n-20,c)),u=Math.max(20,Math.min(o-20,u)),g.push({...r,x:c,y:u,vx:i,vy:a})}return Vn(g,s),g}(M.current,F.current,n.width,n.height,n.repulsionForce,n.attractionForce,n.damping,n.edgeLength,n.nodeRadius),M.current=r,$)for(let e=0;e<$.length;e++){const t=$[e],n=r.find(e=>e.id===t.nodeId);if(!n)continue;let o=N.current.get(t.nodeId);o||(o=[],N.current.set(t.nodeId,o)),o.push({x:n.x,y:n.y});const i=t.maxPoints??200;o.length>i&&o.splice(0,o.length-i)}if(!o&&function(e){let t=0;for(let n=0;n<e.length;n++){const o=e[n];t+=o.vx*o.vx+o.vy*o.vy}return t}(r)<.01)return A.current=!0,void z(e=>e+1);z(e=>e+1),e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>{I.current=!1,cancelAnimationFrame(e)}},[]);const T=M.current,W=s(e=>{M.current=M.current.map(t=>t.id===e?{...t,fixed:!t.fixed,vx:0,vy:0}:t),A.current&&(A.current=!1,I.current=!0,z(e=>e+1))},[]),B=c(null),E=c(null),P=s(e=>{const t=e,n=E.current;if(!n)return{x:t.clientX,y:t.clientY};const o=n.getBoundingClientRect(),l=r/o.width,a=i/o.height;return{x:(t.clientX-o.left)*l,y:(t.clientY-o.top)*a}},[r,i]),H=c(!1),j=s((e,t)=>{t.stopPropagation(),B.current=e;const n=M.current.find(t=>t.id===e);H.current=n?.fixed??!1,M.current=M.current.map(t=>t.id===e?{...t,fixed:!0,vx:0,vy:0}:t)},[]),Y=s(e=>{const t=P(e);if(D.current={x:t.x,y:t.y},!B.current)return;const n=B.current;M.current=M.current.map(e=>e.id===n?{...e,x:Math.max(20,Math.min(r-20,t.x)),y:Math.max(20,Math.min(i-20,t.y))}:e),A.current&&(A.current=!1,I.current=!0),z(e=>e+1)},[r,i,P]),_=s(()=>{const e=B.current;e&&(M.current=M.current.map(t=>t.id===e?{...t,fixed:H.current}:t)),B.current=null},[]),q=s(()=>{B.current=null,D.current=null},[]),O=d(()=>{const e=new Map;for(let t=0;t<T.length;t++)e.set(T[t].id,T[t]);return e},[C]),U=s(()=>g?[o("defs",{key:"arrow-defs"},o("marker",{key:"arrowhead",id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:String(10+f),refY:"3.5",orient:"auto",markerUnits:"userSpaceOnUse"},o("polygon",{key:"arrow-poly",points:"0 0, 10 3.5, 0 7",fill:v})))]:[],[g,f,v]),G=s(()=>{const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=O.get(r.source),l=O.get(r.target);if(!i||!l)continue;if(void 0!==r.weight&&r.weight<=0)continue;const a=r.weight?Math.max(.5,Math.min(6,S*r.weight)):S,s={key:`edge-${t}`,x1:String(i.x),y1:String(i.y),x2:String(l.x),y2:String(l.y),stroke:r.color??v,"stroke-width":String(a),"stroke-opacity":"0.6"};g&&(s["marker-end"]="url(#arrowhead)"),e.push(o("line",s))}return e},[C,v,S,g]),V=s(()=>{const e=[];for(let t=0;t<T.length;t++){const n=T[t];e.push(o("circle",{key:`node-${n.id}`,cx:String(n.x),cy:String(n.y),r:String(f),fill:n.color,stroke:n.fixed?"#0f172a":"#fff","stroke-width":n.fixed?"3":String(p),style:{cursor:B.current===n.id?"grabbing":"grab"},onMouseDown:e=>j(n.id,e),onDblClick:()=>W(n.id),role:"button",tabIndex:0,"aria-label":`Node: ${n.label}${n.fixed?" (locked)":""} — drag to move, double-click to lock`})),h&&e.push(o("text",{key:`label-${n.id}`,x:String(n.x),y:String(n.y+f+14),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151","pointer-events":"none"},n.label))}return e},[C,f,h,W]),X=s(()=>k?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},k)]:[],[k,r]),K=s(()=>{if(!$||0===$.length)return[];const e=[];for(let t=0;t<$.length;t++){const n=$[t],r=N.current.get(n.nodeId);if(!r||r.length<2)continue;const i=[];for(let e=0;e<r.length;e++){const t=r[e];i.push(`${0===e?"M":"L"}${t.x.toFixed(1)},${t.y.toFixed(1)}`)}e.push(o("path",{key:`trail-${n.nodeId}`,d:i.join(" "),fill:"none",stroke:n.color??"#3b82f6","stroke-width":String(n.width??1),opacity:String(n.opacity??.5),"stroke-linecap":"round","stroke-linejoin":"round"}))}return e},[C,$]),Z=U(),J=K(),Q=G(),ee=V(),te=X();return o("svg",{ref:E,width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":k??"Force-directed graph — drag nodes to move, double-click to lock",style:{fontFamily:"sans-serif",cursor:B.current?"grabbing":"default"},onMouseMove:Y,onMouseUp:_,onMouseLeave:q},...Z,...te,...J,...Q,...ee)},exports.FormFieldWrapper=te,exports.FunnelChart=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",showLabels:l=!0,showValues:a=!0,showPercentage:c=!0,gapSize:f=2,colors:p=Xn,title:u}=e,h="vertical"===i,g=u?30:0,x=d(()=>{let e=0;for(let n=0;n<t.length;n++)t[n].value>e&&(e=t[n].value);return e>0?e:1},[t]),y=s(e=>0===x?0:Math.max(.05,e/x),[x]),m=s((e,t)=>t||(p[e%p.length]??Xn[0]),[p]),b=s(()=>{if(0===t.length)return[];const e=[],i=n-80-120,s=r-g-80,d=f*(t.length-1),p=Math.max(1,(s-d)/t.length),u=40+i/2;for(let n=0;n<t.length;n++){const r=t[n],s=n<t.length-1?t[n+1]:null,d=m(n,r.color),h=y(r.value),x=i/2*h,b=i/2*(null!==s?y(s.value):.6*h),v=g+40+n*(p+f),S=`${u-x},${v} ${u+x},${v} ${u+b},${v+p} ${u-b},${v+p}`;e.push(o("polygon",{key:`section-${n}`,points:S,fill:d,stroke:"#fff","stroke-width":"1"}));const k=40+i+12,w=v+p/2;if(l&&e.push(o("text",{key:`label-${n}`,x:String(k),y:String(w-(a||c?6:0)),"text-anchor":"start","font-size":"12","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},r.label)),a||c){let i="";if(a&&(i=String(r.value)),c&&t.length>0){const e=t[0].value,n=e>0?Math.round(r.value/e*100):0;i+=a?` (${n}%)`:`${n}%`}e.push(o("text",{key:`value-${n}`,x:String(k),y:String(w+(l?10:4)),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},i))}}return e},[t,n,r,g,f,l,a,c,m,y,120]),v=s(()=>{if(0===t.length)return[];const e=[],i=n-80,s=r-g-80-40,d=f*(t.length-1),p=Math.max(1,(i-d)/t.length),u=g+40+s/2;for(let n=0;n<t.length;n++){const r=t[n],i=n<t.length-1?t[n+1]:null,d=m(n,r.color),h=y(r.value),x=s/2*h,b=s/2*(null!==i?y(i.value):.6*h),v=40+n*(p+f),S=`${v},${u-x} ${v+p},${u-b} ${v+p},${u+b} ${v},${u+x}`;e.push(o("polygon",{key:`section-${n}`,points:S,fill:d,stroke:"#fff","stroke-width":"1"}));const k=v+p/2,w=g+40+s+14;if(l&&e.push(o("text",{key:`label-${n}`,x:String(k),y:String(w),"text-anchor":"middle","font-size":"11","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},r.label)),a||c){let i="";if(a&&(i=String(r.value)),c&&t.length>0){const e=t[0].value,n=e>0?Math.round(r.value/e*100):0;i+=a?` (${n}%)`:`${n}%`}e.push(o("text",{key:`value-${n}`,x:String(k),y:String(w+14),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#6b7280"},i))}}return e},[t,n,r,g,f,l,a,c,m,y]),S=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},u)]:[],[u,n]),k=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),w=S(),$=h?b():v(),M=k();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Funnel chart",style:{fontFamily:"sans-serif"}},...w,...$,...M)},exports.GanttChart=function(e){const{tasks:t=[],width:n=800,height:r,barHeight:i=24,barGap:l=8,showGrid:a=!0,showLabels:c=!0,showProgress:f=!1,timeUnit:p="days",title:u,padding:h=50}=e;if(0===t.length)return o("svg",{width:"100%",height:String(r??100),viewBox:`0 0 ${n} ${r??100}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Empty Gantt chart"},o("text",{x:String(n/2),y:String((r??100)/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.4"},"No tasks to display"));const g=c?120:0,x=d(()=>{let e=1/0,n=-1/0;for(const o of t){o.start<e&&(e=o.start);const t=o.start+o.duration;t>n&&(n=t)}return e===1/0&&(e=0,n=1),{min:e,max:n,range:n-e}},[t]),y=d(()=>{const e=t.slice();return e.sort((e,t)=>e.group!==t.group?(e.group??"").localeCompare(t.group??""):e.start-t.start),e},[t]),m=r??2*h+y.length*(i+l)+l+20,b=n-h-g-h,v=h+(u?20:0),S=s(e=>0===x.range?g+h:g+h+(e-x.min)/x.range*b,[x,b,g,h]),k=s(()=>{if(!a)return[];const e=[],t=Zn(x.range),n=Math.ceil(x.min/t)*t,r=v+y.length*(i+l)+l;for(let i=n;i<=x.max;i+=t){const t=S(i);e.push(o("line",{key:`grid-${i}`,x1:String(t),y1:String(v),x2:String(t),y2:String(r),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"}))}return e},[a,x,v,y.length,i,l,S]),w=s(()=>{const e=[],t=Zn(x.range),r=Math.ceil(x.min/t)*t,i=v-8;for(let n=r;n<=x.max;n+=t){const t=S(n);e.push(o("text",{key:`taxis-${n}`,x:String(t),y:String(i),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},String(n)))}return e.push(o("text",{key:"time-unit",x:String(n-h),y:String(i),"text-anchor":"end","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.4","font-style":"italic"},p)),e},[x,v,S,p,n,h]),$=s(()=>{const e=[];let t="";for(let n=0;n<y.length;n++){const r=y[n],a=v+n*(i+l)+l,s=S(r.start),d=Math.max(2,S(r.start+r.duration)-s),p=Jn(n,r.color);r.group&&r.group!==t&&(t=r.group,c&&e.push(o("text",{key:`group-${n}`,x:String(h),y:String(a+i/2-12),"font-size":"9","font-family":"sans-serif","font-weight":"bold",fill:"currentColor",opacity:"0.4","text-transform":"uppercase"},r.group))),e.push(o("rect",{key:`bar-${r.id}`,x:String(s),y:String(a),width:String(d),height:String(i),rx:"4",ry:"4",fill:p,role:"graphics-symbol","aria-label":`${r.label}: start ${r.start}, duration ${r.duration}`})),c&&e.push(o("text",{key:`label-${r.id}`,x:String(g+h-8),y:String(a+i/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"currentColor"},r.label.length>16?r.label.substring(0,14)+"..":r.label)),f&&d>30&&e.push(o("text",{key:`prog-${r.id}`,x:String(s+d/2),y:String(a+i/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#ffffff"},`${r.start}-${r.start+r.duration}`))}return e},[y,v,i,l,S,c,f,g,h]),M=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(h/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},u)]:[],[u,n,h]),C=k(),z=w(),I=$(),A=M();return o("svg",{width:"100%",height:String(m),viewBox:`0 0 ${n} ${m}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Gantt chart",style:{fontFamily:"sans-serif"}},...A,...C,...z,...I)},exports.Gauge=function(e){const{value:t,min:n=0,max:r=100,width:i=300,height:l=200,startAngle:a=-135,endAngle:d=135,arcWidth:c=20,showValue:f=!0,showMinMax:p=!0,showTicks:u=!0,tickCount:h=10,label:g,unit:x,colors:y=["#22c55e","#f59e0b","#ef4444"],needleColor:m="#374151",backgroundColor:b="#e5e7eb"}=e,v=isFinite(n)&&!isNaN(n)?n:0,S=isFinite(r)&&!isNaN(r)&&r>v?r:v+100,k=isFinite(t)&&!isNaN(t)?function(e,t,n){return e<t?t:e>n?n:e}(t,v,S):v,w=(f?24:0)+(g?18:0),$=i/2,M=.6*(l-w),C=Math.min(i/2,.55*(l-w))-c/2-10,z=C-c,I=C-c/2,A=d-a,F=s(e=>{const t=S-v;return 0===t?a:a+(e-v)/t*A},[v,S,a,A]),R=s(()=>[o("path",{key:"bg-arc",d:to($,M,I,a,d),fill:"none",stroke:b,"stroke-width":String(c),"stroke-linecap":"round"})],[$,M,I,a,d,b,c]),D=s(()=>{if(0===y.length)return[];const e=[],t=A/y.length;for(let n=0;n<y.length;n++){const r=a+n*t,i=to($,M,I,r,r+t);e.push(o("path",{key:`seg-${n}`,d:i,fill:"none",stroke:y[n],"stroke-width":String(c),"stroke-linecap":0===n||n===y.length-1?"round":"butt",opacity:"0.85"}))}return e},[y,A,a,$,M,I,c]),L=s(()=>{if(!u||h<=0)return[];const e=[],t=Math.max(1,Math.min(h,100));for(let n=0;n<=t;n++){const r=n/t,i=a+r*A,l=n%2==0,s=l?10:6,d=eo($,M,C+4,i),c=eo($,M,C+4+s,i);if(e.push(o("line",{key:`tick-${n}`,x1:String(d.x),y1:String(d.y),x2:String(c.x),y2:String(c.y),stroke:"currentColor",opacity:"0.4","stroke-width":l?"2":"1"})),l){const t=v+r*(S-v),l=eo($,M,C+4+s+12,i);e.push(o("text",{key:`tick-label-${n}`,x:String(l.x),y:String(l.y+3),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(t)))}}return e},[u,h,a,A,$,M,C,v,S]),N=s(()=>{const e=[],t=F(k),n=eo($,M,z-8,t),r=t-90,i=eo($,M,6,t+90),l=eo($,M,6,r);return e.push(o("polygon",{key:"needle",points:`${n.x},${n.y} ${i.x},${i.y} ${l.x},${l.y}`,fill:m,stroke:"none"})),e.push(o("circle",{key:"needle-cap",cx:String($),cy:String(M),r:"8",fill:m,stroke:"#fff","stroke-width":"2"})),e},[k,F,$,M,z,m]),T=s(()=>{if(!f)return[];const e=[],t=no(k),n=t+(x?" "+x:""),r=M+I+20;return e.push(o("text",{key:"value-text",x:String($),y:String(r),"text-anchor":"middle","font-size":"22","font-weight":"bold","font-family":"sans-serif",fill:"currentColor","aria-label":`Value: ${n}`},t,x?o("tspan",{key:"unit","font-size":"14","font-weight":"normal",opacity:"0.6",fill:"currentColor"}," "+x):null)),e},[f,k,x,$,M,I]),W=s(()=>{if(!g)return[];const e=M+I+(f?40:20);return[o("text",{key:"label",x:String($),y:String(e),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},g)]},[g,$,M,I,f]),B=s(()=>{if(!p)return[];const e=[],t=eo($,M,I,a),n=eo($,M,I,d);return e.push(o("text",{key:"min-label",x:String(t.x-4),y:String(t.y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(v))),e.push(o("text",{key:"max-label",x:String(n.x+4),y:String(n.y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(S))),e},[p,$,M,I,a,d,v,S]),E=R(),P=D(),H=L(),j=N(),Y=T(),_=W(),q=B(),O=`Gauge: ${no(k)}${x?" "+x:""}, range ${no(v)} to ${no(S)}${g?", "+g:""}`;return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"meter","aria-valuenow":String(k),"aria-valuemin":String(v),"aria-valuemax":String(S),"aria-label":O,style:{fontFamily:"sans-serif"}},...E,...P,...H,...j,...Y,..._,...q)},exports.GoogleAnalytics=function(e){const{measurementId:t,disabled:n=!1,debug:o=!1,anonymizeIp:r=!1,config:i}=e;return a(()=>{if(n||"undefined"==typeof window)return;!function(e){if("undefined"==typeof document)return;const t="specifyjs-gtag";if(document.getElementById(t))return;const n=document.createElement("script");n.id=t,n.async=!0,n.src=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(e)}`,document.head.appendChild(n)}(t),"undefined"!=typeof window&&(window.dataLayer=window.dataLayer||[],window.gtag||(window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date)));const e={...i};return r&&(e.anonymize_ip=!0),o&&(e.debug_mode=!0),window.gtag&&window.gtag("config",t,e),()=>{const e=document.getElementById("specifyjs-gtag");e&&e.remove()}},[t,n,o,r]),null},exports.Grid=function(e){const t=d(()=>{const t={display:"grid"};return e.minColWidth?t.gridTemplateColumns=`repeat(auto-fit, minmax(${e.minColWidth}, 1fr))`:void 0!==e.columns&&(t.gridTemplateColumns="number"==typeof e.columns?`repeat(${e.columns}, 1fr)`:e.columns),e.rows&&(t.gridTemplateRows=e.rows),e.gap&&(t.gap=e.gap),e.alignItems&&(t.alignItems=e.alignItems),e.justifyItems&&(t.justifyItems=e.justifyItems),e.areas&&e.areas.length>0&&(t.gridTemplateAreas=e.areas.map(e=>`"${e}"`).join(" ")),{...t,...e.style??{}}},[e.columns,e.rows,e.gap,e.alignItems,e.justifyItems,e.minColWidth,e.areas,e.style]);return o("div",{className:`grid ${e.className??""}`.trim(),style:t},e.children)},exports.GridItem=function(e){const t=d(()=>{const t={};return e.gridColumn&&(t.gridColumn=e.gridColumn),e.gridRow&&(t.gridRow=e.gridRow),e.gridArea&&(t.gridArea=e.gridArea),e.alignSelf&&(t.alignSelf=e.alignSelf),e.justifySelf&&(t.justifySelf=e.justifySelf),{...t,...e.style??{}}},[e.gridColumn,e.gridRow,e.gridArea,e.alignSelf,e.justifySelf,e.style]);return o("div",{className:`grid-item ${e.className??""}`.trim(),style:t},e.children)},exports.HeatMap=function(e){const{data:t=[],rowLabels:n,columnLabels:r,width:i=600,height:l=400,colorScale:a=ao,minValue:c,maxValue:f,showValues:p=!1,cellBorderColor:u="#fff",cellBorderWidth:h=1,title:g,padding:x=60}=e,y=t.length,m=d(()=>{let e=0;for(const n of t)n.length>e&&(e=n.length);return e},[t]),{minVal:b,maxVal:v}=d(()=>{let e=c??1/0,n=f??-1/0;for(const o of t)for(const t of o)void 0===c&&t<e&&(e=t),void 0===f&&t>n&&(n=t);return e===1/0&&(e=0),n===-1/0&&(n=1),e===n&&(n=e+1),{minVal:e,maxVal:n}},[t,c,f]),S=g?30:0,k=n?x:20,w=m>0?(i-k-20)/m:0,$=y>0?(l-S-(r?x:20)-20)/y:0,M=s(()=>{const e=[];for(let n=0;n<y;n++){const r=t[n];for(let t=0;t<m;t++){const i=t<r.length?r[t]:0,l=io((i-b)/(v-b),a),s=k+t*w,d=S+20+n*$;if(e.push(o("rect",{key:`cell-${n}-${t}`,x:String(s),y:String(d),width:String(w),height:String($),fill:l,stroke:u,"stroke-width":String(h)})),p){const r=lo(l)>.5?"#111827":"#ffffff";e.push(o("text",{key:`val-${n}-${t}`,x:String(s+w/2),y:String(d+$/2),"text-anchor":"middle","dominant-baseline":"central","font-size":String(Math.min(11,.3*w,.4*$)),"font-family":"sans-serif",fill:r},String(Math.round(100*i)/100)))}}}return e},[t,y,m,b,v,a,w,$,k,S,p,u,h]),C=s(()=>{const e=[];if(n)for(let t=0;t<y;t++){const r=t<n.length?n[t]:"",i=S+20+t*$+$/2;e.push(o("text",{key:`row-label-${t}`,x:String(k-8),y:String(i),"text-anchor":"end","dominant-baseline":"central","font-size":"11","font-family":"sans-serif",fill:"currentColor"},r))}if(r)for(let t=0;t<m;t++){const n=t<r.length?r[t]:"",i=k+t*w+w/2,l=S+20+y*$+16;e.push(o("text",{key:`col-label-${t}`,x:String(i),y:String(l),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}return e},[n,r,y,m,w,$,k,S]),z=s(()=>g?[o("text",{key:"title",x:String(i/2),y:"22","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},g)]:[],[g,i]);if(0===y||0===m)return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":g??"Heat map — no data"},o("text",{x:String(i/2),y:String(l/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const I=z(),A=M(),F=C();return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":g??"Heat map",style:{fontFamily:"sans-serif"}},...I,...A,...F)},exports.Histogram=function(e){const{data:t=[],bins:n=10,width:r=600,height:i=400,barColor:l="#3b82f6",barGap:a=2,showGrid:c=!0,showValues:f=!0,title:p,xLabel:u,yLabel:h,padding:g=60}=e,x=Math.max(1,Math.round(n)),y=d(()=>function(e,t){if(0===e.length)return[];let n=e[0],o=e[0];for(let t=1;t<e.length;t++){const r=e[t];r<n&&(n=r),r>o&&(o=r)}if(n===o)return[{min:n,max:o+1,count:e.length}];const r=(o-n)/t,i=[];for(let e=0;e<t;e++)i.push({min:n+e*r,max:n+(e+1)*r,count:0});for(let o=0;o<e.length;o++){const l=e[o];let a=Math.floor((l-n)/r);a>=t&&(a=t-1),i[a].count++}return i}(t,x),[t,x]),m=d(()=>{let e=0;for(let t=0;t<y.length;t++)y[t].count>e&&(e=y[t].count);return e>0?e:1},[y]),b=r-2*g,v=i-2*g,S=s(()=>{if(!c)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(m),t=[];for(let n=e;n<=m;n+=e){const e=g+v-n/m*v;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(e),x2:String(g+b),y2:String(e),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(e+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}return t},[c,m,g,b,v]),k=s(()=>{const e=[];return e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+v),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+v),x2:String(g+b),y2:String(g+v),stroke:"#374151","stroke-width":"1.5"})),e},[g,b,v]),w=s(()=>{if(0===y.length)return[];const e=[],t=a*(y.length-1),n=Math.max(1,(b-t)/y.length);for(let t=0;t<y.length;t++){const r=y[t],i=r.count/m*v,s=g+t*(n+a),d=g+v-i;if(e.push(o("rect",{key:`bar-${t}`,x:String(s),y:String(d),width:String(n),height:String(i),fill:l})),f&&r.count>0&&e.push(o("text",{key:`val-${t}`,x:String(s+n/2),y:String(d-4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},String(r.count))),y.length<=15||t%2==0||t===y.length-1){const i=(y.length,so(r.min));e.push(o("text",{key:`xlabel-${t}`,x:String(s+n/2),y:String(g+v+14),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280"},i))}}if(y.length>0){const t=y[y.length-1],n=g+b;e.push(o("text",{key:"xlabel-end",x:String(n),y:String(g+v+14),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280"},so(t.max)))}return e},[y,m,a,l,f,g,b,v]),$=s(()=>{const e=[];return p&&e.push(o("text",{key:"title",x:String(r/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p)),u&&e.push(o("text",{key:"x-label",x:String(g+b/2),y:String(i-8),"text-anchor":"middle","font-size":"12","font-family":"sans-serif",fill:"#374151"},u)),h&&e.push(o("text",{key:"y-label",x:String(14),y:String(g+v/2),"text-anchor":"middle","font-size":"12","font-family":"sans-serif",fill:"#374151",transform:`rotate(-90 14 ${g+v/2})`},h)),e},[p,u,h,r,i,g,b,v]),M=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,r,i]),C=S(),z=k(),I=w(),A=$(),F=M();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Histogram",style:{fontFamily:"sans-serif"}},...A,...C,...z,...I,...F)},exports.HypercubeGraph=function(e){const t=e.dimension??4,n=e.width??600,r=e.height??600,i=e.vertexRadius??10,f=e.edgeWidth??3,p=e.edgeColor??"#111",u=e.perspective??.25,h=e.rotationSpeed??.008,g=e.showLabels??!1,x=e.backgroundColor??"transparent",y=e.scale??.3*Math.min(n,r),m=Dt(t),b=1<<t,v=d(()=>"auto"===e.vertexColors||void 0===e.vertexColors?Lt(b):e.vertexColors,[b,e.vertexColors]),[S,k]=l(()=>{const e=[];for(let t=0;t<m;t++)e.push(0);return e}),[w,$]=l(!1),M=c({x:0,y:0}),C=c([]),z=c(0);a(()=>{if(0===h)return;let e=!0;const t=()=>{e&&(k(e=>{const t=e.slice();for(let e=0;e<t.length;e++)t[e]=(t[e]??0)+h*(1+.3*e);return t}),z.current=requestAnimationFrame(t))};return z.current=requestAnimationFrame(t),()=>{e=!1,cancelAnimationFrame(z.current)}},[h]);const I=d(()=>Rt(t,S,u,y),[t,S,u,y]),A=n/2,F=r/2,R=d(()=>I.edges.map(e=>{const t=I.vertices[e.source],n=I.vertices[e.target],o=(t.depth+n.depth)/2;return{...e,avgDepth:o,sv:t,tv:n}}).sort((e,t)=>e.avgDepth-t.avgDepth),[I]),D=d(()=>I.vertices.slice().sort((e,t)=>e.depth-t.depth),[I]),L=s(e=>{const t=e;$(!0),M.current={x:t.clientX,y:t.clientY},C.current=S.slice()},[S]),N=s(e=>{if(!w)return;const t=e,n=.01*(t.clientX-M.current.x),o=.01*(t.clientY-M.current.y);k(()=>{const e=C.current.slice();return e.length>0&&(e[0]=(e[0]??0)+n),e.length>1&&(e[1]=(e[1]??0)+o),e})},[w]),T=s(()=>{$(!1)},[]),W=R.map((e,t)=>{const n=(e=>{const t=(e+2)/4;return.3+.7*Math.max(0,Math.min(1,t))})(e.avgDepth);return o("line",{key:`e-${e.source}-${e.target}`,x1:String(A+e.sv.x),y1:String(F+e.sv.y),x2:String(A+e.tv.x),y2:String(F+e.tv.y),stroke:p,"stroke-width":String(f),"stroke-opacity":String(n),"stroke-linecap":"round"})}),B=D.map(e=>{const n=i*(e=>{const t=(e+2)/4;return.6+.4*Math.max(0,Math.min(1,t))})(e.depth),r=v[e.id%v.length]??"#3b82f6",l=[o("circle",{key:`v-${e.id}-circle`,cx:String(A+e.x),cy:String(F+e.y),r:String(n),fill:r,stroke:"#000","stroke-width":"1.5",style:{filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.3))"}})];return g&&l.push(o("text",{key:`v-${e.id}-label`,x:String(A+e.x),y:String(F+e.y+n+14),"text-anchor":"middle","font-size":"11","font-family":"monospace",fill:"#555"},e.id.toString(2).padStart(t,"0"))),l});return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",style:{backgroundColor:x,cursor:w?"grabbing":"grab",userSelect:"none"},onMouseDown:L,onMouseMove:N,onMouseUp:T,onMouseLeave:T},...W,...B.flat())},exports.IDE=function(e){const[t,n]=l("App.ts"),[r,i]=l({src:!0,components:!0,hooks:!0}),[a,f]=l(-1),[p,u]=l(Vt.length),h=c(null),g=s(e=>{n(e);const t=Gt[e];t&&u(t.length)},[]),x=s(e=>{i(t=>{const n={},o=Object.keys(t);for(let e=0;e<o.length;e++)n[o[e]]=t[o[e]];return n[e]=!t[e],n})},[]),y=s(e=>{f(t=>t===e?-1:e)},[]),m=s(e=>{switch(e){case"undo":document.execCommand("undo",!1);break;case"redo":document.execCommand("redo",!1);break;case"cut":document.execCommand("cut",!1);break;case"copy":document.execCommand("copy",!1);break;case"paste":document.execCommand("paste",!1);break;case"newFile":h.current&&(h.current.textContent="",u(1))}f(-1),h.current&&h.current.focus()},[]),b=s(()=>{if(h.current){const e=(h.current.textContent??"").split("\n");u(Math.max(e.length,1))}},[]),v=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",color:"#cccccc",backgroundColor:"#1e1e1e",overflow:"hidden"}),[]),S={padding:"3px 8px",fontSize:"12px",color:"#cccccc",cursor:"pointer",borderRadius:"3px",backgroundColor:"transparent",border:"none",position:"relative"},k={...S,backgroundColor:"rgba(255,255,255,0.1)"},w={position:"absolute",top:"100%",left:"0",minWidth:"180px",backgroundColor:"#2d2d2d",border:"1px solid #454545",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.4)",padding:"4px 0",zIndex:"1000"},$={display:"block",width:"100%",padding:"6px 16px",fontSize:"12px",color:"#cccccc",backgroundColor:"transparent",border:"none",textAlign:"left",cursor:"pointer",transition:"background 0.1s"},M={cursor:"pointer",padding:"0 6px",borderRadius:"3px",transition:"background-color 0.15s"},C=Gt[t]??Vt,z=C.map((e,t)=>{const n=function(e){if(!e.trim())return[{text:" ",color:Jt}];const t=[];let n=0;for(;n<e.length;){if("/"===e[n]&&"/"===e[n+1]){t.push({text:e.slice(n),color:"#6a9955"});break}if('"'===e[n]||"'"===e[n]||"`"===e[n]){const o=e[n];let r=n+1;for(;r<e.length&&e[r]!==o;)"\\"===e[r]&&r++,r++;r=Math.min(r+1,e.length),t.push({text:e.slice(n,r),color:"#ce9178"}),n=r;continue}if(/[0-9]/.test(e[n])&&(0===n||/[\s(,=:[\]{}+\-*/]/.test(e[n-1]))){let o=n;for(;o<e.length&&/[0-9.]/.test(e[o]);)o++;t.push({text:e.slice(n,o),color:"#b5cea8"}),n=o;continue}if(/[a-zA-Z_$]/.test(e[n])){let o=n;for(;o<e.length&&/[a-zA-Z0-9_$]/.test(e[o]);)o++;const r=e.slice(n,o);let i=o;for(;i<e.length&&" "===e[i];)i++;const l=i<e.length&&"("===e[i];let a=Jt;Xt.has(r)?a=Zt:Kt.has(r)?a="#4ec9b0":l?a="#dcdcaa":"true"!==r&&"false"!==r||(a=Zt),t.push({text:r,color:a}),n=o;continue}if(" "===e[n]||"\t"===e[n]){let o=n;for(;o<e.length&&(" "===e[o]||"\t"===e[o]);)o++;t.push({text:e.slice(n,o),color:Jt}),n=o;continue}t.push({text:e[n],color:"#d4d4d4"}),n++}return t}(e),r=[];let i=0;for(const e of n)r.push(o("span",{key:String(i++),style:{color:e.color}},e.text));return o("div",{key:String(t),style:{minHeight:"20px"}},...r)}),I=Math.max(p,C.length),A=[];for(let e=0;e<I;e++)A.push(o("div",{key:String(e)},String(e+1)));const F=e=>{if(!e.parent)return!0;if(!r[e.parent])return!1;const t=Ut.find(t=>t.name===e.parent&&t.isFolder);return!t||F(t)},R=qt.map((e,t)=>{const n=[e],r=a===t;return r&&Ot[e]&&n.push(o("div",{key:"dropdown",style:w,className:"ide__menu-dropdown"},...Ot[e].map((e,t)=>o("button",{key:String(t),style:$,onClick:t=>{t.stopPropagation(),m(e.action)},role:"menuitem"},e.label)))),o("button",{key:String(t),style:r?k:S,role:"menuitem","aria-label":e,onClick:()=>y(t)},...n)}),D=Ut.map((e,n)=>{if(!F(e))return null;const i=!e.isFolder&&e.name===t,l=e.isFolder?r[e.name]?"📂 ":"📁 ":"📄 ";return o("div",{key:String(n),style:(a=e.indent,s=e.isFolder,d=i,{padding:"3px 8px",paddingLeft:12+16*a+"px",fontSize:"13px",cursor:"pointer",color:s?"#cccccc":"#d4d4d4",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderRadius:"3px",margin:"0 4px",transition:"background-color 0.1s",backgroundColor:d?"rgba(255,255,255,0.08)":"transparent"}),onClick:e.isFolder?()=>x(e.name):()=>g(e.name)},l,e.name);var a,s,d}).filter(e=>null!==e);return o("div",{className:`ide ${e.className??""}`.trim(),style:v},o("div",{className:"ide__title-bar",style:{height:"30px",backgroundColor:"#323233",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",color:"#999",flexShrink:"0",borderBottom:"1px solid var(--color-border, #252526)"}},"SpecifyJS IDE"),o("div",{className:"ide__menu-bar",style:{height:"28px",backgroundColor:"#3c3c3c",display:"flex",alignItems:"center",padding:"0 8px",gap:"2px",flexShrink:"0",position:"relative"},role:"menubar"},...R),o("div",{style:{flex:"1",display:"flex",overflow:"hidden"}},o("nav",{className:"ide__sidebar",style:{width:"220px",backgroundColor:"#252526",borderRight:"none",display:"flex",flexDirection:"column",flexShrink:"0",overflowY:"auto"},"aria-label":"File explorer"},o("div",{style:{padding:"8px 12px",fontSize:"11px",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.5px",color:"#bbbbbb"}},"Explorer"),...D),o("div",{style:{width:"1px",backgroundColor:"#007acc",cursor:"col-resize",flexShrink:"0",opacity:"0.4",transition:"opacity 0.2s"}}),o("div",{style:{flex:"1",display:"flex",flexDirection:"column",overflow:"hidden"}},o("div",{style:{height:"35px",backgroundColor:"#252526",display:"flex",alignItems:"center",flexShrink:"0"}},o("button",{style:{padding:"0 16px",height:"35px",lineHeight:"35px",backgroundColor:"#1e1e1e",color:"#ffffff",fontSize:"13px",cursor:"pointer",border:"none",borderBottom:"2px solid #007acc",boxSizing:"border-box"},"aria-label":t},t)),o("div",{style:{flex:"1",display:"flex",overflow:"auto",backgroundColor:"#1e1e1e",fontFamily:'"Cascadia Code", "Fira Code", "Consolas", monospace',fontSize:"13px",lineHeight:"20px"}},o("div",{style:{padding:"8px 0",textAlign:"right",color:"#858585",userSelect:"none",minWidth:"48px",paddingRight:"12px",paddingLeft:"12px",flexShrink:"0"},"aria-hidden":"true"},...A),o("code",{style:{padding:"8px 0",flex:"1",whiteSpace:"pre",overflowX:"auto",outline:"none",color:"#d4d4d4"},contentEditable:"true",ref:h,onInput:b,suppressContentEditableWarning:!0},...z))),o("div",{className:"ide__minimap",style:{width:"60px",backgroundColor:"#1e1e1e",borderLeft:"1px solid var(--color-border, #252526)",flexShrink:"0",padding:"8px 4px",display:"flex",flexDirection:"column",gap:"2px",position:"relative"},"aria-hidden":"true"},o("div",{style:{position:"absolute",top:"8px",left:"0",right:"0",height:"30px",backgroundColor:"rgba(100, 100, 200, 0.15)",border:"1px solid rgba(100, 100, 200, 0.3)",borderRadius:"2px",pointerEvents:"none"}}),...C.map((e,t)=>o("div",{key:String(t),style:{height:"2px",backgroundColor:e.trim()?"#555555":"transparent",borderRadius:"1px",width:`${Math.min(100,2*e.length)}%`}})))),o("div",{className:"ide__status-bar",style:{height:"22px",backgroundColor:"#007acc",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 12px",fontSize:"12px",color:"#ffffff",flexShrink:"0"}},o("div",{style:{display:"flex",gap:"16px"}},o("span",{style:M},"⎇ main"),o("span",{style:M},"0 errors"),o("span",{style:M},"0 warnings")),o("div",{style:{display:"flex",gap:"16px"}},o("span",{style:M},"Ln 1, Col 1"),o("span",{style:M},"UTF-8"),o("span",{style:M},"TypeScript"))))},exports.Image=function(e){const[t,n]=l("loading"),r=c(null),i=f().replace(/[^a-zA-Z0-9_-]/g,""),s=!1!==e.lazy,p="number"==typeof e.width?`${e.width}px`:e.width,u="number"==typeof e.height?`${e.height}px`:e.height;a(()=>{n("loading")},[e.src]);const h=d(()=>{const t={display:"inline-block",position:"relative",overflow:"hidden"};return p&&(t.width=p),u&&(t.height=u),e.borderRadius&&(t.borderRadius=e.borderRadius),t},[p,u,e.borderRadius]),g=d(()=>{const n={display:"block",width:"100%",height:"100%"};return e.objectFit&&(n.objectFit=e.objectFit),"loading"===t&&(n.opacity="0",n.position="absolute"),"error"===t&&(n.display="none"),n},[e.objectFit,t]);let x=null;"loading"===t&&("skeleton"===e.placeholder?x=o("div",null,o("style",null,`@keyframes liq-img-shimmer-${i}{0%{background-position:-200% 0}100%{background-position:200% 0}}`),o("div",{style:{width:p??"100%",height:u??"200px",backgroundColor:"#e5e7eb",backgroundImage:"linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",backgroundSize:"200% 100%",animation:`liq-img-shimmer-${i} 1.5s ease-in-out infinite`}})):"blur"===e.placeholder?x=o("div",{style:{width:p??"100%",height:u??"200px",backgroundColor:"#d1d5db",filter:"blur(20px)"}}):null!=e.placeholder&&!1!==e.placeholder&&(x=e.placeholder));let y=null;"error"===t&&null!=e.fallback&&(y="string"==typeof e.fallback?o("img",{src:e.fallback,alt:e.alt??"",style:{display:"block",width:"100%",height:"100%",objectFit:e.objectFit??"cover"}}):e.fallback);const m=o("div",{style:h},x,o("img",{ref:r,src:e.src,alt:e.alt??"",loading:s?"lazy":void 0,style:g,onload:()=>n("loaded"),onerror:()=>n("error")}),y);return e.caption?o("figure",{style:{margin:"0",display:"inline-block"}},m,o("figcaption",{style:{fontSize:"13px",color:"#6b7280",marginTop:"6px",textAlign:"center"}},e.caption)):m},exports.LineGraph=function(e){const{data:t,width:n=600,height:r=400,lineColor:i="#3b82f6",lineWidth:l=2,pointRadius:a=4,pointColor:s="#3b82f6",pointShape:c="circle",showPoints:f=!0,showGrid:p=!0,showArea:u=!1,areaColor:h="rgba(59,130,246,0.15)",xLabel:g,yLabel:x,title:y,padding:m=50,animate:b=!1,multiLine:v}=e,S=xt(d(()=>{const e=[...t];if(v)for(const t of v)e.push(...t.data);return e},[t,v]),n,r,m),{xScale:k,yScale:w,xTicks:$,yTicks:M}=S,C=[];if(C.push(o("rect",{x:0,y:0,width:"100%",fill:"white",key:"bg"})),p){for(let e=0;e<$.length;e++){const t=k($[e]);C.push(o("line",{x1:t,y1:m,x2:t,y2:r-m,stroke:"#e5e7eb","stroke-dasharray":"4,4",key:`grid-x-${e}`}))}for(let e=0;e<M.length;e++){const t=w(M[e]);C.push(o("line",{x1:m,y1:t,x2:n-m,y2:t,stroke:"#e5e7eb","stroke-dasharray":"4,4",key:`grid-y-${e}`}))}}C.push(o("line",{x1:m,y1:r-m,x2:n-m,y2:r-m,stroke:"#374151","stroke-width":1,key:"x-axis"})),C.push(o("line",{x1:m,y1:m,x2:m,y2:r-m,stroke:"#374151","stroke-width":1,key:"y-axis"}));for(let e=0;e<$.length;e++){const t=k($[e]);C.push(o("line",{x1:t,y1:r-m,x2:t,y2:r-m+5,stroke:"#374151",key:`xtick-${e}`})),C.push(o("text",{x:t,y:r-m+18,"text-anchor":"end","font-size":11,fill:"#6b7280",transform:`rotate(-45, ${t}, ${r-m+18})`,key:`xlabel-${e}`},yt($[e])))}for(let e=0;e<M.length;e++){const t=w(M[e]);C.push(o("line",{x1:m-5,y1:t,x2:m,y2:t,stroke:"#374151",key:`ytick-${e}`})),C.push(o("text",{x:m-10,y:t+4,"text-anchor":"end","font-size":11,fill:"#6b7280",key:`ylabel-${e}`},yt(M[e])))}function z(e,t,n,r,i,l,a,s,d,c){if(0===e.length)return;const f=[...e].sort((e,t)=>e.x-t.x);if(r){const e=w(S.yMin),t=f.map(e=>`${k(e.x)},${w(e.y)}`).join(" "),n=`${k(f[0].x)},${e} ${t} ${k(f[f.length-1].x)},${e}`;C.push(o("polygon",{points:n,fill:i,key:`${c}-area`}))}const p={points:f.map(e=>`${k(e.x)},${w(e.y)}`).join(" "),fill:"none",stroke:t,"stroke-width":n,"stroke-linejoin":"round","stroke-linecap":"round",key:`${c}-line`};if(b?(p["stroke-dasharray"]="1000",p["stroke-dashoffset"]="1000",C.push(o("polyline",p,o("animate",{attributeName:"stroke-dashoffset",from:1e3,to:0,dur:"1.5s",fill:"freeze"})))):C.push(o("polyline",p)),l)for(let e=0;e<f.length;e++){const t=k(f[e].x),n=w(f[e].y),r=f[e].shape??d,i=f[e].radius??s,l=`${c}-pt-${e}`;if(b){const e=mt(r,t,n,i,a,l,{opacity:0});C.push(o("g",{key:`${l}-g`},e,o("animate",{attributeName:"opacity",from:0,to:1,dur:"0.3s",begin:"1.2s",fill:"freeze"})))}else C.push(mt(r,t,n,i,a,l))}}if(z(t,i,l,u,h,f,s,a,c,"primary"),v)for(let e=0;e<v.length;e++){const t=v[e];z(t.data,t.color,l,!1,"transparent",f,t.color,t.pointRadius??a,t.pointShape??c,`series-${e}`)}if(v&&v.length>0){const e=[],t=[{color:i,label:"Primary"},...v.map((e,t)=>({color:e.color,label:e.label??`Series ${t+1}`}))],r=m+10,l=16,a=22,s=7.2,d=14,c=6,f=n-2*m-20;let p=0,u=0;for(let n=0;n<t.length;n++){const i=d+c+t[n].label.length*s;p>0&&p+i>f&&(p=0,u+=a);const h=r+p,g=m-30-u;e.push(o("rect",{x:h,y:g,width:d,height:14,fill:t[n].color,rx:2,key:`legend-rect-${n}`})),e.push(o("text",{x:h+d+c,y:g+12,"font-size":12,fill:"#374151",key:`legend-text-${n}`},t[n].label)),p+=i+l}C.push(o("g",{key:"legend"},...e))}return g&&C.push(o("text",{x:n/2,y:r-8,"text-anchor":"middle","font-size":13,fill:"#374151",key:"x-axis-label"},g)),x&&C.push(o("text",{x:14,y:r/2,"text-anchor":"middle","font-size":13,fill:"#374151",transform:`rotate(-90, 14, ${r/2})`,key:"y-axis-label"},x)),y&&C.push(o("text",{x:n/2,y:20,"text-anchor":"middle","font-size":16,"font-weight":"bold",fill:"#111827",key:"title"},y)),o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet"},...C)},exports.ListView=function(e){const{items:t,renderItem:n,keyExtractor:r,divider:i=!1,hoverable:l=!1,selectedIndex:a,onSelect:s,emptyMessage:d="No items",header:c,footer:f}=e;if(0===t.length)return o("div",null,c?o("div",{style:U},c):null,o("div",{style:O},d),f?o("div",{style:{...U,borderBottom:"none",borderTop:"1px solid #e5e7eb"}},f):null);const p=[];for(let e=0;e<t.length;e++){const d=t[e],c=r(d,e),f=a===e,u=e===t.length-1,h={...j,...l?_:{},...f?q:{},...i&&!u?Y:{}};p.push(o("li",{key:c,style:h,onClick:s?()=>s(e):void 0,onKeyDown:s?t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),s(e))}:void 0,role:s?"option":void 0,tabIndex:s?0:void 0,"aria-selected":s?String(f):void 0},n(d,e)))}return o("div",null,c?o("div",{style:U},c):null,o("ul",{style:H,role:s?"listbox":"list"},...p),f?o("div",{style:{...U,borderBottom:"none",borderTop:"1px solid #e5e7eb"}},f):null)},exports.LollipopChart=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",stemColor:l="#94a3b8",stemWidth:a=2,dotRadius:c=6,dotColor:f="#3b82f6",showGrid:p=!0,showValues:u=!0,title:h,padding:g=60}=e,x="vertical"===i,y=n-2*g,m=r-2*g-(x?30:0),b=x?m:y,v=x?y:m,S=d(()=>{let e=0;for(let n=0;n<t.length;n++)t[n].value>e&&(e=t[n].value);return e>0?e:1},[t]),k=d(()=>0===t.length?0:v/t.length,[t.length,v]),w=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(S),t=[];for(let n=e;n<=S;n+=e){const e=n/S*b;if(x){const r=g+m-e;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(r),x2:String(g+y),y2:String(r),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(r+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}else{const r=g+e;t.push(o("line",{key:`grid-${n}`,x1:String(r),y1:String(g),x2:String(r),y2:String(g+m),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(r),y:String(g+m+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}}return t},[p,S,x,g,y,m,b]),$=s(()=>{const e=[];return e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+m),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+m),x2:String(g+y),y2:String(g+m),stroke:"#374151","stroke-width":"1.5"})),e},[x,g,y,m]),M=s(()=>{if(0===t.length)return[];const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=r.value/S*b,s=k*n+k/2,d=r.color??f;if(x){const t=g+s,f=g+m,p=g+m-i;e.push(o("line",{key:`stem-${n}`,x1:String(t),y1:String(f),x2:String(t),y2:String(p),stroke:l,"stroke-width":String(a)})),e.push(o("circle",{key:`dot-${n}`,cx:String(t),cy:String(p),r:String(c),fill:d})),u&&e.push(o("text",{key:`val-${n}`,x:String(t),y:String(p-c-4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(r.value)));const h=t,x=g+m+16;e.push(o("text",{key:`cat-${n}`,x:String(h),y:String(x),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${h}, ${x})`},r.label))}else{const t=g+s,f=g,p=g+i;e.push(o("line",{key:`stem-${n}`,x1:String(f),y1:String(t),x2:String(p),y2:String(t),stroke:l,"stroke-width":String(a)})),e.push(o("circle",{key:`dot-${n}`,cx:String(p),cy:String(t),r:String(c),fill:d})),u&&e.push(o("text",{key:`val-${n}`,x:String(p+c+4),y:String(t+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(r.value))),e.push(o("text",{key:`cat-${n}`,x:String(g-8),y:String(t+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}}return e},[t,S,k,f,c,l,a,u,x,g,y,m,b]),C=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),z=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),I=w(),A=$(),F=M(),R=C(),D=z();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Lollipop chart",style:{fontFamily:"sans-serif"}},...R,...I,...A,...F,...D)},exports.Matrix=function(e){const{data:t=[],labels:n,rowLabels:r,columnLabels:i,width:l=500,height:a=500,colorScale:c=uo,showValues:f=!0,showDiagonal:p=!0,cellBorderColor:u="#e5e7eb",title:h,padding:g=70,symmetric:x=!1}=e,y=r??n,m=i??n,b=t.length,v=d(()=>{let e=0;for(const n of t)n.length>e&&(e=n.length);return e},[t]),S=d(()=>{if(!x||0===b)return t;const e=[],n=Math.max(b,v);for(let o=0;o<n;o++){const r=[];for(let e=0;e<n;e++){const n=t[o],i=n&&e<n.length?n[e]:0,l=t[e],a=l&&o<l.length?l[o]:0;0!==i?r.push(i):r.push(a)}e.push(r)}return e},[t,x,b,v]),k=S.length,w=d(()=>{let e=0;for(const t of S)t.length>e&&(e=t.length);return e},[S]),{minVal:$,maxVal:M}=d(()=>{let e=1/0,t=-1/0;for(const n of S)for(const o of n)o<e&&(e=o),o>t&&(t=o);return e===1/0&&(e=0),t===-1/0&&(t=1),e===t&&(t=e+1),{minVal:e,maxVal:t}},[S]),C=h?30:0,z=y?g:20,I=w>0?(l-z-20)/w:0,A=k>0?(a-C-(m?g:20)-20)/k:0,F=s(()=>{const e=[];for(let t=0;t<k;t++){const n=S[t];for(let r=0;r<w;r++){const i=r<n.length?n[r]:0,l=fo((i-$)/(M-$),c),a=z+r*I,s=C+20+t*A,d=t===r,h=d&&p?"currentColor":u,g=d&&p?"2":"1";if(e.push(o("rect",{key:`cell-${t}-${r}`,x:String(a),y:String(s),width:String(I),height:String(A),fill:l,stroke:h,"stroke-width":g})),f){const n=po(l)>.5?"#111827":"#ffffff",c=Math.min(12,.3*I,.35*A);e.push(o("text",{key:`val-${t}-${r}`,x:String(a+I/2),y:String(s+A/2),"text-anchor":"middle","dominant-baseline":"central","font-size":String(Math.max(8,c)),"font-weight":d&&p?"bold":"normal","font-family":"sans-serif",fill:n},String(Math.round(100*i)/100)))}}}return e},[S,k,w,$,M,c,I,A,z,C,f,p,u]),R=s(()=>{const e=[];if(y)for(let t=0;t<k;t++){const n=t<y.length?y[t]:"",r=C+20+t*A+A/2;e.push(o("text",{key:`row-label-${t}`,x:String(z-8),y:String(r),"text-anchor":"end","dominant-baseline":"central","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}if(m)for(let t=0;t<w;t++){const n=t<m.length?m[t]:"",r=z+t*I+I/2,i=C+20+k*A+12;e.push(o("text",{key:`col-label-${t}`,x:String(r),y:String(i),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}return e},[y,m,k,w,I,A,z,C]),D=s(()=>h?[o("text",{key:"title",x:String(l/2),y:"22","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},h)]:[],[h,l]);if(0===k||0===w)return o("svg",{width:"100%",viewBox:`0 0 ${l} ${a}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Matrix — no data"},o("text",{x:String(l/2),y:String(a/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const L=D(),N=F(),T=R();return o("svg",{width:"100%",viewBox:`0 0 ${l} ${a}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Matrix visualization",style:{fontFamily:"sans-serif"}},...L,...N,...T)},exports.Menubar=function(e){const{menus:t}=e,[n,r]=l(null),i=c(null),d=s(e=>{r(e)},[]),f=s(()=>{r(null)},[]);a(()=>{if(null===n)return;const e=e=>{const t=i.current;t&&!t.contains(e.target)&&r(null)};return document.addEventListener("click",e,!0),()=>{document.removeEventListener("click",e,!0)}},[n]),a(()=>{const e=i.current;if(!e)return;const o=o=>{const i=o;if("Escape"!==i.key){if("ArrowRight"===i.key)return i.preventDefault(),void r(e=>null===e?0:(e+1)%t.length);if("ArrowLeft"===i.key)return i.preventDefault(),void r(e=>null===e?t.length-1:(e-1+t.length)%t.length);if("ArrowDown"===i.key&&null!==n){i.preventDefault();const t=e.querySelector('[role="menu"]');if(t){const e=t.querySelector('[role="menuitem"]');e&&e.focus()}return}"Enter"!==i.key&&i.key}else r(null)};return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}},[n,t.length]);const p=t.map((e,t)=>o(Fe,{key:String(t),menu:e,index:t,isOpen:n===t,anyOpen:null!==n,onOpen:d,onClose:f}));return o("div",{ref:i,role:"menubar","aria-label":"Menu bar",style:{display:"flex",alignItems:"center",backgroundColor:"#ffffff",borderBottom:"1px solid #e5e7eb",padding:"2px 4px",fontFamily:"inherit",fontSize:"13px",gap:"2px"}},...p)},exports.Modal=function(e){const{open:t,onClose:n,title:r,size:i="md",closeOnOverlay:l=!0,closeOnEscape:s=!0,footer:d,showCloseButton:f=!0,children:p}=e,u=c(null);if(a(()=>{if(!t)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),a(()=>{if(!t||!s)return;const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,s,n]),a(()=>{t&&u.current&&u.current.focus()},[t]),!t)return null;const h={backgroundColor:"#fff",borderRadius:"full"===i?"0":"8px",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.3)",maxHeight:"full"===i?"100vh":"90vh",width:Ge[i],maxWidth:"full"===i?"100vw":"90vw",display:"flex",flexDirection:"column",outline:"none",overflow:"hidden"},g=[],x=r?"modal-title":void 0;r?g.push(o("h2",{id:x,style:{margin:"0",fontSize:"18px",fontWeight:"600",color:"#111827"}},r)):g.push(o("span",null)),f&&g.push(o("button",{type:"button",style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#6b7280",padding:"4px 8px",borderRadius:"4px",lineHeight:"1"},onClick:n,"aria-label":"Close modal"},"×"));const y=[o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 24px",borderBottom:"1px solid #e5e7eb",flexShrink:"0"}},...g),o("div",{style:{padding:"24px",overflow:"auto",flex:"1"}},p)];return d&&y.push(o("div",{style:{padding:"16px 24px",borderTop:"1px solid #e5e7eb",flexShrink:"0"}},d)),o("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"10000"},onClick:e=>{l&&e.target===e.currentTarget&&n()},"aria-modal":"true",role:"dialog","aria-labelledby":x},o("div",{ref:u,style:h,tabIndex:-1,role:"document"},...y))},exports.MultilineField=function(e){const[t,n]=l(!1),[r,i]=l((e.value??e.defaultValue??"").length),a=e.id??`ml-${Math.random().toString(36).slice(2,8)}`,d={...ne(e.inputStyle??{},{focused:t,error:!!e.error}),resize:e.autoResize?"none":"vertical",lineHeight:"1.5",...e.minHeight?{minHeight:e.minHeight}:{},...e.maxHeight?{maxHeight:e.maxHeight}:{}},c=s(t=>{const n=t.target,o=n.value;i(o.length),e.onChange&&e.onChange(o),e.autoResize&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)},[e.onChange,e.autoResize]),f=o("textarea",{id:a,name:e.name,value:e.value,placeholder:e.placeholder,rows:String(e.rows??4),maxLength:e.maxLength?String(e.maxLength):void 0,readOnly:e.readOnly,disabled:e.disabled,"aria-invalid":e.error?"true":void 0,"aria-required":e.required?"true":void 0,className:`multiline-input ${e.className??""}`.trim(),style:d,onFocus:()=>n(!0),onBlur:t=>{n(!1),e.onBlur&&e.onBlur(t.target.value)},onInput:c}),p=e.showCount&&e.maxLength?o("div",{style:{fontSize:"11px",color:r>.9*(e.maxLength??1/0)?"#ef4444":"#9ca3af",textAlign:"right",marginTop:"2px"}},`${r}/${e.maxLength}`):e.showCount?o("div",{style:{fontSize:"11px",color:"#9ca3af",textAlign:"right",marginTop:"2px"}},`${r} characters`):null;return o(te,{label:e.label,htmlFor:a,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},f,p)},exports.NavWrapper=ke,exports.NumberSpinner=function(e){const t=e.id??`ns-${Math.random().toString(36).slice(2,8)}`,{value:n,onChange:r,min:i,max:a,step:d=1,disabled:c=!1,prefix:f,suffix:p,label:u,error:h}=e,[g,x]=l(!1),y=s(e=>{let t=e;return void 0!==i&&t<i&&(t=i),void 0!==a&&t>a&&(t=a),t},[i,a]),m=s(()=>{c||r(y(n+d))},[c,n,d,y,r]),b=s(()=>{c||r(y(n-d))},[c,n,d,y,r]),v=s(e=>{const t=e.target.value;if(""===t||"-"===t)return;const n=parseFloat(t);isNaN(n)||r(y(n))},[y,r]),S=s(e=>{c||("ArrowUp"===e.key?(e.preventDefault(),m()):"ArrowDown"===e.key&&(e.preventDefault(),b()))},[c,m,b]),k=void 0===a||n<a,w={display:"inline-flex",alignItems:"stretch",borderRadius:"6px",overflow:"hidden",border:"1px solid "+(h?"#ef4444":g?"#3b82f6":"var(--color-border, #d1d5db)"),transition:"border-color 0.15s",opacity:c?"0.6":"1",...g&&!h?{boxShadow:"0 0 0 3px #3b82f622"}:{}},$=e=>({display:"flex",alignItems:"center",justifyContent:"center",width:"36px",backgroundColor:"var(--color-bg-subtle, #f9fafb)",border:"none",cursor:c||!e?"not-allowed":"pointer",color:c||!e?"#d1d5db":"var(--color-text, #374151)",fontSize:"inherit",fontWeight:"600",userSelect:"none",transition:"background-color 0.1s",borderRight:"none",borderLeft:"none"}),M={display:"flex",alignItems:"center",fontSize:"inherit",color:"var(--color-text-muted, #6b7280)",padding:"0 2px",backgroundColor:"var(--color-bg-subtle, #f9fafb)"},C=o("button",{type:"button",style:$(void 0===i||n>i),onClick:b,disabled:c,"aria-label":"Decrement",tabIndex:-1},"−"),z=f?o("span",{style:M},f):null,I=o("input",{id:t,type:"text",value:String(n),onInput:v,onKeyDown:S,onFocus:()=>x(!0),onBlur:()=>x(!1),disabled:c,style:{flex:"1",minWidth:"32px",textAlign:"center",border:"none",borderLeft:"1px solid var(--color-border, #e5e7eb)",borderRight:"1px solid var(--color-border, #e5e7eb)",outline:"none",fontSize:"inherit",fontFamily:"inherit",backgroundColor:"var(--color-bg, #ffffff)",color:"var(--color-text, #1f2937)",padding:"4px 2px"},"aria-label":u||"Number",role:"spinbutton","aria-valuenow":String(n),"aria-valuemin":void 0!==i?String(i):void 0,"aria-valuemax":void 0!==a?String(a):void 0}),A=p?o("span",{style:M},p):null,F=o("button",{type:"button",style:$(k),onClick:m,disabled:c,"aria-label":"Increment",tabIndex:-1},"+"),R=[C];return z&&R.push(z),R.push(I),A&&R.push(A),R.push(F),o(te,{label:u,error:h,disabled:c,htmlFor:t},o("div",{style:w},...R))},exports.Pagination=function(e){const{total:t,pageSize:n,currentPage:r,onChange:i,siblingCount:l=1,showFirstLast:a=!0,showPrevNext:d=!0,disabled:c=!1}=e,f=Math.max(1,Math.ceil(t/n)),p=Math.min(Math.max(1,r),f),u=s(e=>{!c&&e>=1&&e<=f&&e!==p&&i(e)},[c,f,p,i]),h=(e,t,n)=>{const r=c||t<1||t>f||t===p;return o("button",{type:"button",onClick:()=>u(t),disabled:r||void 0,"aria-label":n,style:r?Ne:De},e)},g=function(e,t,n){if(e<=2*n+5)return Re(1,e);const o=Math.max(t-n,1),r=Math.min(t+n,e),i=o>2,l=r<e-1;return!i&&l?[...Re(1,2*n+3),"ellipsis",e]:i&&!l?[1,"ellipsis",...Re(e-2*n-2,e)]:[1,"ellipsis",...Re(o,r),"ellipsis",e]}(f,p,l);let x=0;const y=[];a&&y.push(h("«",1,"Go to first page")),d&&y.push(h("‹",p-1,"Go to previous page"));for(const e of g)if("ellipsis"===e)y.push(o("span",{key:"ellipsis-"+x++,style:Te},"..."));else{const t=e===p;y.push(o("button",{key:String(e),type:"button",onClick:()=>u(e),disabled:c||void 0,"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,style:c?Ne:t?Le:De},String(e)))}return d&&y.push(h("›",p+1,"Go to next page")),a&&y.push(h("»",f,"Go to last page")),o(ke,{orientation:"horizontal",role:"navigation",ariaLabel:"Pagination",keyboardNav:!0,styling:{border:"none",borderRadius:"0",backgroundColor:"transparent",padding:"0",custom:{gap:"4px"}}},...y)},exports.Panel=function(e){const t=!1!==e.bordered,n=e.shadow??"none",[r,i]=l(!!e.defaultCollapsed),f=c(null),[p,u]=l("auto");a(()=>{if(!e.collapsible)return;const t=f.current;t&&u(`${t.scrollHeight}px`)},[e.children,e.collapsible]);const h=s(()=>{e.collapsible&&i(e=>!e)},[e.collapsible]),g=s(t=>{if(!e.collapsible)return;const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),h())},[e.collapsible,h]),x=d(()=>{const o={borderRadius:"6px",overflow:"hidden",backgroundColor:"#ffffff"};return t&&(o.border="1px solid #e5e7eb"),o.boxShadow=me[n]??me.none,{...o,...e.style??{}}},[t,n,e.style]),y={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",gap:"8px",backgroundColor:"#f9fafb",userSelect:"none",cursor:e.collapsible?"pointer":"default"},m={display:"inline-block",width:"0",height:"0",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"6px solid #6b7280",transition:"transform 0.2s",transform:r?"rotate(-90deg)":"rotate(0deg)",marginRight:"8px",flexShrink:"0"},b={maxHeight:r?"0":p,overflow:"hidden",transition:"max-height 0.3s ease"};return o("div",{className:`panel ${e.className??""}`.trim(),style:x},o("div",{className:"panel__header",style:y,onClick:h,onKeyDown:g,role:e.collapsible?"button":void 0,tabIndex:e.collapsible?0:void 0,"aria-expanded":e.collapsible?String(!r):void 0},o("div",{style:{display:"flex",alignItems:"center",flex:"1",minWidth:"0",gap:"8px"}},e.collapsible?o("span",{className:"panel__chevron",style:m}):null,e.icon?o("span",{className:"panel__icon"},e.icon):null,e.title?o("span",{className:"panel__title",style:{fontSize:"14px",fontWeight:"600",color:"#111827"}},e.title):null),e.headerRight?o("div",{className:"panel__header-right"},e.headerRight):null),o("div",{className:"panel__body-wrapper",style:e.collapsible?b:{},ref:f},o("div",{className:"panel__body",style:{padding:"16px"}},e.children)))},exports.Partition=function(e){const{data:t,width:n=600,height:r=400,orientation:i="horizontal",showLabels:l=!0,showValues:a=!0,colors:s=ho,borderColor:c="#ffffff",borderWidth:f=1,title:p,padding:u=10}=e,h=p?30:0,g=u,x=u+h,y=n-2*u,m=r-2*u-h;if(d(()=>go(t),[t])<=0||y<=0||m<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Empty partition diagram"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const b=d(()=>function(e,t,n,o,r,i,l){const a=[];if(go(e)<=0)return a;const s=function(e){let t=0;const n=[{node:e,depth:0}];for(;n.length>0;){const{node:e,depth:o}=n.pop();if(o>t&&(t=o),e.children)for(let t=e.children.length-1;t>=0;t--)n.push({node:e.children[t],depth:o+1})}return t}(e)+1,d="horizontal"===i,c=d?r/s:o/s,f=[];for(f.push({node:e,depth:0,spanStart:d?t:n,spanEnd:d?t+o:n+r,colorIndex:0});f.length>0;){const e=f.shift(),{node:o,depth:r,spanStart:i,spanEnd:s,colorIndex:p}=e,u=go(o);if(u<=0)continue;const h=s-i;let g,x,y,m;if(d?(g=i,x=n+r*c,y=h,m=c):(g=t+r*c,x=i,y=c,m=h),a.push({x:g,y:x,w:y,h:m,label:o.label,value:u,color:o.color??l[p%l.length],depth:r}),o.children&&o.children.length>0){let e=i;for(let t=0;t<o.children.length;t++){const n=o.children[t],i=go(n);if(i<=0)continue;const l=i/u*h;f.push({node:n,depth:r+1,spanStart:e,spanEnd:e+l,colorIndex:0===r?t:p}),e+=l}}}return a}(t,g,x,y,m,i,s),[t,g,x,y,m,i,s]),v=[];p&&v.push(o("text",{key:"title",x:String(n/2),y:String(u+16),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p));for(let e=0;e<b.length;e++){const t=b[e];if(v.push(o("rect",{key:`cell-${e}`,x:String(t.x),y:String(t.y),width:String(Math.max(0,t.w)),height:String(Math.max(0,t.h)),fill:t.color,stroke:c,"stroke-width":String(f),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),l&&t.w>20&&t.h>14){const n=Math.floor(t.w/7),r=t.label.length>n?t.label.substring(0,Math.max(1,n-2))+"..":t.label;v.push(o("text",{key:`label-${e}`,x:String(t.x+t.w/2),y:String(t.y+t.h/2+(a?-2:4)),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},r))}a&&t.w>30&&t.h>28&&v.push(o("text",{key:`value-${e}`,x:String(t.x+t.w/2),y:String(t.y+t.h/2+12),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.8)","pointer-events":"none"},String(t.value)))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Partition diagram",style:{fontFamily:"sans-serif"}},...v)},exports.PieGraph=function(e){const{data:t,width:n=400,height:r=400,innerRadius:i=0,padAngle:l=.02,showLabels:a=!0,showValues:s=!0,showLegend:c=!0,legendPosition:f="right",title:p,centerLabel:u,colors:h,strokeColor:g="#fff",strokeWidth:x=2,textColor:y="currentColor"}=e,m=c&&"right"===f?140:0,b=p?30:0,v=c&&"bottom"===f?22*Math.ceil(t.length/2)+10:0,S=n-m,k=r-b-v,w=S/2,$=b+k/2,M=Math.min(S,k)/2-10,C=e.outerRadius??M,z=d(()=>St(t,{padAngle:l,colors:h}),[t,l,h]),I=[];p&&I.push(o("text",{key:"title",x:S/2,y:20,textAnchor:"middle",fontFamily:"sans-serif",fontSize:16,fontWeight:"bold",fill:y},p));for(let e=0;e<z.length;e++){const t=z[e],n=vt(w,$,i,C,t.startAngle,t.endAngle);if(I.push(o("path",{key:`slice-${e}`,d:n,fill:t.color,stroke:g,strokeWidth:x})),a||s){const n=(t.startAngle+t.endAngle)/2,r=t.percentage<5,l=bt(w,$,r?C+14:i+.65*(C-i),n-Math.PI/2),d=r?y:"#fff",c=r?11:12,f=[];if(a&&f.push(t.label),s&&f.push(`${t.percentage.toFixed(1)}%`),r){const t=bt(w,$,C+2,n-Math.PI/2);I.push(o("line",{key:`connector-${e}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,stroke:"#999",strokeWidth:1}))}a&&I.push(o("text",{key:`label-${e}`,x:l.x,y:l.y-(s?6:0),textAnchor:"middle",fontFamily:"sans-serif",fontSize:c,fill:d,pointerEvents:"none"},t.label)),s&&I.push(o("text",{key:`value-${e}`,x:l.x,y:l.y+(a?10:0),textAnchor:"middle",fontFamily:"sans-serif",fontSize:c-1,fill:d,pointerEvents:"none"},`${t.percentage.toFixed(1)}%`))}}if(u&&i>0&&I.push(o("text",{key:"center-label",x:w,y:$,textAnchor:"middle",dominantBaseline:"central",fontFamily:"sans-serif",fontSize:14,fontWeight:"bold",fill:y},u)),c){const e=[];if("right"===f){const t=S+10,n=b+20;for(let r=0;r<z.length;r++){const i=z[r],l=n+22*r;e.push(o("circle",{key:`legend-dot-${r}`,cx:t+6,cy:l,r:6,fill:i.color})),e.push(o("text",{key:`legend-text-${r}`,x:t+18,y:l,dominantBaseline:"central",fontFamily:"sans-serif",fontSize:12,fill:y},`${i.label} (${i.percentage.toFixed(1)}%)`))}}else{const t=r-v+10;for(let r=0;r<z.length;r++){const i=z[r],l=r%2*(n/2)+10,a=t+22*Math.floor(r/2);e.push(o("circle",{key:`legend-dot-${r}`,cx:l+6,cy:a,r:6,fill:i.color})),e.push(o("text",{key:`legend-text-${r}`,x:l+18,y:a,dominantBaseline:"central",fontFamily:"sans-serif",fontSize:12,fill:y},`${i.label} (${i.percentage.toFixed(1)}%)`))}}I.push(...e)}return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet"},...I)},exports.PivotTable=function(e){const{data:t=[],rows:n=[],columns:r=[],values:i=[],aggregation:l="sum",width:a=600,height:s=400,showTotals:c=!0,title:f,headerColor:p="#3b82f6",cellPadding:u=8}=e;if(0===t.length||0===n.length&&0===r.length||0===i.length)return o("svg",{width:"100%",viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"table","aria-label":f??"Empty pivot table"},o("text",{x:String(a/2),y:String(s/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.4"},"No data to display"));const h=d(()=>function(e,t,n,o,r){const i=yo(e,t),l=yo(e,n),a=new Map;for(const r of e){const e=`${xo(r,t)}::${xo(r,n)}`;a.has(e)||a.set(e,[]);const i=a.get(e);let l=0;for(const e of o){const t=r[e];if("number"==typeof t)l+=t;else if("string"==typeof t){const e=parseFloat(t);isNaN(e)||(l+=e)}}i.push(l)}const s=new Map;for(const[e,t]of a)s.set(e,mo(t,r));const d=new Map;for(const e of i){const t=[];for(const n of l){const o=s.get(`${e}::${n}`);void 0!==o&&t.push(o)}d.set(e,mo(t,"count"===r?"sum":r))}const c=new Map;for(const e of l){const t=[];for(const n of i){const o=s.get(`${n}::${e}`);void 0!==o&&t.push(o)}c.set(e,mo(t,"count"===r?"sum":r))}const f=[];for(const e of d.values())f.push(e);return{rowKeys:i,colKeys:l,cells:s,rowTotals:d,colTotals:c,grandTotal:mo(f,"count"===r?"sum":r)}}(t,n,r,i,l),[t,n,r,i,l]),{rowKeys:g,colKeys:x,cells:y,rowTotals:m,colTotals:b,grandTotal:v}=h,S=f?30:0,k=x.length+(c?1:0),w=g.length+(c?1:0),$=1+k,M=1+w,C=Math.max(40,(a-2*u)/$),z=Math.max(20,Math.min(36,(s-S-2*u)/M)),I=C*$,A=z*M,F=Math.max(0,(a-I)/2),R=S+Math.max(0,(s-S-A)/2),D=[];f&&D.push(o("text",{key:"title",x:String(a/2),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},f)),D.push(o("rect",{key:"header-row-bg",x:String(F),y:String(R),width:String(I),height:String(z),fill:p})),D.push(o("rect",{key:"header-col-bg",x:String(F),y:String(R+z),width:String(C),height:String(z*w),fill:p,opacity:"0.85"})),D.push(o("text",{key:"corner",x:String(F+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},l.toUpperCase()));for(let e=0;e<x.length;e++){const t=F+(e+1)*C,n=Math.floor(C/7),r=x[e],i=r.length>n?r.substring(0,Math.max(1,n-2))+"..":r;D.push(o("text",{key:`ch-${e}`,x:String(t+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},i))}c&&D.push(o("text",{key:"ch-total",x:String(F+(x.length+1)*C+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},"Total"));for(let e=0;e<g.length;e++){const t=g[e],n=R+(e+1)*z;e%2==0&&D.push(o("rect",{key:`row-bg-${e}`,x:String(F+C),y:String(n),width:String(C*k),height:String(z),fill:"#f9fafb"}));const r=Math.floor(C/7),i=t.length>r?t.substring(0,Math.max(1,r-2))+"..":t;D.push(o("text",{key:`rh-${e}`,x:String(F+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},i));for(let r=0;r<x.length;r++){const i=`${t}::${x[r]}`,l=y.get(i),a=F+(r+1)*C;D.push(o("rect",{key:`border-${e}-${r}`,x:String(a),y:String(n),width:String(C),height:String(z),fill:"none",stroke:"#e5e7eb","stroke-width":"0.5"})),D.push(o("text",{key:`cell-${e}-${r}`,x:String(a+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},void 0!==l?bo(l):"-"))}if(c){const r=F+(x.length+1)*C,i=m.get(t)??0;D.push(o("rect",{key:`rt-bg-${e}`,x:String(r),y:String(n),width:String(C),height:String(z),fill:"#eff6ff"})),D.push(o("text",{key:`rt-${e}`,x:String(r+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},bo(i)))}}if(c){const e=R+(g.length+1)*z;D.push(o("rect",{key:"total-row-bg",x:String(F),y:String(e),width:String(I),height:String(z),fill:"#eff6ff"})),D.push(o("text",{key:"total-label",x:String(F+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},"Total"));for(let t=0;t<x.length;t++){const n=x[t],r=b.get(n)??0,i=F+(t+1)*C;D.push(o("text",{key:`ct-${t}`,x:String(i+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},bo(r)))}const t=F+(x.length+1)*C;D.push(o("text",{key:"grand-total",x:String(t+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"12","font-family":"sans-serif","font-weight":"bold",fill:"#1e3a8a"},bo(v)))}return D.push(o("rect",{key:"outer-border",x:String(F),y:String(R),width:String(I),height:String(A),fill:"none",stroke:"#d1d5db","stroke-width":"1"})),o("svg",{width:"100%",viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"table","aria-label":f??"Pivot table",style:{fontFamily:"sans-serif"}},...D)},exports.PolarGraph2D=function(e){const{width:t=400,height:n=400,rRange:r=[0,2],plotFunction:i,plotResolution:f=360,thetaStep:p,sync:u=!1,points:h=[],showGrid:g=!0,pointRadius:x=3,pointColor:y="#3b82f6",curveColor:m="#3b82f6",onPointClick:b,onPointDoubleClick:v,onPointContextMenu:S,onPointHover:k}=e,[w,$]=l(r[1]),[M,C]=l(0),[z,I]=l(0),[A,F]=l(null),R=t/2+M,D=n/2+z,L=Math.min(t,n)/2-30,N=L/w,T=d(()=>{const e=Math.max(1,Math.ceil(w)),t=[],n=w/e;for(let o=1;o<=e;o++)t.push(n*o);return t},[w]),W=d(()=>{const e=[];for(let t=0;t<360;t+=30)e.push(t*Math.PI/180);return e},[]),B=d(()=>{if(!i||!u)return[];const e=p??2*Math.PI/f,t=it({start:0,end:2*Math.PI,step:e});return lt(i,t)},[i,f,p,u]),[E,P]=l([]),H=c(null);a(()=>{if(!i||u)return void P([]);const e=p??2*Math.PI/f,t=it({start:0,end:2*Math.PI,step:e});return H.current&&H.current(),H.current=at(i,t,200,e=>{P([...e])}),()=>{H.current&&H.current()}},[i,f,p,u]);const j=u?B:E,Y=d(()=>{if(0===j.length)return"";const e=[];for(let t=0;t<j.length;t++){const n=j[t],o=n.output;if(o<0||!isFinite(o))continue;const{x:r,y:i}=kt(o,n.input,R,D,N);e.push(`${0===e.length?"M":"L"}${r.toFixed(2)},${i.toFixed(2)}`)}return e.join(" ")},[j,R,D,N]),_=s(e=>{F({x:e.clientX,y:e.clientY,px:M,py:z})},[M,z]),q=s(e=>{A&&(C(A.px+(e.clientX-A.x)),I(A.py+(e.clientY-A.y)))},[A]),O=s(()=>{F(null)},[]),U=s(e=>{e.preventDefault();const t=e.deltaY>0?1.15:1/1.15;$(Math.max(.1,w*t))},[w]),G=s((e,t,n)=>{if(e)return o=>e({r:t.r,theta:t.theta,index:n,event:o})},[]),V=[];if(V.push(o("rect",{x:0,y:0,width:t,height:n,fill:"white",key:"bg"})),g){for(let e=0;e<T.length;e++){const t=T[e]*N;V.push(o("circle",{cx:R,cy:D,r:t,fill:"none",stroke:"#e5e7eb","stroke-width":1,key:`gc-${e}`})),V.push(o("text",{x:R+t+2,y:D-4,"font-size":10,fill:"#9ca3af",key:`gl-${e}`},T[e].toFixed(1)))}for(let e=0;e<W.length;e++){const t=W[e],n=T[T.length-1]*N,r=R+n*Math.cos(t),i=D-n*Math.sin(t);V.push(o("line",{x1:R,y1:D,x2:r,y2:i,stroke:"#e5e7eb","stroke-width":1,key:`al-${e}`}));const l=Math.round(180*t/Math.PI),a=R+(n+14)*Math.cos(t),s=D-(n+14)*Math.sin(t);V.push(o("text",{x:a,y:s+4,"text-anchor":"middle","font-size":10,fill:"#9ca3af",key:`at-${e}`},`${l}°`))}}V.push(o("line",{x1:R-L,y1:D,x2:R+L,y2:D,stroke:"#d1d5db","stroke-width":1,key:"x-axis"})),V.push(o("line",{x1:R,y1:D-L,x2:R,y2:D+L,stroke:"#d1d5db","stroke-width":1,key:"y-axis"})),Y&&V.push(o("path",{d:Y,fill:"none",stroke:m,"stroke-width":2,key:"curve"}));for(let e=0;e<h.length;e++){const t=h[e],{x:n,y:r}=kt(t.r,t.theta,R,D,N);V.push(o("circle",{cx:n,cy:r,r:x,fill:y,key:`pt-${e}`,style:{cursor:"pointer"},onClick:G(b,t,e),onDblClick:G(v,t,e),onContextMenu:G(S,t,e),onMouseEnter:G(k,t,e)}))}return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",style:{cursor:A?"grabbing":"grab"},onMouseDown:_,onMouseMove:q,onMouseUp:O,onMouseLeave:O,onWheel:U},...V)},exports.Popover=function(e){const{trigger:t,content:n,open:r,placement:i="bottom",offset:d=4,arrow:f=!1,closeOnClickOutside:p=!0,onOpenChange:u}=e,h=void 0!==r,[g,x]=l(!1),y=h?r:g,m=c(null),b=s(()=>{h?u&&u(!r):x(e=>!e)},[h,r,u]);a(()=>{if(!y||!p)return;const e=e=>{m.current&&!m.current.contains(e.target)&&(h?u&&u(!1):x(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y,p,h,u]);const v={...Ve(i,d),backgroundColor:"#fff",borderRadius:"8px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",border:"1px solid #e5e7eb",padding:"12px 16px",zIndex:"10000",whiteSpace:"nowrap"},S=[n];f&&S.push(o("div",{style:Xe(i)}));const k=s(e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),b())},[b]),w=[o("div",{onClick:b,onKeyDown:k,role:"button",tabIndex:0,style:{display:"inline-block"}},t)];return y&&w.push(o("div",{style:v},...S)),o("div",{ref:m,style:{position:"relative",display:"inline-block"}},...w)},exports.ProgressBar=function(e){const t=e.max??100,n=e.indeterminate?0:Math.min(Math.max(e.value??0,0),t),r=t>0?n/t*100:0,i=e.color??"#3b82f6",l=e.backgroundColor??"#e5e7eb",a=e.height??("string"==typeof e.size?e.size:"number"==typeof e.size?`${e.size}px`:"8px"),s=e.variant??"bar",c=f().replace(/[^a-zA-Z0-9_-]/g,"");if("circular"===s){const t="number"==typeof e.size?e.size:48,n=Math.max(2,Math.round(t/10)),a=(t-n)/2,s=2*Math.PI*a,d=e.indeterminate?.75*s:s-r/100*s,f=e.indeterminate?`@keyframes liq-spin-${c}{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`:e.animated?`@keyframes liq-pulse-${c}{0%,100%{opacity:1}50%{opacity:0.6}}`:"";return o("div",{role:"progressbar","aria-valuenow":e.indeterminate?void 0:String(Math.round(r)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Progress",style:{display:"inline-flex",alignItems:"center",gap:"8px"}},f?o("style",null,f):null,o("svg",{width:String(t),height:String(t),viewBox:`0 0 ${t} ${t}`,style:e.indeterminate?{animation:`liq-spin-${c} 1s linear infinite`}:e.animated?{animation:`liq-pulse-${c} 1.5s ease-in-out infinite`}:{}},o("circle",{cx:String(t/2),cy:String(t/2),r:String(a),fill:"none",stroke:l,"stroke-width":String(n)}),o("circle",{cx:String(t/2),cy:String(t/2),r:String(a),fill:"none",stroke:i,"stroke-width":String(n),"stroke-dasharray":String(s),"stroke-dashoffset":String(d),"stroke-linecap":"round",transform:`rotate(-90 ${t/2} ${t/2})`,style:{transition:"stroke-dashoffset 0.3s ease"}})),e.showLabel&&!e.indeterminate?o("span",{style:{fontSize:"14px",color:"#374151"}},`${Math.round(r)}%`):null)}const p=e.animated||e.indeterminate?`@keyframes liq-shimmer-${c}{0%{background-position:-200% 0}100%{background-position:200% 0}}`:"",u=e.indeterminate?`@keyframes liq-indeterminate-${c}{0%{left:-40%;width:40%}50%{left:20%;width:60%}100%{left:100%;width:40%}}`:"",h={width:"100%",height:a,backgroundColor:l,borderRadius:a,overflow:"hidden",position:"relative"},g=d(()=>{const t={height:"100%",borderRadius:a,transition:"width 0.3s ease"};return e.indeterminate?(t.position="absolute",t.animation=`liq-indeterminate-${c} 1.5s ease-in-out infinite`,t.backgroundColor=i):(t.width=`${r}%`,t.backgroundColor=i),e.animated&&!e.indeterminate&&(t.backgroundImage=`linear-gradient(90deg, ${i} 0%, ${function(e){const t=e.replace("#","");if(6!==t.length)return e;const n=Math.min(255,parseInt(t.slice(0,2),16)+40),o=Math.min(255,parseInt(t.slice(2,4),16)+40),r=Math.min(255,parseInt(t.slice(4,6),16)+40);return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}(i)} 50%, ${i} 100%)`,t.backgroundSize="200% 100%",t.animation=`liq-shimmer-${c} 1.5s ease-in-out infinite`),t},[r,i,a,e.animated,e.indeterminate,c]);return o("div",{role:"progressbar","aria-valuenow":e.indeterminate?void 0:String(Math.round(r)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Progress",style:{width:"100%"}},p||u?o("style",null,p+u):null,e.showLabel&&!e.indeterminate?o("div",{style:{marginBottom:"4px",fontSize:"12px",color:"#374151",textAlign:"right"}},`${Math.round(r)}%`):null,o("div",{style:h},o("div",{style:g})))},exports.RadarChart=function(e){const{axes:t=[],series:n=[],width:r=500,height:i=500,levels:l=5,showLabels:a=!0,showValues:c=!1,showLegend:f=!0,showDots:p=!0,gridColor:u="#d1d5db",title:h}=e,g=t.length,x=h?30:0,y=f&&n.length>0?30:0,m=Math.min((r-120)/2,(i-120-x-y)/2),b=r/2,v=60+x+m,S=d(()=>{const e=[];for(let o=0;o<g;o++){const r=t[o]?.max;if(void 0!==r&&r>0){e.push(r);continue}let i=0;for(const e of n){const t=e.values[o];void 0!==t&&t>i&&(i=t)}e.push(i>0?i:1)}return e},[t,n,g]),k=s(()=>{if(g<3)return[];const e=[];for(let t=1;t<=l;t++){const n=m*t/l,r=[];for(let e=0;e<g;e++){const t=vo(e,g),o=So(b,v,n,t);r.push(`${o.x},${o.y}`)}e.push(o("polygon",{key:`ring-${t}`,points:r.join(" "),fill:"none",stroke:u,"stroke-width":t===l?"1.5":"0.5","stroke-dasharray":t===l?"none":"3 2"}))}for(let t=0;t<g;t++){const n=vo(t,g),r=So(b,v,m,n);e.push(o("line",{key:`spoke-${t}`,x1:String(b),y1:String(v),x2:String(r.x),y2:String(r.y),stroke:u,"stroke-width":"0.75"}))}return e},[g,l,m,b,v,u]),w=s(()=>{if(!a||g<3)return[];const e=[];for(let n=0;n<g;n++){const r=vo(n,g),i=So(b,v,m+16,r);let l="middle";i.x<b-5?l="end":i.x>b+5&&(l="start");const a=Math.abs(i.y-v)<5?"0.35em":i.y<v?"0em":"0.7em";e.push(o("text",{key:`label-${n}`,x:String(i.x),y:String(i.y),"text-anchor":l,dy:a,"font-size":"12","font-family":"sans-serif",fill:"currentColor"},t[n]?.label??`Axis ${n}`))}return e},[a,g,t,m,b,v]),$=s(()=>{if(g<3||0===n.length)return[];const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=[],l=[],a=[];for(let e=0;e<g;e++){const n=r.values[e]??0,s=S[e],d=Math.min(n/s,1),f=m*d,u=vo(e,g),h=So(b,v,f,u);i.push(`${h.x},${h.y}`),p&&l.push(o("circle",{key:`dot-${t}-${e}`,cx:String(h.x),cy:String(h.y),r:"3.5",fill:r.color,stroke:"#fff","stroke-width":"1.5"})),c&&a.push(o("text",{key:`val-${t}-${e}`,x:String(h.x),y:String(h.y-8),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:r.color},String(Math.round(100*n)/100)))}e.push(o("polygon",{key:`series-fill-${t}`,points:i.join(" "),fill:r.color,"fill-opacity":String(r.fillOpacity??.15),stroke:"none"})),e.push(o("polygon",{key:`series-line-${t}`,points:i.join(" "),fill:"none",stroke:r.color,"stroke-width":"2","stroke-linejoin":"round"}));for(const t of l)e.push(t);for(const t of a)e.push(t)}return e},[g,n,S,m,b,v,p,c]),M=s(()=>{if(!f||0===n.length)return[];const e=[],t=v+m+40,r=100*n.length,i=b-r/2;for(let r=0;r<n.length;r++){const l=n[r],a=i+100*r;e.push(o("rect",{key:`legend-swatch-${r}`,x:String(a),y:String(t),width:"12",height:"12",rx:"2",fill:l.color})),e.push(o("text",{key:`legend-text-${r}`,x:String(a+16),y:String(t+10),"font-size":"12","font-family":"sans-serif",fill:"currentColor"},l.label))}return e},[f,n,b,v,m]),C=s(()=>h?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},h)]:[],[h,r]);if(g<3)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Radar chart — insufficient axes"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"Radar chart requires at least 3 axes."));const z=k(),I=w(),A=$(),F=M(),R=C();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Radar chart",style:{fontFamily:"sans-serif"}},...R,...z,...I,...A,...F)},exports.RadioGroup=function(e){const t=f(),n=e.id??t,{options:r,value:i,onChange:l,name:a,direction:d="vertical",disabled:c=!1,error:p,label:u}=e,h=s(e=>{c||l(e)},[c,l]),g=s(e=>{if(c)return;const t=r.filter(e=>!e.disabled);if(0===t.length)return;const n=t.findIndex(e=>e.value===i);let o=n;if("ArrowDown"===e.key||"ArrowRight"===e.key)e.preventDefault(),o=n<t.length-1?n+1:0;else{if("ArrowUp"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault(),o=n>0?n-1:t.length-1}l(t[o].value)},[c,r,i,l]),x={display:"flex",flexDirection:"horizontal"===d?"row":"column",gap:"horizontal"===d?"16px":"8px"},y=r.map((e,t)=>{const r=e.value===i,l=c||!!e.disabled,s=`${n}-opt-${t}`,d={width:"18px",height:"18px",minWidth:"18px",borderRadius:"50%",border:"2px solid "+(p?"#ef4444":r?"#3b82f6":"#d1d5db"),display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color 0.15s",boxSizing:"border-box"},f={width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#3b82f6",transition:"transform 0.15s",transform:r?"scale(1)":"scale(0)"},u={display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer",opacity:l?"0.5":"1",userSelect:"none"};return o("label",{key:e.value,htmlFor:s,style:u,onClick:l?void 0:t=>{t.preventDefault(),h(e.value)}},o("input",{type:"radio",id:s,name:a,value:e.value,checked:r,disabled:l,style:{position:"absolute",opacity:"0",width:"0",height:"0",pointerEvents:"none"},tabIndex:-1}),o("div",{style:d},o("div",{style:f})),o("span",{style:{fontSize:"14px",color:"#374151"}},e.label))});return o(te,{label:u,error:p,htmlFor:`${n}-opt-0`},o("div",{id:n,style:x,role:"radiogroup","aria-label":u,onKeyDown:g,tabIndex:c?-1:0},...y))},exports.SankeyDiagram=function(e){const{nodes:t,links:n,width:r=800,height:i=500,nodeWidth:l=20,nodePadding:a=10,showLabels:c=!0,showValues:f=!1,linkOpacity:p=.4,colors:u=ko,title:h,padding:g=40}=e;if(!t||0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty Sankey diagram"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const x=d(()=>function(e,t,n,o,r,i,l,a){if(0===e.length)return{layoutNodes:[],layoutLinks:[]};const s=n-2*l,d=o-2*l,c=t.filter(e=>e.value>0),f=e.map(e=>e.id),p=function(e,t){const n=new Map,o=new Map,r=new Map;for(const t of e)o.set(t,new Set),r.set(t,[]);for(const e of t){if(e.value<=0)continue;const t=o.get(e.target);t&&t.add(e.source);const n=r.get(e.source);n&&n.push(e.target)}const i=[];for(const t of e)0===o.get(t).size&&(n.set(t,0),i.push(t));if(0===i.length){for(const t of e)n.set(t,0);return n}let l=0;for(;l<i.length;){const e=i[l];l++;const t=n.get(e),o=r.get(e)??[];for(const e of o){const o=n.get(e),r=t+1;(void 0===o||r>o)&&n.set(e,r),i.includes(e)||i.push(e)}}for(const t of e)n.has(t)||n.set(t,0);return n}(f,c),u=new Map,h=new Map;for(const e of f)u.set(e,0),h.set(e,0);for(const e of c)h.set(e.source,(h.get(e.source)??0)+e.value),u.set(e.target,(u.get(e.target)??0)+e.value);let g=0;for(const e of p.values())e>g&&(g=e);const x=new Map;for(let e=0;e<=g;e++)x.set(e,[]);for(const[e,t]of p)x.get(t).push(e);const y=new Map,m=g>0?(s-r)/g:0;for(let e=0;e<=g;e++)y.set(e,l+e*m);const b=new Map;for(let t=0;t<e.length;t++)b.set(e[t].id,e[t]);const v=[],S=new Map;for(let t=0;t<=g;t++){const n=x.get(t);if(0===n.length)continue;let o=0;for(const e of n){const t=u.get(e)??0,n=h.get(e)??0;o+=Math.max(t,n,1)}const r=d-i*(n.length-1),s=o>0?r/o:1;let c=l;for(let o=0;o<n.length;o++){const r=n[o],l=b.get(r),d=u.get(r)??0,f=h.get(r)??0,p=Math.max(d,f,1),g=Math.max(4,p*s),x=e.findIndex(e=>e.id===r),m={id:r,label:l.label,color:l.color??a[x%a.length],column:t,x:y.get(t),y:c,height:g,totalIn:d,totalOut:f,totalValue:p};v.push(m),S.set(r,m),c+=g+i}}const k=new Map,w=new Map;for(const e of f)k.set(e,0),w.set(e,0);const $=[...c].sort((e,t)=>t.value-e.value),M=[];for(const e of $){const t=S.get(e.source),n=S.get(e.target);if(!t||!n)continue;const o=t.totalOut||1,r=n.totalIn||1,i=e.value/o*t.height,l=e.value/r*n.height,a=Math.max(1,(i+l)/2),s=k.get(e.source),d=w.get(e.target),c=t.y+s+i/2,f=n.y+d+l/2;k.set(e.source,s+i),w.set(e.target,d+l);const p=b.get(e.source);M.push({source:e.source,target:e.target,value:e.value,color:e.color??p?.color??t.color,sourceY:c,targetY:f,width:a})}return{layoutNodes:v,layoutLinks:M}}(t,n,r,i,l,a,g,u),[t,n,r,i,l,a,g,u]),y=s(()=>{const e=[];for(let t=0;t<x.layoutLinks.length;t++){const n=x.layoutLinks[t],r=x.layoutNodes.find(e=>e.id===n.source),i=x.layoutNodes.find(e=>e.id===n.target);if(!r||!i)continue;const a=r.x+l,s=i.x,d=(a+s)/2,c=`M ${a} ${n.sourceY} C ${d} ${n.sourceY}, ${d} ${n.targetY}, ${s} ${n.targetY}`;e.push(o("path",{key:`link-${t}`,d:c,fill:"none",stroke:n.color,"stroke-width":String(Math.max(1,n.width)),"stroke-opacity":String(p),"stroke-linecap":"butt"})),f&&n.value>0&&e.push(o("text",{key:`link-val-${t}`,x:String(d),y:String((n.sourceY+n.targetY)/2-4),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280","pointer-events":"none"},String(n.value)))}return e},[x,l,p,f]),m=s(()=>{const e=[];for(let t=0;t<x.layoutNodes.length;t++){const n=x.layoutNodes[t];if(e.push(o("rect",{key:`node-${n.id}`,x:String(n.x),y:String(n.y),width:String(l),height:String(n.height),fill:n.color,stroke:"#374151","stroke-width":"0.5",role:"img","aria-label":`${n.label}: ${n.totalValue}`})),c){const t=x.layoutNodes.reduce((e,t)=>Math.max(e,t.column),0),r=n.column===t,i=r?n.x+l+6:n.x-6,a=r?"start":"end",s=0===n.column,d=s?n.x-6:i,c=s?"end":a;e.push(o("text",{key:`label-${n.id}`,x:String(d),y:String(n.y+n.height/2+4),"text-anchor":c,"font-size":"11","font-family":"sans-serif",fill:"#374151","pointer-events":"none"},n.label))}}return e},[x,l,c]),b=s(()=>h?[o("text",{key:"title",x:String(r/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,r,g]),v=y(),S=m(),k=b();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Sankey diagram",style:{fontFamily:"sans-serif"}},...k,...v,...S)},exports.ScrollContainer=function(e){const t=e.direction??"vertical",n=e.showScrollbar??"auto",r=e.shadow??!1,i=c(null),[f,p]=l(!0),[u,h]=l(!1),[g,x]=l(!0),[y,m]=l(!1),b=s(()=>{const e=i.current;e&&(p(e.scrollTop<=2),h(e.scrollTop+e.clientHeight>=e.scrollHeight-2),x(e.scrollLeft<=2),m(e.scrollLeft+e.clientWidth>=e.scrollWidth-2))},[]);a(()=>{b()},[b]);const v=s(()=>{r&&b()},[r,b]),S=d(()=>{const o={position:"relative",overflowX:be(t,"x"),overflowY:be(t,"y"),...ve(n)};return e.maxHeight&&(o.maxHeight=e.maxHeight),e.maxWidth&&(o.maxWidth=e.maxWidth),e.padding&&(o.padding=e.padding),{...o,...e.style??{}}},[t,n,e.maxHeight,e.maxWidth,e.padding,e.style]),k=[];if(r){const e="vertical"===t||"both"===t,n="horizontal"===t||"both"===t;e&&!f&&k.push("inset 0 8px 6px -6px rgba(0,0,0,0.15)"),e&&!u&&k.push("inset 0 -8px 6px -6px rgba(0,0,0,0.15)"),n&&!g&&k.push("inset 8px 0 6px -6px rgba(0,0,0,0.15)"),n&&!y&&k.push("inset -8px 0 6px -6px rgba(0,0,0,0.15)")}const w={...S};return k.length>0&&(w.boxShadow=k.join(", ")),o("div",{className:`scroll-container scroll-container--${t} ${e.className??""}`.trim(),style:w,ref:i,onScroll:v},e.children)},exports.Select=function(e){const t=f(),n=e.id??t,{options:r,value:i,onChange:p,placeholder:u="Select...",searchable:h=!1,multiple:g=!1,clearable:x=!1,disabled:y=!1,error:m,label:b,helpText:v}=e,[S,k]=l(!1),[w,$]=l(""),[M,C]=l(-1),z=c(null),I=d(()=>Array.isArray(i)?i:i?[i]:[],[i]),A=d(()=>{if(!h||!w)return r;const e=w.toLowerCase();return r.filter(t=>t.label.toLowerCase().includes(e))},[r,w,h]),F=d(()=>{const e={},t=[];for(const n of A)n.group?(e[n.group]||(e[n.group]=[]),e[n.group].push(n)):t.push(n);return{groups:e,ungrouped:t}},[A]),R=d(()=>0===I.length?"":I.map(e=>r.find(t=>t.value===e)).filter(Boolean).map(e=>e.label).join(", "),[I,r]);a(()=>{const e=e=>{const t=e.target;z.current&&!z.current.contains(t)&&(k(!1),$(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const D=s(e=>{if(g){const t=I.includes(e)?I.filter(t=>t!==e):[...I,e];p(t)}else p(e),k(!1),$("")},[g,I,p]),L=s(e=>{e.stopPropagation(),p(g?[]:"")},[g,p]),N=s(e=>{if(y)return;const t=e.key;if(!S&&("Enter"===t||" "===t||"ArrowDown"===t))return e.preventDefault(),k(!0),void C(0);if(S){if("Escape"===t)return k(!1),void $("");if("ArrowDown"===t)e.preventDefault(),C(e=>Math.min(e+1,A.length-1));else if("ArrowUp"===t)e.preventDefault(),C(e=>Math.max(e-1,0));else if("Enter"===t&&M>=0&&M<A.length){e.preventDefault();const t=A[M];t.disabled||D(t.value)}}},[y,S,M,A,D]),T={...ne({},{focused:S,error:!!m}),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:y?"not-allowed":"pointer",minHeight:"38px",userSelect:"none"},W=(e,t)=>{const n=I.includes(e.value),r=t===M,i={padding:"8px 12px",cursor:e.disabled?"not-allowed":"pointer",backgroundColor:r?"#f3f4f6":n?"#eff6ff":"transparent",color:e.disabled?"#9ca3af":"#1f2937",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px"};return o("div",{key:e.value,style:i,onClick:e.disabled?void 0:()=>D(e.value),onMouseEnter:()=>C(t),role:"option","aria-selected":n?"true":"false","aria-disabled":e.disabled?"true":void 0},g&&n?o("span",{style:{color:"#3b82f6",fontWeight:"700"}},"✓"):null,e.label)},B=o("span",{style:{marginLeft:"8px",fontSize:"10px",transition:"transform 0.15s",transform:S?"rotate(180deg)":"rotate(0deg)",color:"#6b7280"}},"▼"),E=o("div",{style:T,id:n,onClick:y?void 0:()=>{k(!S),C(-1)},onKeyDown:N,tabIndex:y?-1:0,role:"combobox","aria-expanded":S?"true":"false","aria-haspopup":"listbox"},o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:R?"#1f2937":"#9ca3af"}},R||u),o("span",{style:{display:"flex",alignItems:"center",gap:"4px"}},x&&I.length>0?o("span",{onClick:L,onKeyDown:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),e.stopPropagation(),L(e))},style:{cursor:"pointer",color:"#9ca3af",fontSize:"14px",lineHeight:"1"},role:"button",tabIndex:0,"aria-label":"Clear selection"},"✕"):null,B)),P=h&&S?o("input",{type:"text",value:w,onInput:e=>{$(e.target.value),C(0)},placeholder:"Search...",style:{width:"100%",boxSizing:"border-box",padding:"8px 12px",border:"none",borderBottom:"1px solid #e5e7eb",outline:"none",fontSize:"14px"}}):null,H=S?o("div",{style:{position:"absolute",top:"100%",left:"0",right:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",maxHeight:"240px",overflowY:"auto"},role:"listbox"},P,...(()=>{const e=[];let t=0;const{groups:n,ungrouped:r}=F;for(const n of r)e.push(W(n,t++));for(const r of Object.keys(n)){e.push(o("div",{key:`group-${r}`,style:{padding:"6px 12px",fontSize:"11px",fontWeight:"600",color:"#6b7280",textTransform:"uppercase",letterSpacing:"0.05em"}},r));for(const o of n[r])e.push(W(o,t++))}return 0===e.length&&e.push(o("div",{style:{padding:"8px 12px",color:"#9ca3af",fontSize:"14px"}},"No options")),e})()):null;return o(te,{label:b,error:m,helpText:v,disabled:y,htmlFor:n},o("div",{ref:z,style:{position:"relative"}},E,H))},exports.Sidebar=function(e){const{items:t,collapsed:n=!1,onToggleCollapse:r,selectedId:i,onSelect:l,width:a="240px",collapsedWidth:s="56px"}=e,d=n?"number"==typeof s?`${s}px`:s:"number"==typeof a?`${a}px`:a,c=r?o("button",{type:"button",onClick:r,"aria-label":n?"Expand sidebar":"Collapse sidebar",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",padding:"10px 0",border:"none",borderBottom:"1px solid #e5e7eb",backgroundColor:"transparent",cursor:"pointer",fontSize:"14px",color:"#6b7280",fontFamily:"inherit"}},n?"▶":"◀"):null,f=t.map(e=>o(We,{key:e.id,item:e,collapsed:n,selectedId:i,onSelect:l,depth:0}));return o(ke,{orientation:"vertical",role:"navigation",ariaLabel:"Sidebar",keyboardNav:!0,styling:{width:d,border:"1px solid #e5e7eb",borderRadius:"0",padding:"0",backgroundColor:"#ffffff",custom:{height:"100%",transition:"width 0.2s",overflow:"hidden"}}},c,...f)},exports.Skeleton=function(e){const t=e.variant??"text",n=!1!==e.animated,r=f().replace(/[^a-zA-Z0-9_-]/g,""),i=d(()=>n?`@keyframes liq-shimmer-${r}{0%{background-position:-200% 0}100%{background-position:200% 0}}`:"",[n,r]),l="number"==typeof e.width?`${e.width}px`:e.width,a="number"==typeof e.height?`${e.height}px`:e.height;if("text"===t){const t=e.lines??1,s=[];for(let i=0;i<t;i++){const d=i===t-1&&t>1;s.push(o("div",{key:String(i),style:J({width:d?"75%":l??"100%",height:a??"1em",borderRadius:e.borderRadius??"4px",animated:n,animId:r,marginBottom:i<t-1?"8px":"0"})}))}return o("div",{"aria-hidden":"true",style:{width:l??"100%"}},i?o("style",null,i):null,...s)}if("circular"===t){const e=l??a??"40px";return o("div",{"aria-hidden":"true"},i?o("style",null,i):null,o("div",{style:J({width:e,height:e,borderRadius:"50%",animated:n,animId:r})}))}return o("div",{"aria-hidden":"true"},i?o("style",null,i):null,o("div",{style:J({width:l??"100%",height:a??"100px",borderRadius:e.borderRadius??"4px",animated:n,animId:r})}))},exports.Slider=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,min:p=0,max:u=100,step:h=1,showValue:g=!1,showTicks:x=!1,disabled:y=!1,marks:m,range:b=!1,label:v,error:S}=e,k=c(null),[w,$]=l(null),M=d(()=>{if(b&&Array.isArray(r))return r;const e="number"==typeof r?r:0;return[e,e]},[r,b]),C=e=>{const t=Math.round((e-p)/h)*h+p;return Math.max(p,Math.min(u,t))},z=e=>(e-p)/(u-p)*100,I=s(e=>{if(!k.current)return p;const t=k.current.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));return C(p+n*(u-p))},[p,u,h]),A=s(e=>t=>{y||(t.preventDefault(),$(e))},[y]),F=s(e=>{if(y)return;const t=I(e);if(b){const e=Math.abs(t-M[0]),n=Math.abs(t-M[1]);i(e<=n?[C(t),M[1]]:[M[0],C(t)])}else i(C(t))},[y,I,b,M,i,p,u,h]);a(()=>{if(!w)return;const e=e=>{const t=I(e);"single"===w?i(C(t)):"start"===w?i([Math.min(C(t),M[1]),M[1]]):"end"===w&&i([M[0],Math.max(M[0],C(t))])},t=()=>$(null);return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[w,I,M,i,p,u,h]);const R=s(e=>{if(y)return;let t=0;if("ArrowRight"===e.key||"ArrowUp"===e.key)t=h;else{if("ArrowLeft"!==e.key&&"ArrowDown"!==e.key)return;t=-h}e.preventDefault(),b||i(C(("number"==typeof r?r:0)+t))},[y,h,b,r,i,p,u]),D={position:"relative",width:"100%",height:"6px",backgroundColor:"#e5e7eb",borderRadius:"3px",cursor:y?"not-allowed":"pointer"},L=b?z(M[0]):0,N={position:"absolute",top:"0",left:`${L}%`,width:z(b?M[1]:M[0])-L+"%",height:"100%",backgroundColor:y?"#9ca3af":"#3b82f6",borderRadius:"3px"},T=e=>v?"start"===e?`${v} minimum`:"end"===e?`${v} maximum`:v:"start"===e?"Minimum value":"end"===e?"Maximum value":"Value",W=(e,t,r)=>o("div",{id:"single"===t||"start"===t?n:void 0,style:{position:"absolute",top:"50%",left:`${e}%`,transform:"translate(-50%, -50%)",width:"18px",height:"18px",borderRadius:"50%",backgroundColor:"#ffffff",border:"2px solid "+(y?"#9ca3af":"#3b82f6"),cursor:y?"not-allowed":"grab",boxShadow:"0 1px 3px rgba(0,0,0,0.15)",zIndex:"2"},onMouseDown:A(t),role:"slider","aria-valuenow":String(r),"aria-valuemin":String(p),"aria-valuemax":String(u),"aria-label":T(t),tabIndex:y?-1:0,onKeyDown:R},g?o("div",{style:{position:"absolute",bottom:"24px",left:"50%",transform:"translateX(-50%)",backgroundColor:"#1f2937",color:"#ffffff",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",whiteSpace:"nowrap"}},String(r)):null),B=[];if(x)for(let e=p;e<=u;e+=h)B.push(o("div",{key:`tick-${e}`,style:{position:"absolute",top:"10px",left:`${z(e)}%`,width:"1px",height:"6px",backgroundColor:"#d1d5db",transform:"translateX(-50%)"}}));const E=[];if(m)for(const e of m)E.push(o("div",{key:`mark-${e.value}`,style:{position:"absolute",top:"18px",left:`${z(e.value)}%`,transform:"translateX(-50%)",fontSize:"11px",color:"#6b7280",whiteSpace:"nowrap"}},e.label));const P={paddingTop:g?"28px":"8px",paddingBottom:m||x?"28px":"8px",opacity:y?"0.6":"1"},H=[];return b?(H.push(W(z(M[0]),"start",M[0])),H.push(W(z(M[1]),"end",M[1]))):H.push(W(z(M[0]),"single",M[0])),o(te,{label:v,error:S,htmlFor:n},o("div",{style:P},o("div",{ref:k,style:D,onClick:F},o("div",{style:N}),...H,...B,...E)))},exports.Spinner=function(e){const t="number"==typeof e.size?e.size:Q[e.size??"md"]??24,n=e.color??"#3b82f6",r=e.thickness??Math.max(2,Math.round(t/8)),i=ee[e.speed??"normal"]??ee.normal,l=e.label??"Loading",a=f().replace(/[^a-zA-Z0-9_-]/g,""),s=(t-r)/2,c=2*Math.PI*s;return o("span",{role:"status","aria-label":l,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"}},o("style",null,d(()=>`@keyframes liq-rotate-${a}{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,[a])),o("svg",{width:String(t),height:String(t),viewBox:`0 0 ${t} ${t}`,style:{animation:`liq-rotate-${a} ${i} linear infinite`}},o("circle",{cx:String(t/2),cy:String(t/2),r:String(s),fill:"none",stroke:n,"stroke-width":String(r),"stroke-dasharray":`${.7*c} ${.3*c}`,"stroke-linecap":"round"})),o("span",{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",borderWidth:"0"}},l))},exports.Splitter=function(e){const t=e.direction??"horizontal",n="horizontal"===t,r=e.dividerSize??6,i=e.minSize??50,[f,p]=l(e.initialSplit??50),u=c(null),h=c(!1),g=s(e=>{e.preventDefault(),h.current=!0,document.body.style.cursor=n?"col-resize":"row-resize",document.body.style.userSelect="none"},[n]);a(()=>{const t=t=>{if(!h.current||!u.current)return;const o=u.current.getBoundingClientRect(),r=n?o.width:o.height,l=n?t.clientX-o.left:t.clientY-o.top;if(r<=0)return;const a=i/r*100,s=e.maxSize?e.maxSize/r*100:100-a;let d=l/r*100;d=Math.max(a,Math.min(s,d)),p(d)},o=()=>{h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",o),()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",o)}},[n,i,e.maxSize]);const x=d(()=>({display:"flex",flexDirection:n?"row":"column",width:"100%",height:"100%",overflow:"hidden",...e.style??{}}),[n,e.style]),y=n?{width:`calc(${f}% - ${r/2}px)`,overflow:"auto",flexShrink:"0"}:{height:`calc(${f}% - ${r/2}px)`,overflow:"auto",flexShrink:"0"},m={flexShrink:"0",backgroundColor:"#e5e7eb",transition:"background-color 0.15s",...n?{width:`${r}px`,cursor:"col-resize",height:"100%"}:{height:`${r}px`,cursor:"row-resize",width:"100%"}},b=Array.isArray(e.children)?e.children:[];return o("div",{className:`splitter splitter--${t} ${e.className??""}`.trim(),style:x,ref:u},o("div",{className:"splitter__pane splitter__pane--first",style:y},b[0]??null),o("div",{className:"splitter__divider",style:m,onMouseDown:g,onKeyDown:e=>{const t=e.key;!n||"ArrowLeft"!==t&&"ArrowRight"!==t?n||"ArrowUp"!==t&&"ArrowDown"!==t||(e.preventDefault(),p(e=>{const n="ArrowDown"===t?2:-2;return Math.max(5,Math.min(95,e+n))})):(e.preventDefault(),p(e=>{const n="ArrowRight"===t?2:-2;return Math.max(5,Math.min(95,e+n))}))},role:"separator",tabIndex:0,"aria-orientation":n?"vertical":"horizontal","aria-valuenow":String(Math.round(f)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Resize panels"}),o("div",{className:"splitter__pane splitter__pane--second",style:{flex:"1",overflow:"auto",minWidth:"0",minHeight:"0"}},b[1]??null))},exports.Stepper=function(e){const{steps:t,currentStep:n,orientation:r="horizontal",onChange:i,clickable:l=!1,variant:a="circle"}=e,d="horizontal"===r,c="circle"===a?32:12,f="dot"===a?12:32,p=s(e=>{l&&i&&i(e)},[l,i]),u=[];return t.forEach((e,r)=>{u.push(((e,t)=>{const r=(e=>e<n?"completed":e===n?"active":"pending")(t),i="active"===r,s="completed"===r,u=((e,t,n)=>{const r="dot"===a?f:c,i={width:`${r}px`,height:`${r}px`,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"circle"===a?"14px":"0",fontWeight:"600",flexShrink:"0",transition:"background-color 0.2s, border-color 0.2s"};return"completed"===n?o("div",{style:{...i,backgroundColor:"#2563eb",color:"#ffffff",border:"2px solid #2563eb"}},"circle"===a?t.icon||"✓":null):"active"===n?o("div",{style:{...i,backgroundColor:"#ffffff",color:"#2563eb",border:"2px solid #2563eb",boxShadow:"0 0 0 3px rgba(37, 99, 235, 0.2)"}},"circle"===a?t.icon||String(e+1):o("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#2563eb"}})):o("div",{style:{...i,backgroundColor:"#ffffff",color:"#9ca3af",border:"2px solid #d1d5db"}},"circle"===a?t.icon||String(e+1):null)})(t,e,r),h={fontSize:"11px",color:"#6b7280",marginTop:"2px",textAlign:d?"center":"left"},g=o("div",{style:d?{display:"flex",flexDirection:"column",alignItems:"center"}:{display:"flex",flexDirection:"column"}},o("span",{style:{fontSize:"13px",fontWeight:i?"600":"400",color:i||s?"#1f2937":"#9ca3af",marginTop:d?"8px":"0",marginLeft:d?"0":"12px",textAlign:d?"center":"left",transition:"color 0.2s"}},e.label),e.description?o("span",{style:h},e.description):null),x=o("div",d?{style:{display:"flex",flexDirection:"column",alignItems:"center"}}:{style:{display:"flex",flexDirection:"row",alignItems:"center"}},u,g);return o(l?"button":"div",{key:String(t),onClick:l?()=>p(t):void 0,style:{display:"flex",flexDirection:d?"column":"row",alignItems:d?"center":"flex-start",background:"none",border:"none",padding:"0",cursor:l?"pointer":"default",fontFamily:"inherit",outline:"none"},"aria-current":i?"step":void 0},x)})(e,r));const i=(e=>{if(e>=t.length-1)return null;const r=e<n?"#2563eb":"#d1d5db";return o("div",d?{style:{flex:"1",height:"2px",backgroundColor:r,margin:"0 8px",alignSelf:"center",transition:"background-color 0.2s"}}:{style:{width:"2px",flex:"1",minHeight:"24px",backgroundColor:r,marginLeft:("dot"===a?f:c)/2-1+"px",transition:"background-color 0.2s"}})})(r);i&&u.push(i)}),o("div",{role:"navigation","aria-label":"Progress steps",style:{display:"flex",flexDirection:d?"row":"column",alignItems:d?"flex-start":"stretch",width:"100%"}},...u)},exports.Sunburst=function(e){const{data:t,width:n=500,height:r=500,innerRadius:i=40,showLabels:l=!0,colors:a=wo,strokeColor:s="#ffffff",strokeWidth:c=1,title:f}=e,p=n/2,u=r/2,h=f?20:0,g=Math.min(p,u-h)-10;if(d(()=>Mo(t),[t])<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":f??"Empty sunburst chart"},o("text",{x:String(p),y:String(u),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const x=d(()=>function(e,t,n,o){const r=[],i=Mo(e);if(i<=0)return r;const l=function(e){let t=0;const n=[{node:e,depth:0}];for(;n.length>0;){const{node:e,depth:o}=n.pop();if(o>t&&(t=o),e.children)for(let t=e.children.length-1;t>=0;t--)n.push({node:e.children[t],depth:o+1})}return t}(e),a=l>0?(n-t)/(l+1):n-t,s=[];if(!(e.children&&e.children.length>0))return r.push({startAngle:0,endAngle:$o,innerR:t,outerR:t+a,label:e.label,value:i,color:e.color??o[0],depth:0}),r;{let t=0;for(let n=0;n<e.children.length;n++){const o=e.children[n],r=Mo(o);if(r<=0)continue;const l=r/i*$o;s.push({node:o,startAngle:t,endAngle:t+l,depth:0,colorIndex:n}),t+=l}}for(;s.length>0;){const e=s.shift(),{node:n,startAngle:i,endAngle:l,depth:d,colorIndex:c}=e,f=Mo(n);if(f<=0)continue;const p=t+d*a,u=p+a;if(r.push({startAngle:i,endAngle:l,innerR:p,outerR:u,label:n.label,value:f,color:n.color??o[c%o.length],depth:d}),n.children&&n.children.length>0){let e=i;const t=l-i;for(let o=0;o<n.children.length;o++){const r=n.children[o],i=Mo(r);if(i<=0)continue;const l=i/f*t;s.push({node:r,startAngle:e,endAngle:e+l,depth:d+1,colorIndex:c}),e+=l}}}return r}(t,i,g,a),[t,i,g,a]),y=[];f&&y.push(o("text",{key:"title",x:String(p),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},f));const m=u+h/2;for(let e=0;e<x.length;e++){const t=x[e],n=Co(p,m,t.innerR,t.outerR,t.startAngle,t.endAngle);if(y.push(o("path",{key:`arc-${e}`,d:n,fill:t.color,stroke:s,"stroke-width":String(c),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),l){const n=t.endAngle-t.startAngle,r=t.startAngle+n/2-Math.PI/2,i=(t.innerR+t.outerR)/2,l=t.outerR-t.innerR,a=n*i;if(a>20&&l>14){const n=p+i*Math.cos(r),s=m+i*Math.sin(r),d=Math.floor(Math.min(a,l)/7),c=t.label.length>d?t.label.substring(0,Math.max(1,d-1))+"..":t.label;y.push(o("text",{key:`label-${e}`,x:String(n),y:String(s+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},c))}}}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":f??"Sunburst chart",style:{fontFamily:"sans-serif"}},...y)},exports.Tabs=function(e){const t=e.position??"top",n=e.variant??"line",r=e.tabs.find(e=>!e.disabled)?.id??"",[i,a]=l(e.activeTab??r),f=e.activeTab??i,p=c(null),u=s(t=>{a(t),e.onChange&&e.onChange(t)},[e.onChange]),h=s(n=>{const o=e.tabs.filter(e=>!e.disabled),r=o.findIndex(e=>e.id===f);if(-1===r)return;const i="left"===t||"right"===t,l=i?"ArrowUp":"ArrowLeft",a=i?"ArrowDown":"ArrowRight";let s=-1;if(n.key===l?s=r>0?r-1:o.length-1:n.key===a?s=r<o.length-1?r+1:0:"Home"===n.key?s=0:"End"===n.key&&(s=o.length-1),s>=0){n.preventDefault(),u(o[s].id);const t=p.current;if(t){const n=t.querySelectorAll('[role="tab"]')[e.tabs.indexOf(o[s])];n&&n.focus()}}},[e.tabs,f,t,u]),g="left"===t||"right"===t,x="bottom"===t||"right"===t,y=d(()=>({display:"flex",flexDirection:g?x?"row-reverse":"row":x?"column-reverse":"column",width:"100%",...e.style??{}}),[g,x,e.style]),m={display:"flex",flexDirection:g?"column":"row",gap:"pill"===n?"4px":"0",..."line"!==n||g?{}:{borderBottom:"2px solid #e5e7eb"},..."line"===n&&g?{borderRight:"left"===t?"2px solid #e5e7eb":"none",borderLeft:"right"===t?"2px solid #e5e7eb":"none"}:{},..."card"===n?{backgroundColor:"#f9fafb"}:{},..."pill"===n?{padding:"4px"}:{},flexShrink:"0"},b=e.tabs.find(e=>e.id===f),v=e.tabs.map(e=>{const r=e.id===f,i={padding:"8px 16px",border:"none",background:"none",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?"0.5":"1",fontSize:"14px",fontWeight:r?"600":"400",color:r?"#3b82f6":"#6b7280",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"6px",outline:"none",transition:"color 0.15s, background-color 0.15s"};return"line"===n?g?"left"===t?(i.borderRight=r?"2px solid #3b82f6":"2px solid transparent",i.marginRight="-2px"):(i.borderLeft=r?"2px solid #3b82f6":"2px solid transparent",i.marginLeft="-2px"):(i.borderBottom=r?"2px solid #3b82f6":"2px solid transparent",i.marginBottom="-2px"):"card"===n?(i.backgroundColor=r?"#ffffff":"transparent",i.borderRadius="6px 6px 0 0",r&&(i.border="1px solid #e5e7eb",i.borderBottom="1px solid #ffffff")):"pill"===n&&(i.borderRadius="9999px",i.backgroundColor=r?"#3b82f6":"transparent",i.color=r?"#ffffff":"#6b7280"),o("button",{key:e.id,role:"tab","aria-selected":String(r),"aria-controls":`tabpanel-${e.id}`,"aria-disabled":e.disabled?"true":void 0,id:`tab-${e.id}`,tabIndex:r?"0":"-1",style:i,onClick:e.disabled?void 0:()=>u(e.id),onKeyDown:h},e.icon?o("span",{className:"tabs__tab-icon"},e.icon):null,e.label)});return o("div",{className:`tabs tabs--${t} tabs--${n} ${e.className??""}`.trim(),style:y},o("div",{className:"tabs__list",role:"tablist","aria-orientation":g?"vertical":"horizontal",style:m,ref:p},...v),o("div",{className:"tabs__panel",role:"tabpanel",id:`tabpanel-${f}`,"aria-labelledby":`tab-${f}`,style:{flex:"1",padding:"16px",minWidth:"0",minHeight:"0"},tabIndex:"0"},b?b.content:null))},exports.Tag=function(e){const{label:t,color:n,variant:r="subtle",size:i="md",removable:l=!1,onRemove:a,icon:s,onClick:d,disabled:c=!1}=e,f=function(e,t,n,o,r){const i=V[n],l={display:"inline-flex",alignItems:"center",gap:i.gap,borderRadius:"9999px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:i.fontSize,fontWeight:"500",padding:i.padding,lineHeight:"1.4",whiteSpace:"nowrap",border:"none",transition:"opacity 0.15s ease, filter 0.15s ease",...o?{cursor:"pointer"}:{},...r?{opacity:"0.5",cursor:"default",pointerEvents:"none"}:{}};switch(t){case"solid":return{...l,backgroundColor:e,color:"#fff",border:"none"};case"outline":return{...l,backgroundColor:"transparent",color:e,border:`1px solid ${e}`};case"subtle":return{...l,backgroundColor:G(e,.12),color:e,border:"none"};default:return l}}(function(e){return e??"#3b82f6"}(n),r,i,!!d,c),p=[];return s&&p.push(o("span",{key:"icon",style:{display:"inline-flex",flexShrink:"0"}},s)),p.push(o("span",{key:"label"},t)),l&&p.push(o("button",{key:"remove",type:"button",style:X,onClick:e=>{e.stopPropagation(),!c&&a&&a()},"aria-label":`Remove ${t}`,disabled:c},"×")),o("span",{style:f,role:d?"button":void 0,tabIndex:d&&!c?"0":void 0,onClick:!c&&d?d:void 0,onKeyDown:d&&!c?e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),d())}:void 0,"aria-disabled":c?"true":void 0},...p)},exports.TextEditor=function(e){const[t,n]=l(!1),r=c(null),i=f(),d=e.id??i,p=e.toolbar??pe,u=e.toolbarStyle??{},h=e.editorStyle??{};a(()=>{r.current&&void 0!==e.value&&(r.current.innerHTML=e.value)},[]);const g=s((t,n)=>{if(!e.disabled&&!e.readOnly){if("createLink"===t){const e=prompt("Enter URL:");if(!e)return;document.execCommand(t,!1,e)}else n&&"formatBlock"===t?document.execCommand(t,!1,`<${n}>`):document.execCommand(t,!1,n);r.current&&e.onChange&&e.onChange(r.current.innerHTML)}},[e.disabled,e.readOnly,e.onChange]),x=s(()=>{r.current&&e.onChange&&e.onChange(r.current.innerHTML)},[e.onChange]),y=s(()=>{n(!1),r.current&&e.onBlur&&e.onBlur(r.current.innerHTML)},[e.onBlur]),m=o("div",{className:"texteditor-toolbar",style:{display:"flex",flexWrap:"wrap",gap:"2px",padding:"6px 8px",backgroundColor:u.backgroundColor??"#f9fafb",borderBottom:u.borderBottom??"1px solid #e5e7eb",borderRadius:"6px 6px 0 0"}},...p.map(t=>{const n=ue[t];return n?o("button",{key:t,type:"button",title:n.label,onClick:()=>g(n.command,n.value),disabled:e.disabled||e.readOnly,style:{padding:"4px 8px",border:"none",borderRadius:"4px",backgroundColor:"transparent",color:u.buttonColor??"#374151",cursor:e.disabled?"not-allowed":"pointer",fontSize:u.buttonSize??"13px",fontWeight:"bold"===t?"700":"italic"===t?"400":"500",fontStyle:"italic"===t?"italic":"normal",textDecoration:"underline"===t?"underline":"strikethrough"===t?"line-through":"none",minWidth:"28px",textAlign:"center",lineHeight:"1.4"}},n.icon):null})),b=o("div",{ref:r,id:d,className:"texteditor-content",contentEditable:e.disabled?"false":"true",role:"textbox","aria-multiline":"true","aria-label":e.label??"Text editor","data-placeholder":e.placeholder??"",style:{padding:h.padding??"12px 14px",minHeight:e.minHeight??"200px",maxHeight:e.maxHeight??"none",overflow:"auto",backgroundColor:h.backgroundColor??"#ffffff",color:h.color??"#1f2937",fontFamily:h.fontFamily??"inherit",fontSize:h.fontSize??"14px",lineHeight:h.lineHeight??"1.6",outline:"none",borderRadius:"0 0 6px 6px",border:t?"1px solid #3b82f6":e.error?"1px solid #ef4444":"1px solid #d1d5db",borderTop:"none",transition:"border-color 0.15s"},onFocus:()=>n(!0),onBlur:y,onInput:x});return o(te,{label:e.label,htmlFor:d,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},o("div",{className:"texteditor",style:{border:t?"1px solid #3b82f6":e.error?"1px solid #ef4444":"1px solid #d1d5db",borderRadius:"6px",overflow:"hidden",transition:"border-color 0.15s"}},m,b))},exports.TextField=function(e){const[t,n]=l(!1),r=e.id??`tf-${Math.random().toString(36).slice(2,8)}`,i=ne(e.inputStyle??{},{focused:t,error:!!e.error}),a=!(!e.prefix&&!e.suffix),s=o("input",{type:e.type??"text",id:r,name:e.name,value:e.value,placeholder:e.placeholder,maxLength:e.maxLength?String(e.maxLength):void 0,pattern:e.pattern,autoComplete:e.autoComplete,autoFocus:e.autoFocus,readOnly:e.readOnly,disabled:e.disabled,"aria-invalid":e.error?"true":void 0,"aria-required":e.required?"true":void 0,className:`textfield-input ${e.className??""}`.trim(),style:a?{...i,border:"none",boxShadow:"none",flex:"1",minWidth:"0"}:i,onFocus:()=>n(!0),onBlur:t=>{n(!1),e.onBlur&&e.onBlur(t.target.value)},onInput:t=>{const n=t.target.value;e.onInput&&e.onInput(n),e.onChange&&e.onChange(n)},onKeyDown:t=>{"Enter"===t.key&&e.onEnter&&e.onEnter(t.target.value)}}),d=a?o("div",{style:{...i,display:"flex",alignItems:"center",gap:"8px",padding:"0"}},e.prefix?o("span",{style:{paddingLeft:"10px",color:"#9ca3af",flexShrink:"0"}},e.prefix):null,s,e.suffix?o("span",{style:{paddingRight:"10px",color:"#9ca3af",flexShrink:"0"}},e.suffix):null):s;return o(te,{label:e.label,htmlFor:r,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},d)},exports.ThreeDLayers=function(e){const{layers:t,width:n=700,height:r=500,perspective:i=.5,rotateX:l=35,rotateY:a=45,rotateZ:c=0,showLabels:f=!0,showAxes:p=!0,layerSpacing:u=2,colorScale:h=bn,gridColor:g="#94a3b8",title:x}=e,y=d(()=>{let e=0,n=0,o=0;for(let r=0;r<t.length;r++){const i=t[r],l=i.data.length;l>e&&(e=l);for(let e=0;e<l;e++){const t=i.data[e].length;t>n&&(n=t);for(let n=0;n<t;n++){const t=Math.abs(i.data[e][n]??0);t>o&&(o=t)}}}return{maxRows:Math.max(e,1),maxCols:Math.max(n,1),maxHeight:o>0?o:1}},[t]),m=d(()=>{const e=y.maxHeight+(t.length-1)*u+y.maxHeight,o=Math.sqrt(y.maxCols*y.maxCols+y.maxRows*y.maxRows+e*e),i=.75*Math.min(n,r);return o>0?i/o:1},[y,t.length,u,n,r]),b=n/2,v=r/2,S=s((e,t,n)=>function(e,t,n,o,r,i,l,a,s,d){const c=Math.cos(o*vn),f=Math.sin(o*vn),p=Math.cos(r*vn),u=Math.sin(r*vn),h=Math.cos(i*vn),g=Math.sin(i*vn),x=e*h-t*g,y=e*g+t*h,m=x*u+y*p,b=m*f+n*c,v=1+.001*l*b;return{sx:a+(x*p-y*u)*d*v,sy:s-(m*c-n*f)*d*v,depth:b}}(e,t,n,l,a,c,i,b,v,m),[l,a,c,i,b,v,m]),k=s(()=>{if(!p)return[];const e=[];Math.max(y.maxCols,y.maxRows);const n=y.maxCols/2,r=y.maxRows/2,i=S(-n,-r,0),l=S(n,-r,0);e.push(o("line",{key:"axis-x",x1:String(i.sx),y1:String(i.sy),x2:String(l.sx),y2:String(l.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-x-label",x:String(l.sx+8),y:String(l.sy+4),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"X"));const a=S(-n,r,0);e.push(o("line",{key:"axis-y",x1:String(i.sx),y1:String(i.sy),x2:String(a.sx),y2:String(a.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-y-label",x:String(a.sx-12),y:String(a.sy+4),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"Y"));const s=y.maxHeight+(t.length-1)*u,d=S(-n,-r,s);return e.push(o("line",{key:"axis-z",x1:String(i.sx),y1:String(i.sy),x2:String(d.sx),y2:String(d.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-z-label",x:String(d.sx-4),y:String(d.sy-8),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"Z")),e},[p,y,t.length,u,S]),w=s(()=>{const e=[],n=y.maxCols/2,r=y.maxRows/2,i=[];for(let e=0;e<t.length;e++){const o=t[e],l=o.color??h[e%h.length],a=o.opacity??.7,s=e*u,d=o.data.length;for(let t=0;t<d-1;t++){const d=o.data[t],c=o.data[t+1],f=Math.min(d.length,c.length);for(let o=0;o<f-1;o++){const f=o-n,p=o+1-n,u=t-r,h=t+1-r,g=(d[o]??0)+s,x=(d[o+1]??0)+s,y=(c[o]??0)+s,m=(c[o+1]??0)+s,b=S(f,u,g),v=S(p,u,x),k=S(f,h,y),w=S(p,h,m),$=(b.depth+v.depth+k.depth+w.depth)/4,M=`${b.sx},${b.sy} ${v.sx},${v.sy} ${w.sx},${w.sy} ${k.sx},${k.sy}`;i.push({points:M,fill:Sn(l,a),stroke:kn(l,.7),strokeWidth:"0.5",depth:$,key:`quad-${e}-${t}-${o}`})}}if(1===d||d>0&&1===o.data[0].length)for(let t=0;t<d;t++){const d=o.data[t];for(let o=0;o<d.length;o++){const c=o-n,f=t-r,p=(d[o]??0)+s,u=S(c,f,p),h=3,g=`${u.sx},${u.sy-h} ${u.sx+h},${u.sy} ${u.sx},${u.sy+h} ${u.sx-h},${u.sy}`;i.push({points:g,fill:Sn(l,a),stroke:kn(l,.7),strokeWidth:"0.5",depth:u.depth,key:`point-${e}-${t}-${o}`})}}}i.sort((e,t)=>e.depth-t.depth);for(let t=0;t<i.length;t++){const n=i[t];e.push(o("polygon",{key:n.key,points:n.points,fill:n.fill,stroke:n.stroke,"stroke-width":n.strokeWidth,"stroke-linejoin":"round"}))}return e},[t,y,u,h,S]),$=s(()=>{const e=[],t=y.maxCols/2,n=y.maxRows/2;for(let r=0;r<=y.maxRows;r++){const i=r-n,l=S(-t,i,0),a=S(t,i,0);e.push(o("line",{key:`base-h-${r}`,x1:String(l.sx),y1:String(l.sy),x2:String(a.sx),y2:String(a.sy),stroke:g,"stroke-width":"0.3","stroke-dasharray":"2 2",opacity:"0.5"}))}for(let r=0;r<=y.maxCols;r++){const i=r-t,l=S(i,-n,0),a=S(i,n,0);e.push(o("line",{key:`base-v-${r}`,x1:String(l.sx),y1:String(l.sy),x2:String(a.sx),y2:String(a.sy),stroke:g,"stroke-width":"0.3","stroke-dasharray":"2 2",opacity:"0.5"}))}return e},[y,g,S]),M=s(()=>{if(!f)return[];const e=[],n=y.maxCols/2;y.maxRows;for(let r=0;r<t.length;r++){const i=t[r],l=r*u;let a=0,s=0;for(let e=0;e<i.data.length;e++){const t=i.data[e];for(let e=0;e<t.length;e++)a+=t[e]??0,s++}const d=S(n+1,0,(s>0?a/s:0)+l),c=i.color??h[r%h.length];e.push(o("text",{key:`layer-label-${r}`,x:String(d.sx+8),y:String(d.sy+4),"font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:c},i.label))}return e},[f,t,y,u,h,S]),C=s(()=>x?[o("text",{key:"title",x:String(n/2),y:String(24),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},x)]:[],[x,n])(),z=$(),I=k(),A=w(),F=M(),R=0===t.length?[o("text",{key:"empty-msg",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No layer data")]:[];return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":x??"3D layer visualization",style:{fontFamily:"sans-serif",maxWidth:"100%"}},...C,...R,...z,...I,...A,...F)},exports.TimePicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,format:a="24h",minuteStep:c=1,disabled:p=!1,label:u,error:h,showSeconds:g=!1,timezone:x,showTimezone:y=!1,timezones:m=he,onTimezoneChange:b}=e,[v,S]=l(!1),k=d(()=>function(e){const t=e.split(":");return{hour:parseInt(t[0],10)||0,minute:parseInt(t[1],10)||0,second:parseInt(t[2],10)||0}}(r),[r]),w="12h"===a,$=k.hour>=12,M=w?k.hour%12||12:k.hour,C=s((e,t,n)=>{const o=Math.max(0,Math.min(23,e)),r=Math.max(0,Math.min(59,t)),l=Math.max(0,Math.min(59,n??0));i(g?`${ge(o)}:${ge(r)}:${ge(l)}`:`${ge(o)}:${ge(r)}`)},[i,g]),z=s(e=>{let t=parseInt(e.target.value,10)||0;w&&(t%=12,$&&(t+=12)),C(t,k.minute,k.second)},[w,$,k.minute,k.second,C]),I=s(e=>{const t=parseInt(e.target.value,10)||0;C(k.hour,t,k.second)},[k.hour,k.second,C]),A=s(e=>{const t=parseInt(e.target.value,10)||0;C(k.hour,k.minute,t)},[k.hour,k.minute,C]),F=s(()=>{if(p)return;const e=$?k.hour-12:k.hour+12;C(e,k.minute,k.second)},[p,$,k.hour,k.minute,k.second,C]),R=s(e=>{p||C(k.hour+e,k.minute,k.second)},[p,k.hour,k.minute,k.second,C]),D=s(e=>{p||C(k.hour,k.minute+e*c,k.second)},[p,k.hour,k.minute,k.second,c,C]),L=s(e=>{p||C(k.hour,k.minute,k.second+e)},[p,k.hour,k.minute,k.second,C]),N=s(e=>{const t=e.target.value;b&&b(t)},[b]),T={display:"inline-flex",alignItems:"center",gap:"4px",...ne({},{focused:v,error:!!h})},W={display:"flex",flexDirection:"column",alignItems:"center"},B={background:"none",border:"none",cursor:p?"not-allowed":"pointer",fontSize:"10px",padding:"0 4px",color:"#6b7280",lineHeight:"1"},E={width:"32px",textAlign:"center",border:"none",outline:"none",fontSize:"14px",fontFamily:"monospace",backgroundColor:"transparent",color:"#1f2937",padding:"0"},P={marginLeft:"4px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#f9fafb",cursor:p?"not-allowed":"pointer",fontSize:"12px",fontWeight:"600",color:"#374151"},H=o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>R(1),disabled:p},"▲"),o("input",{type:"text",value:ge(M),onChange:z,style:E,disabled:p,"aria-label":"Hour",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>R(-1),disabled:p},"▼")),j=o("span",{style:{fontSize:"16px",fontWeight:"700",color:"#374151",padding:"0 2px"}},":"),Y=o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>D(1),disabled:p},"▲"),o("input",{type:"text",value:ge(k.minute),onChange:I,style:E,disabled:p,"aria-label":"Minute",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>D(-1),disabled:p},"▼")),_=g?o("span",{style:{fontSize:"16px",fontWeight:"700",color:"#374151",padding:"0 2px"}},":"):null,q=g?o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>L(1),disabled:p},"▲"),o("input",{type:"text",value:ge(k.second),onChange:A,style:E,disabled:p,"aria-label":"Second",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>L(-1),disabled:p},"▼")):null,O=w?o("button",{type:"button",style:P,onClick:F,disabled:p,"aria-label":"Toggle AM/PM"},$?"PM":"AM"):null,U={marginLeft:"4px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#f9fafb",cursor:p?"not-allowed":"pointer",fontSize:"12px",fontWeight:"600",color:"#374151"},G=x&&!y?o("span",{style:{marginLeft:"8px",fontSize:"12px",fontWeight:"600",color:"#6b7280"}},x):null,V=y?o("select",{style:U,value:x??m[0],onChange:N,disabled:p,"aria-label":"Timezone"},...m.map(e=>o("option",{key:e,value:e},e))):null,X=[H,j,Y];return _&&X.push(_),q&&X.push(q),O&&X.push(O),G&&X.push(G),V&&X.push(V),o(te,{label:u,error:h,disabled:p,htmlFor:n},o("div",{id:n,style:T},...X))},exports.ToastContainer=et,exports.Toggle=function(e){const{checked:t,onChange:n,label:r,labelPosition:i="right",disabled:l=!1,size:a="md",onColor:d="#3b82f6",offColor:c="#d1d5db"}=e,f=xe[a],p=s(()=>{l||n(!t)},[l,t,n]),u=s(e=>{l||" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),n(!t))},[l,t,n]),h={width:`${f.trackW}px`,height:`${f.trackH}px`,borderRadius:`${f.trackH}px`,backgroundColor:t?d:c,position:"relative",cursor:l?"not-allowed":"pointer",transition:"background-color 0.2s",flexShrink:"0"},g=t?f.trackW-f.thumbSize-f.offset:f.offset,x={width:`${f.thumbSize}px`,height:`${f.thumbSize}px`,borderRadius:"50%",backgroundColor:"#ffffff",position:"absolute",top:`${f.offset}px`,left:`${g}px`,transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"},y={display:"inline-flex",alignItems:"center",gap:"8px",opacity:l?"0.5":"1",userSelect:"none"},m=r?o("span",{style:{fontSize:"14px",color:"#374151"}},r):null,b=o("div",{style:h},o("div",{style:x}));return o("div",{style:y,onClick:p,onKeyDown:u,tabIndex:l?-1:0,role:"switch","aria-checked":t?"true":"false","aria-disabled":l?"true":void 0,"aria-label":r},...("left"===i?[m,b]:[b,m]).filter(Boolean))},exports.Toolbar=function(e){const{items:t,size:n="md",variant:r="flat"}=e,i=Be[n],l=t.map(e=>"separator"===e.type?o("div",{key:e.id,role:"separator","aria-orientation":"vertical",style:{width:"1px",height:i.height,backgroundColor:"#d1d5db",margin:"0 4px",flexShrink:"0"}}):"spacer"===e.type?o("div",{key:e.id,style:{flex:"1"},"aria-hidden":"true"}):o(Ee,{key:e.id,item:e,size:n,variant:r}));return o(ke,{orientation:"horizontal",role:"toolbar",ariaLabel:"Toolbar",keyboardNav:!0,styling:{border:"raised"===r?"1px solid #e5e7eb":"none",borderRadius:"raised"===r?"8px":"0",padding:"4px",backgroundColor:"raised"===r?"#ffffff":"transparent",boxShadow:"raised"===r?"0 1px 3px rgba(0,0,0,0.1)":void 0,custom:{gap:"2px",alignItems:"center"}}},...l)},exports.Tooltip=function(e){const{text:t,placement:n="top",delay:r=200,maxWidth:i="250px",children:d}=e,[f,p]=l(!1),[u,h]=l(null),g=c(null),x=c(null),y=`tooltip-${Math.random().toString(36).slice(2,9)}`,m=s(()=>{x.current=setTimeout(()=>{if(g.current){const e=g.current.getBoundingClientRect();h(function(e,t){switch(t){case"top":return{position:"fixed",left:`${e.left+e.width/2}px`,top:e.top-8+"px",transform:"translate(-50%, -100%)"};case"bottom":return{position:"fixed",left:`${e.left+e.width/2}px`,top:`${e.bottom+8}px`,transform:"translateX(-50%)"};case"left":return{position:"fixed",left:e.left-8+"px",top:`${e.top+e.height/2}px`,transform:"translate(-100%, -50%)"};case"right":return{position:"fixed",left:`${e.right+8}px`,top:`${e.top+e.height/2}px`,transform:"translateY(-50%)"}}}(e,n))}p(!0)},r)},[r,n]),b=s(()=>{x.current&&(clearTimeout(x.current),x.current=null),p(!1)},[]);a(()=>()=>{x.current&&clearTimeout(x.current)},[]);const v={...u??{},backgroundColor:"#1f2937",color:"#fff",fontSize:"13px",lineHeight:"1.4",padding:"6px 10px",borderRadius:"6px",maxWidth:i,zIndex:"10002",pointerEvents:"none",whiteSpace:"normal",wordWrap:"break-word"},S=[o("div",{ref:g,style:{display:"inline-block"},onMouseEnter:m,onMouseLeave:b,onFocus:m,onBlur:b,"aria-describedby":f?y:void 0},d)];return f&&u&&S.push(o("div",{id:y,style:v,role:"tooltip"},t,o("div",{style:tt(n)}))),o("div",{style:{display:"inline-block",position:"relative"}},...S)},exports.TradingDashboard=function(e){const[t,n]=l(0),[r,i]=l("--:--:--"),[s,c]=l(!0);a(()=>{const e=setInterval(()=>{n(e=>{const t=.5*(Math.random()-.5);return Math.round(100*t)/100})},2e3);return()=>clearInterval(e)},[]),a(()=>{const e=()=>{const e=new Date,t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");i(`${t}:${n}:${o}`)};e();const t=setInterval(e,1e3);return()=>clearInterval(t)},[]),a(()=>{const e=setInterval(()=>{c(e=>!e)},800);return()=>clearInterval(e)},[]);const f=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Inter", "Segoe UI", Roboto, sans-serif',fontSize:"13px",color:"#ccccdd",backgroundColor:"#0d0d1a",overflow:"hidden"}),[]),p=189.42+t,u={width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#00c853",display:"inline-block",marginRight:"4px",opacity:s?"1":"0.3",transition:"opacity 0.3s"};return o("div",{className:`trading-dashboard ${e.className??""}`.trim(),style:f},o("header",{className:"trading-dashboard__header",style:{height:"40px",backgroundColor:"#12122a",borderBottom:"1px solid #2a2a4a",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",flexShrink:"0"}},o("span",{style:{fontSize:"14px",fontWeight:"700",color:"#ffffff",letterSpacing:"0.5px",display:"flex",alignItems:"center",gap:"8px"}},"SpecifyJS Trading Platform",o("span",{style:{display:"flex",alignItems:"center",fontSize:"11px",color:"#00c853",fontWeight:"600",marginLeft:"8px"}},o("span",{style:u}),"LIVE")),o("div",{style:{display:"flex",alignItems:"center",gap:"16px",fontSize:"12px"}},o("span",{style:{color:"#ffffff",fontFamily:"monospace",fontWeight:"600",fontSize:"13px"}},r),o("span",{style:{color:"#8888aa"}},"Account: SJS-28401"),o("span",{style:{color:"#00c853"}},"Balance: $124,582.30"),o("span",{style:{color:"#8888aa"}},"Status: Connected"))),o("div",{className:"trading-dashboard__grid",style:{flex:"1",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr",gap:"8px",padding:"8px",overflow:"hidden"}},function(e,t){const n=120,r=Math.min(...e),i=Math.max(...e),l=i-r||1,a=310/(e.length-1),s=e.map((e,t)=>({x:40+t*a,y:15+(1-(e-r)/l)*n}));s.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ");const d="M40,135 "+s.map(e=>`L${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ")+` L${s[s.length-1].x.toFixed(1)},135 Z`,c=[];for(let t=1;t<e.length;t++){const n=e[t]>=e[t-1]?"#00c853":"#ff1744";c.push(o("line",{key:String(t),x1:String(s[t-1].x.toFixed(1)),y1:String(s[t-1].y.toFixed(1)),x2:String(s[t].x.toFixed(1)),y2:String(s[t].y.toFixed(1)),stroke:n,strokeWidth:"2",strokeLinecap:"round"}))}const f=[];for(let e=0;e<5;e++){const t=15+e/4*n,r=i-e/4*l;f.push(o("line",{key:`g${e}`,x1:String(40),y1:String(t.toFixed(1)),x2:String(350),y2:String(t.toFixed(1)),stroke:"#2a2a4a",strokeWidth:"0.5",strokeDasharray:"3,3"})),f.push(o("text",{key:`yl${e}`,x:String(36),y:String((t+3).toFixed(1)),fill:"#6666aa",fontSize:"8",textAnchor:"end",fontFamily:"monospace"},cn(r)))}const p=[],u=Math.min(sn.length,e.length),h=(e.length-1)/(u-1);for(let e=0;e<u;e++){const t=40+Math.round(e*h)*a;p.push(o("text",{key:`tl${e}`,x:String(t.toFixed(1)),y:String(156),fill:"#6666aa",fontSize:"8",textAnchor:"middle",fontFamily:"monospace"},sn[e]))}const g="chartGrad";return o("div",{style:fn},o("div",{style:pn},"AAPL ",o("span",{style:{color:"#00c853",fontSize:"14px",fontWeight:"700"}},`$${cn(t)}`),o("span",{style:{color:"#00c853",fontSize:"11px",marginLeft:"8px"}},"+1.23%")),o("svg",{viewBox:"0 0 360 160",style:{width:"100%",flex:"1",minHeight:"0"},"aria-label":"Price chart",role:"img"},o("defs",null,o("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1"},o("stop",{offset:"0%",stopColor:"#00c853",stopOpacity:"0.3"}),o("stop",{offset:"100%",stopColor:"#00c853",stopOpacity:"0.02"}))),o("path",{d:d,fill:`url(#${g})`}),...f,...p,...c,o("line",{x1:String(40),y1:String((15+(1-(t-r)/l)*n).toFixed(1)),x2:String(350),y2:String((15+(1-(t-r)/l)*n).toFixed(1)),stroke:"#00c853",strokeWidth:"0.5",strokeDasharray:"4,2",opacity:"0.6"})))}(rn,p),function(){const e=Math.max(...en.map(e=>e.qty),...tn.map(e=>e.qty));return o("div",{style:fn},o("div",{style:pn},"Order Book"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Bid Price"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Ask Price"),o("th",{style:hn},"Qty"))),o("tbody",null,...en.map((t,n)=>{const r=tn[n],i=t.qty/e*.25,l=(r?.qty??0)/e*.25;return o("tr",{key:String(n),style:xn},o("td",{style:{...gn,color:"#00c853",backgroundColor:`rgba(0,200,83,${i.toFixed(3)})`,fontFamily:"monospace"}},cn(t.price)),o("td",{style:{...gn,backgroundColor:`rgba(0,200,83,${(.5*i).toFixed(3)})`,fontFamily:"monospace"}},dn(t.qty)),o("td",{style:{...gn,color:"#ff1744",backgroundColor:`rgba(255,23,68,${l.toFixed(3)})`,fontFamily:"monospace"}},r?cn(r.price):""),o("td",{style:{...gn,backgroundColor:`rgba(255,23,68,${(.5*l).toFixed(3)})`,fontFamily:"monospace"}},r?dn(r.qty):""))}))))}(),function(e){return o("div",{style:fn},o("div",{style:pn},"Watchlist"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Symbol"),o("th",{style:hn},"Price"),o("th",{style:hn},"Chg%"),o("th",{style:hn},"Volume"))),o("tbody",null,...Qt.map((t,n)=>{const r=t.price+(0===n?e:0),i=t.change>=0;return o("tr",{key:String(n),style:xn},o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},t.symbol,function(e,t){const n=Math.min(...e),r=Math.max(...e)-n||1;return o("svg",{viewBox:"0 0 40 14",style:{width:"40px",height:"14px",display:"inline-block",verticalAlign:"middle",marginLeft:"4px"},"aria-hidden":"true"},o("polyline",{points:e.map((t,o)=>{const i=o/(e.length-1)*40,l=14-(t-n)/r*14;return`${i.toFixed(1)},${l.toFixed(1)}`}).join(" "),fill:"none",stroke:t?"#00c853":"#ff1744",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}(t.spark,i)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(r)),o("td",{style:{...gn,color:i?"#00c853":"#ff1744",fontWeight:"600"}},`${i?"+":""}${cn(t.change)}%`),o("td",{style:{...gn,fontFamily:"monospace",color:"#8888aa"}},(l=t.volume)>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)));var l}))))}(t),function(){const e=nn.reduce((e,t)=>e+t.pnl,0),t=e>=0;return o("div",{style:fn},o("div",{style:pn},"Positions",o("span",{style:{marginLeft:"12px",color:t?"#00c853":"#ff1744",fontWeight:"700",fontSize:"12px"}},`${t?"+":""}$${cn(e)}`)),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Symbol"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Avg"),o("th",{style:hn},"P&L"))),o("tbody",null,...nn.map((e,t)=>{const n=e.pnl>=0;return o("tr",{key:String(t),style:{...xn,backgroundColor:n?"rgba(0,200,83,0.04)":"rgba(255,23,68,0.04)"}},o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},e.symbol),o("td",{style:{...gn,fontFamily:"monospace"}},String(e.qty)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(e.avgPrice)),o("td",{style:{...gn,color:n?"#00c853":"#ff1744",fontWeight:"700",fontFamily:"monospace"}},`${n?"+":""}$${cn(e.pnl)}`))}))))}(),o("div",{style:fn},o("div",{style:pn},"Recent Trades"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Time"),o("th",{style:hn},"Sym"),o("th",{style:hn},"Side"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Price"))),o("tbody",null,...on.map((e,t)=>{const n="BUY"===e.side;return o("tr",{key:String(t),style:xn},o("td",{style:{...gn,color:"#8888aa",fontFamily:"monospace"}},e.time),o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},e.symbol),o("td",{style:{...gn,color:n?"#00c853":"#ff1744",fontWeight:"600"}},e.side),o("td",{style:{...gn,fontFamily:"monospace"}},dn(e.qty)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(e.price)))})))),function(){const e=Math.max(...ln.map(e=>e.volume),...an.map(e=>e.volume)),t="16px";return o("div",{style:fn},o("div",{style:pn},"Market Depth"),o("div",{style:{flex:"1",display:"flex",flexDirection:"column",gap:"2px",justifyContent:"center"}},...ln.map((n,r)=>o("div",{key:`b${r}`,style:{display:"flex",alignItems:"center",gap:"6px"}},o("span",{style:{width:"52px",fontSize:"11px",color:"#8888aa",textAlign:"right",fontFamily:"monospace"}},cn(n.price)),o("div",{style:{height:t,width:n.volume/e*100+"%",backgroundColor:"#00c853",opacity:"0.6",borderRadius:"2px",maxWidth:"60%",transition:"width 0.3s"}}),o("span",{style:{fontSize:"11px",color:"#ccccdd",fontFamily:"monospace"}},dn(n.volume)))),o("div",{style:{height:"1px",backgroundColor:"#2a2a4a",margin:"4px 0"}}),...an.map((n,r)=>o("div",{key:`a${r}`,style:{display:"flex",alignItems:"center",gap:"6px"}},o("span",{style:{width:"52px",fontSize:"11px",color:"#8888aa",textAlign:"right",fontFamily:"monospace"}},cn(n.price)),o("div",{style:{height:t,width:n.volume/e*100+"%",backgroundColor:"#ff1744",opacity:"0.6",borderRadius:"2px",maxWidth:"60%",transition:"width 0.3s"}}),o("span",{style:{fontSize:"11px",color:"#ccccdd",fontFamily:"monospace"}},dn(n.volume))))))}()))},exports.TreeMap=function(e){const{data:t,width:n=600,height:r=400,showLabels:i=!0,showValues:l=!0,colors:a=zo,borderColor:s="#ffffff",borderWidth:c=2,padding:f=2,title:p}=e,u=p?30:0,h=f,g=f+u,x=n-2*f,y=r-2*f-u;if(d(()=>Io(t),[t])<=0||x<=0||y<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Empty treemap"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const m=d(()=>function(e,t,n,o,r,i){const l=[],a=[],s=Io(e);if(s<=0||o<=0||r<=0)return l;const d=e.children&&e.children.length>0?e.children:[e],c=o*r,f=[];for(let e=0;e<d.length;e++){const t=d[e],n=Io(t);n<=0||f.push({label:t.label,value:n,area:n/s*c,color:t.color??i[e%i.length],node:t})}for(f.sort((e,t)=>t.area-e.area),a.push({nodes:f,rect:{x:t,y:n,w:o,h:r},depth:0});a.length>0;){const e=a.shift(),{nodes:t,rect:n,depth:o}=e;if(0===t.length)continue;let r={...n},s=0;for(;s<t.length&&r.w>0&&r.h>0;){const e=r.w>=r.h,n=e?r.h:r.w,d=[],c=[];d.push(t[s]),c.push(t[s].area),s++;let f=Ao(c,n);for(;s<t.length;){const e=Ao([...c,t[s].area],n);if(e>f)break;d.push(t[s]),c.push(t[s].area),f=e,s++}let p=0;for(const e of c)p+=e;const u=n>0?p/n:0;let h=0;for(let t=0;t<d.length;t++){const n=d[t],s=u>0?n.area/u:0;let c,f,p,g;if(e?(c=r.x,f=r.y+h,p=u,g=s):(c=r.x+h,f=r.y,p=s,g=u),l.push({x:c,y:f,w:p,h:g,label:n.label,value:n.value,color:n.color,depth:o}),n.node.children&&n.node.children.length>0){const e=2,t=c+e,r=f+e+14,l=p-2*e,s=g-2*e-14;if(l>4&&s>4){const e=[],d=n.value,c=l*s;for(let t=0;t<n.node.children.length;t++){const r=n.node.children[t],l=Io(r);l<=0||e.push({label:r.label,value:l,area:l/d*c,color:r.color??i[(t+o+1)%i.length],node:r})}e.sort((e,t)=>t.area-e.area),a.push({nodes:e,rect:{x:t,y:r,w:l,h:s},depth:o+1})}}h+=s}r=e?{x:r.x+u,y:r.y,w:r.w-u,h:r.h}:{x:r.x,y:r.y+u,w:r.w,h:r.h-u}}}return l}(t,h,g,x,y,a),[t,h,g,x,y,a]),b=[];p&&b.push(o("text",{key:"title",x:String(n/2),y:String(f+16),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p));for(let e=0;e<m.length;e++){const t=m[e];if(b.push(o("rect",{key:`cell-${e}`,x:String(t.x),y:String(t.y),width:String(Math.max(0,t.w)),height:String(Math.max(0,t.h)),fill:t.color,stroke:s,"stroke-width":String(c),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),i&&t.w>20&&t.h>14){const n=Math.floor(t.w/7),r=t.label.length>n?t.label.substring(0,Math.max(1,n-2))+"..":t.label;b.push(o("text",{key:`label-${e}`,x:String(t.x+4),y:String(t.y+12),"font-size":"11","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},r))}l&&t.w>30&&t.h>28&&b.push(o("text",{key:`value-${e}`,x:String(t.x+4),y:String(t.y+24),"font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.8)","pointer-events":"none"},String(t.value)))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Treemap chart",style:{fontFamily:"sans-serif"}},...b)},exports.TreeNav=function(e){const{root:t,onNodeClick:n,onNodeExpand:r,onNodeCollapse:i,selectedId:a,expandAll:c=!1,lineColor:f="#000",lineWidth:p=1,indentPx:u=20,iconExpanded:h="−",iconCollapsed:g="+",nodeStyle:x={},wrapperStyle:y,renderNode:m}=e,[b,v]=l(()=>{const e=Pe.fromData(t);return c&&He(e),e}),[S,k]=l(t.id),w=d(()=>je(b),[b]),$=s(()=>{v(e=>{const t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t})},[]),M=s(e=>{e.toggle(),e.expanded?r?.(e):i?.(e),$()},[r,i,$]),C=s(e=>{k(e.id),n?.(e)},[n]),z=s(e=>{const t=e;if(!S)return;const n=w.findIndex(e=>e.id===S);if(-1===n)return;const o=w[n];switch(t.key){case"ArrowDown":{t.preventDefault();const e=w[n+1];e&&k(e.id);break}case"ArrowUp":{t.preventDefault();const e=w[n-1];e&&k(e.id);break}case"ArrowRight":t.preventDefault(),o.isLeaf()||(o.expanded?o.children.length>0&&k(o.children[0].id):M(o));break;case"ArrowLeft":t.preventDefault(),!o.isLeaf()&&o.expanded?M(o):o.parent&&k(o.parent.id);break;case"Enter":t.preventDefault(),C(o);break;case" ":t.preventDefault(),o.isLeaf()||M(o);break;case"Home":t.preventDefault(),w.length>0&&k(w[0].id);break;case"End":t.preventDefault(),w.length>0&&k(w[w.length-1].id)}},[S,w,M,C]),I=w.map(e=>o(_e,{key:e.id,node:e,isSelected:e.id===a,indentPx:u,lineColor:f,lineWidth:p,iconExpanded:h,iconCollapsed:g,nodeStyle:x,renderNode:m,onToggle:M,onClick:C,focusedId:S}));return o(ke,{role:"tree",ariaLabel:"Tree navigation",styling:y,keyboardNav:!1},o("div",{onKeyDown:z,style:{outline:"none"}},...I))},exports.TreeNode=Pe,exports.USStateMap=function(e){const{width:t=959,height:n=593,stateColors:r={},defaultColor:i="#D0D0D0",strokeColor:l="#FFFFFF",strokeWidth:a=1,onStateClick:c,onStateHover:f,hoverColor:p="#FFD700",title:u="Map of the United States"}=e,h=d(()=>Object.keys(oo),[]),g=s(e=>{c&&c(e)},[c]),x=s((e,t)=>{const n=t.currentTarget;n&&n.setAttribute("fill",p),f&&f(e)},[f,p]),y=s((e,t)=>{const n=t.currentTarget;if(n){const t=r[e]??i;n.setAttribute("fill",t)}f&&f(null)},[f,r,i]),m=d(()=>{const e=[];for(let t=0;t<h.length;t++){const n=h[t],s=oo[n],d=r[n]??i,f={key:`state-${n}`,d:s.path,fill:d,stroke:l,"stroke-width":String(a),"stroke-linejoin":"round","data-state":n,role:"img","aria-label":s.name,style:{cursor:c?"pointer":"default"}};if(c){const e=n;f.onClick=()=>g(e),f.onKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||g(e)},f.tabindex=0,f.role="button",f["aria-label"]=s.name}const p=n;f.onMouseOver=e=>x(p,e),f.onMouseOut=e=>y(p,e),e.push(o("path",f))}return e},[h,r,i,l,a,c,g,x,y]),b=o("title",{key:"map-title"},u);return o("svg",{width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u,style:{fontFamily:"sans-serif"}},b,...m)},exports.US_STATE_PATHS=oo,exports.UnityDesktop=function(e){const[t,n]=l(-1),[r,i]=l(()=>{const e=new Date;return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`}),[c,f]=l(()=>(new Date).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})),[p,u]=l([]),[h,g]=l(-1),[x,y]=l(!1);a(()=>{const e=setInterval(()=>{const e=new Date;i(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`),f(e.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}))},1e3);return()=>clearInterval(e)},[]);const m=s(e=>{const t=Wt++,n={id:t,appLabel:e.label,appLetter:e.letter,appColor:e.color,minimized:!1};u(e=>[...e,n]),g(t),y(!1)},[]),b=s(e=>{u(t=>t.filter(t=>t.id!==e)),g(t=>t===e?-1:t)},[]),v=s(e=>{u(t=>t.map(t=>t.id===e?{...t,minimized:!t.minimized}:t))},[]),S=s(e=>{g(e),u(t=>t.map(t=>t.id===e?{...t,minimized:!1}:t))},[]),k=s(()=>{y(e=>!e)},[]),w=s((e,t)=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),m(Nt[e]))},[m]),$=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'Ubuntu, "Segoe UI", sans-serif',fontSize:"13px",color:"var(--color-text, #ffffff)",overflow:"hidden",position:"relative"}),[]);function M(e){return{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:e,cursor:"pointer",display:"inline-block"}}const C={width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",fontSize:"20px",backgroundColor:t===Nt.length?"rgba(255,255,255,0.15)":"transparent",border:"none",color:"#ffffff",transition:"background 0.15s",marginTop:"auto"},z=p.map((e,t)=>{if(e.minimized)return null;const n=e.id===h,r={width:"420px",minHeight:"280px",backgroundColor:"#ffffff",borderRadius:"6px",boxShadow:n?"0 12px 48px rgba(0,0,0,0.5)":"0 8px 32px rgba(0,0,0,0.4)",display:"flex",flexDirection:"column",overflow:"hidden",position:"absolute",left:80+t%5*30+"px",top:40+t%5*30+"px",zIndex:String(n?100:10+t),transition:"box-shadow 0.15s"},i={height:"32px",backgroundColor:n?"#3c3c3c":"#555",display:"flex",alignItems:"center",padding:"0 10px",gap:"6px",flexShrink:"0",cursor:"default"};return o("div",{key:String(e.id),className:"unity-desktop__window",style:r,onMouseDown:()=>S(e.id)},o("div",{style:i},o("span",{style:M("#e74c3c"),onClick:()=>b(e.id),title:"Close",role:"button","aria-label":`Close ${e.appLabel}`,tabIndex:0}),o("span",{style:M("#f39c12"),onClick:()=>v(e.id),title:"Minimize",role:"button","aria-label":`Minimize ${e.appLabel}`,tabIndex:0}),o("span",{style:M("#2ecc71"),title:"Maximize",role:"button","aria-label":`Maximize ${e.appLabel}`,tabIndex:0}),o("span",{style:{flex:"1",textAlign:"center",fontSize:"12px",color:"#ccc",marginRight:"40px"}},e.appLabel)),o("div",{style:{flex:"1",padding:"16px",fontSize:"13px",color:"#333",lineHeight:"1.5"}},...function(e){switch(e){case"Files":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Home"),o("div",{style:{display:"flex",flexDirection:"column",gap:"4px"}},o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Documents"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Downloads"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Music"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Pictures"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Videos"),o("span",{style:{color:"#555",cursor:"pointer"}},"📄 readme.txt"))];case"Browser":return[o("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"}},o("span",{style:{padding:"4px 8px",backgroundColor:"#eee",borderRadius:"4px",fontSize:"12px",flex:"1",color:"#666"}},"https://example.com")),o("div",{style:{padding:"16px",backgroundColor:"#fafafa",borderRadius:"4px",textAlign:"center",color:"#999"}},"Web page content area")];case"Terminal":return[o("div",{style:{backgroundColor:"#1a1a1a",padding:"12px",borderRadius:"4px",fontFamily:"monospace",fontSize:"12px",color:"#2ecc71",lineHeight:"1.6"}},o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc"}},"Welcome to SpecifyJS Desktop")),o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc"}},"ls -la")),o("div",{style:{color:"#aaa"}},"total 42"),o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc",borderRight:"2px solid #2ecc71"}}," ")))];case"Mail":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Inbox (3)"),o("div",{style:{display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#e8f0fe",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Welcome to SpecifyJS Mail"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Your weekly digest"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Team standup notes"))];case"Music":return[o("div",{style:{textAlign:"center",padding:"20px",color:"#333"}},o("div",{style:{fontSize:"48px",marginBottom:"12px"}},"🎵"),o("div",{style:{fontWeight:"600",marginBottom:"4px"}},"Now Playing"),o("div",{style:{color:"#666",fontSize:"12px"}},"No track selected"),o("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"16px",fontSize:"18px"}},o("span",{style:{cursor:"pointer"}},"⏮"),o("span",{style:{cursor:"pointer"}},"▶"),o("span",{style:{cursor:"pointer"}},"⏭")))];case"Photos":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Photo Library"),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"6px"}},o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"),o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"),o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"))];case"Software":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Software Center"),o("div",{style:{color:"#666",fontSize:"12px"}},"Browse and install applications"),o("div",{style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Package Manager"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Text Editor"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Image Viewer"))];case"Settings":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"System Settings"),o("div",{style:{display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"⚙ General"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"📶 Network"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"🔈 Sound"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"🖥 Display"))];default:return[o("div",{style:{textAlign:"center",color:"#999",padding:"20px"}},`${e} placeholder`)]}}(e.appLabel)))}),I=x?o("div",{className:"unity-desktop__apps-grid",style:{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0,0,0,0.75)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"200"},onClick:()=>y(!1)},o("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 80px)",gap:"24px",padding:"40px"},onClick:e=>e.stopPropagation()},...Nt.map(e=>o("div",{key:e.label,style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",cursor:"pointer",padding:"12px",borderRadius:"8px",transition:"background 0.15s"},onClick:()=>m(e),role:"button",tabIndex:0,"aria-label":e.label},o("span",{style:{width:"48px",height:"48px",borderRadius:"12px",backgroundColor:e.color,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"20px",fontWeight:"700",color:"#ffffff"}},e.letter),o("span",{style:{color:"#ffffff",fontSize:"11px"}},e.label))))):null;return o("div",{className:`unity-desktop ${e.className??""}`.trim(),style:$},o("div",{className:"unity-desktop__top-panel",style:{width:"100%",height:"28px",backgroundColor:"var(--color-bg, #1a1a1a)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 12px",boxSizing:"border-box",fontSize:"12px",zIndex:"10",flexShrink:"0",borderBottom:"1px solid var(--color-border, #333)"}},o("span",{style:{fontWeight:"600",cursor:"pointer",padding:"2px 8px",borderRadius:"3px",transition:"background 0.15s"}},"Activities"),o("span",{style:{position:"absolute",left:"50%",transform:"translateX(-50%)"}},`${c} ${r}`),o("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px"}},...Tt.map((e,t)=>o("span",{key:String(t),style:{cursor:"pointer"}},e)),o("span",{style:{fontSize:"12px",marginLeft:"4px",cursor:"pointer"}},"▼"))),o("div",{style:{display:"flex",flex:"1",overflow:"hidden"}},o("nav",{className:"unity-desktop__launcher",style:{width:"48px",backgroundColor:"var(--color-bg, #2c2c2c)",display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"8px",paddingBottom:"8px",gap:"4px",flexShrink:"0",overflowY:"auto",boxSizing:"border-box",borderRight:"1px solid var(--color-border, #444)"},"aria-label":"Application launcher"},...Nt.map((e,r)=>{return o("button",{key:String(r),style:(l=r,{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",fontSize:"14px",fontWeight:"700",backgroundColor:t===l?"rgba(255,255,255,0.15)":"transparent",border:"none",color:"#ffffff",transition:"background 0.15s"}),title:e.label,"aria-label":e.label,tabIndex:0,onMouseEnter:()=>n(r),onMouseLeave:()=>n(-1),onKeyDown:e=>w(r,e),onClick:()=>m(e)},o("span",{style:(i=e.color,{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:i,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"13px",fontWeight:"700",color:"#ffffff",lineHeight:"1"})},e.letter));var i,l}),o("button",{style:C,title:"Show Applications","aria-label":"Show Applications",tabIndex:0,onMouseEnter:()=>n(Nt.length),onMouseLeave:()=>n(-1),onClick:k},"☰")),o("main",{className:"unity-desktop__desktop",style:{flex:"1",background:"linear-gradient(135deg, #2c001e 0%, #5e2750 50%, #2c001e 100%)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",position:"relative"}},...z.filter(Boolean),I,e.children)))},exports.VectorField=function(e){const{data:t,vectorFunction:n,width:r=600,height:i=600,gridSize:l=15,xRange:a=[-5,5],yRange:c=[-5,5],arrowScale:f=1,arrowColor:p="#3b82f6",showGrid:u=!0,showAxes:h=!0,colorByMagnitude:g=!1,colorScale:x=["#3b82f6","#8b5cf6","#ef4444"],title:y,padding:m=50,tickFontSize:b=10,arrowWidth:v=1.5}=e,S=r-2*m,k=i-2*m,w=a[0],$=a[1],M=c[0],C=c[1],z=$-w,I=C-M,A=s(e=>m+(e-w)/z*S,[m,w,z,S]),F=s(e=>m+(C-e)/I*k,[m,C,I,k]),R=d(()=>{if(t&&t.length>0)return t;if(!n)return[];const e=[],o=Math.max(2,Math.min(50,l)),r=z/(o-1),i=I/(o-1);for(let t=0;t<o;t++)for(let l=0;l<o;l++){const o=w+l*r,a=M+t*i,s=n(o,a),d=Math.sqrt(s.dx*s.dx+s.dy*s.dy);e.push({x:o,y:a,dx:s.dx,dy:s.dy,magnitude:d})}return e},[t,n,l,w,$,M,C,z,I]),D=d(()=>{let e=0;for(let t=0;t<R.length;t++){const n=R[t],o=n.magnitude??Math.sqrt(n.dx*n.dx+n.dy*n.dy);o>e&&(e=o)}return e>0?e:1},[R]),L=d(()=>Math.min(S,k)/Math.max(l,2)/(2*D)*f,[S,k,l,D,f]),N=s(()=>{if(!u)return[];const e=[],t=Do(z,10);for(let n=Math.ceil(w/t)*t;n<=$;n+=t){const t=A(n);e.push(o("line",{key:`gridv-${n}`,x1:String(t),y1:String(m),x2:String(t),y2:String(m+k),stroke:"#e5e7eb","stroke-width":"0.5"})),e.push(o("text",{key:`xtick-${n}`,x:String(t),y:String(m+k+16),"text-anchor":"middle","font-size":String(b),"font-family":"sans-serif",fill:"#6b7280"},String(Math.round(100*n)/100)))}const n=Do(I,10);for(let t=Math.ceil(M/n)*n;t<=C;t+=n){const n=F(t);e.push(o("line",{key:`gridh-${t}`,x1:String(m),y1:String(n),x2:String(m+S),y2:String(n),stroke:"#e5e7eb","stroke-width":"0.5"})),e.push(o("text",{key:`ytick-${t}`,x:String(m-6),y:String(n+4),"text-anchor":"end","font-size":String(b),"font-family":"sans-serif",fill:"#6b7280"},String(Math.round(100*t)/100)))}return e},[u,w,$,M,C,z,I,A,F,m,S,k]),T=s(()=>{if(!h)return[];const e=[];if(M<=0&&C>=0){const t=F(0);e.push(o("line",{key:"axis-x",x1:String(m),y1:String(t),x2:String(m+S),y2:String(t),stroke:"#374151","stroke-width":String(v)}))}if(w<=0&&$>=0){const t=A(0);e.push(o("line",{key:"axis-y",x1:String(t),y1:String(m),x2:String(t),y2:String(m+k),stroke:"#374151","stroke-width":String(v)}))}return e.push(o("rect",{key:"chart-border",x:String(m),y:String(m),width:String(S),height:String(k),fill:"none",stroke:"#d1d5db","stroke-width":"1"})),e},[h,w,$,M,C,A,F,m,S,k]),W=s(()=>{const e=[];for(let t=0;t<R.length;t++){const n=R[t],r=n.magnitude??Math.sqrt(n.dx*n.dx+n.dy*n.dy);if(r<1e-10)continue;const i=A(n.x),l=F(n.y),a=n.dx*L,s=-n.dy*L,d=i+a,c=l+s;let f;f=g?Ro(r/D,x):p,e.push(o("line",{key:`arrow-line-${t}`,x1:String(i),y1:String(l),x2:String(d),y2:String(c),stroke:f,"stroke-width":String(v),"stroke-linecap":"round"}));const u=Math.sqrt(a*a+s*s);if(u>2){const n=a/u,r=s/u,i=-r,l=n,p=Math.min(4,.4*u),h=d-n*p+i*p*.5,g=c-r*p+l*p*.5,x=d-n*p-i*p*.5,y=c-r*p-l*p*.5;e.push(o("polygon",{key:`arrow-head-${t}`,points:`${d},${c} ${h},${g} ${x},${y}`,fill:f}))}}return e},[R,A,F,L,g,D,x,p]),B=s(()=>y?[o("text",{key:"title",x:String(r/2),y:String(m/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},y)]:[],[y,r,m]),E=N(),P=T(),H=W(),j=B();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":y??"Vector field plot",style:{fontFamily:"sans-serif"}},...j,...E,...P,...H)},exports.VideoPlayer=function(e){const t=!1!==e.controls,n=c(null);f().replace(/[^a-zA-Z0-9_-]/g,"");const[r,i]=l(!1),[d,p]=l(0),[u,h]=l(0),[g,x]=l(e.muted?0:1),[y,m]=l(!!e.muted),[b,v]=l(!0),S="number"==typeof e.width?`${e.width}px`:e.width??"100%",k="number"==typeof e.height?`${e.height}px`:e.height??"auto";a(()=>{const t=n.current;if(!t)return;const o=()=>{i(!0),e.onPlay&&e.onPlay()},r=()=>{i(!1),e.onPause&&e.onPause()},l=()=>{i(!1),e.onEnded&&e.onEnded()},a=()=>{p(t.currentTime),h(t.duration),e.onTimeUpdate&&e.onTimeUpdate(t.currentTime,t.duration)},s=()=>{h(t.duration)};return t.addEventListener("play",o),t.addEventListener("pause",r),t.addEventListener("ended",l),t.addEventListener("timeupdate",a),t.addEventListener("loadedmetadata",s),()=>{t.removeEventListener("play",o),t.removeEventListener("pause",r),t.removeEventListener("ended",l),t.removeEventListener("timeupdate",a),t.removeEventListener("loadedmetadata",s)}},[e.onPlay,e.onPause,e.onEnded,e.onTimeUpdate]);const w=s(()=>{const e=n.current;e&&(e.paused?e.play():e.pause())},[]),$=s(e=>{const t=n.current;if(!t||!isFinite(t.duration))return;const o=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(1,(e.clientX-o.left)/o.width));t.currentTime=r*t.duration},[]),M=s(e=>{const t=n.current,o=parseFloat(e.target.value);t&&(t.volume=o,t.muted=0===o,x(o),m(0===o))},[]),C=s(()=>{const e=n.current;e&&e.requestFullscreen&&e.requestFullscreen()},[]);if(!t)return o("video",{ref:n,src:e.src,poster:e.poster,controls:!0,autoplay:!!e.autoPlay||void 0,loop:!!e.loop||void 0,muted:!!e.muted||void 0,style:{width:S,height:k,display:"block"}});const z=u>0?d/u*100:0,I={background:"none",border:"none",color:"#ffffff",cursor:"pointer",fontSize:"16px",padding:"4px 8px",lineHeight:"1"},A=o("div",{style:{position:"absolute",bottom:"0",left:"0",right:"0",display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:"linear-gradient(transparent, rgba(0,0,0,0.7))",opacity:b?"1":"0",transition:"opacity 0.3s"}},o("button",{"aria-label":r?"Pause":"Play",onclick:w,style:I},r?"⏸":"▶"),o("div",{onclick:$,style:{flex:"1",height:"4px",backgroundColor:"rgba(255,255,255,0.3)",borderRadius:"2px",cursor:"pointer",position:"relative"}},o("div",{style:{width:`${z}%`,height:"100%",backgroundColor:"#3b82f6",borderRadius:"2px",transition:"width 0.1s linear"}})),o("span",{style:{color:"#ffffff",fontSize:"12px",whiteSpace:"nowrap",fontFamily:"monospace"}},`${Se(d)} / ${Se(u)}`),o("input",{type:"range",min:"0",max:"1",step:"0.05",value:String(y?0:g),oninput:M,"aria-label":"Volume",style:{width:"60px",cursor:"pointer"}}),o("button",{"aria-label":"Fullscreen",onclick:C,style:I},"⛶"));return o("div",{style:{position:"relative",width:S,height:k,backgroundColor:"#000",overflow:"hidden"},onmouseenter:()=>v(!0),onmouseleave:()=>{r&&v(!1)}},o("video",{ref:n,src:e.src,poster:e.poster,autoplay:!!e.autoPlay||void 0,loop:!!e.loop||void 0,muted:!!e.muted||void 0,playsinline:!0,onclick:w,style:{width:"100%",height:"100%",display:"block",objectFit:"contain"}}),A)},exports.VirtualScroll=function(e){const{items:t,renderItem:n,itemHeight:r,overscan:i=5,height:a}=e,[d,f]=l(0),p=c(null),u=t.length*r,h=parseInt(a,10)||400,g=Math.ceil(h/r),x=Math.max(0,Math.floor(d/r)-i),y=Math.min(t.length,Math.floor(d/r)+g+i),m=s(e=>{const t=e.target;f(t.scrollTop)},[]),b=[];for(let e=x;e<y;e++)b.push(o("div",{key:String(e),style:{position:"absolute",top:e*r+"px",left:"0",right:"0",height:`${r}px`,overflow:"hidden"}},n(t[e],e)));return o("div",{ref:p,style:{...K,height:a},onScroll:m},o("div",{style:{height:`${u}px`,position:"relative",width:"100%"}},...b))},exports.VizWrapper=function(e){const t=e.titlePosition??"top",n=e.legendPosition??"bottom",r=e.titleAlign??"center",i=e.legendAlign??"center",l=e.gap??"12px",a=e.contain??"layout style paint",s={display:"flex",flexDirection:"column",gap:l,width:"number"==typeof e.width?`${e.width}px`:e.width??"auto",height:"number"==typeof e.height?`${e.height}px`:e.height??"auto",backgroundColor:e.backgroundColor??"#ffffff",border:e.border??"1px solid #e5e7eb",borderRadius:e.borderRadius??"8px",padding:e.padding??"16px",fontFamily:e.fontFamily??"inherit",contain:a,overflow:"hidden",position:"relative",boxSizing:"border-box",...e.boxShadow?{boxShadow:e.boxShadow}:{},...e.style??{}},d=e.title?o("div",{className:"viz-title",style:{fontSize:e.titleFontSize??"16px",fontWeight:e.titleFontWeight??"600",color:e.titleColor??"#1f2937",textAlign:r,flexShrink:"0"}},e.title):null,c=e.legend&&e.legend.length>0?(f=e.legend,o("div",{className:"viz-legend",style:{display:"flex",flexDirection:(p={align:i,fontSize:e.legendFontSize??"12px",gap:e.legendGap??16,direction:"left"===n||"right"===n?"column":"row"}).direction,flexWrap:"wrap",gap:`${p.gap}px`,justifyContent:p.align,alignItems:"center",fontSize:p.fontSize,color:"#6b7280",flexShrink:"0"}},...f.map((e,t)=>o("div",{key:`legend-${t}`,style:{display:"flex",alignItems:"center",gap:"6px"}},function(e){const t=e.shape??"circle";return"line"===t?o("svg",{width:"20",height:"12",viewBox:"0 0 20 12"},o("line",{x1:"0",y1:"6",x2:"20",y2:"6",stroke:e.color,"stroke-width":"2","stroke-dasharray":e.dash??""})):o("div","square"===t?{style:{width:"12px",height:"12px",backgroundColor:e.color,borderRadius:"2px",flexShrink:"0"}}:{style:{width:"10px",height:"10px",backgroundColor:e.color,borderRadius:"50%",flexShrink:"0"}})}(e),o("span",null,e.label))))):null;var f,p;const u=function(e,t,n,r,i){const l=[];if("top"===r&&e&&l.push(e),"left"===i||"right"===i){const a=[];"left"===i&&n&&a.push(n),"left"===r&&e&&a.push(e),a.push(t),"right"===r&&e&&a.push(e),"right"===i&&n&&a.push(n),l.push(o("div",{style:{display:"flex",flexDirection:"row",flex:"1",gap:"12px",minHeight:"0",alignItems:"stretch"}},...a))}else if("left"===r||"right"===r){"top"===i&&n&&l.push(n);const a=[];"left"===r&&e&&a.push(e),a.push(t),"right"===r&&e&&a.push(e),l.push(o("div",{style:{display:"flex",flexDirection:"row",flex:"1",gap:"12px",minHeight:"0",alignItems:"center"}},...a)),"bottom"===i&&n&&l.push(n)}else"top"===i&&n&&l.push(n),l.push(t),"bottom"===i&&n&&l.push(n);return"bottom"===r&&e&&l.push(e),l}(d,o("div",{className:"viz-content",style:{flex:"1",minWidth:"0",minHeight:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}},e.children),c,t,n);return o("div",{className:`viz-wrapper ${e.className??""}`.trim(),style:s},...u)},exports.WaterfallChart=function(e){const{data:t=[],width:n=600,height:r=400,increaseColor:i="#10b981",decreaseColor:l="#ef4444",totalColor:a="#3b82f6",connectorColor:c="#94a3b8",showValues:f=!0,showGrid:p=!0,showConnectors:u=!0,title:h,padding:g=60}=e,x=n-2*g,y=r-2*g,m=d(()=>function(e){const t=[];let n=0;for(let o=0;o<e.length;o++){const r=e[o],i=r.type??(r.value>=0?"increase":"decrease");if("total"===i)t.push({label:r.label,value:n,type:"total",start:0,end:n});else{const e=n;n+=r.value,t.push({label:r.label,value:r.value,type:i,start:e,end:n})}}return t}(t),[t]),{minVal:b,maxVal:v}=d(()=>{let e=0,t=0;for(let n=0;n<m.length;n++){const o=m[n];o.start<e&&(e=o.start),o.end<e&&(e=o.end),o.start>t&&(t=o.start),o.end>t&&(t=o.end)}return e===t&&(t=e+1),{minVal:e,maxVal:t}},[m]),S=v-b,k=s(e=>g+y-(e-b)/S*y,[g,y,b,S]),w=d(()=>0===m.length?0:x/m.length,[m.length,x]),$=Math.max(1,w-6),M=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(S),t=[];for(let n=Math.ceil(b/e)*e;n<=v;n+=e){const e=k(n);t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(e),x2:String(g+x),y2:String(e),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(e+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}return t},[p,S,b,v,k,g,x]),C=s(()=>{const e=[];e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+y),stroke:"#374151","stroke-width":"1.5"}));const t=b<=0&&v>=0?k(0):g+y;return e.push(o("line",{key:"axis-x",x1:String(g),y1:String(t),x2:String(g+x),y2:String(t),stroke:"#374151","stroke-width":"1.5"})),e},[g,x,y,b,v,k]),z=s(()=>{if(0===m.length)return[];const e=[];for(let t=0;t<m.length;t++){const n=m[t],r=g+t*w+3,s=Math.max(n.start,n.end),d=Math.min(n.start,n.end),p=k(s),h=k(d),x=Math.max(0,h-p);let b;if(b="total"===n.type?a:"decrease"===n.type?l:i,e.push(o("rect",{key:`bar-${t}`,x:String(r),y:String(p),width:String($),height:String(x),fill:b,rx:"2",ry:"2"})),f){const i="decrease"===n.type||n.value<0?h+14:p-4,l="total"===n.type?String(n.value):(n.value>=0?"+":"")+String(n.value);e.push(o("text",{key:`val-${t}`,x:String(r+$/2),y:String(i),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},l))}if(e.push(o("text",{key:`cat-${t}`,x:String(r+$/2),y:String(g+y+16),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},n.label)),u&&t<m.length-1){const i=m[t+1],l=k(n.end),a=g+(t+1)*w+3;"total"!==i.type&&e.push(o("line",{key:`conn-${t}`,x1:String(r+$),y1:String(l),x2:String(a),y2:String(l),stroke:c,"stroke-width":"1","stroke-dasharray":"3 2"}))}}return e},[m,w,$,k,i,l,a,c,f,u,g,y]),I=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),A=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),F=M(),R=C(),D=z(),L=I(),N=A();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Waterfall chart",style:{fontFamily:"sans-serif"}},...L,...F,...R,...D,...N)},exports.WordCloud=function(e){const{words:t=[],width:n=600,height:r=400,minFontSize:i=10,maxFontSize:l=64,fontFamily:a="sans-serif",colors:s=Lo,rotations:c=No,padding:f=4,spiral:p="archimedean",title:u}=e,h=d(()=>{if(0===t.length)return[];const e=t.map((e,t)=>({...e,originalIndex:t})).filter(e=>e.text.length>0&&e.weight>0).sort((e,t)=>t.weight-e.weight);if(0===e.length)return[];const o=e[e.length-1].weight,a=e[0].weight-o;function d(e){return 0===a?(i+l)/2:i+(e-o)/a*(l-i)}const u=[],h=n/2,g=r/2;for(let t=0;t<e.length;t++){const o=e[t],i=d(o.weight),l=c[Eo(o.text)%c.length],a=o.color??s[t%s.length];let x=!1;const y=500,m="archimedean"===p?4:5;for(let e=0;e<y;e++){let t,s;if("archimedean"===p){const n=.1*e,o=m*n;t=o*Math.cos(n),s=o*Math.sin(n)}else{const n=Math.floor(e/4)+1,o=(e%4==0?0:e)*m;switch(e%4){case 0:t=n*m*4,s=o;break;case 1:t=-o,s=n*m*4;break;case 2:t=-n*m*4,s=-o;break;default:t=o,s=-n*m*4}}const d=h+t,c=g+s,y=To(o.text,i,l,d,c),b={x:y.x-f,y:y.y-f,w:y.w+2*f,h:y.h+2*f};if(!Bo(b,n,r))continue;let v=!1;for(const e of u)if(Wo(b,e.bbox)){v=!0;break}if(!v){u.push({text:o.text,x:d,y:c,fontSize:i,rotation:l,color:a,bbox:b}),x=!0;break}}}return u},[t,n,r,i,l,s,c,f,p]);if(0===t.length||0===h.length)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Word cloud — no data"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":a,fill:"currentColor",opacity:"0.6"},"No words to display."));const g=[];u&&g.push(o("text",{key:"title",x:String(n/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":a,fill:"currentColor"},u));for(let e=0;e<h.length;e++){const t=h[e],n=0!==t.rotation?`translate(${t.x},${t.y}) rotate(${t.rotation})`:`translate(${t.x},${t.y})`;g.push(o("text",{key:`word-${e}`,transform:n,"text-anchor":"middle","dominant-baseline":"central","font-size":String(t.fontSize),"font-family":a,fill:t.color,"aria-label":t.text},t.text))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Word cloud",style:{fontFamily:a}},...g)},exports.WordProcessor=function(e){const[t,n]=l(!1),[r,i]=l(!1),[a,f]=l(!1),[p,u]=l(-1),[h,g]=l(""),[x,y]=l(-1),[m,b]=l(0),[v,S]=l("3"),k=c(null),w={bold:s(()=>{document.execCommand("bold",!1),n(e=>!e),k.current&&k.current.focus()},[]),italic:s(()=>{document.execCommand("italic",!1),i(e=>!e),k.current&&k.current.focus()},[]),underline:s(()=>{document.execCommand("underline",!1),f(e=>!e),k.current&&k.current.focus()},[])},$={bold:t,italic:r,underline:a},M=s(e=>{document.execCommand(e,!1),k.current&&k.current.focus()},[]),C=s(e=>{document.execCommand("fontSize",!1,e),S(e),k.current&&k.current.focus()},[]),z=s(e=>{y(t=>t===e?-1:e)},[]),I=s(e=>{switch(e){case"undo":document.execCommand("undo",!1);break;case"redo":document.execCommand("redo",!1);break;case"cut":document.execCommand("cut",!1);break;case"copy":document.execCommand("copy",!1);break;case"paste":document.execCommand("paste",!1);break;case"bold":document.execCommand("bold",!1);break;case"italic":document.execCommand("italic",!1);break;case"underline":document.execCommand("underline",!1);break;case"print":"undefined"!=typeof window&&window.print&&window.print();break;case"new":k.current&&(k.current.innerHTML="",b(0))}y(-1),k.current&&k.current.focus()},[]),A=s(()=>{if(k.current){const e=k.current.textContent??"";b(_t(e))}},[]),F=s(()=>{y(-1)},[]),R=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",color:"var(--color-text, #333)",backgroundColor:"#f0f0f0",overflow:"hidden"}),[]),D=d(()=>function(){const e=[];for(let t=0;t<=20;t++){const n=t%2==0;e.push(o("div",{key:String(t),style:{position:"absolute",left:t/20*100+"%",bottom:"0",width:"1px",height:n?"10px":"5px",backgroundColor:"#999"}})),n&&e.push(o("span",{key:`l${t}`,style:{position:"absolute",left:t/20*100+"%",top:"1px",fontSize:"8px",color:"#666",transform:"translateX(-50%)"}},String(t/2)))}return e}(),[]),L=e.content??"Start typing...",N=_t(L),T=m>0?m:N,W={position:"absolute",top:"100%",left:"0",minWidth:"160px",backgroundColor:"#ffffff",border:"1px solid #d0d0d0",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",zIndex:"1000"},B={display:"block",width:"100%",padding:"6px 16px",fontSize:"13px",color:"#333",backgroundColor:"transparent",border:"none",textAlign:"left",cursor:"pointer",transition:"background 0.1s"};function E(e,t){return{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid transparent",borderRadius:"3px",cursor:"pointer",fontSize:"13px",backgroundColor:$[e]?"rgba(0,0,0,0.12)":h===e?"rgba(0,0,0,0.06)":"transparent",color:"var(--color-text, #444)",transition:"background 0.15s",...t??{}}}const P=Bt.map((e,t)=>{const n=[e];return x===t&&Et[e]&&n.push(o("div",{key:"dropdown",style:W,className:"word-processor__menu-dropdown"},...Et[e].map((e,t)=>o("button",{key:String(t),style:B,onClick:t=>{t.stopPropagation(),I(e.action)},role:"menuitem"},e.label)))),o("button",{key:String(t),style:(r=t,{padding:"4px 10px",cursor:"pointer",borderRadius:"3px",fontSize:"13px",color:"var(--color-text, #333)",backgroundColor:x===r?"rgba(0,0,0,0.12)":p===r?"rgba(0,0,0,0.08)":"transparent",border:"none",lineHeight:"1",transition:"background 0.15s",position:"relative"}),role:"menuitem","aria-label":e,onClick:()=>z(t),onMouseEnter:()=>{u(t)},onMouseLeave:()=>u(-1)},...n);var r});return o("div",{className:`word-processor ${e.className??""}`.trim(),style:R},o("div",{className:"word-processor__menu-bar",style:{display:"flex",alignItems:"center",height:"30px",backgroundColor:"var(--color-bg-subtle, #ffffff)",borderBottom:"1px solid var(--color-border, #d0d0d0)",padding:"0 8px",gap:"2px",flexShrink:"0",position:"relative"},role:"menubar"},...P),o("div",{className:"word-processor__toolbar",style:{display:"flex",alignItems:"center",height:"36px",backgroundColor:"var(--color-bg-subtle, #f8f9fa)",borderBottom:"1px solid var(--color-border, #d0d0d0)",padding:"0 12px",gap:"12px",flexShrink:"0"},role:"toolbar","aria-label":"Formatting toolbar"},o("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",border:"1px solid var(--color-border, #ccc)",borderRadius:"3px",fontSize:"12px",color:"var(--color-text, #444)",backgroundColor:"transparent",cursor:"default",height:"24px",gap:"4px"},"aria-label":"Font family"},o("span",null,"Arial"),o("span",{style:{fontSize:"10px",color:"#999"}},"▼")),o("div",{key:"0",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px"}},...Pt.map(e=>o("button",{key:e.id,style:E(e.id,e.style),title:e.shortcut?`${e.label} (${e.shortcut})`:e.label,"aria-label":e.label,"aria-pressed":String($[e.id]??!1),onClick:w[e.id],onMouseEnter:()=>g(e.id),onMouseLeave:()=>g("")},e.text))),o("div",{key:"1",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px",alignItems:"center"}},o("select",{style:{padding:"2px 4px",border:"1px solid var(--color-border, #ccc)",borderRadius:"3px",fontSize:"12px",color:"var(--color-text, #444)",backgroundColor:"transparent",cursor:"pointer",height:"24px",outline:"none"},"aria-label":"Font size",value:v,onChange:e=>{const t=e.target;C(t.value)}},...jt.map(e=>o("option",{key:e,value:e},Yt[e])))),o("div",{key:"2",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px"}},...Ht.map((e,t)=>o("button",{key:String(t),style:E(`align-${t}`),title:e.label,"aria-label":e.label,onClick:()=>M(e.command),onMouseEnter:()=>g(`align-${t}`),onMouseLeave:()=>g("")},e.text)))),o("div",{className:"word-processor__ruler",style:{height:"20px",backgroundColor:"#e8e8e8",borderBottom:"1px solid #ccc",position:"relative",flexShrink:"0",margin:"0 60px"},"aria-hidden":"true"},...D),o("main",{className:"word-processor__document-area",style:{flex:"1",display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"30px 40px",overflow:"auto",backgroundColor:"#e0e0e0",cursor:"text"},onClick:F},o("div",{className:"word-processor__page",style:{width:"680px",minHeight:"880px",backgroundColor:"#ffffff",boxShadow:"0 2px 12px rgba(0,0,0,0.18), 0 0 1px rgba(0,0,0,0.1)",padding:"72px 72px 96px 72px",boxSizing:"border-box",fontSize:"14px",lineHeight:"1.6",color:"#222",fontFamily:'"Times New Roman", Georgia, serif',cursor:"text",outline:"none"},contentEditable:"true",ref:k,onInput:A,suppressContentEditableWarning:!0},L)),o("div",{className:"word-processor__status-bar",style:{height:"24px",backgroundColor:"var(--color-bg-subtle, #f0f0f0)",borderTop:"1px solid var(--color-border, #ccc)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",fontSize:"11px",color:"#666",flexShrink:"0"}},o("span",null,"Page 1 of 1"),o("span",null,`${T} words`),o("span",null,"100%")))},exports.applyGate=zn,exports.blochToCartesian=$n,exports.buildInputStyle=ne,exports.buildNavItemStyle=we,exports.buildRotationMatrix=Mt,exports.cartesianToBloch=Mn,exports.computeBoxStats=An,exports.computeMandelbrotGrid=function(e,t,n=[-2.5,1],o=[-1.25,1.25],r=80,i=ut){const l=[];for(let a=0;a<t;a++){const s=[],d=o[1]-a/t*(o[1]-o[0]);for(let t=0;t<e;t++){const o=n[0]+t/e*(n[1]-n[0]);s.push(i(o,d,r))}l.push(s)}return l},exports.computeSlices=St,exports.createToaster=Ze,exports.describeArc=vt,exports.generateEdges=$t,exports.generateHypercube=Rt,exports.generatePalette=Lt,exports.generateVertices=wt,exports.numRotationAngles=Dt,exports.projectTo2D=Ft,exports.transformVec=At,exports.useBarGraphScales=nt,exports.useHover=$e,exports.useHypercube=function(e={}){const t=e.dimension??4,n=e.rotationSpeed??.008,o=e.perspective??.25,r=e.scale??200,i=Dt(t),[s,c]=l(()=>new Array(i).fill(0));return a(()=>{if(0===n)return;let e=!0,t=0;const o=()=>{e&&(c(e=>e.map((e,t)=>e+n*(1+.3*t))),t=requestAnimationFrame(o))};return t=requestAnimationFrame(o),()=>{e=!1,cancelAnimationFrame(t)}},[n]),{data:d(()=>Rt(t,s,o,r),[t,s,o,r]),angles:s,setAngles:c}},exports.useLineGraphScales=xt,exports.useToast=function(e={}){const t=c(null);t.current||(t.current=Ze(e));const n=t.current,r=s(()=>o(et,{toaster:n}),[n]);return{toast:n.toast,dismiss:n.dismiss,dismissAll:n.dismissAll,ToastContainer:r}};
1
+ "use strict";const e=Symbol.for("spec.element"),t=Symbol.for("spec.provider"),n=Symbol.for("spec.consumer");function o(t,n,...o){let r=null,i=null;const l={};if(null!=n){void 0!==n.key&&(r=""+n.key),void 0!==n.ref&&(i=n.ref);for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&"key"!==e&&"ref"!==e&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(l[e]=n[e])}if(1===o.length?l.children=o[0]:o.length>1&&(l.children=o),"function"==typeof t&&t.defaultProps){const e=t.defaultProps;for(const t of Object.keys(e))"__proto__"!==t&&"constructor"!==t&&void 0===l[t]&&(l[t]=e[t])}return{$$typeof:e,type:t,props:l,key:r,ref:i}}function r(e){const o={$$typeof:Symbol.for("spec.context"),Provider:null,Consumer:null,_currentValue:e,_defaultValue:e},r={$$typeof:t,_context:o},i={$$typeof:n,_context:o};return o.Provider=r,o.Consumer=i,o}function i(){throw new Error("Invalid hook call. Hooks can only be called inside the body of a function component.")}function l(e){return i().useState(e)}function a(e,t){return i().useEffect(e,t)}function s(e,t){return i().useCallback(e,t)}function d(e,t){return i().useMemo(e,t)}function c(e){return i().useRef(e)}function f(){return i().useId()}function p(){const e=("undefined"!=typeof window?window.location.hash:"").replace(/^#\/?/,"/");return""===e?"/":e}r({pathname:"/",params:{},navigate:()=>{throw new Error("useNavigate must be used inside a <Router> component.")},basePath:""}),p();const u=new Set;function h(e){if(!e)return new Date;const t=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(new Date),n=e=>Number(t.find(t=>t.type===e)?.value??0);return new Date(n("year"),n("month")-1,n("day"),n("hour"),n("minute"),n("second"))}"undefined"!=typeof window&&window.addEventListener("hashchange",function(){p(),"undefined"!=typeof window&&window.location.hash;for(const e of u)e()}),r({flags:{},isEnabled:()=>!1,setFlag:()=>{},loading:!1});const g="#334155",x="#1e293b",y="#374151",m={xs:24,sm:32,md:40,lg:56,xl:80},b=["#3b82f6","#ef4444","#22c55e","#a855f7","#f97316","#ec4899","#14b8a6","#6366f1","#eab308","#06b6d4"],v={online:"#22c55e",offline:"#9ca3af",busy:"#ef4444",away:"#eab308"};function S(e,t){const n=-t/4+"px";switch(e){case"top-left":return{top:n,left:n};case"bottom-right":return{bottom:n,right:n};case"bottom-left":return{bottom:n,left:n};default:return{top:n,right:n}}}const k={sm:{minWidth:"16px",height:"16px",fontSize:"10px",padding:"0 4px"},md:{minWidth:"20px",height:"20px",fontSize:"12px",padding:"0 6px"},lg:{minWidth:"24px",height:"24px",fontSize:"14px",padding:"0 8px"}},w={sm:{width:"6px",height:"6px"},md:{width:"8px",height:"8px"},lg:{width:"10px",height:"10px"}},$={width:"100%",borderCollapse:"collapse",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",color:"#1f2937"},M={padding:"10px 12px",textAlign:"left",fontWeight:"600",backgroundColor:"#f9fafb",borderBottom:"2px solid #e5e7eb",userSelect:"none",whiteSpace:"nowrap"},C={padding:"10px 12px",borderBottom:"1px solid #e5e7eb"},z={marginLeft:"4px",fontSize:"12px",color:"#6b7280"},I={width:"100%",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",fontSize:"12px",boxSizing:"border-box"},A={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",fontSize:"13px",color:"#6b7280"},F={padding:"4px 10px",margin:"0 2px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",fontSize:"13px"},R={...F,backgroundColor:"#3b82f6",color:"#fff",borderColor:"#3b82f6"},D={...F,opacity:"0.5",cursor:"default"},L={cursor:"pointer",width:"16px",height:"16px"};function N(e,t,n){return e!==t?"↕":"asc"===n?"↑":"↓"}function T(e){return e<10?`0${e}`:String(e)}const W={fontFamily:'"SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace',backgroundColor:"#1e293b",color:"#e2e8f0",padding:"16px 24px",borderRadius:"8px",display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"4px"},B={fontSize:"2rem",fontWeight:"600",letterSpacing:"2px",lineHeight:"1"},E={fontSize:"0.875rem",fontWeight:"400",marginLeft:"4px",verticalAlign:"super"},P={fontSize:"0.75rem",color:"#94a3b8",marginTop:"4px"},H={listStyle:"none",margin:"0",padding:"0",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px"},j={padding:"10px 14px",color:"var(--color-text, #1f2937)"},_={borderBottom:"1px solid var(--color-border, #e5e7eb)"},Y={cursor:"pointer",transition:"background-color 0.15s ease"},q={backgroundColor:"var(--color-bg-muted, #eff6ff)"},O={padding:"24px",textAlign:"center",color:"var(--color-text-muted, #9ca3af)",fontSize:"14px"},U={padding:"10px 14px",borderBottom:"1px solid var(--color-border, #e5e7eb)",backgroundColor:"var(--color-bg-subtle, #f9fafb)",fontWeight:"600",fontSize:"13px",color:"var(--color-text-muted, #6b7280)"};function G(e,t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec({red:"#ef4444",blue:"#3b82f6",green:"#22c55e",yellow:"#eab308",purple:"#a855f7",pink:"#ec4899",orange:"#f97316",gray:"#6b7280",indigo:"#6366f1",teal:"#14b8a6",cyan:"#06b6d4"}[e]??e);return n?`rgba(${parseInt(n[1],16)}, ${parseInt(n[2],16)}, ${parseInt(n[3],16)}, ${t})`:e}const V={sm:{fontSize:"11px",padding:"2px 8px",gap:"4px"},md:{fontSize:"13px",padding:"4px 10px",gap:"6px"},lg:{fontSize:"15px",padding:"6px 14px",gap:"8px"}},X={display:"inline-flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",fontSize:"inherit",lineHeight:"1",opacity:"0.7",color:"inherit"},K={overflow:"auto",position:"relative",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},Z={info:{icon:"ℹ️",bg:"#eff6ff",border:"#3b82f6",text:"#1e40af",filledBg:"#3b82f6",filledText:"#ffffff"},success:{icon:"✅",bg:"#f0fdf4",border:"#22c55e",text:"#166534",filledBg:"#22c55e",filledText:"#ffffff"},warning:{icon:"⚠️",bg:"#fffbeb",border:"#f59e0b",text:"#92400e",filledBg:"#f59e0b",filledText:"#ffffff"},error:{icon:"❌",bg:"#fef2f2",border:"#ef4444",text:"#991b1b",filledBg:"#ef4444",filledText:"#ffffff"}};function J(e){const t={width:e.width,height:e.height,borderRadius:e.borderRadius,backgroundColor:"#e5e7eb"};return e.animated&&(t.backgroundImage="linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",t.backgroundSize="200% 100%",t.animation=`liq-shimmer-${e.animId} 1.5s ease-in-out infinite`),e.marginBottom&&(t.marginBottom=e.marginBottom),t}const Q={sm:16,md:24,lg:40},ee={slow:"1.2s",normal:"0.75s",fast:"0.45s"};function te(e){const t=e.styling??{},n=!!e.error,r={display:"flex",flexDirection:"column",gap:t.gap??"4px",width:"number"==typeof t.width?`${t.width}px`:t.width??"100%",fontFamily:t.fontFamily??"inherit",fontSize:t.fontSize??"14px",opacity:e.disabled?"0.6":"1",...t.custom??{}},i={color:t.labelColor??"#374151",fontWeight:t.labelFontWeight??"500",fontSize:t.labelFontSize??"14px"},l={fontSize:"12px",color:n?t.errorColor??"#ef4444":t.helpColor??"#6b7280",marginTop:"2px"};return o("div",{className:`form-field ${n?"form-field--error":""} ${e.className??""}`.trim(),style:r},e.label?o("label",{htmlFor:e.htmlFor,style:i},e.label,e.required?o("span",{style:{color:t.errorColor??"#ef4444",marginLeft:"2px"}},"*"):null):null,e.children,e.error?o("div",{className:"form-field__error",style:l,role:"alert"},e.error):e.helpText?o("div",{className:"form-field__help",style:l},e.helpText):null)}function ne(e,t){const n=t.error?e.errorBorderColor??"#ef4444":t.focused?e.focusBorderColor??"#3b82f6":void 0;return{padding:e.padding??"8px 12px",border:n?`1px solid ${n}`:e.border??"1px solid #d1d5db",borderRadius:e.borderRadius??"6px",fontSize:e.fontSize??"14px",fontFamily:e.fontFamily??"inherit",backgroundColor:e.backgroundColor??"#ffffff",color:e.color??"#1f2937",outline:"none",transition:e.transition??"border-color 0.15s",width:"100%",boxSizing:"border-box",...t.focused&&n?{boxShadow:`0 0 0 3px ${n}22`}:{},...e.custom??{}}}const oe={sm:{box:14,icon:10,fontSize:"12px"},md:{box:18,icon:12,fontSize:"14px"},lg:{box:22,icon:16,fontSize:"16px"}},re=["#000000","#434343","#666666","#999999","#b7b7b7","#cccccc","#d9d9d9","#efefef","#f3f3f3","#ffffff","#980000","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#4a86e8","#0000ff","#9900ff","#ff00ff","#e6b8af","#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#c9daf8","#cfe2f3","#d9d2e9","#ead1dc"];function ie(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)}function le(e){let t=e.startsWith("#")?e:`#${e}`;return/^#[0-9a-fA-F]{3}$/.test(t)&&(t=`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`),t.toLowerCase()}const ae=["January","February","March","April","May","June","July","August","September","October","November","December"],se=["Su","Mo","Tu","We","Th","Fr","Sa"];function de(e){if(!e)return null;if(e instanceof Date)return e;const t=new Date(e);return isNaN(t.getTime())?null:t}function ce(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function fe(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return`${(e/Math.pow(1024,t)).toFixed(0===t?0:1)} ${["B","KB","MB","GB"][t]}`}const pe=["bold","italic","underline","strikethrough","heading1","heading2","bulletList","orderedList","blockquote","link","unlink","insertHR","removeFormat","undo","redo"],ue={bold:{label:"Bold",icon:"B",command:"bold"},italic:{label:"Italic",icon:"I",command:"italic"},underline:{label:"Underline",icon:"U",command:"underline"},strikethrough:{label:"Strikethrough",icon:"S",command:"strikethrough"},heading1:{label:"Heading 1",icon:"H1",command:"formatBlock",value:"h1"},heading2:{label:"Heading 2",icon:"H2",command:"formatBlock",value:"h2"},heading3:{label:"Heading 3",icon:"H3",command:"formatBlock",value:"h3"},bulletList:{label:"Bullet list",icon:"•",command:"insertUnorderedList"},orderedList:{label:"Numbered list",icon:"1.",command:"insertOrderedList"},blockquote:{label:"Blockquote",icon:"“",command:"formatBlock",value:"blockquote"},link:{label:"Insert link",icon:"🔗",command:"createLink"},unlink:{label:"Remove link",icon:"⛔",command:"unlink"},insertHR:{label:"Horizontal rule",icon:"―",command:"insertHorizontalRule"},removeFormat:{label:"Clear format",icon:"✘",command:"removeFormat"},undo:{label:"Undo",icon:"↩",command:"undo"},redo:{label:"Redo",icon:"↪",command:"redo"}},he=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Europe/London","Europe/Paris","Asia/Tokyo"];function ge(e){return String(e).padStart(2,"0")}const xe={sm:{trackW:32,trackH:18,thumbSize:14,offset:2},md:{trackW:44,trackH:24,thumbSize:20,offset:2},lg:{trackW:56,trackH:30,thumbSize:26,offset:2}},ye={none:"none",sm:"0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06)",md:"0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06)",lg:"0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05)"},me={none:"none",sm:"0 1px 3px rgba(0,0,0,0.12)",md:"0 4px 6px rgba(0,0,0,0.1)"};function be(e,t){return"both"===e?"auto":"horizontal"===e?"x"===t?"auto":"hidden":"y"===t?"auto":"hidden"}function ve(e){switch(e){case"never":return{scrollbarWidth:"none"};case"always":case"hover":return{scrollbarWidth:"thin"};default:return{scrollbarWidth:"auto"}}}function Se(e){return!isFinite(e)||e<0?"0:00":`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function ke(e){const t=e.orientation??"vertical",n=e.role??"navigation",r=e.keyboardNav??!0,i=e.styling??{},l=c(null),a={display:"flex",flexDirection:"horizontal"===t?"row":"column",backgroundColor:i.backgroundColor??"#ffffff",color:i.color??"#1f2937",fontFamily:i.fontFamily??"inherit",fontSize:i.fontSize??"14px",border:i.border??"1px solid #e5e7eb",borderRadius:i.borderRadius??"8px",padding:i.padding??"0",width:"number"==typeof i.width?`${i.width}px`:i.width??"auto",overflow:"auto",boxSizing:"border-box",listStyle:"none",margin:"0",...i.boxShadow?{boxShadow:i.boxShadow}:{},...i.maxHeight?{maxHeight:"number"==typeof i.maxHeight?`${i.maxHeight}px`:i.maxHeight}:{},...i.custom??{}},d=s(e=>{if(!r)return;const n=e,o=l.current;if(!o)return;const i=Array.from(o.querySelectorAll('button, [tabindex]:not([tabindex="-1"]), a[href], [role="menuitem"], [role="treeitem"]')),a=i.indexOf(document.activeElement);if(a<0)return;const s="vertical"===t,d=s?"ArrowDown":"ArrowRight",c=s?"ArrowUp":"ArrowLeft";if(n.key===d){n.preventDefault();const e=i[a+1];e&&e.focus()}else if(n.key===c){n.preventDefault();const e=i[a-1];e&&e.focus()}else"Home"===n.key?(n.preventDefault(),i[0]?.focus()):"End"===n.key&&(n.preventDefault(),i[i.length-1]?.focus())},[r,t]);return o("nav",{ref:l,role:n,"aria-label":e.ariaLabel??void 0,"aria-orientation":t,className:`nav-wrapper ${e.className??""}`.trim(),style:a,onKeyDown:d},e.children)}function we(e,t){return{display:"flex",alignItems:"center",padding:e.padding??"10px 16px",cursor:e.cursor??"pointer",transition:e.transition??"background-color 0.15s",backgroundColor:t.active?e.activeBackground??"#eff6ff":t.hover?e.hoverBackground??"#f3f4f6":"transparent",color:t.active?e.activeColor??"#2563eb":"inherit",border:"none",outline:"none",width:"100%",textAlign:"left",font:"inherit",...e.separator?{borderBottom:e.separator}:{}}}function $e(){const[e,t]=l(!1);return{hover:e,onMouseEnter:s(()=>t(!0),[]),onMouseLeave:s(()=>t(!1),[])}}function Me(e){const{section:t,expanded:n,onToggle:r,headerStyle:i,expandIcon:l,collapseIcon:a,iconPosition:d}=e,{hover:c,onMouseEnter:f,onMouseLeave:p}=$e(),u=!0===t.disabled,h={display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",boxSizing:"border-box",padding:i.padding??"12px 16px",backgroundColor:u?"#f9fafb":c?i.hoverBackground??"#f3f4f6":i.backgroundColor??"transparent",color:u?"#9ca3af":i.color??"inherit",fontWeight:i.fontWeight??"600",fontSize:i.fontSize??"inherit",border:"none",outline:"none",cursor:u?"not-allowed":"pointer",font:"inherit",textAlign:"left",transition:"background-color 0.15s",...i.borderBottom?{borderBottom:i.borderBottom}:{}};"left"===d&&(h.flexDirection="row");const g=s(e=>{const t=e;u||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r())},[u,r]),x=s(()=>{u||r()},[u,r]),y=o("span",{"aria-hidden":"true",style:{display:"inline-block",transition:"transform 0.2s ease",transform:n?"rotate(180deg)":"rotate(0deg)",flexShrink:"0",marginLeft:"right"===d?"auto":"0",marginRight:"left"===d?"8px":"0",paddingLeft:"right"===d?"8px":"0"}},n?a:l),m=t.icon?o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},o("span",{"aria-hidden":"true"},t.icon),t.header):t.header,b="left"===d?[y,m]:[m,y];return o("button",{id:`accordion-header-${t.id}`,role:"button","aria-expanded":String(n),"aria-controls":`accordion-panel-${t.id}`,"aria-disabled":u?"true":void 0,"data-section-id":t.id,tabIndex:u?-1:0,style:h,onClick:x,onKeyDown:g,onMouseEnter:f,onMouseLeave:p},...b)}function Ce(e){const{section:t,expanded:n,contentStyle:r,animated:i}=e,l={overflow:"hidden",boxSizing:"border-box",...i?{maxHeight:n?"2000px":"0",transition:"max-height 0.3s ease"}:{display:n?"block":"none"}},a={padding:r.padding??"12px 16px",backgroundColor:r.backgroundColor??"transparent",...r.borderBottom?{borderBottom:r.borderBottom}:{}};return o("div",{id:`accordion-panel-${t.id}`,role:"region","aria-labelledby":`accordion-header-${t.id}`,"aria-hidden":String(!n),"data-section-content":t.id,style:l},o("div",{style:a},t.content))}const ze={sm:{fontSize:"12px",padding:"4px 0"},md:{fontSize:"14px",padding:"6px 0"},lg:{fontSize:"16px",padding:"8px 0"}};function Ie(e){const{item:t,itemStyle:n,closeOnSelect:r,onClose:i}=e,{hover:a,onMouseEnter:d,onMouseLeave:c}=$e(),[f,p]=l(!1),u=t.children&&t.children.length>0;if(t.divider)return o("div",{role:"separator",style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const h=!0===t.disabled,g={...we(n,{hover:!h&&a,active:!1}),position:"relative",justifyContent:"space-between",...h?{color:"#9ca3af",cursor:"default",opacity:"0.6"}:{}},x=s(()=>{h||(u?p(e=>!e):(t.onClick&&t.onClick(),r&&i()))},[h,u,t,r,i]),y=s(()=>{d(),u&&p(!0)},[u,d]),m=s(()=>{c(),u&&p(!1)},[u,c]),b=o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.icon?o("span",{style:{flexShrink:"0"},"aria-hidden":"true"},t.icon):null,o("span",null,t.label)),v=u?o("span",{style:{marginLeft:"8px",fontSize:"10px",lineHeight:"1"},"aria-hidden":"true"},"›"):null,S=u&&f?o("div",{style:{position:"absolute",left:"100%",top:"0",zIndex:"1000"}},o(ke,{orientation:"vertical",role:"menu",styling:{boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"1px solid #e5e7eb",borderRadius:"6px",width:"200px",backgroundColor:"#ffffff"}},...t.children.map(e=>o(Ie,{key:e.id,item:e,itemStyle:n,closeOnSelect:r,onClose:i})))):null;return o("div",{style:{position:"relative"},onMouseEnter:y,onMouseLeave:m},o("button",{type:"button",role:"menuitem",style:g,onClick:x,disabled:h||void 0,tabIndex:h?-1:0,"aria-disabled":h?"true":void 0,"aria-haspopup":u||void 0,"aria-expanded":u?String(f):void 0},b,v),S)}function Ae(e){const{item:t,onClose:n,index:r}=e,{hover:i,onMouseEnter:a,onMouseLeave:d}=$e(),[c,f]=l(!1),p=t.children&&t.children.length>0;if(t.divider)return o("div",{role:"separator",style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const u=!0===t.disabled,h=s(()=>{u||(p?f(e=>!e):(t.onClick&&t.onClick(),n()))},[u,p,t,n]),g=s(()=>{a(),p&&f(!0)},[p,a]),x=s(()=>{d(),p&&f(!1)},[p,d]),y={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 16px",fontSize:"13px",fontFamily:"inherit",border:"none",outline:"none",width:"100%",textAlign:"left",cursor:u?"default":"pointer",backgroundColor:!u&&i?"#f3f4f6":"transparent",color:u?"#9ca3af":"#1f2937",opacity:u?"0.6":"1",transition:"background-color 0.1s",boxSizing:"border-box"},m=o("span",{style:{display:"flex",alignItems:"center",gap:"8px"}},t.icon?o("span",{style:{width:"16px",textAlign:"center"},"aria-hidden":"true"},t.icon):o("span",{style:{width:"16px"}}),o("span",null,t.label)),b=p?o("span",{style:{fontSize:"10px",color:"#9ca3af"},"aria-hidden":"true"},"▶"):t.shortcut?o("span",{style:{fontSize:"11px",color:"#9ca3af",marginLeft:"24px"}},t.shortcut):null,v=p&&c?o("div",{style:{position:"absolute",left:"100%",top:"0",zIndex:"1001"}},o("div",{role:"menu",style:{backgroundColor:"#ffffff",border:"1px solid #e5e7eb",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",minWidth:"180px"}},...t.children.map((e,t)=>o(Ae,{key:String(t),item:e,onClose:n,index:t})))):null;return o("div",{style:{position:"relative"},onMouseEnter:g,onMouseLeave:x},o("button",{type:"button",role:"menuitem",style:y,onClick:h,disabled:u||void 0,tabIndex:-1,"aria-disabled":u||void 0,"aria-haspopup":p||void 0,"aria-expanded":p?c:void 0},m,b),v)}function Fe(e){const{menu:t,index:n,isOpen:r,anyOpen:i,onOpen:l,onClose:a}=e,{hover:d,onMouseEnter:f,onMouseLeave:p}=$e(),u=c(null),h=s(()=>{r?a():l(n)},[r,n,l,a]),g=s(()=>{f(),i&&!r&&l(n)},[i,r,n,l,f]),x={display:"inline-flex",alignItems:"center",padding:"6px 12px",fontSize:"13px",fontFamily:"inherit",border:"none",outline:"none",cursor:"pointer",backgroundColor:r?"#e5e7eb":d?"#f3f4f6":"transparent",color:"#1f2937",borderRadius:"4px",transition:"background-color 0.1s"},y=r?o("div",{style:{position:"absolute",top:"100%",left:"0",zIndex:"1000",marginTop:"2px"}},o("div",{role:"menu","aria-label":`${t.label} menu`,style:{backgroundColor:"#ffffff",border:"1px solid #e5e7eb",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",minWidth:"200px"}},...t.items.map((e,t)=>o(Ae,{key:String(t),item:e,onClose:a,index:t})))):null;return o("div",{style:{position:"relative",display:"inline-block"},onMouseEnter:g,onMouseLeave:p},o("button",{ref:u,type:"button",role:"menuitem",style:x,onClick:h,"aria-haspopup":"true","aria-expanded":String(r),tabIndex:0},t.label),y)}function Re(e,t){const n=[];for(let o=e;o<=t;o++)n.push(o);return n}const De={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"36px",height:"36px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"#ffffff",color:"#374151",fontSize:"14px",fontFamily:"inherit",cursor:"pointer",transition:"background-color 0.15s, color 0.15s",outline:"none",userSelect:"none"},Le={...De,backgroundColor:"#2563eb",color:"#ffffff",borderColor:"#2563eb",fontWeight:"600"},Ne={...De,color:"#9ca3af",cursor:"default",opacity:"0.5"},Te={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"36px",height:"36px",color:"#6b7280",fontSize:"14px",userSelect:"none"};function We(e){const{item:t,collapsed:n,selectedId:r,onSelect:i,depth:a}=e,{hover:d,onMouseEnter:c,onMouseLeave:f}=$e(),[p,u]=l(!1),h=t.children&&t.children.length>0,g=t.id===r,x=s(()=>{h&&!n&&u(e=>!e),i&&i(t.id)},[h,n,i,t.id]),y={display:"flex",alignItems:"center",padding:n?"10px 0":"10px 12px 10px "+(n?"0":16+16*a+"px"),justifyContent:n?"center":"flex-start",cursor:"pointer",backgroundColor:g?"#eff6ff":d?"#f3f4f6":"transparent",color:g?"#2563eb":"#1f2937",border:"none",outline:"none",width:"100%",textAlign:"left",font:"inherit",fontSize:"14px",transition:"background-color 0.15s",position:"relative",gap:"10px",boxSizing:"border-box"},m=t.icon?o("span",{style:{flexShrink:"0",fontSize:"16px"},"aria-hidden":"true"},t.icon):null,b=n?null:o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},t.label),v=!n&&t.badge?o("span",{style:{backgroundColor:"#ef4444",color:"#ffffff",fontSize:"11px",fontWeight:"600",padding:"1px 6px",borderRadius:"10px",marginLeft:"4px",flexShrink:"0"}},t.badge):null,S=!n&&h?o("span",{style:{fontSize:"10px",transition:"transform 0.15s",transform:p?"rotate(90deg)":"rotate(0deg)",marginLeft:"4px"},"aria-hidden":"true"},"▶"):null,k=n&&d?o("div",{style:{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"8px",padding:"4px 10px",backgroundColor:"#1f2937",color:"#ffffff",fontSize:"12px",borderRadius:"4px",whiteSpace:"nowrap",zIndex:"1000",pointerEvents:"none"},role:"tooltip"},t.label):null,w=o("button",{type:"button",style:y,onClick:x,onMouseEnter:c,onMouseLeave:f,"aria-selected":g?"true":"false",title:n?t.label:void 0},m,b,v,S,k),$=!n&&h&&p?t.children.map(e=>o(We,{key:e.id,item:e,collapsed:n,selectedId:r,onSelect:i,depth:a+1})):null;return o("div",{key:t.id,style:{position:"relative"}},w,$?o("div",{role:"group"},...$):null)}const Be={sm:{height:"28px",padding:"4px 8px",fontSize:"12px",iconSize:"14px"},md:{height:"36px",padding:"6px 12px",fontSize:"14px",iconSize:"16px"},lg:{height:"44px",padding:"8px 16px",fontSize:"16px",iconSize:"18px"}};function Ee(e){const{item:t,size:n,variant:r}=e,{hover:i,onMouseEnter:a,onMouseLeave:d}=$e(),c=Be[n],f=!0===t.disabled,p="toggle"===t.type,[u,h]=l(!1),g=p?!0===t.active:u,x=s(()=>{!f&&t.onClick&&t.onClick()},[f,t]),y=s(()=>{f||p||h(!0)},[f,p]),m=s(()=>{p||h(!1)},[p]),b=s(()=>{d(),p||h(!1)},[p,d]),v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"6px",height:c.height,padding:c.padding,fontSize:c.fontSize,fontFamily:"inherit",border:"raised"===r?"1px solid #d1d5db":"1px solid transparent",borderRadius:"4px",backgroundColor:g?"#e0e7ff":!f&&i?"#f3f4f6":"raised"===r?"#ffffff":"transparent",color:f?"#9ca3af":g?"#2563eb":"#374151",cursor:f?"default":"pointer",opacity:f?"0.5":"1",outline:"none",transition:"background-color 0.15s"},S=t.icon?o("span",{style:{fontSize:c.iconSize},"aria-hidden":"true"},t.icon):null,k=t.label?o("span",null,t.label):null,w="dropdown"===t.type?o("span",{style:{fontSize:"10px",marginLeft:"2px"},"aria-hidden":"true"},"▼"):null;return o("button",{type:"button",style:v,onClick:x,onMouseDown:y,onMouseUp:m,onMouseEnter:a,onMouseLeave:b,disabled:f||void 0,"aria-pressed":p?g:void 0,"aria-label":t.label||t.id,title:t.label||t.id},S,k,w)}class Pe{constructor(e,t){this.id=e.id,this.label=e.label,this.expanded=e.expanded??!1,this.icon=e.icon??null,this.metadata=e.metadata??{},this.parent=t??null,this.depth=t?t.depth+1:0,this.children=(e.children??[]).map(e=>new Pe(e,this))}static fromData(e){return new Pe(e)}isLeaf(){return 0===this.children.length}isRoot(){return null===this.parent}walk(e){e(this,this.depth);for(const t of this.children)t.walk(e)}find(e){if(this.id===e)return this;for(const t of this.children){const n=t.find(e);if(n)return n}return null}toggle(){this.expanded=!this.expanded}expand(){this.expanded=!0}collapse(){this.expanded=!1}addChild(e){const t=new Pe(e,this);return this.children.push(t),t}removeChild(e){const t=this.children.findIndex(t=>t.id===e);return-1!==t&&(this.children.splice(t,1),!0)}}function He(e){e.expanded=!0;for(const t of e.children)He(t)}function je(e,t=[]){if(t.push(e),e.expanded)for(const n of e.children)je(n,t);return t}function _e(e){if(!e.parent)return!0;const t=e.parent.children;return t[t.length-1]===e}function Ye(e){const{node:t,isSelected:n,indentPx:r,lineColor:i,lineWidth:l,iconExpanded:s,iconCollapsed:d,nodeStyle:f,renderNode:p,onToggle:u,onClick:h,focusedId:g}=e,x=$e(),y=c(null),m=g===t.id;a(()=>{m&&y.current&&y.current.focus()},[m]);const b=t.isLeaf(),v=t.depth,S=[];for(let e=0;e<v;e++){let n=t;for(let t=0;t<v-e;t++)n=n?n.parent:null;const a=!!n&&!_e(n);S.push(o("span",{key:`connector-${e}`,"aria-hidden":"true",style:{display:"inline-block",width:`${r}px`,height:"100%",position:"relative",flexShrink:"0",...a?{borderLeft:`${l}px solid ${i}`}:{}}}))}const k=v>0?o("span",{"aria-hidden":"true",style:{display:"inline-block",width:`${Math.floor(r/2)}px`,height:"0",borderTop:`${l}px solid ${i}`,flexShrink:"0",alignSelf:"center",marginLeft:`-${r}px`}}):null,w=b?o("span",{"aria-hidden":"true",style:{display:"inline-block",width:"18px",flexShrink:"0",marginRight:"4px"}}):o("span",{"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"18px",height:"18px",fontSize:"14px",lineHeight:"1",cursor:"pointer",userSelect:"none",flexShrink:"0",marginRight:"4px",fontFamily:"monospace"},onClick:e=>{e.stopPropagation(),u(t)}},t.expanded?s:d),$=p?p(t,n):o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},t.icon?o("span",{style:{marginRight:"6px"}},t.icon):null,t.label),M=we(f,{hover:x.hover,active:n});return o("div",{ref:y,role:"treeitem","aria-expanded":b?void 0:String(t.expanded),"aria-selected":n?"true":"false","aria-level":v+1,tabIndex:m?0:-1,style:{...M,display:"flex",alignItems:"stretch",padding:"0"},onMouseEnter:x.onMouseEnter,onMouseLeave:x.onMouseLeave,onClick:()=>h(t)},...S,k,o("span",{style:{display:"flex",alignItems:"center",flex:"1",padding:f.padding??"6px 10px",minWidth:"0"}},w,$))}function qe(e){const{items:t,position:n,onClose:r,depth:i}=e,[s,d]=l(-1),[f,p]=l(null),u=c(null);a(()=>{if(!u.current)return;u.current.focus();const e=e=>{const n=e,o=t.map((e,t)=>({item:e,i:t})).filter(({item:e})=>!e.divider);if("ArrowDown"===n.key)n.preventDefault(),d(e=>{const t=(o.findIndex(({i:t})=>t===e)+1)%o.length;return o[t].i});else if("ArrowUp"===n.key)n.preventDefault(),d(e=>{const t=o.findIndex(({i:t})=>t===e),n=t<=0?o.length-1:t-1;return o[n].i});else if("ArrowRight"===n.key)s>=0&&t[s]?.children&&p(s);else if("ArrowLeft"===n.key)i>0&&r();else if("Enter"===n.key){if(n.preventDefault(),s>=0){const e=t[s];e.children?p(s):!e.disabled&&e.onClick&&(e.onClick(),r())}}else"Escape"===n.key&&r()};u.current.addEventListener("keydown",e);const n=u.current;return()=>n.removeEventListener("keydown",e)},[t,s,i,r]);const h={position:"fixed",left:`${n.x}px`,top:`${n.y}px`,backgroundColor:"#fff",border:"1px solid #e5e7eb",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",padding:"4px 0",minWidth:"180px",zIndex:`${10200+i}`,outline:"none",overflow:"visible"},g=t.map((e,t)=>{if(e.divider)return o("div",{key:`divider-${t}`,style:{height:"1px",backgroundColor:"#e5e7eb",margin:"4px 0"}});const l=s===t,a=!!e.disabled,c=!!(e.children&&e.children.length>0),u={display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",fontSize:"14px",color:a?"#9ca3af":"#1f2937",cursor:a?"default":"pointer",backgroundColor:l&&!a?"#f3f4f6":"transparent",userSelect:"none",position:"relative"},h=[];e.icon&&h.push(o("span",{style:{width:"20px",textAlign:"center",flexShrink:"0"}},e.icon)),h.push(o("span",{style:{flex:"1"}},e.label??"")),c&&h.push(o("span",{style:{fontSize:"10px",color:"#9ca3af",marginLeft:"8px"}},"▶"));const g=[o("div",{key:`item-${t}`,style:u,onMouseEnter:()=>{d(t),p(c?t:null)},onClick:()=>{a||(c?p(t):(e.onClick&&e.onClick(),r()))},role:"menuitem","aria-disabled":a?"true":void 0},...h)];return c&&f===t&&g.push(o(qe,{key:`submenu-${t}`,items:e.children,position:{x:n.x+178,y:n.y+36*t},onClose:()=>p(null),depth:i+1})),o("div",{key:`wrap-${t}`,style:{position:"relative"}},...g)});return o("div",{ref:u,style:h,tabIndex:-1,role:"menu"},...g)}function Oe(e,t){if(t)return"translate3d(0, 0, 0)";switch(e){case"left":return"translate3d(-100%, 0, 0)";case"right":return"translate3d(100%, 0, 0)";case"top":return"translate3d(0, -100%, 0)";case"bottom":return"translate3d(0, 100%, 0)"}}function Ue(e,t){const n={position:"fixed",zIndex:"10001",backgroundColor:"#fff",boxShadow:"0 0 24px rgba(0, 0, 0, 0.15)",display:"flex",flexDirection:"column",overflow:"hidden"};switch(e){case"left":return{...n,top:"0",left:"0",bottom:"0",width:t};case"right":return{...n,top:"0",right:"0",bottom:"0",width:t};case"top":return{...n,top:"0",left:"0",right:"0",height:t};case"bottom":return{...n,bottom:"0",left:"0",right:"0",height:t}}}const Ge={sm:"400px",md:"600px",lg:"800px",full:"100vw"};function Ve(e,t){const n=t+8;switch(e){case"top":return{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:`${n}px`};case"bottom":return{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:`${n}px`};case"left":return{position:"absolute",right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:`${n}px`};case"right":return{position:"absolute",left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:`${n}px`}}}function Xe(e){const t={position:"absolute",width:"0",height:"0",borderStyle:"solid"},n="8px",o="transparent";switch(e){case"top":return{...t,bottom:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`${n} ${n} 0 ${n}`,borderColor:`#fff ${o} ${o} ${o}`};case"bottom":return{...t,top:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`0 ${n} ${n} ${n}`,borderColor:`${o} ${o} #fff ${o}`};case"left":return{...t,right:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} 0 ${n} ${n}`,borderColor:`${o} ${o} ${o} #fff`};case"right":return{...t,left:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} ${n} ${n} 0`,borderColor:`${o} #fff ${o} ${o}`}}}let Ke=0;function Ze(e={}){const t={position:e.position??"top-right",maxToasts:e.maxToasts??5,defaultDuration:e.defaultDuration??4e3};let n=[];const o=new Set;function r(){o.forEach(e=>e())}return{toast:function(e,o={}){const i=`toast-${++Ke}-${Date.now()}`,l={id:i,message:e,type:o.type??"info",duration:o.duration??t.defaultDuration,action:o.action,createdAt:Date.now()};return n=[l,...n].slice(0,t.maxToasts),r(),i},dismiss:function(e){n=n.filter(t=>t.id!==e),r()},dismissAll:function(){n=[],r()},subscribe:e=>(o.add(e),()=>{o.delete(e)}),getToasts:()=>n,config:t}}const Je={info:{bg:"#eff6ff",border:"#3b82f6",icon:"ℹ️"},success:{bg:"#f0fdf4",border:"#22c55e",icon:"✅"},warning:{bg:"#fffbeb",border:"#f59e0b",icon:"⚠️"},error:{bg:"#fef2f2",border:"#ef4444",icon:"❌"}};function Qe(e){const{item:t,onDismiss:n}=e,r=Je[t.type];a(()=>{if(t.duration<=0)return;const e=setTimeout(()=>n(t.id),t.duration);return()=>clearTimeout(e)},[t.id,t.duration,n]);const i={backgroundColor:r.bg,borderLeft:`4px solid ${r.border}`,borderRadius:"6px",padding:"12px 16px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",display:"flex",alignItems:"center",gap:"10px",pointerEvents:"auto",minWidth:"280px",maxWidth:"420px",animation:"specifyjs-toast-slide-in 0.3s ease forwards"},l={background:"none",border:`1px solid ${r.border}`,borderRadius:"4px",cursor:"pointer",fontSize:"12px",fontWeight:"600",color:r.border,padding:"4px 10px",flexShrink:"0"},s=[o("span",null,r.icon),o("span",{style:{flex:"1",fontSize:"14px",color:"#1f2937",lineHeight:"1.4"}},t.message)];return t.action&&s.push(o("button",{type:"button",style:l,onClick:t.action.onClick},t.action.label)),s.push(o("button",{type:"button",style:{background:"none",border:"none",cursor:"pointer",fontSize:"16px",color:"#9ca3af",padding:"2px 6px",lineHeight:"1",flexShrink:"0"},onClick:()=>n(t.id),"aria-label":"Dismiss toast"},"×")),o("div",{style:i,role:"alert"},...s)}function et(e){const{toaster:t}=e,[,n]=l(0);a(()=>t.subscribe(()=>n(e=>e+1)),[t]);const r=t.getToasts();if(0===r.length)return null;const i=function(e){const t={position:"fixed",zIndex:"10100",display:"flex",flexDirection:"column",gap:"8px",padding:"16px",pointerEvents:"none"},n=e.startsWith("top"),o=e.startsWith("bottom"),r=e.endsWith("left"),i=e.endsWith("right"),l=e.endsWith("center");return n&&(t.top="0"),o&&(t.bottom="0",t.flexDirection="column-reverse"),r&&(t.left="0"),i&&(t.right="0"),l&&(t.left="50%",t.transform="translateX(-50%)"),t}(t.config.position);a(()=>{const e="specifyjs-toast-keyframes";if(document.getElementById(e))return;const t=document.createElement("style");return t.id=e,t.textContent="\n @keyframes specifyjs-toast-slide-in {\n from { opacity: 0; transform: translateY(-12px); }\n to { opacity: 1; transform: translateY(0); }\n }\n ",document.head.appendChild(t),()=>{const t=document.getElementById(e);t&&t.remove()}},[]);const d=s(e=>t.dismiss(e),[t]),c=r.map(e=>o(Qe,{key:e.id,item:e,onDismiss:d}));return o("div",{style:i},...c)}function tt(e){const t={position:"absolute",width:"0",height:"0",borderStyle:"solid"},n="6px",o="transparent",r="#1f2937";switch(e){case"top":return{...t,bottom:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`${n} ${n} 0 ${n}`,borderColor:`${r} ${o} ${o} ${o}`};case"bottom":return{...t,top:`-${n}`,left:"50%",transform:"translateX(-50%)",borderWidth:`0 ${n} ${n} ${n}`,borderColor:`${o} ${o} ${r} ${o}`};case"left":return{...t,right:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} 0 ${n} ${n}`,borderColor:`${o} ${o} ${o} ${r}`};case"right":return{...t,left:`-${n}`,top:"50%",transform:"translateY(-50%)",borderWidth:`${n} ${n} ${n} 0`,borderColor:`${o} ${r} ${o} ${o}`}}}function nt(e,t,n,o,r){return d(()=>{const i=Math.max(1,(o-r*(e+1))/e);return{valueScale:e=>0===t?0:e/t*n,categoryScale:e=>r+e*(i+r),barThickness:i,maxValue:t,valueAxisLength:n,categoryAxisLength:o}},[e,t,n,o,r])}const ot=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function rt(e,t){return t||ot[e%ot.length]}function it(e){const{start:t,end:n,step:o}=e;if(o<=0||!isFinite(o))return[];const r=Math.ceil((n-t)/o)+1;if(r>1e6)return[];const i=[];for(let e=0;e<r;e++){const r=t+e*o;if(r>n+.001*o)break;i.push(r)}return i}function lt(e,t){const n=[];for(let o=0;o<t.length;o++){const r=t[o],i=e(r);isFinite(i)&&n.push({input:r,output:i})}return n}function at(e,t,n,o){let r=!1,i=0;const l=[],a=()=>{if(r)return;const s=Math.min(i+n,t.length);for(let n=i;n<s;n++){const o=t[n],r=e(o);isFinite(r)&&l.push({input:o,output:r})}i=s,i>=t.length?o(l,!0):(o(l,!1),st(a))};return st(a),()=>{r=!0}}function st(e){"function"==typeof requestIdleCallback?requestIdleCallback(()=>e(),{timeout:16}):setTimeout(e,0)}function dt(e,t){const n=t-e;if(n<=0)return[e];const o=function(e){const t=e/8,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return(o<1.5?1:o<3?2:o<7?5:10)*n}(n),r=[];for(let n=Math.ceil(e/o)*o;n<=t+.001*o;n+=o)r.push(Math.round(1e10*n)/1e10);return r}function ct(e){return Number.isInteger(e)?String(e):e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}const ft=40,pt=1e6;function ut(e,t,n){let o=0,r=0;for(let i=0;i<n;i++){const n=o*o,l=r*r;if(n+l>4)return i;r=2*o*r+t,o=n-l+e}return n}function ht(e,t,n){if(e===t)return[0,0,0];const o=e/t;if("fire"===n)return[Math.floor(255*Math.min(1,3*o)),Math.floor(255*Math.max(0,3*o-1)),Math.floor(255*Math.max(0,3*o-2))];if("ocean"===n)return[Math.floor(255*o*.3),Math.floor(255*o*.6),Math.floor(255*(.4+.6*o))];const r=360*o%360,i=1*(1-Math.abs(0)),l=i*(1-Math.abs(r/60%2-1)),a=.5-i/2;let s=0,d=0,c=0;return r<60?(s=i,d=l):r<120?(s=l,d=i):r<180?(d=i,c=l):r<240?(d=l,c=i):r<300?(s=l,c=i):(s=i,c=l),[Math.floor(255*(s+a)),Math.floor(255*(d+a)),Math.floor(255*(c+a))]}function gt(e,t,n){if(e===t)return[e];const o=(t-e)/(n-1),r=[];for(let t=0;t<n;t++){const n=e+o*t;r.push(Math.round(1e10*n)/1e10)}return r}function xt(e,t,n,o){return d(()=>function(e,t,n,o){if(0===e.length)return{xScale:()=>o,yScale:()=>n-o,xTicks:[],yTicks:[],xMin:0,xMax:0,yMin:0,yMax:0};let r=1/0,i=-1/0,l=1/0,a=-1/0;for(const t of e)t.x<r&&(r=t.x),t.x>i&&(i=t.x),t.y<l&&(l=t.y),t.y>a&&(a=t.y);r===i&&(r-=1,i+=1),l===a&&(l-=1,a+=1);const s=t-2*o,d=n-2*o;return{xScale:e=>o+(e-r)/(i-r)*s,yScale:e=>n-o-(e-l)/(a-l)*d,xTicks:gt(r,i,6),yTicks:gt(l,a,6),xMin:r,xMax:i,yMin:l,yMax:a}}(e,t,n,o),[e,t,n,o])}function yt(e){return Number.isInteger(e)?String(e):e.toFixed(1)}function mt(e,t,n,r,i,l,a){const s={fill:i,key:l,...a};switch(e){case"square":return o("rect",{...s,x:t-r,y:n-r,width:2*r,height:2*r});case"diamond":{const e=`${t},${n-r} ${t+r},${n} ${t},${n+r} ${t-r},${n}`;return o("polygon",{...s,points:e})}case"triangle":{const e=`${t},${n-1.15*r} ${t+r},${n+.6*r} ${t-r},${n+.6*r}`;return o("polygon",{...s,points:e})}case"triangle-down":{const e=`${t-r},${n-.6*r} ${t+r},${n-.6*r} ${t},${n+1.15*r}`;return o("polygon",{...s,points:e})}case"cross":{const e=.35*r;return o("path",{...s,fill:"none",stroke:i,"stroke-width":String(2*e),"stroke-linecap":"round",d:`M${t-r},${n-r}L${t+r},${n+r}M${t+r},${n-r}L${t-r},${n+r}`})}case"plus":{const e=.35*r;return o("path",{...s,fill:"none",stroke:i,"stroke-width":String(2*e),"stroke-linecap":"round",d:`M${t},${n-r}L${t},${n+r}M${t-r},${n}L${t+r},${n}`})}default:return o("circle",{...s,cx:t,cy:n,r:r})}}function bt(e,t,n,o){return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function vt(e,t,n,o,r,i){const l=r-Math.PI/2,a=i-Math.PI/2,s=bt(e,t,o,l),d=bt(e,t,o,a),c=i-r>Math.PI?1:0;if(n<=0)return[`M ${e} ${t}`,`L ${s.x} ${s.y}`,`A ${o} ${o} 0 ${c} 1 ${d.x} ${d.y}`,"Z"].join(" ");const f=bt(e,t,n,a),p=bt(e,t,n,l);return[`M ${s.x} ${s.y}`,`A ${o} ${o} 0 ${c} 1 ${d.x} ${d.y}`,`L ${f.x} ${f.y}`,`A ${n} ${n} 0 ${c} 0 ${p.x} ${p.y}`,"Z"].join(" ")}function St(e,t){const n=t?.padAngle??0,o=function(e,t){const n=t??function(e){const t=[];for(let n=0;n<e;n++){const o=Math.round(360*n/e);t.push(`hsl(${o}, 70%, 55%)`)}return t}(e.length);return e.map((e,t)=>e.color??n[t%n.length])}(e,t?.colors),r=e.reduce((e,t)=>e+t.value,0);if(r<=0)return[];const i=n*e.length,l=2*Math.PI-i,a=[];let s=0;for(let t=0;t<e.length;t++){const i=e[t],d=s+n/2,c=d+i.value/r*l;a.push({label:i.label,value:i.value,startAngle:d,endAngle:c,percentage:i.value/r*100,color:o[t]}),s=c+n/2}return a}function kt(e,t,n,o,r){return{x:n+e*Math.cos(t)*r,y:o-e*Math.sin(t)*r}}function wt(e){const t=1<<e,n=[];for(let o=0;o<t;o++){const t=[];for(let n=0;n<e;n++)t.push(2*(o>>n&1)-1);n.push({coords:t})}return n}function $t(e){const t=1<<e,n=[];for(let o=0;o<t;o++)for(let t=0;t<e;t++){const e=o^1<<t;e>o&&n.push({source:o,target:e})}return n}function Mt(e,t){let n=Ct(e),o=0;for(let r=0;r<e;r++)for(let i=r+1;i<e;i++)o<t.length&&(n=It(n,zt(e,r,i,t[o]))),o++;return n}function Ct(e){const t=[];for(let n=0;n<e;n++){const o=new Array(e).fill(0);o[n]=1,t.push(o)}return t}function zt(e,t,n,o){const r=Ct(e),i=Math.cos(o),l=Math.sin(o);return r[t][t]=i,r[t][n]=-l,r[n][t]=l,r[n][n]=i,r}function It(e,t){const n=e.length,o=[];for(let r=0;r<n;r++){const i=new Array(n).fill(0);for(let o=0;o<n;o++)for(let l=0;l<n;l++)i[o]+=e[r][l]*t[l][o];o.push(i)}return o}function At(e,t){const n=e.length,o=new Array(n).fill(0);for(let r=0;r<n;r++)for(let i=0;i<n;i++)o[r]+=e[r][i]*t.coords[i];return o}function Ft(e,t=0){const n=e[0]??0,o=e[1]??0;let r=0;for(let t=2;t<e.length;t++)r+=e[t]??0;if(e.length>2&&(r/=e.length-2),t>0){const e=1/(1+t*(r+2));return{x:n*e,y:o*e,depth:r}}return{x:n,y:o,depth:r}}function Rt(e,t=[],n=.3,o=1){const r=wt(e),i=$t(e),l=Mt(e,t);return{vertices:r.map((e,t)=>{const r=Ft(At(l,e),n);return{id:t,position:e,x:r.x*o,y:r.y*o,depth:r.depth}}),edges:i,dimension:e}}function Dt(e){return e*(e-1)/2}function Lt(e,t=70,n=55){const o=[];for(let r=0;r<e;r++){const i=Math.round(360*r/e);o.push(`hsl(${i}, ${t}%, ${n}%)`)}return o}const Nt=[{letter:"F",color:"#3465a4",label:"Files"},{letter:"W",color:"#e67e22",label:"Browser"},{letter:"T",color:"#2ecc71",label:"Terminal"},{letter:"M",color:"#3498db",label:"Mail"},{letter:"N",color:"#e74c3c",label:"Music"},{letter:"P",color:"#9b59b6",label:"Photos"},{letter:"S",color:"#f39c12",label:"Software"},{letter:"G",color:"#7f8c8d",label:"Settings"}],Tt=["🔊","📶","🔋"];let Wt=1;const Bt=["File","Edit","View","Insert","Format","Tools","Help"],Et={File:[{label:"New",action:"new"},{label:"Open",action:"open"},{label:"Save",action:"save"},{label:"Print",action:"print"}],Edit:[{label:"Undo",action:"undo"},{label:"Redo",action:"redo"},{label:"Cut",action:"cut"},{label:"Copy",action:"copy"},{label:"Paste",action:"paste"}],View:[{label:"Zoom In",action:"zoomIn"},{label:"Zoom Out",action:"zoomOut"},{label:"Full Screen",action:"fullScreen"}],Insert:[{label:"Image",action:"insertImage"},{label:"Table",action:"insertTable"},{label:"Link",action:"insertLink"}],Format:[{label:"Bold",action:"bold"},{label:"Italic",action:"italic"},{label:"Underline",action:"underline"}],Tools:[{label:"Word Count",action:"wordCount"},{label:"Spell Check",action:"spellCheck"}],Help:[{label:"About",action:"about"},{label:"Keyboard Shortcuts",action:"shortcuts"}]},Pt=[{id:"bold",label:"Bold",text:"B",shortcut:"Ctrl+B",style:{fontWeight:"700"}},{id:"italic",label:"Italic",text:"I",shortcut:"Ctrl+I",style:{fontStyle:"italic"}},{id:"underline",label:"Underline",text:"U",shortcut:"Ctrl+U",style:{textDecoration:"underline"}}],Ht=[{label:"Align left",text:"≡",command:"justifyLeft"},{label:"Align center",text:"≣",command:"justifyCenter"},{label:"Align right",text:"≢",command:"justifyRight"}],jt=["1","2","3","4","5","6","7"],_t={1:"8",2:"10",3:"12",4:"14",5:"18",6:"24",7:"36"};function Yt(e){return e.trim().split(/\s+/).filter(e=>e.length>0).length}const qt=["File","Edit","Selection","View","Go","Run","Terminal","Help"],Ot={File:[{label:"New File",action:"newFile"},{label:"Open",action:"open"},{label:"Save",action:"save"},{label:"Save As",action:"saveAs"}],Edit:[{label:"Undo",action:"undo"},{label:"Redo",action:"redo"},{label:"Cut",action:"cut"},{label:"Copy",action:"copy"},{label:"Paste",action:"paste"}],View:[{label:"Command Palette",action:"commandPalette"},{label:"Explorer",action:"explorer"},{label:"Search",action:"search"}]},Ut=[{name:"src",indent:0,isFolder:!0},{name:"components",indent:1,isFolder:!0,parent:"src"},{name:"App.ts",indent:2,isFolder:!1,parent:"components"},{name:"Header.ts",indent:2,isFolder:!1,parent:"components"},{name:"hooks",indent:1,isFolder:!0,parent:"src"},{name:"useAuth.ts",indent:2,isFolder:!1,parent:"hooks"},{name:"index.ts",indent:1,isFolder:!1,parent:"src"},{name:"main.ts",indent:1,isFolder:!1,parent:"src"},{name:"types.ts",indent:1,isFolder:!1,parent:"src"},{name:"package.json",indent:0,isFolder:!1},{name:"tsconfig.json",indent:0,isFolder:!1}],Gt={"App.ts":['import { createElement, useState } from "specifyjs";',"","interface AppProps {"," title: string;"," version?: number;","}","","export function App(props: AppProps) {"," const [count, setCount] = useState(0);",""," const increment = () => {"," setCount((prev: number) => prev + 1);"," };",""," return createElement(",' "div",',' { className: "app" },',' createElement("h1", null, props.title),',' createElement("p", null, `Count: ${count}`),'," createElement(",' "button",'," { onClick: increment },",' "Increment",'," ),"," );","}"],"Header.ts":['import { createElement } from "specifyjs";',"","interface HeaderProps {"," title: string;"," subtitle?: string;","}","","export function Header(props: HeaderProps) {"," return createElement(",' "header",',' { className: "header" },',' createElement("h1", null, props.title),'," props.subtitle",' ? createElement("p", null, props.subtitle)'," : null,"," );","}"],"useAuth.ts":['import { useState, useCallback } from "specifyjs";',"","interface AuthState {"," user: string | null;"," isLoggedIn: boolean;","}","","export function useAuth() {"," const [auth, setAuth] = useState<AuthState>({"," user: null,"," isLoggedIn: false,"," });",""," const login = useCallback((username: string) => {"," setAuth({ user: username, isLoggedIn: true });"," }, []);",""," const logout = useCallback(() => {"," setAuth({ user: null, isLoggedIn: false });"," }, []);",""," return { ...auth, login, logout };","}"],"index.ts":['export { App } from "./components/App";','export { Header } from "./components/Header";','export { useAuth } from "./hooks/useAuth";'],"main.ts":['import { createElement, createRoot } from "specifyjs";','import { App } from "./components/App";',"","const root = createRoot(",' document.getElementById("root")!',");","","root.render("," createElement(App, {",' title: "My SpecifyJS App",'," version: 1,"," }),",");"],"types.ts":["export interface User {"," id: string;"," name: string;"," email: string;",' role: "admin" | "user" | "guest";',"}","","export interface Config {"," apiUrl: string;"," debug: boolean;"," maxRetries: number;","}","","export type EventHandler<T = void> = (event: T) => void;"],"package.json":["{",' "name": "specifyjs-app",',' "version": "1.0.0",',' "scripts": {',' "dev": "vite",',' "build": "tsc && vite build",',' "preview": "vite preview"'," }","}"],"tsconfig.json":["{",' "compilerOptions": {',' "target": "ES2020",',' "module": "ESNext",',' "strict": true,',' "jsx": "preserve"'," },",' "include": ["src"]',"}"]},Vt=Gt["App.ts"],Xt=new Set(["import","export","from","const","let","var","function","return","if","else","for","while","class","new","throw","try","catch","finally","typeof","instanceof","in","of","default","switch","case","break","continue","do","void","delete","yield","async","await"]),Kt=new Set(["string","number","boolean","void","null","undefined","any","never","unknown","object","interface","type","enum"]),Zt="#569cd6",Jt="#d4d4d4",Qt=[{symbol:"AAPL",price:189.42,change:1.23,volume:523e5,spark:[186,187,188,187,189]},{symbol:"GOOGL",price:141.8,change:-.87,volume:231e5,spark:[143,142,141,142,141]},{symbol:"MSFT",price:378.91,change:2.45,volume:187e5,spark:[375,376,378,377,379]},{symbol:"AMZN",price:185.63,change:-1.12,volume:314e5,spark:[187,186,186,185,185]},{symbol:"TSLA",price:248.5,change:3.78,volume:672e5,spark:[244,245,247,246,249]},{symbol:"NVDA",price:875.3,change:12.5,volume:418e5,spark:[860,865,870,868,876]}],en=[{price:189.4,qty:1200},{price:189.38,qty:3400},{price:189.35,qty:800},{price:189.32,qty:5600},{price:189.3,qty:2100},{price:189.28,qty:4300}],tn=[{price:189.44,qty:900},{price:189.47,qty:2200},{price:189.5,qty:1500},{price:189.53,qty:3800},{price:189.55,qty:1100},{price:189.58,qty:2700}],nn=[{symbol:"AAPL",qty:100,avgPrice:185.2,currentPrice:189.42,pnl:422},{symbol:"MSFT",qty:50,avgPrice:382.1,currentPrice:378.91,pnl:-159.5},{symbol:"NVDA",qty:25,avgPrice:850,currentPrice:875.3,pnl:632.5}],on=[{time:"14:32:01",symbol:"AAPL",side:"BUY",qty:50,price:189.42},{time:"14:31:45",symbol:"MSFT",side:"SELL",qty:25,price:378.95},{time:"14:30:22",symbol:"TSLA",side:"BUY",qty:100,price:247.8},{time:"14:29:58",symbol:"NVDA",side:"BUY",qty:10,price:874.5},{time:"14:28:33",symbol:"GOOGL",side:"SELL",qty:75,price:142.1}],rn=[185.2,186.1,185.8,187.5,188.2,187.9,186.5,187.8,188.4,189.1,188.6,187.2,188.5,189.8,189.2,188.9,189.5,190.1,189.4,188.8,189.6,190.3,189.9,189.42],ln=[{price:189.4,volume:1200},{price:189.35,volume:3400},{price:189.3,volume:2800},{price:189.25,volume:5100},{price:189.2,volume:4200}],an=[{price:189.45,volume:900},{price:189.5,volume:2600},{price:189.55,volume:1800},{price:189.6,volume:4400},{price:189.65,volume:3100}],sn=["09:30","10:00","10:30","11:00","11:30","12:00"];function dn(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function cn(e){return e.toFixed(2)}const fn={backgroundColor:"#1a1a2e",borderRadius:"4px",padding:"12px",border:"1px solid #2a2a4a",overflow:"auto",display:"flex",flexDirection:"column"},pn={fontSize:"12px",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.5px",color:"#8888aa",marginBottom:"8px",flexShrink:"0"},un={width:"100%",borderCollapse:"collapse",fontSize:"12px"},hn={textAlign:"left",padding:"4px 6px",borderBottom:"1px solid #2a2a4a",color:"#8888aa",fontWeight:"600",fontSize:"11px"},gn={padding:"3px 6px",borderBottom:"1px solid #16162a",color:"#ccccdd",fontSize:"12px"},xn={cursor:"default",transition:"background-color 0.1s"};const yn={sm:{padding:"3px 10px",fontSize:"12px",borderRadius:"4px"},md:{padding:"6px 14px",fontSize:"13px",borderRadius:"6px"},lg:{padding:"8px 20px",fontSize:"15px",borderRadius:"6px"}},mn={primary:{bg:"#3b82f6",color:"white",border:"#3b82f6"},secondary:{bg:"#f8fafc",color:"#0f172a",border:"#d1d5db"},outline:{bg:"transparent",color:"#0f172a",border:"#d1d5db"},ghost:{bg:"transparent",color:"#0f172a",border:"transparent"},danger:{bg:"#ef4444",color:"white",border:"#ef4444"}},bn=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],vn=Math.PI/180;function Sn(e,t){const n=e.replace("#","");let o,r,i;return 3===n.length?(o=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),i=parseInt(n[2]+n[2],16)):(o=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)),o=isNaN(o)?0:o,r=isNaN(r)?0:r,i=isNaN(i)?0:i,`rgba(${o},${r},${i},${t})`}function kn(e,t){const n=e.replace("#","");let o,r,i;3===n.length?(o=parseInt(n[0]+n[0],16),r=parseInt(n[1]+n[1],16),i=parseInt(n[2]+n[2],16)):(o=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16)),o=isNaN(o)?0:o,r=isNaN(r)?0:r,i=isNaN(i)?0:i;const l=e=>(e=>Math.max(0,Math.min(255,Math.round(e*t))))(e).toString(16).padStart(2,"0");return"#"+l(o)+l(r)+l(i)}const wn=Math.PI/180;function $n(e){return{x:Math.sin(e.theta)*Math.cos(e.phi),y:Math.sin(e.theta)*Math.sin(e.phi),z:Math.cos(e.theta)}}function Mn(e,t,n){const o=Math.sqrt(e*e+t*t+n*n);if(o<1e-10)return{theta:0,phi:0};const r=e/o,i=t/o,l=n/o,a=Math.acos(Math.max(-1,Math.min(1,l))),s=Math.atan2(i,r);return{theta:a,phi:s<0?s+2*Math.PI:s}}function Cn(e,t,n){const{x:o,y:r,z:i}=$n(e),l=Math.cos(n),a=Math.sin(n);let s,d,c;return"x"===t?(s=o,d=r*l-i*a,c=r*a+i*l):"y"===t?(s=o*l+i*a,d=r,c=-o*a+i*l):(s=o*l-r*a,d=o*a+r*l,c=i),Mn(s,d,c)}function zn(e,t){const n=t.angle??Math.PI;switch(t.gate){case"X":return Cn(e,"x",Math.PI);case"Y":return Cn(e,"y",Math.PI);case"Z":return Cn(e,"z",Math.PI);case"H":{const{x:t,y:n,z:o}=$n(e);return Mn(o,-n,t)}case"S":return Cn(e,"z",Math.PI/2);case"T":return Cn(e,"z",Math.PI/4);case"Rx":return Cn(e,"x",n);case"Ry":return Cn(e,"y",n);case"Rz":return Cn(e,"z",n)}}function In(e,t){if(0===e.length)return 0;if(1===e.length)return e[0];const n=t/100*(e.length-1),o=Math.floor(n),r=Math.ceil(n);if(o===r)return e[o];const i=n-o;return e[o]+i*(e[r]-e[o])}function An(e){const t=function(e){const t=[];for(let n=0;n<e.length;n++){const o=e[n];"number"==typeof o&&isFinite(o)&&!isNaN(o)&&t.push(o)}return t.sort((e,t)=>e-t),t}(e);if(0===t.length)return null;const n=In(t,25),o=In(t,50),r=In(t,75),i=r-n,l=n-1.5*i,a=r+1.5*i;let s=t[0];for(const e of t)if(e>=l){s=e;break}let d=t[t.length-1];for(let e=t.length-1;e>=0;e--)if(t[e]<=a){d=t[e];break}let c=0;for(const e of t)c+=e;const f=c/t.length,p=[];for(const e of t)(e<l||e>a)&&p.push(e);return{q1:n,median:o,q3:r,iqr:i,whiskerLow:s,whiskerHigh:d,mean:f,outliers:p,min:t[0],max:t[t.length-1]}}function Fn(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}function Rn(e,t,n){return e<t?t:e>n?n:e}function Dn(e){return"number"==typeof e&&isFinite(e)&&!isNaN(e)}const Ln=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Nn=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function Tn(e){const t=e.split("-");return 3!==t.length?new Date(NaN):new Date(parseInt(t[0],10),parseInt(t[1],10)-1,parseInt(t[2],10))}function Wn(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Bn(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function En(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=Bn(t[r]),a=Bn(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}const Pn=["#9be9a8","#40c463","#30a14e","#216e39"],Hn=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function jn(e,t,n,o){const r=o-Math.PI/2;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function _n(e,t,n,o,r,i){const l=jn(e,t,n,r),a=jn(e,t,n,i),s=jn(e,t,o,r),d=jn(e,t,o,i),c=i-r>Math.PI?1:0;return[`M ${l.x} ${l.y}`,`A ${n} ${n} 0 ${c} 1 ${a.x} ${a.y}`,`L ${d.x} ${d.y}`,`A ${o} ${o} 0 ${c} 0 ${s.x} ${s.y}`,"Z"].join(" ")}function Yn(e,t,n,o,r,i,l){const a=jn(e,t,n,o),s=jn(e,t,n,r),d=jn(e,t,n,i),c=jn(e,t,n,l),f=l-i,p=r-o>Math.PI?1:0,u=f>Math.PI?1:0;return[`M ${a.x} ${a.y}`,`A ${n} ${n} 0 ${p} 1 ${s.x} ${s.y}`,`Q ${e} ${t} ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 1 ${c.x} ${c.y}`,`Q ${e} ${t} ${a.x} ${a.y}`,"Z"].join(" ")}const qn=["#3b82f6","#22c55e","#f59e0b","#8b5cf6","#ef4444","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];const On=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Un(e){return On[e%On.length]}function Gn(e,t,n){const o=t/2,r=n/2,i=.3*Math.min(t,n),l=e.length,a=[];for(let t=0;t<l;t++){const n=e[t],s=2*Math.PI*t/Math.max(l,1);a.push({id:n.id,label:n.label??n.id,color:n.color??Un(t),x:n.x??o+i*Math.cos(s),y:n.y??r+i*Math.sin(s),vx:0,vy:0,fixed:n.fixed??!1,solid:n.solid??!0})}return a}function Vn(e,t){const n=2*t;for(let t=0;t<e.length;t++){const o=e[t];if(o.solid)for(let r=t+1;r<e.length;r++){const t=e[r];if(!t.solid)continue;const i=t.x-o.x,l=t.y-o.y,a=i*i+l*l;if(a>=n*n||a<1e-4)continue;const s=Math.sqrt(a),d=i/s,c=l/s,f=n-s;if(o.fixed&&t.fixed)continue;o.fixed?(t.x+=d*f,t.y+=c*f):t.fixed?(o.x-=d*f,o.y-=c*f):(o.x-=d*f*.5,o.y-=c*f*.5,t.x+=d*f*.5,t.y+=c*f*.5);const p=(o.vx-t.vx)*d+(o.vy-t.vy)*c;p<=0||(o.fixed?(t.vx+=p*d,t.vy+=p*c):t.fixed?(o.vx-=p*d,o.vy-=p*c):(o.vx-=p*d,o.vy-=p*c,t.vx+=p*d,t.vy+=p*c))}}}const Xn=["#3b82f6","#6366f1","#8b5cf6","#a855f7","#c084fc","#d8b4fe","#e9d5ff","#f3e8ff"],Kn=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Zn(e){if(e<=0)return 1;const t=e/6,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}function Jn(e,t){return t||Kn[e%Kn.length]}const Qn=Math.PI/180;function eo(e,t,n,o){const r=o*Qn;return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function to(e,t,n,o,r){const i=eo(e,t,n,r),l=eo(e,t,n,o),a=r-o,s=Math.abs(a)>180?1:0,d=a>0?1:0;return`M ${i.x} ${i.y} A ${n} ${n} 0 ${s} ${1===d?0:1} ${l.x} ${l.y}`}function no(e){return!isFinite(e)||isNaN(e)?"--":Math.abs(e)>=1e3?Math.round(e).toString():e===Math.floor(e)?e.toString():e.toFixed(1)}const oo={AL:{name:"Alabama",path:"m 643,467.4 .4,-7.3 -.9,-1.2 -1.7,-.7 -2.5,-2.8 .5,-2.9 48.8,-5.1 -.7,-2.2 -1.5,-1.5 -.5,-1.4 .6,-6.3 -2.4,-5.7 .5,-2.6 .3,-3.7 2.2,-3.8 -.2,-1.1 -1.7,-1 v -3.2 l -1.8,-1.9 -2.9,-6.1 -12.9,-45.8 -45.7,4 1.3,2 -1.3,67 4.4,33.2 .9,-.5 1.3,.1 .6,.4 .8,-.1 2,-3.8 v -2.3 l 1.1,-1.1 1.4,.5 3.4,6.4 v .9 l -3.3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2,-1.3 h -3.3 l -2.2,-2.6 -2,-1.3 .7,-5.1 -.9,-1.6 .5,-5.4 1,-1.8 -.3,-2.7 -1.2,-1.3 -1.8,-.3 v -1.7 l 2.8,-5.8 5.9,-3.9 -.4,-13 .9,.4 .6,-.5 .1,-1.1 .9,-.6 1.4,1.2 .7,-.1 h 2.6 l 6.8,-2.6 .3,-1 h 1.2 l .7,-1.2 .4,.8 1.8,-.9 1.8,-1.7 .3,.5 1,-1 2.2,1.6 -.8,1.6 -1.2,1.4 .5,1.5 -1.4,1.6 .4,.9 2.3,-1.1 v -1.4 l 3.3,1.9 1.9,.7 1.9,.7 3,3.8 17,3.8 1.4,1 4,.8 .7,.5 2.8,-.2 4.9,.8 1.4,1.5 -1,1 .8,.8 3.8,.7 1.2,1.2 .1,4.4 -1.3,2.8 2,.1 1,-.8 .9,.8 -1.1,3.1 1,1.6 1.2,.3 z m -49.5,-37.3 -.5,.1 -1.5,1.6 .2,.5 1.5,-.6 v -.6 l .9,-.3 z m 1.6,-1.1 -1,.3 -.2,.7 .9,-.1 z m -1.3,-1.6 -.2,.9 h 1.7 l .6,-.4 .1,-1 z m 2.8,-3 -.3,1.9 1.2,-.5 .1,-1.4 z m 58.3,31.9 -2,.3 -.4,1.3 1.3,1.7 z"},WY:{name:"Wyoming",path:"m 355.3,143.7 -51,-5.3 -57.3,-7.9 -2,10.7 -8.5,54.8 -3.3,21.9 32.1,4.8 44.9,5.7 37.5,3.4 3.7,-44.2 z"},DC:{name:"District of Columbia",path:"m 803.5,252 -2.6,-1.8 -1,1.7 .5,.4 .4,.1 .6,.5 .3,.7 -.1,.5 .2,.5 z"}};function ro(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function io(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=ro(t[r]),a=ro(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}function lo(e){const{r:t,g:n,b:o}=ro(e);return(.299*t+.587*n+.114*o)/255}const ao=["#3b82f6","#fbbf24","#ef4444"];function so(e){return Number.isInteger(e)?String(e):e.toFixed(1)}function co(e){const t=e.replace("#",""),n=3===t.length?t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,o=parseInt(n,16);return{r:o>>16&255,g:o>>8&255,b:255&o}}function fo(e,t){if(0===t.length)return"#000000";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=Math.min(Math.floor(n*o),o-1),i=n*o-r,l=co(t[r]),a=co(t[r+1]);return function(e,t,n){const o=e=>{const t=Math.max(0,Math.min(255,Math.round(e))).toString(16);return 1===t.length?"0"+t:t};return`#${o(e)}${o(t)}${o(n)}`}(l.r+(a.r-l.r)*i,l.g+(a.g-l.g)*i,l.b+(a.b-l.b)*i)}function po(e){const{r:t,g:n,b:o}=co(e);return(.299*t+.587*n+.114*o)/255}const uo=["#f0f9ff","#3b82f6","#1e3a8a"],ho=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function go(e){if(!e.children||0===e.children.length)return Math.max(0,e.value??0);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value??0)}return t}function xo(e,t){const n=[];for(const o of t)n.push(String(e[o]??""));return n.join(" | ")}function yo(e,t){const n=new Set;for(const o of e)n.add(xo(o,t));const o=Array.from(n);return o.sort(),o}function mo(e,t){if(0===e.length)return 0;switch(t){case"count":return e.length;case"sum":{let t=0;for(const n of e)t+=n;return t}case"avg":{let t=0;for(const n of e)t+=n;return t/e.length}case"min":{let t=e[0];for(let n=1;n<e.length;n++)e[n]<t&&(t=e[n]);return t}case"max":{let t=e[0];for(let n=1;n<e.length;n++)e[n]>t&&(t=e[n]);return t}}}function bo(e){return Number.isInteger(e)?String(e):e.toFixed(2)}function vo(e,t){return 2*Math.PI*e/t-Math.PI/2}function So(e,t,n,o){return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}const ko=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];const wo=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],$o=2*Math.PI;function Mo(e){if(!e.children||0===e.children.length)return Math.max(0,e.value??0);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value??0)}return t}function Co(e,t,n,o,r,i){const l=i-r,a=l>Math.PI?1:0,s=r-Math.PI/2,d=i-Math.PI/2,c=e+o*Math.cos(s),f=t+o*Math.sin(s),p=e+o*Math.cos(d),u=t+o*Math.sin(d),h=e+n*Math.cos(d),g=t+n*Math.sin(d),x=e+n*Math.cos(s),y=t+n*Math.sin(s);if(l>=$o-.001){const r=s+Math.PI;return[`M ${c} ${f}`,`A ${o} ${o} 0 1 1 ${e+o*Math.cos(r)} ${t+o*Math.sin(r)}`,`A ${o} ${o} 0 1 1 ${c} ${f}`,`L ${x} ${y}`,`A ${n} ${n} 0 1 0 ${e+n*Math.cos(r)} ${t+n*Math.sin(r)}`,`A ${n} ${n} 0 1 0 ${x} ${y}`,"Z"].join(" ")}return[`M ${c} ${f}`,`A ${o} ${o} 0 ${a} 1 ${p} ${u}`,`L ${h} ${g}`,`A ${n} ${n} 0 ${a} 0 ${x} ${y}`,"Z"].join(" ")}const zo=["#3b82f6","#22c55e","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"];function Io(e){if(!e.children||0===e.children.length)return Math.max(0,e.value);let t=0;const n=[e];for(;n.length>0;){const e=n.pop();if(e.children&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)n.push(e.children[t]);else t+=Math.max(0,e.value)}return t}function Ao(e,t){if(0===e.length||t<=0)return 1/0;let n=0;for(const t of e)n+=t;if(n<=0)return 1/0;const o=n/t;let r=0;for(const t of e){if(t<=0)continue;const e=t/o,n=Math.max(e/o,o/e);n>r&&(r=n)}return r}function Fo(e){const t=e.replace("#","");let n,o,r;return 3===t.length?(n=parseInt(t[0]+t[0],16),o=parseInt(t[1]+t[1],16),r=parseInt(t[2]+t[2],16)):(n=parseInt(t.substring(0,2),16),o=parseInt(t.substring(2,4),16),r=parseInt(t.substring(4,6),16)),{r:isNaN(n)?0:n,g:isNaN(o)?0:o,b:isNaN(r)?0:r}}function Ro(e,t){if(0===t.length)return"#3b82f6";if(1===t.length)return t[0];const n=Math.max(0,Math.min(1,e)),o=t.length-1,r=n*o,i=Math.floor(r),l=Math.min(i+1,o),a=r-i,s=Fo(t[i]),d=Fo(t[l]);return function(e,t,n){const o=e=>(e=>Math.max(0,Math.min(255,Math.round(e))))(e).toString(16).padStart(2,"0");return"#"+o(e)+o(t)+o(n)}(s.r+(d.r-s.r)*a,s.g+(d.g-s.g)*a,s.b+(d.b-s.b)*a)}function Do(e,t){if(e<=0)return 1;const n=e/t,o=Math.pow(10,Math.floor(Math.log10(n))),r=n/o;return r<=1.5?o:r<=3.5?2*o:r<=7.5?5*o:10*o}const Lo=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],No=[0,-45,45,90];function To(e,t,n,o,r){const i=.6*t,l=e.length*i,a=t,s=n*Math.PI/180,d=Math.abs(Math.cos(s)),c=Math.abs(Math.sin(s)),f=l*d+a*c,p=l*c+a*d;return{x:o-f/2,y:r-p/2,w:f,h:p}}function Wo(e,t){return!(e.x+e.w<t.x||t.x+t.w<e.x||e.y+e.h<t.y||t.y+t.h<e.y)}function Bo(e,t,n){return e.x>=0&&e.y>=0&&e.x+e.w<=t&&e.y+e.h<=n}function Eo(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}const Po={0:"#1e293b",1:"#3b82f6"};exports.Accordion=function(e){const{sections:t,defaultExpanded:n,allowMultiple:r=!1,headerStyle:i={},contentStyle:a={},wrapperStyle:c,expandIcon:f="+",collapseIcon:p="−",iconPosition:u="right",animated:h=!0,onChange:g}=e,[x,y]=l(()=>n??[]),m=s(e=>{y(t=>{let n;return n=t.includes(e)?t.filter(t=>t!==e):r?[...t,e]:[e],g&&g(n),n})},[r,g]),b=d(()=>t.map(e=>{const t=x.includes(e.id),n=o(Me,{key:`header-${e.id}`,section:e,expanded:t,onToggle:()=>m(e.id),headerStyle:i,expandIcon:f,collapseIcon:p,iconPosition:u}),r=o(Ce,{key:`content-${e.id}`,section:e,expanded:t,contentStyle:a,animated:h});return o("div",{key:e.id,"data-accordion-section":e.id,style:{width:"100%"}},n,r)}),[t,x,i,a,f,p,u,h,m]);return o(ke,{role:"region",ariaLabel:"Accordion",styling:c,keyboardNav:!0},...b)},exports.Alert=function(e){const[t,n]=l(!0),r=e.type??"info",i=e.variant??"subtle",a=Z[r]??Z.info,s=e.icon??a.icon,c=e.message??e.children,f=d(()=>{const e={display:"flex",alignItems:"flex-start",gap:"12px",padding:"12px 16px",borderRadius:"8px",fontSize:"14px",lineHeight:"1.5"};return"filled"===i?(e.backgroundColor=a.filledBg,e.color=a.filledText):"outline"===i?(e.backgroundColor="transparent",e.border=`1px solid ${a.border}`,e.color=a.text):(e.backgroundColor=a.bg,e.color=a.text),e},[i,a]);return t?o("div",{role:"alert",style:f},o("span",{style:{flexShrink:"0",fontSize:"16px",lineHeight:"1.5"}},s),o("div",{style:{flex:"1",minWidth:"0"}},e.title?o("div",{style:{fontWeight:"600",marginBottom:c?"4px":"0"}},e.title):null,c?o("div",null,c):null,e.action?o("button",{onclick:e.action.onClick,style:{marginTop:"8px",padding:"4px 12px",fontSize:"13px",fontWeight:"500",border:"filled"===i?"1px solid currentColor":`1px solid ${a.border}`,borderRadius:"4px",backgroundColor:"transparent",color:"inherit",cursor:"pointer"}},e.action.label):null),e.closable?o("button",{"aria-label":"Close",onclick:()=>{n(!1),e.onClose&&e.onClose()},style:{flexShrink:"0",background:"none",border:"none",cursor:"pointer",fontSize:"18px",lineHeight:"1",color:"inherit",opacity:"0.7",padding:"0"}},"×"):null):null},exports.AnalogClock=function(e){const{format:t="12h",size:n=200,showDate:r=!1,dateFormat:i="short",showSeconds:s=!0,timezone:d,className:c}=e,[f,p]=l(h(d));a(()=>{const e=setInterval(()=>{p(h(d))},1e3);return()=>clearInterval(e)},[d]);const u=f.getHours(),m=f.getMinutes(),b=f.getSeconds(),v=u%12*30+.5*m,S=6*m+.1*b,k=6*b,w=n/2,$=n/2,M=n/2-10,C=M-4,z=M-22,I=[];I.push(o("circle",{cx:String(w),cy:String($),r:String(M),fill:"#f8fafc",stroke:g,"stroke-width":"3"}));for(let e=0;e<12;e++){const r=(30*e-90)*Math.PI/180,i=C-6;I.push(o("line",{x1:String(w+i*Math.cos(r)),y1:String($+i*Math.sin(r)),x2:String(w+C*Math.cos(r)),y2:String($+C*Math.sin(r)),stroke:g,"stroke-width":"2"}));const l=String(0===e?12:e);if(I.push(o("text",{x:String(w+z*Math.cos(r)),y:String($+z*Math.sin(r)),"text-anchor":"middle","dominant-baseline":"central",fill:y,"font-size":String(.08*n),"font-family":"sans-serif","font-weight":"600"},l)),"24h"===t){const t=M-38,i=String(0===e?0:e+12);I.push(o("text",{x:String(w+t*Math.cos(r)),y:String($+t*Math.sin(r)),"text-anchor":"middle","dominant-baseline":"central",fill:y,"font-size":String(.055*n),"font-family":"sans-serif",opacity:"0.6"},i))}}const A=(e,t,n,r)=>{const i=(e-90)*Math.PI/180;return o("line",{x1:String(w),y1:String($),x2:String(w+t*Math.cos(i)),y2:String($+t*Math.sin(i)),stroke:r,"stroke-width":n,"stroke-linecap":"round"})};I.push(A(v,.5*M,"4",x)),I.push(A(S,.75*M,"3",x)),s&&I.push(A(k,.85*M,"1.5","#ef4444")),I.push(o("circle",{cx:String(w),cy:String($),r:"4",fill:x}));const F=[o("svg",{width:String(n),height:String(n),viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg"},...I)];return r&&F.push(o("div",{style:{textAlign:"center",marginTop:"8px",fontFamily:"sans-serif",fontSize:"14px",color:y}},function(e,t){const n=e.getFullYear(),o=e.getMonth(),r=e.getDate();switch(t){case"short":return`${String(o+1).padStart(2,"0")}/${String(r).padStart(2,"0")}/${n}`;case"long":return`${["January","February","March","April","May","June","July","August","September","October","November","December"][o]} ${String(r).padStart(2,"0")}, ${n}`;case"iso":return`${n}-${String(o+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}}(f,i))),o("div",{className:c,style:{display:"inline-flex",flexDirection:"column",alignItems:"center"}},...F)},exports.Avatar=function(e){const{src:t,alt:n,name:r,size:i,shape:a="circle",fallbackColor:s,status:d,statusPosition:c="bottom-right"}=e,[f,p]=l(!1),u=function(e){return null==e?m.md:"number"==typeof e?e:m[e]??m.md}(i),h="circle"===a?"50%":`${Math.round(.15*u)}px`,g=s??function(e){if(!e)return"#9ca3af";let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return b[Math.abs(t)%b.length]}(r),x=`${Math.round(.4*u)}px`,y={position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${u}px`,height:`${u}px`,borderRadius:h,overflow:"hidden",flexShrink:"0"};let k;if(t&&!f)k=o("img",{src:t,alt:n??r??"avatar",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"},onError:()=>p(!0)});else{const e=function(e){if(!e)return"?";const t=e.trim().split(/\s+/);return 1===t.length?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}(r);k=o("span",{style:{fontSize:x,fontWeight:"600",color:"#fff",lineHeight:"1",userSelect:"none",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},"aria-hidden":"true"},e)}const w=o("div",{style:{...y,backgroundColor:t&&!f?"transparent":g},role:"img","aria-label":n??r??"avatar"},k);if(!d)return w;const $=Math.max(8,Math.round(.25*u));return o("div",{style:{position:"relative",display:"inline-flex",width:`${u}px`,height:`${u}px`,flexShrink:"0"}},w,o("span",{style:{position:"absolute",width:`${$}px`,height:`${$}px`,borderRadius:"50%",backgroundColor:v[d]??v.offline,border:"2px solid #fff",boxSizing:"border-box",...S(c,$)},"aria-label":d}))},exports.Badge=function(e){const{count:t,max:n,dot:r=!1,color:i="#ef4444",size:l="md",variant:a="solid",children:s}=e;let d=null;r||null==t||(d=null!=n&&t>n?`${n}+`:String(t));const c=r||null!=t&&t>0,f=r?{...w[l],borderRadius:"50%",..."solid"===a?{backgroundColor:i}:{backgroundColor:"transparent",border:`2px solid ${i}`}}:{...k[l],borderRadius:"9999px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontWeight:"600",lineHeight:"1",boxSizing:"border-box",..."solid"===a?{backgroundColor:i,color:"#fff"}:{backgroundColor:"transparent",color:i,border:`2px solid ${i}`}},p=c?o("span",{style:f,"aria-label":r?"notification":`count ${d}`},d):null;if(null==s)return p??o("span",null);const u={...f,position:"absolute",top:"0",right:"0",transform:"translate(50%, -50%)",zIndex:"1"};return o("span",{style:{position:"relative",display:"inline-flex"}},s,c?o("span",{style:u,"aria-label":r?"notification":`count ${d}`},d):null)},exports.BarGraph=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",barColor:l="#3b82f6",barGap:a=8,barRadius:c=4,showValues:f=!0,showGrid:p=!0,gridColor:u="#e5e7eb",title:h,padding:g=50,animate:x=!1,stacked:y,grouped:m=!1}=e,b="vertical"===i,v=n-2*g,S=r-2*g,k=b?S:v,w=b?v:S,$=void 0!==y&&y.length>0,M=d(()=>$?function(e){const t=new Set;for(const n of e)for(const e of n.values)t.add(e.category);return Array.from(t)}(y):[],[$,y]),C=$?y.length:t.length,z=d(()=>function(e,t,n){if(t&&t.length>0){if(n){let e=0;for(const n of t)for(const t of n.values)t.value>e&&(e=t.value);return e}let e=0;for(const n of t){let t=0;for(const e of n.values)t+=e.value;t>e&&(e=t)}return e}let o=0;for(const t of e)t.value>o&&(o=t.value);return o}(t,y,m),[t,y,m]),I=z>0?z:1,A=nt(C,I,k,w,a),F=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(I),t=[];for(let n=e;n<=I;n+=e){const e=A.valueScale(n);if(b){const r=g+S-e;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(r),x2:String(g+v),y2:String(r),stroke:u,"stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-6),y:String(r+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}else{const r=g+e;t.push(o("line",{key:`grid-${n}`,x1:String(r),y1:String(g),x2:String(r),y2:String(g+S),stroke:u,"stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(r),y:String(g+S+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}}return t},[p,I,A,b,g,v,S,u]),R=s(()=>{const e=[];return b?(e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+S),x2:String(g+v),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"}))):(e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+S),x2:String(g+v),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+S),stroke:"#374151","stroke-width":"1.5"}))),e},[b,g,v,S]),D=s(()=>{const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=A.valueScale(r.value),a=A.categoryScale(n),s=r.color??l;let d,p,u=String(r.value);if(b){const e=g+a,t=g+S-i;d={x:String(e),y:String(t),width:String(A.barThickness),height:String(i),rx:String(c),ry:String(c),fill:s},p={x:String(e+A.barThickness/2),y:String(t-6),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"}}else{const e=g+a,t=g;d={x:String(t),y:String(e),width:String(i),height:String(A.barThickness),rx:String(c),ry:String(c),fill:s},p={x:String(t+i+6),y:String(e+A.barThickness/2+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"}}if(x&&(d.style=`animation: barGrow 0.6s ease-out ${.05*n}s both`),e.push(o("rect",{key:`bar-${n}`,...d})),f&&e.push(o("text",{key:`val-${n}`,...p},u)),b){const t=g+a+A.barThickness/2,i=g+S+16;e.push(o("text",{key:`cat-${n}`,x:String(t),y:String(i),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${t}, ${i})`},r.label))}else e.push(o("text",{key:`cat-${n}`,x:String(g-6),y:String(g+a+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}return e},[t,A,l,c,f,x,b,g,S]),L=s(()=>{if(!y)return[];const e=[];for(let t=0;t<y.length;t++){const n=y[t],r=A.categoryScale(t);let i=0;for(let l=0;l<n.values.length;l++){const a=n.values[l],s=A.valueScale(a.value),d=A.valueScale(i),p=rt(l,a.color);if(b){const i=g+r,u=g+S-d-s;e.push(o("rect",{key:`sbar-${t}-${l}`,x:String(i),y:String(u),width:String(A.barThickness),height:String(s),rx:l===n.values.length-1?String(c):"0",ry:l===n.values.length-1?String(c):"0",fill:p,...x?{style:`animation: barGrow 0.6s ease-out ${.03*(t*n.values.length+l)}s both`}:{}})),f&&s>14&&e.push(o("text",{key:`sval-${t}-${l}`,x:String(i+A.barThickness/2),y:String(u+s/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#fff"},String(a.value)))}else{const i=g+d,u=g+r;e.push(o("rect",{key:`sbar-${t}-${l}`,x:String(i),y:String(u),width:String(s),height:String(A.barThickness),rx:l===n.values.length-1?String(c):"0",ry:l===n.values.length-1?String(c):"0",fill:p,...x?{style:`animation: barGrow 0.6s ease-out ${.03*(t*n.values.length+l)}s both`}:{}})),f&&s>20&&e.push(o("text",{key:`sval-${t}-${l}`,x:String(i+s/2),y:String(u+A.barThickness/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#fff"},String(a.value)))}i+=a.value}if(f){const n=A.valueScale(i);b?e.push(o("text",{key:`stotal-${t}`,x:String(g+r+A.barThickness/2),y:String(g+S-n-6),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(i))):e.push(o("text",{key:`stotal-${t}`,x:String(g+n+6),y:String(g+r+A.barThickness/2+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(i)))}if(b){const i=g+r+A.barThickness/2,l=g+S+16;e.push(o("text",{key:`scat-${t}`,x:String(i),y:String(l),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${i}, ${l})`},n.label))}else e.push(o("text",{key:`scat-${t}`,x:String(g-6),y:String(g+r+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},n.label))}return e},[y,A,c,f,x,b,g,S]),N=s(()=>{if(!y)return[];const e=M.length,t=[];for(let n=0;n<y.length;n++){const r=y[n],i=A.categoryScale(n),l=2,a=Math.max(1,(A.barThickness-l*(e-1))/e);for(let s=0;s<r.values.length;s++){const d=r.values[s],p=M.indexOf(d.category),u=p*(a+l),h=A.valueScale(d.value),y=rt(p>=0?p:s,d.color);if(b){const r=g+i+u,l=g+S-h;t.push(o("rect",{key:`gbar-${n}-${s}`,x:String(r),y:String(l),width:String(a),height:String(h),rx:String(c),ry:String(c),fill:y,...x?{style:`animation: barGrow 0.6s ease-out ${.04*(n*e+s)}s both`}:{}})),f&&t.push(o("text",{key:`gval-${n}-${s}`,x:String(r+a/2),y:String(l-4),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#374151"},String(d.value)))}else{const r=g,l=g+i+u;t.push(o("rect",{key:`gbar-${n}-${s}`,x:String(r),y:String(l),width:String(h),height:String(a),rx:String(c),ry:String(c),fill:y,...x?{style:`animation: barGrow 0.6s ease-out ${.04*(n*e+s)}s both`}:{}})),f&&t.push(o("text",{key:`gval-${n}-${s}`,x:String(r+h+4),y:String(l+a/2+3),"text-anchor":"start","font-size":"9","font-family":"sans-serif",fill:"#374151"},String(d.value)))}}if(b){const e=g+i+A.barThickness/2,l=g+S+16;t.push(o("text",{key:`gcat-${n}`,x:String(e),y:String(l),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${e}, ${l})`},r.label))}else t.push(o("text",{key:`gcat-${n}`,x:String(g-6),y:String(g+i+A.barThickness/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}return t},[y,M,A,c,f,x,b,g,S]),T=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),W=s(()=>x?[o("defs",{key:"anim-defs"},o("style",{key:"anim-style"},b?"@keyframes barGrow { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }":"@keyframes barGrow { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }"))]:[],[x,b]),B=F(),E=R(),P=T(),H=W();let j;return j=$&&m?N():$?L():D(),o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",style:{fontFamily:"sans-serif"}},...H,...P,...B,...E,...j)},exports.BigNumber=function(e){const{value:t,label:n,prefix:r="",suffix:i="",trend:l,trendLabel:a,sparkline:c,width:f=280,height:p=160,valueColor:u="currentColor",trendUpColor:h="#22c55e",trendDownColor:g="#ef4444",backgroundColor:x="#ffffff"}=e,y=d(()=>function(e){if("string"==typeof e)return e;if(!isFinite(e)||isNaN(e))return"--";const t=e.toString().split("."),n=t[0],o=t.length>1?"."+t[1]:"",r=n.startsWith("-"),i=r?n.slice(1):n;let l="";for(let e=0;e<i.length;e++)e>0&&(i.length-e)%3==0&&(l+=","),l+=i[e];return(r?"-":"")+l+o}(t),[t]),m=null!=l&&isFinite(l)&&!isNaN(l),b=null!=c&&c.length>1,v=null!=n&&n.length>0,S=m&&l>=0?h:g,k=v?.38*p:.45*p,w=Math.min(.15*f,48),$=.55*w,M=k+.4*w+8,C=v?M+22:k+.4*w+22,z=b?Math.min(.22*p,36):0,I=p-20-z,A=f-40,F=s(()=>[o("rect",{key:"bg",x:"0",y:"0",width:"100%",rx:"8",ry:"8",fill:x,stroke:"#e5e7eb","stroke-width":"1"})],[f,p,x]),R=s(()=>{const e=[],t=r+y+i;return e.push(o("text",{key:"value",x:String(f/2),y:String(k),"text-anchor":"middle","dominant-baseline":"central","font-size":String(w),"font-weight":"bold","font-family":"sans-serif",fill:u,"aria-label":`Value: ${t}`},r?o("tspan",{key:"prefix","font-size":String($),"font-weight":"normal"},r):null,y,i?o("tspan",{key:"suffix","font-size":String($),"font-weight":"normal"},i):null)),e},[f,k,w,$,y,r,i,u]),D=s(()=>v?[o("text",{key:"label",x:String(f/2),y:String(M),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},n)]:[],[v,f,M,n]),L=s(()=>{if(!m)return[];const e=[],t=l>=0,n=function(e){if(!isFinite(e)||isNaN(e))return"--";const t=Math.abs(e);return t<100&&t!==Math.floor(t)?t.toFixed(1):String(Math.round(t))}(l),r=(t?"+":"-")+n+(a?" "+a:""),i=f/2-40,s=C;if(t){const t=`${i},${s} ${i-4},${s+8} ${i+4},${s+8}`;e.push(o("polygon",{key:"trend-arrow",points:t,fill:S}))}else{const t=`${i},${s+8} ${i-4},${s} ${i+4},${s}`;e.push(o("polygon",{key:"trend-arrow",points:t,fill:S}))}return e.push(o("text",{key:"trend-text",x:String(i+8+4),y:String(s+5.6),"text-anchor":"start","font-size":"12","font-family":"sans-serif",fill:S,"aria-label":`Trend: ${r}`},r)),e},[m,l,a,S,f,C]),N=s(()=>{if(!b)return[];const e=[],t=c,n=[];for(const e of t)"number"==typeof e&&isFinite(e)&&!isNaN(e)&&n.push(e);if(n.length<2)return[];let r=1/0,i=-1/0;for(const e of n)e<r&&(r=e),e>i&&(i=e);r===i&&(r-=1,i+=1);const l=i-r,a=A/(n.length-1);let s="";for(let e=0;e<n.length;e++){const t=20+e*a,o=I+z-(n[e]-r)/l*z;s+=0===e?`M ${t} ${o}`:` L ${t} ${o}`}const d=s+` L ${20+(n.length-1)*a} ${I+z} L 20 ${I+z} Z`;return e.push(o("defs",{key:"spark-defs"},o("linearGradient",{key:"spark-grad",id:"sparkGrad",x1:"0",y1:"0",x2:"0",y2:"1"},o("stop",{key:"stop1",offset:"0%","stop-color":"#3b82f6","stop-opacity":"0.3"}),o("stop",{key:"stop2",offset:"100%","stop-color":"#3b82f6","stop-opacity":"0.05"})))),e.push(o("path",{key:"spark-fill",d:d,fill:"url(#sparkGrad)"})),e.push(o("path",{key:"spark-line",d:s,fill:"none",stroke:"#3b82f6","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),e},[b,c,A,I,z,20]),T=F(),W=R(),B=D(),E=L(),P=N();return o("svg",{width:"100%",viewBox:`0 0 ${f} ${p}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":`${r}${y}${i}${v?`, ${n}`:""}`,style:{fontFamily:"sans-serif"}},...T,...P,...W,...B,...E)},exports.BlochSphere=function(e){const{state:t,gates:n,width:r=400,height:i=400,rotateY:d=-25,rotateX:f=15,zoom:p=1,interactive:u=!0,zoomable:h=!0,showVector:g=!0,showLabels:x=!0,showWireframe:y=!0,showTrail:m=!0,trailMaxPoints:b=200,trailColor:v="#ef4444",wireframeColor:S="#cbd5e1",vectorColor:k="#3b82f6",backgroundColor:w,sphereRadius:$=130,title:M,onStateChange:C}=e,[z,I]=l(t??{theta:0,phi:0}),[A,F]=l(d),[R,D]=l(f),[L,N]=l(p),T=c([]),W=c(!1),B=c(null),E=c(null);a(()=>{t&&I(t)},[t?.theta,t?.phi]);const P=c(0);a(()=>{if(!n||0===n.length)return;P.current=0;let e=0;const t=()=>{P.current>=n.length||(I(e=>{const t=zn(e,n[P.current]);return P.current++,C&&C(t),t}),e=requestAnimationFrame(t))};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[n]),a(()=>{const e=$n(z);T.current.push(e),T.current.length>b&&T.current.splice(0,T.current.length-b)},[z.theta,z.phi]);const H=$*L,j=r/2,_=i/2,Y=s((e,t,n)=>function(e,t,n,o,r,i,l,a){const s=Math.cos(o*wn),d=Math.sin(o*wn),c=Math.cos(r*wn),f=Math.sin(r*wn),p=-e*f+n*c;return{sx:i+(e*c+n*f)*a,sy:l-(t*s-p*d)*a,depth:t*d+p*s}}(e,t,n,R,A,j,_,H),[R,A,j,_,H]),q=s(e=>{if(!u)return;const t=e;W.current=!0,B.current={mx:t.clientX,my:t.clientY,rx:R,ry:A}},[u,R,A]),O=s(e=>{if(!W.current||!B.current)return;const t=e,n=B.current;F(n.ry+.5*(t.clientX-n.mx)),D(n.rx-.5*(t.clientY-n.my))},[]),U=s(()=>{W.current=!1},[]),G=s(e=>{if(!h)return;const t=e;t.preventDefault(),N(e=>Math.max(.5,Math.min(3,e*(t.deltaY>0?.95:1.05))))},[h]),V=[];if(w&&V.push(o("rect",{key:"bg",x:"0",y:"0",width:String(r),height:String(i),fill:w,rx:"6"})),M&&V.push(o("text",{key:"title",x:String(j),y:"24","text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},M)),y){const e=60,t=[];for(let n=0;n<=e;n++){const o=n/e*2*Math.PI,r=Y(Math.cos(o),Math.sin(o),0);t.push(`${0===n?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"eq",d:t.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.5"}));const n=[];for(let t=0;t<=e;t++){const o=t/e*2*Math.PI,r=Y(Math.cos(o),0,Math.sin(o));n.push(`${0===t?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"xz",d:n.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.4"}));const r=[];for(let t=0;t<=e;t++){const n=t/e*2*Math.PI,o=Y(0,Math.cos(n),Math.sin(n));r.push(`${0===t?"M":"L"}${o.sx.toFixed(1)},${o.sy.toFixed(1)}`)}V.push(o("path",{key:"yz",d:r.join(" "),fill:"none",stroke:S,"stroke-width":"0.8",opacity:"0.4"}))}const X=[{id:"x",dir:[1,0,0],color:"#ef4444"},{id:"y",dir:[0,1,0],color:"#22c55e"},{id:"z",dir:[0,0,1],color:"#3b82f6"}];for(const e of X){const t=Y(1.15*e.dir[0],1.15*e.dir[1],1.15*e.dir[2]),n=Y(1.15*-e.dir[0],1.15*-e.dir[1],1.15*-e.dir[2]);Y(0,0,0),V.push(o("line",{key:`axis-${e.id}`,x1:String(n.sx),y1:String(n.sy),x2:String(t.sx),y2:String(t.sy),stroke:e.color,"stroke-width":"0.8",opacity:"0.4","stroke-dasharray":"3 3"}))}if(x){const e=[{text:"|0⟩",pos:[0,0,1.3]},{text:"|1⟩",pos:[0,0,-1.3]},{text:"|+⟩",pos:[1.3,0,0]},{text:"|-⟩",pos:[-1.3,0,0]},{text:"|+i⟩",pos:[0,1.3,0]},{text:"|-i⟩",pos:[0,-1.3,0]}];for(const t of e){const e=Y(t.pos[0],t.pos[1],t.pos[2]);V.push(o("text",{key:`lbl-${t.text}`,x:String(e.sx),y:String(e.sy),"text-anchor":"middle","dominant-baseline":"central","font-size":"11","font-family":"serif",fill:"#475569",style:{pointerEvents:"none"}},t.text))}}if(m&&T.current.length>1){const e=T.current,t=[];for(let n=0;n<e.length;n++){const o=e[n],r=Y(o.x,o.y,o.z);t.push(`${0===n?"M":"L"}${r.sx.toFixed(1)},${r.sy.toFixed(1)}`)}V.push(o("path",{key:"trail",d:t.join(" "),fill:"none",stroke:v,"stroke-width":"1.5",opacity:"0.5","stroke-linecap":"round","stroke-linejoin":"round"}))}if(g){const e=$n(z),t=Y(0,0,0),n=Y(e.x,e.y,e.z);V.push(o("line",{key:"vec-line",x1:String(t.sx),y1:String(t.sy),x2:String(n.sx),y2:String(n.sy),stroke:k,"stroke-width":"2.5","stroke-linecap":"round"})),V.push(o("circle",{key:"vec-point",cx:String(n.sx),cy:String(n.sy),r:"5",fill:k,stroke:"#fff","stroke-width":"1.5"}));const l=(180*z.theta/Math.PI).toFixed(0),a=(180*z.phi/Math.PI).toFixed(0);V.push(o("text",{key:"state-label",x:String(r-10),y:String(i-10),"text-anchor":"end","font-size":"10","font-family":"monospace",fill:"#64748b"},`θ=${l}° φ=${a}°`))}return o("svg",{ref:E,width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":M??"Bloch sphere quantum state visualization",style:{fontFamily:"sans-serif",cursor:u?W.current?"grabbing":"grab":"default"},onMouseDown:u?q:void 0,onMouseMove:u?O:void 0,onMouseUp:u?U:void 0,onMouseLeave:u?U:void 0,onWheel:h?G:void 0},...V)},exports.BoxPlot=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",showOutliers:l=!0,showMean:a=!1,whiskerColor:c="#374151",boxWidth:f=.6,showGrid:p=!0,title:u,padding:h=60}=e,g="vertical"===i,x=n-2*h,y=r-2*h,m=["#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#f97316","#6366f1","#84cc16"],b=d(()=>{const e=[];for(const n of t)e.push(An(n.values));return e},[t]),v=d(()=>{let e=1/0,t=-1/0;for(const n of b){if(null===n)continue;const o=l&&n.outliers.length>0?Math.min(n.whiskerLow,n.outliers[0]):n.whiskerLow,r=l&&n.outliers.length>0?Math.max(n.whiskerHigh,n.outliers[n.outliers.length-1]):n.whiskerHigh;o<e&&(e=o),r>t&&(t=r)}isFinite(e)||(e=0,t=1);const n=t-e,o=n>0?.05*n:.5;return{min:e-o,max:t+o}},[b,l]),S=g?y:x,k=(g?x:y)/(t.length>0?t.length:1),w=k*Math.min(Math.max(f,.1),.95),$=s(e=>{const t=v.max-v.min;return 0===t?S/2:(e-v.min)/t*S},[v,S]),M=s(()=>{if(!p)return[];const e=[],t=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(v.max-v.min);for(let n=Math.ceil(v.min/t)*t;n<=v.max;n+=t){const t=$(n),r=String(Math.round(1e3*n)/1e3);if(g){const i=h+y-t;e.push(o("line",{key:`grid-${n}`,x1:String(h),y1:String(i),x2:String(h+x),y2:String(i),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`glabel-${n}`,x:String(h-6),y:String(i+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},r))}else{const i=h+t;e.push(o("line",{key:`grid-${n}`,x1:String(i),y1:String(h),x2:String(i),y2:String(h+y),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`glabel-${n}`,x:String(i),y:String(h+y+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},r))}}return e},[p,v,$,g,h,x,y]),C=s(()=>{const e=[];return e.push(o("line",{key:"axis-value",x1:String(h),y1:String(g?h:h+y),x2:String(h),y2:String(h+y),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-category",x1:String(h),y1:String(h+y),x2:String(h+x),y2:String(h+y),stroke:"#374151","stroke-width":"1.5"})),e},[h,x,y,g]),z=s(()=>{const e=[];for(let n=0;n<t.length;n++){const r=b[n];if(null===r)continue;const i=t[n],s=i.color??m[n%m.length],d=k*n+k/2,f=w/2;if(g){const t=h+y-$(r.q1),p=h+y-$(r.q3),u=h+y-$(r.median),g=h+y-$(r.whiskerLow),x=h+y-$(r.whiskerHigh),m=h+d;e.push(o("line",{key:`wl-${n}`,x1:String(m),y1:String(t),x2:String(m),y2:String(g),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wlc-${n}`,x1:String(m-.4*f),y1:String(g),x2:String(m+.4*f),y2:String(g),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wh-${n}`,x1:String(m),y1:String(p),x2:String(m),y2:String(x),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`whc-${n}`,x1:String(m-.4*f),y1:String(x),x2:String(m+.4*f),y2:String(x),stroke:c,"stroke-width":"1.5"}));const b=Math.min(t,p),v=Math.abs(t-p);if(e.push(o("rect",{key:`box-${n}`,x:String(m-f),y:String(b),width:String(w),height:String(Math.max(v,1)),fill:s,stroke:c,"stroke-width":"1.5",opacity:"0.8","aria-label":`${i.label}: Q1=${r.q1.toFixed(1)}, median=${r.median.toFixed(1)}, Q3=${r.q3.toFixed(1)}`,role:"img"})),e.push(o("line",{key:`med-${n}`,x1:String(m-f),y1:String(u),x2:String(m+f),y2:String(u),stroke:"#fff","stroke-width":"2.5"})),a){const t=h+y-$(r.mean);e.push(o("circle",{key:`mean-${n}`,cx:String(m),cy:String(t),r:"3.5",fill:"#fff",stroke:c,"stroke-width":"1.5","aria-label":`Mean: ${r.mean.toFixed(1)}`}))}if(l)for(let t=0;t<r.outliers.length;t++){const i=h+y-$(r.outliers[t]);e.push(o("circle",{key:`out-${n}-${t}`,cx:String(m),cy:String(i),r:"3",fill:"none",stroke:c,"stroke-width":"1.5","aria-label":`Outlier: ${r.outliers[t]}`}))}e.push(o("text",{key:`cat-${n}`,x:String(m),y:String(h+y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},i.label))}else{const t=h+$(r.q1),p=h+$(r.q3),u=h+$(r.median),g=h+$(r.whiskerLow),x=h+$(r.whiskerHigh),y=h+d;e.push(o("line",{key:`wl-${n}`,x1:String(t),y1:String(y),x2:String(g),y2:String(y),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wlc-${n}`,x1:String(g),y1:String(y-.4*f),x2:String(g),y2:String(y+.4*f),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`wh-${n}`,x1:String(p),y1:String(y),x2:String(x),y2:String(y),stroke:c,"stroke-width":"1.5"})),e.push(o("line",{key:`whc-${n}`,x1:String(x),y1:String(y-.4*f),x2:String(x),y2:String(y+.4*f),stroke:c,"stroke-width":"1.5"}));const m=Math.min(t,p),b=Math.abs(p-t);if(e.push(o("rect",{key:`box-${n}`,x:String(m),y:String(y-f),width:String(Math.max(b,1)),height:String(w),fill:s,stroke:c,"stroke-width":"1.5",opacity:"0.8","aria-label":`${i.label}: Q1=${r.q1.toFixed(1)}, median=${r.median.toFixed(1)}, Q3=${r.q3.toFixed(1)}`,role:"img"})),e.push(o("line",{key:`med-${n}`,x1:String(u),y1:String(y-f),x2:String(u),y2:String(y+f),stroke:"#fff","stroke-width":"2.5"})),a){const t=h+$(r.mean);e.push(o("circle",{key:`mean-${n}`,cx:String(t),cy:String(y),r:"3.5",fill:"#fff",stroke:c,"stroke-width":"1.5","aria-label":`Mean: ${r.mean.toFixed(1)}`}))}if(l)for(let t=0;t<r.outliers.length;t++){const i=h+$(r.outliers[t]);e.push(o("circle",{key:`out-${n}-${t}`,cx:String(i),cy:String(y),r:"3",fill:"none",stroke:c,"stroke-width":"1.5","aria-label":`Outlier: ${r.outliers[t]}`}))}e.push(o("text",{key:`cat-${n}`,x:String(h-6),y:String(y+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},i.label))}}return e},[t,b,$,g,h,x,y,k,w,c,l,a,m]),I=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(h/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},u)]:[],[u,n,h]),A=M(),F=C(),R=z(),D=I();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Box plot",style:{fontFamily:"sans-serif"}},...D,...A,...F,...R)},exports.Breadcrumb=function(e){const{items:t,separator:n="/",maxItems:r,size:i="md"}=e,[a,d]=l(!1),c=ze[i],f=s(()=>{d(!0)},[]);let p=t,u=!1;if(r&&r>1&&t.length>r&&!a){u=!0;const e=1,n=r-1;p=[...t.slice(0,e),{label:"..."},...t.slice(t.length-n)]}const h=p.map((e,t)=>((e,t,r)=>{const i=t===r.length-1,l=u&&"..."===e.label&&1===t,a=[];var s;return t>0&&a.push(o("span","string"==typeof(s=n)?{"aria-hidden":"true",style:{margin:"0 8px",color:"#9ca3af",userSelect:"none"}}:{"aria-hidden":"true",style:{margin:"0 8px"}},s)),l?a.push(o("button",{type:"button",onClick:f,style:{background:"none",border:"none",cursor:"pointer",padding:"2px 4px",fontSize:c.fontSize,color:"#6b7280",fontFamily:"inherit"},"aria-label":"Show all breadcrumb items"},"...")):i?a.push(o("span",{"aria-current":"page",style:{color:"#1f2937",fontWeight:"600",fontSize:c.fontSize}},e.label)):e.href?a.push(o("a",{href:e.href,onClick:e.onClick?t=>{t.preventDefault(),e.onClick()}:void 0,style:{color:"#2563eb",textDecoration:"none",fontSize:c.fontSize}},e.label)):e.onClick?a.push(o("button",{type:"button",onClick:e.onClick,style:{background:"none",border:"none",cursor:"pointer",color:"#2563eb",padding:"0",fontSize:c.fontSize,fontFamily:"inherit"}},e.label)):a.push(o("span",{style:{color:"#6b7280",fontSize:c.fontSize}},e.label)),o("li",{key:String(t),style:{display:"inline-flex",alignItems:"center"}},...a)})(e,t,p));return o(ke,{orientation:"horizontal",role:"navigation",ariaLabel:"Breadcrumb",keyboardNav:!1,styling:{border:"none",borderRadius:"0",padding:c.padding,backgroundColor:"transparent"}},o("ol",{style:{display:"flex",alignItems:"center",listStyle:"none",margin:"0",padding:"0",flexWrap:"wrap"}},...h))},exports.BubbleChart=function(e){const{data:t=[],width:n=600,height:r=400,xLabel:i,yLabel:l,showGrid:a=!0,showAxes:c=!0,showLabels:f=!1,maxBubbleRadius:p=40,minBubbleRadius:u=4,defaultColor:h="#3b82f6",opacity:g=.7,title:x,padding:y=60}=e,m=d(()=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n];Dn(o.x)&&Dn(o.y)&&Dn(o.r)&&e.push(o)}return e},[t]),b=n-2*y,v=r-2*y,S=d(()=>{if(0===m.length)return{xMin:0,xMax:1,yMin:0,yMax:1,rMin:0,rMax:1};let e=1/0,t=-1/0,n=1/0,o=-1/0,r=1/0,i=-1/0;for(const l of m)l.x<e&&(e=l.x),l.x>t&&(t=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y),l.r<r&&(r=l.r),l.r>i&&(i=l.r);return e===t&&(e-=1,t+=1),n===o&&(n-=1,o+=1),r===i&&(r=0,i=i>0?i:1),{xMin:e,xMax:t,yMin:n,yMax:o,rMin:r,rMax:i}},[m]),k=s(e=>{const t=S.xMax-S.xMin;return y+(e-S.xMin)/t*b},[S,y,b]),w=s(e=>{const t=S.yMax-S.yMin;return y+v-(e-S.yMin)/t*v},[S,y,v]),$=s(e=>{const t=S.rMax-S.rMin;if(0===t)return(u+p)/2;const n=(e-S.rMin)/t;return u+n*(p-u)},[S,u,p]),M=s(()=>{if(!a)return[];const e=[],t=Fn(S.xMax-S.xMin);for(let n=Math.ceil(S.xMin/t)*t;n<=S.xMax;n+=t){const t=k(n);e.push(o("line",{key:`grid-x-${n}`,x1:String(t),y1:String(y),x2:String(t),y2:String(y+v),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`grid-xlabel-${n}`,x:String(t),y:String(y+v+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(Math.round(1e3*n)/1e3)))}const n=Fn(S.yMax-S.yMin);for(let t=Math.ceil(S.yMin/n)*n;t<=S.yMax;t+=n){const n=w(t);e.push(o("line",{key:`grid-y-${t}`,x1:String(y),y1:String(n),x2:String(y+b),y2:String(n),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),e.push(o("text",{key:`grid-ylabel-${t}`,x:String(y-6),y:String(n+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(Math.round(1e3*t)/1e3)))}return e},[a,S,k,w,y,b,v]),C=s(()=>{if(!c)return[];const e=[];return e.push(o("line",{key:"axis-y",x1:String(y),y1:String(y),x2:String(y),y2:String(y+v),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(y),y1:String(y+v),x2:String(y+b),y2:String(y+v),stroke:"#374151","stroke-width":"1.5"})),i&&e.push(o("text",{key:"x-label",x:String(y+b/2),y:String(y+v+40),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"#374151"},i)),l&&e.push(o("text",{key:"y-label",x:String(y-40),y:String(y+v/2),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"#374151",transform:`rotate(-90, ${y-40}, ${y+v/2})`},l)),e},[c,y,b,v,i,l]),z=s(()=>{const e=[];for(let t=0;t<m.length;t++){const n=m[t],r=k(n.x),i=w(n.y),l=Rn($(n.r),u,p),a=n.color??h;e.push(o("circle",{key:`bubble-${t}`,cx:String(r),cy:String(i),r:String(l),fill:a,opacity:String(g),stroke:a,"stroke-width":"1","stroke-opacity":"0.8","aria-label":n.label??`Bubble at (${n.x}, ${n.y}) size ${n.r}`,role:"img"})),f&&n.label&&e.push(o("text",{key:`label-${t}`,x:String(r),y:String(i-l-4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},n.label))}return e},[m,k,w,$,h,g,f,u,p]),I=s(()=>x?[o("text",{key:"title",x:String(n/2),y:String(y/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},x)]:[],[x,n,y]),A=M(),F=C(),R=z(),D=I();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":x??"Bubble chart",style:{fontFamily:"sans-serif"}},...D,...A,...F,...R)},exports.Button=function(e){const{children:t,onClick:n,variant:r="secondary",size:i="md",disabled:l=!1,fullWidth:a=!1,type:s="button",className:c,style:f,ariaLabel:p,active:u=!1}=e,h=d(()=>{const e=yn[i]??yn.md,t=mn[r]??mn.secondary,n={padding:e.padding,fontSize:e.fontSize,borderRadius:e.borderRadius,border:`1px solid ${t.border}`,backgroundColor:u?"#3b82f6":t.bg,color:u?"white":t.color,cursor:l?"default":"pointer",fontFamily:"inherit",lineHeight:"1.4",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"4px",transition:"background-color 0.15s, opacity 0.15s",opacity:l?"0.5":"1"};return a&&(n.width="100%"),f&&Object.assign(n,f),n},[r,i,l,a,u,f]);return o("button",{type:s,onClick:l?void 0:n,disabled:l,className:c,style:h,"aria-label":p,"aria-pressed":u?"true":void 0},t)},exports.CalendarHeatMap=function(e){const{data:t=[],width:n=800,height:r=160,colorScale:i=Pn,cellSize:l=12,cellGap:a=2,showMonthLabels:c=!0,showDayLabels:f=!0,emptyColor:p="#ebedf0",title:u}=e,{dateMap:h,startDate:g,endDate:x,maxVal:y}=d(()=>{const e=new Map;let n=0,o=null,r=null;for(const i of t){const t=Tn(i.date);if(isNaN(t.getTime()))continue;const l=Wn(t);e.set(l,(e.get(l)??0)+i.value);const a=e.get(l);a>n&&(n=a),(null===o||t<o)&&(o=t),(null===r||t>r)&&(r=t)}if(null===o||null===r){const e=new Date;o=new Date(e.getFullYear(),0,1),r=new Date(e.getFullYear(),11,31)}const i=new Date(o);i.setDate(i.getDate()-i.getDay());const l=new Date(r);return l.setDate(l.getDate()+(6-l.getDay())),{dateMap:e,startDate:i,endDate:l,maxVal:n>0?n:1}},[t]),m=f?30:0,b=c?16:0,v=u?28:0,S=m+10,k=v+b+4,w=s(()=>{const e=[],t=new Date(g);let n=0;for(;t<=x;){const r=t.getDay();0===r&&t>g&&n++;const s=Wn(t),d=h.get(s),c=void 0!==d&&d>0?En(d/y,i):p,f=S+n*(l+a),u=k+r*(l+a);e.push(o("rect",{key:`day-${s}`,x:String(f),y:String(u),width:String(l),height:String(l),rx:"2",ry:"2",fill:c,"aria-label":`${s}: ${d??0}`})),t.setDate(t.getDate()+1)}return e},[g,x,h,y,i,p,l,a,S,k]),$=s(()=>{if(!c)return[];const e=[],t=new Date(g);let n=0,r=-1;for(;t<=x;){const i=t.getDay();0===i&&t>g&&n++;const s=t.getMonth();if(s!==r&&0===i){r=s;const t=S+n*(l+a);e.push(o("text",{key:`month-${n}`,x:String(t),y:String(v+b-2),"font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},Ln[s]))}t.setDate(t.getDate()+1)}return e},[c,g,x,l,a,S,v,b]),M=s(()=>{if(!f)return[];const e=[],t=[1,3,5];for(const n of t){const t=k+n*(l+a)+l/2;e.push(o("text",{key:`day-label-${n}`,x:String(m),y:String(t),"text-anchor":"end","dominant-baseline":"central","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},Nn[n]))}return e},[f,l,a,k,m]),C=s(()=>u?[o("text",{key:"title",x:String(n/2),y:"18","text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},u)]:[],[u,n]);if(0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Calendar heat map — no data"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const z=C(),I=$(),A=M(),F=w();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Calendar heat map",style:{fontFamily:"sans-serif"}},...z,...I,...A,...F)},exports.Card=function(e){const t=!1!==e.bordered,n=e.shadow??"sm",r=e.padding??"16px",i=e.borderRadius??"8px",l=d(()=>{const o={display:"flex",flexDirection:"column",borderRadius:i,overflow:"hidden",backgroundColor:"#ffffff",transition:"box-shadow 0.2s, transform 0.2s"};return t&&(o.border="1px solid #e5e7eb"),o.boxShadow=ye[n]??ye.sm,e.hoverable&&(o.cursor="pointer"),{...o,...e.style??{}}},[t,n,i,e.hoverable,e.style]),a={display:"flex",alignItems:"flex-start",justifyContent:"space-between",padding:r,gap:"12px"},s={padding:r,paddingTop:e.title||e.subtitle?"0":r,flex:"1"},c={padding:r,paddingTop:"0",borderTop:"1px solid #f3f4f6",paddingBottom:r,marginTop:"auto"},f=e.title||e.subtitle||e.headerAction;return o("div",{className:`card ${e.hoverable?"card--hoverable":""} ${e.className??""}`.trim(),style:l},e.image?o("img",{src:e.image,alt:e.imageAlt??"",style:{width:"100%",height:"auto",display:"block",objectFit:"cover"}}):null,f?o("div",{className:"card__header",style:a},o("div",{style:{flex:"1",minWidth:"0"}},e.title?o("div",{className:"card__title",style:{fontSize:"16px",fontWeight:"600",color:"#111827",lineHeight:"1.4"}},e.title):null,e.subtitle?o("div",{className:"card__subtitle",style:{fontSize:"14px",color:"#6b7280",marginTop:"2px",lineHeight:"1.4"}},e.subtitle):null),e.headerAction?o("div",{className:"card__header-action"},e.headerAction):null):null,o("div",{className:"card__body",style:s},e.children),e.footer?o("div",{className:"card__footer",style:c},e.footer):null)},exports.Carousel=function(e){const t=e.items??[],n=t.length,r=!1!==e.loop,i=!1!==e.showDots,p=!1!==e.showArrows,u=e.animation??"slide",h=e.interval??5e3,g=f().replace(/[^a-zA-Z0-9_-]/g,""),[x,y]=l(0),m=c(null),b=c(null),v=s(t=>{let o=t;o=r?(t%n+n)%n:Math.max(0,Math.min(t,n-1)),y(o),e.onChange&&e.onChange(o)},[n,r,e.onChange]),S=s(()=>v(x+1),[x,v]),k=s(()=>v(x-1),[x,v]);a(()=>{if(!e.autoPlay||n<=1)return;const t=setInterval(S,h);return()=>clearInterval(t)},[e.autoPlay,h,S,n]),a(()=>{const e=e=>{"ArrowLeft"===e.key?k():"ArrowRight"===e.key&&S()},t=b.current;if(t)return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)},[S,k]);const w="fade"===u?`@keyframes liq-fade-in-${g}{from{opacity:0}to{opacity:1}}`:"",$=d(()=>"fade"===u?{position:"relative",width:"100%"}:{display:"flex",transition:"transform 0.4s ease",transform:`translateX(-${100*x}%)`,width:"100%"},[x,u]),M={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:"2",background:"rgba(255,255,255,0.8)",border:"none",borderRadius:"50%",width:"36px",height:"36px",fontSize:"18px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"#111827",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"},C=t.map((e,t)=>{const n="fade"===u?{position:t===x?"relative":"absolute",top:"0",left:"0",width:"100%",opacity:t===x?"1":"0",transition:"opacity 0.4s ease"}:{flex:"0 0 100%",width:"100%"};return o("div",{key:String(t),style:n},e.content,e.caption?o("div",{style:{textAlign:"center",padding:"8px 12px",fontSize:"13px",color:"#6b7280"}},e.caption):null)}),z=i?o("div",{style:{display:"flex",justifyContent:"center",gap:"8px",padding:"12px 0"}},...t.map((e,t)=>o("button",{key:String(t),"aria-label":`Go to slide ${t+1}`,onclick:()=>v(t),style:{width:"10px",height:"10px",borderRadius:"50%",border:"none",cursor:"pointer",backgroundColor:t===x?"#3b82f6":"#d1d5db",transition:"background-color 0.2s",padding:"0"}}))):null;return o("div",{ref:b,tabindex:"0",role:"region","aria-label":"Carousel",style:{position:"relative",overflow:"hidden",width:"100%",outline:"none"},onpointerdown:e=>{m.current=e.clientX},onpointerup:e=>{if(null==m.current)return;const t=e.clientX-m.current;t>50?k():t<-50&&S(),m.current=null}},w?o("style",null,w):null,o("div",{style:$},...C),p&&n>1?o("button",{"aria-label":"Previous slide",onclick:k,style:{...M,left:"8px"}},"‹"):null,p&&n>1?o("button",{"aria-label":"Next slide",onclick:S,style:{...M,right:"8px"}},"›"):null,z)},exports.CartesianGraph2D=function(e){const{width:t=400,height:n=300,points:r=[],plotFunction:i,plotResolution:f=200,xStep:p,sync:u=!1,xRange:h=[-5,5],yRange:g=[-5,5],showGrid:x=!0,showAxes:y=!0,pointRadius:m=3,pointColor:b="#3b82f6",curveColor:v="#3b82f6",gridColor:S="#e2e8f0",axisColor:k="#94a3b8",onPointClick:w,onPointDoubleClick:$,onPointContextMenu:M,onPointHover:C}=e,[z,I]=l(h[0]),[A,F]=l(h[1]),[R,D]=l(g[0]),[L,N]=l(g[1]),T=c(!1),W=c(null),B=s(e=>ft+(e-z)/(A-z)*(t-80),[z,A,t]),E=s(e=>n-ft-(e-R)/(L-R)*(n-80),[R,L,n]),P=s(e=>z+(e-ft)/(t-80)*(A-z),[z,A,t]),H=s(e=>R+(n-ft-e)/(n-80)*(L-R),[R,L,n]),j=s(e=>{const t=e;T.current=!0,W.current={mx:t.clientX,my:t.clientY,x0:z,x1:A,y0:R,y1:L}},[z,A,R,L]),_=s(e=>{if(!T.current||!W.current)return;const o=e,r=W.current,i=o.clientX-r.mx,l=o.clientY-r.my,a=i/(t-80)*(r.x1-r.x0),s=l/(n-80)*(r.y1-r.y0);I(r.x0-a),F(r.x1-a),D(r.y0+s),N(r.y1+s)},[t,n]),Y=s(()=>{T.current=!1,W.current=null},[]),q=s(e=>{const t=e;t.preventDefault();const n=t.currentTarget.getBoundingClientRect(),o=t.clientX-n.left,r=t.clientY-n.top,i=P(o),l=H(r),a=t.deltaY>0?1.1:1/1.1,s=(A-z)*a,d=(L-R)*a;if(s<.01||d<.01||s>pt||d>pt)return;const c=(i-z)/(A-z),f=(l-R)/(L-R);I(i-c*s),F(i+(1-c)*s),D(l-f*d),N(l+(1-f)*d)},[z,A,R,L,P,H]),O=[];if(O.push(o("rect",{x:0,y:0,width:t,height:n,fill:"white",key:"bg"})),x){const e=dt(z,A),r=dt(R,L);for(let t=0;t<e.length;t++){const r=B(e[t]);O.push(o("line",{x1:r,y1:ft,x2:r,y2:n-ft,stroke:S,"stroke-width":.5,key:`gx-${t}`})),O.push(o("text",{x:r,y:n-ft+14,"text-anchor":"end","font-size":10,fill:k,transform:`rotate(-45, ${r}, ${n-ft+14})`,key:`lx-${t}`},ct(e[t])))}for(let e=0;e<r.length;e++){const n=E(r[e]);O.push(o("line",{x1:ft,y1:n,x2:t-ft,y2:n,stroke:S,"stroke-width":.5,key:`gy-${e}`})),O.push(o("text",{x:34,y:n+3,"text-anchor":"end","font-size":10,fill:k,key:`ly-${e}`},ct(r[e])))}}if(y){const e=Math.max(ft,Math.min(t-ft,B(0))),r=Math.max(ft,Math.min(n-ft,E(0)));O.push(o("line",{x1:ft,y1:r,x2:t-ft,y2:r,stroke:k,"stroke-width":1,key:"x-axis"})),O.push(o("line",{x1:e,y1:ft,x2:e,y2:n-ft,stroke:k,"stroke-width":1,key:"y-axis"}))}const U=d(()=>{if(!i||!u)return[];const e=it({start:z,end:A,step:p??(A-z)/f});return lt(i,e)},[i,z,A,p,f,u]),[G,V]=l([]),X=c(null);a(()=>{if(!i||u)return void V([]);const e=it({start:z,end:A,step:p??(A-z)/f});return X.current&&X.current(),X.current=at(i,e,200,e=>{V([...e])}),()=>{X.current&&X.current()}},[i,z,A,p,f,u]);const K=u?U:G;if(K.length>0){const e=[];for(let t=0;t<K.length;t++){const n=K[t],o=B(n.input),r=E(n.output);e.push(`${0===e.length?"M":"L"}${o},${r}`)}O.push(o("path",{d:e.join(" "),fill:"none",stroke:v,"stroke-width":1.5,key:"curve"}))}const Z=(e,t,n,o)=>{if(t)return e=>t({x:o.x,y:o.y,index:n,event:e})};for(let e=0;e<r.length;e++){const t=r[e],n={cx:B(t.x),cy:E(t.y),r:m,fill:b,cursor:"pointer",key:`pt-${e}`};w&&(n.onClick=Z(0,w,e,t)),$&&(n.onDblClick=Z(0,$,e,t)),M&&(n.onContextMenu=Z(0,M,e,t)),C&&(n.onMouseOver=Z(0,C,e,t)),O.push(o("circle",n))}const J=o("defs",{key:"defs"},o("clipPath",{id:"plot-clip"},o("rect",{x:ft,y:ft,width:t-80,height:n-80})));return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",style:"user-select: none; touch-action: none;",onMouseDown:j,onMouseMove:_,onMouseUp:Y,onMouseLeave:Y,onWheel:q},J,...O)},exports.Checkbox=function(e){const{checked:t,onChange:n,label:r,indeterminate:i=!1,disabled:l=!1,error:d,size:f="md"}=e,p=c(null);a(()=>{p.current&&(p.current.indeterminate=i)},[i]);const u=s(()=>{l||n(!t)},[l,t,n]),h=s(e=>{l||" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),n(!t))},[l,t,n]),g=oe[f],x=`${g.box}px`,y={width:x,height:x,minWidth:x,borderRadius:"4px",border:"2px solid "+(d?"#ef4444":t||i?"#3b82f6":"#d1d5db"),backgroundColor:t||i?"#3b82f6":"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",cursor:l?"not-allowed":"pointer",transition:"all 0.15s",boxSizing:"border-box"},m={color:"#ffffff",fontSize:`${g.icon}px`,lineHeight:"1",fontWeight:"700"},b=i?o("span",{style:m},"—"):t?o("span",{style:m},"✓"):null,v={display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer",opacity:l?"0.6":"1",userSelect:"none"},S=o("input",{ref:p,type:"checkbox",checked:t,disabled:l,onChange:()=>n(!t),style:{position:"absolute",opacity:"0",width:"0",height:"0",pointerEvents:"none"},"aria-hidden":"true",tabIndex:-1}),k=o("div",{style:y},b),w=r?o("span",{style:{fontSize:g.fontSize,color:"#374151"}},r):null;return o(te,{error:d},o("div",{style:v,onClick:u,onKeyDown:h,tabIndex:l?-1:0,role:"checkbox","aria-checked":i?"mixed":t?"true":"false","aria-disabled":l?"true":void 0,"aria-label":r},S,k,w))},exports.ChordDiagram=function(e){const{matrix:t,labels:n,width:r=600,height:i=600,colors:l=Hn,padAngle:a=.05,showLabels:c=!0,showValues:f=!1,ribbonOpacity:p=.5,innerRadiusRatio:u=.9,title:h}=e;if(!t||0===t.length||!n||0===n.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty chord diagram"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const g=r/2,x=i/2,y=Math.min(r,i)/2-40,m=y*Math.max(.5,Math.min(.99,u)),b=y+16,v=d(()=>function(e,t,n,o){const r=e.length;if(0===r)return{groups:[],chords:[]};const i=[];let l=0;for(let t=0;t<r;t++){let n=0;for(let o=0;o<r;o++){const r=e[t]?.[o]??0;n+=Math.max(0,r)}i.push(n),l+=n}if(0===l){const e=(2*Math.PI-r*o)/Math.max(r,1),i=[];let l=0;for(let a=0;a<r;a++)i.push({index:a,label:t[a]??`Group ${a}`,color:n[a%n.length],startAngle:l,endAngle:l+e,value:0}),l+=e+o;return{groups:i,chords:[]}}const a=2*Math.PI-r*o,s=[];let d=0;for(let e=0;e<r;e++){const r=i[e]/l*a;s.push({index:e,label:t[e]??`Group ${e}`,color:n[e%n.length],startAngle:d,endAngle:d+r,value:i[e]}),d+=r+o}const c=[];for(let e=0;e<r;e++)c.push(s[e].startAngle);const f=[];for(let t=0;t<r;t++)for(let n=t;n<r;n++){const o=Math.max(0,e[t]?.[n]??0),r=t===n?0:Math.max(0,e[n]?.[t]??0);if(0===o&&0===r)continue;const d=o+r,p=i[t]>0?o/l*a:0,u=c[t],h=u+p;c[t]=h;const g=i[n]>0?o/l*a:0,x=c[n],y=x+g;if(c[n]=y,t===n){o>0&&f.push({sourceIndex:t,targetIndex:n,sourceStartAngle:u,sourceEndAngle:h,targetStartAngle:x,targetEndAngle:y,value:o,color:s[t].color});continue}const m=i[n]>0?r/l*a:0,b=c[n]+m;c[n]=b;const v=i[t]>0?r/l*a:0,S=c[t]+v;c[t]=S,(o>0||r>0)&&f.push({sourceIndex:t,targetIndex:n,sourceStartAngle:u,sourceEndAngle:Math.max(h,u+.001),targetStartAngle:x,targetEndAngle:Math.max(y,x+.001),value:d,color:s[t].color})}return{groups:s,chords:f}}(t,n,l,a),[t,n,l,a]),S=s(()=>{const e=[];for(let t=0;t<v.groups.length;t++){const n=v.groups[t];if(n.endAngle-n.startAngle<.001)continue;const r=_n(g,x,y,m,n.startAngle,n.endAngle);if(e.push(o("path",{key:`arc-${t}`,d:r,fill:n.color,stroke:"#fff","stroke-width":"1",role:"img","aria-label":`${n.label}: ${n.value}`})),c){const r=(n.startAngle+n.endAngle)/2,i=jn(g,x,b,r),l=((r-Math.PI/2)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)<Math.PI,a=l?"start":"end";let s=180*r/Math.PI-90;l||(s+=180);const d=f?`${n.label} (${n.value})`:n.label;e.push(o("text",{key:`label-${t}`,x:String(i.x),y:String(i.y),"text-anchor":a,"font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(${s}, ${i.x}, ${i.y})`,"dominant-baseline":"central","pointer-events":"none"},d))}}return e},[v,g,x,y,m,b,c,f]),k=s(()=>{const e=[];for(let t=0;t<v.chords.length;t++){const n=v.chords[t],r=Yn(g,x,m,n.sourceStartAngle,n.sourceEndAngle,n.targetStartAngle,n.targetEndAngle);e.push(o("path",{key:`ribbon-${t}`,d:r,fill:n.color,"fill-opacity":String(p),stroke:n.color,"stroke-width":"0.5","stroke-opacity":"0.3"}))}return e},[v,g,x,m,p]),w=s(()=>h?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,r]),$=k(),M=S(),C=w();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Chord diagram",style:{fontFamily:"sans-serif"}},...C,...$,...M)},exports.ColorPicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,presets:d=re,showInput:p=!0,showAlpha:u=!1,disabled:h=!1,label:g}=e,[x,y]=l(!1),[m,b]=l(r),v=c(null);a(()=>{b(r)},[r]),a(()=>{const e=e=>{v.current&&!v.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const S=s(e=>{h||i(le(e))},[h,i]),k=s(e=>{const t=e.target.value;b(t);const n=t.startsWith("#")?t:`#${t}`;ie(n)&&i(le(n))},[i]),w=s(()=>{ie(m.startsWith("#")?m:`#${m}`)||b(r)},[m,r]),$={width:"36px",height:"36px",borderRadius:"6px",border:"2px solid #d1d5db",backgroundColor:r,cursor:h?"not-allowed":"pointer",flexShrink:"0"},M={display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:"4px",marginBottom:p?"8px":"0"},C=d.map(e=>{const t=le(e)===le(r);return o("div",{key:e,style:{width:"20px",height:"20px",borderRadius:"3px",backgroundColor:e,cursor:h?"not-allowed":"pointer",border:t?"2px solid #1f2937":"1px solid #e5e7eb",boxSizing:"border-box"},onClick:()=>S(e),onKeyDown:t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),S(e))},role:"button",tabIndex:h?-1:0,title:e,"aria-label":`Select color ${e}`})}),z=p?o("div",{style:{display:"flex",alignItems:"center",gap:"4px"}},o("div",{style:{width:"24px",height:"24px",borderRadius:"4px",backgroundColor:r,border:"1px solid #d1d5db",flexShrink:"0"}}),o("input",{type:"text",value:m,onInput:k,onBlur:w,disabled:h,style:{flex:"1",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",fontSize:"13px",fontFamily:"monospace",outline:"none",color:"#1f2937"},placeholder:"#000000","aria-label":"Hex color value"})):null,I=x?o("div",{style:{position:"absolute",top:"100%",left:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",padding:"12px",width:"240px"}},o("div",{style:M},...C),z):null;return o(te,{label:g,disabled:h,htmlFor:n},o("div",{ref:v,style:{position:"relative"}},o("div",{style:{display:"flex",alignItems:"center",gap:"8px"},onClick:h?void 0:()=>y(!x),onKeyDown:h?void 0:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),y(!x))},role:"button",tabIndex:h?-1:0,"aria-expanded":x?"true":"false","aria-label":"Toggle color picker"},o("div",{id:n,style:$}),p?o("span",{style:{fontSize:"14px",fontFamily:"monospace",color:"#1f2937"}},r):null),I))},exports.ColorWheel=function(e){const t=f().replace(/[^a-zA-Z0-9_-]/g,""),n=e.id??`cw-${t}`,{value:r="#000000",onChange:i,size:a=32,showLabel:d=!0,disabled:p=!1,label:u}=e,[h,g]=l(r);return o(te,{label:u,htmlFor:n},o("div",{style:{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"4px"}},o("div",{style:{width:`${a}px`,height:`${a}px`,borderRadius:"6px",border:"2px solid #d1d5db",backgroundColor:h,cursor:p?"not-allowed":"pointer",position:"relative",overflow:"hidden"}},o("input",{id:n,ref:c(null),type:"color",value:h,onInput:s((...e)=>{const t=e[0].target.value;g(t),i?.(t)},[i]),disabled:p,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",opacity:"0",cursor:p?"not-allowed":"pointer",border:"none",padding:"0"},"aria-label":u||"Color"})),d?o("span",{style:{fontSize:"11px",fontFamily:"monospace",color:"#64748b"}},h):null))},exports.ComplexGraph2D=function(e){const{width:t=400,height:n=300,realRange:r=[-2.5,1],imagRange:i=[-1.25,1.25],maxIterations:d=100,colorScheme:f="classic",computeFunction:p=ut,data:u,resolution:h=2,onPointClick:g,onPointHover:x,onPointDoubleClick:y,onPointContextMenu:m}=e;if(u){const e=u.length,r=e>0?u[0].length:0,i=r>0?t/r:1,l=e>0?n/e:1,a=[];for(let t=0;t<e;t++){const e=u[t];for(let n=0;n<r;n++){const r=e[n]??0,[s,c,p]=ht(r,d,f);a.push(o("rect",{key:`${t}-${n}`,x:String(n*i),y:String(t*l),width:String(Math.ceil(i)),height:String(Math.ceil(l)),fill:`rgb(${s},${c},${p})`}))}}return o("svg",{width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Complex plane visualization",style:{cursor:"crosshair",borderRadius:"6px",maxWidth:"100%"}},...a)}const[b,v]=l(r[0]),[S,k]=l(r[1]),[w,$]=l(i[0]),[M,C]=l(i[1]),z=c(null),I=c(!1),A=c(null),F=s((e,o)=>({re:b+e/t*(S-b),im:M-o/n*(M-w)}),[b,S,w,M,t,n]);a(()=>{const e=z.current;if(!e)return;const o=e.getContext("2d");if(!o)return;const r=o.createImageData(t,n),i=r.data;for(let e=0;e<n;e++)for(let n=0;n<t;n++){const{re:o,im:r}=F(n,e),l=p(o,r,d),[a,s,c]=ht(l,d,f),u=4*(e*t+n);i[u]=a,i[u+1]=s,i[u+2]=c,i[u+3]=255}o.putImageData(r,0,0)},[b,S,w,M,t,n,d,f,p,F]);const R=s(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,{re:r,im:i}=F(n,o);return{re:r,im:i,iterations:p(r,i,d),event:e}},[F,p,d]),D=s(e=>{I.current=!0,A.current={x:e.clientX,y:e.clientY,rMin:b,rMax:S,iMin:w,iMax:M}},[b,S,w,M]),L=s(e=>{if(x&&x(R(e)),!I.current||!A.current)return;const o=A.current,r=e.clientX-o.x,i=e.clientY-o.y,l=(o.rMax-o.rMin)/t,a=(o.iMax-o.iMin)/n;v(o.rMin-r*l),k(o.rMax-r*l),$(o.iMin+i*a),C(o.iMax+i*a)},[t,n,x,R]),N=s(()=>{I.current=!1},[]),T=s(e=>{e.preventDefault();const t=e.deltaY>0?1.15:1/1.15,n=e.target.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,{re:i,im:l}=F(o,r);v(i+(b-i)*t),k(i+(S-i)*t),$(l+(w-l)*t),C(l+(M-l)*t)},[F,b,S,w,M]),W=s(e=>{g&&g(R(e))},[g,R]),B=s(e=>{y&&y(R(e))},[y,R]),E=s(e=>{e.preventDefault(),m&&m(R(e))},[m,R]);return o("canvas",{ref:z,width:t,height:n,style:{cursor:"crosshair"},onMouseDown:D,onMouseMove:L,onMouseUp:N,onMouseLeave:N,onWheel:T,onClick:W,onDblClick:B,onContextMenu:E})},exports.ContextMenu=function(e){const{items:t,children:n}=e,[r,i]=l(null),d=s(e=>{e.preventDefault();const t=e;i({x:t.clientX,y:t.clientY})},[]),c=s(()=>{i(null)},[]);a(()=>{if(!r)return;const e=e=>{c()},t=setTimeout(()=>{document.addEventListener("mousedown",e)},0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[r,c]),a(()=>{if(!r)return;const e=e=>{"Escape"===e.key&&c()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r,c]);const f=[o("div",{onContextMenu:d,style:{display:"contents"}},n)];return r&&f.push(o(qe,{items:t,position:r,onClose:c,depth:0})),o("div",null,...f)},exports.DataGrid=function(e){const{columns:t,data:n,pageSize:r,currentPage:i,onPageChange:a,sortBy:c,sortDir:f,onSort:p,selectable:u=!1,selectedRows:h,onSelectionChange:g,striped:x=!1,bordered:y=!1,compact:m=!1,stickyHeader:b=!1}=e,[v,S]=l(0),[k,w]=l(void 0),[T,W]=l("asc"),[B,E]=l([]),[P,H]=l({}),j=i??v,_=c??k,Y=f??T,q=h??B,O=d(()=>{const e=Object.entries(P).filter(([,e])=>e.length>0);return 0===e.length?n:n.filter(t=>e.every(([e,n])=>String(t[e]??"").toLowerCase().includes(n.toLowerCase())))},[n,P]),U=d(()=>{if(!_)return O;const e=[...O];return e.sort((e,t)=>{const n=e[_],o=t[_];if(null==n&&null==o)return 0;if(null==n)return 1;if(null==o)return-1;if("number"==typeof n&&"number"==typeof o)return"asc"===Y?n-o:o-n;const r=String(n),i=String(o),l=r.localeCompare(i);return"asc"===Y?l:-l}),e},[O,_,Y]),G=U.length,V=r?Math.max(1,Math.ceil(G/r)):1,X=r?U.slice(j*r,(j+1)*r):U,K=s(e=>{a?a(e):S(e)},[a]),Z=s(e=>{const t=_===e&&"asc"===Y?"desc":"asc";p?p(e,t):(w(e),W(t))},[_,Y,p]),J=s(e=>{const t=q.includes(e)?q.filter(t=>t!==e):[...q,e];g?g(t):E(t)},[q,g]),Q=s(()=>{const e=X.map((e,t)=>r?j*r+t:t),t=e.every(e=>q.includes(e))?q.filter(t=>!e.includes(t)):[...new Set([...q,...e])];g?g(t):E(t)},[X,q,r,j,g]),ee=s((e,t)=>{H(n=>({...n,[e]:t})),K(0)},[K]),te=t.some(e=>e.filterable),ne=m?"6px 8px":C.padding,oe=[];if(u){const e=X.map((e,t)=>r?j*r+t:t),t=e.length>0&&e.every(e=>q.includes(e));oe.push(o("th",{key:"__select_all",style:{...M,padding:ne,width:"40px",textAlign:"center",...b?{position:"sticky",top:"0",zIndex:"2"}:{}}},o("input",{type:"checkbox",checked:t,onChange:Q,style:L,"aria-label":"Select all rows"})))}for(const e of t){const t={...M,padding:ne,...e.width?{width:e.width}:{},...e.sortable?{cursor:"pointer"}:{},...y?{border:"1px solid #e5e7eb"}:{},...b?{position:"sticky",top:"0",zIndex:"2"}:{}},n=[e.header];e.sortable&&n.push(o("span",{style:z},N(e.key,_,Y))),oe.push(o("th",{key:e.key,style:t,onClick:e.sortable?()=>Z(e.key):void 0,onKeyDown:e.sortable?t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),Z(e.key))}:void 0,tabIndex:e.sortable?0:void 0,role:e.sortable?"columnheader":void 0,"aria-sort":_===e.key?"asc"===Y?"ascending":"descending":void 0},...n))}let re=null;if(te){const e=[];u&&e.push(o("th",{key:"__filter_spacer",style:{padding:ne}}));for(const n of t)e.push(o("th",{key:`filter_${n.key}`,style:{padding:"4px 8px",backgroundColor:"#f9fafb"}},n.filterable?o("input",{type:"text",placeholder:`Filter ${n.header}...`,style:I,value:P[n.key]??"",onInput:e=>ee(n.key,e.target.value),"aria-label":`Filter by ${n.header}`}):null));re=o("tr",{key:"__filter_row"},...e)}const ie=[];for(let e=0;e<X.length;e++){const n=X[e],i=r?j*r+e:e,l=q.includes(i),a={};x&&e%2==1&&(a.backgroundColor="#f9fafb"),l&&(a.backgroundColor="#eff6ff");const s=[];u&&s.push(o("td",{key:"__select",style:{padding:ne,textAlign:"center",...C,...y?{border:"1px solid #e5e7eb"}:{}}},o("input",{type:"checkbox",checked:l,onChange:()=>J(i),style:L,"aria-label":`Select row ${i+1}`})));for(const e of t){const t=n[e.key],r=e.render?e.render(t,n):String(t??"");s.push(o("td",{key:e.key,style:{...C,padding:ne,...y?{border:"1px solid #e5e7eb"}:{}}},r))}ie.push(o("tr",{key:String(i),style:a},...s))}let le=null;if(r){const e=0===G?0:j*r+1,t=Math.min((j+1)*r,G),n=[];n.push(o("button",{key:"prev",style:0===j?D:F,onClick:j>0?()=>K(j-1):void 0,disabled:0===j,"aria-label":"Previous page"},"← Prev"));const i=7;let l=Math.max(0,j-Math.floor(i/2));const a=Math.min(V,l+i);a-l<i&&(l=Math.max(0,a-i)),l>0&&(n.push(o("button",{key:"p0",style:F,onClick:()=>K(0)},"1")),l>1&&n.push(o("span",{key:"e1",style:{margin:"0 4px"}},"...")));for(let e=l;e<a;e++)n.push(o("button",{key:`p${e}`,style:e===j?R:F,onClick:e!==j?()=>K(e):void 0,"aria-current":e===j?"page":void 0},String(e+1)));a<V&&(a<V-1&&n.push(o("span",{key:"e2",style:{margin:"0 4px"}},"...")),n.push(o("button",{key:"p"+(V-1),style:F,onClick:()=>K(V-1)},String(V)))),n.push(o("button",{key:"next",style:j>=V-1?D:F,onClick:j<V-1?()=>K(j+1):void 0,disabled:j>=V-1,"aria-label":"Next page"},"Next →")),le=o("div",{style:A},o("span",null,`Showing ${e}–${t} of ${G}`),o("div",{style:{display:"flex",alignItems:"center",gap:"2px"}},...n))}const ae={width:"100%",...b?{overflow:"auto",maxHeight:"600px"}:{}},se={...$,...y?{border:"1px solid #e5e7eb"}:{}},de=o("thead",null,o("tr",null,...oe),re),ce=o("tbody",null,...ie),fe=o("table",{style:se,role:"grid","aria-rowcount":String(G)},de,ce);return o("div",{style:ae},fe,le)},exports.DatePicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,format:p="YYYY-MM-DD",minDate:u,maxDate:h,disabled:g=!1,placeholder:x="Select date...",label:y,error:m}=e,b=d(()=>de(r),[r]),v=d(()=>de(u),[u]),S=d(()=>de(h),[h]),[k,w]=l(!1),[$,M]=l(()=>b?b.getFullYear():(new Date).getFullYear()),[C,z]=l(()=>b?b.getMonth():(new Date).getMonth()),I=c(null),A=d(()=>new Date,[]);a(()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const F=s(()=>{z(e=>0===e?(M(e=>e-1),11):e-1)},[]),R=s(()=>{z(e=>11===e?(M(e=>e+1),0):e+1)},[]),D=s(e=>{const t=new Date($,C,e);v&&t<v||S&&t>S||(i(function(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}(t)),w(!1))},[$,C,i,v,S]),L=b?function(e,t){const n=e.getFullYear(),o=e.getMonth()+1,r=e.getDate();return t.replace("YYYY",String(n)).replace("MM",String(o).padStart(2,"0")).replace("DD",String(r).padStart(2,"0"))}(b,p):"",N=d(()=>{const e=new Date($,C,1).getDay(),t=new Date($,C+1,0).getDate(),n=[];let o=[];for(let t=0;t<e;t++)o.push(null);for(let e=1;e<=t;e++)o.push(e),7===o.length&&(n.push(o),o=[]);for(;o.length>0&&o.length<7;)o.push(null);return o.length&&n.push(o),n},[$,C]),T={...ne({},{focused:k,error:!!m}),cursor:g?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",minHeight:"38px",userSelect:"none"},W={background:"none",border:"none",cursor:"pointer",fontSize:"16px",padding:"4px 8px",color:"#374151",borderRadius:"4px"},B=se.map(e=>o("div",{key:e,style:{padding:"4px"}},e)),E=N.map((e,t)=>{const n=e.map((e,n)=>{if(null===e)return o("div",{key:`empty-${t}-${n}`,style:{padding:"4px"}});const r=new Date($,C,e),i=ce(r,A),l=!!b&&ce(r,b),a=v&&r<v||S&&r>S;return o("div",{key:`day-${e}`,style:{padding:"4px",textAlign:"center",cursor:a?"not-allowed":"pointer",borderRadius:"4px",fontSize:"13px",fontWeight:i?"700":"400",backgroundColor:l?"#3b82f6":"transparent",color:l?"#ffffff":a?"#d1d5db":i?"#3b82f6":"#1f2937",border:i&&!l?"1px solid #3b82f6":"1px solid transparent",lineHeight:"1.8"},onClick:a?void 0:()=>D(e),onKeyDown:a?void 0:t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),D(e))},role:a?void 0:"button",tabIndex:a?void 0:0,"aria-label":`${ae[C]} ${e}, ${$}`,"aria-disabled":a?"true":void 0},String(e))});return o("div",{key:`row-${t}`,style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)"}},...n)}),P=k?o("div",{style:{position:"absolute",top:"100%",left:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",padding:"12px",width:"280px"}},o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"}},o("button",{type:"button",style:W,onClick:F},"◀"),o("span",{style:{fontWeight:"600",fontSize:"14px",color:"#1f2937"}},`${ae[C]} ${$}`),o("button",{type:"button",style:W,onClick:R},"▶")),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",textAlign:"center",fontSize:"11px",fontWeight:"600",color:"#6b7280",marginBottom:"4px"}},...B),...E):null;return o(te,{label:y,error:m,disabled:g,htmlFor:n},o("div",{ref:I,style:{position:"relative"}},o("div",{id:n,style:T,onClick:g?void 0:()=>w(!k),onKeyDown:g?void 0:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),w(!k))},tabIndex:g?-1:0,role:"button","aria-label":"Pick a date","aria-expanded":k?"true":"false"},o("span",{style:{color:L?"#1f2937":"#9ca3af"}},L||x),o("span",{style:{color:"#6b7280",fontSize:"14px"}},"📅")),P))},exports.DecompositionTree=function(e){const{data:t,width:n=800,height:r=500,orientation:i="horizontal",nodeWidth:l=120,nodeHeight:a=40,showValues:c=!0,showConnectors:f=!0,connectorColor:p="#94a3b8",colors:u=qn,title:h,padding:g=40}=e;if(!t)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty decomposition tree"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const x="horizontal"===i,y=d(()=>function(e,t,n,o,r,i,l,a){const{flatNodes:s,maxDepth:d}=function(e){const t=[];let n=0;const o=[];o.push([e,0,null]);let r=0;for(;o.length>0;){const[e,i,l]=o.shift(),a=n++;r=Math.max(r,i);const s=e.children??[],d=[];for(let e=0;e<s.length;e++)d.push(n+o.length+e);t.push({id:a,node:e,depth:i,parentId:l,childIndices:d});for(let e=0;e<s.length;e++)o.push([s[e],i+1,a])}return{flatNodes:t,maxDepth:r}}(e);if(0===s.length)return[];const c=function(e){const t=e.length,n=new Array(t).fill(0);for(let o=t-1;o>=0;o--){const r=e[o];if(0===r.childIndices.length)n[o]=1;else{let e=0;for(const o of r.childIndices)o<t&&(e+=n[o]);n[o]=Math.max(e,1)}}return n}(s),f=t-2*i,p=n-2*i,u="horizontal"===l,h=d+1,g=u?h>1?(f-o)/d:0:h>1?(p-r)/d:0,x=new Array(s.length),y=c[0],m=u?p:f,b=y>0?m/y:m,v=new Array(s.length);v[0]=[0,y];const S=[0];let k=0;for(;k<S.length;){const e=S[k];k++;const t=s[e],[n,o]=v[e],r=(n+o)/2,l=i+t.depth*g,d=i+(r-.5)*b,f=u?l:d,p=u?d:l,h=t.node.color??a[t.depth%a.length];x[e]={id:t.id,label:t.node.label,value:void 0!==t.node.value?String(t.node.value):"",color:h,depth:t.depth,x:f,y:p,parentId:t.parentId,childCount:t.childIndices.length,subtreeLeafCount:c[e]};let y=n;for(const e of t.childIndices)if(e<s.length){const t=y+c[e];v[e]=[y,t],y=t,S.push(e)}}return x}(t,n,r,l,a,g,i,u),[t,n,r,l,a,g,i,u]),m=d(()=>{const e=new Map;for(let t=0;t<y.length;t++){const n=y[t];e.set(n.id,n)}return e},[y]),b=s(()=>{if(!f)return[];const e=[];for(let t=0;t<y.length;t++){const n=y[t];if(null===n.parentId)continue;const r=m.get(n.parentId);if(!r)continue;let i,s,d,c;x?(i=r.x+l,s=r.y+a/2,d=n.x,c=n.y+a/2):(i=r.x+l/2,s=r.y+a,d=n.x+l/2,c=n.y);const f=(i+d)/2,u=(s+c)/2;let h;h=x?`M ${i} ${s} C ${f} ${s}, ${f} ${c}, ${d} ${c}`:`M ${i} ${s} C ${i} ${u}, ${d} ${u}, ${d} ${c}`,e.push(o("path",{key:`conn-${t}`,d:h,fill:"none",stroke:p,"stroke-width":"1.5","stroke-opacity":"0.7"}))}return e},[y,m,x,l,a,f,p]),v=s(()=>{const e=[];for(let t=0;t<y.length;t++){const n=y[t];e.push(o("rect",{key:`node-rect-${n.id}`,x:String(n.x),y:String(n.y),width:String(l),height:String(a),rx:"4",ry:"4",fill:n.color,stroke:"#374151","stroke-width":"1",role:"img","aria-label":n.value?`${n.label}: ${n.value}`:n.label}));const r=c&&n.value?n.y+a/2-2:n.y+a/2+4;e.push(o("text",{key:`node-label-${n.id}`,x:String(n.x+l/2),y:String(r),"text-anchor":"middle","font-size":"11","font-weight":"bold","font-family":"sans-serif",fill:"#fff","pointer-events":"none"},n.label)),c&&n.value&&e.push(o("text",{key:`node-value-${n.id}`,x:String(n.x+l/2),y:String(n.y+a/2+12),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.85)","pointer-events":"none"},n.value))}return e},[y,l,a,c]),S=s(()=>h?[o("text",{key:"title",x:String(n/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n]),k=b(),w=v(),$=S();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Decomposition tree",style:{fontFamily:"sans-serif"}},...$,...k,...w)},exports.DigitalClock=function(e){const{format:t="12h",showDate:n=!1,dateFormat:r="short",showSeconds:i=!0,timezone:s,className:d}=e,[c,f]=l(new Date);a(()=>{const e=setInterval(()=>{f(new Date)},1e3);return()=>clearInterval(e)},[]);const{hours:p,minutes:u,seconds:h}=function(e,t){if(t){const n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(e),o=e=>Number(n.find(t=>t.type===e)?.value??0);return{hours:o("hour"),minutes:o("minute"),seconds:o("second")}}return{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}}(c,s);let g,x=null;"12h"===t?(x=p>=12?"PM":"AM",g=p%12||12):g=p;let y=`${T(g)}:${T(u)}`;i&&(y+=`:${T(h)}`);const m=[y];null!=x&&m.push(o("span",{style:E},x));const b=[o("span",{style:B},...m)];return n&&b.push(o("span",{style:P},function(e,t,n){if(n){const o={timeZone:n};if("short"===t)return Object.assign(o,{month:"2-digit",day:"2-digit",year:"numeric"}),new Intl.DateTimeFormat("en-US",o).format(e);if("long"===t)return Object.assign(o,{month:"long",day:"numeric",year:"numeric"}),new Intl.DateTimeFormat("en-US",o).format(e);Object.assign(o,{year:"numeric",month:"2-digit",day:"2-digit"});const r=new Intl.DateTimeFormat("en-CA",o).formatToParts(e),i=e=>r.find(t=>t.type===e)?.value??"";return`${i("year")}-${i("month")}-${i("day")}`}return"short"===t?`${T(e.getMonth()+1)}/${T(e.getDate())}/${e.getFullYear()}`:"long"===t?new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(e):`${e.getFullYear()}-${T(e.getMonth()+1)}-${T(e.getDate())}`}(c,r,s))),o("div",{style:W,...d?{class:d}:{}},...b)},exports.DiscreteCartesian2D=function(e){const{data:t=[],colorMap:n,width:r=600,height:i=600,cellGap:l=1,cellRadius:a=0,showGrid:c=!1,gridColor:f="#334155",showIndices:p=!1,backgroundColor:u="#0f172a",padding:h=10,onCellClick:g,onCellHover:x,title:y}=e,m=n??Po,b=t.length,v=d(()=>{let e=0;for(let n=0;n<t.length;n++){const o=t[n];void 0!==o&&o.length>e&&(e=o.length)}return e},[t]),S=p?20:0,k=y?24:0,w=d(()=>{const e=r-2*h-S,t=i-2*h-S-k;return 0===b||0===v?{cellWidth:0,cellHeight:0}:{cellWidth:Math.max(0,(e-l*(v-1))/v),cellHeight:Math.max(0,(t-l*(b-1))/b)}},[r,i,h,b,v,l,S,k]),$=s(e=>{const t=m[e];return void 0!==t?t:"#666"},[m]),M=s(()=>o("rect",{key:"bg",x:"0",y:"0",width:String(r),height:String(i),fill:u}),[r,i,u]),C=s(()=>y?[o("text",{key:"title",x:String(r/2),y:String(h+14),"text-anchor":"middle","font-size":"14","font-weight":"bold","font-family":"sans-serif",fill:"#e2e8f0"},y)]:[],[y,r,h]),z=s(()=>{if(!c||0===b||0===v)return[];const{cellWidth:e,cellHeight:t}=w,n=h+S,r=h+S+k,i=v*e+(v-1)*l,a=b*t+(b-1)*l,s=[];for(let t=0;t<=v;t++){const i=n+t*(e+l)-l/2;s.push(o("line",{key:`vgrid-${t}`,x1:String(i),y1:String(r-l/2),x2:String(i),y2:String(r+a+l/2),stroke:f,"stroke-width":"0.5"}))}for(let e=0;e<=b;e++){const a=r+e*(t+l)-l/2;s.push(o("line",{key:`hgrid-${e}`,x1:String(n-l/2),y1:String(a),x2:String(n+i+l/2),y2:String(a),stroke:f,"stroke-width":"0.5"}))}return s},[c,b,v,w,h,S,k,l,f]),I=s(()=>{if(!p||0===b||0===v)return[];const{cellWidth:e,cellHeight:t}=w,n=h+S,r=h+S+k,i=[];for(let t=0;t<v;t++){const a=n+t*(e+l)+e/2,s=r-6;i.push(o("text",{key:`col-idx-${t}`,x:String(a),y:String(s),"text-anchor":"middle","font-size":"10","font-family":"monospace",fill:"#94a3b8"},String(t)))}for(let e=0;e<b;e++){const a=n-6,s=r+e*(t+l)+t/2+3;i.push(o("text",{key:`row-idx-${e}`,x:String(a),y:String(s),"text-anchor":"end","font-size":"10","font-family":"monospace",fill:"#94a3b8"},String(e)))}return i},[p,b,v,w,h,S,k,l]),A=s(()=>{if(0===b||0===v)return[];const{cellWidth:e,cellHeight:n}=w,r=h+S,i=h+S+k,s=[];for(let d=0;d<b;d++){const c=t[d];if(void 0!==c)for(let t=0;t<v;t++){const f=t<c.length?c[t]:0,p=r+t*(e+l),u=i+d*(n+l),h=$(f),y={key:`cell-${d}-${t}`,x:String(p),y:String(u),width:String(e),height:String(n),fill:h,rx:String(a),ry:String(a)};if(g){const e=d,n=t,o=f;y.onClick=()=>g(e,n,o),y.role="button",y.tabIndex=0}if(x){const e=d,n=t,o=f;y.onMouseEnter=()=>x(e,n,o)}s.push(o("rect",y))}}return s},[b,v,t,w,h,S,k,l,a,$,g,x]),F=M(),R=C(),D=z(),L=I(),N=A();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":y?`${y} — ${b}x${v} discrete grid`:`${b}x${v} discrete grid`},F,...R,...D,...L,...N)},exports.Drawer=function(e){const{open:t,onClose:n,position:r="right",size:i="320px",title:s,overlay:d=!0,closeOnOverlay:f=!0,closeOnEscape:p=!0,children:u}=e,[h,g]=l(!1),[x,y]=l(!1),m=c(null),b=s?"drawer-title":void 0;if(a(()=>{if(!t){y(!1);const e=setTimeout(()=>g(!1),300);return()=>clearTimeout(e)}g(!0),requestAnimationFrame(()=>y(!0))},[t]),a(()=>{if(!t||!p)return;const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,p,n]),a(()=>{if(!t)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),a(()=>{t&&m.current&&m.current.focus()},[t]),!h)return null;const v={position:"fixed",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:"10000",opacity:x?"1":"0",transition:"opacity 0.3s ease"},S={...Ue(r,i),transform:Oe(r,x),transition:"transform 0.3s ease"},k=[];s&&k.push(o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e7eb",flexShrink:"0"}},o("h3",{id:b,style:{margin:"0",fontSize:"16px",fontWeight:"600",color:"#111827"}},s),o("button",{type:"button",style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#6b7280",padding:"4px 8px",lineHeight:"1"},onClick:n,"aria-label":"Close drawer"},"×"))),k.push(o("div",{style:{padding:"20px",overflow:"auto",flex:"1"}},u));const w=[];return d&&w.push(o("div",{style:v,onClick:()=>{f&&n()}})),w.push(o("div",{ref:m,style:S,role:"dialog","aria-modal":"true","aria-labelledby":b,tabIndex:-1},...k)),o("div",null,...w)},exports.Dropdown=function(e){const{label:t,items:n,triggerStyle:r,menuStyle:i,itemStyle:d={},placement:f="bottom-start",closeOnSelect:p=!0,width:u="220px"}=e,[h,g]=l(!1),x=c(null),y=s(()=>{g(e=>!e)},[]),m=s(()=>{g(!1)},[]);a(()=>{if(!h)return;const e=e=>{const t=x.current;t&&!t.contains(e.target)&&g(!1)};return document.addEventListener("click",e,!0),()=>{document.removeEventListener("click",e,!0)}},[h]),a(()=>{if(!h)return;const e=e=>{"Escape"===e.key&&g(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[h]);const b=o("button",{type:"button",style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"8px 16px",fontSize:"14px",fontFamily:"inherit",border:"1px solid #d1d5db",borderRadius:"6px",backgroundColor:"#ffffff",color:"#1f2937",cursor:"pointer",outline:"none",...r??{}},onClick:y,"aria-haspopup":"true","aria-expanded":String(h)},o("span",null,t),o("span",{style:{marginLeft:"4px",fontSize:"10px",transition:"transform 0.15s",transform:h?"rotate(180deg)":"rotate(0deg)"},"aria-hidden":"true"},"▼")),v={position:"absolute",top:"100%",..."bottom-end"===f?{right:"0"}:{left:"0"},marginTop:"4px",zIndex:"999"},S={boxShadow:"0 4px 12px rgba(0,0,0,0.15)",border:"1px solid #e5e7eb",borderRadius:"6px",padding:"4px 0",width:"number"==typeof u?`${u}px`:u,backgroundColor:"#ffffff",...i??{}},k=h?o("div",{style:v},o(ke,{orientation:"vertical",role:"menu",ariaLabel:`${t} menu`,styling:S},...n.map(e=>o(Ie,{key:e.id,item:e,itemStyle:d,closeOnSelect:p,onClose:m})))):null;return o("div",{ref:x,style:{position:"relative",display:"inline-block"}},b,k)},exports.EmptyState=function(e){return o("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"48px 24px",gap:"16px"}},e.image?o("img",{src:e.image,alt:"",style:{maxWidth:"200px",maxHeight:"160px",objectFit:"contain"}}):null,e.icon?o("div",{style:{fontSize:"48px",lineHeight:"1"}},e.icon):null,e.title?o("h3",{style:{margin:"0",fontSize:"20px",fontWeight:"600",color:"#111827",lineHeight:"1.4"}},e.title):null,e.description?o("p",{style:{margin:"0",fontSize:"14px",color:"#6b7280",maxWidth:"360px",lineHeight:"1.6"}},e.description):null,e.action?o("button",{onclick:e.action.onClick,style:{marginTop:"8px",padding:"10px 24px",fontSize:"14px",fontWeight:"500",color:"#ffffff",backgroundColor:"#3b82f6",border:"none",borderRadius:"6px",cursor:"pointer"}},e.action.label):null)},exports.FileUpload=function(e){const t=f().replace(/[^a-zA-Z0-9_-]/g,""),n=e.id??`fu-${t}`,{onChange:r,accept:i,multiple:a=!1,maxSize:d,disabled:p=!1,label:u,helpText:h}=e,[g,x]=l([]),[y,m]=l(!1),[b,v]=l(""),S=c(null),k=s(e=>{v("");const t=[];for(const n of e)d&&n.size>d?v(`File "${n.name}" exceeds maximum size of ${fe(d)}`):t.push(n);const n=a?[...g,...t]:t.slice(0,1);x(n),r(n)},[g,a,d,r]),w=s(e=>{if(e.preventDefault(),e.stopPropagation(),m(!1),p)return;const t=e.dataTransfer;if(!t)return;const n=Array.from(t.files);k(n)},[p,k]),$=s(e=>{e.preventDefault(),e.stopPropagation(),p||m(!0)},[p]),M=s(e=>{e.preventDefault(),e.stopPropagation(),m(!1)},[]),C=s(e=>{const t=e.target;t.files&&(k(Array.from(t.files)),t.value="")},[k]),z=s(e=>{const t=g.filter((t,n)=>n!==e);x(t),r(t)},[g,r]),I=s(()=>{p||S.current&&S.current.click()},[p]),A={border:"2px dashed "+(y?"#3b82f6":b?"#ef4444":"#d1d5db"),borderRadius:"8px",padding:"24px",textAlign:"center",cursor:p?"not-allowed":"pointer",backgroundColor:y?"#eff6ff":"#fafafa",transition:"all 0.15s",opacity:p?"0.6":"1"},F={fontSize:"12px",color:"#9ca3af"},R=o("input",{id:n,ref:S,type:"file",accept:i,multiple:a,onChange:C,disabled:p,style:{display:"none"},tabIndex:-1}),D=o("div",{style:A,onClick:I,onKeyDown:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),I())},onDrop:w,onDragOver:$,onDragLeave:M,role:"button",tabIndex:p?-1:0,"aria-label":"Upload files"},o("div",{style:{fontSize:"28px",color:"#9ca3af",marginBottom:"8px"}},"↑"),o("div",{style:{fontSize:"14px",color:"#374151",marginBottom:"4px"}},o("span",{style:{color:"#3b82f6",fontWeight:"500"}},"Click to upload")," or drag and drop"),i?o("div",{style:F},i):null,d?o("div",{style:F},`Max size: ${fe(d)}`):null),L=g.length>0?o("div",{style:{marginTop:"8px",display:"flex",flexDirection:"column",gap:"4px"}},...g.map((e,t)=>o("div",{key:`file-${t}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",backgroundColor:"#f9fafb",borderRadius:"6px",border:"1px solid #e5e7eb",fontSize:"13px"}},o("div",{style:{display:"flex",alignItems:"center",gap:"8px",overflow:"hidden"}},o("span",{style:{color:"#374151",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.name),o("span",{style:{color:"#9ca3af",fontSize:"11px",flexShrink:"0"}},fe(e.size))),o("button",{type:"button",style:{background:"none",border:"none",cursor:"pointer",color:"#ef4444",fontSize:"14px",padding:"2px 6px",borderRadius:"4px"},onClick:e=>{e.stopPropagation(),z(t)},"aria-label":`Remove ${e.name}`},"✕")))):null;return o(te,{label:u,helpText:h,error:b||void 0,disabled:p,htmlFor:n},o("div",null,R,D,L))},exports.FlexContainer=function(e){const t=d(()=>{const t={display:e.inline?"inline-flex":"flex"};return e.direction&&(t.flexDirection=e.direction),e.wrap&&(t.flexWrap=e.wrap),e.gap&&(t.gap=e.gap),e.alignItems&&(t.alignItems=e.alignItems),e.justifyContent&&(t.justifyContent=e.justifyContent),{...t,...e.style??{}}},[e.direction,e.wrap,e.gap,e.alignItems,e.justifyContent,e.inline,e.style]);return o("div",{className:`flex-container ${e.className??""}`.trim(),style:t},e.children)},exports.FlexItem=function(e){const t=d(()=>{const t={};return e.flex&&(t.flex=e.flex),void 0!==e.grow&&(t.flexGrow=String(e.grow)),void 0!==e.shrink&&(t.flexShrink=String(e.shrink)),e.basis&&(t.flexBasis=e.basis),e.alignSelf&&(t.alignSelf=e.alignSelf),void 0!==e.order&&(t.order=String(e.order)),{...t,...e.style??{}}},[e.flex,e.grow,e.shrink,e.basis,e.alignSelf,e.order,e.style]);return o("div",{className:`flex-item ${e.className??""}`.trim(),style:t},e.children)},exports.Footer=function(e){const{left:t,center:n,right:r,borderTop:i="1px solid var(--color-border, #e2e8f0)",background:l="var(--color-bg, transparent)",color:a="var(--color-text-muted, #64748b)",fontSize:s="13px",padding:d="24px",maxWidth:c="1200px",className:f,ariaLabel:p="Site footer"}=e;return o("footer",{className:f,role:"contentinfo","aria-label":p,style:{borderTop:i,background:l,color:a,fontSize:s,padding:d,marginTop:"48px"}},o("div",{style:{maxWidth:c,margin:"0 auto",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"12px"}},o("div",{style:{flex:"1",textAlign:"left",minWidth:"150px"}},t??null),o("div",{style:{flex:"1",textAlign:"center",minWidth:"150px"}},n??null),o("div",{style:{flex:"1",textAlign:"right",minWidth:"150px"}},r??null)))},exports.ForceGraph=function(e){const{nodes:t,edges:n,width:r=600,height:i=400,nodeRadius:f=12,nodeStrokeWidth:p=2,solidNodes:u=!0,showLabels:h=!0,showArrows:g=!1,repulsionForce:x=300,attractionForce:y=.01,damping:m=.9,edgeLength:b=100,edgeColor:v="#94a3b8",edgeWidth:S=1.5,title:k,customForce:w,trails:$}=e;if(!t||0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":k??"Empty force-directed graph"},k?o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},k):o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const M=c(Gn(t,r,i)),[C,z]=l(0),I=c(!0),A=c(!1),F=c(n);F.current=n;const R=c(w);R.current=w;const D=c(null),L=c({repulsionForce:x,attractionForce:y,damping:m,edgeLength:b,width:r,height:i,nodeRadius:f,solidNodes:u});L.current={repulsionForce:x,attractionForce:y,damping:m,edgeLength:b,width:r,height:i,nodeRadius:f,solidNodes:u};const N=c(new Map);a(()=>{M.current=Gn(t,r,i),A.current=!1,I.current=!0,N.current=new Map,z(e=>e+1)},[t.length]),a(()=>{let e=0;const t=()=>{if(!I.current)return;const n=L.current,o=R.current;let r;if(o?(r=o(M.current,F.current,n.width,n.height,D.current),n.solidNodes&&Vn(r,n.nodeRadius)):r=function(e,t,n,o,r,i,l,a,s=12){const d=e.length;if(0===d)return e;const c=new Map;for(let t=0;t<d;t++)c.set(e[t].id,t);const f=new Float64Array(d),p=new Float64Array(d);for(let t=0;t<d;t++){const n=e[t];for(let o=t+1;o<d;o++){const i=e[o];let l=n.x-i.x,a=n.y-i.y,s=l*l+a*a;s<1&&(s=1);const d=Math.sqrt(s),c=r/s,u=l/d*c,h=a/d*c;f[t]+=u,p[t]+=h,f[o]-=u,p[o]-=h}}for(let n=0;n<t.length;n++){const o=t[n],r=c.get(o.source),l=c.get(o.target);if(void 0===r||void 0===l)continue;const s=e[r],d=e[l],u=d.x-s.x,h=d.y-s.y,g=Math.sqrt(u*u+h*h);if(g<.1)continue;const x=i*(g-a)*(o.weight??1),y=u/g*x,m=h/g*x;f[r]+=y,p[r]+=m,f[l]-=y,p[l]-=m}const u=n/2,h=o/2;for(let t=0;t<d;t++){const n=e[t];f[t]+=.001*(u-n.x),p[t]+=.001*(h-n.y)}const g=[];for(let t=0;t<d;t++){const r=e[t];if(r.fixed){g.push({...r,vx:0,vy:0});continue}let i=(r.vx+f[t])*l,a=(r.vy+p[t])*l;const s=Math.sqrt(i*i+a*a),d=10;s>d&&(i=i/s*d,a=a/s*d);let c=r.x+i,u=r.y+a;c=Math.max(20,Math.min(n-20,c)),u=Math.max(20,Math.min(o-20,u)),g.push({...r,x:c,y:u,vx:i,vy:a})}return Vn(g,s),g}(M.current,F.current,n.width,n.height,n.repulsionForce,n.attractionForce,n.damping,n.edgeLength,n.nodeRadius),M.current=r,$)for(let e=0;e<$.length;e++){const t=$[e],n=r.find(e=>e.id===t.nodeId);if(!n)continue;let o=N.current.get(t.nodeId);o||(o=[],N.current.set(t.nodeId,o)),o.push({x:n.x,y:n.y});const i=t.maxPoints??200;o.length>i&&o.splice(0,o.length-i)}if(!o&&function(e){let t=0;for(let n=0;n<e.length;n++){const o=e[n];t+=o.vx*o.vx+o.vy*o.vy}return t}(r)<.01)return A.current=!0,void z(e=>e+1);z(e=>e+1),e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>{I.current=!1,cancelAnimationFrame(e)}},[]);const T=M.current,W=s(e=>{M.current=M.current.map(t=>t.id===e?{...t,fixed:!t.fixed,vx:0,vy:0}:t),A.current&&(A.current=!1,I.current=!0,z(e=>e+1))},[]),B=c(null),E=c(null),P=s(e=>{const t=e,n=E.current;if(!n)return{x:t.clientX,y:t.clientY};const o=n.getBoundingClientRect(),l=r/o.width,a=i/o.height;return{x:(t.clientX-o.left)*l,y:(t.clientY-o.top)*a}},[r,i]),H=c(!1),j=s((e,t)=>{t.stopPropagation(),B.current=e;const n=M.current.find(t=>t.id===e);H.current=n?.fixed??!1,M.current=M.current.map(t=>t.id===e?{...t,fixed:!0,vx:0,vy:0}:t)},[]),_=s(e=>{const t=P(e);if(D.current={x:t.x,y:t.y},!B.current)return;const n=B.current;M.current=M.current.map(e=>e.id===n?{...e,x:Math.max(20,Math.min(r-20,t.x)),y:Math.max(20,Math.min(i-20,t.y))}:e),A.current&&(A.current=!1,I.current=!0),z(e=>e+1)},[r,i,P]),Y=s(()=>{const e=B.current;e&&(M.current=M.current.map(t=>t.id===e?{...t,fixed:H.current}:t)),B.current=null},[]),q=s(()=>{B.current=null,D.current=null},[]),O=d(()=>{const e=new Map;for(let t=0;t<T.length;t++)e.set(T[t].id,T[t]);return e},[C]),U=s(()=>g?[o("defs",{key:"arrow-defs"},o("marker",{key:"arrowhead",id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:String(10+f),refY:"3.5",orient:"auto",markerUnits:"userSpaceOnUse"},o("polygon",{key:"arrow-poly",points:"0 0, 10 3.5, 0 7",fill:v})))]:[],[g,f,v]),G=s(()=>{const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=O.get(r.source),l=O.get(r.target);if(!i||!l)continue;if(void 0!==r.weight&&r.weight<=0)continue;const a=r.weight?Math.max(.5,Math.min(6,S*r.weight)):S,s={key:`edge-${t}`,x1:String(i.x),y1:String(i.y),x2:String(l.x),y2:String(l.y),stroke:r.color??v,"stroke-width":String(a),"stroke-opacity":"0.6"};g&&(s["marker-end"]="url(#arrowhead)"),e.push(o("line",s))}return e},[C,v,S,g]),V=s(()=>{const e=[];for(let t=0;t<T.length;t++){const n=T[t];e.push(o("circle",{key:`node-${n.id}`,cx:String(n.x),cy:String(n.y),r:String(f),fill:n.color,stroke:n.fixed?"#0f172a":"#fff","stroke-width":n.fixed?"3":String(p),style:{cursor:B.current===n.id?"grabbing":"grab"},onMouseDown:e=>j(n.id,e),onDblClick:()=>W(n.id),role:"button",tabIndex:0,"aria-label":`Node: ${n.label}${n.fixed?" (locked)":""} — drag to move, double-click to lock`})),h&&e.push(o("text",{key:`label-${n.id}`,x:String(n.x),y:String(n.y+f+14),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151","pointer-events":"none"},n.label))}return e},[C,f,h,W]),X=s(()=>k?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},k)]:[],[k,r]),K=s(()=>{if(!$||0===$.length)return[];const e=[];for(let t=0;t<$.length;t++){const n=$[t],r=N.current.get(n.nodeId);if(!r||r.length<2)continue;const i=[];for(let e=0;e<r.length;e++){const t=r[e];i.push(`${0===e?"M":"L"}${t.x.toFixed(1)},${t.y.toFixed(1)}`)}e.push(o("path",{key:`trail-${n.nodeId}`,d:i.join(" "),fill:"none",stroke:n.color??"#3b82f6","stroke-width":String(n.width??1),opacity:String(n.opacity??.5),"stroke-linecap":"round","stroke-linejoin":"round"}))}return e},[C,$]),Z=U(),J=K(),Q=G(),ee=V(),te=X();return o("svg",{ref:E,width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":k??"Force-directed graph — drag nodes to move, double-click to lock",style:{fontFamily:"sans-serif",cursor:B.current?"grabbing":"default"},onMouseMove:_,onMouseUp:Y,onMouseLeave:q},...Z,...te,...J,...Q,...ee)},exports.FormFieldWrapper=te,exports.FunnelChart=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",showLabels:l=!0,showValues:a=!0,showPercentage:c=!0,gapSize:f=2,colors:p=Xn,title:u}=e,h="vertical"===i,g=u?30:0,x=d(()=>{let e=0;for(let n=0;n<t.length;n++)t[n].value>e&&(e=t[n].value);return e>0?e:1},[t]),y=s(e=>0===x?0:Math.max(.05,e/x),[x]),m=s((e,t)=>t||(p[e%p.length]??Xn[0]),[p]),b=s(()=>{if(0===t.length)return[];const e=[],i=n-80-120,s=r-g-80,d=f*(t.length-1),p=Math.max(1,(s-d)/t.length),u=40+i/2;for(let n=0;n<t.length;n++){const r=t[n],s=n<t.length-1?t[n+1]:null,d=m(n,r.color),h=y(r.value),x=i/2*h,b=i/2*(null!==s?y(s.value):.6*h),v=g+40+n*(p+f),S=`${u-x},${v} ${u+x},${v} ${u+b},${v+p} ${u-b},${v+p}`;e.push(o("polygon",{key:`section-${n}`,points:S,fill:d,stroke:"#fff","stroke-width":"1"}));const k=40+i+12,w=v+p/2;if(l&&e.push(o("text",{key:`label-${n}`,x:String(k),y:String(w-(a||c?6:0)),"text-anchor":"start","font-size":"12","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},r.label)),a||c){let i="";if(a&&(i=String(r.value)),c&&t.length>0){const e=t[0].value,n=e>0?Math.round(r.value/e*100):0;i+=a?` (${n}%)`:`${n}%`}e.push(o("text",{key:`value-${n}`,x:String(k),y:String(w+(l?10:4)),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},i))}}return e},[t,n,r,g,f,l,a,c,m,y,120]),v=s(()=>{if(0===t.length)return[];const e=[],i=n-80,s=r-g-80-40,d=f*(t.length-1),p=Math.max(1,(i-d)/t.length),u=g+40+s/2;for(let n=0;n<t.length;n++){const r=t[n],i=n<t.length-1?t[n+1]:null,d=m(n,r.color),h=y(r.value),x=s/2*h,b=s/2*(null!==i?y(i.value):.6*h),v=40+n*(p+f),S=`${v},${u-x} ${v+p},${u-b} ${v+p},${u+b} ${v},${u+x}`;e.push(o("polygon",{key:`section-${n}`,points:S,fill:d,stroke:"#fff","stroke-width":"1"}));const k=v+p/2,w=g+40+s+14;if(l&&e.push(o("text",{key:`label-${n}`,x:String(k),y:String(w),"text-anchor":"middle","font-size":"11","font-weight":"bold","font-family":"sans-serif",fill:"#374151"},r.label)),a||c){let i="";if(a&&(i=String(r.value)),c&&t.length>0){const e=t[0].value,n=e>0?Math.round(r.value/e*100):0;i+=a?` (${n}%)`:`${n}%`}e.push(o("text",{key:`value-${n}`,x:String(k),y:String(w+14),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#6b7280"},i))}}return e},[t,n,r,g,f,l,a,c,m,y]),S=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},u)]:[],[u,n]),k=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),w=S(),$=h?b():v(),M=k();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Funnel chart",style:{fontFamily:"sans-serif"}},...w,...$,...M)},exports.GanttChart=function(e){const{tasks:t=[],width:n=800,height:r,barHeight:i=24,barGap:l=8,showGrid:a=!0,showLabels:c=!0,showProgress:f=!1,timeUnit:p="days",title:u,padding:h=50}=e;if(0===t.length)return o("svg",{width:"100%",height:String(r??100),viewBox:`0 0 ${n} ${r??100}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Empty Gantt chart"},o("text",{x:String(n/2),y:String((r??100)/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.4"},"No tasks to display"));const g=c?120:0,x=d(()=>{let e=1/0,n=-1/0;for(const o of t){o.start<e&&(e=o.start);const t=o.start+o.duration;t>n&&(n=t)}return e===1/0&&(e=0,n=1),{min:e,max:n,range:n-e}},[t]),y=d(()=>{const e=t.slice();return e.sort((e,t)=>e.group!==t.group?(e.group??"").localeCompare(t.group??""):e.start-t.start),e},[t]),m=r??2*h+y.length*(i+l)+l+20,b=n-h-g-h,v=h+(u?20:0),S=s(e=>0===x.range?g+h:g+h+(e-x.min)/x.range*b,[x,b,g,h]),k=s(()=>{if(!a)return[];const e=[],t=Zn(x.range),n=Math.ceil(x.min/t)*t,r=v+y.length*(i+l)+l;for(let i=n;i<=x.max;i+=t){const t=S(i);e.push(o("line",{key:`grid-${i}`,x1:String(t),y1:String(v),x2:String(t),y2:String(r),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"}))}return e},[a,x,v,y.length,i,l,S]),w=s(()=>{const e=[],t=Zn(x.range),r=Math.ceil(x.min/t)*t,i=v-8;for(let n=r;n<=x.max;n+=t){const t=S(n);e.push(o("text",{key:`taxis-${n}`,x:String(t),y:String(i),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},String(n)))}return e.push(o("text",{key:"time-unit",x:String(n-h),y:String(i),"text-anchor":"end","font-size":"10","font-family":"sans-serif",fill:"currentColor",opacity:"0.4","font-style":"italic"},p)),e},[x,v,S,p,n,h]),$=s(()=>{const e=[];let t="";for(let n=0;n<y.length;n++){const r=y[n],a=v+n*(i+l)+l,s=S(r.start),d=Math.max(2,S(r.start+r.duration)-s),p=Jn(n,r.color);r.group&&r.group!==t&&(t=r.group,c&&e.push(o("text",{key:`group-${n}`,x:String(h),y:String(a+i/2-12),"font-size":"9","font-family":"sans-serif","font-weight":"bold",fill:"currentColor",opacity:"0.4","text-transform":"uppercase"},r.group))),e.push(o("rect",{key:`bar-${r.id}`,x:String(s),y:String(a),width:String(d),height:String(i),rx:"4",ry:"4",fill:p,role:"graphics-symbol","aria-label":`${r.label}: start ${r.start}, duration ${r.duration}`})),c&&e.push(o("text",{key:`label-${r.id}`,x:String(g+h-8),y:String(a+i/2+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"currentColor"},r.label.length>16?r.label.substring(0,14)+"..":r.label)),f&&d>30&&e.push(o("text",{key:`prog-${r.id}`,x:String(s+d/2),y:String(a+i/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#ffffff"},`${r.start}-${r.start+r.duration}`))}return e},[y,v,i,l,S,c,f,g,h]),M=s(()=>u?[o("text",{key:"title",x:String(n/2),y:String(h/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},u)]:[],[u,n,h]),C=k(),z=w(),I=$(),A=M();return o("svg",{width:"100%",height:String(m),viewBox:`0 0 ${n} ${m}`,xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Gantt chart",style:{fontFamily:"sans-serif"}},...A,...C,...z,...I)},exports.Gauge=function(e){const{value:t,min:n=0,max:r=100,width:i=300,height:l=200,startAngle:a=-135,endAngle:d=135,arcWidth:c=20,showValue:f=!0,showMinMax:p=!0,showTicks:u=!0,tickCount:h=10,label:g,unit:x,colors:y=["#22c55e","#f59e0b","#ef4444"],needleColor:m="#374151",backgroundColor:b="#e5e7eb"}=e,v=isFinite(n)&&!isNaN(n)?n:0,S=isFinite(r)&&!isNaN(r)&&r>v?r:v+100,k=isFinite(t)&&!isNaN(t)?function(e,t,n){return e<t?t:e>n?n:e}(t,v,S):v,w=(f?24:0)+(g?18:0),$=i/2,M=.6*(l-w),C=Math.min(i/2,.55*(l-w))-c/2-10,z=C-c,I=C-c/2,A=d-a,F=s(e=>{const t=S-v;return 0===t?a:a+(e-v)/t*A},[v,S,a,A]),R=s(()=>[o("path",{key:"bg-arc",d:to($,M,I,a,d),fill:"none",stroke:b,"stroke-width":String(c),"stroke-linecap":"round"})],[$,M,I,a,d,b,c]),D=s(()=>{if(0===y.length)return[];const e=[],t=A/y.length;for(let n=0;n<y.length;n++){const r=a+n*t,i=to($,M,I,r,r+t);e.push(o("path",{key:`seg-${n}`,d:i,fill:"none",stroke:y[n],"stroke-width":String(c),"stroke-linecap":0===n||n===y.length-1?"round":"butt",opacity:"0.85"}))}return e},[y,A,a,$,M,I,c]),L=s(()=>{if(!u||h<=0)return[];const e=[],t=Math.max(1,Math.min(h,100));for(let n=0;n<=t;n++){const r=n/t,i=a+r*A,l=n%2==0,s=l?10:6,d=eo($,M,C+4,i),c=eo($,M,C+4+s,i);if(e.push(o("line",{key:`tick-${n}`,x1:String(d.x),y1:String(d.y),x2:String(c.x),y2:String(c.y),stroke:"currentColor",opacity:"0.4","stroke-width":l?"2":"1"})),l){const t=v+r*(S-v),l=eo($,M,C+4+s+12,i);e.push(o("text",{key:`tick-label-${n}`,x:String(l.x),y:String(l.y+3),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(t)))}}return e},[u,h,a,A,$,M,C,v,S]),N=s(()=>{const e=[],t=F(k),n=eo($,M,z-8,t),r=t-90,i=eo($,M,6,t+90),l=eo($,M,6,r);return e.push(o("polygon",{key:"needle",points:`${n.x},${n.y} ${i.x},${i.y} ${l.x},${l.y}`,fill:m,stroke:"none"})),e.push(o("circle",{key:"needle-cap",cx:String($),cy:String(M),r:"8",fill:m,stroke:"#fff","stroke-width":"2"})),e},[k,F,$,M,z,m]),T=s(()=>{if(!f)return[];const e=[],t=no(k),n=t+(x?" "+x:""),r=M+I+20;return e.push(o("text",{key:"value-text",x:String($),y:String(r),"text-anchor":"middle","font-size":"22","font-weight":"bold","font-family":"sans-serif",fill:"currentColor","aria-label":`Value: ${n}`},t,x?o("tspan",{key:"unit","font-size":"14","font-weight":"normal",opacity:"0.6",fill:"currentColor"}," "+x):null)),e},[f,k,x,$,M,I]),W=s(()=>{if(!g)return[];const e=M+I+(f?40:20);return[o("text",{key:"label",x:String($),y:String(e),"text-anchor":"middle","font-size":"13","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},g)]},[g,$,M,I,f]),B=s(()=>{if(!p)return[];const e=[],t=eo($,M,I,a),n=eo($,M,I,d);return e.push(o("text",{key:"min-label",x:String(t.x-4),y:String(t.y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(v))),e.push(o("text",{key:"max-label",x:String(n.x+4),y:String(n.y+18),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor",opacity:"0.55"},no(S))),e},[p,$,M,I,a,d,v,S]),E=R(),P=D(),H=L(),j=N(),_=T(),Y=W(),q=B(),O=`Gauge: ${no(k)}${x?" "+x:""}, range ${no(v)} to ${no(S)}${g?", "+g:""}`;return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"meter","aria-valuenow":String(k),"aria-valuemin":String(v),"aria-valuemax":String(S),"aria-label":O,style:{fontFamily:"sans-serif"}},...E,...P,...H,...j,..._,...Y,...q)},exports.GoogleAnalytics=function(e){const{measurementId:t,disabled:n=!1,debug:o=!1,anonymizeIp:r=!1,config:i}=e;return a(()=>{if(n||"undefined"==typeof window)return;!function(e){if("undefined"==typeof document)return;const t="specifyjs-gtag";if(document.getElementById(t))return;const n=document.createElement("script");n.id=t,n.async=!0,n.src=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(e)}`,document.head.appendChild(n)}(t),"undefined"!=typeof window&&(window.dataLayer=window.dataLayer||[],window.gtag||(window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date)));const e={...i};return r&&(e.anonymize_ip=!0),o&&(e.debug_mode=!0),window.gtag&&window.gtag("config",t,e),()=>{const e=document.getElementById("specifyjs-gtag");e&&e.remove()}},[t,n,o,r]),null},exports.Grid=function(e){const t=d(()=>{const t={display:"grid"};return e.minColWidth?t.gridTemplateColumns=`repeat(auto-fit, minmax(${e.minColWidth}, 1fr))`:void 0!==e.columns&&(t.gridTemplateColumns="number"==typeof e.columns?`repeat(${e.columns}, 1fr)`:e.columns),e.rows&&(t.gridTemplateRows=e.rows),e.gap&&(t.gap=e.gap),e.alignItems&&(t.alignItems=e.alignItems),e.justifyItems&&(t.justifyItems=e.justifyItems),e.areas&&e.areas.length>0&&(t.gridTemplateAreas=e.areas.map(e=>`"${e}"`).join(" ")),{...t,...e.style??{}}},[e.columns,e.rows,e.gap,e.alignItems,e.justifyItems,e.minColWidth,e.areas,e.style]);return o("div",{className:`grid ${e.className??""}`.trim(),style:t},e.children)},exports.GridItem=function(e){const t=d(()=>{const t={};return e.gridColumn&&(t.gridColumn=e.gridColumn),e.gridRow&&(t.gridRow=e.gridRow),e.gridArea&&(t.gridArea=e.gridArea),e.alignSelf&&(t.alignSelf=e.alignSelf),e.justifySelf&&(t.justifySelf=e.justifySelf),{...t,...e.style??{}}},[e.gridColumn,e.gridRow,e.gridArea,e.alignSelf,e.justifySelf,e.style]);return o("div",{className:`grid-item ${e.className??""}`.trim(),style:t},e.children)},exports.HeatMap=function(e){const{data:t=[],rowLabels:n,columnLabels:r,width:i=600,height:l=400,colorScale:a=ao,minValue:c,maxValue:f,showValues:p=!1,cellBorderColor:u="#fff",cellBorderWidth:h=1,title:g,padding:x=60}=e,y=t.length,m=d(()=>{let e=0;for(const n of t)n.length>e&&(e=n.length);return e},[t]),{minVal:b,maxVal:v}=d(()=>{let e=c??1/0,n=f??-1/0;for(const o of t)for(const t of o)void 0===c&&t<e&&(e=t),void 0===f&&t>n&&(n=t);return e===1/0&&(e=0),n===-1/0&&(n=1),e===n&&(n=e+1),{minVal:e,maxVal:n}},[t,c,f]),S=g?30:0,k=n?x:20,w=m>0?(i-k-20)/m:0,$=y>0?(l-S-(r?x:20)-20)/y:0,M=s(()=>{const e=[];for(let n=0;n<y;n++){const r=t[n];for(let t=0;t<m;t++){const i=t<r.length?r[t]:0,l=io((i-b)/(v-b),a),s=k+t*w,d=S+20+n*$;if(e.push(o("rect",{key:`cell-${n}-${t}`,x:String(s),y:String(d),width:String(w),height:String($),fill:l,stroke:u,"stroke-width":String(h)})),p){const r=lo(l)>.5?"#111827":"#ffffff";e.push(o("text",{key:`val-${n}-${t}`,x:String(s+w/2),y:String(d+$/2),"text-anchor":"middle","dominant-baseline":"central","font-size":String(Math.min(11,.3*w,.4*$)),"font-family":"sans-serif",fill:r},String(Math.round(100*i)/100)))}}}return e},[t,y,m,b,v,a,w,$,k,S,p,u,h]),C=s(()=>{const e=[];if(n)for(let t=0;t<y;t++){const r=t<n.length?n[t]:"",i=S+20+t*$+$/2;e.push(o("text",{key:`row-label-${t}`,x:String(k-8),y:String(i),"text-anchor":"end","dominant-baseline":"central","font-size":"11","font-family":"sans-serif",fill:"currentColor"},r))}if(r)for(let t=0;t<m;t++){const n=t<r.length?r[t]:"",i=k+t*w+w/2,l=S+20+y*$+16;e.push(o("text",{key:`col-label-${t}`,x:String(i),y:String(l),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}return e},[n,r,y,m,w,$,k,S]),z=s(()=>g?[o("text",{key:"title",x:String(i/2),y:"22","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},g)]:[],[g,i]);if(0===y||0===m)return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":g??"Heat map — no data"},o("text",{x:String(i/2),y:String(l/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const I=z(),A=M(),F=C();return o("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":g??"Heat map",style:{fontFamily:"sans-serif"}},...I,...A,...F)},exports.Histogram=function(e){const{data:t=[],bins:n=10,width:r=600,height:i=400,barColor:l="#3b82f6",barGap:a=2,showGrid:c=!0,showValues:f=!0,title:p,xLabel:u,yLabel:h,padding:g=60}=e,x=Math.max(1,Math.round(n)),y=d(()=>function(e,t){if(0===e.length)return[];let n=e[0],o=e[0];for(let t=1;t<e.length;t++){const r=e[t];r<n&&(n=r),r>o&&(o=r)}if(n===o)return[{min:n,max:o+1,count:e.length}];const r=(o-n)/t,i=[];for(let e=0;e<t;e++)i.push({min:n+e*r,max:n+(e+1)*r,count:0});for(let o=0;o<e.length;o++){const l=e[o];let a=Math.floor((l-n)/r);a>=t&&(a=t-1),i[a].count++}return i}(t,x),[t,x]),m=d(()=>{let e=0;for(let t=0;t<y.length;t++)y[t].count>e&&(e=y[t].count);return e>0?e:1},[y]),b=r-2*g,v=i-2*g,S=s(()=>{if(!c)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(m),t=[];for(let n=e;n<=m;n+=e){const e=g+v-n/m*v;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(e),x2:String(g+b),y2:String(e),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(e+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}return t},[c,m,g,b,v]),k=s(()=>{const e=[];return e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+v),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+v),x2:String(g+b),y2:String(g+v),stroke:"#374151","stroke-width":"1.5"})),e},[g,b,v]),w=s(()=>{if(0===y.length)return[];const e=[],t=a*(y.length-1),n=Math.max(1,(b-t)/y.length);for(let t=0;t<y.length;t++){const r=y[t],i=r.count/m*v,s=g+t*(n+a),d=g+v-i;if(e.push(o("rect",{key:`bar-${t}`,x:String(s),y:String(d),width:String(n),height:String(i),fill:l})),f&&r.count>0&&e.push(o("text",{key:`val-${t}`,x:String(s+n/2),y:String(d-4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},String(r.count))),y.length<=15||t%2==0||t===y.length-1){const i=(y.length,so(r.min));e.push(o("text",{key:`xlabel-${t}`,x:String(s+n/2),y:String(g+v+14),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280"},i))}}if(y.length>0){const t=y[y.length-1],n=g+b;e.push(o("text",{key:"xlabel-end",x:String(n),y:String(g+v+14),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280"},so(t.max)))}return e},[y,m,a,l,f,g,b,v]),$=s(()=>{const e=[];return p&&e.push(o("text",{key:"title",x:String(r/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p)),u&&e.push(o("text",{key:"x-label",x:String(g+b/2),y:String(i-8),"text-anchor":"middle","font-size":"12","font-family":"sans-serif",fill:"#374151"},u)),h&&e.push(o("text",{key:"y-label",x:String(14),y:String(g+v/2),"text-anchor":"middle","font-size":"12","font-family":"sans-serif",fill:"#374151",transform:`rotate(-90 14 ${g+v/2})`},h)),e},[p,u,h,r,i,g,b,v]),M=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,r,i]),C=S(),z=k(),I=w(),A=$(),F=M();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Histogram",style:{fontFamily:"sans-serif"}},...A,...C,...z,...I,...F)},exports.HypercubeGraph=function(e){const t=e.dimension??4,n=e.width??600,r=e.height??600,i=e.vertexRadius??10,f=e.edgeWidth??3,p=e.edgeColor??"#111",u=e.perspective??.25,h=e.rotationSpeed??.008,g=e.showLabels??!1,x=e.backgroundColor??"transparent",y=e.scale??.3*Math.min(n,r),m=Dt(t),b=1<<t,v=d(()=>"auto"===e.vertexColors||void 0===e.vertexColors?Lt(b):e.vertexColors,[b,e.vertexColors]),[S,k]=l(()=>{const e=[];for(let t=0;t<m;t++)e.push(0);return e}),[w,$]=l(!1),M=c({x:0,y:0}),C=c([]),z=c(0);a(()=>{if(0===h)return;let e=!0;const t=()=>{e&&(k(e=>{const t=e.slice();for(let e=0;e<t.length;e++)t[e]=(t[e]??0)+h*(1+.3*e);return t}),z.current=requestAnimationFrame(t))};return z.current=requestAnimationFrame(t),()=>{e=!1,cancelAnimationFrame(z.current)}},[h]);const I=d(()=>Rt(t,S,u,y),[t,S,u,y]),A=n/2,F=r/2,R=d(()=>I.edges.map(e=>{const t=I.vertices[e.source],n=I.vertices[e.target],o=(t.depth+n.depth)/2;return{...e,avgDepth:o,sv:t,tv:n}}).sort((e,t)=>e.avgDepth-t.avgDepth),[I]),D=d(()=>I.vertices.slice().sort((e,t)=>e.depth-t.depth),[I]),L=s(e=>{const t=e;$(!0),M.current={x:t.clientX,y:t.clientY},C.current=S.slice()},[S]),N=s(e=>{if(!w)return;const t=e,n=.01*(t.clientX-M.current.x),o=.01*(t.clientY-M.current.y);k(()=>{const e=C.current.slice();return e.length>0&&(e[0]=(e[0]??0)+n),e.length>1&&(e[1]=(e[1]??0)+o),e})},[w]),T=s(()=>{$(!1)},[]),W=R.map((e,t)=>{const n=(e=>{const t=(e+2)/4;return.3+.7*Math.max(0,Math.min(1,t))})(e.avgDepth);return o("line",{key:`e-${e.source}-${e.target}`,x1:String(A+e.sv.x),y1:String(F+e.sv.y),x2:String(A+e.tv.x),y2:String(F+e.tv.y),stroke:p,"stroke-width":String(f),"stroke-opacity":String(n),"stroke-linecap":"round"})}),B=D.map(e=>{const n=i*(e=>{const t=(e+2)/4;return.6+.4*Math.max(0,Math.min(1,t))})(e.depth),r=v[e.id%v.length]??"#3b82f6",l=[o("circle",{key:`v-${e.id}-circle`,cx:String(A+e.x),cy:String(F+e.y),r:String(n),fill:r,stroke:"#000","stroke-width":"1.5",style:{filter:"drop-shadow(0 1px 2px rgba(0,0,0,0.3))"}})];return g&&l.push(o("text",{key:`v-${e.id}-label`,x:String(A+e.x),y:String(F+e.y+n+14),"text-anchor":"middle","font-size":"11","font-family":"monospace",fill:"#555"},e.id.toString(2).padStart(t,"0"))),l});return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",style:{backgroundColor:x,cursor:w?"grabbing":"grab",userSelect:"none"},onMouseDown:L,onMouseMove:N,onMouseUp:T,onMouseLeave:T},...W,...B.flat())},exports.IDE=function(e){const[t,n]=l("App.ts"),[r,i]=l({src:!0,components:!0,hooks:!0}),[a,f]=l(-1),[p,u]=l(Vt.length),h=c(null),g=s(e=>{n(e);const t=Gt[e];t&&u(t.length)},[]),x=s(e=>{i(t=>{const n={},o=Object.keys(t);for(let e=0;e<o.length;e++)n[o[e]]=t[o[e]];return n[e]=!t[e],n})},[]),y=s(e=>{f(t=>t===e?-1:e)},[]),m=s(e=>{switch(e){case"undo":document.execCommand("undo",!1);break;case"redo":document.execCommand("redo",!1);break;case"cut":document.execCommand("cut",!1);break;case"copy":document.execCommand("copy",!1);break;case"paste":document.execCommand("paste",!1);break;case"newFile":h.current&&(h.current.textContent="",u(1))}f(-1),h.current&&h.current.focus()},[]),b=s(()=>{if(h.current){const e=(h.current.textContent??"").split("\n");u(Math.max(e.length,1))}},[]),v=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",color:"#cccccc",backgroundColor:"#1e1e1e",overflow:"hidden"}),[]),S={padding:"3px 8px",fontSize:"12px",color:"#cccccc",cursor:"pointer",borderRadius:"3px",backgroundColor:"transparent",border:"none",position:"relative"},k={...S,backgroundColor:"rgba(255,255,255,0.1)"},w={position:"absolute",top:"100%",left:"0",minWidth:"180px",backgroundColor:"#2d2d2d",border:"1px solid #454545",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.4)",padding:"4px 0",zIndex:"1000"},$={display:"block",width:"100%",padding:"6px 16px",fontSize:"12px",color:"#cccccc",backgroundColor:"transparent",border:"none",textAlign:"left",cursor:"pointer",transition:"background 0.1s"},M={cursor:"pointer",padding:"0 6px",borderRadius:"3px",transition:"background-color 0.15s"},C=Gt[t]??Vt,z=C.map((e,t)=>{const n=function(e){if(!e.trim())return[{text:" ",color:Jt}];const t=[];let n=0;for(;n<e.length;){if("/"===e[n]&&"/"===e[n+1]){t.push({text:e.slice(n),color:"#6a9955"});break}if('"'===e[n]||"'"===e[n]||"`"===e[n]){const o=e[n];let r=n+1;for(;r<e.length&&e[r]!==o;)"\\"===e[r]&&r++,r++;r=Math.min(r+1,e.length),t.push({text:e.slice(n,r),color:"#ce9178"}),n=r;continue}if(/[0-9]/.test(e[n])&&(0===n||/[\s(,=:[\]{}+\-*/]/.test(e[n-1]))){let o=n;for(;o<e.length&&/[0-9.]/.test(e[o]);)o++;t.push({text:e.slice(n,o),color:"#b5cea8"}),n=o;continue}if(/[a-zA-Z_$]/.test(e[n])){let o=n;for(;o<e.length&&/[a-zA-Z0-9_$]/.test(e[o]);)o++;const r=e.slice(n,o);let i=o;for(;i<e.length&&" "===e[i];)i++;const l=i<e.length&&"("===e[i];let a=Jt;Xt.has(r)?a=Zt:Kt.has(r)?a="#4ec9b0":l?a="#dcdcaa":"true"!==r&&"false"!==r||(a=Zt),t.push({text:r,color:a}),n=o;continue}if(" "===e[n]||"\t"===e[n]){let o=n;for(;o<e.length&&(" "===e[o]||"\t"===e[o]);)o++;t.push({text:e.slice(n,o),color:Jt}),n=o;continue}t.push({text:e[n],color:"#d4d4d4"}),n++}return t}(e),r=[];let i=0;for(const e of n)r.push(o("span",{key:String(i++),style:{color:e.color}},e.text));return o("div",{key:String(t),style:{minHeight:"20px"}},...r)}),I=Math.max(p,C.length),A=[];for(let e=0;e<I;e++)A.push(o("div",{key:String(e)},String(e+1)));const F=e=>{if(!e.parent)return!0;if(!r[e.parent])return!1;const t=Ut.find(t=>t.name===e.parent&&t.isFolder);return!t||F(t)},R=qt.map((e,t)=>{const n=[e],r=a===t;return r&&Ot[e]&&n.push(o("div",{key:"dropdown",style:w,className:"ide__menu-dropdown"},...Ot[e].map((e,t)=>o("button",{key:String(t),style:$,onClick:t=>{t.stopPropagation(),m(e.action)},role:"menuitem"},e.label)))),o("button",{key:String(t),style:r?k:S,role:"menuitem","aria-label":e,onClick:()=>y(t)},...n)}),D=Ut.map((e,n)=>{if(!F(e))return null;const i=!e.isFolder&&e.name===t,l=e.isFolder?r[e.name]?"📂 ":"📁 ":"📄 ";return o("div",{key:String(n),style:(a=e.indent,s=e.isFolder,d=i,{padding:"3px 8px",paddingLeft:12+16*a+"px",fontSize:"13px",cursor:"pointer",color:s?"#cccccc":"#d4d4d4",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",borderRadius:"3px",margin:"0 4px",transition:"background-color 0.1s",backgroundColor:d?"rgba(255,255,255,0.08)":"transparent"}),onClick:e.isFolder?()=>x(e.name):()=>g(e.name)},l,e.name);var a,s,d}).filter(e=>null!==e);return o("div",{className:`ide ${e.className??""}`.trim(),style:v},o("div",{className:"ide__title-bar",style:{height:"30px",backgroundColor:"#323233",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",color:"#999",flexShrink:"0",borderBottom:"1px solid var(--color-border, #252526)"}},"SpecifyJS IDE"),o("div",{className:"ide__menu-bar",style:{height:"28px",backgroundColor:"#3c3c3c",display:"flex",alignItems:"center",padding:"0 8px",gap:"2px",flexShrink:"0",position:"relative"},role:"menubar"},...R),o("div",{style:{flex:"1",display:"flex",overflow:"hidden"}},o("nav",{className:"ide__sidebar",style:{width:"220px",backgroundColor:"#252526",borderRight:"none",display:"flex",flexDirection:"column",flexShrink:"0",overflowY:"auto"},"aria-label":"File explorer"},o("div",{style:{padding:"8px 12px",fontSize:"11px",fontWeight:"600",textTransform:"uppercase",letterSpacing:"0.5px",color:"#bbbbbb"}},"Explorer"),...D),o("div",{style:{width:"1px",backgroundColor:"#007acc",cursor:"col-resize",flexShrink:"0",opacity:"0.4",transition:"opacity 0.2s"}}),o("div",{style:{flex:"1",display:"flex",flexDirection:"column",overflow:"hidden"}},o("div",{style:{height:"35px",backgroundColor:"#252526",display:"flex",alignItems:"center",flexShrink:"0"}},o("button",{style:{padding:"0 16px",height:"35px",lineHeight:"35px",backgroundColor:"#1e1e1e",color:"#ffffff",fontSize:"13px",cursor:"pointer",border:"none",borderBottom:"2px solid #007acc",boxSizing:"border-box"},"aria-label":t},t)),o("div",{style:{flex:"1",display:"flex",overflow:"auto",backgroundColor:"#1e1e1e",fontFamily:'"Cascadia Code", "Fira Code", "Consolas", monospace',fontSize:"13px",lineHeight:"20px"}},o("div",{style:{padding:"8px 0",textAlign:"right",color:"#858585",userSelect:"none",minWidth:"48px",paddingRight:"12px",paddingLeft:"12px",flexShrink:"0"},"aria-hidden":"true"},...A),o("code",{style:{padding:"8px 0",flex:"1",whiteSpace:"pre",overflowX:"auto",outline:"none",color:"#d4d4d4"},contentEditable:"true",ref:h,onInput:b,suppressContentEditableWarning:!0},...z))),o("div",{className:"ide__minimap",style:{width:"60px",backgroundColor:"#1e1e1e",borderLeft:"1px solid var(--color-border, #252526)",flexShrink:"0",padding:"8px 4px",display:"flex",flexDirection:"column",gap:"2px",position:"relative"},"aria-hidden":"true"},o("div",{style:{position:"absolute",top:"8px",left:"0",right:"0",height:"30px",backgroundColor:"rgba(100, 100, 200, 0.15)",border:"1px solid rgba(100, 100, 200, 0.3)",borderRadius:"2px",pointerEvents:"none"}}),...C.map((e,t)=>o("div",{key:String(t),style:{height:"2px",backgroundColor:e.trim()?"#555555":"transparent",borderRadius:"1px",width:`${Math.min(100,2*e.length)}%`}})))),o("div",{className:"ide__status-bar",style:{height:"22px",backgroundColor:"#007acc",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 12px",fontSize:"12px",color:"#ffffff",flexShrink:"0"}},o("div",{style:{display:"flex",gap:"16px"}},o("span",{style:M},"⎇ main"),o("span",{style:M},"0 errors"),o("span",{style:M},"0 warnings")),o("div",{style:{display:"flex",gap:"16px"}},o("span",{style:M},"Ln 1, Col 1"),o("span",{style:M},"UTF-8"),o("span",{style:M},"TypeScript"))))},exports.Image=function(e){const[t,n]=l("loading"),r=c(null),i=f().replace(/[^a-zA-Z0-9_-]/g,""),s=!1!==e.lazy,p="number"==typeof e.width?`${e.width}px`:e.width,u="number"==typeof e.height?`${e.height}px`:e.height;a(()=>{n("loading")},[e.src]);const h=d(()=>{const t={display:"inline-block",position:"relative",overflow:"hidden"};return p&&(t.width=p),u&&(t.height=u),e.borderRadius&&(t.borderRadius=e.borderRadius),t},[p,u,e.borderRadius]),g=d(()=>{const n={display:"block",width:"100%",height:"100%"};return e.objectFit&&(n.objectFit=e.objectFit),"loading"===t&&(n.opacity="0",n.position="absolute"),"error"===t&&(n.display="none"),n},[e.objectFit,t]);let x=null;"loading"===t&&("skeleton"===e.placeholder?x=o("div",null,o("style",null,`@keyframes liq-img-shimmer-${i}{0%{background-position:-200% 0}100%{background-position:200% 0}}`),o("div",{style:{width:p??"100%",height:u??"200px",backgroundColor:"#e5e7eb",backgroundImage:"linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",backgroundSize:"200% 100%",animation:`liq-img-shimmer-${i} 1.5s ease-in-out infinite`}})):"blur"===e.placeholder?x=o("div",{style:{width:p??"100%",height:u??"200px",backgroundColor:"#d1d5db",filter:"blur(20px)"}}):null!=e.placeholder&&!1!==e.placeholder&&(x=e.placeholder));let y=null;"error"===t&&null!=e.fallback&&(y="string"==typeof e.fallback?o("img",{src:e.fallback,alt:e.alt??"",style:{display:"block",width:"100%",height:"100%",objectFit:e.objectFit??"cover"}}):e.fallback);const m=o("div",{style:h},x,o("img",{ref:r,src:e.src,alt:e.alt??"",loading:s?"lazy":void 0,style:g,onload:()=>n("loaded"),onerror:()=>n("error")}),y);return e.caption?o("figure",{style:{margin:"0",display:"inline-block"}},m,o("figcaption",{style:{fontSize:"13px",color:"#6b7280",marginTop:"6px",textAlign:"center"}},e.caption)):m},exports.LineGraph=function(e){const{data:t,width:n=600,height:r=400,lineColor:i="#3b82f6",lineWidth:l=2,pointRadius:a=4,pointColor:s="#3b82f6",pointShape:c="circle",showPoints:f=!0,showGrid:p=!0,showArea:u=!1,areaColor:h="rgba(59,130,246,0.15)",xLabel:g,yLabel:x,title:y,padding:m=50,animate:b=!1,multiLine:v}=e,S=xt(d(()=>{const e=[...t];if(v)for(const t of v)e.push(...t.data);return e},[t,v]),n,r,m),{xScale:k,yScale:w,xTicks:$,yTicks:M}=S,C=[];if(C.push(o("rect",{x:0,y:0,width:"100%",fill:"white",key:"bg"})),p){for(let e=0;e<$.length;e++){const t=k($[e]);C.push(o("line",{x1:t,y1:m,x2:t,y2:r-m,stroke:"#e5e7eb","stroke-dasharray":"4,4",key:`grid-x-${e}`}))}for(let e=0;e<M.length;e++){const t=w(M[e]);C.push(o("line",{x1:m,y1:t,x2:n-m,y2:t,stroke:"#e5e7eb","stroke-dasharray":"4,4",key:`grid-y-${e}`}))}}C.push(o("line",{x1:m,y1:r-m,x2:n-m,y2:r-m,stroke:"#374151","stroke-width":1,key:"x-axis"})),C.push(o("line",{x1:m,y1:m,x2:m,y2:r-m,stroke:"#374151","stroke-width":1,key:"y-axis"}));for(let e=0;e<$.length;e++){const t=k($[e]);C.push(o("line",{x1:t,y1:r-m,x2:t,y2:r-m+5,stroke:"#374151",key:`xtick-${e}`})),C.push(o("text",{x:t,y:r-m+18,"text-anchor":"end","font-size":11,fill:"#6b7280",transform:`rotate(-45, ${t}, ${r-m+18})`,key:`xlabel-${e}`},yt($[e])))}for(let e=0;e<M.length;e++){const t=w(M[e]);C.push(o("line",{x1:m-5,y1:t,x2:m,y2:t,stroke:"#374151",key:`ytick-${e}`})),C.push(o("text",{x:m-10,y:t+4,"text-anchor":"end","font-size":11,fill:"#6b7280",key:`ylabel-${e}`},yt(M[e])))}function z(e,t,n,r,i,l,a,s,d,c){if(0===e.length)return;const f=[...e].sort((e,t)=>e.x-t.x);if(r){const e=w(S.yMin),t=f.map(e=>`${k(e.x)},${w(e.y)}`).join(" "),n=`${k(f[0].x)},${e} ${t} ${k(f[f.length-1].x)},${e}`;C.push(o("polygon",{points:n,fill:i,key:`${c}-area`}))}const p={points:f.map(e=>`${k(e.x)},${w(e.y)}`).join(" "),fill:"none",stroke:t,"stroke-width":n,"stroke-linejoin":"round","stroke-linecap":"round",key:`${c}-line`};if(b?(p["stroke-dasharray"]="1000",p["stroke-dashoffset"]="1000",C.push(o("polyline",p,o("animate",{attributeName:"stroke-dashoffset",from:1e3,to:0,dur:"1.5s",fill:"freeze"})))):C.push(o("polyline",p)),l)for(let e=0;e<f.length;e++){const t=k(f[e].x),n=w(f[e].y),r=f[e].shape??d,i=f[e].radius??s,l=`${c}-pt-${e}`;if(b){const e=mt(r,t,n,i,a,l,{opacity:0});C.push(o("g",{key:`${l}-g`},e,o("animate",{attributeName:"opacity",from:0,to:1,dur:"0.3s",begin:"1.2s",fill:"freeze"})))}else C.push(mt(r,t,n,i,a,l))}}if(z(t,i,l,u,h,f,s,a,c,"primary"),v)for(let e=0;e<v.length;e++){const t=v[e];z(t.data,t.color,l,!1,"transparent",f,t.color,t.pointRadius??a,t.pointShape??c,`series-${e}`)}if(v&&v.length>0){const e=[],t=[{color:i,label:"Primary"},...v.map((e,t)=>({color:e.color,label:e.label??`Series ${t+1}`}))],r=m+10,l=16,a=22,s=7.2,d=14,c=6,f=n-2*m-20;let p=0,u=0;for(let n=0;n<t.length;n++){const i=d+c+t[n].label.length*s;p>0&&p+i>f&&(p=0,u+=a);const h=r+p,g=m-30-u;e.push(o("rect",{x:h,y:g,width:d,height:14,fill:t[n].color,rx:2,key:`legend-rect-${n}`})),e.push(o("text",{x:h+d+c,y:g+12,"font-size":12,fill:"#374151",key:`legend-text-${n}`},t[n].label)),p+=i+l}C.push(o("g",{key:"legend"},...e))}return g&&C.push(o("text",{x:n/2,y:r-8,"text-anchor":"middle","font-size":13,fill:"#374151",key:"x-axis-label"},g)),x&&C.push(o("text",{x:14,y:r/2,"text-anchor":"middle","font-size":13,fill:"#374151",transform:`rotate(-90, 14, ${r/2})`,key:"y-axis-label"},x)),y&&C.push(o("text",{x:n/2,y:20,"text-anchor":"middle","font-size":16,"font-weight":"bold",fill:"#111827",key:"title"},y)),o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet"},...C)},exports.ListView=function(e){const{items:t,renderItem:n,keyExtractor:r,divider:i=!1,hoverable:l=!1,selectedIndex:a,onSelect:s,emptyMessage:d="No items",header:c,footer:f}=e;if(0===t.length)return o("div",null,c?o("div",{style:U},c):null,o("div",{style:O},d),f?o("div",{style:{...U,borderBottom:"none",borderTop:"1px solid #e5e7eb"}},f):null);const p=[];for(let e=0;e<t.length;e++){const d=t[e],c=r(d,e),f=a===e,u=e===t.length-1,h={...j,...l?Y:{},...f?q:{},...i&&!u?_:{}};p.push(o("li",{key:c,style:h,onClick:s?()=>s(e):void 0,onKeyDown:s?t=>{const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),s(e))}:void 0,role:s?"option":void 0,tabIndex:s?0:void 0,"aria-selected":s?String(f):void 0},n(d,e)))}return o("div",null,c?o("div",{style:U},c):null,o("ul",{style:H,role:s?"listbox":"list"},...p),f?o("div",{style:{...U,borderBottom:"none",borderTop:"1px solid #e5e7eb"}},f):null)},exports.LollipopChart=function(e){const{data:t=[],width:n=600,height:r=400,orientation:i="vertical",stemColor:l="#94a3b8",stemWidth:a=2,dotRadius:c=6,dotColor:f="#3b82f6",showGrid:p=!0,showValues:u=!0,title:h,padding:g=60}=e,x="vertical"===i,y=n-2*g,m=r-2*g-(x?30:0),b=x?m:y,v=x?y:m,S=d(()=>{let e=0;for(let n=0;n<t.length;n++)t[n].value>e&&(e=t[n].value);return e>0?e:1},[t]),k=d(()=>0===t.length?0:v/t.length,[t.length,v]),w=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(S),t=[];for(let n=e;n<=S;n+=e){const e=n/S*b;if(x){const r=g+m-e;t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(r),x2:String(g+y),y2:String(r),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(r+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}else{const r=g+e;t.push(o("line",{key:`grid-${n}`,x1:String(r),y1:String(g),x2:String(r),y2:String(g+m),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(r),y:String(g+m+16),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}}return t},[p,S,x,g,y,m,b]),$=s(()=>{const e=[];return e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+m),stroke:"#374151","stroke-width":"1.5"})),e.push(o("line",{key:"axis-x",x1:String(g),y1:String(g+m),x2:String(g+y),y2:String(g+m),stroke:"#374151","stroke-width":"1.5"})),e},[x,g,y,m]),M=s(()=>{if(0===t.length)return[];const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=r.value/S*b,s=k*n+k/2,d=r.color??f;if(x){const t=g+s,f=g+m,p=g+m-i;e.push(o("line",{key:`stem-${n}`,x1:String(t),y1:String(f),x2:String(t),y2:String(p),stroke:l,"stroke-width":String(a)})),e.push(o("circle",{key:`dot-${n}`,cx:String(t),cy:String(p),r:String(c),fill:d})),u&&e.push(o("text",{key:`val-${n}`,x:String(t),y:String(p-c-4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(r.value)));const h=t,x=g+m+16;e.push(o("text",{key:`cat-${n}`,x:String(h),y:String(x),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151",transform:`rotate(-45, ${h}, ${x})`},r.label))}else{const t=g+s,f=g,p=g+i;e.push(o("line",{key:`stem-${n}`,x1:String(f),y1:String(t),x2:String(p),y2:String(t),stroke:l,"stroke-width":String(a)})),e.push(o("circle",{key:`dot-${n}`,cx:String(p),cy:String(t),r:String(c),fill:d})),u&&e.push(o("text",{key:`val-${n}`,x:String(p+c+4),y:String(t+4),"text-anchor":"start","font-size":"11","font-family":"sans-serif",fill:"#374151"},String(r.value))),e.push(o("text",{key:`cat-${n}`,x:String(g-8),y:String(t+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#374151"},r.label))}}return e},[t,S,k,f,c,l,a,u,x,g,y,m,b]),C=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),z=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),I=w(),A=$(),F=M(),R=C(),D=z();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Lollipop chart",style:{fontFamily:"sans-serif"}},...R,...I,...A,...F,...D)},exports.Matrix=function(e){const{data:t=[],labels:n,rowLabels:r,columnLabels:i,width:l=500,height:a=500,colorScale:c=uo,showValues:f=!0,showDiagonal:p=!0,cellBorderColor:u="#e5e7eb",title:h,padding:g=70,symmetric:x=!1}=e,y=r??n,m=i??n,b=t.length,v=d(()=>{let e=0;for(const n of t)n.length>e&&(e=n.length);return e},[t]),S=d(()=>{if(!x||0===b)return t;const e=[],n=Math.max(b,v);for(let o=0;o<n;o++){const r=[];for(let e=0;e<n;e++){const n=t[o],i=n&&e<n.length?n[e]:0,l=t[e],a=l&&o<l.length?l[o]:0;0!==i?r.push(i):r.push(a)}e.push(r)}return e},[t,x,b,v]),k=S.length,w=d(()=>{let e=0;for(const t of S)t.length>e&&(e=t.length);return e},[S]),{minVal:$,maxVal:M}=d(()=>{let e=1/0,t=-1/0;for(const n of S)for(const o of n)o<e&&(e=o),o>t&&(t=o);return e===1/0&&(e=0),t===-1/0&&(t=1),e===t&&(t=e+1),{minVal:e,maxVal:t}},[S]),C=h?30:0,z=y?g:20,I=w>0?(l-z-20)/w:0,A=k>0?(a-C-(m?g:20)-20)/k:0,F=s(()=>{const e=[];for(let t=0;t<k;t++){const n=S[t];for(let r=0;r<w;r++){const i=r<n.length?n[r]:0,l=fo((i-$)/(M-$),c),a=z+r*I,s=C+20+t*A,d=t===r,h=d&&p?"currentColor":u,g=d&&p?"2":"1";if(e.push(o("rect",{key:`cell-${t}-${r}`,x:String(a),y:String(s),width:String(I),height:String(A),fill:l,stroke:h,"stroke-width":g})),f){const n=po(l)>.5?"#111827":"#ffffff",c=Math.min(12,.3*I,.35*A);e.push(o("text",{key:`val-${t}-${r}`,x:String(a+I/2),y:String(s+A/2),"text-anchor":"middle","dominant-baseline":"central","font-size":String(Math.max(8,c)),"font-weight":d&&p?"bold":"normal","font-family":"sans-serif",fill:n},String(Math.round(100*i)/100)))}}}return e},[S,k,w,$,M,c,I,A,z,C,f,p,u]),R=s(()=>{const e=[];if(y)for(let t=0;t<k;t++){const n=t<y.length?y[t]:"",r=C+20+t*A+A/2;e.push(o("text",{key:`row-label-${t}`,x:String(z-8),y:String(r),"text-anchor":"end","dominant-baseline":"central","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}if(m)for(let t=0;t<w;t++){const n=t<m.length?m[t]:"",r=z+t*I+I/2,i=C+20+k*A+12;e.push(o("text",{key:`col-label-${t}`,x:String(r),y:String(i),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},n))}return e},[y,m,k,w,I,A,z,C]),D=s(()=>h?[o("text",{key:"title",x:String(l/2),y:"22","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},h)]:[],[h,l]);if(0===k||0===w)return o("svg",{width:"100%",viewBox:`0 0 ${l} ${a}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Matrix — no data"},o("text",{x:String(l/2),y:String(a/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"No data to display."));const L=D(),N=F(),T=R();return o("svg",{width:"100%",viewBox:`0 0 ${l} ${a}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Matrix visualization",style:{fontFamily:"sans-serif"}},...L,...N,...T)},exports.Menubar=function(e){const{menus:t}=e,[n,r]=l(null),i=c(null),d=s(e=>{r(e)},[]),f=s(()=>{r(null)},[]);a(()=>{if(null===n)return;const e=e=>{const t=i.current;t&&!t.contains(e.target)&&r(null)};return document.addEventListener("click",e,!0),()=>{document.removeEventListener("click",e,!0)}},[n]),a(()=>{const e=i.current;if(!e)return;const o=o=>{const i=o;if("Escape"!==i.key){if("ArrowRight"===i.key)return i.preventDefault(),void r(e=>null===e?0:(e+1)%t.length);if("ArrowLeft"===i.key)return i.preventDefault(),void r(e=>null===e?t.length-1:(e-1+t.length)%t.length);if("ArrowDown"===i.key&&null!==n){i.preventDefault();const t=e.querySelector('[role="menu"]');if(t){const e=t.querySelector('[role="menuitem"]');e&&e.focus()}return}"Enter"!==i.key&&i.key}else r(null)};return e.addEventListener("keydown",o),()=>{e.removeEventListener("keydown",o)}},[n,t.length]);const p=t.map((e,t)=>o(Fe,{key:String(t),menu:e,index:t,isOpen:n===t,anyOpen:null!==n,onOpen:d,onClose:f}));return o("div",{ref:i,role:"menubar","aria-label":"Menu bar",style:{display:"flex",alignItems:"center",backgroundColor:"#ffffff",borderBottom:"1px solid #e5e7eb",padding:"2px 4px",fontFamily:"inherit",fontSize:"13px",gap:"2px"}},...p)},exports.Modal=function(e){const{open:t,onClose:n,title:r,size:i="md",closeOnOverlay:l=!0,closeOnEscape:s=!0,footer:d,showCloseButton:f=!0,children:p}=e,u=c(null);if(a(()=>{if(!t)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),a(()=>{if(!t||!s)return;const e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,s,n]),a(()=>{t&&u.current&&u.current.focus()},[t]),!t)return null;const h={backgroundColor:"#fff",borderRadius:"full"===i?"0":"8px",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.3)",maxHeight:"full"===i?"100vh":"90vh",width:Ge[i],maxWidth:"full"===i?"100vw":"90vw",display:"flex",flexDirection:"column",outline:"none",overflow:"hidden"},g=[],x=r?"modal-title":void 0;r?g.push(o("h2",{id:x,style:{margin:"0",fontSize:"18px",fontWeight:"600",color:"#111827"}},r)):g.push(o("span",null)),f&&g.push(o("button",{type:"button",style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"#6b7280",padding:"4px 8px",borderRadius:"4px",lineHeight:"1"},onClick:n,"aria-label":"Close modal"},"×"));const y=[o("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 24px",borderBottom:"1px solid #e5e7eb",flexShrink:"0"}},...g),o("div",{style:{padding:"24px",overflow:"auto",flex:"1"}},p)];return d&&y.push(o("div",{style:{padding:"16px 24px",borderTop:"1px solid #e5e7eb",flexShrink:"0"}},d)),o("div",{style:{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"10000"},onClick:e=>{l&&e.target===e.currentTarget&&n()},"aria-modal":"true",role:"dialog","aria-labelledby":x},o("div",{ref:u,style:h,tabIndex:-1,role:"document"},...y))},exports.MultilineField=function(e){const[t,n]=l(!1),[r,i]=l((e.value??e.defaultValue??"").length),a=f().replace(/[^a-zA-Z0-9_-]/g,""),d=e.id??`ml-${a}`,c={...ne(e.inputStyle??{},{focused:t,error:!!e.error}),resize:e.autoResize?"none":"vertical",lineHeight:"1.5",...e.minHeight?{minHeight:e.minHeight}:{},...e.maxHeight?{maxHeight:e.maxHeight}:{}},p=s(t=>{const n=t.target,o=n.value;i(o.length),e.onChange&&e.onChange(o),e.autoResize&&(n.style.height="auto",n.style.height=`${n.scrollHeight}px`)},[e.onChange,e.autoResize]),u=o("textarea",{id:d,name:e.name,value:e.value,placeholder:e.placeholder,rows:String(e.rows??4),maxLength:e.maxLength?String(e.maxLength):void 0,readOnly:e.readOnly,disabled:e.disabled,"aria-invalid":e.error?"true":void 0,"aria-required":e.required?"true":void 0,className:`multiline-input ${e.className??""}`.trim(),style:c,onFocus:()=>n(!0),onBlur:t=>{n(!1),e.onBlur&&e.onBlur(t.target.value)},onInput:p}),h=e.showCount&&e.maxLength?o("div",{style:{fontSize:"11px",color:r>.9*(e.maxLength??1/0)?"#ef4444":"#9ca3af",textAlign:"right",marginTop:"2px"}},`${r}/${e.maxLength}`):e.showCount?o("div",{style:{fontSize:"11px",color:"#9ca3af",textAlign:"right",marginTop:"2px"}},`${r} characters`):null;return o(te,{label:e.label,htmlFor:d,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},u,h)},exports.NavWrapper=ke,exports.NumberSpinner=function(e){const t=f().replace(/[^a-zA-Z0-9_-]/g,""),n=e.id??`ns-${t}`,{value:r,onChange:i,min:a,max:d,step:c=1,disabled:p=!1,prefix:u,suffix:h,label:g,error:x}=e,[y,m]=l(!1),b=s(e=>{let t=e;return void 0!==a&&t<a&&(t=a),void 0!==d&&t>d&&(t=d),t},[a,d]),v=s(()=>{p||i(b(r+c))},[p,r,c,b,i]),S=s(()=>{p||i(b(r-c))},[p,r,c,b,i]),k=s(e=>{const t=e.target.value;if(""===t||"-"===t)return;const n=parseFloat(t);isNaN(n)||i(b(n))},[b,i]),w=s(e=>{p||("ArrowUp"===e.key?(e.preventDefault(),v()):"ArrowDown"===e.key&&(e.preventDefault(),S()))},[p,v,S]),$=void 0===d||r<d,M={display:"inline-flex",alignItems:"stretch",borderRadius:"6px",overflow:"hidden",border:"1px solid "+(x?"#ef4444":y?"#3b82f6":"var(--color-border, #d1d5db)"),transition:"border-color 0.15s",opacity:p?"0.6":"1",...y&&!x?{boxShadow:"0 0 0 3px #3b82f622"}:{}},C=e=>({display:"flex",alignItems:"center",justifyContent:"center",width:"36px",backgroundColor:"var(--color-bg-subtle, #f9fafb)",border:"none",cursor:p||!e?"not-allowed":"pointer",color:p||!e?"#d1d5db":"var(--color-text, #374151)",fontSize:"inherit",fontWeight:"600",userSelect:"none",transition:"background-color 0.1s",borderRight:"none",borderLeft:"none"}),z={display:"flex",alignItems:"center",fontSize:"inherit",color:"var(--color-text-muted, #6b7280)",padding:"0 2px",backgroundColor:"var(--color-bg-subtle, #f9fafb)"},I=o("button",{type:"button",style:C(void 0===a||r>a),onClick:S,disabled:p,"aria-label":"Decrement",tabIndex:-1},"−"),A=u?o("span",{style:z},u):null,F=o("input",{id:n,type:"text",value:String(r),onInput:k,onKeyDown:w,onFocus:()=>m(!0),onBlur:()=>m(!1),disabled:p,style:{flex:"1",minWidth:"32px",textAlign:"center",border:"none",borderLeft:"1px solid var(--color-border, #e5e7eb)",borderRight:"1px solid var(--color-border, #e5e7eb)",outline:"none",fontSize:"inherit",fontFamily:"inherit",backgroundColor:"var(--color-bg, #ffffff)",color:"var(--color-text, #1f2937)",padding:"4px 2px"},"aria-label":g||"Number",role:"spinbutton","aria-valuenow":String(r),"aria-valuemin":void 0!==a?String(a):void 0,"aria-valuemax":void 0!==d?String(d):void 0}),R=h?o("span",{style:z},h):null,D=o("button",{type:"button",style:C($),onClick:v,disabled:p,"aria-label":"Increment",tabIndex:-1},"+"),L=[I];return A&&L.push(A),L.push(F),R&&L.push(R),L.push(D),o(te,{label:g,error:x,disabled:p,htmlFor:n},o("div",{style:M},...L))},exports.Pagination=function(e){const{total:t,pageSize:n,currentPage:r,onChange:i,siblingCount:l=1,showFirstLast:a=!0,showPrevNext:d=!0,disabled:c=!1}=e,f=Math.max(1,Math.ceil(t/n)),p=Math.min(Math.max(1,r),f),u=s(e=>{!c&&e>=1&&e<=f&&e!==p&&i(e)},[c,f,p,i]),h=(e,t,n)=>{const r=c||t<1||t>f||t===p;return o("button",{type:"button",onClick:()=>u(t),disabled:r||void 0,"aria-label":n,style:r?Ne:De},e)},g=function(e,t,n){if(e<=2*n+5)return Re(1,e);const o=Math.max(t-n,1),r=Math.min(t+n,e),i=o>2,l=r<e-1;return!i&&l?[...Re(1,2*n+3),"ellipsis",e]:i&&!l?[1,"ellipsis",...Re(e-2*n-2,e)]:[1,"ellipsis",...Re(o,r),"ellipsis",e]}(f,p,l);let x=0;const y=[];a&&y.push(h("«",1,"Go to first page")),d&&y.push(h("‹",p-1,"Go to previous page"));for(const e of g)if("ellipsis"===e)y.push(o("span",{key:"ellipsis-"+x++,style:Te},"..."));else{const t=e===p;y.push(o("button",{key:String(e),type:"button",onClick:()=>u(e),disabled:c||void 0,"aria-label":`Page ${e}`,"aria-current":t?"page":void 0,style:c?Ne:t?Le:De},String(e)))}return d&&y.push(h("›",p+1,"Go to next page")),a&&y.push(h("»",f,"Go to last page")),o(ke,{orientation:"horizontal",role:"navigation",ariaLabel:"Pagination",keyboardNav:!0,styling:{border:"none",borderRadius:"0",backgroundColor:"transparent",padding:"0",custom:{gap:"4px"}}},...y)},exports.Panel=function(e){const t=!1!==e.bordered,n=e.shadow??"none",[r,i]=l(!!e.defaultCollapsed),f=c(null),[p,u]=l("auto");a(()=>{if(!e.collapsible)return;const t=f.current;t&&u(`${t.scrollHeight}px`)},[e.children,e.collapsible]);const h=s(()=>{e.collapsible&&i(e=>!e)},[e.collapsible]),g=s(t=>{if(!e.collapsible)return;const n=t.key;"Enter"!==n&&" "!==n||(t.preventDefault(),h())},[e.collapsible,h]),x=d(()=>{const o={borderRadius:"6px",overflow:"hidden",backgroundColor:"#ffffff"};return t&&(o.border="1px solid #e5e7eb"),o.boxShadow=me[n]??me.none,{...o,...e.style??{}}},[t,n,e.style]),y={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",gap:"8px",backgroundColor:"#f9fafb",userSelect:"none",cursor:e.collapsible?"pointer":"default"},m={display:"inline-block",width:"0",height:"0",borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:"6px solid #6b7280",transition:"transform 0.2s",transform:r?"rotate(-90deg)":"rotate(0deg)",marginRight:"8px",flexShrink:"0"},b={maxHeight:r?"0":p,overflow:"hidden",transition:"max-height 0.3s ease"};return o("div",{className:`panel ${e.className??""}`.trim(),style:x},o("div",{className:"panel__header",style:y,onClick:h,onKeyDown:g,role:e.collapsible?"button":void 0,tabIndex:e.collapsible?0:void 0,"aria-expanded":e.collapsible?String(!r):void 0},o("div",{style:{display:"flex",alignItems:"center",flex:"1",minWidth:"0",gap:"8px"}},e.collapsible?o("span",{className:"panel__chevron",style:m}):null,e.icon?o("span",{className:"panel__icon"},e.icon):null,e.title?o("span",{className:"panel__title",style:{fontSize:"14px",fontWeight:"600",color:"#111827"}},e.title):null),e.headerRight?o("div",{className:"panel__header-right"},e.headerRight):null),o("div",{className:"panel__body-wrapper",style:e.collapsible?b:{},ref:f},o("div",{className:"panel__body",style:{padding:"16px"}},e.children)))},exports.Partition=function(e){const{data:t,width:n=600,height:r=400,orientation:i="horizontal",showLabels:l=!0,showValues:a=!0,colors:s=ho,borderColor:c="#ffffff",borderWidth:f=1,title:p,padding:u=10}=e,h=p?30:0,g=u,x=u+h,y=n-2*u,m=r-2*u-h;if(d(()=>go(t),[t])<=0||y<=0||m<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Empty partition diagram"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const b=d(()=>function(e,t,n,o,r,i,l){const a=[];if(go(e)<=0)return a;const s=function(e){let t=0;const n=[{node:e,depth:0}];for(;n.length>0;){const{node:e,depth:o}=n.pop();if(o>t&&(t=o),e.children)for(let t=e.children.length-1;t>=0;t--)n.push({node:e.children[t],depth:o+1})}return t}(e)+1,d="horizontal"===i,c=d?r/s:o/s,f=[];for(f.push({node:e,depth:0,spanStart:d?t:n,spanEnd:d?t+o:n+r,colorIndex:0});f.length>0;){const e=f.shift(),{node:o,depth:r,spanStart:i,spanEnd:s,colorIndex:p}=e,u=go(o);if(u<=0)continue;const h=s-i;let g,x,y,m;if(d?(g=i,x=n+r*c,y=h,m=c):(g=t+r*c,x=i,y=c,m=h),a.push({x:g,y:x,w:y,h:m,label:o.label,value:u,color:o.color??l[p%l.length],depth:r}),o.children&&o.children.length>0){let e=i;for(let t=0;t<o.children.length;t++){const n=o.children[t],i=go(n);if(i<=0)continue;const l=i/u*h;f.push({node:n,depth:r+1,spanStart:e,spanEnd:e+l,colorIndex:0===r?t:p}),e+=l}}}return a}(t,g,x,y,m,i,s),[t,g,x,y,m,i,s]),v=[];p&&v.push(o("text",{key:"title",x:String(n/2),y:String(u+16),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p));for(let e=0;e<b.length;e++){const t=b[e];if(v.push(o("rect",{key:`cell-${e}`,x:String(t.x),y:String(t.y),width:String(Math.max(0,t.w)),height:String(Math.max(0,t.h)),fill:t.color,stroke:c,"stroke-width":String(f),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),l&&t.w>20&&t.h>14){const n=Math.floor(t.w/7),r=t.label.length>n?t.label.substring(0,Math.max(1,n-2))+"..":t.label;v.push(o("text",{key:`label-${e}`,x:String(t.x+t.w/2),y:String(t.y+t.h/2+(a?-2:4)),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},r))}a&&t.w>30&&t.h>28&&v.push(o("text",{key:`value-${e}`,x:String(t.x+t.w/2),y:String(t.y+t.h/2+12),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.8)","pointer-events":"none"},String(t.value)))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Partition diagram",style:{fontFamily:"sans-serif"}},...v)},exports.PieGraph=function(e){const{data:t,width:n=400,height:r=400,innerRadius:i=0,padAngle:l=.02,showLabels:a=!0,showValues:s=!0,showLegend:c=!0,legendPosition:f="right",title:p,centerLabel:u,colors:h,strokeColor:g="#fff",strokeWidth:x=2,textColor:y="currentColor"}=e,m=c&&"right"===f?140:0,b=p?30:0,v=c&&"bottom"===f?22*Math.ceil(t.length/2)+10:0,S=n-m,k=r-b-v,w=S/2,$=b+k/2,M=Math.min(S,k)/2-10,C=e.outerRadius??M,z=d(()=>St(t,{padAngle:l,colors:h}),[t,l,h]),I=[];p&&I.push(o("text",{key:"title",x:S/2,y:20,textAnchor:"middle",fontFamily:"sans-serif",fontSize:16,fontWeight:"bold",fill:y},p));for(let e=0;e<z.length;e++){const t=z[e],n=vt(w,$,i,C,t.startAngle,t.endAngle);if(I.push(o("path",{key:`slice-${e}`,d:n,fill:t.color,stroke:g,strokeWidth:x})),a||s){const n=(t.startAngle+t.endAngle)/2,r=t.percentage<5,l=bt(w,$,r?C+14:i+.65*(C-i),n-Math.PI/2),d=r?y:"#fff",c=r?11:12,f=[];if(a&&f.push(t.label),s&&f.push(`${t.percentage.toFixed(1)}%`),r){const t=bt(w,$,C+2,n-Math.PI/2);I.push(o("line",{key:`connector-${e}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,stroke:"#999",strokeWidth:1}))}a&&I.push(o("text",{key:`label-${e}`,x:l.x,y:l.y-(s?6:0),textAnchor:"middle",fontFamily:"sans-serif",fontSize:c,fill:d,pointerEvents:"none"},t.label)),s&&I.push(o("text",{key:`value-${e}`,x:l.x,y:l.y+(a?10:0),textAnchor:"middle",fontFamily:"sans-serif",fontSize:c-1,fill:d,pointerEvents:"none"},`${t.percentage.toFixed(1)}%`))}}if(u&&i>0&&I.push(o("text",{key:"center-label",x:w,y:$,textAnchor:"middle",dominantBaseline:"central",fontFamily:"sans-serif",fontSize:14,fontWeight:"bold",fill:y},u)),c){const e=[];if("right"===f){const t=S+10,n=b+20;for(let r=0;r<z.length;r++){const i=z[r],l=n+22*r;e.push(o("circle",{key:`legend-dot-${r}`,cx:t+6,cy:l,r:6,fill:i.color})),e.push(o("text",{key:`legend-text-${r}`,x:t+18,y:l,dominantBaseline:"central",fontFamily:"sans-serif",fontSize:12,fill:y},`${i.label} (${i.percentage.toFixed(1)}%)`))}}else{const t=r-v+10;for(let r=0;r<z.length;r++){const i=z[r],l=r%2*(n/2)+10,a=t+22*Math.floor(r/2);e.push(o("circle",{key:`legend-dot-${r}`,cx:l+6,cy:a,r:6,fill:i.color})),e.push(o("text",{key:`legend-text-${r}`,x:l+18,y:a,dominantBaseline:"central",fontFamily:"sans-serif",fontSize:12,fill:y},`${i.label} (${i.percentage.toFixed(1)}%)`))}}I.push(...e)}return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet"},...I)},exports.PivotTable=function(e){const{data:t=[],rows:n=[],columns:r=[],values:i=[],aggregation:l="sum",width:a=600,height:s=400,showTotals:c=!0,title:f,headerColor:p="#3b82f6",cellPadding:u=8}=e;if(0===t.length||0===n.length&&0===r.length||0===i.length)return o("svg",{width:"100%",viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"table","aria-label":f??"Empty pivot table"},o("text",{x:String(a/2),y:String(s/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.4"},"No data to display"));const h=d(()=>function(e,t,n,o,r){const i=yo(e,t),l=yo(e,n),a=new Map;for(const r of e){const e=`${xo(r,t)}::${xo(r,n)}`;a.has(e)||a.set(e,[]);const i=a.get(e);let l=0;for(const e of o){const t=r[e];if("number"==typeof t)l+=t;else if("string"==typeof t){const e=parseFloat(t);isNaN(e)||(l+=e)}}i.push(l)}const s=new Map;for(const[e,t]of a)s.set(e,mo(t,r));const d=new Map;for(const e of i){const t=[];for(const n of l){const o=s.get(`${e}::${n}`);void 0!==o&&t.push(o)}d.set(e,mo(t,"count"===r?"sum":r))}const c=new Map;for(const e of l){const t=[];for(const n of i){const o=s.get(`${n}::${e}`);void 0!==o&&t.push(o)}c.set(e,mo(t,"count"===r?"sum":r))}const f=[];for(const e of d.values())f.push(e);return{rowKeys:i,colKeys:l,cells:s,rowTotals:d,colTotals:c,grandTotal:mo(f,"count"===r?"sum":r)}}(t,n,r,i,l),[t,n,r,i,l]),{rowKeys:g,colKeys:x,cells:y,rowTotals:m,colTotals:b,grandTotal:v}=h,S=f?30:0,k=x.length+(c?1:0),w=g.length+(c?1:0),$=1+k,M=1+w,C=Math.max(40,(a-2*u)/$),z=Math.max(20,Math.min(36,(s-S-2*u)/M)),I=C*$,A=z*M,F=Math.max(0,(a-I)/2),R=S+Math.max(0,(s-S-A)/2),D=[];f&&D.push(o("text",{key:"title",x:String(a/2),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},f)),D.push(o("rect",{key:"header-row-bg",x:String(F),y:String(R),width:String(I),height:String(z),fill:p})),D.push(o("rect",{key:"header-col-bg",x:String(F),y:String(R+z),width:String(C),height:String(z*w),fill:p,opacity:"0.85"})),D.push(o("text",{key:"corner",x:String(F+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},l.toUpperCase()));for(let e=0;e<x.length;e++){const t=F+(e+1)*C,n=Math.floor(C/7),r=x[e],i=r.length>n?r.substring(0,Math.max(1,n-2))+"..":r;D.push(o("text",{key:`ch-${e}`,x:String(t+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},i))}c&&D.push(o("text",{key:"ch-total",x:String(F+(x.length+1)*C+C/2),y:String(R+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},"Total"));for(let e=0;e<g.length;e++){const t=g[e],n=R+(e+1)*z;e%2==0&&D.push(o("rect",{key:`row-bg-${e}`,x:String(F+C),y:String(n),width:String(C*k),height:String(z),fill:"#f9fafb"}));const r=Math.floor(C/7),i=t.length>r?t.substring(0,Math.max(1,r-2))+"..":t;D.push(o("text",{key:`rh-${e}`,x:String(F+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#ffffff"},i));for(let r=0;r<x.length;r++){const i=`${t}::${x[r]}`,l=y.get(i),a=F+(r+1)*C;D.push(o("rect",{key:`border-${e}-${r}`,x:String(a),y:String(n),width:String(C),height:String(z),fill:"none",stroke:"#e5e7eb","stroke-width":"0.5"})),D.push(o("text",{key:`cell-${e}-${r}`,x:String(a+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif",fill:"currentColor"},void 0!==l?bo(l):"-"))}if(c){const r=F+(x.length+1)*C,i=m.get(t)??0;D.push(o("rect",{key:`rt-bg-${e}`,x:String(r),y:String(n),width:String(C),height:String(z),fill:"#eff6ff"})),D.push(o("text",{key:`rt-${e}`,x:String(r+C/2),y:String(n+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},bo(i)))}}if(c){const e=R+(g.length+1)*z;D.push(o("rect",{key:"total-row-bg",x:String(F),y:String(e),width:String(I),height:String(z),fill:"#eff6ff"})),D.push(o("text",{key:"total-label",x:String(F+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},"Total"));for(let t=0;t<x.length;t++){const n=x[t],r=b.get(n)??0,i=F+(t+1)*C;D.push(o("text",{key:`ct-${t}`,x:String(i+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:"#1e40af"},bo(r)))}const t=F+(x.length+1)*C;D.push(o("text",{key:"grand-total",x:String(t+C/2),y:String(e+z/2+4),"text-anchor":"middle","font-size":"12","font-family":"sans-serif","font-weight":"bold",fill:"#1e3a8a"},bo(v)))}return D.push(o("rect",{key:"outer-border",x:String(F),y:String(R),width:String(I),height:String(A),fill:"none",stroke:"#d1d5db","stroke-width":"1"})),o("svg",{width:"100%",viewBox:`0 0 ${a} ${s}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"table","aria-label":f??"Pivot table",style:{fontFamily:"sans-serif"}},...D)},exports.PolarGraph2D=function(e){const{width:t=400,height:n=400,rRange:r=[0,2],plotFunction:i,plotResolution:f=360,thetaStep:p,sync:u=!1,points:h=[],showGrid:g=!0,pointRadius:x=3,pointColor:y="#3b82f6",curveColor:m="#3b82f6",onPointClick:b,onPointDoubleClick:v,onPointContextMenu:S,onPointHover:k}=e,[w,$]=l(r[1]),[M,C]=l(0),[z,I]=l(0),[A,F]=l(null),R=t/2+M,D=n/2+z,L=Math.min(t,n)/2-30,N=L/w,T=d(()=>{const e=Math.max(1,Math.ceil(w)),t=[],n=w/e;for(let o=1;o<=e;o++)t.push(n*o);return t},[w]),W=d(()=>{const e=[];for(let t=0;t<360;t+=30)e.push(t*Math.PI/180);return e},[]),B=d(()=>{if(!i||!u)return[];const e=p??2*Math.PI/f,t=it({start:0,end:2*Math.PI,step:e});return lt(i,t)},[i,f,p,u]),[E,P]=l([]),H=c(null);a(()=>{if(!i||u)return void P([]);const e=p??2*Math.PI/f,t=it({start:0,end:2*Math.PI,step:e});return H.current&&H.current(),H.current=at(i,t,200,e=>{P([...e])}),()=>{H.current&&H.current()}},[i,f,p,u]);const j=u?B:E,_=d(()=>{if(0===j.length)return"";const e=[];for(let t=0;t<j.length;t++){const n=j[t],o=n.output;if(o<0||!isFinite(o))continue;const{x:r,y:i}=kt(o,n.input,R,D,N);e.push(`${0===e.length?"M":"L"}${r.toFixed(2)},${i.toFixed(2)}`)}return e.join(" ")},[j,R,D,N]),Y=s(e=>{F({x:e.clientX,y:e.clientY,px:M,py:z})},[M,z]),q=s(e=>{A&&(C(A.px+(e.clientX-A.x)),I(A.py+(e.clientY-A.y)))},[A]),O=s(()=>{F(null)},[]),U=s(e=>{e.preventDefault();const t=e.deltaY>0?1.15:1/1.15;$(Math.max(.1,w*t))},[w]),G=s((e,t,n)=>{if(e)return o=>e({r:t.r,theta:t.theta,index:n,event:o})},[]),V=[];if(V.push(o("rect",{x:0,y:0,width:t,height:n,fill:"white",key:"bg"})),g){for(let e=0;e<T.length;e++){const t=T[e]*N;V.push(o("circle",{cx:R,cy:D,r:t,fill:"none",stroke:"#e5e7eb","stroke-width":1,key:`gc-${e}`})),V.push(o("text",{x:R+t+2,y:D-4,"font-size":10,fill:"#9ca3af",key:`gl-${e}`},T[e].toFixed(1)))}for(let e=0;e<W.length;e++){const t=W[e],n=T[T.length-1]*N,r=R+n*Math.cos(t),i=D-n*Math.sin(t);V.push(o("line",{x1:R,y1:D,x2:r,y2:i,stroke:"#e5e7eb","stroke-width":1,key:`al-${e}`}));const l=Math.round(180*t/Math.PI),a=R+(n+14)*Math.cos(t),s=D-(n+14)*Math.sin(t);V.push(o("text",{x:a,y:s+4,"text-anchor":"middle","font-size":10,fill:"#9ca3af",key:`at-${e}`},`${l}°`))}}V.push(o("line",{x1:R-L,y1:D,x2:R+L,y2:D,stroke:"#d1d5db","stroke-width":1,key:"x-axis"})),V.push(o("line",{x1:R,y1:D-L,x2:R,y2:D+L,stroke:"#d1d5db","stroke-width":1,key:"y-axis"})),_&&V.push(o("path",{d:_,fill:"none",stroke:m,"stroke-width":2,key:"curve"}));for(let e=0;e<h.length;e++){const t=h[e],{x:n,y:r}=kt(t.r,t.theta,R,D,N);V.push(o("circle",{cx:n,cy:r,r:x,fill:y,key:`pt-${e}`,style:{cursor:"pointer"},onClick:G(b,t,e),onDblClick:G(v,t,e),onContextMenu:G(S,t,e),onMouseEnter:G(k,t,e)}))}return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",style:{cursor:A?"grabbing":"grab"},onMouseDown:Y,onMouseMove:q,onMouseUp:O,onMouseLeave:O,onWheel:U},...V)},exports.Popover=function(e){const{trigger:t,content:n,open:r,placement:i="bottom",offset:d=4,arrow:f=!1,closeOnClickOutside:p=!0,onOpenChange:u}=e,h=void 0!==r,[g,x]=l(!1),y=h?r:g,m=c(null),b=s(()=>{h?u&&u(!r):x(e=>!e)},[h,r,u]);a(()=>{if(!y||!p)return;const e=e=>{m.current&&!m.current.contains(e.target)&&(h?u&&u(!1):x(!1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[y,p,h,u]);const v={...Ve(i,d),backgroundColor:"#fff",borderRadius:"8px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",border:"1px solid #e5e7eb",padding:"12px 16px",zIndex:"10000",whiteSpace:"nowrap"},S=[n];f&&S.push(o("div",{style:Xe(i)}));const k=s(e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),b())},[b]),w=[o("div",{onClick:b,onKeyDown:k,role:"button",tabIndex:0,style:{display:"inline-block"}},t)];return y&&w.push(o("div",{style:v},...S)),o("div",{ref:m,style:{position:"relative",display:"inline-block"}},...w)},exports.ProgressBar=function(e){const t=e.max??100,n=e.indeterminate?0:Math.min(Math.max(e.value??0,0),t),r=t>0?n/t*100:0,i=e.color??"#3b82f6",l=e.backgroundColor??"#e5e7eb",a=e.height??("string"==typeof e.size?e.size:"number"==typeof e.size?`${e.size}px`:"8px"),s=e.variant??"bar",c=f().replace(/[^a-zA-Z0-9_-]/g,"");if("circular"===s){const t="number"==typeof e.size?e.size:48,n=Math.max(2,Math.round(t/10)),a=(t-n)/2,s=2*Math.PI*a,d=e.indeterminate?.75*s:s-r/100*s,f=e.indeterminate?`@keyframes liq-spin-${c}{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`:e.animated?`@keyframes liq-pulse-${c}{0%,100%{opacity:1}50%{opacity:0.6}}`:"";return o("div",{role:"progressbar","aria-valuenow":e.indeterminate?void 0:String(Math.round(r)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Progress",style:{display:"inline-flex",alignItems:"center",gap:"8px"}},f?o("style",null,f):null,o("svg",{width:String(t),height:String(t),viewBox:`0 0 ${t} ${t}`,style:e.indeterminate?{animation:`liq-spin-${c} 1s linear infinite`}:e.animated?{animation:`liq-pulse-${c} 1.5s ease-in-out infinite`}:{}},o("circle",{cx:String(t/2),cy:String(t/2),r:String(a),fill:"none",stroke:l,"stroke-width":String(n)}),o("circle",{cx:String(t/2),cy:String(t/2),r:String(a),fill:"none",stroke:i,"stroke-width":String(n),"stroke-dasharray":String(s),"stroke-dashoffset":String(d),"stroke-linecap":"round",transform:`rotate(-90 ${t/2} ${t/2})`,style:{transition:"stroke-dashoffset 0.3s ease"}})),e.showLabel&&!e.indeterminate?o("span",{style:{fontSize:"14px",color:"#374151"}},`${Math.round(r)}%`):null)}const p=e.animated||e.indeterminate?`@keyframes liq-shimmer-${c}{0%{background-position:-200% 0}100%{background-position:200% 0}}`:"",u=e.indeterminate?`@keyframes liq-indeterminate-${c}{0%{left:-40%;width:40%}50%{left:20%;width:60%}100%{left:100%;width:40%}}`:"",h={width:"100%",height:a,backgroundColor:l,borderRadius:a,overflow:"hidden",position:"relative"},g=d(()=>{const t={height:"100%",borderRadius:a,transition:"width 0.3s ease"};return e.indeterminate?(t.position="absolute",t.animation=`liq-indeterminate-${c} 1.5s ease-in-out infinite`,t.backgroundColor=i):(t.width=`${r}%`,t.backgroundColor=i),e.animated&&!e.indeterminate&&(t.backgroundImage=`linear-gradient(90deg, ${i} 0%, ${function(e){const t=e.replace("#","");if(6!==t.length)return e;const n=Math.min(255,parseInt(t.slice(0,2),16)+40),o=Math.min(255,parseInt(t.slice(2,4),16)+40),r=Math.min(255,parseInt(t.slice(4,6),16)+40);return`#${n.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}`}(i)} 50%, ${i} 100%)`,t.backgroundSize="200% 100%",t.animation=`liq-shimmer-${c} 1.5s ease-in-out infinite`),t},[r,i,a,e.animated,e.indeterminate,c]);return o("div",{role:"progressbar","aria-valuenow":e.indeterminate?void 0:String(Math.round(r)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Progress",style:{width:"100%"}},p||u?o("style",null,p+u):null,e.showLabel&&!e.indeterminate?o("div",{style:{marginBottom:"4px",fontSize:"12px",color:"#374151",textAlign:"right"}},`${Math.round(r)}%`):null,o("div",{style:h},o("div",{style:g})))},exports.RadarChart=function(e){const{axes:t=[],series:n=[],width:r=500,height:i=500,levels:l=5,showLabels:a=!0,showValues:c=!1,showLegend:f=!0,showDots:p=!0,gridColor:u="#d1d5db",title:h}=e,g=t.length,x=h?30:0,y=f&&n.length>0?30:0,m=Math.min((r-120)/2,(i-120-x-y)/2),b=r/2,v=60+x+m,S=d(()=>{const e=[];for(let o=0;o<g;o++){const r=t[o]?.max;if(void 0!==r&&r>0){e.push(r);continue}let i=0;for(const e of n){const t=e.values[o];void 0!==t&&t>i&&(i=t)}e.push(i>0?i:1)}return e},[t,n,g]),k=s(()=>{if(g<3)return[];const e=[];for(let t=1;t<=l;t++){const n=m*t/l,r=[];for(let e=0;e<g;e++){const t=vo(e,g),o=So(b,v,n,t);r.push(`${o.x},${o.y}`)}e.push(o("polygon",{key:`ring-${t}`,points:r.join(" "),fill:"none",stroke:u,"stroke-width":t===l?"1.5":"0.5","stroke-dasharray":t===l?"none":"3 2"}))}for(let t=0;t<g;t++){const n=vo(t,g),r=So(b,v,m,n);e.push(o("line",{key:`spoke-${t}`,x1:String(b),y1:String(v),x2:String(r.x),y2:String(r.y),stroke:u,"stroke-width":"0.75"}))}return e},[g,l,m,b,v,u]),w=s(()=>{if(!a||g<3)return[];const e=[];for(let n=0;n<g;n++){const r=vo(n,g),i=So(b,v,m+16,r);let l="middle";i.x<b-5?l="end":i.x>b+5&&(l="start");const a=Math.abs(i.y-v)<5?"0.35em":i.y<v?"0em":"0.7em";e.push(o("text",{key:`label-${n}`,x:String(i.x),y:String(i.y),"text-anchor":l,dy:a,"font-size":"12","font-family":"sans-serif",fill:"currentColor"},t[n]?.label??`Axis ${n}`))}return e},[a,g,t,m,b,v]),$=s(()=>{if(g<3||0===n.length)return[];const e=[];for(let t=0;t<n.length;t++){const r=n[t],i=[],l=[],a=[];for(let e=0;e<g;e++){const n=r.values[e]??0,s=S[e],d=Math.min(n/s,1),f=m*d,u=vo(e,g),h=So(b,v,f,u);i.push(`${h.x},${h.y}`),p&&l.push(o("circle",{key:`dot-${t}-${e}`,cx:String(h.x),cy:String(h.y),r:"3.5",fill:r.color,stroke:"#fff","stroke-width":"1.5"})),c&&a.push(o("text",{key:`val-${t}-${e}`,x:String(h.x),y:String(h.y-8),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:r.color},String(Math.round(100*n)/100)))}e.push(o("polygon",{key:`series-fill-${t}`,points:i.join(" "),fill:r.color,"fill-opacity":String(r.fillOpacity??.15),stroke:"none"})),e.push(o("polygon",{key:`series-line-${t}`,points:i.join(" "),fill:"none",stroke:r.color,"stroke-width":"2","stroke-linejoin":"round"}));for(const t of l)e.push(t);for(const t of a)e.push(t)}return e},[g,n,S,m,b,v,p,c]),M=s(()=>{if(!f||0===n.length)return[];const e=[],t=v+m+40,r=100*n.length,i=b-r/2;for(let r=0;r<n.length;r++){const l=n[r],a=i+100*r;e.push(o("rect",{key:`legend-swatch-${r}`,x:String(a),y:String(t),width:"12",height:"12",rx:"2",fill:l.color})),e.push(o("text",{key:`legend-text-${r}`,x:String(a+16),y:String(t+10),"font-size":"12","font-family":"sans-serif",fill:"currentColor"},l.label))}return e},[f,n,b,v,m]),C=s(()=>h?[o("text",{key:"title",x:String(r/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"currentColor"},h)]:[],[h,r]);if(g<3)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Radar chart — insufficient axes"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"currentColor",opacity:"0.6"},"Radar chart requires at least 3 axes."));const z=k(),I=w(),A=$(),F=M(),R=C();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Radar chart",style:{fontFamily:"sans-serif"}},...R,...z,...I,...A,...F)},exports.RadioGroup=function(e){const t=f(),n=e.id??t,{options:r,value:i,onChange:l,name:a,direction:d="vertical",disabled:c=!1,error:p,label:u}=e,h=s(e=>{c||l(e)},[c,l]),g=s(e=>{if(c)return;const t=r.filter(e=>!e.disabled);if(0===t.length)return;const n=t.findIndex(e=>e.value===i);let o=n;if("ArrowDown"===e.key||"ArrowRight"===e.key)e.preventDefault(),o=n<t.length-1?n+1:0;else{if("ArrowUp"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault(),o=n>0?n-1:t.length-1}l(t[o].value)},[c,r,i,l]),x={display:"flex",flexDirection:"horizontal"===d?"row":"column",gap:"horizontal"===d?"16px":"8px"},y=r.map((e,t)=>{const r=e.value===i,l=c||!!e.disabled,s=`${n}-opt-${t}`,d={width:"18px",height:"18px",minWidth:"18px",borderRadius:"50%",border:"2px solid "+(p?"#ef4444":r?"#3b82f6":"#d1d5db"),display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color 0.15s",boxSizing:"border-box"},f={width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#3b82f6",transition:"transform 0.15s",transform:r?"scale(1)":"scale(0)"},u={display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer",opacity:l?"0.5":"1",userSelect:"none"};return o("label",{key:e.value,htmlFor:s,style:u,onClick:l?void 0:t=>{t.preventDefault(),h(e.value)}},o("input",{type:"radio",id:s,name:a,value:e.value,checked:r,disabled:l,style:{position:"absolute",opacity:"0",width:"0",height:"0",pointerEvents:"none"},tabIndex:-1}),o("div",{style:d},o("div",{style:f})),o("span",{style:{fontSize:"14px",color:"#374151"}},e.label))});return o(te,{label:u,error:p,htmlFor:`${n}-opt-0`},o("div",{id:n,style:x,role:"radiogroup","aria-label":u,onKeyDown:g,tabIndex:c?-1:0},...y))},exports.SankeyDiagram=function(e){const{nodes:t,links:n,width:r=800,height:i=500,nodeWidth:l=20,nodePadding:a=10,showLabels:c=!0,showValues:f=!1,linkOpacity:p=.4,colors:u=ko,title:h,padding:g=40}=e;if(!t||0===t.length)return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Empty Sankey diagram"},o("text",{x:String(r/2),y:String(i/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#6b7280"},"No data"));const x=d(()=>function(e,t,n,o,r,i,l,a){if(0===e.length)return{layoutNodes:[],layoutLinks:[]};const s=n-2*l,d=o-2*l,c=t.filter(e=>e.value>0),f=e.map(e=>e.id),p=function(e,t){const n=new Map,o=new Map,r=new Map;for(const t of e)o.set(t,new Set),r.set(t,[]);for(const e of t){if(e.value<=0)continue;const t=o.get(e.target);t&&t.add(e.source);const n=r.get(e.source);n&&n.push(e.target)}const i=[];for(const t of e)0===o.get(t).size&&(n.set(t,0),i.push(t));if(0===i.length){for(const t of e)n.set(t,0);return n}let l=0;for(;l<i.length;){const e=i[l];l++;const t=n.get(e),o=r.get(e)??[];for(const e of o){const o=n.get(e),r=t+1;(void 0===o||r>o)&&n.set(e,r),i.includes(e)||i.push(e)}}for(const t of e)n.has(t)||n.set(t,0);return n}(f,c),u=new Map,h=new Map;for(const e of f)u.set(e,0),h.set(e,0);for(const e of c)h.set(e.source,(h.get(e.source)??0)+e.value),u.set(e.target,(u.get(e.target)??0)+e.value);let g=0;for(const e of p.values())e>g&&(g=e);const x=new Map;for(let e=0;e<=g;e++)x.set(e,[]);for(const[e,t]of p)x.get(t).push(e);const y=new Map,m=g>0?(s-r)/g:0;for(let e=0;e<=g;e++)y.set(e,l+e*m);const b=new Map;for(let t=0;t<e.length;t++)b.set(e[t].id,e[t]);const v=[],S=new Map;for(let t=0;t<=g;t++){const n=x.get(t);if(0===n.length)continue;let o=0;for(const e of n){const t=u.get(e)??0,n=h.get(e)??0;o+=Math.max(t,n,1)}const r=d-i*(n.length-1),s=o>0?r/o:1;let c=l;for(let o=0;o<n.length;o++){const r=n[o],l=b.get(r),d=u.get(r)??0,f=h.get(r)??0,p=Math.max(d,f,1),g=Math.max(4,p*s),x=e.findIndex(e=>e.id===r),m={id:r,label:l.label,color:l.color??a[x%a.length],column:t,x:y.get(t),y:c,height:g,totalIn:d,totalOut:f,totalValue:p};v.push(m),S.set(r,m),c+=g+i}}const k=new Map,w=new Map;for(const e of f)k.set(e,0),w.set(e,0);const $=[...c].sort((e,t)=>t.value-e.value),M=[];for(const e of $){const t=S.get(e.source),n=S.get(e.target);if(!t||!n)continue;const o=t.totalOut||1,r=n.totalIn||1,i=e.value/o*t.height,l=e.value/r*n.height,a=Math.max(1,(i+l)/2),s=k.get(e.source),d=w.get(e.target),c=t.y+s+i/2,f=n.y+d+l/2;k.set(e.source,s+i),w.set(e.target,d+l);const p=b.get(e.source);M.push({source:e.source,target:e.target,value:e.value,color:e.color??p?.color??t.color,sourceY:c,targetY:f,width:a})}return{layoutNodes:v,layoutLinks:M}}(t,n,r,i,l,a,g,u),[t,n,r,i,l,a,g,u]),y=s(()=>{const e=[];for(let t=0;t<x.layoutLinks.length;t++){const n=x.layoutLinks[t],r=x.layoutNodes.find(e=>e.id===n.source),i=x.layoutNodes.find(e=>e.id===n.target);if(!r||!i)continue;const a=r.x+l,s=i.x,d=(a+s)/2,c=`M ${a} ${n.sourceY} C ${d} ${n.sourceY}, ${d} ${n.targetY}, ${s} ${n.targetY}`;e.push(o("path",{key:`link-${t}`,d:c,fill:"none",stroke:n.color,"stroke-width":String(Math.max(1,n.width)),"stroke-opacity":String(p),"stroke-linecap":"butt"})),f&&n.value>0&&e.push(o("text",{key:`link-val-${t}`,x:String(d),y:String((n.sourceY+n.targetY)/2-4),"text-anchor":"middle","font-size":"9","font-family":"sans-serif",fill:"#6b7280","pointer-events":"none"},String(n.value)))}return e},[x,l,p,f]),m=s(()=>{const e=[];for(let t=0;t<x.layoutNodes.length;t++){const n=x.layoutNodes[t];if(e.push(o("rect",{key:`node-${n.id}`,x:String(n.x),y:String(n.y),width:String(l),height:String(n.height),fill:n.color,stroke:"#374151","stroke-width":"0.5",role:"img","aria-label":`${n.label}: ${n.totalValue}`})),c){const t=x.layoutNodes.reduce((e,t)=>Math.max(e,t.column),0),r=n.column===t,i=r?n.x+l+6:n.x-6,a=r?"start":"end",s=0===n.column,d=s?n.x-6:i,c=s?"end":a;e.push(o("text",{key:`label-${n.id}`,x:String(d),y:String(n.y+n.height/2+4),"text-anchor":c,"font-size":"11","font-family":"sans-serif",fill:"#374151","pointer-events":"none"},n.label))}}return e},[x,l,c]),b=s(()=>h?[o("text",{key:"title",x:String(r/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,r,g]),v=y(),S=m(),k=b();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Sankey diagram",style:{fontFamily:"sans-serif"}},...k,...v,...S)},exports.ScrollContainer=function(e){const t=e.direction??"vertical",n=e.showScrollbar??"auto",r=e.shadow??!1,i=c(null),[f,p]=l(!0),[u,h]=l(!1),[g,x]=l(!0),[y,m]=l(!1),b=s(()=>{const e=i.current;e&&(p(e.scrollTop<=2),h(e.scrollTop+e.clientHeight>=e.scrollHeight-2),x(e.scrollLeft<=2),m(e.scrollLeft+e.clientWidth>=e.scrollWidth-2))},[]);a(()=>{b()},[b]);const v=s(()=>{r&&b()},[r,b]),S=d(()=>{const o={position:"relative",overflowX:be(t,"x"),overflowY:be(t,"y"),...ve(n)};return e.maxHeight&&(o.maxHeight=e.maxHeight),e.maxWidth&&(o.maxWidth=e.maxWidth),e.padding&&(o.padding=e.padding),{...o,...e.style??{}}},[t,n,e.maxHeight,e.maxWidth,e.padding,e.style]),k=[];if(r){const e="vertical"===t||"both"===t,n="horizontal"===t||"both"===t;e&&!f&&k.push("inset 0 8px 6px -6px rgba(0,0,0,0.15)"),e&&!u&&k.push("inset 0 -8px 6px -6px rgba(0,0,0,0.15)"),n&&!g&&k.push("inset 8px 0 6px -6px rgba(0,0,0,0.15)"),n&&!y&&k.push("inset -8px 0 6px -6px rgba(0,0,0,0.15)")}const w={...S};return k.length>0&&(w.boxShadow=k.join(", ")),o("div",{className:`scroll-container scroll-container--${t} ${e.className??""}`.trim(),style:w,ref:i,onScroll:v},e.children)},exports.Select=function(e){const t=f(),n=e.id??t,{options:r,value:i,onChange:p,placeholder:u="Select...",searchable:h=!1,multiple:g=!1,clearable:x=!1,disabled:y=!1,error:m,label:b,helpText:v}=e,[S,k]=l(!1),[w,$]=l(""),[M,C]=l(-1),z=c(null),I=d(()=>Array.isArray(i)?i:i?[i]:[],[i]),A=d(()=>{if(!h||!w)return r;const e=w.toLowerCase();return r.filter(t=>t.label.toLowerCase().includes(e))},[r,w,h]),F=d(()=>{const e={},t=[];for(const n of A)n.group?(e[n.group]||(e[n.group]=[]),e[n.group].push(n)):t.push(n);return{groups:e,ungrouped:t}},[A]),R=d(()=>0===I.length?"":I.map(e=>r.find(t=>t.value===e)).filter(Boolean).map(e=>e.label).join(", "),[I,r]);a(()=>{const e=e=>{const t=e.target;z.current&&!z.current.contains(t)&&(k(!1),$(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const D=s(e=>{if(g){const t=I.includes(e)?I.filter(t=>t!==e):[...I,e];p(t)}else p(e),k(!1),$("")},[g,I,p]),L=s(e=>{e.stopPropagation(),p(g?[]:"")},[g,p]),N=s(e=>{if(y)return;const t=e.key;if(!S&&("Enter"===t||" "===t||"ArrowDown"===t))return e.preventDefault(),k(!0),void C(0);if(S){if("Escape"===t)return k(!1),void $("");if("ArrowDown"===t)e.preventDefault(),C(e=>Math.min(e+1,A.length-1));else if("ArrowUp"===t)e.preventDefault(),C(e=>Math.max(e-1,0));else if("Enter"===t&&M>=0&&M<A.length){e.preventDefault();const t=A[M];t.disabled||D(t.value)}}},[y,S,M,A,D]),T={...ne({},{focused:S,error:!!m}),display:"flex",alignItems:"center",justifyContent:"space-between",cursor:y?"not-allowed":"pointer",minHeight:"38px",userSelect:"none"},W=(e,t)=>{const n=I.includes(e.value),r=t===M,i={padding:"8px 12px",cursor:e.disabled?"not-allowed":"pointer",backgroundColor:r?"#f3f4f6":n?"#eff6ff":"transparent",color:e.disabled?"#9ca3af":"#1f2937",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px"};return o("div",{key:e.value,style:i,onClick:e.disabled?void 0:()=>D(e.value),onMouseEnter:()=>C(t),role:"option","aria-selected":n?"true":"false","aria-disabled":e.disabled?"true":void 0},g&&n?o("span",{style:{color:"#3b82f6",fontWeight:"700"}},"✓"):null,e.label)},B=o("span",{style:{marginLeft:"8px",fontSize:"10px",transition:"transform 0.15s",transform:S?"rotate(180deg)":"rotate(0deg)",color:"#6b7280"}},"▼"),E=o("div",{style:T,id:n,onClick:y?void 0:()=>{k(!S),C(-1)},onKeyDown:N,tabIndex:y?-1:0,role:"combobox","aria-expanded":S?"true":"false","aria-haspopup":"listbox"},o("span",{style:{flex:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:R?"#1f2937":"#9ca3af"}},R||u),o("span",{style:{display:"flex",alignItems:"center",gap:"4px"}},x&&I.length>0?o("span",{onClick:L,onKeyDown:e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),e.stopPropagation(),L(e))},style:{cursor:"pointer",color:"#9ca3af",fontSize:"14px",lineHeight:"1"},role:"button",tabIndex:0,"aria-label":"Clear selection"},"✕"):null,B)),P=h&&S?o("input",{type:"text",value:w,onInput:e=>{$(e.target.value),C(0)},placeholder:"Search...",style:{width:"100%",boxSizing:"border-box",padding:"8px 12px",border:"none",borderBottom:"1px solid #e5e7eb",outline:"none",fontSize:"14px"}}):null,H=S?o("div",{style:{position:"absolute",top:"100%",left:"0",right:"0",marginTop:"4px",backgroundColor:"#ffffff",border:"1px solid #d1d5db",borderRadius:"6px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",zIndex:"1000",maxHeight:"240px",overflowY:"auto"},role:"listbox"},P,...(()=>{const e=[];let t=0;const{groups:n,ungrouped:r}=F;for(const n of r)e.push(W(n,t++));for(const r of Object.keys(n)){e.push(o("div",{key:`group-${r}`,style:{padding:"6px 12px",fontSize:"11px",fontWeight:"600",color:"#6b7280",textTransform:"uppercase",letterSpacing:"0.05em"}},r));for(const o of n[r])e.push(W(o,t++))}return 0===e.length&&e.push(o("div",{style:{padding:"8px 12px",color:"#9ca3af",fontSize:"14px"}},"No options")),e})()):null;return o(te,{label:b,error:m,helpText:v,disabled:y,htmlFor:n},o("div",{ref:z,style:{position:"relative"}},E,H))},exports.Sidebar=function(e){const{items:t,collapsed:n=!1,onToggleCollapse:r,selectedId:i,onSelect:l,width:a="240px",collapsedWidth:s="56px"}=e,d=n?"number"==typeof s?`${s}px`:s:"number"==typeof a?`${a}px`:a,c=r?o("button",{type:"button",onClick:r,"aria-label":n?"Expand sidebar":"Collapse sidebar",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",padding:"10px 0",border:"none",borderBottom:"1px solid #e5e7eb",backgroundColor:"transparent",cursor:"pointer",fontSize:"14px",color:"#6b7280",fontFamily:"inherit"}},n?"▶":"◀"):null,f=t.map(e=>o(We,{key:e.id,item:e,collapsed:n,selectedId:i,onSelect:l,depth:0}));return o(ke,{orientation:"vertical",role:"navigation",ariaLabel:"Sidebar",keyboardNav:!0,styling:{width:d,border:"1px solid #e5e7eb",borderRadius:"0",padding:"0",backgroundColor:"#ffffff",custom:{height:"100%",transition:"width 0.2s",overflow:"hidden"}}},c,...f)},exports.Skeleton=function(e){const t=e.variant??"text",n=!1!==e.animated,r=f().replace(/[^a-zA-Z0-9_-]/g,""),i=d(()=>n?`@keyframes liq-shimmer-${r}{0%{background-position:-200% 0}100%{background-position:200% 0}}`:"",[n,r]),l="number"==typeof e.width?`${e.width}px`:e.width,a="number"==typeof e.height?`${e.height}px`:e.height;if("text"===t){const t=e.lines??1,s=[];for(let i=0;i<t;i++){const d=i===t-1&&t>1;s.push(o("div",{key:String(i),style:J({width:d?"75%":l??"100%",height:a??"1em",borderRadius:e.borderRadius??"4px",animated:n,animId:r,marginBottom:i<t-1?"8px":"0"})}))}return o("div",{"aria-hidden":"true",style:{width:l??"100%"}},i?o("style",null,i):null,...s)}if("circular"===t){const e=l??a??"40px";return o("div",{"aria-hidden":"true"},i?o("style",null,i):null,o("div",{style:J({width:e,height:e,borderRadius:"50%",animated:n,animId:r})}))}return o("div",{"aria-hidden":"true"},i?o("style",null,i):null,o("div",{style:J({width:l??"100%",height:a??"100px",borderRadius:e.borderRadius??"4px",animated:n,animId:r})}))},exports.Slider=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,min:p=0,max:u=100,step:h=1,showValue:g=!1,showTicks:x=!1,disabled:y=!1,marks:m,range:b=!1,label:v,error:S}=e,k=c(null),[w,$]=l(null),M=d(()=>{if(b&&Array.isArray(r))return r;const e="number"==typeof r?r:0;return[e,e]},[r,b]),C=e=>{const t=Math.round((e-p)/h)*h+p;return Math.max(p,Math.min(u,t))},z=e=>(e-p)/(u-p)*100,I=s(e=>{if(!k.current)return p;const t=k.current.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));return C(p+n*(u-p))},[p,u,h]),A=s(e=>t=>{y||(t.preventDefault(),$(e))},[y]),F=s(e=>{if(y)return;const t=I(e);if(b){const e=Math.abs(t-M[0]),n=Math.abs(t-M[1]);i(e<=n?[C(t),M[1]]:[M[0],C(t)])}else i(C(t))},[y,I,b,M,i,p,u,h]);a(()=>{if(!w)return;const e=e=>{const t=I(e);"single"===w?i(C(t)):"start"===w?i([Math.min(C(t),M[1]),M[1]]):"end"===w&&i([M[0],Math.max(M[0],C(t))])},t=()=>$(null);return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}},[w,I,M,i,p,u,h]);const R=s(e=>{if(y)return;let t=0;if("ArrowRight"===e.key||"ArrowUp"===e.key)t=h;else{if("ArrowLeft"!==e.key&&"ArrowDown"!==e.key)return;t=-h}e.preventDefault(),b||i(C(("number"==typeof r?r:0)+t))},[y,h,b,r,i,p,u]),D={position:"relative",width:"100%",height:"6px",backgroundColor:"#e5e7eb",borderRadius:"3px",cursor:y?"not-allowed":"pointer"},L=b?z(M[0]):0,N={position:"absolute",top:"0",left:`${L}%`,width:z(b?M[1]:M[0])-L+"%",height:"100%",backgroundColor:y?"#9ca3af":"#3b82f6",borderRadius:"3px"},T=e=>v?"start"===e?`${v} minimum`:"end"===e?`${v} maximum`:v:"start"===e?"Minimum value":"end"===e?"Maximum value":"Value",W=(e,t,r)=>o("div",{id:"single"===t||"start"===t?n:void 0,style:{position:"absolute",top:"50%",left:`${e}%`,transform:"translate(-50%, -50%)",width:"18px",height:"18px",borderRadius:"50%",backgroundColor:"#ffffff",border:"2px solid "+(y?"#9ca3af":"#3b82f6"),cursor:y?"not-allowed":"grab",boxShadow:"0 1px 3px rgba(0,0,0,0.15)",zIndex:"2"},onMouseDown:A(t),role:"slider","aria-valuenow":String(r),"aria-valuemin":String(p),"aria-valuemax":String(u),"aria-label":T(t),tabIndex:y?-1:0,onKeyDown:R},g?o("div",{style:{position:"absolute",bottom:"24px",left:"50%",transform:"translateX(-50%)",backgroundColor:"#1f2937",color:"#ffffff",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",whiteSpace:"nowrap"}},String(r)):null),B=[];if(x)for(let e=p;e<=u;e+=h)B.push(o("div",{key:`tick-${e}`,style:{position:"absolute",top:"10px",left:`${z(e)}%`,width:"1px",height:"6px",backgroundColor:"#d1d5db",transform:"translateX(-50%)"}}));const E=[];if(m)for(const e of m)E.push(o("div",{key:`mark-${e.value}`,style:{position:"absolute",top:"18px",left:`${z(e.value)}%`,transform:"translateX(-50%)",fontSize:"11px",color:"#6b7280",whiteSpace:"nowrap"}},e.label));const P={paddingTop:g?"28px":"8px",paddingBottom:m||x?"28px":"8px",opacity:y?"0.6":"1"},H=[];return b?(H.push(W(z(M[0]),"start",M[0])),H.push(W(z(M[1]),"end",M[1]))):H.push(W(z(M[0]),"single",M[0])),o(te,{label:v,error:S,htmlFor:n},o("div",{style:P},o("div",{ref:k,style:D,onClick:F},o("div",{style:N}),...H,...B,...E)))},exports.Spinner=function(e){const t="number"==typeof e.size?e.size:Q[e.size??"md"]??24,n=e.color??"#3b82f6",r=e.thickness??Math.max(2,Math.round(t/8)),i=ee[e.speed??"normal"]??ee.normal,l=e.label??"Loading",a=f().replace(/[^a-zA-Z0-9_-]/g,""),s=(t-r)/2,c=2*Math.PI*s;return o("span",{role:"status","aria-label":l,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"}},o("style",null,d(()=>`@keyframes liq-rotate-${a}{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}`,[a])),o("svg",{width:String(t),height:String(t),viewBox:`0 0 ${t} ${t}`,style:{animation:`liq-rotate-${a} ${i} linear infinite`}},o("circle",{cx:String(t/2),cy:String(t/2),r:String(s),fill:"none",stroke:n,"stroke-width":String(r),"stroke-dasharray":`${.7*c} ${.3*c}`,"stroke-linecap":"round"})),o("span",{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",borderWidth:"0"}},l))},exports.Splitter=function(e){const t=e.direction??"horizontal",n="horizontal"===t,r=e.dividerSize??6,i=e.minSize??50,[f,p]=l(e.initialSplit??50),u=c(null),h=c(!1),g=s(e=>{e.preventDefault(),h.current=!0,document.body.style.cursor=n?"col-resize":"row-resize",document.body.style.userSelect="none"},[n]);a(()=>{const t=t=>{if(!h.current||!u.current)return;const o=u.current.getBoundingClientRect(),r=n?o.width:o.height,l=n?t.clientX-o.left:t.clientY-o.top;if(r<=0)return;const a=i/r*100,s=e.maxSize?e.maxSize/r*100:100-a;let d=l/r*100;d=Math.max(a,Math.min(s,d)),p(d)},o=()=>{h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousemove",t),document.addEventListener("mouseup",o),()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",o)}},[n,i,e.maxSize]);const x=d(()=>({display:"flex",flexDirection:n?"row":"column",width:"100%",height:"100%",overflow:"hidden",...e.style??{}}),[n,e.style]),y=n?{width:`calc(${f}% - ${r/2}px)`,overflow:"auto",flexShrink:"0"}:{height:`calc(${f}% - ${r/2}px)`,overflow:"auto",flexShrink:"0"},m={flexShrink:"0",backgroundColor:"#e5e7eb",transition:"background-color 0.15s",...n?{width:`${r}px`,cursor:"col-resize",height:"100%"}:{height:`${r}px`,cursor:"row-resize",width:"100%"}},b=Array.isArray(e.children)?e.children:[];return o("div",{className:`splitter splitter--${t} ${e.className??""}`.trim(),style:x,ref:u},o("div",{className:"splitter__pane splitter__pane--first",style:y},b[0]??null),o("div",{className:"splitter__divider",style:m,onMouseDown:g,onKeyDown:e=>{const t=e.key;!n||"ArrowLeft"!==t&&"ArrowRight"!==t?n||"ArrowUp"!==t&&"ArrowDown"!==t||(e.preventDefault(),p(e=>{const n="ArrowDown"===t?2:-2;return Math.max(5,Math.min(95,e+n))})):(e.preventDefault(),p(e=>{const n="ArrowRight"===t?2:-2;return Math.max(5,Math.min(95,e+n))}))},role:"separator",tabIndex:0,"aria-orientation":n?"vertical":"horizontal","aria-valuenow":String(Math.round(f)),"aria-valuemin":"0","aria-valuemax":"100","aria-label":"Resize panels"}),o("div",{className:"splitter__pane splitter__pane--second",style:{flex:"1",overflow:"auto",minWidth:"0",minHeight:"0"}},b[1]??null))},exports.Stepper=function(e){const{steps:t,currentStep:n,orientation:r="horizontal",onChange:i,clickable:l=!1,variant:a="circle"}=e,d="horizontal"===r,c="circle"===a?32:12,f="dot"===a?12:32,p=s(e=>{l&&i&&i(e)},[l,i]),u=[];return t.forEach((e,r)=>{u.push(((e,t)=>{const r=(e=>e<n?"completed":e===n?"active":"pending")(t),i="active"===r,s="completed"===r,u=((e,t,n)=>{const r="dot"===a?f:c,i={width:`${r}px`,height:`${r}px`,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"circle"===a?"14px":"0",fontWeight:"600",flexShrink:"0",transition:"background-color 0.2s, border-color 0.2s"};return"completed"===n?o("div",{style:{...i,backgroundColor:"#2563eb",color:"#ffffff",border:"2px solid #2563eb"}},"circle"===a?t.icon||"✓":null):"active"===n?o("div",{style:{...i,backgroundColor:"#ffffff",color:"#2563eb",border:"2px solid #2563eb",boxShadow:"0 0 0 3px rgba(37, 99, 235, 0.2)"}},"circle"===a?t.icon||String(e+1):o("div",{style:{width:"6px",height:"6px",borderRadius:"50%",backgroundColor:"#2563eb"}})):o("div",{style:{...i,backgroundColor:"#ffffff",color:"#9ca3af",border:"2px solid #d1d5db"}},"circle"===a?t.icon||String(e+1):null)})(t,e,r),h={fontSize:"11px",color:"#6b7280",marginTop:"2px",textAlign:d?"center":"left"},g=o("div",{style:d?{display:"flex",flexDirection:"column",alignItems:"center"}:{display:"flex",flexDirection:"column"}},o("span",{style:{fontSize:"13px",fontWeight:i?"600":"400",color:i||s?"#1f2937":"#9ca3af",marginTop:d?"8px":"0",marginLeft:d?"0":"12px",textAlign:d?"center":"left",transition:"color 0.2s"}},e.label),e.description?o("span",{style:h},e.description):null),x=o("div",d?{style:{display:"flex",flexDirection:"column",alignItems:"center"}}:{style:{display:"flex",flexDirection:"row",alignItems:"center"}},u,g);return o(l?"button":"div",{key:String(t),onClick:l?()=>p(t):void 0,style:{display:"flex",flexDirection:d?"column":"row",alignItems:d?"center":"flex-start",background:"none",border:"none",padding:"0",cursor:l?"pointer":"default",fontFamily:"inherit",outline:"none"},"aria-current":i?"step":void 0},x)})(e,r));const i=(e=>{if(e>=t.length-1)return null;const r=e<n?"#2563eb":"#d1d5db";return o("div",d?{style:{flex:"1",height:"2px",backgroundColor:r,margin:"0 8px",alignSelf:"center",transition:"background-color 0.2s"}}:{style:{width:"2px",flex:"1",minHeight:"24px",backgroundColor:r,marginLeft:("dot"===a?f:c)/2-1+"px",transition:"background-color 0.2s"}})})(r);i&&u.push(i)}),o("div",{role:"navigation","aria-label":"Progress steps",style:{display:"flex",flexDirection:d?"row":"column",alignItems:d?"flex-start":"stretch",width:"100%"}},...u)},exports.Sunburst=function(e){const{data:t,width:n=500,height:r=500,innerRadius:i=40,showLabels:l=!0,colors:a=wo,strokeColor:s="#ffffff",strokeWidth:c=1,title:f}=e,p=n/2,u=r/2,h=f?20:0,g=Math.min(p,u-h)-10;if(d(()=>Mo(t),[t])<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":f??"Empty sunburst chart"},o("text",{x:String(p),y:String(u),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const x=d(()=>function(e,t,n,o){const r=[],i=Mo(e);if(i<=0)return r;const l=function(e){let t=0;const n=[{node:e,depth:0}];for(;n.length>0;){const{node:e,depth:o}=n.pop();if(o>t&&(t=o),e.children)for(let t=e.children.length-1;t>=0;t--)n.push({node:e.children[t],depth:o+1})}return t}(e),a=l>0?(n-t)/(l+1):n-t,s=[];if(!(e.children&&e.children.length>0))return r.push({startAngle:0,endAngle:$o,innerR:t,outerR:t+a,label:e.label,value:i,color:e.color??o[0],depth:0}),r;{let t=0;for(let n=0;n<e.children.length;n++){const o=e.children[n],r=Mo(o);if(r<=0)continue;const l=r/i*$o;s.push({node:o,startAngle:t,endAngle:t+l,depth:0,colorIndex:n}),t+=l}}for(;s.length>0;){const e=s.shift(),{node:n,startAngle:i,endAngle:l,depth:d,colorIndex:c}=e,f=Mo(n);if(f<=0)continue;const p=t+d*a,u=p+a;if(r.push({startAngle:i,endAngle:l,innerR:p,outerR:u,label:n.label,value:f,color:n.color??o[c%o.length],depth:d}),n.children&&n.children.length>0){let e=i;const t=l-i;for(let o=0;o<n.children.length;o++){const r=n.children[o],i=Mo(r);if(i<=0)continue;const l=i/f*t;s.push({node:r,startAngle:e,endAngle:e+l,depth:d+1,colorIndex:c}),e+=l}}}return r}(t,i,g,a),[t,i,g,a]),y=[];f&&y.push(o("text",{key:"title",x:String(p),y:String(20),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},f));const m=u+h/2;for(let e=0;e<x.length;e++){const t=x[e],n=Co(p,m,t.innerR,t.outerR,t.startAngle,t.endAngle);if(y.push(o("path",{key:`arc-${e}`,d:n,fill:t.color,stroke:s,"stroke-width":String(c),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),l){const n=t.endAngle-t.startAngle,r=t.startAngle+n/2-Math.PI/2,i=(t.innerR+t.outerR)/2,l=t.outerR-t.innerR,a=n*i;if(a>20&&l>14){const n=p+i*Math.cos(r),s=m+i*Math.sin(r),d=Math.floor(Math.min(a,l)/7),c=t.label.length>d?t.label.substring(0,Math.max(1,d-1))+"..":t.label;y.push(o("text",{key:`label-${e}`,x:String(n),y:String(s+4),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},c))}}}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":f??"Sunburst chart",style:{fontFamily:"sans-serif"}},...y)},exports.Tabs=function(e){const t=e.position??"top",n=e.variant??"line",r=e.tabs.find(e=>!e.disabled)?.id??"",[i,a]=l(e.activeTab??r),f=e.activeTab??i,p=c(null),u=s(t=>{a(t),e.onChange&&e.onChange(t)},[e.onChange]),h=s(n=>{const o=e.tabs.filter(e=>!e.disabled),r=o.findIndex(e=>e.id===f);if(-1===r)return;const i="left"===t||"right"===t,l=i?"ArrowUp":"ArrowLeft",a=i?"ArrowDown":"ArrowRight";let s=-1;if(n.key===l?s=r>0?r-1:o.length-1:n.key===a?s=r<o.length-1?r+1:0:"Home"===n.key?s=0:"End"===n.key&&(s=o.length-1),s>=0){n.preventDefault(),u(o[s].id);const t=p.current;if(t){const n=t.querySelectorAll('[role="tab"]')[e.tabs.indexOf(o[s])];n&&n.focus()}}},[e.tabs,f,t,u]),g="left"===t||"right"===t,x="bottom"===t||"right"===t,y=d(()=>({display:"flex",flexDirection:g?x?"row-reverse":"row":x?"column-reverse":"column",width:"100%",...e.style??{}}),[g,x,e.style]),m={display:"flex",flexDirection:g?"column":"row",gap:"pill"===n?"4px":"0",..."line"!==n||g?{}:{borderBottom:"2px solid #e5e7eb"},..."line"===n&&g?{borderRight:"left"===t?"2px solid #e5e7eb":"none",borderLeft:"right"===t?"2px solid #e5e7eb":"none"}:{},..."card"===n?{backgroundColor:"#f9fafb"}:{},..."pill"===n?{padding:"4px"}:{},flexShrink:"0"},b=e.tabs.find(e=>e.id===f),v=e.tabs.map(e=>{const r=e.id===f,i={padding:"8px 16px",border:"none",background:"none",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?"0.5":"1",fontSize:"14px",fontWeight:r?"600":"400",color:r?"#3b82f6":"#6b7280",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"6px",outline:"none",transition:"color 0.15s, background-color 0.15s"};return"line"===n?g?"left"===t?(i.borderRight=r?"2px solid #3b82f6":"2px solid transparent",i.marginRight="-2px"):(i.borderLeft=r?"2px solid #3b82f6":"2px solid transparent",i.marginLeft="-2px"):(i.borderBottom=r?"2px solid #3b82f6":"2px solid transparent",i.marginBottom="-2px"):"card"===n?(i.backgroundColor=r?"#ffffff":"transparent",i.borderRadius="6px 6px 0 0",r&&(i.border="1px solid #e5e7eb",i.borderBottom="1px solid #ffffff")):"pill"===n&&(i.borderRadius="9999px",i.backgroundColor=r?"#3b82f6":"transparent",i.color=r?"#ffffff":"#6b7280"),o("button",{key:e.id,role:"tab","aria-selected":String(r),"aria-controls":`tabpanel-${e.id}`,"aria-disabled":e.disabled?"true":void 0,id:`tab-${e.id}`,tabIndex:r?"0":"-1",style:i,onClick:e.disabled?void 0:()=>u(e.id),onKeyDown:h},e.icon?o("span",{className:"tabs__tab-icon"},e.icon):null,e.label)});return o("div",{className:`tabs tabs--${t} tabs--${n} ${e.className??""}`.trim(),style:y},o("div",{className:"tabs__list",role:"tablist","aria-orientation":g?"vertical":"horizontal",style:m,ref:p},...v),o("div",{className:"tabs__panel",role:"tabpanel",id:`tabpanel-${f}`,"aria-labelledby":`tab-${f}`,style:{flex:"1",padding:"16px",minWidth:"0",minHeight:"0"},tabIndex:"0"},b?b.content:null))},exports.Tag=function(e){const{label:t,color:n,variant:r="subtle",size:i="md",removable:l=!1,onRemove:a,icon:s,onClick:d,disabled:c=!1}=e,f=function(e,t,n,o,r){const i=V[n],l={display:"inline-flex",alignItems:"center",gap:i.gap,borderRadius:"9999px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:i.fontSize,fontWeight:"500",padding:i.padding,lineHeight:"1.4",whiteSpace:"nowrap",border:"none",transition:"opacity 0.15s ease, filter 0.15s ease",...o?{cursor:"pointer"}:{},...r?{opacity:"0.5",cursor:"default",pointerEvents:"none"}:{}};switch(t){case"solid":return{...l,backgroundColor:e,color:"#fff",border:"none"};case"outline":return{...l,backgroundColor:"transparent",color:e,border:`1px solid ${e}`};case"subtle":return{...l,backgroundColor:G(e,.12),color:e,border:"none"};default:return l}}(function(e){return e??"#3b82f6"}(n),r,i,!!d,c),p=[];return s&&p.push(o("span",{key:"icon",style:{display:"inline-flex",flexShrink:"0"}},s)),p.push(o("span",{key:"label"},t)),l&&p.push(o("button",{key:"remove",type:"button",style:X,onClick:e=>{e.stopPropagation(),!c&&a&&a()},"aria-label":`Remove ${t}`,disabled:c},"×")),o("span",{style:f,role:d?"button":void 0,tabIndex:d&&!c?"0":void 0,onClick:!c&&d?d:void 0,onKeyDown:d&&!c?e=>{const t=e.key;"Enter"!==t&&" "!==t||(e.preventDefault(),d())}:void 0,"aria-disabled":c?"true":void 0},...p)},exports.TextEditor=function(e){const[t,n]=l(!1),r=c(null),i=f(),d=e.id??i,p=e.toolbar??pe,u=e.toolbarStyle??{},h=e.editorStyle??{};a(()=>{r.current&&void 0!==e.value&&(r.current.innerHTML=e.value)},[]);const g=s((t,n)=>{if(!e.disabled&&!e.readOnly){if("createLink"===t){const e=prompt("Enter URL:");if(!e)return;document.execCommand(t,!1,e)}else n&&"formatBlock"===t?document.execCommand(t,!1,`<${n}>`):document.execCommand(t,!1,n);r.current&&e.onChange&&e.onChange(r.current.innerHTML)}},[e.disabled,e.readOnly,e.onChange]),x=s(()=>{r.current&&e.onChange&&e.onChange(r.current.innerHTML)},[e.onChange]),y=s(()=>{n(!1),r.current&&e.onBlur&&e.onBlur(r.current.innerHTML)},[e.onBlur]),m=o("div",{className:"texteditor-toolbar",style:{display:"flex",flexWrap:"wrap",gap:"2px",padding:"6px 8px",backgroundColor:u.backgroundColor??"#f9fafb",borderBottom:u.borderBottom??"1px solid #e5e7eb",borderRadius:"6px 6px 0 0"}},...p.map(t=>{const n=ue[t];return n?o("button",{key:t,type:"button",title:n.label,onClick:()=>g(n.command,n.value),disabled:e.disabled||e.readOnly,style:{padding:"4px 8px",border:"none",borderRadius:"4px",backgroundColor:"transparent",color:u.buttonColor??"#374151",cursor:e.disabled?"not-allowed":"pointer",fontSize:u.buttonSize??"13px",fontWeight:"bold"===t?"700":"italic"===t?"400":"500",fontStyle:"italic"===t?"italic":"normal",textDecoration:"underline"===t?"underline":"strikethrough"===t?"line-through":"none",minWidth:"28px",textAlign:"center",lineHeight:"1.4"}},n.icon):null})),b=o("div",{ref:r,id:d,className:"texteditor-content",contentEditable:e.disabled?"false":"true",role:"textbox","aria-multiline":"true","aria-label":e.label??"Text editor","data-placeholder":e.placeholder??"",style:{padding:h.padding??"12px 14px",minHeight:e.minHeight??"200px",maxHeight:e.maxHeight??"none",overflow:"auto",backgroundColor:h.backgroundColor??"#ffffff",color:h.color??"#1f2937",fontFamily:h.fontFamily??"inherit",fontSize:h.fontSize??"14px",lineHeight:h.lineHeight??"1.6",outline:"none",borderRadius:"0 0 6px 6px",border:t?"1px solid #3b82f6":e.error?"1px solid #ef4444":"1px solid #d1d5db",borderTop:"none",transition:"border-color 0.15s"},onFocus:()=>n(!0),onBlur:y,onInput:x});return o(te,{label:e.label,htmlFor:d,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},o("div",{className:"texteditor",style:{border:t?"1px solid #3b82f6":e.error?"1px solid #ef4444":"1px solid #d1d5db",borderRadius:"6px",overflow:"hidden",transition:"border-color 0.15s"}},m,b))},exports.TextField=function(e){const[t,n]=l(!1),r=f().replace(/[^a-zA-Z0-9_-]/g,""),i=e.id??`tf-${r}`,a=ne(e.inputStyle??{},{focused:t,error:!!e.error}),s=!(!e.prefix&&!e.suffix),d=o("input",{type:e.type??"text",id:i,name:e.name,value:e.value,placeholder:e.placeholder,maxLength:e.maxLength?String(e.maxLength):void 0,pattern:e.pattern,autoComplete:e.autoComplete,autoFocus:e.autoFocus,readOnly:e.readOnly,disabled:e.disabled,"aria-invalid":e.error?"true":void 0,"aria-required":e.required?"true":void 0,className:`textfield-input ${e.className??""}`.trim(),style:s?{...a,border:"none",boxShadow:"none",flex:"1",minWidth:"0"}:a,onFocus:()=>n(!0),onBlur:t=>{n(!1),e.onBlur&&e.onBlur(t.target.value)},onInput:t=>{const n=t.target.value;e.onInput&&e.onInput(n),e.onChange&&e.onChange(n)},onKeyDown:t=>{"Enter"===t.key&&e.onEnter&&e.onEnter(t.target.value)}}),c=s?o("div",{style:{...a,display:"flex",alignItems:"center",gap:"8px",padding:"0"}},e.prefix?o("span",{style:{paddingLeft:"10px",color:"#9ca3af",flexShrink:"0"}},e.prefix):null,d,e.suffix?o("span",{style:{paddingRight:"10px",color:"#9ca3af",flexShrink:"0"}},e.suffix):null):d;return o(te,{label:e.label,htmlFor:i,helpText:e.helpText,error:e.error,required:e.required,disabled:e.disabled,styling:e.wrapperStyle},c)},exports.ThreeDLayers=function(e){const{layers:t,width:n=700,height:r=500,perspective:i=.5,rotateX:l=35,rotateY:a=45,rotateZ:c=0,showLabels:f=!0,showAxes:p=!0,layerSpacing:u=2,colorScale:h=bn,gridColor:g="#94a3b8",title:x}=e,y=d(()=>{let e=0,n=0,o=0;for(let r=0;r<t.length;r++){const i=t[r],l=i.data.length;l>e&&(e=l);for(let e=0;e<l;e++){const t=i.data[e].length;t>n&&(n=t);for(let n=0;n<t;n++){const t=Math.abs(i.data[e][n]??0);t>o&&(o=t)}}}return{maxRows:Math.max(e,1),maxCols:Math.max(n,1),maxHeight:o>0?o:1}},[t]),m=d(()=>{const e=y.maxHeight+(t.length-1)*u+y.maxHeight,o=Math.sqrt(y.maxCols*y.maxCols+y.maxRows*y.maxRows+e*e),i=.75*Math.min(n,r);return o>0?i/o:1},[y,t.length,u,n,r]),b=n/2,v=r/2,S=s((e,t,n)=>function(e,t,n,o,r,i,l,a,s,d){const c=Math.cos(o*vn),f=Math.sin(o*vn),p=Math.cos(r*vn),u=Math.sin(r*vn),h=Math.cos(i*vn),g=Math.sin(i*vn),x=e*h-t*g,y=e*g+t*h,m=x*u+y*p,b=m*f+n*c,v=1+.001*l*b;return{sx:a+(x*p-y*u)*d*v,sy:s-(m*c-n*f)*d*v,depth:b}}(e,t,n,l,a,c,i,b,v,m),[l,a,c,i,b,v,m]),k=s(()=>{if(!p)return[];const e=[];Math.max(y.maxCols,y.maxRows);const n=y.maxCols/2,r=y.maxRows/2,i=S(-n,-r,0),l=S(n,-r,0);e.push(o("line",{key:"axis-x",x1:String(i.sx),y1:String(i.sy),x2:String(l.sx),y2:String(l.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-x-label",x:String(l.sx+8),y:String(l.sy+4),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"X"));const a=S(-n,r,0);e.push(o("line",{key:"axis-y",x1:String(i.sx),y1:String(i.sy),x2:String(a.sx),y2:String(a.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-y-label",x:String(a.sx-12),y:String(a.sy+4),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"Y"));const s=y.maxHeight+(t.length-1)*u,d=S(-n,-r,s);return e.push(o("line",{key:"axis-z",x1:String(i.sx),y1:String(i.sy),x2:String(d.sx),y2:String(d.sy),stroke:"#374151","stroke-width":"1.5"})),e.push(o("text",{key:"axis-z-label",x:String(d.sx-4),y:String(d.sy-8),"font-size":"11","font-family":"sans-serif",fill:"#374151"},"Z")),e},[p,y,t.length,u,S]),w=s(()=>{const e=[],n=y.maxCols/2,r=y.maxRows/2,i=[];for(let e=0;e<t.length;e++){const o=t[e],l=o.color??h[e%h.length],a=o.opacity??.7,s=e*u,d=o.data.length;for(let t=0;t<d-1;t++){const d=o.data[t],c=o.data[t+1],f=Math.min(d.length,c.length);for(let o=0;o<f-1;o++){const f=o-n,p=o+1-n,u=t-r,h=t+1-r,g=(d[o]??0)+s,x=(d[o+1]??0)+s,y=(c[o]??0)+s,m=(c[o+1]??0)+s,b=S(f,u,g),v=S(p,u,x),k=S(f,h,y),w=S(p,h,m),$=(b.depth+v.depth+k.depth+w.depth)/4,M=`${b.sx},${b.sy} ${v.sx},${v.sy} ${w.sx},${w.sy} ${k.sx},${k.sy}`;i.push({points:M,fill:Sn(l,a),stroke:kn(l,.7),strokeWidth:"0.5",depth:$,key:`quad-${e}-${t}-${o}`})}}if(1===d||d>0&&1===o.data[0].length)for(let t=0;t<d;t++){const d=o.data[t];for(let o=0;o<d.length;o++){const c=o-n,f=t-r,p=(d[o]??0)+s,u=S(c,f,p),h=3,g=`${u.sx},${u.sy-h} ${u.sx+h},${u.sy} ${u.sx},${u.sy+h} ${u.sx-h},${u.sy}`;i.push({points:g,fill:Sn(l,a),stroke:kn(l,.7),strokeWidth:"0.5",depth:u.depth,key:`point-${e}-${t}-${o}`})}}}i.sort((e,t)=>e.depth-t.depth);for(let t=0;t<i.length;t++){const n=i[t];e.push(o("polygon",{key:n.key,points:n.points,fill:n.fill,stroke:n.stroke,"stroke-width":n.strokeWidth,"stroke-linejoin":"round"}))}return e},[t,y,u,h,S]),$=s(()=>{const e=[],t=y.maxCols/2,n=y.maxRows/2;for(let r=0;r<=y.maxRows;r++){const i=r-n,l=S(-t,i,0),a=S(t,i,0);e.push(o("line",{key:`base-h-${r}`,x1:String(l.sx),y1:String(l.sy),x2:String(a.sx),y2:String(a.sy),stroke:g,"stroke-width":"0.3","stroke-dasharray":"2 2",opacity:"0.5"}))}for(let r=0;r<=y.maxCols;r++){const i=r-t,l=S(i,-n,0),a=S(i,n,0);e.push(o("line",{key:`base-v-${r}`,x1:String(l.sx),y1:String(l.sy),x2:String(a.sx),y2:String(a.sy),stroke:g,"stroke-width":"0.3","stroke-dasharray":"2 2",opacity:"0.5"}))}return e},[y,g,S]),M=s(()=>{if(!f)return[];const e=[],n=y.maxCols/2;y.maxRows;for(let r=0;r<t.length;r++){const i=t[r],l=r*u;let a=0,s=0;for(let e=0;e<i.data.length;e++){const t=i.data[e];for(let e=0;e<t.length;e++)a+=t[e]??0,s++}const d=S(n+1,0,(s>0?a/s:0)+l),c=i.color??h[r%h.length];e.push(o("text",{key:`layer-label-${r}`,x:String(d.sx+8),y:String(d.sy+4),"font-size":"11","font-family":"sans-serif","font-weight":"bold",fill:c},i.label))}return e},[f,t,y,u,h,S]),C=s(()=>x?[o("text",{key:"title",x:String(n/2),y:String(24),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},x)]:[],[x,n])(),z=$(),I=k(),A=w(),F=M(),R=0===t.length?[o("text",{key:"empty-msg",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No layer data")]:[];return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":x??"3D layer visualization",style:{fontFamily:"sans-serif",maxWidth:"100%"}},...C,...R,...z,...I,...A,...F)},exports.TimePicker=function(e){const t=f(),n=e.id??t,{value:r,onChange:i,format:a="24h",minuteStep:c=1,disabled:p=!1,label:u,error:h,showSeconds:g=!1,timezone:x,showTimezone:y=!1,timezones:m=he,onTimezoneChange:b}=e,[v,S]=l(!1),k=d(()=>function(e){const t=e.split(":");return{hour:parseInt(t[0],10)||0,minute:parseInt(t[1],10)||0,second:parseInt(t[2],10)||0}}(r),[r]),w="12h"===a,$=k.hour>=12,M=w?k.hour%12||12:k.hour,C=s((e,t,n)=>{const o=Math.max(0,Math.min(23,e)),r=Math.max(0,Math.min(59,t)),l=Math.max(0,Math.min(59,n??0));i(g?`${ge(o)}:${ge(r)}:${ge(l)}`:`${ge(o)}:${ge(r)}`)},[i,g]),z=s(e=>{let t=parseInt(e.target.value,10)||0;w&&(t%=12,$&&(t+=12)),C(t,k.minute,k.second)},[w,$,k.minute,k.second,C]),I=s(e=>{const t=parseInt(e.target.value,10)||0;C(k.hour,t,k.second)},[k.hour,k.second,C]),A=s(e=>{const t=parseInt(e.target.value,10)||0;C(k.hour,k.minute,t)},[k.hour,k.minute,C]),F=s(()=>{if(p)return;const e=$?k.hour-12:k.hour+12;C(e,k.minute,k.second)},[p,$,k.hour,k.minute,k.second,C]),R=s(e=>{p||C(k.hour+e,k.minute,k.second)},[p,k.hour,k.minute,k.second,C]),D=s(e=>{p||C(k.hour,k.minute+e*c,k.second)},[p,k.hour,k.minute,k.second,c,C]),L=s(e=>{p||C(k.hour,k.minute,k.second+e)},[p,k.hour,k.minute,k.second,C]),N=s(e=>{const t=e.target.value;b&&b(t)},[b]),T={display:"inline-flex",alignItems:"center",gap:"4px",...ne({},{focused:v,error:!!h})},W={display:"flex",flexDirection:"column",alignItems:"center"},B={background:"none",border:"none",cursor:p?"not-allowed":"pointer",fontSize:"10px",padding:"0 4px",color:"#6b7280",lineHeight:"1"},E={width:"32px",textAlign:"center",border:"none",outline:"none",fontSize:"14px",fontFamily:"monospace",backgroundColor:"transparent",color:"#1f2937",padding:"0"},P={marginLeft:"4px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#f9fafb",cursor:p?"not-allowed":"pointer",fontSize:"12px",fontWeight:"600",color:"#374151"},H=o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>R(1),disabled:p},"▲"),o("input",{type:"text",value:ge(M),onChange:z,style:E,disabled:p,"aria-label":"Hour",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>R(-1),disabled:p},"▼")),j=o("span",{style:{fontSize:"16px",fontWeight:"700",color:"#374151",padding:"0 2px"}},":"),_=o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>D(1),disabled:p},"▲"),o("input",{type:"text",value:ge(k.minute),onChange:I,style:E,disabled:p,"aria-label":"Minute",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>D(-1),disabled:p},"▼")),Y=g?o("span",{style:{fontSize:"16px",fontWeight:"700",color:"#374151",padding:"0 2px"}},":"):null,q=g?o("div",{style:W},o("button",{type:"button",style:B,onClick:()=>L(1),disabled:p},"▲"),o("input",{type:"text",value:ge(k.second),onChange:A,style:E,disabled:p,"aria-label":"Second",onFocus:()=>S(!0),onBlur:()=>S(!1)}),o("button",{type:"button",style:B,onClick:()=>L(-1),disabled:p},"▼")):null,O=w?o("button",{type:"button",style:P,onClick:F,disabled:p,"aria-label":"Toggle AM/PM"},$?"PM":"AM"):null,U={marginLeft:"4px",padding:"4px 8px",border:"1px solid #d1d5db",borderRadius:"4px",backgroundColor:"#f9fafb",cursor:p?"not-allowed":"pointer",fontSize:"12px",fontWeight:"600",color:"#374151"},G=x&&!y?o("span",{style:{marginLeft:"8px",fontSize:"12px",fontWeight:"600",color:"#6b7280"}},x):null,V=y?o("select",{style:U,value:x??m[0],onChange:N,disabled:p,"aria-label":"Timezone"},...m.map(e=>o("option",{key:e,value:e},e))):null,X=[H,j,_];return Y&&X.push(Y),q&&X.push(q),O&&X.push(O),G&&X.push(G),V&&X.push(V),o(te,{label:u,error:h,disabled:p,htmlFor:n},o("div",{id:n,style:T},...X))},exports.ToastContainer=et,exports.Toggle=function(e){const{checked:t,onChange:n,label:r,labelPosition:i="right",disabled:l=!1,size:a="md",onColor:d="#3b82f6",offColor:c="#d1d5db"}=e,f=xe[a],p=s(()=>{l||n(!t)},[l,t,n]),u=s(e=>{l||" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),n(!t))},[l,t,n]),h={width:`${f.trackW}px`,height:`${f.trackH}px`,borderRadius:`${f.trackH}px`,backgroundColor:t?d:c,position:"relative",cursor:l?"not-allowed":"pointer",transition:"background-color 0.2s",flexShrink:"0"},g=t?f.trackW-f.thumbSize-f.offset:f.offset,x={width:`${f.thumbSize}px`,height:`${f.thumbSize}px`,borderRadius:"50%",backgroundColor:"#ffffff",position:"absolute",top:`${f.offset}px`,left:`${g}px`,transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"},y={display:"inline-flex",alignItems:"center",gap:"8px",opacity:l?"0.5":"1",userSelect:"none"},m=r?o("span",{style:{fontSize:"14px",color:"#374151"}},r):null,b=o("div",{style:h},o("div",{style:x}));return o("div",{style:y,onClick:p,onKeyDown:u,tabIndex:l?-1:0,role:"switch","aria-checked":t?"true":"false","aria-disabled":l?"true":void 0,"aria-label":r},...("left"===i?[m,b]:[b,m]).filter(Boolean))},exports.Toolbar=function(e){const{items:t,size:n="md",variant:r="flat"}=e,i=Be[n],l=t.map(e=>"separator"===e.type?o("div",{key:e.id,role:"separator","aria-orientation":"vertical",style:{width:"1px",height:i.height,backgroundColor:"#d1d5db",margin:"0 4px",flexShrink:"0"}}):"spacer"===e.type?o("div",{key:e.id,style:{flex:"1"},"aria-hidden":"true"}):o(Ee,{key:e.id,item:e,size:n,variant:r}));return o(ke,{orientation:"horizontal",role:"toolbar",ariaLabel:"Toolbar",keyboardNav:!0,styling:{border:"raised"===r?"1px solid #e5e7eb":"none",borderRadius:"raised"===r?"8px":"0",padding:"4px",backgroundColor:"raised"===r?"#ffffff":"transparent",boxShadow:"raised"===r?"0 1px 3px rgba(0,0,0,0.1)":void 0,custom:{gap:"2px",alignItems:"center"}}},...l)},exports.Tooltip=function(e){const{text:t,placement:n="top",delay:r=200,maxWidth:i="250px",children:d}=e,[f,p]=l(!1),[u,h]=l(null),g=c(null),x=c(null),y=`tooltip-${Math.random().toString(36).slice(2,9)}`,m=s(()=>{x.current=setTimeout(()=>{if(g.current){const e=g.current.getBoundingClientRect();h(function(e,t){switch(t){case"top":return{position:"fixed",left:`${e.left+e.width/2}px`,top:e.top-8+"px",transform:"translate(-50%, -100%)"};case"bottom":return{position:"fixed",left:`${e.left+e.width/2}px`,top:`${e.bottom+8}px`,transform:"translateX(-50%)"};case"left":return{position:"fixed",left:e.left-8+"px",top:`${e.top+e.height/2}px`,transform:"translate(-100%, -50%)"};case"right":return{position:"fixed",left:`${e.right+8}px`,top:`${e.top+e.height/2}px`,transform:"translateY(-50%)"}}}(e,n))}p(!0)},r)},[r,n]),b=s(()=>{x.current&&(clearTimeout(x.current),x.current=null),p(!1)},[]);a(()=>()=>{x.current&&clearTimeout(x.current)},[]);const v={...u??{},backgroundColor:"#1f2937",color:"#fff",fontSize:"13px",lineHeight:"1.4",padding:"6px 10px",borderRadius:"6px",maxWidth:i,zIndex:"10002",pointerEvents:"none",whiteSpace:"normal",wordWrap:"break-word"},S=[o("div",{ref:g,style:{display:"inline-block"},onMouseEnter:m,onMouseLeave:b,onFocus:m,onBlur:b,"aria-describedby":f?y:void 0},d)];return f&&u&&S.push(o("div",{id:y,style:v,role:"tooltip"},t,o("div",{style:tt(n)}))),o("div",{style:{display:"inline-block",position:"relative"}},...S)},exports.TradingDashboard=function(e){const[t,n]=l(0),[r,i]=l("--:--:--"),[s,c]=l(!0);a(()=>{const e=setInterval(()=>{n(e=>{const t=.5*(Math.random()-.5);return Math.round(100*t)/100})},2e3);return()=>clearInterval(e)},[]),a(()=>{const e=()=>{const e=new Date,t=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");i(`${t}:${n}:${o}`)};e();const t=setInterval(e,1e3);return()=>clearInterval(t)},[]),a(()=>{const e=setInterval(()=>{c(e=>!e)},800);return()=>clearInterval(e)},[]);const f=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Inter", "Segoe UI", Roboto, sans-serif',fontSize:"13px",color:"#ccccdd",backgroundColor:"#0d0d1a",overflow:"hidden"}),[]),p=189.42+t,u={width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#00c853",display:"inline-block",marginRight:"4px",opacity:s?"1":"0.3",transition:"opacity 0.3s"};return o("div",{className:`trading-dashboard ${e.className??""}`.trim(),style:f},o("header",{className:"trading-dashboard__header",style:{height:"40px",backgroundColor:"#12122a",borderBottom:"1px solid #2a2a4a",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",flexShrink:"0"}},o("span",{style:{fontSize:"14px",fontWeight:"700",color:"#ffffff",letterSpacing:"0.5px",display:"flex",alignItems:"center",gap:"8px"}},"SpecifyJS Trading Platform",o("span",{style:{display:"flex",alignItems:"center",fontSize:"11px",color:"#00c853",fontWeight:"600",marginLeft:"8px"}},o("span",{style:u}),"LIVE")),o("div",{style:{display:"flex",alignItems:"center",gap:"16px",fontSize:"12px"}},o("span",{style:{color:"#ffffff",fontFamily:"monospace",fontWeight:"600",fontSize:"13px"}},r),o("span",{style:{color:"#8888aa"}},"Account: SJS-28401"),o("span",{style:{color:"#00c853"}},"Balance: $124,582.30"),o("span",{style:{color:"#8888aa"}},"Status: Connected"))),o("div",{className:"trading-dashboard__grid",style:{flex:"1",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gridTemplateRows:"1fr 1fr",gap:"8px",padding:"8px",overflow:"hidden"}},function(e,t){const n=120,r=Math.min(...e),i=Math.max(...e),l=i-r||1,a=310/(e.length-1),s=e.map((e,t)=>({x:40+t*a,y:15+(1-(e-r)/l)*n}));s.map(e=>`${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ");const d="M40,135 "+s.map(e=>`L${e.x.toFixed(1)},${e.y.toFixed(1)}`).join(" ")+` L${s[s.length-1].x.toFixed(1)},135 Z`,c=[];for(let t=1;t<e.length;t++){const n=e[t]>=e[t-1]?"#00c853":"#ff1744";c.push(o("line",{key:String(t),x1:String(s[t-1].x.toFixed(1)),y1:String(s[t-1].y.toFixed(1)),x2:String(s[t].x.toFixed(1)),y2:String(s[t].y.toFixed(1)),stroke:n,strokeWidth:"2",strokeLinecap:"round"}))}const f=[];for(let e=0;e<5;e++){const t=15+e/4*n,r=i-e/4*l;f.push(o("line",{key:`g${e}`,x1:String(40),y1:String(t.toFixed(1)),x2:String(350),y2:String(t.toFixed(1)),stroke:"#2a2a4a",strokeWidth:"0.5",strokeDasharray:"3,3"})),f.push(o("text",{key:`yl${e}`,x:String(36),y:String((t+3).toFixed(1)),fill:"#6666aa",fontSize:"8",textAnchor:"end",fontFamily:"monospace"},cn(r)))}const p=[],u=Math.min(sn.length,e.length),h=(e.length-1)/(u-1);for(let e=0;e<u;e++){const t=40+Math.round(e*h)*a;p.push(o("text",{key:`tl${e}`,x:String(t.toFixed(1)),y:String(156),fill:"#6666aa",fontSize:"8",textAnchor:"middle",fontFamily:"monospace"},sn[e]))}const g="chartGrad";return o("div",{style:fn},o("div",{style:pn},"AAPL ",o("span",{style:{color:"#00c853",fontSize:"14px",fontWeight:"700"}},`$${cn(t)}`),o("span",{style:{color:"#00c853",fontSize:"11px",marginLeft:"8px"}},"+1.23%")),o("svg",{viewBox:"0 0 360 160",style:{width:"100%",flex:"1",minHeight:"0"},"aria-label":"Price chart",role:"img"},o("defs",null,o("linearGradient",{id:g,x1:"0",y1:"0",x2:"0",y2:"1"},o("stop",{offset:"0%",stopColor:"#00c853",stopOpacity:"0.3"}),o("stop",{offset:"100%",stopColor:"#00c853",stopOpacity:"0.02"}))),o("path",{d:d,fill:`url(#${g})`}),...f,...p,...c,o("line",{x1:String(40),y1:String((15+(1-(t-r)/l)*n).toFixed(1)),x2:String(350),y2:String((15+(1-(t-r)/l)*n).toFixed(1)),stroke:"#00c853",strokeWidth:"0.5",strokeDasharray:"4,2",opacity:"0.6"})))}(rn,p),function(){const e=Math.max(...en.map(e=>e.qty),...tn.map(e=>e.qty));return o("div",{style:fn},o("div",{style:pn},"Order Book"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Bid Price"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Ask Price"),o("th",{style:hn},"Qty"))),o("tbody",null,...en.map((t,n)=>{const r=tn[n],i=t.qty/e*.25,l=(r?.qty??0)/e*.25;return o("tr",{key:String(n),style:xn},o("td",{style:{...gn,color:"#00c853",backgroundColor:`rgba(0,200,83,${i.toFixed(3)})`,fontFamily:"monospace"}},cn(t.price)),o("td",{style:{...gn,backgroundColor:`rgba(0,200,83,${(.5*i).toFixed(3)})`,fontFamily:"monospace"}},dn(t.qty)),o("td",{style:{...gn,color:"#ff1744",backgroundColor:`rgba(255,23,68,${l.toFixed(3)})`,fontFamily:"monospace"}},r?cn(r.price):""),o("td",{style:{...gn,backgroundColor:`rgba(255,23,68,${(.5*l).toFixed(3)})`,fontFamily:"monospace"}},r?dn(r.qty):""))}))))}(),function(e){return o("div",{style:fn},o("div",{style:pn},"Watchlist"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Symbol"),o("th",{style:hn},"Price"),o("th",{style:hn},"Chg%"),o("th",{style:hn},"Volume"))),o("tbody",null,...Qt.map((t,n)=>{const r=t.price+(0===n?e:0),i=t.change>=0;return o("tr",{key:String(n),style:xn},o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},t.symbol,function(e,t){const n=Math.min(...e),r=Math.max(...e)-n||1;return o("svg",{viewBox:"0 0 40 14",style:{width:"40px",height:"14px",display:"inline-block",verticalAlign:"middle",marginLeft:"4px"},"aria-hidden":"true"},o("polyline",{points:e.map((t,o)=>{const i=o/(e.length-1)*40,l=14-(t-n)/r*14;return`${i.toFixed(1)},${l.toFixed(1)}`}).join(" "),fill:"none",stroke:t?"#00c853":"#ff1744",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))}(t.spark,i)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(r)),o("td",{style:{...gn,color:i?"#00c853":"#ff1744",fontWeight:"600"}},`${i?"+":""}${cn(t.change)}%`),o("td",{style:{...gn,fontFamily:"monospace",color:"#8888aa"}},(l=t.volume)>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:String(l)));var l}))))}(t),function(){const e=nn.reduce((e,t)=>e+t.pnl,0),t=e>=0;return o("div",{style:fn},o("div",{style:pn},"Positions",o("span",{style:{marginLeft:"12px",color:t?"#00c853":"#ff1744",fontWeight:"700",fontSize:"12px"}},`${t?"+":""}$${cn(e)}`)),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Symbol"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Avg"),o("th",{style:hn},"P&L"))),o("tbody",null,...nn.map((e,t)=>{const n=e.pnl>=0;return o("tr",{key:String(t),style:{...xn,backgroundColor:n?"rgba(0,200,83,0.04)":"rgba(255,23,68,0.04)"}},o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},e.symbol),o("td",{style:{...gn,fontFamily:"monospace"}},String(e.qty)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(e.avgPrice)),o("td",{style:{...gn,color:n?"#00c853":"#ff1744",fontWeight:"700",fontFamily:"monospace"}},`${n?"+":""}$${cn(e.pnl)}`))}))))}(),o("div",{style:fn},o("div",{style:pn},"Recent Trades"),o("table",{style:un},o("thead",null,o("tr",null,o("th",{style:hn},"Time"),o("th",{style:hn},"Sym"),o("th",{style:hn},"Side"),o("th",{style:hn},"Qty"),o("th",{style:hn},"Price"))),o("tbody",null,...on.map((e,t)=>{const n="BUY"===e.side;return o("tr",{key:String(t),style:xn},o("td",{style:{...gn,color:"#8888aa",fontFamily:"monospace"}},e.time),o("td",{style:{...gn,fontWeight:"600",color:"#ffffff"}},e.symbol),o("td",{style:{...gn,color:n?"#00c853":"#ff1744",fontWeight:"600"}},e.side),o("td",{style:{...gn,fontFamily:"monospace"}},dn(e.qty)),o("td",{style:{...gn,fontFamily:"monospace"}},cn(e.price)))})))),function(){const e=Math.max(...ln.map(e=>e.volume),...an.map(e=>e.volume)),t="16px";return o("div",{style:fn},o("div",{style:pn},"Market Depth"),o("div",{style:{flex:"1",display:"flex",flexDirection:"column",gap:"2px",justifyContent:"center"}},...ln.map((n,r)=>o("div",{key:`b${r}`,style:{display:"flex",alignItems:"center",gap:"6px"}},o("span",{style:{width:"52px",fontSize:"11px",color:"#8888aa",textAlign:"right",fontFamily:"monospace"}},cn(n.price)),o("div",{style:{height:t,width:n.volume/e*100+"%",backgroundColor:"#00c853",opacity:"0.6",borderRadius:"2px",maxWidth:"60%",transition:"width 0.3s"}}),o("span",{style:{fontSize:"11px",color:"#ccccdd",fontFamily:"monospace"}},dn(n.volume)))),o("div",{style:{height:"1px",backgroundColor:"#2a2a4a",margin:"4px 0"}}),...an.map((n,r)=>o("div",{key:`a${r}`,style:{display:"flex",alignItems:"center",gap:"6px"}},o("span",{style:{width:"52px",fontSize:"11px",color:"#8888aa",textAlign:"right",fontFamily:"monospace"}},cn(n.price)),o("div",{style:{height:t,width:n.volume/e*100+"%",backgroundColor:"#ff1744",opacity:"0.6",borderRadius:"2px",maxWidth:"60%",transition:"width 0.3s"}}),o("span",{style:{fontSize:"11px",color:"#ccccdd",fontFamily:"monospace"}},dn(n.volume))))))}()))},exports.TreeMap=function(e){const{data:t,width:n=600,height:r=400,showLabels:i=!0,showValues:l=!0,colors:a=zo,borderColor:s="#ffffff",borderWidth:c=2,padding:f=2,title:p}=e,u=p?30:0,h=f,g=f+u,x=n-2*f,y=r-2*f-u;if(d(()=>Io(t),[t])<=0||x<=0||y<=0)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Empty treemap"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data to display"));const m=d(()=>function(e,t,n,o,r,i){const l=[],a=[],s=Io(e);if(s<=0||o<=0||r<=0)return l;const d=e.children&&e.children.length>0?e.children:[e],c=o*r,f=[];for(let e=0;e<d.length;e++){const t=d[e],n=Io(t);n<=0||f.push({label:t.label,value:n,area:n/s*c,color:t.color??i[e%i.length],node:t})}for(f.sort((e,t)=>t.area-e.area),a.push({nodes:f,rect:{x:t,y:n,w:o,h:r},depth:0});a.length>0;){const e=a.shift(),{nodes:t,rect:n,depth:o}=e;if(0===t.length)continue;let r={...n},s=0;for(;s<t.length&&r.w>0&&r.h>0;){const e=r.w>=r.h,n=e?r.h:r.w,d=[],c=[];d.push(t[s]),c.push(t[s].area),s++;let f=Ao(c,n);for(;s<t.length;){const e=Ao([...c,t[s].area],n);if(e>f)break;d.push(t[s]),c.push(t[s].area),f=e,s++}let p=0;for(const e of c)p+=e;const u=n>0?p/n:0;let h=0;for(let t=0;t<d.length;t++){const n=d[t],s=u>0?n.area/u:0;let c,f,p,g;if(e?(c=r.x,f=r.y+h,p=u,g=s):(c=r.x+h,f=r.y,p=s,g=u),l.push({x:c,y:f,w:p,h:g,label:n.label,value:n.value,color:n.color,depth:o}),n.node.children&&n.node.children.length>0){const e=2,t=c+e,r=f+e+14,l=p-2*e,s=g-2*e-14;if(l>4&&s>4){const e=[],d=n.value,c=l*s;for(let t=0;t<n.node.children.length;t++){const r=n.node.children[t],l=Io(r);l<=0||e.push({label:r.label,value:l,area:l/d*c,color:r.color??i[(t+o+1)%i.length],node:r})}e.sort((e,t)=>t.area-e.area),a.push({nodes:e,rect:{x:t,y:r,w:l,h:s},depth:o+1})}}h+=s}r=e?{x:r.x+u,y:r.y,w:r.w-u,h:r.h}:{x:r.x,y:r.y+u,w:r.w,h:r.h-u}}}return l}(t,h,g,x,y,a),[t,h,g,x,y,a]),b=[];p&&b.push(o("text",{key:"title",x:String(n/2),y:String(f+16),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},p));for(let e=0;e<m.length;e++){const t=m[e];if(b.push(o("rect",{key:`cell-${e}`,x:String(t.x),y:String(t.y),width:String(Math.max(0,t.w)),height:String(Math.max(0,t.h)),fill:t.color,stroke:s,"stroke-width":String(c),role:"graphics-symbol","aria-label":`${t.label}: ${t.value}`})),i&&t.w>20&&t.h>14){const n=Math.floor(t.w/7),r=t.label.length>n?t.label.substring(0,Math.max(1,n-2))+"..":t.label;b.push(o("text",{key:`label-${e}`,x:String(t.x+4),y:String(t.y+12),"font-size":"11","font-family":"sans-serif",fill:"#ffffff","pointer-events":"none"},r))}l&&t.w>30&&t.h>28&&b.push(o("text",{key:`value-${e}`,x:String(t.x+4),y:String(t.y+24),"font-size":"10","font-family":"sans-serif",fill:"rgba(255,255,255,0.8)","pointer-events":"none"},String(t.value)))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":p??"Treemap chart",style:{fontFamily:"sans-serif"}},...b)},exports.TreeNav=function(e){const{root:t,onNodeClick:n,onNodeExpand:r,onNodeCollapse:i,selectedId:a,expandAll:c=!1,lineColor:f="#000",lineWidth:p=1,indentPx:u=20,iconExpanded:h="−",iconCollapsed:g="+",nodeStyle:x={},wrapperStyle:y,renderNode:m}=e,[b,v]=l(()=>{const e=Pe.fromData(t);return c&&He(e),e}),[S,k]=l(t.id),w=d(()=>je(b),[b]),$=s(()=>{v(e=>{const t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t})},[]),M=s(e=>{e.toggle(),e.expanded?r?.(e):i?.(e),$()},[r,i,$]),C=s(e=>{k(e.id),n?.(e)},[n]),z=s(e=>{const t=e;if(!S)return;const n=w.findIndex(e=>e.id===S);if(-1===n)return;const o=w[n];switch(t.key){case"ArrowDown":{t.preventDefault();const e=w[n+1];e&&k(e.id);break}case"ArrowUp":{t.preventDefault();const e=w[n-1];e&&k(e.id);break}case"ArrowRight":t.preventDefault(),o.isLeaf()||(o.expanded?o.children.length>0&&k(o.children[0].id):M(o));break;case"ArrowLeft":t.preventDefault(),!o.isLeaf()&&o.expanded?M(o):o.parent&&k(o.parent.id);break;case"Enter":t.preventDefault(),C(o);break;case" ":t.preventDefault(),o.isLeaf()||M(o);break;case"Home":t.preventDefault(),w.length>0&&k(w[0].id);break;case"End":t.preventDefault(),w.length>0&&k(w[w.length-1].id)}},[S,w,M,C]),I=w.map(e=>o(Ye,{key:e.id,node:e,isSelected:e.id===a,indentPx:u,lineColor:f,lineWidth:p,iconExpanded:h,iconCollapsed:g,nodeStyle:x,renderNode:m,onToggle:M,onClick:C,focusedId:S}));return o(ke,{role:"tree",ariaLabel:"Tree navigation",styling:y,keyboardNav:!1},o("div",{onKeyDown:z,style:{outline:"none"}},...I))},exports.TreeNode=Pe,exports.USStateMap=function(e){const{width:t=959,height:n=593,stateColors:r={},defaultColor:i="#D0D0D0",strokeColor:l="#FFFFFF",strokeWidth:a=1,onStateClick:c,onStateHover:f,hoverColor:p="#FFD700",title:u="Map of the United States"}=e,h=d(()=>Object.keys(oo),[]),g=s(e=>{c&&c(e)},[c]),x=s((e,t)=>{const n=t.currentTarget;n&&n.setAttribute("fill",p),f&&f(e)},[f,p]),y=s((e,t)=>{const n=t.currentTarget;if(n){const t=r[e]??i;n.setAttribute("fill",t)}f&&f(null)},[f,r,i]),m=d(()=>{const e=[];for(let t=0;t<h.length;t++){const n=h[t],s=oo[n],d=r[n]??i,f={key:`state-${n}`,d:s.path,fill:d,stroke:l,"stroke-width":String(a),"stroke-linejoin":"round","data-state":n,role:"img","aria-label":s.name,style:{cursor:c?"pointer":"default"}};if(c){const e=n;f.onClick=()=>g(e),f.onKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||g(e)},f.tabindex=0,f.role="button",f["aria-label"]=s.name}const p=n;f.onMouseOver=e=>x(p,e),f.onMouseOut=e=>y(p,e),e.push(o("path",f))}return e},[h,r,i,l,a,c,g,x,y]),b=o("title",{key:"map-title"},u);return o("svg",{width:"100%",viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u,style:{fontFamily:"sans-serif"}},b,...m)},exports.US_STATE_PATHS=oo,exports.UnityDesktop=function(e){const[t,n]=l(-1),[r,i]=l(()=>{const e=new Date;return`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`}),[c,f]=l(()=>(new Date).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})),[p,u]=l([]),[h,g]=l(-1),[x,y]=l(!1);a(()=>{const e=setInterval(()=>{const e=new Date;i(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}`),f(e.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}))},1e3);return()=>clearInterval(e)},[]);const m=s(e=>{const t=Wt++,n={id:t,appLabel:e.label,appLetter:e.letter,appColor:e.color,minimized:!1};u(e=>[...e,n]),g(t),y(!1)},[]),b=s(e=>{u(t=>t.filter(t=>t.id!==e)),g(t=>t===e?-1:t)},[]),v=s(e=>{u(t=>t.map(t=>t.id===e?{...t,minimized:!t.minimized}:t))},[]),S=s(e=>{g(e),u(t=>t.map(t=>t.id===e?{...t,minimized:!1}:t))},[]),k=s(()=>{y(e=>!e)},[]),w=s((e,t)=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),m(Nt[e]))},[m]),$=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'Ubuntu, "Segoe UI", sans-serif',fontSize:"13px",color:"var(--color-text, #ffffff)",overflow:"hidden",position:"relative"}),[]);function M(e){return{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:e,cursor:"pointer",display:"inline-block"}}const C={width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",fontSize:"20px",backgroundColor:t===Nt.length?"rgba(255,255,255,0.15)":"transparent",border:"none",color:"#ffffff",transition:"background 0.15s",marginTop:"auto"},z=p.map((e,t)=>{if(e.minimized)return null;const n=e.id===h,r={width:"420px",minHeight:"280px",backgroundColor:"#ffffff",borderRadius:"6px",boxShadow:n?"0 12px 48px rgba(0,0,0,0.5)":"0 8px 32px rgba(0,0,0,0.4)",display:"flex",flexDirection:"column",overflow:"hidden",position:"absolute",left:80+t%5*30+"px",top:40+t%5*30+"px",zIndex:String(n?100:10+t),transition:"box-shadow 0.15s"},i={height:"32px",backgroundColor:n?"#3c3c3c":"#555",display:"flex",alignItems:"center",padding:"0 10px",gap:"6px",flexShrink:"0",cursor:"default"};return o("div",{key:String(e.id),className:"unity-desktop__window",style:r,onMouseDown:()=>S(e.id)},o("div",{style:i},o("span",{style:M("#e74c3c"),onClick:()=>b(e.id),title:"Close",role:"button","aria-label":`Close ${e.appLabel}`,tabIndex:0}),o("span",{style:M("#f39c12"),onClick:()=>v(e.id),title:"Minimize",role:"button","aria-label":`Minimize ${e.appLabel}`,tabIndex:0}),o("span",{style:M("#2ecc71"),title:"Maximize",role:"button","aria-label":`Maximize ${e.appLabel}`,tabIndex:0}),o("span",{style:{flex:"1",textAlign:"center",fontSize:"12px",color:"#ccc",marginRight:"40px"}},e.appLabel)),o("div",{style:{flex:"1",padding:"16px",fontSize:"13px",color:"#333",lineHeight:"1.5"}},...function(e){switch(e){case"Files":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Home"),o("div",{style:{display:"flex",flexDirection:"column",gap:"4px"}},o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Documents"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Downloads"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Music"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Pictures"),o("span",{style:{color:"#555",cursor:"pointer"}},"📁 Videos"),o("span",{style:{color:"#555",cursor:"pointer"}},"📄 readme.txt"))];case"Browser":return[o("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"}},o("span",{style:{padding:"4px 8px",backgroundColor:"#eee",borderRadius:"4px",fontSize:"12px",flex:"1",color:"#666"}},"https://example.com")),o("div",{style:{padding:"16px",backgroundColor:"#fafafa",borderRadius:"4px",textAlign:"center",color:"#999"}},"Web page content area")];case"Terminal":return[o("div",{style:{backgroundColor:"#1a1a1a",padding:"12px",borderRadius:"4px",fontFamily:"monospace",fontSize:"12px",color:"#2ecc71",lineHeight:"1.6"}},o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc"}},"Welcome to SpecifyJS Desktop")),o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc"}},"ls -la")),o("div",{style:{color:"#aaa"}},"total 42"),o("div",null,o("span",{style:{color:"#2ecc71"}},"user@desktop:~$ "),o("span",{style:{color:"#ccc",borderRight:"2px solid #2ecc71"}}," ")))];case"Mail":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Inbox (3)"),o("div",{style:{display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#e8f0fe",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Welcome to SpecifyJS Mail"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Your weekly digest"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"Team standup notes"))];case"Music":return[o("div",{style:{textAlign:"center",padding:"20px",color:"#333"}},o("div",{style:{fontSize:"48px",marginBottom:"12px"}},"🎵"),o("div",{style:{fontWeight:"600",marginBottom:"4px"}},"Now Playing"),o("div",{style:{color:"#666",fontSize:"12px"}},"No track selected"),o("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"16px",fontSize:"18px"}},o("span",{style:{cursor:"pointer"}},"⏮"),o("span",{style:{cursor:"pointer"}},"▶"),o("span",{style:{cursor:"pointer"}},"⏭")))];case"Photos":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Photo Library"),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"6px"}},o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"),o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"),o("div",{style:{width:"60px",height:"60px",backgroundColor:"#ddd",borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"center",color:"#999"}},"🖼"))];case"Software":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"Software Center"),o("div",{style:{color:"#666",fontSize:"12px"}},"Browse and install applications"),o("div",{style:{marginTop:"12px",display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Package Manager"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Text Editor"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px"}},"📦 Image Viewer"))];case"Settings":return[o("div",{style:{fontWeight:"600",marginBottom:"8px",color:"#333"}},"System Settings"),o("div",{style:{display:"flex",flexDirection:"column",gap:"6px"}},o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"⚙ General"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"📶 Network"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"🔈 Sound"),o("div",{style:{padding:"6px",backgroundColor:"#f5f5f5",borderRadius:"4px",color:"#333",fontSize:"12px",cursor:"pointer"}},"🖥 Display"))];default:return[o("div",{style:{textAlign:"center",color:"#999",padding:"20px"}},`${e} placeholder`)]}}(e.appLabel)))}),I=x?o("div",{className:"unity-desktop__apps-grid",style:{position:"absolute",top:"0",left:"0",right:"0",bottom:"0",backgroundColor:"rgba(0,0,0,0.75)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"200"},onClick:()=>y(!1)},o("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 80px)",gap:"24px",padding:"40px"},onClick:e=>e.stopPropagation()},...Nt.map(e=>o("div",{key:e.label,style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",cursor:"pointer",padding:"12px",borderRadius:"8px",transition:"background 0.15s"},onClick:()=>m(e),role:"button",tabIndex:0,"aria-label":e.label},o("span",{style:{width:"48px",height:"48px",borderRadius:"12px",backgroundColor:e.color,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"20px",fontWeight:"700",color:"#ffffff"}},e.letter),o("span",{style:{color:"#ffffff",fontSize:"11px"}},e.label))))):null;return o("div",{className:`unity-desktop ${e.className??""}`.trim(),style:$},o("div",{className:"unity-desktop__top-panel",style:{width:"100%",height:"28px",backgroundColor:"var(--color-bg, #1a1a1a)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 12px",boxSizing:"border-box",fontSize:"12px",zIndex:"10",flexShrink:"0",borderBottom:"1px solid var(--color-border, #333)"}},o("span",{style:{fontWeight:"600",cursor:"pointer",padding:"2px 8px",borderRadius:"3px",transition:"background 0.15s"}},"Activities"),o("span",{style:{position:"absolute",left:"50%",transform:"translateX(-50%)"}},`${c} ${r}`),o("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px"}},...Tt.map((e,t)=>o("span",{key:String(t),style:{cursor:"pointer"}},e)),o("span",{style:{fontSize:"12px",marginLeft:"4px",cursor:"pointer"}},"▼"))),o("div",{style:{display:"flex",flex:"1",overflow:"hidden"}},o("nav",{className:"unity-desktop__launcher",style:{width:"48px",backgroundColor:"var(--color-bg, #2c2c2c)",display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"8px",paddingBottom:"8px",gap:"4px",flexShrink:"0",overflowY:"auto",boxSizing:"border-box",borderRight:"1px solid var(--color-border, #444)"},"aria-label":"Application launcher"},...Nt.map((e,r)=>{return o("button",{key:String(r),style:(l=r,{width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",cursor:"pointer",fontSize:"14px",fontWeight:"700",backgroundColor:t===l?"rgba(255,255,255,0.15)":"transparent",border:"none",color:"#ffffff",transition:"background 0.15s"}),title:e.label,"aria-label":e.label,tabIndex:0,onMouseEnter:()=>n(r),onMouseLeave:()=>n(-1),onKeyDown:e=>w(r,e),onClick:()=>m(e)},o("span",{style:(i=e.color,{width:"28px",height:"28px",borderRadius:"50%",backgroundColor:i,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"13px",fontWeight:"700",color:"#ffffff",lineHeight:"1"})},e.letter));var i,l}),o("button",{style:C,title:"Show Applications","aria-label":"Show Applications",tabIndex:0,onMouseEnter:()=>n(Nt.length),onMouseLeave:()=>n(-1),onClick:k},"☰")),o("main",{className:"unity-desktop__desktop",style:{flex:"1",background:"linear-gradient(135deg, #2c001e 0%, #5e2750 50%, #2c001e 100%)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",position:"relative"}},...z.filter(Boolean),I,e.children)))},exports.VectorField=function(e){const{data:t,vectorFunction:n,width:r=600,height:i=600,gridSize:l=15,xRange:a=[-5,5],yRange:c=[-5,5],arrowScale:f=1,arrowColor:p="#3b82f6",showGrid:u=!0,showAxes:h=!0,colorByMagnitude:g=!1,colorScale:x=["#3b82f6","#8b5cf6","#ef4444"],title:y,padding:m=50,tickFontSize:b=10,arrowWidth:v=1.5}=e,S=r-2*m,k=i-2*m,w=a[0],$=a[1],M=c[0],C=c[1],z=$-w,I=C-M,A=s(e=>m+(e-w)/z*S,[m,w,z,S]),F=s(e=>m+(C-e)/I*k,[m,C,I,k]),R=d(()=>{if(t&&t.length>0)return t;if(!n)return[];const e=[],o=Math.max(2,Math.min(50,l)),r=z/(o-1),i=I/(o-1);for(let t=0;t<o;t++)for(let l=0;l<o;l++){const o=w+l*r,a=M+t*i,s=n(o,a),d=Math.sqrt(s.dx*s.dx+s.dy*s.dy);e.push({x:o,y:a,dx:s.dx,dy:s.dy,magnitude:d})}return e},[t,n,l,w,$,M,C,z,I]),D=d(()=>{let e=0;for(let t=0;t<R.length;t++){const n=R[t],o=n.magnitude??Math.sqrt(n.dx*n.dx+n.dy*n.dy);o>e&&(e=o)}return e>0?e:1},[R]),L=d(()=>Math.min(S,k)/Math.max(l,2)/(2*D)*f,[S,k,l,D,f]),N=s(()=>{if(!u)return[];const e=[],t=Do(z,10);for(let n=Math.ceil(w/t)*t;n<=$;n+=t){const t=A(n);e.push(o("line",{key:`gridv-${n}`,x1:String(t),y1:String(m),x2:String(t),y2:String(m+k),stroke:"#e5e7eb","stroke-width":"0.5"})),e.push(o("text",{key:`xtick-${n}`,x:String(t),y:String(m+k+16),"text-anchor":"middle","font-size":String(b),"font-family":"sans-serif",fill:"#6b7280"},String(Math.round(100*n)/100)))}const n=Do(I,10);for(let t=Math.ceil(M/n)*n;t<=C;t+=n){const n=F(t);e.push(o("line",{key:`gridh-${t}`,x1:String(m),y1:String(n),x2:String(m+S),y2:String(n),stroke:"#e5e7eb","stroke-width":"0.5"})),e.push(o("text",{key:`ytick-${t}`,x:String(m-6),y:String(n+4),"text-anchor":"end","font-size":String(b),"font-family":"sans-serif",fill:"#6b7280"},String(Math.round(100*t)/100)))}return e},[u,w,$,M,C,z,I,A,F,m,S,k]),T=s(()=>{if(!h)return[];const e=[];if(M<=0&&C>=0){const t=F(0);e.push(o("line",{key:"axis-x",x1:String(m),y1:String(t),x2:String(m+S),y2:String(t),stroke:"#374151","stroke-width":String(v)}))}if(w<=0&&$>=0){const t=A(0);e.push(o("line",{key:"axis-y",x1:String(t),y1:String(m),x2:String(t),y2:String(m+k),stroke:"#374151","stroke-width":String(v)}))}return e.push(o("rect",{key:"chart-border",x:String(m),y:String(m),width:String(S),height:String(k),fill:"none",stroke:"#d1d5db","stroke-width":"1"})),e},[h,w,$,M,C,A,F,m,S,k]),W=s(()=>{const e=[];for(let t=0;t<R.length;t++){const n=R[t],r=n.magnitude??Math.sqrt(n.dx*n.dx+n.dy*n.dy);if(r<1e-10)continue;const i=A(n.x),l=F(n.y),a=n.dx*L,s=-n.dy*L,d=i+a,c=l+s;let f;f=g?Ro(r/D,x):p,e.push(o("line",{key:`arrow-line-${t}`,x1:String(i),y1:String(l),x2:String(d),y2:String(c),stroke:f,"stroke-width":String(v),"stroke-linecap":"round"}));const u=Math.sqrt(a*a+s*s);if(u>2){const n=a/u,r=s/u,i=-r,l=n,p=Math.min(4,.4*u),h=d-n*p+i*p*.5,g=c-r*p+l*p*.5,x=d-n*p-i*p*.5,y=c-r*p-l*p*.5;e.push(o("polygon",{key:`arrow-head-${t}`,points:`${d},${c} ${h},${g} ${x},${y}`,fill:f}))}}return e},[R,A,F,L,g,D,x,p]),B=s(()=>y?[o("text",{key:"title",x:String(r/2),y:String(m/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},y)]:[],[y,r,m]),E=N(),P=T(),H=W(),j=B();return o("svg",{width:"100%",viewBox:`0 0 ${r} ${i}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":y??"Vector field plot",style:{fontFamily:"sans-serif"}},...j,...E,...P,...H)},exports.VideoPlayer=function(e){const t=!1!==e.controls,n=c(null);f().replace(/[^a-zA-Z0-9_-]/g,"");const[r,i]=l(!1),[d,p]=l(0),[u,h]=l(0),[g,x]=l(e.muted?0:1),[y,m]=l(!!e.muted),[b,v]=l(!0),S="number"==typeof e.width?`${e.width}px`:e.width??"100%",k="number"==typeof e.height?`${e.height}px`:e.height??"auto";a(()=>{const t=n.current;if(!t)return;const o=()=>{i(!0),e.onPlay&&e.onPlay()},r=()=>{i(!1),e.onPause&&e.onPause()},l=()=>{i(!1),e.onEnded&&e.onEnded()},a=()=>{p(t.currentTime),h(t.duration),e.onTimeUpdate&&e.onTimeUpdate(t.currentTime,t.duration)},s=()=>{h(t.duration)};return t.addEventListener("play",o),t.addEventListener("pause",r),t.addEventListener("ended",l),t.addEventListener("timeupdate",a),t.addEventListener("loadedmetadata",s),()=>{t.removeEventListener("play",o),t.removeEventListener("pause",r),t.removeEventListener("ended",l),t.removeEventListener("timeupdate",a),t.removeEventListener("loadedmetadata",s)}},[e.onPlay,e.onPause,e.onEnded,e.onTimeUpdate]);const w=s(()=>{const e=n.current;e&&(e.paused?e.play():e.pause())},[]),$=s(e=>{const t=n.current;if(!t||!isFinite(t.duration))return;const o=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(1,(e.clientX-o.left)/o.width));t.currentTime=r*t.duration},[]),M=s(e=>{const t=n.current,o=parseFloat(e.target.value);t&&(t.volume=o,t.muted=0===o,x(o),m(0===o))},[]),C=s(()=>{const e=n.current;e&&e.requestFullscreen&&e.requestFullscreen()},[]);if(!t)return o("video",{ref:n,src:e.src,poster:e.poster,controls:!0,autoplay:!!e.autoPlay||void 0,loop:!!e.loop||void 0,muted:!!e.muted||void 0,style:{width:S,height:k,display:"block"}});const z=u>0?d/u*100:0,I={background:"none",border:"none",color:"#ffffff",cursor:"pointer",fontSize:"16px",padding:"4px 8px",lineHeight:"1"},A=o("div",{style:{position:"absolute",bottom:"0",left:"0",right:"0",display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",background:"linear-gradient(transparent, rgba(0,0,0,0.7))",opacity:b?"1":"0",transition:"opacity 0.3s"}},o("button",{"aria-label":r?"Pause":"Play",onclick:w,style:I},r?"⏸":"▶"),o("div",{onclick:$,style:{flex:"1",height:"4px",backgroundColor:"rgba(255,255,255,0.3)",borderRadius:"2px",cursor:"pointer",position:"relative"}},o("div",{style:{width:`${z}%`,height:"100%",backgroundColor:"#3b82f6",borderRadius:"2px",transition:"width 0.1s linear"}})),o("span",{style:{color:"#ffffff",fontSize:"12px",whiteSpace:"nowrap",fontFamily:"monospace"}},`${Se(d)} / ${Se(u)}`),o("input",{type:"range",min:"0",max:"1",step:"0.05",value:String(y?0:g),oninput:M,"aria-label":"Volume",style:{width:"60px",cursor:"pointer"}}),o("button",{"aria-label":"Fullscreen",onclick:C,style:I},"⛶"));return o("div",{style:{position:"relative",width:S,height:k,backgroundColor:"#000",overflow:"hidden"},onmouseenter:()=>v(!0),onmouseleave:()=>{r&&v(!1)}},o("video",{ref:n,src:e.src,poster:e.poster,autoplay:!!e.autoPlay||void 0,loop:!!e.loop||void 0,muted:!!e.muted||void 0,playsinline:!0,onclick:w,style:{width:"100%",height:"100%",display:"block",objectFit:"contain"}}),A)},exports.VirtualScroll=function(e){const{items:t,renderItem:n,itemHeight:r,overscan:i=5,height:a}=e,[d,f]=l(0),p=c(null),u=t.length*r,h=parseInt(a,10)||400,g=Math.ceil(h/r),x=Math.max(0,Math.floor(d/r)-i),y=Math.min(t.length,Math.floor(d/r)+g+i),m=s(e=>{const t=e.target;f(t.scrollTop)},[]),b=[];for(let e=x;e<y;e++)b.push(o("div",{key:String(e),style:{position:"absolute",top:e*r+"px",left:"0",right:"0",height:`${r}px`,overflow:"hidden"}},n(t[e],e)));return o("div",{ref:p,style:{...K,height:a},onScroll:m},o("div",{style:{height:`${u}px`,position:"relative",width:"100%"}},...b))},exports.VizWrapper=function(e){const t=e.titlePosition??"top",n=e.legendPosition??"bottom",r=e.titleAlign??"center",i=e.legendAlign??"center",l=e.gap??"12px",a=e.contain??"layout style paint",s={display:"flex",flexDirection:"column",gap:l,width:"number"==typeof e.width?`${e.width}px`:e.width??"auto",height:"number"==typeof e.height?`${e.height}px`:e.height??"auto",backgroundColor:e.backgroundColor??"#ffffff",border:e.border??"1px solid #e5e7eb",borderRadius:e.borderRadius??"8px",padding:e.padding??"16px",fontFamily:e.fontFamily??"inherit",contain:a,overflow:"hidden",position:"relative",boxSizing:"border-box",...e.boxShadow?{boxShadow:e.boxShadow}:{},...e.style??{}},d=e.title?o("div",{className:"viz-title",style:{fontSize:e.titleFontSize??"16px",fontWeight:e.titleFontWeight??"600",color:e.titleColor??"#1f2937",textAlign:r,flexShrink:"0"}},e.title):null,c=e.legend&&e.legend.length>0?(f=e.legend,o("div",{className:"viz-legend",style:{display:"flex",flexDirection:(p={align:i,fontSize:e.legendFontSize??"12px",gap:e.legendGap??16,direction:"left"===n||"right"===n?"column":"row"}).direction,flexWrap:"wrap",gap:`${p.gap}px`,justifyContent:p.align,alignItems:"center",fontSize:p.fontSize,color:"#6b7280",flexShrink:"0"}},...f.map((e,t)=>o("div",{key:`legend-${t}`,style:{display:"flex",alignItems:"center",gap:"6px"}},function(e){const t=e.shape??"circle";return"line"===t?o("svg",{width:"20",height:"12",viewBox:"0 0 20 12"},o("line",{x1:"0",y1:"6",x2:"20",y2:"6",stroke:e.color,"stroke-width":"2","stroke-dasharray":e.dash??""})):o("div","square"===t?{style:{width:"12px",height:"12px",backgroundColor:e.color,borderRadius:"2px",flexShrink:"0"}}:{style:{width:"10px",height:"10px",backgroundColor:e.color,borderRadius:"50%",flexShrink:"0"}})}(e),o("span",null,e.label))))):null;var f,p;const u=function(e,t,n,r,i){const l=[];if("top"===r&&e&&l.push(e),"left"===i||"right"===i){const a=[];"left"===i&&n&&a.push(n),"left"===r&&e&&a.push(e),a.push(t),"right"===r&&e&&a.push(e),"right"===i&&n&&a.push(n),l.push(o("div",{style:{display:"flex",flexDirection:"row",flex:"1",gap:"12px",minHeight:"0",alignItems:"stretch"}},...a))}else if("left"===r||"right"===r){"top"===i&&n&&l.push(n);const a=[];"left"===r&&e&&a.push(e),a.push(t),"right"===r&&e&&a.push(e),l.push(o("div",{style:{display:"flex",flexDirection:"row",flex:"1",gap:"12px",minHeight:"0",alignItems:"center"}},...a)),"bottom"===i&&n&&l.push(n)}else"top"===i&&n&&l.push(n),l.push(t),"bottom"===i&&n&&l.push(n);return"bottom"===r&&e&&l.push(e),l}(d,o("div",{className:"viz-content",style:{flex:"1",minWidth:"0",minHeight:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}},e.children),c,t,n);return o("div",{className:`viz-wrapper ${e.className??""}`.trim(),style:s},...u)},exports.WaterfallChart=function(e){const{data:t=[],width:n=600,height:r=400,increaseColor:i="#10b981",decreaseColor:l="#ef4444",totalColor:a="#3b82f6",connectorColor:c="#94a3b8",showValues:f=!0,showGrid:p=!0,showConnectors:u=!0,title:h,padding:g=60}=e,x=n-2*g,y=r-2*g,m=d(()=>function(e){const t=[];let n=0;for(let o=0;o<e.length;o++){const r=e[o],i=r.type??(r.value>=0?"increase":"decrease");if("total"===i)t.push({label:r.label,value:n,type:"total",start:0,end:n});else{const e=n;n+=r.value,t.push({label:r.label,value:r.value,type:i,start:e,end:n})}}return t}(t),[t]),{minVal:b,maxVal:v}=d(()=>{let e=0,t=0;for(let n=0;n<m.length;n++){const o=m[n];o.start<e&&(e=o.start),o.end<e&&(e=o.end),o.start>t&&(t=o.start),o.end>t&&(t=o.end)}return e===t&&(t=e+1),{minVal:e,maxVal:t}},[m]),S=v-b,k=s(e=>g+y-(e-b)/S*y,[g,y,b,S]),w=d(()=>0===m.length?0:x/m.length,[m.length,x]),$=Math.max(1,w-6),M=s(()=>{if(!p)return[];const e=function(e){if(e<=0)return 1;const t=e/5,n=Math.pow(10,Math.floor(Math.log10(t))),o=t/n;return o<=1.5?n:o<=3.5?2*n:o<=7.5?5*n:10*n}(S),t=[];for(let n=Math.ceil(b/e)*e;n<=v;n+=e){const e=k(n);t.push(o("line",{key:`grid-${n}`,x1:String(g),y1:String(e),x2:String(g+x),y2:String(e),stroke:"#e5e7eb","stroke-width":"1","stroke-dasharray":"4 2"})),t.push(o("text",{key:`grid-label-${n}`,x:String(g-8),y:String(e+4),"text-anchor":"end","font-size":"11","font-family":"sans-serif",fill:"#6b7280"},String(n)))}return t},[p,S,b,v,k,g,x]),C=s(()=>{const e=[];e.push(o("line",{key:"axis-y",x1:String(g),y1:String(g),x2:String(g),y2:String(g+y),stroke:"#374151","stroke-width":"1.5"}));const t=b<=0&&v>=0?k(0):g+y;return e.push(o("line",{key:"axis-x",x1:String(g),y1:String(t),x2:String(g+x),y2:String(t),stroke:"#374151","stroke-width":"1.5"})),e},[g,x,y,b,v,k]),z=s(()=>{if(0===m.length)return[];const e=[];for(let t=0;t<m.length;t++){const n=m[t],r=g+t*w+3,s=Math.max(n.start,n.end),d=Math.min(n.start,n.end),p=k(s),h=k(d),x=Math.max(0,h-p);let b;if(b="total"===n.type?a:"decrease"===n.type?l:i,e.push(o("rect",{key:`bar-${t}`,x:String(r),y:String(p),width:String($),height:String(x),fill:b,rx:"2",ry:"2"})),f){const i="decrease"===n.type||n.value<0?h+14:p-4,l="total"===n.type?String(n.value):(n.value>=0?"+":"")+String(n.value);e.push(o("text",{key:`val-${t}`,x:String(r+$/2),y:String(i),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},l))}if(e.push(o("text",{key:`cat-${t}`,x:String(r+$/2),y:String(g+y+16),"text-anchor":"middle","font-size":"10","font-family":"sans-serif",fill:"#374151"},n.label)),u&&t<m.length-1){const i=m[t+1],l=k(n.end),a=g+(t+1)*w+3;"total"!==i.type&&e.push(o("line",{key:`conn-${t}`,x1:String(r+$),y1:String(l),x2:String(a),y2:String(l),stroke:c,"stroke-width":"1","stroke-dasharray":"3 2"}))}}return e},[m,w,$,k,i,l,a,c,f,u,g,y]),I=s(()=>h?[o("text",{key:"title",x:String(n/2),y:String(g/2+4),"text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":"sans-serif",fill:"#111827"},h)]:[],[h,n,g]),A=s(()=>t.length>0?[]:[o("text",{key:"empty",x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":"sans-serif",fill:"#9ca3af"},"No data")],[t.length,n,r]),F=M(),R=C(),D=z(),L=I(),N=A();return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":h??"Waterfall chart",style:{fontFamily:"sans-serif"}},...L,...F,...R,...D,...N)},exports.WordCloud=function(e){const{words:t=[],width:n=600,height:r=400,minFontSize:i=10,maxFontSize:l=64,fontFamily:a="sans-serif",colors:s=Lo,rotations:c=No,padding:f=4,spiral:p="archimedean",title:u}=e,h=d(()=>{if(0===t.length)return[];const e=t.map((e,t)=>({...e,originalIndex:t})).filter(e=>e.text.length>0&&e.weight>0).sort((e,t)=>t.weight-e.weight);if(0===e.length)return[];const o=e[e.length-1].weight,a=e[0].weight-o;function d(e){return 0===a?(i+l)/2:i+(e-o)/a*(l-i)}const u=[],h=n/2,g=r/2;for(let t=0;t<e.length;t++){const o=e[t],i=d(o.weight),l=c[Eo(o.text)%c.length],a=o.color??s[t%s.length];let x=!1;const y=500,m="archimedean"===p?4:5;for(let e=0;e<y;e++){let t,s;if("archimedean"===p){const n=.1*e,o=m*n;t=o*Math.cos(n),s=o*Math.sin(n)}else{const n=Math.floor(e/4)+1,o=(e%4==0?0:e)*m;switch(e%4){case 0:t=n*m*4,s=o;break;case 1:t=-o,s=n*m*4;break;case 2:t=-n*m*4,s=-o;break;default:t=o,s=-n*m*4}}const d=h+t,c=g+s,y=To(o.text,i,l,d,c),b={x:y.x-f,y:y.y-f,w:y.w+2*f,h:y.h+2*f};if(!Bo(b,n,r))continue;let v=!1;for(const e of u)if(Wo(b,e.bbox)){v=!0;break}if(!v){u.push({text:o.text,x:d,y:c,fontSize:i,rotation:l,color:a,bbox:b}),x=!0;break}}}return u},[t,n,r,i,l,s,c,f,p]);if(0===t.length||0===h.length)return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Word cloud — no data"},o("text",{x:String(n/2),y:String(r/2),"text-anchor":"middle","font-size":"14","font-family":a,fill:"currentColor",opacity:"0.6"},"No words to display."));const g=[];u&&g.push(o("text",{key:"title",x:String(n/2),y:"24","text-anchor":"middle","font-size":"16","font-weight":"bold","font-family":a,fill:"currentColor"},u));for(let e=0;e<h.length;e++){const t=h[e],n=0!==t.rotation?`translate(${t.x},${t.y}) rotate(${t.rotation})`:`translate(${t.x},${t.y})`;g.push(o("text",{key:`word-${e}`,transform:n,"text-anchor":"middle","dominant-baseline":"central","font-size":String(t.fontSize),"font-family":a,fill:t.color,"aria-label":t.text},t.text))}return o("svg",{width:"100%",viewBox:`0 0 ${n} ${r}`,preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":u??"Word cloud",style:{fontFamily:a}},...g)},exports.WordProcessor=function(e){const[t,n]=l(!1),[r,i]=l(!1),[a,f]=l(!1),[p,u]=l(-1),[h,g]=l(""),[x,y]=l(-1),[m,b]=l(0),[v,S]=l("3"),k=c(null),w={bold:s(()=>{document.execCommand("bold",!1),n(e=>!e),k.current&&k.current.focus()},[]),italic:s(()=>{document.execCommand("italic",!1),i(e=>!e),k.current&&k.current.focus()},[]),underline:s(()=>{document.execCommand("underline",!1),f(e=>!e),k.current&&k.current.focus()},[])},$={bold:t,italic:r,underline:a},M=s(e=>{document.execCommand(e,!1),k.current&&k.current.focus()},[]),C=s(e=>{document.execCommand("fontSize",!1,e),S(e),k.current&&k.current.focus()},[]),z=s(e=>{y(t=>t===e?-1:e)},[]),I=s(e=>{switch(e){case"undo":document.execCommand("undo",!1);break;case"redo":document.execCommand("redo",!1);break;case"cut":document.execCommand("cut",!1);break;case"copy":document.execCommand("copy",!1);break;case"paste":document.execCommand("paste",!1);break;case"bold":document.execCommand("bold",!1);break;case"italic":document.execCommand("italic",!1);break;case"underline":document.execCommand("underline",!1);break;case"print":"undefined"!=typeof window&&window.print&&window.print();break;case"new":k.current&&(k.current.innerHTML="",b(0))}y(-1),k.current&&k.current.focus()},[]),A=s(()=>{if(k.current){const e=k.current.textContent??"";b(Yt(e))}},[]),F=s(()=>{y(-1)},[]),R=d(()=>({width:"100%",height:"100%",minHeight:"500px",display:"flex",flexDirection:"column",fontFamily:'"Segoe UI", Roboto, Arial, sans-serif',fontSize:"13px",color:"var(--color-text, #333)",backgroundColor:"#f0f0f0",overflow:"hidden"}),[]),D=d(()=>function(){const e=[];for(let t=0;t<=20;t++){const n=t%2==0;e.push(o("div",{key:String(t),style:{position:"absolute",left:t/20*100+"%",bottom:"0",width:"1px",height:n?"10px":"5px",backgroundColor:"#999"}})),n&&e.push(o("span",{key:`l${t}`,style:{position:"absolute",left:t/20*100+"%",top:"1px",fontSize:"8px",color:"#666",transform:"translateX(-50%)"}},String(t/2)))}return e}(),[]),L=e.content??"Start typing...",N=Yt(L),T=m>0?m:N,W={position:"absolute",top:"100%",left:"0",minWidth:"160px",backgroundColor:"#ffffff",border:"1px solid #d0d0d0",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",padding:"4px 0",zIndex:"1000"},B={display:"block",width:"100%",padding:"6px 16px",fontSize:"13px",color:"#333",backgroundColor:"transparent",border:"none",textAlign:"left",cursor:"pointer",transition:"background 0.1s"};function E(e,t){return{width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid transparent",borderRadius:"3px",cursor:"pointer",fontSize:"13px",backgroundColor:$[e]?"rgba(0,0,0,0.12)":h===e?"rgba(0,0,0,0.06)":"transparent",color:"var(--color-text, #444)",transition:"background 0.15s",...t??{}}}const P=Bt.map((e,t)=>{const n=[e];return x===t&&Et[e]&&n.push(o("div",{key:"dropdown",style:W,className:"word-processor__menu-dropdown"},...Et[e].map((e,t)=>o("button",{key:String(t),style:B,onClick:t=>{t.stopPropagation(),I(e.action)},role:"menuitem"},e.label)))),o("button",{key:String(t),style:(r=t,{padding:"4px 10px",cursor:"pointer",borderRadius:"3px",fontSize:"13px",color:"var(--color-text, #333)",backgroundColor:x===r?"rgba(0,0,0,0.12)":p===r?"rgba(0,0,0,0.08)":"transparent",border:"none",lineHeight:"1",transition:"background 0.15s",position:"relative"}),role:"menuitem","aria-label":e,onClick:()=>z(t),onMouseEnter:()=>{u(t)},onMouseLeave:()=>u(-1)},...n);var r});return o("div",{className:`word-processor ${e.className??""}`.trim(),style:R},o("div",{className:"word-processor__menu-bar",style:{display:"flex",alignItems:"center",height:"30px",backgroundColor:"var(--color-bg-subtle, #ffffff)",borderBottom:"1px solid var(--color-border, #d0d0d0)",padding:"0 8px",gap:"2px",flexShrink:"0",position:"relative"},role:"menubar"},...P),o("div",{className:"word-processor__toolbar",style:{display:"flex",alignItems:"center",height:"36px",backgroundColor:"var(--color-bg-subtle, #f8f9fa)",borderBottom:"1px solid var(--color-border, #d0d0d0)",padding:"0 12px",gap:"12px",flexShrink:"0"},role:"toolbar","aria-label":"Formatting toolbar"},o("div",{style:{display:"flex",alignItems:"center",padding:"2px 8px",border:"1px solid var(--color-border, #ccc)",borderRadius:"3px",fontSize:"12px",color:"var(--color-text, #444)",backgroundColor:"transparent",cursor:"default",height:"24px",gap:"4px"},"aria-label":"Font family"},o("span",null,"Arial"),o("span",{style:{fontSize:"10px",color:"#999"}},"▼")),o("div",{key:"0",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px"}},...Pt.map(e=>o("button",{key:e.id,style:E(e.id,e.style),title:e.shortcut?`${e.label} (${e.shortcut})`:e.label,"aria-label":e.label,"aria-pressed":String($[e.id]??!1),onClick:w[e.id],onMouseEnter:()=>g(e.id),onMouseLeave:()=>g("")},e.text))),o("div",{key:"1",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px",alignItems:"center"}},o("select",{style:{padding:"2px 4px",border:"1px solid var(--color-border, #ccc)",borderRadius:"3px",fontSize:"12px",color:"var(--color-text, #444)",backgroundColor:"transparent",cursor:"pointer",height:"24px",outline:"none"},"aria-label":"Font size",value:v,onChange:e=>{const t=e.target;C(t.value)}},...jt.map(e=>o("option",{key:e,value:e},_t[e])))),o("div",{key:"2",style:{display:"flex",gap:"2px",borderLeft:"1px solid var(--color-border, #ccc)",paddingLeft:"10px"}},...Ht.map((e,t)=>o("button",{key:String(t),style:E(`align-${t}`),title:e.label,"aria-label":e.label,onClick:()=>M(e.command),onMouseEnter:()=>g(`align-${t}`),onMouseLeave:()=>g("")},e.text)))),o("div",{className:"word-processor__ruler",style:{height:"20px",backgroundColor:"#e8e8e8",borderBottom:"1px solid #ccc",position:"relative",flexShrink:"0",margin:"0 60px"},"aria-hidden":"true"},...D),o("main",{className:"word-processor__document-area",style:{flex:"1",display:"flex",justifyContent:"center",alignItems:"flex-start",padding:"30px 40px",overflow:"auto",backgroundColor:"#e0e0e0",cursor:"text"},onClick:F},o("div",{className:"word-processor__page",style:{width:"680px",minHeight:"880px",backgroundColor:"#ffffff",boxShadow:"0 2px 12px rgba(0,0,0,0.18), 0 0 1px rgba(0,0,0,0.1)",padding:"72px 72px 96px 72px",boxSizing:"border-box",fontSize:"14px",lineHeight:"1.6",color:"#222",fontFamily:'"Times New Roman", Georgia, serif',cursor:"text",outline:"none"},contentEditable:"true",ref:k,onInput:A,suppressContentEditableWarning:!0},L)),o("div",{className:"word-processor__status-bar",style:{height:"24px",backgroundColor:"var(--color-bg-subtle, #f0f0f0)",borderTop:"1px solid var(--color-border, #ccc)",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 16px",fontSize:"11px",color:"#666",flexShrink:"0"}},o("span",null,"Page 1 of 1"),o("span",null,`${T} words`),o("span",null,"100%")))},exports.applyGate=zn,exports.blochToCartesian=$n,exports.buildInputStyle=ne,exports.buildNavItemStyle=we,exports.buildRotationMatrix=Mt,exports.cartesianToBloch=Mn,exports.computeBoxStats=An,exports.computeMandelbrotGrid=function(e,t,n=[-2.5,1],o=[-1.25,1.25],r=80,i=ut){const l=[];for(let a=0;a<t;a++){const s=[],d=o[1]-a/t*(o[1]-o[0]);for(let t=0;t<e;t++){const o=n[0]+t/e*(n[1]-n[0]);s.push(i(o,d,r))}l.push(s)}return l},exports.computeSlices=St,exports.createToaster=Ze,exports.describeArc=vt,exports.generateEdges=$t,exports.generateHypercube=Rt,exports.generatePalette=Lt,exports.generateVertices=wt,exports.numRotationAngles=Dt,exports.projectTo2D=Ft,exports.transformVec=At,exports.useBarGraphScales=nt,exports.useHover=$e,exports.useHypercube=function(e={}){const t=e.dimension??4,n=e.rotationSpeed??.008,o=e.perspective??.25,r=e.scale??200,i=Dt(t),[s,c]=l(()=>new Array(i).fill(0));return a(()=>{if(0===n)return;let e=!0,t=0;const o=()=>{e&&(c(e=>e.map((e,t)=>e+n*(1+.3*t))),t=requestAnimationFrame(o))};return t=requestAnimationFrame(o),()=>{e=!1,cancelAnimationFrame(t)}},[n]),{data:d(()=>Rt(t,s,o,r),[t,s,o,r]),angles:s,setAngles:c}},exports.useLineGraphScales=xt,exports.useToast=function(e={}){const t=c(null);t.current||(t.current=Ze(e));const n=t.current,r=s(()=>o(et,{toaster:n}),[n]);return{toast:n.toast,dismiss:n.dismiss,dismissAll:n.dismissAll,ToastContainer:r}};
2
2
  //# sourceMappingURL=specifyjs-components.cjs.js.map