tscircuit 0.0.855 → 0.0.856-libonly

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.
@@ -5515,7 +5515,7 @@ ${R.type}: ${O}
5515
5515
  50% { opacity: 0.2; }
5516
5516
  100% { opacity: 0.6; }
5517
5517
  }
5518
- `,r.appendChild(b)}})}};o();const s=new MutationObserver(o);return s.observe(r,{childList:!0,subtree:!1,characterData:!1}),()=>{s.disconnect()}},[n,t,e,i])},_lt=["#8B0000","#2F4F4F","#191970","#006400","#FF4500","#800080","#2E8B57","#B8860B","#C71585","#008B8B"],fzn=n=>{const{svgDivRef:e,circuitJson:t,circuitJsonKey:i,showGroups:r}=n;ce.useEffect(()=>{if(e.current&&e.current.querySelectorAll(".schematic-group-overlay").forEach(a=>a.remove()),!e.current||!r||!t||t.length===0)return;const o=setTimeout(()=>{if(!e.current)return;const s=e.current.querySelector("svg");if(!s)return;s.querySelectorAll(".schematic-group-overlay").forEach(c=>c.remove());try{const c=cg(t).source_group?.list().filter(b=>!b.is_subcircuit)||[],l=cg(t).schematic_component?.list()||[],u=new Map;c.forEach(b=>{const w=b;if(w.parent_source_group_id){const S=u.get(w.parent_source_group_id)||[];S.push(b.source_group_id),u.set(w.parent_source_group_id,S)}});const d=b=>{const w=[],S=u.get(b)||[];for(const k of S)w.push(k),w.push(...d(k));return w},h=b=>{const w=c.find(S=>S.source_group_id===b);return w?.parent_source_group_id?1+h(w.parent_source_group_id):0},p=c.length>0&&c.some(b=>b.name&&b.name.trim()!=="");let m=[];if(p){const b=new Map;for(const w of l){const S=cg(t).source_component.get(w.source_component_id);S?.source_group_id&&(b.has(S.source_group_id)||b.set(S.source_group_id,[]),b.get(S.source_group_id).push(w))}c.forEach((w,S)=>{let k=b.get(w.source_group_id)||[];const A=d(w.source_group_id);for(const R of A){const M=b.get(R)||[];k=[...k,...M]}if(k.length>0){const R=h(w.source_group_id),M=d(w.source_group_id).length>0;if(w.name?.startsWith("unnamed_board"))return;m.push({id:w.source_group_id,name:w.name||`Group ${S+1}`,components:k,color:_lt[S%_lt.length],depthLevel:R,hasChildren:M,sourceGroupId:w.source_group_id})}})}const _=s.viewBox.baseVal,y=s.getBoundingClientRect(),x=Math.min(y.width/_.width,y.height/_.height)||1;m.sort((b,w)=>b.depthLevel-w.depthLevel),m.forEach(b=>{if(b.components.length===0)return;const w=mzn(b.components,s);if(!w)return;const S=Math.max(8,Math.min(25,15/Math.max(x,.3))),k=b.hasChildren?S*.6:0,A=S+k,R=Math.max(1,2/Math.max(x,.5)),M=b.depthLevel===0?R:R*.7,N=Math.max(4,8/Math.max(x,.5)),C=b.hasChildren?1.3:1,U=N*C,O=U*.5,H=document.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("class","schematic-group-overlay"),H.setAttribute("x",(w.minX-A).toString()),H.setAttribute("y",(w.minY-A).toString()),H.setAttribute("width",(w.maxX-w.minX+A*2).toString()),H.setAttribute("height",(w.maxY-w.minY+A*2).toString()),H.setAttribute("fill","none"),H.setAttribute("stroke",b.color),H.setAttribute("stroke-width",M.toString()),H.setAttribute("stroke-dasharray",`${U},${O}`),H.setAttribute("opacity","0.8"),H.setAttribute("rx","0"),H.setAttribute("ry","0");const Y=Math.max(6,Math.min(20,14/Math.max(x,.2))),X=b.depthLevel===0||b.depthLevel===1?0:b.depthLevel*.2,K=Y*(1-X),J=Math.max(1,K*.2),le=b.name,he=document.createElementNS("http://www.w3.org/2000/svg","text");he.setAttribute("font-size",K.toString()),he.setAttribute("font-family","Arial, sans-serif"),he.textContent=le,s.appendChild(he);const ve=he.getBBox();s.removeChild(he);const oe=ve.width+J*2,ae=K+J*2,de=w.minX-A,Te=w.minY-A-ae,Ce=document.createElementNS("http://www.w3.org/2000/svg","rect");Ce.setAttribute("class","schematic-group-overlay"),Ce.setAttribute("x",de.toString()),Ce.setAttribute("y",(Te-ae).toString()),Ce.setAttribute("width",oe.toString()),Ce.setAttribute("height",ae.toString()),Ce.setAttribute("fill","transparent"),Ce.setAttribute("rx","0"),Ce.setAttribute("ry","0");const Oe=document.createElementNS("http://www.w3.org/2000/svg","text");Oe.setAttribute("class","schematic-group-overlay"),Oe.setAttribute("x",(de+J).toString()),Oe.setAttribute("y",(Te+ae-J).toString()),Oe.setAttribute("fill",b.color),Oe.setAttribute("font-size",K.toString()),Oe.setAttribute("font-family","Arial, sans-serif"),Oe.setAttribute("font-weight",b.depthLevel===0?"600":"500"),Oe.setAttribute("stroke",b.color),Oe.setAttribute("stroke-width",Math.max(.2,K*.02).toString()),Oe.textContent=le,s.appendChild(H),s.appendChild(Ce),s.appendChild(Oe)})}catch(c){console.error("Error creating group overlays:",c)}},10);return()=>clearTimeout(o)},[e,i,r])};function mzn(n,e){let t=1/0,i=1/0,r=-1/0,o=-1/0;for(const a of n){let c=e.querySelector(`g[data-schematic-component-id="${a.schematic_component_id}"]`);if(c||(c=e.querySelector(`[data-schematic-component-id="${a.schematic_component_id}"]`)),c){const l=c.getBBox();t=Math.min(t,l.x),i=Math.min(i,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height)}}return t===1/0?null:{minX:t,minY:i,maxX:r,maxY:o}}var _zn=jh("schematic-viewer"),yzn=()=>{jh.enable("schematic-viewer*")},gzn=_zn,xzn=n=>{const[e,t]=ce.useState(0),[i,r]=ce.useState(0);return ce.useEffect(()=>{if(!n.current)return;const o=()=>{const a=n.current?.getBoundingClientRect();t(a?.width||0),r(a?.height||0)};o();const s=new ResizeObserver(o);return s.observe(n.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:e,containerHeight:i}},bzn=gzn.extend("useComponentDragging"),vzn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:i,svgToScreenProjection:r,realToSvgProjection:o,enabled:s=!1,snapToGrid:a=!1})=>{const[c,l]=ce.useState(null),u=ko(o,r),d=ce.useRef(null),h=ce.useRef(null),p=ce.useRef(new Map);ce.useEffect(()=>{e.forEach(R=>{"edit_event_type"in R&&R.edit_event_type==="edit_schematic_component_location"&&!R.in_progress&&p.current.set(R.schematic_component_id,{...R.new_center})})},[e]);const m=ce.useCallback((R,M,N)=>{if(!s)return!1;const C=N.closest('[data-circuit-json-type="schematic_component"]');if(!C)return!1;const U=C.getAttribute("data-schematic-component-id");if(!U)return!1;i&&i();const O=cg(t).schematic_component.get(U);if(!O)return!1;d.current={x:R,y:M};let H;const Y=p.current.get(U);if(Y)H={...Y};else{const K=mlt({editEvents:e,schematic_component_id:U});H={x:O.center.x+K.x,y:O.center.y+K.y},p.current.set(U,{...H})}const X={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:U,original_center:H,new_center:{...H},in_progress:!0,created_at:Date.now(),_element:C};return h.current=X,l(X),!0},[i,s,t,e]),_=ce.useCallback(R=>{m(R.clientX,R.clientY,R.target)},[m]),y=ce.useCallback(R=>{if(R.touches.length!==1)return;const M=R.touches[0];m(M.clientX,M.clientY,R.target)&&R.preventDefault()},[m]),x=ce.useCallback((R,M)=>{if(!h.current||!d.current)return;const N={x:R-d.current.x,y:M-d.current.y},C={x:N.x/u.a,y:N.y/u.d};let U={x:h.current.original_center.x+C.x,y:h.current.original_center.y+C.y};if(a){const H=Y=>Math.round(Y*10)/10;U={x:H(U.x),y:H(U.y)}}const O={...h.current,new_center:U};h.current=O,l(O)},[u,a]),b=ce.useCallback(R=>x(R.clientX,R.clientY),[x]),w=ce.useCallback(R=>{if(R.touches.length!==1||!h.current)return;R.preventDefault();const M=R.touches[0];x(M.clientX,M.clientY)},[x]),S=ce.useCallback(()=>{if(!h.current)return;const R={...h.current,in_progress:!1};p.current.set(R.schematic_component_id,{...R.new_center}),bzn("endDrag calling onEditEvent with new edit event",{newEditEvent:R}),n&&n(R),h.current=null,d.current=null,l(null)},[n]),k=ce.useCallback(()=>S(),[S]),A=ce.useCallback(()=>S(),[S]);return ce.useEffect(()=>(window.addEventListener("mousemove",b),window.addEventListener("mouseup",k),window.addEventListener("touchmove",w,{passive:!1}),window.addEventListener("touchend",A),()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",k),window.removeEventListener("touchmove",w),window.removeEventListener("touchend",A)}),[b,k,w,A]),{handleMouseDown:_,handleTouchStart:y,isDragging:!!h.current,activeEditEvent:c}},mC={schematicEditIcon:50,schematicGridIcon:49,spiceSimulationIcon:50,viewMenuIcon:48,viewMenu:55,viewMenuBackdrop:54,clickToInteractOverlay:100,schematicComponentHoverOutline:47},wzn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"16px",right:"64px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.schematicEditIcon},children:re.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[re.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),re.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})},Szn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"56px",right:"64px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.schematicGridIcon},children:re.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:re.jsx("path",{d:"M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z"})})})},Ezn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.viewMenuIcon},children:re.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[re.jsx("circle",{cx:"12",cy:"12",r:"1"}),re.jsx("circle",{cx:"12",cy:"5",r:"1"}),re.jsx("circle",{cx:"12",cy:"19",r:"1"})]})})},Tzn={version:"2.0.45"},Mzn=({circuitJson:n,circuitJsonKey:e,isVisible:t,onClose:i,showGroups:r,onToggleGroups:o})=>{const s=ce.useMemo(()=>{if(!n||n.length===0)return!1;try{if((cg(n).source_group?.list()||[]).length>0)return!0;const c=cg(n).schematic_component?.list()||[];if(c.length>1){const l=new Set;for(const u of c){const d=cg(n).source_component.get(u.source_component_id);d?.ftype&&l.add(d.ftype)}return l.size>1}return!1}catch(a){return console.error("Error checking for groups:",a),!1}},[e]);return t?re.jsxs(re.Fragment,{children:[re.jsx("div",{onClick:i,onTouchEnd:a=>{a.preventDefault(),i()},style:{position:"absolute",inset:0,backgroundColor:"transparent",zIndex:mC.viewMenuBackdrop}}),re.jsxs("div",{style:{position:"absolute",top:"56px",right:"16px",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ccc",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",minWidth:"200px",zIndex:mC.viewMenu},children:[re.jsxs("div",{onClick:()=>{s&&o(!r)},onTouchEnd:a=>{a.preventDefault(),s&&o(!r)},style:{padding:"8px 12px",cursor:s?"pointer":"not-allowed",opacity:s?1:.5,fontSize:"13px",color:"#000000",fontFamily:"sans-serif",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:a=>{s&&(a.currentTarget.style.backgroundColor="#f0f0f0")},onMouseLeave:a=>{s&&(a.currentTarget.style.backgroundColor="transparent")},children:[re.jsx("div",{style:{width:"16px",height:"16px",border:"2px solid #000",borderRadius:"2px",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"bold"},children:r&&"✓"}),"View Schematic Groups"]}),!s&&re.jsx("div",{style:{padding:"8px 12px",fontSize:"11px",color:"#666",fontStyle:"italic"},children:"No groups found in this schematic"}),re.jsxs("div",{style:{padding:"4px 8px",fontSize:"12px",color:"#999",borderTop:"1px solid #eee",textAlign:"center"},children:["v",String(Tzn?.version)]})]})]}):null},Czn=()=>re.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re.jsx("path",{d:"M3 12h2.5l2.5-9 4 18 4-9h5.5"})}),Azn=({onClick:n})=>re.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"112px",backgroundColor:"#fff",color:"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.spiceSimulationIcon},children:re.jsx(Czn,{})});AY.register(j7n,G7n,w7n,v7n,R7n,$7n,A7n);var NY=["#8884d8","#82ca9d","#ffc658","#ff7300","#387908"],ylt=n=>{if(n===0)return"0s";const e=Math.abs(n);let t="s",i=1;return e<1e-12?(t="fs",i=1e15):e<1e-9?(t="ps",i=1e12):e<1e-6?(t="ns",i=1e9):e<.001?(t="us",i=1e6):e<1&&(t="ms",i=1e3),`${parseFloat((n*i).toPrecision(3))}${t}`},Pzn=({plotData:n,nodes:e,isLoading:t,error:i,hasRun:r})=>{const o=ce.useMemo(()=>{const c=e.some(u=>u.toLowerCase().startsWith("v(")),l=e.some(u=>u.toLowerCase().startsWith("i("));return c&&l?"Value":c?"Voltage (V)":l?"Current (A)":"Value"},[e]);if(t)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"Running simulation..."});if(!r)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:'Click "Run" to start the simulation.'});if(i)return re.jsxs("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"red"},children:["Error: ",i]});if(n.length===0)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"No data to plot. Check simulation output or SPICE netlist."});const s={datasets:e.map((c,l)=>({label:c,data:n.map(u=>({x:Number(u.name),y:u[c]})),borderColor:NY[l%NY.length],backgroundColor:NY[l%NY.length],fill:!1,tension:.1}))},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{font:{family:"sans-serif"}}},title:{display:!1},tooltip:{callbacks:{title:c=>{if(c.length>0){const l=c[0];return ylt(l.parsed.x)}return""}}}},scales:{x:{type:"linear",title:{display:!0,text:"Time",font:{family:"sans-serif"}},ticks:{callback:c=>ylt(c),font:{family:"sans-serif"}}},y:{title:{display:!0,text:o,font:{family:"sans-serif"}},ticks:{font:{family:"sans-serif"}}}}};return re.jsx("div",{style:{position:"relative",height:"300px",width:"100%"},children:re.jsx(ezn,{options:a,data:s})})},Rzn=({spiceString:n,onClose:e,plotData:t,nodes:i,isLoading:r,error:o,simOptions:s,onSimOptionsChange:a,hasRun:c})=>{const[l,u]=ce.useState(String(s.startTime)),[d,h]=ce.useState(String(s.duration));ce.useEffect(()=>{u(String(s.startTime)),h(String(s.duration))},[s.startTime,s.duration]);const p=()=>{a({...s,startTime:Number(l),duration:Number(d)})},m=i.filter(_=>{const y=_.toLowerCase().startsWith("v("),x=_.toLowerCase().startsWith("i(");return!!(s.showVoltage&&y||s.showCurrent&&x)});return re.jsx("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:1002,fontFamily:"sans-serif"},children:re.jsxs("div",{style:{backgroundColor:"white",padding:"24px",borderRadius:"12px",width:"90%",maxWidth:"900px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)"},children:[re.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",borderBottom:"1px solid #eee",paddingBottom:"16px"},children:[re.jsx("h2",{style:{margin:0,fontSize:"22px",fontWeight:600,color:"#333"},children:"SPICE Simulation"}),re.jsx("button",{onClick:e,style:{background:"none",border:"none",fontSize:"28px",cursor:"pointer",color:"#888",padding:0,lineHeight:1},children:"×"})]}),re.jsx("div",{children:re.jsx(Pzn,{plotData:t,nodes:m,isLoading:r,error:o,hasRun:c})}),re.jsxs("div",{style:{marginTop:"16px",padding:"12px",backgroundColor:"#f7f7f7",borderRadius:"6px",display:"flex",flexWrap:"wrap",gap:"24px",alignItems:"center",fontSize:"14px"},children:[re.jsxs("div",{style:{display:"flex",gap:"16px"},children:[re.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[re.jsx("input",{type:"checkbox",checked:s.showVoltage,onChange:_=>a({...s,showVoltage:_.target.checked})}),"Voltage"]}),re.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[re.jsx("input",{type:"checkbox",checked:s.showCurrent,onChange:_=>a({...s,showCurrent:_.target.checked})}),"Current"]})]}),re.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center"},children:[re.jsx("label",{htmlFor:"startTime",children:"Start Time (ms):"}),re.jsx("input",{id:"startTime",type:"number",value:l,onChange:_=>u(_.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),re.jsx("label",{htmlFor:"duration",children:"Duration (ms):"}),re.jsx("input",{id:"duration",type:"number",value:d,onChange:_=>h(_.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),re.jsx("button",{onClick:p,style:{padding:"4px 12px",borderRadius:"4px",border:"1px solid #ccc",backgroundColor:"#f0f0f0",cursor:"pointer"},children:c?"Rerun":"Run"})]})]}),re.jsxs("div",{style:{marginTop:"24px"},children:[re.jsx("h3",{style:{marginTop:0,marginBottom:"12px",fontSize:"18px",fontWeight:600,color:"#333"},children:"SPICE Netlist"}),re.jsx("pre",{style:{backgroundColor:"#fafafa",padding:"16px",borderRadius:"6px",maxHeight:"150px",overflowY:"auto",border:"1px solid #eee",color:"#333",fontSize:"13px",fontFamily:"monospace"},children:n})]})]})})},Izn="dmFyIGU9bnVsbCxzPWFzeW5jKCk9Pihhd2FpdCBpbXBvcnQoImh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vZWVjaXJjdWl0LWVuZ2luZUAxLjUuMi8rZXNtIikpLlNpbXVsYXRpb24sYz1hc3luYygpPT57aWYoZSYmZS5pc0luaXRpYWxpemVkKCkpcmV0dXJuO2xldCBpPWF3YWl0IHMoKTtlPW5ldyBpLGF3YWl0IGUuc3RhcnQoKX07c2VsZi5vbm1lc3NhZ2U9YXN5bmMgaT0+e3RyeXtpZihhd2FpdCBjKCksIWUpdGhyb3cgbmV3IEVycm9yKCJTaW11bGF0aW9uIG5vdCBpbml0aWFsaXplZCIpO2xldCB0PWkuZGF0YS5zcGljZVN0cmluZyxhPXQubWF0Y2goL3dyZGF0YVxzKyhcUyspXHMrKC4qKS9pKTtpZihhKXtsZXQgbz1gLnByb2JlICR7YVsyXS50cmltKCkuc3BsaXQoL1xzKy8pLmpvaW4oIiAiKX1gO3Q9dC5yZXBsYWNlKC93cmRhdGEuKi9pLG8pfWVsc2UgaWYoIXQubWF0Y2goL1wucHJvYmUvaSkpdGhyb3cgdC5tYXRjaCgvcGxvdFxzKyguKikvaSk/bmV3IEVycm9yKCJUaGUgJ3Bsb3QnIGNvbW1hbmQgaXMgbm90IHN1cHBvcnRlZCBmb3IgZGF0YSBleHRyYWN0aW9uLiBQbGVhc2UgdXNlICd3cmRhdGEgPGZpbGVuYW1lPiA8dmFyMT4gLi4uJyBvciAnLnByb2JlIDx2YXIxPiAuLi4nIGluc3RlYWQuIik6bmV3IEVycm9yKCJObyAnLnByb2JlJyBvciAnd3JkYXRhJyBjb21tYW5kIGZvdW5kIGluIFNQSUNFIGZpbGUuIFVzZSAnd3JkYXRhIDxmaWxlbmFtZT4gPHZhcjE+IC4uLicgdG8gc3BlY2lmeSBvdXRwdXQuIik7ZS5zZXROZXRMaXN0KHQpO2xldCBuPWF3YWl0IGUucnVuU2ltKCk7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToicmVzdWx0IixyZXN1bHQ6bn0pfWNhdGNoKHQpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIixlcnJvcjp0Lm1lc3NhZ2V9KX19Owo=",kY=null,Nzn=()=>{if(typeof window>"u")return null;if(kY)return kY;try{const n=new Blob([atob(Izn)],{type:"application/javascript"});return kY=URL.createObjectURL(n),kY}catch(n){return console.error("Failed to create blob URL for worker",n),null}},kzn=n=>{const e={};if(n.dataType==="real")n.data.forEach(a=>{e[a.name]=a.values});else if(n.dataType==="complex")n.data.forEach(a=>{e[a.name]=a.values.map(c=>c.real)});else throw new Error("Unsupported data type in simulation result");const t=Object.keys(e).find(a=>a.toLowerCase()==="time"||a.toLowerCase()==="frequency");if(!t)throw new Error("No time or frequency data in simulation result");const i=e[t],r=Object.keys(e).filter(a=>a!==t),o=r;return{plotData:i.map((a,c)=>{const l={name:a.toExponential(2)};return r.forEach(u=>{l[u]=e[u][c]}),l}),nodes:o}},Ozn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState([]),[o,s]=ce.useState(!0),[a,c]=ce.useState(null);return ce.useEffect(()=>{if(!n){s(!1),t([]),r([]),c(null);return}s(!0),c(null),t([]),r([]);const l=Nzn();if(!l){c("Could not create SPICE simulation worker."),s(!1);return}const u=new Worker(l,{type:"module"});return u.onmessage=d=>{if(d.data.type==="result")try{const{plotData:h,nodes:p}=kzn(d.data.result);t(h),r(p)}catch(h){c(h.message||"Failed to parse simulation result"),console.error(h)}else d.data.type==="error"&&c(d.data.error);s(!1)},u.onerror=d=>{c(d.message),s(!1)},u.postMessage({spiceString:n}),()=>{u.terminate()}},[n]),{plotData:e,nodes:i,isLoading:o,error:a}},dbe=n=>{if(n===0)return"0";const e=Math.abs(n),t=i=>i.toPrecision(4);return e>=1?t(n):e>=.001?`${t(n*1e3)}m`:e>=1e-6?`${t(n*1e6)}u`:e>=1e-9?`${t(n*1e9)}n`:e>=1e-12?`${t(n*1e12)}p`:e>=1e-15?`${t(n*1e15)}f`:n.toExponential(3)},Lzn=(n,e)=>{const i=czn(n).toSpiceString(),o=i.split(`
5518
+ `,r.appendChild(b)}})}};o();const s=new MutationObserver(o);return s.observe(r,{childList:!0,subtree:!1,characterData:!1}),()=>{s.disconnect()}},[n,t,e,i])},_lt=["#8B0000","#2F4F4F","#191970","#006400","#FF4500","#800080","#2E8B57","#B8860B","#C71585","#008B8B"],fzn=n=>{const{svgDivRef:e,circuitJson:t,circuitJsonKey:i,showGroups:r}=n;ce.useEffect(()=>{if(e.current&&e.current.querySelectorAll(".schematic-group-overlay").forEach(a=>a.remove()),!e.current||!r||!t||t.length===0)return;const o=setTimeout(()=>{if(!e.current)return;const s=e.current.querySelector("svg");if(!s)return;s.querySelectorAll(".schematic-group-overlay").forEach(c=>c.remove());try{const c=cg(t).source_group?.list().filter(b=>!b.is_subcircuit)||[],l=cg(t).schematic_component?.list()||[],u=new Map;c.forEach(b=>{const w=b;if(w.parent_source_group_id){const S=u.get(w.parent_source_group_id)||[];S.push(b.source_group_id),u.set(w.parent_source_group_id,S)}});const d=b=>{const w=[],S=u.get(b)||[];for(const k of S)w.push(k),w.push(...d(k));return w},h=b=>{const w=c.find(S=>S.source_group_id===b);return w?.parent_source_group_id?1+h(w.parent_source_group_id):0},p=c.length>0&&c.some(b=>b.name&&b.name.trim()!=="");let m=[];if(p){const b=new Map;for(const w of l){const S=cg(t).source_component.get(w.source_component_id);S?.source_group_id&&(b.has(S.source_group_id)||b.set(S.source_group_id,[]),b.get(S.source_group_id).push(w))}c.forEach((w,S)=>{let k=b.get(w.source_group_id)||[];const A=d(w.source_group_id);for(const R of A){const M=b.get(R)||[];k=[...k,...M]}if(k.length>0){const R=h(w.source_group_id),M=d(w.source_group_id).length>0;if(w.name?.startsWith("unnamed_board"))return;m.push({id:w.source_group_id,name:w.name||`Group ${S+1}`,components:k,color:_lt[S%_lt.length],depthLevel:R,hasChildren:M,sourceGroupId:w.source_group_id})}})}const _=s.viewBox.baseVal,y=s.getBoundingClientRect(),x=Math.min(y.width/_.width,y.height/_.height)||1;m.sort((b,w)=>b.depthLevel-w.depthLevel),m.forEach(b=>{if(b.components.length===0)return;const w=mzn(b.components,s);if(!w)return;const S=Math.max(8,Math.min(25,15/Math.max(x,.3))),k=b.hasChildren?S*.6:0,A=S+k,R=Math.max(1,2/Math.max(x,.5)),M=b.depthLevel===0?R:R*.7,N=Math.max(4,8/Math.max(x,.5)),C=b.hasChildren?1.3:1,U=N*C,O=U*.5,H=document.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("class","schematic-group-overlay"),H.setAttribute("x",(w.minX-A).toString()),H.setAttribute("y",(w.minY-A).toString()),H.setAttribute("width",(w.maxX-w.minX+A*2).toString()),H.setAttribute("height",(w.maxY-w.minY+A*2).toString()),H.setAttribute("fill","none"),H.setAttribute("stroke",b.color),H.setAttribute("stroke-width",M.toString()),H.setAttribute("stroke-dasharray",`${U},${O}`),H.setAttribute("opacity","0.8"),H.setAttribute("rx","0"),H.setAttribute("ry","0");const Y=Math.max(6,Math.min(20,14/Math.max(x,.2))),X=b.depthLevel===0||b.depthLevel===1?0:b.depthLevel*.2,K=Y*(1-X),J=Math.max(1,K*.2),le=b.name,he=document.createElementNS("http://www.w3.org/2000/svg","text");he.setAttribute("font-size",K.toString()),he.setAttribute("font-family","Arial, sans-serif"),he.textContent=le,s.appendChild(he);const ve=he.getBBox();s.removeChild(he);const oe=ve.width+J*2,ae=K+J*2,de=w.minX-A,Te=w.minY-A-ae,Ce=document.createElementNS("http://www.w3.org/2000/svg","rect");Ce.setAttribute("class","schematic-group-overlay"),Ce.setAttribute("x",de.toString()),Ce.setAttribute("y",(Te-ae).toString()),Ce.setAttribute("width",oe.toString()),Ce.setAttribute("height",ae.toString()),Ce.setAttribute("fill","transparent"),Ce.setAttribute("rx","0"),Ce.setAttribute("ry","0");const Oe=document.createElementNS("http://www.w3.org/2000/svg","text");Oe.setAttribute("class","schematic-group-overlay"),Oe.setAttribute("x",(de+J).toString()),Oe.setAttribute("y",(Te+ae-J).toString()),Oe.setAttribute("fill",b.color),Oe.setAttribute("font-size",K.toString()),Oe.setAttribute("font-family","Arial, sans-serif"),Oe.setAttribute("font-weight",b.depthLevel===0?"600":"500"),Oe.setAttribute("stroke",b.color),Oe.setAttribute("stroke-width",Math.max(.2,K*.02).toString()),Oe.textContent=le,s.appendChild(H),s.appendChild(Ce),s.appendChild(Oe)})}catch(c){console.error("Error creating group overlays:",c)}},10);return()=>clearTimeout(o)},[e,i,r])};function mzn(n,e){let t=1/0,i=1/0,r=-1/0,o=-1/0;for(const a of n){let c=e.querySelector(`g[data-schematic-component-id="${a.schematic_component_id}"]`);if(c||(c=e.querySelector(`[data-schematic-component-id="${a.schematic_component_id}"]`)),c){const l=c.getBBox();t=Math.min(t,l.x),i=Math.min(i,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height)}}return t===1/0?null:{minX:t,minY:i,maxX:r,maxY:o}}var _zn=jh("schematic-viewer"),yzn=()=>{jh.enable("schematic-viewer*")},gzn=_zn,xzn=n=>{const[e,t]=ce.useState(0),[i,r]=ce.useState(0);return ce.useEffect(()=>{if(!n.current)return;const o=()=>{const a=n.current?.getBoundingClientRect();t(a?.width||0),r(a?.height||0)};o();const s=new ResizeObserver(o);return s.observe(n.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:e,containerHeight:i}},bzn=gzn.extend("useComponentDragging"),vzn=({onEditEvent:n,editEvents:e=[],circuitJson:t,cancelDrag:i,svgToScreenProjection:r,realToSvgProjection:o,enabled:s=!1,snapToGrid:a=!1})=>{const[c,l]=ce.useState(null),u=ko(o,r),d=ce.useRef(null),h=ce.useRef(null),p=ce.useRef(new Map);ce.useEffect(()=>{e.forEach(R=>{"edit_event_type"in R&&R.edit_event_type==="edit_schematic_component_location"&&!R.in_progress&&p.current.set(R.schematic_component_id,{...R.new_center})})},[e]);const m=ce.useCallback((R,M,N)=>{if(!s)return!1;const C=N.closest('[data-circuit-json-type="schematic_component"]');if(!C)return!1;const U=C.getAttribute("data-schematic-component-id");if(!U)return!1;i&&i();const O=cg(t).schematic_component.get(U);if(!O)return!1;d.current={x:R,y:M};let H;const Y=p.current.get(U);if(Y)H={...Y};else{const K=mlt({editEvents:e,schematic_component_id:U});H={x:O.center.x+K.x,y:O.center.y+K.y},p.current.set(U,{...H})}const X={edit_event_id:Math.random().toString(36).substr(2,9),edit_event_type:"edit_schematic_component_location",schematic_component_id:U,original_center:H,new_center:{...H},in_progress:!0,created_at:Date.now(),_element:C};return h.current=X,l(X),!0},[i,s,t,e]),_=ce.useCallback(R=>{m(R.clientX,R.clientY,R.target)},[m]),y=ce.useCallback(R=>{if(R.touches.length!==1)return;const M=R.touches[0];m(M.clientX,M.clientY,R.target)&&R.preventDefault()},[m]),x=ce.useCallback((R,M)=>{if(!h.current||!d.current)return;const N={x:R-d.current.x,y:M-d.current.y},C={x:N.x/u.a,y:N.y/u.d};let U={x:h.current.original_center.x+C.x,y:h.current.original_center.y+C.y};if(a){const H=Y=>Math.round(Y*10)/10;U={x:H(U.x),y:H(U.y)}}const O={...h.current,new_center:U};h.current=O,l(O)},[u,a]),b=ce.useCallback(R=>x(R.clientX,R.clientY),[x]),w=ce.useCallback(R=>{if(R.touches.length!==1||!h.current)return;R.preventDefault();const M=R.touches[0];x(M.clientX,M.clientY)},[x]),S=ce.useCallback(()=>{if(!h.current)return;const R={...h.current,in_progress:!1};p.current.set(R.schematic_component_id,{...R.new_center}),bzn("endDrag calling onEditEvent with new edit event",{newEditEvent:R}),n&&n(R),h.current=null,d.current=null,l(null)},[n]),k=ce.useCallback(()=>S(),[S]),A=ce.useCallback(()=>S(),[S]);return ce.useEffect(()=>(window.addEventListener("mousemove",b),window.addEventListener("mouseup",k),window.addEventListener("touchmove",w,{passive:!1}),window.addEventListener("touchend",A),()=>{window.removeEventListener("mousemove",b),window.removeEventListener("mouseup",k),window.removeEventListener("touchmove",w),window.removeEventListener("touchend",A)}),[b,k,w,A]),{handleMouseDown:_,handleTouchStart:y,isDragging:!!h.current,activeEditEvent:c}},mC={schematicEditIcon:50,schematicGridIcon:49,spiceSimulationIcon:50,viewMenuIcon:48,viewMenu:55,viewMenuBackdrop:54,clickToInteractOverlay:100,schematicComponentHoverOutline:47},wzn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"16px",right:"64px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.schematicEditIcon},children:re.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[re.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),re.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})})},Szn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"56px",right:"64px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.schematicGridIcon},children:re.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:re.jsx("path",{d:"M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z"})})})},Ezn=({onClick:n,active:e})=>{const t=i=>{i.preventDefault(),n()};return re.jsx("div",{onClick:t,onTouchEnd:t,style:{position:"absolute",top:"16px",right:"16px",backgroundColor:e?"#4CAF50":"#fff",color:e?"#fff":"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.viewMenuIcon},children:re.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[re.jsx("circle",{cx:"12",cy:"12",r:"1"}),re.jsx("circle",{cx:"12",cy:"5",r:"1"}),re.jsx("circle",{cx:"12",cy:"19",r:"1"})]})})},Tzn={version:"2.0.46"},Mzn=({circuitJson:n,circuitJsonKey:e,isVisible:t,onClose:i,showGroups:r,onToggleGroups:o})=>{const s=ce.useMemo(()=>{if(!n||n.length===0)return!1;try{if((cg(n).source_group?.list()||[]).length>0)return!0;const c=cg(n).schematic_component?.list()||[];if(c.length>1){const l=new Set;for(const u of c){const d=cg(n).source_component.get(u.source_component_id);d?.ftype&&l.add(d.ftype)}return l.size>1}return!1}catch(a){return console.error("Error checking for groups:",a),!1}},[e]);return t?re.jsxs(re.Fragment,{children:[re.jsx("div",{onClick:i,onTouchEnd:a=>{a.preventDefault(),i()},style:{position:"absolute",inset:0,backgroundColor:"transparent",zIndex:mC.viewMenuBackdrop}}),re.jsxs("div",{style:{position:"absolute",top:"56px",right:"16px",backgroundColor:"#ffffff",color:"#000000",border:"1px solid #ccc",borderRadius:"4px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",minWidth:"200px",zIndex:mC.viewMenu},children:[re.jsxs("div",{onClick:()=>{s&&o(!r)},onTouchEnd:a=>{a.preventDefault(),s&&o(!r)},style:{padding:"8px 12px",cursor:s?"pointer":"not-allowed",opacity:s?1:.5,fontSize:"13px",color:"#000000",fontFamily:"sans-serif",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:a=>{s&&(a.currentTarget.style.backgroundColor="#f0f0f0")},onMouseLeave:a=>{s&&(a.currentTarget.style.backgroundColor="transparent")},children:[re.jsx("div",{style:{width:"16px",height:"16px",border:"2px solid #000",borderRadius:"2px",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:"bold"},children:r&&"✓"}),"View Schematic Groups"]}),!s&&re.jsx("div",{style:{padding:"8px 12px",fontSize:"11px",color:"#666",fontStyle:"italic"},children:"No groups found in this schematic"}),re.jsxs("div",{style:{padding:"4px 8px",fontSize:"12px",color:"#999",borderTop:"1px solid #eee",textAlign:"center"},children:["v",String(Tzn?.version)]})]})]}):null},Czn=()=>re.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:re.jsx("path",{d:"M3 12h2.5l2.5-9 4 18 4-9h5.5"})}),Azn=({onClick:n})=>re.jsx("div",{onClick:n,style:{position:"absolute",top:"16px",right:"112px",backgroundColor:"#fff",color:"#000",padding:"8px",borderRadius:"4px",cursor:"pointer",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",display:"flex",alignItems:"center",gap:"4px",zIndex:mC.spiceSimulationIcon},children:re.jsx(Czn,{})});AY.register(j7n,G7n,w7n,v7n,R7n,$7n,A7n);var NY=["#8884d8","#82ca9d","#ffc658","#ff7300","#387908"],ylt=n=>{if(n===0)return"0s";const e=Math.abs(n);let t="s",i=1;return e<1e-12?(t="fs",i=1e15):e<1e-9?(t="ps",i=1e12):e<1e-6?(t="ns",i=1e9):e<.001?(t="us",i=1e6):e<1&&(t="ms",i=1e3),`${parseFloat((n*i).toPrecision(3))}${t}`},Pzn=({plotData:n,nodes:e,isLoading:t,error:i,hasRun:r})=>{const o=ce.useMemo(()=>{const c=e.some(u=>u.toLowerCase().startsWith("v(")),l=e.some(u=>u.toLowerCase().startsWith("i("));return c&&l?"Value":c?"Voltage (V)":l?"Current (A)":"Value"},[e]);if(t)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"Running simulation..."});if(!r)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:'Click "Run" to start the simulation.'});if(i)return re.jsxs("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"red"},children:["Error: ",i]});if(n.length===0)return re.jsx("div",{style:{height:"300px",width:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:"No data to plot. Check simulation output or SPICE netlist."});const s={datasets:e.map((c,l)=>({label:c,data:n.map(u=>({x:Number(u.name),y:u[c]})),borderColor:NY[l%NY.length],backgroundColor:NY[l%NY.length],fill:!1,tension:.1}))},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"top",labels:{font:{family:"sans-serif"}}},title:{display:!1},tooltip:{callbacks:{title:c=>{if(c.length>0){const l=c[0];return ylt(l.parsed.x)}return""}}}},scales:{x:{type:"linear",title:{display:!0,text:"Time",font:{family:"sans-serif"}},ticks:{callback:c=>ylt(c),font:{family:"sans-serif"}}},y:{title:{display:!0,text:o,font:{family:"sans-serif"}},ticks:{font:{family:"sans-serif"}}}}};return re.jsx("div",{style:{position:"relative",height:"300px",width:"100%"},children:re.jsx(ezn,{options:a,data:s})})},Rzn=({spiceString:n,onClose:e,plotData:t,nodes:i,isLoading:r,error:o,simOptions:s,onSimOptionsChange:a,hasRun:c})=>{const[l,u]=ce.useState(String(s.startTime)),[d,h]=ce.useState(String(s.duration));ce.useEffect(()=>{u(String(s.startTime)),h(String(s.duration))},[s.startTime,s.duration]);const p=()=>{a({...s,startTime:Number(l),duration:Number(d)})},m=i.filter(_=>{const y=_.toLowerCase().startsWith("v("),x=_.toLowerCase().startsWith("i(");return!!(s.showVoltage&&y||s.showCurrent&&x)});return re.jsx("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:1002,fontFamily:"sans-serif"},children:re.jsxs("div",{style:{backgroundColor:"white",padding:"24px",borderRadius:"12px",width:"90%",maxWidth:"900px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)"},children:[re.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",borderBottom:"1px solid #eee",paddingBottom:"16px"},children:[re.jsx("h2",{style:{margin:0,fontSize:"22px",fontWeight:600,color:"#333"},children:"SPICE Simulation"}),re.jsx("button",{onClick:e,style:{background:"none",border:"none",fontSize:"28px",cursor:"pointer",color:"#888",padding:0,lineHeight:1},children:"×"})]}),re.jsx("div",{children:re.jsx(Pzn,{plotData:t,nodes:m,isLoading:r,error:o,hasRun:c})}),re.jsxs("div",{style:{marginTop:"16px",padding:"12px",backgroundColor:"#f7f7f7",borderRadius:"6px",display:"flex",flexWrap:"wrap",gap:"24px",alignItems:"center",fontSize:"14px"},children:[re.jsxs("div",{style:{display:"flex",gap:"16px"},children:[re.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[re.jsx("input",{type:"checkbox",checked:s.showVoltage,onChange:_=>a({...s,showVoltage:_.target.checked})}),"Voltage"]}),re.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[re.jsx("input",{type:"checkbox",checked:s.showCurrent,onChange:_=>a({...s,showCurrent:_.target.checked})}),"Current"]})]}),re.jsxs("div",{style:{display:"flex",gap:"16px",alignItems:"center"},children:[re.jsx("label",{htmlFor:"startTime",children:"Start Time (ms):"}),re.jsx("input",{id:"startTime",type:"number",value:l,onChange:_=>u(_.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),re.jsx("label",{htmlFor:"duration",children:"Duration (ms):"}),re.jsx("input",{id:"duration",type:"number",value:d,onChange:_=>h(_.target.value),style:{width:"80px",padding:"4px 8px",borderRadius:"4px",border:"1px solid #ccc"}}),re.jsx("button",{onClick:p,style:{padding:"4px 12px",borderRadius:"4px",border:"1px solid #ccc",backgroundColor:"#f0f0f0",cursor:"pointer"},children:c?"Rerun":"Run"})]})]}),re.jsxs("div",{style:{marginTop:"24px"},children:[re.jsx("h3",{style:{marginTop:0,marginBottom:"12px",fontSize:"18px",fontWeight:600,color:"#333"},children:"SPICE Netlist"}),re.jsx("pre",{style:{backgroundColor:"#fafafa",padding:"16px",borderRadius:"6px",maxHeight:"150px",overflowY:"auto",border:"1px solid #eee",color:"#333",fontSize:"13px",fontFamily:"monospace"},children:n})]})]})})},Izn="dmFyIGU9bnVsbCxzPWFzeW5jKCk9Pihhd2FpdCBpbXBvcnQoImh0dHBzOi8vY2RuLmpzZGVsaXZyLm5ldC9ucG0vZWVjaXJjdWl0LWVuZ2luZUAxLjUuMi8rZXNtIikpLlNpbXVsYXRpb24sYz1hc3luYygpPT57aWYoZSYmZS5pc0luaXRpYWxpemVkKCkpcmV0dXJuO2xldCBpPWF3YWl0IHMoKTtlPW5ldyBpLGF3YWl0IGUuc3RhcnQoKX07c2VsZi5vbm1lc3NhZ2U9YXN5bmMgaT0+e3RyeXtpZihhd2FpdCBjKCksIWUpdGhyb3cgbmV3IEVycm9yKCJTaW11bGF0aW9uIG5vdCBpbml0aWFsaXplZCIpO2xldCB0PWkuZGF0YS5zcGljZVN0cmluZyxhPXQubWF0Y2goL3dyZGF0YVxzKyhcUyspXHMrKC4qKS9pKTtpZihhKXtsZXQgbz1gLnByb2JlICR7YVsyXS50cmltKCkuc3BsaXQoL1xzKy8pLmpvaW4oIiAiKX1gO3Q9dC5yZXBsYWNlKC93cmRhdGEuKi9pLG8pfWVsc2UgaWYoIXQubWF0Y2goL1wucHJvYmUvaSkpdGhyb3cgdC5tYXRjaCgvcGxvdFxzKyguKikvaSk/bmV3IEVycm9yKCJUaGUgJ3Bsb3QnIGNvbW1hbmQgaXMgbm90IHN1cHBvcnRlZCBmb3IgZGF0YSBleHRyYWN0aW9uLiBQbGVhc2UgdXNlICd3cmRhdGEgPGZpbGVuYW1lPiA8dmFyMT4gLi4uJyBvciAnLnByb2JlIDx2YXIxPiAuLi4nIGluc3RlYWQuIik6bmV3IEVycm9yKCJObyAnLnByb2JlJyBvciAnd3JkYXRhJyBjb21tYW5kIGZvdW5kIGluIFNQSUNFIGZpbGUuIFVzZSAnd3JkYXRhIDxmaWxlbmFtZT4gPHZhcjE+IC4uLicgdG8gc3BlY2lmeSBvdXRwdXQuIik7ZS5zZXROZXRMaXN0KHQpO2xldCBuPWF3YWl0IGUucnVuU2ltKCk7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToicmVzdWx0IixyZXN1bHQ6bn0pfWNhdGNoKHQpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIixlcnJvcjp0Lm1lc3NhZ2V9KX19Owo=",kY=null,Nzn=()=>{if(typeof window>"u")return null;if(kY)return kY;try{const n=new Blob([atob(Izn)],{type:"application/javascript"});return kY=URL.createObjectURL(n),kY}catch(n){return console.error("Failed to create blob URL for worker",n),null}},kzn=n=>{const e={};if(n.dataType==="real")n.data.forEach(a=>{e[a.name]=a.values});else if(n.dataType==="complex")n.data.forEach(a=>{e[a.name]=a.values.map(c=>c.real)});else throw new Error("Unsupported data type in simulation result");const t=Object.keys(e).find(a=>a.toLowerCase()==="time"||a.toLowerCase()==="frequency");if(!t)throw new Error("No time or frequency data in simulation result");const i=e[t],r=Object.keys(e).filter(a=>a!==t),o=r;return{plotData:i.map((a,c)=>{const l={name:a.toExponential(2)};return r.forEach(u=>{l[u]=e[u][c]}),l}),nodes:o}},Ozn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState([]),[o,s]=ce.useState(!0),[a,c]=ce.useState(null);return ce.useEffect(()=>{if(!n){s(!1),t([]),r([]),c(null);return}s(!0),c(null),t([]),r([]);const l=Nzn();if(!l){c("Could not create SPICE simulation worker."),s(!1);return}const u=new Worker(l,{type:"module"});return u.onmessage=d=>{if(d.data.type==="result")try{const{plotData:h,nodes:p}=kzn(d.data.result);t(h),r(p)}catch(h){c(h.message||"Failed to parse simulation result"),console.error(h)}else d.data.type==="error"&&c(d.data.error);s(!1)},u.onerror=d=>{c(d.message),s(!1)},u.postMessage({spiceString:n}),()=>{u.terminate()}},[n]),{plotData:e,nodes:i,isLoading:o,error:a}},dbe=n=>{if(n===0)return"0";const e=Math.abs(n),t=i=>i.toPrecision(4);return e>=1?t(n):e>=.001?`${t(n*1e3)}m`:e>=1e-6?`${t(n*1e6)}u`:e>=1e-9?`${t(n*1e9)}n`:e>=1e-12?`${t(n*1e12)}p`:e>=1e-15?`${t(n*1e15)}f`:n.toExponential(3)},Lzn=(n,e)=>{const i=czn(n).toSpiceString(),o=i.split(`
5519
5519
  `).filter(C=>C.trim()!=="").filter(C=>!C.startsWith("*")&&!C.startsWith(".")&&C.trim()!==""),s=new Set,a=new Set,c=new Set;for(const C of o){const U=C.trim().split(/\s+/);if(U.length<3)continue;const O=U[0],H=O[0].toUpperCase();let Y=[];if(["R","C","L","V","I","D"].includes(H))Y=U.slice(1,3),H==="V"&&c.add(O);else if(H==="Q"&&U.length>=4)Y=U.slice(1,4);else if(H==="M"&&U.length>=5)Y=U.slice(1,5);else if(H==="X")Y=U.slice(1,-1);else continue;Y.forEach(X=>s.add(X)),H==="C"&&Y.forEach(X=>a.add(X))}s.delete("0"),a.delete("0");const l=Array.from(a).map(C=>`.ic V(${C})=0`),u=[],d=Array.from(s).map(C=>`V(${C})`);u.push(...d);const h=Array.from(c).map(C=>`I(${C})`);u.push(...h);const p=u.length>0?`.probe ${u.join(" ")}`:"",m=e?.startTime??0,_=e?.duration??20,y=m*.001,x=_*.001,b=y+x,w=x/50,S=`.tran ${dbe(w)} ${dbe(b)} ${dbe(y)} UIC`,k=".end",A=i.split(`
5520
5520
  `);let R=-1;for(let C=A.length-1;C>=0;C--)if(A[C].trim().toLowerCase().startsWith(k)){R=C;break}const M=[...l,p,S].filter(Boolean);let N;if(R!==-1){const C=A.slice(0,R),U=A.slice(R);N=[...C,...M,...U]}else N=[...A,...M,k];return N.join(`
5521
5521
  `)},Dzn=(n,e)=>{if(typeof window>"u")return e;try{const t=localStorage.getItem(n);return t!==null?JSON.parse(t):e}catch{return e}},zzn=(n,e)=>{if(!(typeof window>"u"))try{localStorage.setItem(n,JSON.stringify(e))}catch{}},hbe=ce.createContext(null),$zn=5,Fzn=(n,e)=>!n&&!e?!0:!n||!e?!1:n.minX===e.minX&&n.maxX===e.maxX&&n.minY===e.minY&&n.maxY===e.maxY,Uzn=({children:n})=>{if(ce.useContext(hbe))return re.jsx(re.Fragment,{children:n});const t=ce.useRef({pointer:null,boundingBoxes:new Map,hoveringIds:new Set,subscribers:new Set,mouseDownPosition:null}),i=ce.useCallback(()=>{for(const d of t.current.subscribers)d()},[]),r=ce.useCallback(()=>{const d=t.current.pointer,h=new Set;if(d)for(const[m,_]of t.current.boundingBoxes){const y=_.bounds;y&&d.x>=y.minX&&d.x<=y.maxX&&d.y>=y.minY&&d.y<=y.maxY&&h.add(m)}const p=t.current.hoveringIds;h.size===p.size&&[...h].every(m=>p.has(m))||(t.current.hoveringIds=h,i())},[i]),o=ce.useCallback((d,h)=>{t.current.boundingBoxes.set(d,h),r()},[r]),s=ce.useCallback((d,h)=>{const p=t.current.boundingBoxes.get(d);p&&Fzn(p.bounds,h.bounds)&&p.onClick===h.onClick||(t.current.boundingBoxes.set(d,h),r())},[r]),a=ce.useCallback(d=>{t.current.boundingBoxes.delete(d)&&r()},[r]),c=ce.useCallback(d=>(t.current.subscribers.add(d),()=>{t.current.subscribers.delete(d)}),[]),l=ce.useCallback(d=>t.current.hoveringIds.has(d),[]);ce.useEffect(()=>{const d=_=>{const{clientX:y,clientY:x}=_,b=t.current.pointer;b&&b.x===y&&b.y===x||(t.current.pointer={x:y,y:x},r())},h=()=>{t.current.pointer!==null&&(t.current.pointer=null,t.current.mouseDownPosition=null,r())},p=_=>{t.current.mouseDownPosition={x:_.clientX,y:_.clientY}},m=_=>{const{clientX:y,clientY:x}=_,b=t.current.mouseDownPosition;if(b&&Math.sqrt(Math.pow(y-b.x,2)+Math.pow(x-b.y,2))>$zn){t.current.mouseDownPosition=null;return}t.current.mouseDownPosition=null;for(const w of t.current.boundingBoxes.values()){const S=w.bounds;S&&y>=S.minX&&y<=S.maxX&&x>=S.minY&&x<=S.maxY&&w.onClick?.(_)}};return window.addEventListener("pointermove",d,{passive:!0}),window.addEventListener("pointerdown",d,{passive:!0}),window.addEventListener("pointerup",d,{passive:!0}),window.addEventListener("pointerleave",h),window.addEventListener("pointercancel",h),window.addEventListener("blur",h),window.addEventListener("mousedown",p,{passive:!0}),window.addEventListener("click",m,{passive:!0}),()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerdown",d),window.removeEventListener("pointerup",d),window.removeEventListener("pointerleave",h),window.removeEventListener("pointercancel",h),window.removeEventListener("blur",h),window.removeEventListener("mousedown",p),window.removeEventListener("click",m)}},[r]);const u=ce.useMemo(()=>({registerBoundingBox:o,updateBoundingBox:s,unregisterBoundingBox:a,subscribe:c,isHovering:l}),[o,s,a,c,l]);return re.jsx(hbe.Provider,{value:u,children:n})},Bzn=n=>{const e=ce.useContext(hbe);if(!e)throw new Error("useMouseEventsOverBoundingBox must be used within a MouseTracker");const t=ce.useId(),i=ce.useRef(n);i.current=n;const r=ce.useMemo(()=>s=>{i.current.onClick?.(s)},[]);return ce.useEffect(()=>(e.registerBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?r:void 0}),()=>{e.unregisterBoundingBox(t)}),[e,r,t]),ce.useEffect(()=>{e.updateBoundingBox(t,{bounds:i.current.bounds,onClick:i.current.onClick?r:void 0})},[e,r,t,n.bounds?.minX,n.bounds?.maxX,n.bounds?.minY,n.bounds?.maxY,n.onClick]),{hovering:ce.useSyncExternalStore(e.subscribe,()=>e.isHovering(t),()=>!1)}},jzn=(n,e)=>!n&&!e?!0:!n||!e?!1:Math.abs(n.bounds.minX-e.bounds.minX)<.5&&Math.abs(n.bounds.maxX-e.bounds.maxX)<.5&&Math.abs(n.bounds.minY-e.bounds.minY)<.5&&Math.abs(n.bounds.maxY-e.bounds.maxY)<.5&&Math.abs(n.rect.left-e.rect.left)<.5&&Math.abs(n.rect.top-e.rect.top)<.5&&Math.abs(n.rect.width-e.rect.width)<.5&&Math.abs(n.rect.height-e.rect.height)<.5,Hzn=({componentId:n,svgDivRef:e,containerRef:t,onComponentClick:i,onHoverChange:r,showOutline:o,circuitJsonKey:s})=>{const[a,c]=ce.useState(null),l=ce.useRef(null),u=ce.useCallback(()=>{l.current=null;const y=e.current,x=t.current;if(!y||!x){c(A=>A&&null);return}const b=y.querySelector(`[data-schematic-component-id="${n}"]`);if(!b){c(A=>A&&null);return}const w=b.getBoundingClientRect(),S=x.getBoundingClientRect(),k={bounds:{minX:w.left,maxX:w.right,minY:w.top,maxY:w.bottom},rect:{left:w.left-S.left,top:w.top-S.top,width:w.width,height:w.height}};c(A=>jzn(A,k)?A:k)},[n,t,e]),d=ce.useCallback(()=>{l.current===null&&(l.current=window.requestAnimationFrame(u))},[u]);ce.useEffect(()=>{d()},[d,s]),ce.useEffect(()=>{d();const y=e.current,x=t.current;if(!y||!x)return;const b=typeof ResizeObserver<"u"?new ResizeObserver(()=>{d()}):null;b?.observe(x),b?.observe(y);const w=typeof MutationObserver<"u"?new MutationObserver(()=>{d()}):null;return w?.observe(y,{attributes:!0,attributeFilter:["style","transform"],subtree:!0,childList:!0}),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{b?.disconnect(),w?.disconnect(),window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d),l.current!==null&&(cancelAnimationFrame(l.current),l.current=null)}},[d,e,t]);const h=ce.useCallback(y=>{i&&i(n,y)},[n,i]),p=a?.bounds??null,{hovering:m}=Bzn({bounds:p,onClick:i?h:void 0});if(ce.useEffect(()=>{r&&r(n,m)},[m,n,r]),!a||!m||!o)return null;const _=a.rect;return re.jsx("div",{style:{position:"absolute",left:_.left,top:_.top,width:_.width,height:_.height,border:"1.5px solid rgba(51, 153, 255, 0.9)",pointerEvents:"none",zIndex:mC.schematicComponentHoverOutline}})},Vzn=({circuitJson:n,containerStyle:e,editEvents:t=[],onEditEvent:i,defaultEditMode:r=!1,debugGrid:o=!1,editingEnabled:s=!1,debug:a=!1,clickToInteractEnabled:c=!1,colorOverrides:l,spiceSimulationEnabled:u=!1,disableGroups:d=!1,onSchematicComponentClicked:h})=>{a&&yzn();const[p,m]=ce.useState(!1),[_,y]=ce.useState({showVoltage:!0,showCurrent:!1,startTime:0,duration:20}),x=yt=>`${yt?.length||0}_${yt?.editCount||0}`,b=ce.useMemo(()=>x(n),[n]),w=ce.useMemo(()=>{if(!u)return null;try{return Lzn(n,_)}catch(yt){return console.error("Failed to generate SPICE string",yt),null}},[b,u,_.startTime,_.duration]),[S,k]=ce.useState(!1);ce.useEffect(()=>{k(!1)},[b]);const{plotData:A,nodes:R,isLoading:M,error:N}=Ozn(S?w:null),[C,U]=ce.useState(r),[O,H]=ce.useState(!0),[Y,X]=ce.useState(!c),[K,J]=ce.useState(!1),[le,he]=ce.useState(()=>d?!1:Dzn("schematic_viewer_show_groups",!1)),[ve,oe]=ce.useState(!1),ae=ce.useRef(new Set),de=ce.useCallback((yt,At)=>{At?ae.current.add(yt):ae.current.delete(yt),oe(ae.current.size>0)},[]),Te=ce.useRef(null),Ce=ce.useRef(null),Oe=ce.useMemo(()=>{try{return cg(n).schematic_component?.list()?.map(yt=>yt.schematic_component_id)??[]}catch(yt){return console.error("Failed to derive schematic component ids",yt),[]}},[b,n]),$e=yt=>{const At=yt.touches[0];Ce.current={x:At.clientX,y:At.clientY}},Ae=yt=>{const At=yt.changedTouches[0],vt=Ce.current;if(!vt)return;const Bt=Math.abs(At.clientX-vt.x),Kt=Math.abs(At.clientY-vt.y);Bt<10&&Kt<10&&(yt.preventDefault(),X(!0)),Ce.current=null},[se,Se]=ce.useState([]),xe=ce.useRef(n);ce.useEffect(()=>{const yt=x(n),At=x(xe.current);yt!==At&&(Se([]),xe.current=n)},[n]);const{ref:Ve,cancelDrag:tt,transform:ct}=N1e({onSetTransform(yt){Te.current&&(Te.current.style.transform=ow(yt))},enabled:Y&&!p}),{containerWidth:Me,containerHeight:Qe}=xzn(Ve),Xe=ce.useMemo(()=>!Me||!Qe?"":P1e(n,{width:Me,height:Qe||720,grid:o?{cellSize:1,labelCells:!0}:void 0,colorOverrides:l}),[b,Me,Qe]),Ge=ce.useMemo(()=>Xe.match(/<svg[^>]*style="[^"]*background-color:\s*([^;\"]+)/i)?.[1]??"transparent",[Xe]),et=ce.useMemo(()=>{if(!Xe)return Hh();const yt=Xe.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return o$(yt)}catch(At){return console.error(At),Hh()}},[Xe]),De=yt=>{Se(At=>[...At,yt]),i&&i(yt)},ke=ce.useMemo(()=>[...t,...se],[t,se]),{handleMouseDown:qe,handleTouchStart:Le,isDragging:We,activeEditEvent:nt}=vzn({onEditEvent:De,cancelDrag:tt,realToSvgProjection:et,svgToScreenProjection:ct,circuitJson:n,editEvents:ke,enabled:C&&Y&&!p,snapToGrid:O});hzn({svgDivRef:Te,editEvents:ke,realToSvgProjection:et,svgToScreenProjection:ct,activeEditEvent:nt}),pzn({svgDivRef:Te,circuitJson:n,activeEditEvent:nt,editEvents:ke}),fzn({svgDivRef:Te,circuitJson:n,circuitJsonKey:b,showGroups:le&&!d});const mt=ce.useRef(Le);ce.useEffect(()=>{mt.current=Le},[Le]);const bt=ce.useMemo(()=>re.jsx("div",{ref:Te,style:{pointerEvents:c?Y?"auto":"none":"auto",transformOrigin:"0 0"},className:h?"schematic-component-clickable":void 0,onTouchStart:yt=>{C&&Y&&!p&&mt.current(yt)},dangerouslySetInnerHTML:{__html:Xe}}),[Xe,Y,c,C,p]);return re.jsxs(Uzn,{children:[h&&re.jsx("style",{children:".schematic-component-clickable [data-schematic-component-id]:hover { cursor: pointer !important; }"}),re.jsxs("div",{ref:Ve,style:{position:"relative",backgroundColor:Ge,overflow:"hidden",cursor:p?"auto":We?"grabbing":c&&!Y||ve&&h?"pointer":"grab",minHeight:"300px",...e},onWheelCapture:yt=>{p&&yt.stopPropagation()},onMouseDown:yt=>{if(c&&!Y){yt.preventDefault(),yt.stopPropagation();return}qe(yt)},onMouseDownCapture:yt=>{if(c&&!Y){yt.preventDefault(),yt.stopPropagation();return}},onTouchStart:yt=>{p||$e(yt)},onTouchEnd:yt=>{p||Ae(yt)},children:[!Y&&c&&re.jsx("div",{onClick:yt=>{yt.preventDefault(),yt.stopPropagation(),X(!0)},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:mC.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"all",touchAction:"pan-x pan-y pinch-zoom"},children:re.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",fontFamily:"sans-serif",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})}),re.jsx(Ezn,{active:K,onClick:()=>J(!K)}),s&&re.jsx(wzn,{active:C,onClick:()=>U(!C)}),s&&C&&re.jsx(Szn,{active:O,onClick:()=>H(!O)}),re.jsx(Mzn,{circuitJson:n,circuitJsonKey:b,isVisible:K,onClose:()=>J(!1),showGroups:le,onToggleGroups:yt=>{d||(he(yt),zzn("schematic_viewer_show_groups",yt))}}),u&&re.jsx(Azn,{onClick:()=>m(!0)}),p&&re.jsx(Rzn,{spiceString:w,onClose:()=>m(!1),plotData:A,nodes:R,isLoading:M,error:N,simOptions:_,onSimOptionsChange:yt=>{k(!0),y(yt)},hasRun:S}),h&&Oe.map(yt=>re.jsx(Hzn,{componentId:yt,svgDivRef:Te,containerRef:Ve,showOutline:!0,circuitJsonKey:b,onHoverChange:de,onComponentClick:(At,vt)=>{h?.({schematicComponentId:At,event:vt})}},yt)),bt]})]})},glt=n=>{const[e,t]=ce.useState(0),[i,r]=ce.useState(0);return ce.useEffect(()=>{if(!n.current)return;const o=()=>{const a=n.current?.getBoundingClientRect();t(a?.width||0),r(a?.height||0)};o();const s=new ResizeObserver(o);return s.observe(n.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),{containerWidth:e,containerHeight:i}};jh("assembly-viewer");var xlt=()=>{jh.enable("assembly-viewer*")},Gzn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:i=!1})=>{i&&xlt();const r=ce.useRef(null),{ref:o}=N1e({onSetTransform(u){r.current&&(r.current.style.transform=ow(u))}}),{containerWidth:s,containerHeight:a}=glt(o),c=ce.useMemo(()=>!s||!a?"":Xst(n,{width:s,height:a||720}),[n,s,a]);ce.useMemo(()=>{if(!c)return Hh();const u=c.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return o$(u)}catch(d){return console.error(d),Hh()}},[c]);const l=ce.useMemo(()=>re.jsx("div",{ref:r,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:c}}),[c]);return re.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...e},children:l})},Yzn=({circuitJson:n,containerStyle:e,debugGrid:t=!1,debug:i=!1})=>{i&&xlt();const r=ce.useRef(null),{ref:o}=N1e({onSetTransform(u){r.current&&(r.current.style.transform=ow(u))}}),{containerWidth:s,containerHeight:a}=glt(o),c=ce.useMemo(()=>!s||!a?"":C1e(n,{width:s,height:a||720}),[n,s,a]);ce.useMemo(()=>{if(!c)return Hh();const u=c.match(/data-real-to-screen-transform="([^"]+)"/)?.[1];try{return o$(u)}catch(d){return console.error(d),Hh()}},[c]);const l=ce.useMemo(()=>re.jsx("div",{ref:r,style:{pointerEvents:"auto",transformOrigin:"0 0"},dangerouslySetInnerHTML:{__html:c}}),[c]);return re.jsx("div",{ref:o,style:{position:"relative",backgroundColor:"#FFFFFF",overflow:"hidden",minHeight:"300px",...e},children:l})};const blt=["Initialize a tscircuit project using [tsci init](https://github.com/tscircuit/cli) before adding components.","Define reusable modules with cached routes using [<subcircuit />](https://docs.tscircuit.com/elements/subcircuit)","Run `tsci dev` on the command line to preview your boards before export",'Use units like mm or mils consistently across your designs (e.g. pcbX="10mm")',"Quickly set footprints with the [footprint prop](https://docs.tscircuit.com/footprints/footprinter-strings)","Check out the guide on [ordering prototypes](https://docs.tscircuit.com/building-electronics/ordering-prototypes)","Use [net labels](https://docs.tscircuit.com/elements/net) and [group elements](https://docs.tscircuit.com/elements/group) to organize complex schematics.","You can manually drag components on the PCB and Schematic using [manual edits](https://docs.tscircuit.com/guides/manual-edits)","Every tscircuit module can export to [Circuit JSON](https://github.com/tscircuit/circuit-json), Gerbers, Pick'n'Place CSV files, Bill of Materials CSV and more","You can import components from [JLCPCB](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-jlcpcb) or [KiCad](https://docs.tscircuit.com/guides/importing-modules-and-chips/importing-from-kicad)","Any module you push to the [registry](https://tscircuit.com/trending) will have [simple image urls](https://docs.tscircuit.com/web-apis/image-generation-api) you can use display images on a website","The default [Parts Engine](https://docs.tscircuit.com/guides/platform-configuration) will automatically find parts from common vendors for your BOM",'[Pin selectors](https://docs.tscircuit.com/guides/using-sel-references) are similar to CSS selectors, ".R1 > .pin1" means "connect to the first pin of the component R1"',"You can use the [sel](https://docs.tscircuit.com/guides/using-sel-references) object to select pins in a type-safe way","Publish modules via the [registry](https://tscircuit.com/trending) for working with a team or sharing your work","[Explore tutorials](https://docs.tscircuit.com/category/tutorials) for real-world circuit design examples.","Upload your Circuit JSON to [circuitjson.com](https://circuitjson.com) for a quick preview.","You can display Circuit JSON in 3D, PCB or Schematic mode with the [<CircuitJsonPreview />](https://docs.tscircuit.com/guides/running-tscircuit/displaying-circuit-json-on-a-webpage#react-display-all-available-previews-with-circuitjsonpreview-) React component","Use a [<group />](https://docs.tscircuit.com/elements/group) element to move multiple components at once in a schematic or PCB layout.","Check out the [GitHub Discussions page](https://github.com/tscircuit/tscircuit/discussions) to upvote features","You can customize the autorouter using the [autorouter prop](https://docs.tscircuit.com/elements/board#setting-the-autorouter)","Use the [<constraint />](https://docs.tscircuit.com/footprints/constraint) element to enforce geometric relationships in PCB designs.","Join the [Discord server](https://tscircuit.com/join) to discuss issues and get help directly from the community."],qzn=(()=>{let n=blt[Math.floor(Math.random()*blt.length)];return n=n.replace(/</g,"&lt;"),n=n.replace(/>/g,"&gt;"),n=n.replace(new RegExp('(?<!href=")(?<!\\()(?<!\\]\\()(https?:\\/\\/[^\\s\\)\\]]+)',"g"),(e,t)=>`<a class="rf-text-blue-500 rf-underline" href="${e}" target="_blank">${e}</a>`),n=n.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,'<a class="rf-text-blue-500 rf-underline" href="$2" target="_blank">$1</a>'),n})(),_C=({onRunClicked:n})=>re.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-justify-center rf-h-full rf-bg-gray-50 rf-text-gray-500 rf-p-4",children:[re.jsx(_9n,{className:"rf-size-14 rf-mb-4"}),re.jsxs("p",{className:"rf-text-md rf-break-words rf-max-w-xl rf-text-center",children:["Tip: ",re.jsx("span",{dangerouslySetInnerHTML:{__html:qzn}})]}),n&&re.jsxs(R0,{className:"rf-mt-4 rf-bg-blue-600 rf-hover:bg-blue-500",onClick:n,children:["Run Code",re.jsx($rt,{className:"rf-w-3 rf-h-3 rf-ml-2"})]})]}),OY=({text:n,onClick:e})=>re.jsx("span",{className:"rf-cursor-pointer rf-underline rf-text-blue-600 rf-mx-2",onClick:e,children:n}),LY=n=>re.jsxs("div",{className:"rf-leading-5",children:[re.jsx("div",{className:"rf-py-2 rf-font-bold",children:n.column.name}),re.jsx("div",{children:n.field?.()??re.jsx("input",{type:"text",className:"rf-border rf-rounded rf-p-1 rf-w-full",onChange:e=>{n.onTextChange?.(e.target.value)}})})]}),Xzn=({open:n,children:e,title:t,onClose:i})=>n?re.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-justify-center rf-items-center rf-z-50",onClick:i,children:re.jsxs("div",{className:"rf-bg-white rf-p-5 rf-rounded-lg rf-relative rf-w-11/12 rf-max-w-2xl",onClick:r=>{r.preventDefault(),r.stopPropagation()},children:[re.jsx("h2",{className:"rf-mt-0 rf-text-md rf-pb-4",children:t}),re.jsx("button",{type:"button",className:"rf-absolute rf-top-2 rf-right-4 rf-text-2xl rf-font-bold",onClick:i,children:"×"}),e]})}):null,Wzn=({elements:n})=>{const[e,t]=ce.useState({open:!1}),[i,r]=ce.useReducer((u,d)=>({...u,...d}),{}),o=[...new Set(n.map(u=>u.type))],s=n.map(u=>{const d=u[`${u.type}_id`],h=Object.fromEntries(Object.entries(u).filter(([m])=>!(m===`${u.type}_id`||!m.endsWith("_id")))),p=Object.fromEntries(Object.entries(u).filter(([m])=>!m.endsWith("_id")));return{primary_id:d,other_ids:h,...p,_og_elm:u}}),a=s.map(u=>{let d="";const h=p=>{const m=Object.keys(p.other_ids).find(x=>x.startsWith("source_"));if(!m)return`.${p.name}`;const _=m.slice(0,-3),y=s.find(x=>x.type===_&&x.primary_id===p.other_ids[m]);return y?"name"in y?`${h(y)} > .${p.name}`:`#${y.primary_id} > .${p.name}`:`??? > .${p.name}`};return"name"in u&&(d=h(u)),{...u,selector_path:d}}),c=[{key:"primary_id",name:"primary_id",renderCell:u=>re.jsxs("div",{className:"rf-flex rf-items-center",children:[re.jsx(OY,{text:u.primary_id,onClick:()=>r({focused_id:u.primary_id,id_search:void 0,selector_search:void 0})}),re.jsx("span",{className:"rf-flex-grow"}),re.jsx(OY,{text:"(JSON)",onClick:()=>t({open:!0,element:u._og_elm,title:u.primary_id})})]}),renderHeaderCell:u=>re.jsx(LY,{column:u,onTextChange:d=>r({id_search:d}),field:i.focused_id?()=>re.jsxs("div",{children:["Focus:"," ",re.jsx("span",{className:"rf-underline",children:i.focused_id}),re.jsx(OY,{text:"(unfocus)",onClick:()=>r({focused_id:void 0})})]}):void 0})},{key:"type",name:"type",renderHeaderCell:u=>re.jsx(LY,{column:u,field:()=>re.jsxs("select",{onChange:d=>r({component_type_filter:d.target.value}),className:"rf-border rf-rounded rf-p-1 rf-w-full",children:[re.jsx("option",{value:"any",children:"any"},"any"),re.jsx("option",{value:"source",children:"source"},"source"),re.jsx("option",{value:"source/pcb",children:"source/pcb"},"source/pcb"),re.jsx("option",{value:"source/schematic",children:"source/schematic"},"source/schematic"),o.map(d=>re.jsx("option",{value:d,children:d},d))]})})},{key:"name",name:"name",renderHeaderCell:u=>re.jsx(LY,{column:u,onTextChange:d=>r({name_search:d})})},{key:"selector_path",name:"selector_path",renderHeaderCell:u=>re.jsx(LY,{column:u,onTextChange:d=>r({selector_search:d})})},{key:"other_ids",name:"other_ids",renderCell:u=>re.jsx("div",{className:"rf-space-x-2",children:Object.entries(u.other_ids).map(([d,h])=>re.jsx(OY,{text:h,onClick:()=>r({focused_id:h})},h))})}],l=a.filter(u=>i.name_search?u.name?.toLowerCase()?.includes(i.name_search.toLowerCase()):!0).filter(u=>!i.component_type_filter||i.component_type_filter==="any"?!0:i.component_type_filter==="source"?u.type.startsWith("source_"):i.component_type_filter==="source/pcb"?u.type.startsWith("source_")||u.type.startsWith("pcb_"):i.component_type_filter==="source/schematic"?u.type.startsWith("source_")||u.type.startsWith("schematic_"):u.type?.includes(i.component_type_filter)).filter(u=>i.selector_search?i.selector_search.split(" ").filter(h=>h.length>0).every(h=>u.selector_path?.includes(h)):!0).filter(u=>i.id_search?u.primary_id?.includes(i.id_search):!0).filter(u=>!!(!i.focused_id||u.primary_id===i.focused_id||Object.values(u.other_ids).includes(i.focused_id)));return re.jsxs("div",{className:"rf-font-mono rf-text-xs rf-bg-white",children:[re.jsx("div",{className:"rf-overflow-x-auto",children:re.jsxs("table",{className:"rf-table-auto rf-w-full rf-text-left",children:[re.jsx("thead",{children:re.jsx("tr",{children:c.map(u=>re.jsx("th",{className:"rf-px-4 rf-py-2 rf-border-b",children:u.renderHeaderCell?u.renderHeaderCell(u):u.name},u.key))})}),re.jsx("tbody",{children:l.map((u,d)=>re.jsx("tr",{className:"rf-hover:bg-gray-100",children:c.map(h=>re.jsx("td",{className:"rf-px-4 rf-py-2 rf-border-b",children:h.renderCell?h.renderCell(u):u[h.key]},h.key))},d))})]})}),re.jsx(Xzn,{open:e.open,onClose:()=>t({open:!1}),title:e.open?e.title:"",children:re.jsx("div",{className:"rf-bg-gray-800 rf-p-3 rf-text-white rf-rounded",children:re.jsx("pre",{className:"rf-whitespace-pre-wrap",children:e.open?JSON.stringify(e.element,null,2):""})})})]})},Kzn=(n,e)=>n==="jlcpcb"?re.jsx("a",{className:"rf-underline rf-text-blue-500",target:"_blank",rel:"noreferrer",href:`https://jlcpcb.com/partdetail/${e}`,children:e}):e,Zzn=({circuitJson:n})=>{const e=n.filter(i=>i.type==="source_component"),t=new Set;for(const i of e)if(i.supplier_part_numbers)for(const r of Object.keys(i.supplier_part_numbers))t.add(r);return re.jsx("div",{className:"rf-overflow-x-auto",children:re.jsxs("table",{className:"rf-w-full rf-text-left rf-text-sm",children:[re.jsx("thead",{children:re.jsxs("tr",{className:"rf-border-b",children:[re.jsx("th",{className:"rf-p-2",children:"Name"}),Array.from(t).map(i=>re.jsx("th",{className:"rf-p-2 rf-capitalize",children:i},i))]})}),re.jsx("tbody",{children:e.map(i=>re.jsxs("tr",{className:"rf-border-b",children:[re.jsx("td",{className:"rf-p-2",children:i.name}),Array.from(t).map(r=>re.jsx("td",{className:"rf-p-2",children:Kzn(r,i.supplier_part_numbers?.[r]?.[0]||"")},r))]},i.source_component_id))})]})})},pbe=ce.forwardRef(({className:n,type:e,...t},i)=>re.jsx("input",{type:e,className:co("rf-flex rf-h-9 rf-w-full rf-rounded-md rf-border rf-border-zinc-200 rf-bg-white rf-px-3 rf-py-1 rf-text-sm rf-shadow-sm rf-transition-colors file:rf-border-0 file:rf-bg-transparent file:rf-text-sm file:rf-font-medium placeholder:rf-text-zinc-500 focus-visible:rf-outline-none focus-visible:rf-ring-1 focus-visible:rf-ring-zinc-950 disabled:rf-cursor-not-allowed disabled:rf-opacity-50 dark:rf-border-zinc-800 dark:rf-bg-zinc-950 dark:rf-placeholder-zinc-400 dark:focus-visible:rf-ring-zinc-300",n),ref:i,...t}));pbe.displayName="Input";var vlt={Hz:{baseUnit:"Hz",variants:{MHz:1e6,kHz:1e3,Hz:1}},g:{baseUnit:"g",variants:{kg:1e3,g:1}},Ω:{baseUnit:"Ω",variants:{mΩ:.001,Ω:1,kΩ:1e3,KΩ:1e3,kohm:1e3,MΩ:1e6,GΩ:1e9,TΩ:1e12}},V:{baseUnit:"V",variants:{mV:.001,V:1,kV:1e3,KV:1e3,MV:1e6,GV:1e9,TV:1e12}},A:{baseUnit:"A",variants:{µA:1e-6,mA:.001,ma:.001,A:1,kA:1e3,MA:1e6}},F:{baseUnit:"F",variants:{pF:1e-12,nF:1e-9,µF:1e-6,uF:1e-6,mF:.001,F:1}},ml:{baseUnit:"ml",variants:{ml:1,mL:1,l:1e3,L:1e3}},deg:{baseUnit:"deg",variants:{rad:180/Math.PI}},ms:{baseUnit:"ms",variants:{fs:1e-12,ps:1e-9,ns:1e-6,us:.001,µs:.001,ms:1,s:1e3}},mm:{baseUnit:"mm",variants:{nm:1e-6,µm:.001,um:.001,mm:1,cm:10,dm:100,m:1e3,km:1e6,in:25.4,ft:304.8,IN:25.4,FT:304.8,yd:914.4,mi:1609344,mil:.0254}}},fbe=new Set;for(const[n,e]of Object.entries(vlt)){fbe.add(n);for(const t of Object.keys(e.variants))fbe.add(t)}function Qzn(n){for(const[e,t]of Object.entries(vlt))if(n in t.variants)return{baseUnit:t.baseUnit,conversionFactor:t.variants[n]};return{baseUnit:n,conversionFactor:1}}var wlt={tera:1e12,T:1e12,giga:1e9,G:1e9,mega:1e6,M:1e6,kilo:1e3,k:1e3,deci:.1,d:.1,centi:.01,c:.01,milli:.001,m:.001,micro:1e-6,u:1e-6,µ:1e-6,nano:1e-9,n:1e-9,pico:1e-12,p:1e-12};function uE(n){if(n==null)return{parsedUnit:null,unitOfValue:null,value:null};if(typeof n=="string"&&n.match(/^-?[\d\.]+$/))return{value:Number.parseFloat(n),parsedUnit:null,unitOfValue:null};if(typeof n=="number")return{value:n,parsedUnit:null,unitOfValue:null};if(typeof n=="object"&&"x"in n&&"y"in n){const{parsedUnit:a,unitOfValue:c}=uE(n.x),l=uE(n.x),u=uE(n.y);return l.value===null||u.value===null?{parsedUnit:null,unitOfValue:null,value:null}:{parsedUnit:a,unitOfValue:c,value:{x:l.value,y:u.value}}}const t=n.toString().split("").reverse().join("").match(/[^\d\s]+/)?.[0];if(!t)throw new Error(`Could not determine unit: "${n}"`);const i=t.split("").reverse().join(""),r=n.slice(0,-i.length);if(i in wlt&&!fbe.has(i)){const a=wlt[i];return{parsedUnit:null,unitOfValue:null,value:Number.parseFloat(r)*a}}const{baseUnit:o,conversionFactor:s}=Qzn(i);return{parsedUnit:i,unitOfValue:o,value:s*Number.parseFloat(r)}}var DY=I().or(Ie()).transform(n=>uE(n).value),mbe=I().or(Ie()).transform(n=>uE(n).value).transform(n=>Number.parseFloat(n.toPrecision(12))),Slt=I().or(Ie()).transform(n=>uE(n).value),q4=I().or(Ie()).transform(n=>uE(n).value),ss=I().or(Ie()).transform(n=>uE(n).value),zY=I().or(Ie()).transform(n=>uE(n).value),di=ss,Jzn=I().or(Ie()).transform(n=>uE(n).value),L8=I().or(Ie()).transform(n=>uE(n).value),e$n=L8,X4=L8,Elt=I().datetime(),xw=I().or(Ie()).transform(n=>typeof n=="number"?n:n.endsWith("deg")?Number.parseFloat(n.split("deg")[0]):n.endsWith("rad")?Number.parseFloat(n.split("rad")[0])*180/Math.PI:Number.parseFloat(n)),Tlt=Ie().or(I().endsWith("mAh")).transform(n=>{if(typeof n=="string"){const e=n.replace("mAh",""),t=Number.parseFloat(e);if(Number.isNaN(t))throw new Error("Invalid capacity");return t}return n}).describe("Battery capacity in mAh"),bs=Ee({x:di,y:di}),t$n=bs,D8=Ee({x:di,y:di,z:di}),n$n=D8,_be=Ee({width:Ie(),height:Ie()}),i$n=n=>{const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";return Array.from({length:n},()=>e[Math.floor(Math.random()*e.length)]).join("")},Ki=n=>I().optional().default(()=>`${n}_${i$n(10)}`),z8=Xt(["top_left","top_center","top_right","center_left","center","center_right","bottom_left","bottom_center","bottom_right"]),Mlt=Xt(["jlcpcb","macrofab","pcbway","digikey","mouser","lcsc"]),Qg=Ee({type:me("source_component"),ftype:I().optional(),source_component_id:I(),name:I(),manufacturer_part_number:I().optional(),supplier_part_numbers:os(Mlt,ut(I())).optional(),display_value:I().optional(),are_pins_interchangeable:Je().optional(),internally_connected_source_port_ids:ut(ut(I())).optional(),source_group_id:I().optional(),subcircuit_id:I().optional()}),ybe=Qg.extend({ftype:me("simple_capacitor"),capacitance:mbe,max_voltage_rating:q4.optional(),display_capacitance:I().optional(),max_decoupling_trace_length:di.optional()}),gbe=Qg.extend({ftype:me("simple_resistor"),resistance:DY,display_resistance:I().optional()}),$Y=Qg.extend({ftype:me("simple_diode")}),xbe=$Y.extend({ftype:me("simple_led"),color:I().optional(),wavelength:I().optional()}),Clt=Qg.extend({ftype:me("simple_ground")}),bbe=Qg.extend({ftype:me("simple_chip")}),vbe=Qg.extend({ftype:me("simple_power_source"),voltage:q4}),r$n=Qg.extend({ftype:me("simple_fuse"),current_rating_amps:Ie().describe("Nominal current in amps the fuse is rated for"),voltage_rating_volts:Ie().describe("Voltage rating in volts, e.g. ±5V would be 5")}),wbe=Qg.extend({ftype:me("simple_battery"),capacity:Tlt}),Sbe=Qg.extend({ftype:me("simple_inductor"),inductance:Slt,max_current_rating:Ie().optional()}),Ebe=Qg.extend({ftype:me("simple_push_button")}),Tbe=Qg.extend({ftype:me("simple_potentiometer"),max_resistance:DY}),Alt=Qg.extend({ftype:me("simple_crystal"),frequency:Ie().describe("Frequency in Hz"),load_capacitance:Ie().optional().describe("Load capacitance in pF")}),Mbe=Qg.extend({ftype:me("simple_pin_header"),pin_count:Ie(),gender:Xt(["male","female"]).optional().default("male")}),Cbe=Qg.extend({ftype:me("simple_pinout")}),Abe=Qg.extend({ftype:me("simple_resonator"),load_capacitance:mbe,equivalent_series_resistance:DY.optional(),frequency:zY}),Pbe=Qg.extend({ftype:me("simple_transistor"),transistor_type:Xt(["npn","pnp"])}),Rbe=Qg.extend({ftype:me("simple_test_point"),footprint_variant:Xt(["pad","through_hole"]).optional(),pad_shape:Xt(["rect","circle"]).optional(),pad_diameter:Bn([Ie(),I()]).optional(),hole_diameter:Bn([Ie(),I()]).optional(),width:Bn([Ie(),I()]).optional(),height:Bn([Ie(),I()]).optional()}),Ibe=Qg.extend({ftype:me("simple_mosfet"),channel_type:Xt(["n","p"]),mosfet_mode:Xt(["enhancement","depletion"])}),Nbe=Qg.extend({ftype:me("simple_switch")}),kbe=Ee({type:me("source_project_metadata"),name:I().optional(),software_used_string:I().optional(),project_url:I().optional(),created_at:Elt.optional()}),Plt=Ee({type:me("source_missing_property_error"),source_missing_property_error_id:Ki("source_missing_property_error"),source_component_id:I(),property_name:I(),subcircuit_id:I().optional(),error_type:me("source_missing_property_error").default("source_missing_property_error"),message:I()}).describe("The source code is missing a property"),Rlt=Ee({type:me("source_failed_to_create_component_error"),source_failed_to_create_component_error_id:Ki("source_failed_to_create_component_error"),error_type:me("source_failed_to_create_component_error").default("source_failed_to_create_component_error"),component_name:I().optional(),subcircuit_id:I().optional(),parent_source_component_id:I().optional(),message:I(),pcb_center:Ee({x:Ie().optional(),y:Ie().optional()}).optional(),schematic_center:Ee({x:Ie().optional(),y:Ie().optional()}).optional()}).describe("Error emitted when a component fails to be constructed"),Obe=Ee({type:me("source_trace_not_connected_error"),source_trace_not_connected_error_id:Ki("source_trace_not_connected_error"),error_type:me("source_trace_not_connected_error").default("source_trace_not_connected_error"),message:I(),subcircuit_id:I().optional(),source_group_id:I().optional(),source_trace_id:I().optional(),connected_source_port_ids:ut(I()).optional(),selectors_not_found:ut(I()).optional()}).describe("Occurs when a source trace selector does not match any ports"),Ilt=Ee({type:me("source_property_ignored_warning"),source_property_ignored_warning_id:Ki("source_property_ignored_warning"),source_component_id:I(),property_name:I(),subcircuit_id:I().optional(),error_type:me("source_property_ignored_warning").default("source_property_ignored_warning"),message:I()}).describe("The source property was ignored"),Lbe=Ee({type:me("source_pin_missing_trace_warning"),source_pin_missing_trace_warning_id:Ki("source_pin_missing_trace_warning"),warning_type:me("source_pin_missing_trace_warning").default("source_pin_missing_trace_warning"),message:I(),source_component_id:I(),source_port_id:I(),subcircuit_id:I().optional()}).describe("Warning emitted when a source component pin is missing a trace connection"),Nlt=Bn([gbe,ybe,$Y,xbe,Clt,bbe,vbe,wbe,Sbe,Ebe,Tbe,Alt,Mbe,Cbe,Abe,Nbe,Pbe,Rbe,Ibe,r$n,kbe,Plt,Rlt,Obe,Ilt,Lbe]),klt=Ee({type:me("source_port"),pin_number:Ie().optional(),port_hints:ut(I()).optional(),name:I(),source_port_id:I(),source_component_id:I().optional(),source_group_id:I().optional(),subcircuit_id:I().optional(),subcircuit_connectivity_map_key:I().optional()}),Olt=Ee({type:me("source_trace"),source_trace_id:I(),connected_source_port_ids:ut(I()),connected_source_net_ids:ut(I()),subcircuit_id:I().optional(),subcircuit_connectivity_map_key:I().optional(),max_length:Ie().optional(),min_trace_thickness:Ie().optional(),display_name:I().optional()}),Llt=Ee({type:me("source_group"),source_group_id:I(),subcircuit_id:I().optional(),parent_subcircuit_id:I().optional(),parent_source_group_id:I().optional(),is_subcircuit:Je().optional(),show_as_schematic_box:Je().optional(),name:I().optional(),was_automatically_named:Je().optional()}),Dlt=Ee({type:me("source_net"),source_net_id:I(),name:I(),member_source_group_ids:ut(I()),is_power:Je().optional(),is_ground:Je().optional(),is_digital_signal:Je().optional(),is_analog_signal:Je().optional(),is_positive_voltage_source:Je().optional(),trace_width:Ie().optional(),subcircuit_id:I().optional(),subcircuit_connectivity_map_key:I().optional()}),zlt=Ee({type:me("source_board"),source_board_id:I(),source_group_id:I(),title:I().optional()}).describe("Defines a board in the source domain"),$lt=Ee({type:me("source_pcb_ground_plane"),source_pcb_ground_plane_id:I(),source_group_id:I(),source_net_id:I(),subcircuit_id:I().optional()}).describe("Defines a ground plane in the source domain"),Flt=["top","bottom","inner1","inner2","inner3","inner4","inner5","inner6"],Dbe=Xt(Flt),vd=Dbe.or(Ee({name:Dbe})).transform(n=>typeof n=="string"?n:n.name),dE=Xt(["top","bottom"]),Ult=Ee({type:me("source_manually_placed_via"),source_manually_placed_via_id:I(),source_group_id:I(),source_net_id:I(),subcircuit_id:I().optional(),source_trace_id:I().optional()}).describe("Defines a via that is manually placed in the source domain"),Blt=Ee({type:me("unknown_error_finding_part"),unknown_error_finding_part_id:Ki("unknown_error_finding_part"),error_type:me("unknown_error_finding_part").default("unknown_error_finding_part"),message:I(),source_component_id:I().optional(),subcircuit_id:I().optional()}).describe("Error emitted when an unexpected error occurs while finding a part"),jlt=Ee({type:me("schematic_box"),schematic_component_id:I().optional(),width:di,height:di,is_dashed:Je().default(!1),x:di,y:di,subcircuit_id:I().optional()}).describe("Draws a box on the schematic"),Hlt=Ee({type:me("schematic_path"),schematic_component_id:I(),fill_color:Xt(["red","blue"]).optional(),is_filled:Je().optional(),points:ut(bs),subcircuit_id:I().optional()}),Vlt=os(Ee({left_margin:ss.optional(),right_margin:ss.optional(),top_margin:ss.optional(),bottom_margin:ss.optional()})),Glt=Ee({left_size:Ie(),right_size:Ie(),top_size:Ie().optional(),bottom_size:Ie().optional()}),Ylt=Ee({left_side:Ee({pins:ut(Ie()),direction:Xt(["top-to-bottom","bottom-to-top"]).optional()}).optional(),right_side:Ee({pins:ut(Ie()),direction:Xt(["top-to-bottom","bottom-to-top"]).optional()}).optional(),top_side:Ee({pins:ut(Ie()),direction:Xt(["left-to-right","right-to-left"]).optional()}).optional(),bottom_side:Ee({pins:ut(Ie()),direction:Xt(["left-to-right","right-to-left"]).optional()}).optional()}),qlt=Bn([Glt,Ylt]),Xlt=Ee({type:me("schematic_component"),size:_be,center:bs,source_component_id:I().optional(),schematic_component_id:I(),pin_spacing:ss.optional(),pin_styles:Vlt.optional(),box_width:ss.optional(),symbol_name:I().optional(),port_arrangement:qlt.optional(),port_labels:os(I()).optional(),symbol_display_value:I().optional(),subcircuit_id:I().optional(),schematic_group_id:I().optional(),is_schematic_group:Je().optional(),source_group_id:I().optional(),is_box_with_pins:Je().optional().default(!0)}),Wlt=Ee({type:me("schematic_line"),schematic_line_id:Ki("schematic_line"),schematic_component_id:I(),x1:di,y1:di,x2:di,y2:di,stroke_width:di.nullable().optional(),color:I().default("#000000"),is_dashed:Je().default(!1),subcircuit_id:I().optional()}).describe("Draws a styled line on the schematic"),Klt=Ee({type:me("schematic_rect"),schematic_rect_id:Ki("schematic_rect"),schematic_component_id:I(),center:bs,width:di,height:di,rotation:xw.default(0),stroke_width:di.nullable().optional(),color:I().default("#000000"),is_filled:Je().default(!1),fill_color:I().optional(),is_dashed:Je().default(!1),subcircuit_id:I().optional()}).describe("Draws a styled rectangle on the schematic"),Zlt=Ee({type:me("schematic_circle"),schematic_circle_id:Ki("schematic_circle"),schematic_component_id:I(),center:bs,radius:di,stroke_width:di.nullable().optional(),color:I().default("#000000"),is_filled:Je().default(!1),fill_color:I().optional(),is_dashed:Je().default(!1),subcircuit_id:I().optional()}).describe("Draws a styled circle on the schematic"),Qlt=Ee({type:me("schematic_arc"),schematic_arc_id:Ki("schematic_arc"),schematic_component_id:I(),center:bs,radius:di,start_angle_degrees:xw,end_angle_degrees:xw,direction:Xt(["clockwise","counterclockwise"]).default("counterclockwise"),stroke_width:di.nullable().optional(),color:I().default("#000000"),is_dashed:Je().default(!1),subcircuit_id:I().optional()}).describe("Draws a styled arc on the schematic"),Jlt=Ee({type:me("schematic_trace"),schematic_trace_id:I(),source_trace_id:I().optional(),junctions:ut(Ee({x:Ie(),y:Ie()})),edges:ut(Ee({from:Ee({x:Ie(),y:Ie()}),to:Ee({x:Ie(),y:Ie()}),is_crossing:Je().optional(),from_schematic_port_id:I().optional(),to_schematic_port_id:I().optional()})),subcircuit_id:I().optional(),subcircuit_connectivity_map_key:I().optional()}),o$n=Xt(["center","left","right","top","bottom"]),eut=Ee({type:me("schematic_text"),schematic_component_id:I().optional(),schematic_text_id:I(),text:I(),font_size:Ie().default(.18),position:Ee({x:di,y:di}),rotation:Ie().default(0),anchor:Bn([o$n.describe("legacy"),z8]).default("center"),color:I().default("#000000"),subcircuit_id:I().optional()}),tut=Ee({type:me("schematic_port"),schematic_port_id:I(),source_port_id:I(),schematic_component_id:I().optional(),center:bs,facing_direction:Xt(["up","down","left","right"]).optional(),distance_from_component_edge:Ie().optional(),side_of_component:Xt(["top","bottom","left","right"]).optional(),true_ccw_index:Ie().optional(),pin_number:Ie().optional(),display_pin_label:I().optional(),subcircuit_id:I().optional(),is_connected:Je().optional(),has_input_arrow:Je().optional(),has_output_arrow:Je().optional()}).describe("Defines a port on a schematic component"),nut=Ee({type:me("schematic_net_label"),schematic_net_label_id:Ki("schematic_net_label"),schematic_trace_id:I().optional(),source_trace_id:I().optional(),source_net_id:I(),center:bs,anchor_position:bs.optional(),anchor_side:Xt(["top","bottom","left","right"]),text:I(),symbol_name:I().optional(),is_movable:Je().optional(),subcircuit_id:I().optional()}),iut=Ee({type:me("schematic_error"),schematic_error_id:I(),error_type:me("schematic_port_not_found").default("schematic_port_not_found"),message:I(),subcircuit_id:I().optional()}).describe("Defines a schematic error on the schematic"),rut=Ee({type:me("schematic_layout_error"),schematic_layout_error_id:Ki("schematic_layout_error"),error_type:me("schematic_layout_error").default("schematic_layout_error"),message:I(),source_group_id:I(),schematic_group_id:I(),subcircuit_id:I().optional()}).describe("Error emitted when schematic layout fails for a group"),FY=Ee({type:me("schematic_debug_object"),label:I().optional(),subcircuit_id:I().optional()}),out=FY.extend({shape:me("rect"),center:bs,size:_be}),sut=FY.extend({shape:me("line"),start:bs,end:bs}),aut=FY.extend({shape:me("point"),center:bs}),cut=gm("shape",[out,sut,aut]),lut=Ee({type:me("schematic_voltage_probe"),schematic_voltage_probe_id:I(),position:bs,schematic_trace_id:I(),voltage:q4.optional(),subcircuit_id:I().optional()}).describe("Defines a voltage probe measurement point on a schematic trace"),uut=Ee({type:me("schematic_manual_edit_conflict_warning"),schematic_manual_edit_conflict_warning_id:Ki("schematic_manual_edit_conflict_warning"),warning_type:me("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),message:I(),schematic_component_id:I(),schematic_group_id:I().optional(),subcircuit_id:I().optional(),source_component_id:I()}).describe("Warning emitted when a component has both manual placement and explicit schX/schY coordinates"),dut=Ee({type:me("schematic_group"),schematic_group_id:Ki("schematic_group"),source_group_id:I(),is_subcircuit:Je().optional(),subcircuit_id:I().optional(),width:ss,height:ss,center:bs,schematic_component_ids:ut(I()),show_as_schematic_box:Je().optional(),name:I().optional(),description:I().optional()}).describe("Defines a group of components on the schematic"),hut=Ee({type:me("schematic_table"),schematic_table_id:Ki("schematic_table"),anchor_position:bs,column_widths:ut(di),row_heights:ut(di),cell_padding:di.optional(),border_width:di.optional(),subcircuit_id:I().optional(),schematic_component_id:I().optional(),anchor:z8.optional()}).describe("Defines a table on the schematic"),put=Ee({type:me("schematic_table_cell"),schematic_table_cell_id:Ki("schematic_table_cell"),schematic_table_id:I(),start_row_index:Ie(),end_row_index:Ie(),start_column_index:Ie(),end_column_index:Ie(),text:I().optional(),center:bs,width:di,height:di,horizontal_align:Xt(["left","center","right"]).optional(),vertical_align:Xt(["top","middle","bottom"]).optional(),font_size:di.optional(),subcircuit_id:I().optional()}).describe("Defines a cell within a schematic_table"),fut=Ee({x:di,y:di,bulge:Ie().optional()}),zbe=Ee({vertices:ut(fut)}),mut=Ee({outer_ring:zbe,inner_rings:ut(zbe).default([])}),_ut=Ee({x:di,y:di,via:Je().optional(),via_to_layer:vd.optional()}),s$n=ut(_ut),yut=Ee({x:di,y:di,via:Je().optional(),to_layer:vd.optional(),trace_width:di.optional()}),gut=Ee({type:me("pcb_component"),pcb_component_id:Ki("pcb_component"),source_component_id:I(),center:bs,layer:vd,rotation:xw,width:ss,height:ss,do_not_place:Je().optional(),subcircuit_id:I().optional(),pcb_group_id:I().optional(),obstructs_within_bounds:Je().default(!0).describe("Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath")}).describe("Defines a component on the PCB"),xut=Ee({type:me("pcb_hole"),pcb_hole_id:Ki("pcb_hole"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:Xt(["circle","square"]),hole_diameter:Ie(),x:di,y:di}),a$n=xut.describe("Defines a circular or square hole on the PCB"),but=Ee({type:me("pcb_hole"),pcb_hole_id:Ki("pcb_hole"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("oval"),hole_width:Ie(),hole_height:Ie(),x:di,y:di}),c$n=but.describe("Defines an oval hole on the PCB"),vut=Ee({type:me("pcb_hole"),pcb_hole_id:Ki("pcb_hole"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("pill"),hole_width:Ie(),hole_height:Ie(),x:di,y:di}),l$n=vut.describe("Defines a pill-shaped hole on the PCB"),wut=Ee({type:me("pcb_hole"),pcb_hole_id:Ki("pcb_hole"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("rotated_pill"),hole_width:Ie(),hole_height:Ie(),x:di,y:di,ccw_rotation:xw}),u$n=wut.describe("Defines a rotated pill-shaped hole on the PCB"),Sut=xut.or(but).or(vut).or(wut),d$n=Ee({type:me("pcb_plated_hole"),shape:me("circle"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),outer_diameter:Ie(),hole_diameter:Ie(),x:di,y:di,layers:ut(vd),port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),pcb_plated_hole_id:Ki("pcb_plated_hole")}),h$n=Ee({type:me("pcb_plated_hole"),shape:Xt(["oval","pill"]),pcb_group_id:I().optional(),subcircuit_id:I().optional(),outer_width:Ie(),outer_height:Ie(),hole_width:Ie(),hole_height:Ie(),x:di,y:di,ccw_rotation:xw,layers:ut(vd),port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),pcb_plated_hole_id:Ki("pcb_plated_hole")}),p$n=Ee({type:me("pcb_plated_hole"),shape:me("circular_hole_with_rect_pad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("circle"),pad_shape:me("rect"),hole_diameter:Ie(),rect_pad_width:Ie(),rect_pad_height:Ie(),rect_border_radius:Ie().optional(),hole_offset_x:di.default(0),hole_offset_y:di.default(0),x:di,y:di,layers:ut(vd),port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),pcb_plated_hole_id:Ki("pcb_plated_hole")}),f$n=Ee({type:me("pcb_plated_hole"),shape:me("pill_hole_with_rect_pad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("pill"),pad_shape:me("rect"),hole_width:Ie(),hole_height:Ie(),rect_pad_width:Ie(),rect_pad_height:Ie(),rect_border_radius:Ie().optional(),hole_offset_x:di.default(0),hole_offset_y:di.default(0),x:di,y:di,layers:ut(vd),port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),pcb_plated_hole_id:Ki("pcb_plated_hole")}),m$n=Ee({type:me("pcb_plated_hole"),shape:me("rotated_pill_hole_with_rect_pad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),hole_shape:me("rotated_pill"),pad_shape:me("rect"),hole_width:Ie(),hole_height:Ie(),hole_ccw_rotation:xw,rect_pad_width:Ie(),rect_pad_height:Ie(),rect_border_radius:Ie().optional(),rect_ccw_rotation:xw,hole_offset_x:di.default(0),hole_offset_y:di.default(0),x:di,y:di,layers:ut(vd),port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),pcb_plated_hole_id:Ki("pcb_plated_hole")}),Eut=Bn([d$n,h$n,p$n,f$n,m$n]),Tut=Ee({type:me("pcb_port"),pcb_port_id:Ki("pcb_port"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),source_port_id:I(),pcb_component_id:I().optional(),x:di,y:di,layers:ut(vd),is_board_pinout:Je().optional()}).describe("Defines a port on the PCB"),_$n=Ee({type:me("pcb_smtpad"),shape:me("circle"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,radius:Ie(),layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),y$n=Ee({type:me("pcb_smtpad"),shape:me("rect"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),rect_border_radius:Ie().optional(),corner_radius:Ie().optional(),layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),g$n=Ee({type:me("pcb_smtpad"),shape:me("rotated_rect"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),rect_border_radius:Ie().optional(),corner_radius:Ie().optional(),ccw_rotation:xw,layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),Mut=Ee({type:me("pcb_smtpad"),shape:me("pill"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),radius:Ie(),layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),x$n=Ee({type:me("pcb_smtpad"),shape:me("rotated_pill"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),radius:Ie(),ccw_rotation:xw,layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),b$n=Ee({type:me("pcb_smtpad"),shape:me("polygon"),pcb_smtpad_id:Ki("pcb_smtpad"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),points:ut(bs),layer:vd,port_hints:ut(I()).optional(),pcb_component_id:I().optional(),pcb_port_id:I().optional(),is_covered_with_solder_mask:Je().optional()}),Cut=gm("shape",[_$n,y$n,g$n,x$n,Mut,b$n]).describe("Defines an SMT pad on the PCB"),v$n=Ee({type:me("pcb_solder_paste"),shape:me("circle"),pcb_solder_paste_id:Ki("pcb_solder_paste"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,radius:Ie(),layer:vd,pcb_component_id:I().optional(),pcb_smtpad_id:I().optional()}),w$n=Ee({type:me("pcb_solder_paste"),shape:me("rect"),pcb_solder_paste_id:Ki("pcb_solder_paste"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),layer:vd,pcb_component_id:I().optional(),pcb_smtpad_id:I().optional()}),S$n=Ee({type:me("pcb_solder_paste"),shape:me("pill"),pcb_solder_paste_id:Ki("pcb_solder_paste"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),radius:Ie(),layer:vd,pcb_component_id:I().optional(),pcb_smtpad_id:I().optional()}),E$n=Ee({type:me("pcb_solder_paste"),shape:me("rotated_rect"),pcb_solder_paste_id:Ki("pcb_solder_paste"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),ccw_rotation:di,layer:vd,pcb_component_id:I().optional(),pcb_smtpad_id:I().optional()}),T$n=Ee({type:me("pcb_solder_paste"),shape:me("oval"),pcb_solder_paste_id:Ki("pcb_solder_paste"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,width:Ie(),height:Ie(),layer:vd,pcb_component_id:I().optional(),pcb_smtpad_id:I().optional()}),Aut=Bn([v$n,w$n,S$n,E$n,T$n]).describe("Defines solderpaste on the PCB"),Put=Ee({type:me("pcb_text"),pcb_text_id:Ki("pcb_text"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),text:I(),center:bs,layer:vd,width:ss,height:ss,lines:Ie(),align:Xt(["bottom-left"])}).describe("Defines text on the PCB"),Rut=Ee({route_type:me("wire"),x:di,y:di,width:di,start_pcb_port_id:I().optional(),end_pcb_port_id:I().optional(),layer:vd}),Iut=Ee({route_type:me("via"),x:di,y:di,hole_diameter:di.optional(),outer_diameter:di.optional(),from_layer:I(),to_layer:I()}),Nut=Bn([Rut,Iut]),kut=Ee({type:me("pcb_trace"),source_trace_id:I().optional(),pcb_component_id:I().optional(),pcb_trace_id:Ki("pcb_trace"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),route_thickness_mode:Xt(["constant","interpolated"]).default("constant").optional(),route_order_index:Ie().optional(),should_round_corners:Je().optional(),trace_length:Ie().optional(),highlight_color:I().optional(),route:ut(Nut)}).describe("Defines a trace on the PCB"),Out=Ee({type:me("pcb_trace_error"),pcb_trace_error_id:Ki("pcb_trace_error"),error_type:me("pcb_trace_error").default("pcb_trace_error"),message:I(),center:bs.optional(),pcb_trace_id:I(),source_trace_id:I(),pcb_component_ids:ut(I()),pcb_port_ids:ut(I()),subcircuit_id:I().optional()}).describe("Defines a trace error on the PCB"),Lut=Ee({type:me("pcb_trace_missing_error"),pcb_trace_missing_error_id:Ki("pcb_trace_missing_error"),error_type:me("pcb_trace_missing_error").default("pcb_trace_missing_error"),message:I(),center:bs.optional(),source_trace_id:I(),pcb_component_ids:ut(I()),pcb_port_ids:ut(I()),subcircuit_id:I().optional()}).describe("Defines an error when a source trace has no corresponding PCB trace"),Dut=Ee({type:me("pcb_port_not_matched_error"),pcb_error_id:Ki("pcb_error"),error_type:me("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),message:I(),pcb_component_ids:ut(I()),subcircuit_id:I().optional()}).describe("Defines a trace error on the PCB where a port is not matched"),zut=Ee({type:me("pcb_port_not_connected_error"),pcb_port_not_connected_error_id:Ki("pcb_port_not_connected_error"),error_type:me("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),message:I(),pcb_port_ids:ut(I()),pcb_component_ids:ut(I()),subcircuit_id:I().optional()}).describe("Defines an error when a pcb port is not connected to any trace"),$ut=Ee({type:me("pcb_net"),pcb_net_id:Ki("pcb_net"),source_net_id:I().optional(),highlight_color:I().optional()}).describe("Defines a net on the PCB"),Fut=Ee({type:me("pcb_via"),pcb_via_id:Ki("pcb_via"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),x:di,y:di,outer_diameter:di.default("0.6mm"),hole_diameter:di.default("0.25mm"),from_layer:vd.optional(),to_layer:vd.optional(),layers:ut(vd),pcb_trace_id:I().optional()}).describe("Defines a via on the PCB"),Uut=Ee({type:me("pcb_board"),pcb_board_id:Ki("pcb_board"),pcb_panel_id:I().optional(),is_subcircuit:Je().optional(),subcircuit_id:I().optional(),width:ss,height:ss,center:bs,thickness:ss.optional().default(1.4),num_layers:Ie().optional().default(4),outline:ut(bs).optional(),material:Xt(["fr4","fr1"]).default("fr4")}).describe("Defines the board outline of the PCB"),But=Ee({type:me("pcb_panel"),pcb_panel_id:Ki("pcb_panel"),width:ss,height:ss,covered_with_solder_mask:Je().optional().default(!0)}).describe("Defines a PCB panel that can contain multiple boards"),jut=Ee({type:me("pcb_placement_error"),pcb_placement_error_id:Ki("pcb_placement_error"),error_type:me("pcb_placement_error").default("pcb_placement_error"),message:I(),subcircuit_id:I().optional()}).describe("Defines a placement error on the PCB"),Hut=Ee({type:me("pcb_trace_hint"),pcb_trace_hint_id:Ki("pcb_trace_hint"),pcb_port_id:I(),pcb_component_id:I(),route:ut(yut),subcircuit_id:I().optional()}).describe("A hint that can be used during generation of a PCB trace"),Vut=Ee({type:me("pcb_silkscreen_line"),pcb_silkscreen_line_id:Ki("pcb_silkscreen_line"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),stroke_width:di.default("0.1mm"),x1:di,y1:di,x2:di,y2:di,layer:dE}).describe("Defines a silkscreen line on the PCB"),Gut=Ee({type:me("pcb_silkscreen_path"),pcb_silkscreen_path_id:Ki("pcb_silkscreen_path"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:dE,route:ut(bs),stroke_width:ss}).describe("Defines a silkscreen path on the PCB"),Yut=Ee({type:me("pcb_silkscreen_text"),pcb_silkscreen_text_id:Ki("pcb_silkscreen_text"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:di.default("0.2mm"),pcb_component_id:I(),text:I(),is_knockout:Je().default(!1).optional(),knockout_padding:Ee({left:ss,top:ss,bottom:ss,right:ss}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:Ie().optional(),layer:vd,is_mirrored:Je().default(!1).optional(),anchor_position:bs.default({x:0,y:0}),anchor_alignment:z8.default("center")}).describe("Defines silkscreen text on the PCB"),qut=Ee({type:me("pcb_copper_text"),pcb_copper_text_id:Ki("pcb_copper_text"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:di.default("0.2mm"),pcb_component_id:I(),text:I(),is_knockout:Je().default(!1).optional(),knockout_padding:Ee({left:ss,top:ss,bottom:ss,right:ss}).default({left:"0.2mm",top:"0.2mm",bottom:"0.2mm",right:"0.2mm"}).optional(),ccw_rotation:Ie().optional(),layer:vd,is_mirrored:Je().default(!1).optional(),anchor_position:bs.default({x:0,y:0}),anchor_alignment:z8.default("center")}).describe("Defines copper text on the PCB"),Xut=Ee({type:me("pcb_silkscreen_rect"),pcb_silkscreen_rect_id:Ki("pcb_silkscreen_rect"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,width:ss,height:ss,layer:vd,stroke_width:ss.default("1mm"),is_filled:Je().default(!0).optional(),has_stroke:Je().optional(),is_stroke_dashed:Je().optional()}).describe("Defines a silkscreen rect on the PCB"),Wut=Ee({type:me("pcb_silkscreen_circle"),pcb_silkscreen_circle_id:Ki("pcb_silkscreen_circle"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,radius:ss,layer:dE,stroke_width:ss.default("1mm")}).describe("Defines a silkscreen circle on the PCB"),Kut=Ee({type:me("pcb_silkscreen_oval"),pcb_silkscreen_oval_id:Ki("pcb_silkscreen_oval"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,radius_x:di,radius_y:di,layer:dE}).describe("Defines a silkscreen oval on the PCB"),Zut=Ee({type:me("pcb_fabrication_note_text"),pcb_fabrication_note_text_id:Ki("pcb_fabrication_note_text"),subcircuit_id:I().optional(),pcb_group_id:I().optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:di.default("1mm"),pcb_component_id:I(),text:I(),layer:dE,anchor_position:bs.default({x:0,y:0}),anchor_alignment:Xt(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:I().optional()}).describe("Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"),Qut=Ee({type:me("pcb_fabrication_note_path"),pcb_fabrication_note_path_id:Ki("pcb_fabrication_note_path"),pcb_component_id:I(),subcircuit_id:I().optional(),layer:vd,route:ut(bs),stroke_width:ss,color:I().optional()}).describe("Defines a fabrication path on the PCB for fabricators or assemblers"),Jut=Ee({type:me("pcb_fabrication_note_rect"),pcb_fabrication_note_rect_id:Ki("pcb_fabrication_note_rect"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,width:ss,height:ss,layer:dE,stroke_width:ss.default("0.1mm"),is_filled:Je().optional(),has_stroke:Je().optional(),is_stroke_dashed:Je().optional(),color:I().optional()}).describe("Defines a fabrication note rectangle on the PCB"),edt=Ee({type:me("pcb_fabrication_note_dimension"),pcb_fabrication_note_dimension_id:Ki("pcb_fabrication_note_dimension"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:dE,from:bs,to:bs,text:I().optional(),text_ccw_rotation:Ie().optional(),offset:ss.optional(),offset_distance:ss.optional(),offset_direction:Ee({x:Ie(),y:Ie()}).optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:ss.default("1mm"),color:I().optional(),arrow_size:ss.default("1mm")}).describe("Defines a measurement annotation within PCB fabrication notes"),tdt=Ee({type:me("pcb_note_text"),pcb_note_text_id:Ki("pcb_note_text"),pcb_component_id:I().optional(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),name:I().optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:di.default("1mm"),text:I().optional(),anchor_position:bs.default({x:0,y:0}),anchor_alignment:Xt(["center","top_left","top_right","bottom_left","bottom_right"]).default("center"),color:I().optional()}).describe("Defines a documentation note in text on the PCB"),ndt=Ee({type:me("pcb_note_rect"),pcb_note_rect_id:Ki("pcb_note_rect"),pcb_component_id:I().optional(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),name:I().optional(),text:I().optional(),center:bs,width:ss,height:ss,stroke_width:ss.default("0.1mm"),is_filled:Je().optional(),has_stroke:Je().optional(),is_stroke_dashed:Je().optional(),color:I().optional()}).describe("Defines a rectangular documentation note on the PCB"),idt=Ee({type:me("pcb_note_path"),pcb_note_path_id:Ki("pcb_note_path"),pcb_component_id:I().optional(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),name:I().optional(),text:I().optional(),route:ut(bs),stroke_width:ss.default("0.1mm"),color:I().optional()}).describe("Defines a polyline documentation note on the PCB"),rdt=Ee({type:me("pcb_note_line"),pcb_note_line_id:Ki("pcb_note_line"),pcb_component_id:I().optional(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),name:I().optional(),text:I().optional(),x1:di,y1:di,x2:di,y2:di,stroke_width:di.default("0.1mm"),color:I().optional(),is_dashed:Je().optional()}).describe("Defines a straight documentation note line on the PCB"),odt=Ee({type:me("pcb_note_dimension"),pcb_note_dimension_id:Ki("pcb_note_dimension"),pcb_component_id:I().optional(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),name:I().optional(),from:bs,to:bs,text:I().optional(),text_ccw_rotation:Ie().optional(),offset_distance:ss.optional(),offset_direction:Ee({x:Ie(),y:Ie()}).optional(),font:me("tscircuit2024").default("tscircuit2024"),font_size:ss.default("1mm"),color:I().optional(),arrow_size:ss.default("1mm")}).describe("Defines a measurement annotation within PCB documentation notes"),sdt=Ee({type:me("pcb_footprint_overlap_error"),pcb_error_id:Ki("pcb_error"),error_type:me("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),message:I(),pcb_smtpad_ids:ut(I()).optional(),pcb_plated_hole_ids:ut(I()).optional(),pcb_hole_ids:ut(I()).optional(),pcb_keepout_ids:ut(I()).optional()}).describe("Error emitted when a pcb footprint overlaps with another element"),adt=Ee({type:me("pcb_keepout"),shape:me("rect"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,width:di,height:di,pcb_keepout_id:I(),layers:ut(I()),description:I().optional()}).or(Ee({type:me("pcb_keepout"),shape:me("circle"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,radius:di,pcb_keepout_id:I(),layers:ut(I()),description:I().optional()})),$be=Ee({type:me("pcb_cutout"),pcb_cutout_id:Ki("pcb_cutout"),pcb_group_id:I().optional(),subcircuit_id:I().optional()}),cdt=$be.extend({shape:me("rect"),center:bs,width:ss,height:ss,rotation:xw.optional()}),ldt=$be.extend({shape:me("circle"),center:bs,radius:ss}),udt=$be.extend({shape:me("polygon"),points:ut(bs)}),ddt=gm("shape",[cdt,ldt,udt]).describe("Defines a cutout on the PCB, removing board material."),hdt=Ee({type:me("pcb_missing_footprint_error"),pcb_missing_footprint_error_id:Ki("pcb_missing_footprint_error"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),error_type:me("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),source_component_id:I(),message:I()}).describe("Defines a missing footprint error on the PCB"),pdt=Ee({type:me("external_footprint_load_error"),external_footprint_load_error_id:Ki("external_footprint_load_error"),pcb_component_id:I(),source_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),footprinter_string:I().optional(),error_type:me("external_footprint_load_error").default("external_footprint_load_error"),message:I()}).describe("Defines an error when an external footprint fails to load"),fdt=Ee({type:me("circuit_json_footprint_load_error"),circuit_json_footprint_load_error_id:Ki("circuit_json_footprint_load_error"),pcb_component_id:I(),source_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),error_type:me("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),message:I(),circuit_json:ut(fl()).optional()}).describe("Defines an error when a circuit JSON footprint fails to load"),mdt=Ee({type:me("pcb_group"),pcb_group_id:Ki("pcb_group"),source_group_id:I(),is_subcircuit:Je().optional(),subcircuit_id:I().optional(),width:ss.optional(),height:ss.optional(),center:bs,outline:ut(bs).optional(),anchor_position:bs.optional(),anchor_alignment:Xt(["center","top_left","top_right","bottom_left","bottom_right"]).optional(),pcb_component_ids:ut(I()),name:I().optional(),description:I().optional(),layout_mode:I().optional(),autorouter_configuration:Ee({trace_clearance:ss}).optional(),autorouter_used_string:I().optional()}).describe("Defines a group of components on the PCB"),_dt=Ee({type:me("pcb_autorouting_error"),pcb_error_id:Ki("pcb_autorouting_error"),error_type:me("pcb_autorouting_error").default("pcb_autorouting_error"),message:I(),subcircuit_id:I().optional()}).describe("The autorouting has failed to route a portion of the board"),ydt=Ee({type:me("pcb_manual_edit_conflict_warning"),pcb_manual_edit_conflict_warning_id:Ki("pcb_manual_edit_conflict_warning"),warning_type:me("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),message:I(),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),source_component_id:I()}).describe("Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"),gdt=Ee({type:me("pcb_breakout_point"),pcb_breakout_point_id:Ki("pcb_breakout_point"),pcb_group_id:I(),subcircuit_id:I().optional(),source_trace_id:I().optional(),source_port_id:I().optional(),source_net_id:I().optional(),x:di,y:di}).describe("Defines a routing target within a pcb_group for a source_trace or source_net"),xdt=Ee({type:me("pcb_ground_plane"),pcb_ground_plane_id:Ki("pcb_ground_plane"),source_pcb_ground_plane_id:I(),source_net_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional()}).describe("Defines a ground plane on the PCB"),bdt=Ee({type:me("pcb_ground_plane_region"),pcb_ground_plane_region_id:Ki("pcb_ground_plane_region"),pcb_ground_plane_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:vd,points:ut(bs)}).describe("Defines a polygon region of a ground plane"),vdt=Ee({type:me("pcb_thermal_spoke"),pcb_thermal_spoke_id:Ki("pcb_thermal_spoke"),pcb_ground_plane_id:I(),shape:I(),spoke_count:Ie(),spoke_thickness:di,spoke_inner_diameter:di,spoke_outer_diameter:di,pcb_plated_hole_id:I().optional(),subcircuit_id:I().optional()}).describe("Pattern for connecting a ground plane to a plated hole"),Fbe=Ee({type:me("pcb_copper_pour"),pcb_copper_pour_id:Ki("pcb_copper_pour"),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:vd,source_net_id:I().optional()}),wdt=Fbe.extend({shape:me("rect"),center:bs,width:ss,height:ss,rotation:xw.optional()}),Sdt=Fbe.extend({shape:me("brep"),brep_shape:mut}),Edt=Fbe.extend({shape:me("polygon"),points:ut(bs)}),Tdt=gm("shape",[wdt,Sdt,Edt]).describe("Defines a copper pour on the PCB."),Mdt=Ee({type:me("pcb_component_outside_board_error"),pcb_component_outside_board_error_id:Ki("pcb_component_outside_board_error"),error_type:me("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),message:I(),pcb_component_id:I(),pcb_board_id:I(),component_center:bs,component_bounds:Ee({min_x:Ie(),max_x:Ie(),min_y:Ie(),max_y:Ie()}),subcircuit_id:I().optional(),source_component_id:I().optional()}).describe("Error emitted when a PCB component is placed outside the board boundaries"),Cdt=Ee({type:me("pcb_component_invalid_layer_error"),pcb_component_invalid_layer_error_id:Ki("pcb_component_invalid_layer_error"),error_type:me("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),message:I(),pcb_component_id:I().optional(),source_component_id:I(),layer:vd,subcircuit_id:I().optional()}).describe("Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"),Adt=Ee({type:me("pcb_via_clearance_error"),pcb_error_id:Ki("pcb_error"),error_type:me("pcb_via_clearance_error").default("pcb_via_clearance_error"),message:I(),pcb_via_ids:ut(I()).min(2),minimum_clearance:di.optional(),actual_clearance:di.optional(),pcb_center:Ee({x:Ie().optional(),y:Ie().optional()}).optional(),subcircuit_id:I().optional()}).describe("Error emitted when vias are closer than the allowed clearance"),Pdt=Ee({type:me("pcb_courtyard_rect"),pcb_courtyard_rect_id:Ki("pcb_courtyard_rect"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),center:bs,width:ss,height:ss,layer:dE,color:I().optional()}).describe("Defines a courtyard rectangle on the PCB"),Rdt=Ee({type:me("pcb_courtyard_outline"),pcb_courtyard_outline_id:Ki("pcb_courtyard_outline"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:dE,outline:ut(bs).min(2),stroke_width:ss.default("0.1mm"),is_closed:Je().optional(),is_stroke_dashed:Je().optional(),color:I().optional()}).describe("Defines a courtyard outline on the PCB"),Idt=Ee({type:me("pcb_courtyard_polygon"),pcb_courtyard_polygon_id:Ki("pcb_courtyard_polygon"),pcb_component_id:I(),pcb_group_id:I().optional(),subcircuit_id:I().optional(),layer:dE,points:ut(bs).min(3),color:I().optional()}).describe("Defines a courtyard polygon on the PCB"),Ndt=Ee({type:me("cad_component"),cad_component_id:I(),pcb_component_id:I(),source_component_id:I(),position:D8,rotation:D8.optional(),size:D8.optional(),layer:vd.optional(),subcircuit_id:I().optional(),footprinter_string:I().optional(),model_obj_url:I().optional(),model_stl_url:I().optional(),model_3mf_url:I().optional(),model_gltf_url:I().optional(),model_glb_url:I().optional(),model_step_url:I().optional(),model_wrl_url:I().optional(),model_unit_to_mm_scale_factor:Ie().optional(),model_jscad:fl().optional()}).describe("Defines a component on the PCB"),kdt=Xt(["sinewave","square","triangle","sawtooth"]),M$n=Bn([I(),Ie()]).transform(n=>typeof n=="string"?n.endsWith("%")?parseFloat(n.slice(0,-1))/100:parseFloat(n):n).pipe(Ie().min(0,"Duty cycle must be non-negative").max(1,"Duty cycle cannot be greater than 100%")),Odt=Ee({type:me("simulation_voltage_source"),simulation_voltage_source_id:Ki("simulation_voltage_source"),is_dc_source:me(!0).optional().default(!0),positive_source_port_id:I().optional(),negative_source_port_id:I().optional(),positive_source_net_id:I().optional(),negative_source_net_id:I().optional(),voltage:q4}).describe("Defines a DC voltage source for simulation"),Ldt=Ee({type:me("simulation_voltage_source"),simulation_voltage_source_id:Ki("simulation_voltage_source"),is_dc_source:me(!1),terminal1_source_port_id:I().optional(),terminal2_source_port_id:I().optional(),terminal1_source_net_id:I().optional(),terminal2_source_net_id:I().optional(),voltage:q4.optional(),frequency:zY.optional(),peak_to_peak_voltage:q4.optional(),wave_shape:kdt.optional(),phase:xw.optional(),duty_cycle:M$n.optional()}).describe("Defines an AC voltage source for simulation"),Ddt=Bn([Odt,Ldt]).describe("Defines a voltage source for simulation"),zdt=Bn([me("spice_dc_sweep"),me("spice_dc_operating_point"),me("spice_transient_analysis"),me("spice_ac_analysis")]),$dt=Ee({type:me("simulation_experiment"),simulation_experiment_id:Ki("simulation_experiment"),name:I(),experiment_type:zdt,time_per_step:L8.optional(),start_time_ms:X4.optional(),end_time_ms:X4.optional()}).describe("Defines a simulation experiment configuration"),Fdt=Ee({type:me("simulation_transient_voltage_graph"),simulation_transient_voltage_graph_id:Ki("simulation_transient_voltage_graph"),simulation_experiment_id:I(),timestamps_ms:ut(Ie()).optional(),voltage_levels:ut(Ie()),schematic_voltage_probe_id:I().optional(),simulation_voltage_probe_id:I().optional(),subcircuit_connectivity_map_key:I().optional(),time_per_step:L8,start_time_ms:X4,end_time_ms:X4,name:I().optional()}).describe("Stores voltage measurements over time for a simulation"),Udt=Ee({type:me("simulation_switch"),simulation_switch_id:Ki("simulation_switch"),source_component_id:I().optional(),closes_at:X4.optional(),opens_at:X4.optional(),starts_closed:Je().optional(),switching_frequency:zY.optional()}).describe("Defines a switch for simulation timing control"),Bdt=Ee({type:me("simulation_voltage_probe"),simulation_voltage_probe_id:Ki("simulation_voltage_probe"),source_port_id:I().optional(),source_net_id:I().optional(),name:I().optional(),subcircuit_id:I().optional()}).describe("Defines a voltage probe for simulation, connected to a port or a net").refine(n=>!!n.source_port_id!=!!n.source_net_id,{message:"Exactly one of source_port_id or source_net_id must be provided to simulation_voltage_probe"}),jdt=Bn([Olt,klt,Nlt,Dlt,Llt,bbe,ybe,$Y,xbe,gbe,vbe,wbe,Sbe,Mbe,Cbe,Abe,Nbe,Pbe,Rbe,Ibe,Tbe,Ebe,$lt,Ult,zlt,kbe,Obe,Lbe,Blt,gut,Sut,hdt,pdt,fdt,ydt,Eut,adt,Tut,$ut,Put,kut,Fut,Cut,Aut,Uut,But,mdt,Hut,Vut,Gut,Yut,qut,Xut,Wut,Kut,Out,Lut,jut,Dut,zut,Adt,Qut,Zut,Jut,edt,tdt,ndt,idt,rdt,odt,_dt,sdt,gdt,ddt,xdt,bdt,vdt,Tdt,Mdt,Cdt,Pdt,Rdt,Idt,jlt,eut,Wlt,Klt,Zlt,Qlt,Xlt,tut,Jlt,Hlt,iut,rut,nut,cut,lut,uut,dut,hut,put,Ndt,Ddt,$dt,Fdt,Udt,Bdt]),Ube=jdt;const Hdt=Object.freeze(Object.defineProperty({__proto__:null,all_layers:Flt,any_circuit_element:jdt,any_soup_element:Ube,any_source_component:Nlt,battery_capacity:Tlt,brep_shape:mut,cad_component:Ndt,capacitance:mbe,circuit_json_footprint_load_error:fdt,current:Jzn,distance:di,duration_ms:L8,experiment_type:zdt,external_footprint_load_error:pdt,frequency:zY,getZodPrefixedIdWithDefault:Ki,inductance:Slt,layer_ref:vd,layer_string:Dbe,length:ss,ms:X4,ninePointAnchor:z8,pcb_autorouting_error:_dt,pcb_board:Uut,pcb_breakout_point:gdt,pcb_component:gut,pcb_component_invalid_layer_error:Cdt,pcb_component_outside_board_error:Mdt,pcb_copper_pour:Tdt,pcb_copper_pour_brep:Sdt,pcb_copper_pour_polygon:Edt,pcb_copper_pour_rect:wdt,pcb_copper_text:qut,pcb_courtyard_outline:Rdt,pcb_courtyard_polygon:Idt,pcb_courtyard_rect:Pdt,pcb_cutout:ddt,pcb_cutout_circle:ldt,pcb_cutout_polygon:udt,pcb_cutout_rect:cdt,pcb_fabrication_note_dimension:edt,pcb_fabrication_note_path:Qut,pcb_fabrication_note_rect:Jut,pcb_fabrication_note_text:Zut,pcb_footprint_overlap_error:sdt,pcb_ground_plane:xdt,pcb_ground_plane_region:bdt,pcb_group:mdt,pcb_hole:Sut,pcb_hole_circle_or_square_shape:a$n,pcb_hole_oval_shape:c$n,pcb_hole_pill_shape:l$n,pcb_hole_rotated_pill_shape:u$n,pcb_keepout:adt,pcb_manual_edit_conflict_warning:ydt,pcb_missing_footprint_error:hdt,pcb_net:$ut,pcb_note_dimension:odt,pcb_note_line:rdt,pcb_note_path:idt,pcb_note_rect:ndt,pcb_note_text:tdt,pcb_panel:But,pcb_placement_error:jut,pcb_plated_hole:Eut,pcb_port:Tut,pcb_port_not_connected_error:zut,pcb_port_not_matched_error:Dut,pcb_route_hint:_ut,pcb_route_hints:s$n,pcb_silkscreen_circle:Wut,pcb_silkscreen_line:Vut,pcb_silkscreen_oval:Kut,pcb_silkscreen_path:Gut,pcb_silkscreen_rect:Xut,pcb_silkscreen_text:Yut,pcb_smtpad:Cut,pcb_smtpad_pill:Mut,pcb_solder_paste:Aut,pcb_text:Put,pcb_thermal_spoke:vdt,pcb_trace:kut,pcb_trace_error:Out,pcb_trace_hint:Hut,pcb_trace_missing_error:Lut,pcb_trace_route_point:Nut,pcb_trace_route_point_via:Iut,pcb_trace_route_point_wire:Rut,pcb_via:Fut,pcb_via_clearance_error:Adt,point:bs,point3:D8,point_with_bulge:fut,port_arrangement:qlt,position:t$n,position3:n$n,resistance:DY,ring:zbe,rotation:xw,route_hint_point:yut,schematic_arc:Qlt,schematic_box:jlt,schematic_circle:Zlt,schematic_component:Xlt,schematic_component_port_arrangement_by_sides:Ylt,schematic_component_port_arrangement_by_size:Glt,schematic_debug_line:sut,schematic_debug_object:cut,schematic_debug_object_base:FY,schematic_debug_point:aut,schematic_debug_rect:out,schematic_error:iut,schematic_group:dut,schematic_layout_error:rut,schematic_line:Wlt,schematic_manual_edit_conflict_warning:uut,schematic_net_label:nut,schematic_path:Hlt,schematic_pin_styles:Vlt,schematic_port:tut,schematic_rect:Klt,schematic_table:hut,schematic_table_cell:put,schematic_text:eut,schematic_trace:Jlt,schematic_voltage_probe:lut,simulation_ac_voltage_source:Ldt,simulation_dc_voltage_source:Odt,simulation_experiment:$dt,simulation_switch:Udt,simulation_transient_voltage_graph:Fdt,simulation_voltage_probe:Bdt,simulation_voltage_source:Ddt,size:_be,source_board:zlt,source_component_base:Qg,source_failed_to_create_component_error:Rlt,source_group:Llt,source_manually_placed_via:Ult,source_missing_property_error:Plt,source_net:Dlt,source_pcb_ground_plane:$lt,source_pin_missing_trace_warning:Lbe,source_port:klt,source_project_metadata:kbe,source_property_ignored_warning:Ilt,source_simple_battery:wbe,source_simple_capacitor:ybe,source_simple_chip:bbe,source_simple_crystal:Alt,source_simple_diode:$Y,source_simple_ground:Clt,source_simple_inductor:Sbe,source_simple_led:xbe,source_simple_mosfet:Ibe,source_simple_pin_header:Mbe,source_simple_pinout:Cbe,source_simple_potentiometer:Tbe,source_simple_power_source:vbe,source_simple_push_button:Ebe,source_simple_resistor:gbe,source_simple_resonator:Abe,source_simple_switch:Nbe,source_simple_test_point:Rbe,source_simple_transistor:Pbe,source_trace:Olt,source_trace_not_connected_error:Obe,supplier_name:Mlt,time:e$n,timestamp:Elt,unknown_error_finding_part:Blt,visible_layer:dE,voltage:q4,wave_shape:kdt},Symbol.toStringTag,{value:"Module"})),$8=n=>typeof n=="number"&&!isNaN(n),W4=n=>typeof n=="string",_S=n=>typeof n=="function",UY=n=>W4(n)||_S(n)?n:null,Bbe=n=>ce.isValidElement(n)||W4(n)||_S(n)||$8(n);function C$n(n,e,t){t===void 0&&(t=300);const{scrollHeight:i,style:r}=n;requestAnimationFrame(()=>{r.minHeight="initial",r.height=i+"px",r.transition=`all ${t}ms`,requestAnimationFrame(()=>{r.height="0",r.padding="0",r.margin="0",setTimeout(e,t)})})}function BY(n){let{enter:e,exit:t,appendPosition:i=!1,collapse:r=!0,collapseDuration:o=300}=n;return function(s){let{children:a,position:c,preventExitTransition:l,done:u,nodeRef:d,isIn:h,playToast:p}=s;const m=i?`${e}--${c}`:e,_=i?`${t}--${c}`:t,y=ce.useRef(0);return ce.useLayoutEffect(()=>{const x=d.current,b=m.split(" "),w=S=>{S.target===d.current&&(p(),x.removeEventListener("animationend",w),x.removeEventListener("animationcancel",w),y.current===0&&S.type!=="animationcancel"&&x.classList.remove(...b))};x.classList.add(...b),x.addEventListener("animationend",w),x.addEventListener("animationcancel",w)},[]),ce.useEffect(()=>{const x=d.current,b=()=>{x.removeEventListener("animationend",b),r?C$n(x,u,o):u()};h||(l?b():(y.current=1,x.className+=` ${_}`,x.addEventListener("animationend",b)))},[h]),So.createElement(So.Fragment,null,a)}}function Vdt(n,e){return n!=null?{content:n.content,containerId:n.props.containerId,id:n.props.toastId,theme:n.props.theme,type:n.props.type,data:n.props.data||{},isLoading:n.props.isLoading,icon:n.props.icon,status:e}:{}}const Lv=new Map;let F8=[];const jbe=new Set,A$n=n=>jbe.forEach(e=>e(n)),Gdt=()=>Lv.size>0;function Ydt(n,e){var t;if(e)return!((t=Lv.get(e))==null||!t.isToastActive(n));let i=!1;return Lv.forEach(r=>{r.isToastActive(n)&&(i=!0)}),i}function qdt(n,e){Bbe(n)&&(Gdt()||F8.push({content:n,options:e}),Lv.forEach(t=>{t.buildToast(n,e)}))}function Xdt(n,e){Lv.forEach(t=>{e!=null&&e!=null&&e.containerId?e?.containerId===t.id&&t.toggle(n,e?.id):t.toggle(n,e?.id)})}function P$n(n){const{subscribe:e,getSnapshot:t,setProps:i}=ce.useRef((function(o){const s=o.containerId||1;return{subscribe(a){const c=(function(u,d,h){let p=1,m=0,_=[],y=[],x=[],b=d;const w=new Map,S=new Set,k=()=>{x=Array.from(w.values()),S.forEach(M=>M())},A=M=>{y=M==null?[]:y.filter(N=>N!==M),k()},R=M=>{const{toastId:N,onOpen:C,updateId:U,children:O}=M.props,H=U==null;M.staleId&&w.delete(M.staleId),w.set(N,M),y=[...y,M.props.toastId].filter(Y=>Y!==M.staleId),k(),h(Vdt(M,H?"added":"updated")),H&&_S(C)&&C(ce.isValidElement(O)&&O.props)};return{id:u,props:b,observe:M=>(S.add(M),()=>S.delete(M)),toggle:(M,N)=>{w.forEach(C=>{N!=null&&N!==C.props.toastId||_S(C.toggle)&&C.toggle(M)})},removeToast:A,toasts:w,clearQueue:()=>{m-=_.length,_=[]},buildToast:(M,N)=>{if((ae=>{let{containerId:de,toastId:Te,updateId:Ce}=ae;const Oe=de?de!==u:u!==1,$e=w.has(Te)&&Ce==null;return Oe||$e})(N))return;const{toastId:C,updateId:U,data:O,staleId:H,delay:Y}=N,X=()=>{A(C)},K=U==null;K&&m++;const J={...b,style:b.toastStyle,key:p++,...Object.fromEntries(Object.entries(N).filter(ae=>{let[de,Te]=ae;return Te!=null})),toastId:C,updateId:U,data:O,closeToast:X,isIn:!1,className:UY(N.className||b.toastClassName),bodyClassName:UY(N.bodyClassName||b.bodyClassName),progressClassName:UY(N.progressClassName||b.progressClassName),autoClose:!N.isLoading&&(le=N.autoClose,he=b.autoClose,le===!1||$8(le)&&le>0?le:he),deleteToast(){const ae=w.get(C),{onClose:de,children:Te}=ae.props;_S(de)&&de(ce.isValidElement(Te)&&Te.props),h(Vdt(ae,"removed")),w.delete(C),m--,m<0&&(m=0),_.length>0?R(_.shift()):k()}};var le,he;J.closeButton=b.closeButton,N.closeButton===!1||Bbe(N.closeButton)?J.closeButton=N.closeButton:N.closeButton===!0&&(J.closeButton=!Bbe(b.closeButton)||b.closeButton);let ve=M;ce.isValidElement(M)&&!W4(M.type)?ve=ce.cloneElement(M,{closeToast:X,toastProps:J,data:O}):_S(M)&&(ve=M({closeToast:X,toastProps:J,data:O}));const oe={content:ve,props:J,staleId:H};b.limit&&b.limit>0&&m>b.limit&&K?_.push(oe):$8(Y)?setTimeout(()=>{R(oe)},Y):R(oe)},setProps(M){b=M},setToggle:(M,N)=>{w.get(M).toggle=N},isToastActive:M=>y.some(N=>N===M),getSnapshot:()=>x}})(s,o,A$n);Lv.set(s,c);const l=c.observe(a);return F8.forEach(u=>qdt(u.content,u.options)),F8=[],()=>{l(),Lv.delete(s)}},setProps(a){var c;(c=Lv.get(s))==null||c.setProps(a)},getSnapshot(){var a;return(a=Lv.get(s))==null?void 0:a.getSnapshot()}}})(n)).current;i(n);const r=ce.useSyncExternalStore(e,t,t);return{getToastToRender:function(o){if(!r)return[];const s=new Map;return n.newestOnTop&&r.reverse(),r.forEach(a=>{const{position:c}=a.props;s.has(c)||s.set(c,[]),s.get(c).push(a)}),Array.from(s,a=>o(a[0],a[1]))},isToastActive:Ydt,count:r?.length}}function R$n(n){const[e,t]=ce.useState(!1),[i,r]=ce.useState(!1),o=ce.useRef(null),s=ce.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:a,pauseOnHover:c,closeToast:l,onClick:u,closeOnClick:d}=n;var h,p;function m(){t(!0)}function _(){t(!1)}function y(w){const S=o.current;s.canDrag&&S&&(s.didMove=!0,e&&_(),s.delta=n.draggableDirection==="x"?w.clientX-s.start:w.clientY-s.start,s.start!==w.clientX&&(s.canCloseOnClick=!1),S.style.transform=`translate3d(${n.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,S.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function x(){document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",x);const w=o.current;if(s.canDrag&&s.didMove&&w){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return r(!0),n.closeToast(),void n.collapseAll();w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}(p=Lv.get((h={id:n.toastId,containerId:n.containerId,fn:t}).containerId||1))==null||p.setToggle(h.id,h.fn),ce.useEffect(()=>{if(n.pauseOnFocusLoss)return document.hasFocus()||_(),window.addEventListener("focus",m),window.addEventListener("blur",_),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",_)}},[n.pauseOnFocusLoss]);const b={onPointerDown:function(w){if(n.draggable===!0||n.draggable===w.pointerType){s.didMove=!1,document.addEventListener("pointermove",y),document.addEventListener("pointerup",x);const S=o.current;s.canCloseOnClick=!0,s.canDrag=!0,S.style.transition="none",n.draggableDirection==="x"?(s.start=w.clientX,s.removalDistance=S.offsetWidth*(n.draggablePercent/100)):(s.start=w.clientY,s.removalDistance=S.offsetHeight*(n.draggablePercent===80?1.5*n.draggablePercent:n.draggablePercent)/100)}},onPointerUp:function(w){const{top:S,bottom:k,left:A,right:R}=o.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&n.pauseOnHover&&w.clientX>=A&&w.clientX<=R&&w.clientY>=S&&w.clientY<=k?_():m()}};return a&&c&&(b.onMouseEnter=_,n.stacked||(b.onMouseLeave=m)),d&&(b.onClick=w=>{u&&u(w),s.canCloseOnClick&&l()}),{playToast:m,pauseToast:_,isRunning:e,preventExitTransition:i,toastRef:o,eventHandlers:b}}function I$n(n){let{delay:e,isRunning:t,closeToast:i,type:r="default",hide:o,className:s,style:a,controlledProgress:c,progress:l,rtl:u,isIn:d,theme:h}=n;const p=o||c&&l===0,m={...a,animationDuration:`${e}ms`,animationPlayState:t?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const _=j2("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${h}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":u}),y=_S(s)?s({rtl:u,type:r,defaultClassName:_}):j2(_,s),x={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{d&&i()}};return So.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},So.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${h} Toastify__progress-bar--${r}`}),So.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:m,...x}))}let N$n=1;const Wdt=()=>""+N$n++;function k$n(n){return n&&(W4(n.toastId)||$8(n.toastId))?n.toastId:Wdt()}function U8(n,e){return qdt(n,e),e.toastId}function jY(n,e){return{...e,type:e&&e.type||n,toastId:k$n(e)}}function HY(n){return(e,t)=>U8(e,jY(n,t))}function zf(n,e){return U8(n,jY("default",e))}zf.loading=(n,e)=>U8(n,jY("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),zf.promise=function(n,e,t){let i,{pending:r,error:o,success:s}=e;r&&(i=W4(r)?zf.loading(r,t):zf.loading(r.render,{...t,...r}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(u,d,h)=>{if(d==null)return void zf.dismiss(i);const p={type:u,...a,...t,data:h},m=W4(d)?{render:d}:d;return i?zf.update(i,{...p,...m}):zf(m.render,{...p,...m}),h},l=_S(n)?n():n;return l.then(u=>c("success",s,u)).catch(u=>c("error",o,u)),l},zf.success=HY("success"),zf.info=HY("info"),zf.error=HY("error"),zf.warning=HY("warning"),zf.warn=zf.warning,zf.dark=(n,e)=>U8(n,jY("default",{theme:"dark",...e})),zf.dismiss=function(n){(function(e){var t;if(Gdt()){if(e==null||W4(t=e)||$8(t))Lv.forEach(i=>{i.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const i=Lv.get(e.containerId);i?i.removeToast(e.id):Lv.forEach(r=>{r.removeToast(e.id)})}}else F8=F8.filter(i=>e!=null&&i.options.toastId!==e)})(n)},zf.clearWaitingQueue=function(n){n===void 0&&(n={}),Lv.forEach(e=>{!e.props.limit||n.containerId&&e.id!==n.containerId||e.clearQueue()})},zf.isActive=Ydt,zf.update=function(n,e){e===void 0&&(e={});const t=((i,r)=>{var o;let{containerId:s}=r;return(o=Lv.get(s||1))==null?void 0:o.toasts.get(i)})(n,e);if(t){const{props:i,content:r}=t,o={delay:100,...i,...e,toastId:e.toastId||n,updateId:Wdt()};o.toastId!==n&&(o.staleId=n);const s=o.render||r;delete o.render,U8(s,o)}},zf.done=n=>{zf.update(n,{progress:1})},zf.onChange=function(n){return jbe.add(n),()=>{jbe.delete(n)}},zf.play=n=>Xdt(!0,n),zf.pause=n=>Xdt(!1,n);const O$n=typeof window<"u"?ce.useLayoutEffect:ce.useEffect,VY=n=>{let{theme:e,type:t,isLoading:i,...r}=n;return So.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${t})`,...r})},Hbe={info:function(n){return So.createElement(VY,{...n},So.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(n){return So.createElement(VY,{...n},So.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(n){return So.createElement(VY,{...n},So.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(n){return So.createElement(VY,{...n},So.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return So.createElement("div",{className:"Toastify__spinner"})}},L$n=n=>{const{isRunning:e,preventExitTransition:t,toastRef:i,eventHandlers:r,playToast:o}=R$n(n),{closeButton:s,children:a,autoClose:c,onClick:l,type:u,hideProgressBar:d,closeToast:h,transition:p,position:m,className:_,style:y,bodyClassName:x,bodyStyle:b,progressClassName:w,progressStyle:S,updateId:k,role:A,progress:R,rtl:M,toastId:N,deleteToast:C,isIn:U,isLoading:O,closeOnClick:H,theme:Y}=n,X=j2("Toastify__toast",`Toastify__toast-theme--${Y}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":M},{"Toastify__toast--close-on-click":H}),K=_S(_)?_({rtl:M,position:m,type:u,defaultClassName:X}):j2(X,_),J=(function(oe){let{theme:ae,type:de,isLoading:Te,icon:Ce}=oe,Oe=null;const $e={theme:ae,type:de};return Ce===!1||(_S(Ce)?Oe=Ce({...$e,isLoading:Te}):ce.isValidElement(Ce)?Oe=ce.cloneElement(Ce,$e):Te?Oe=Hbe.spinner():(Ae=>Ae in Hbe)(de)&&(Oe=Hbe[de]($e))),Oe})(n),le=!!R||!c,he={closeToast:h,type:u,theme:Y};let ve=null;return s===!1||(ve=_S(s)?s(he):ce.isValidElement(s)?ce.cloneElement(s,he):(function(oe){let{closeToast:ae,theme:de,ariaLabel:Te="close"}=oe;return So.createElement("button",{className:`Toastify__close-button Toastify__close-button--${de}`,type:"button",onClick:Ce=>{Ce.stopPropagation(),ae(Ce)},"aria-label":Te},So.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},So.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))})(he)),So.createElement(p,{isIn:U,done:C,position:m,preventExitTransition:t,nodeRef:i,playToast:o},So.createElement("div",{id:N,onClick:l,"data-in":U,className:K,...r,style:y,ref:i},So.createElement("div",{...U&&{role:A},className:_S(x)?x({type:u}):j2("Toastify__toast-body",x),style:b},J!=null&&So.createElement("div",{className:j2("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!O})},J),So.createElement("div",null,a)),ve,So.createElement(I$n,{...k&&!le?{key:`pb-${k}`}:{},rtl:M,theme:Y,delay:c,isRunning:e,isIn:U,closeToast:h,hide:d,type:u,style:S,className:w,controlledProgress:le,progress:R||0})))},GY=function(n,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${n}-enter`,exit:`Toastify--animate Toastify__${n}-exit`,appendPosition:e}},D$n=BY(GY("bounce",!0));BY(GY("slide",!0)),BY(GY("zoom")),BY(GY("flip"));const z$n={position:"top-right",transition:D$n,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function $$n(n){let e={...z$n,...n};const t=n.stacked,[i,r]=ce.useState(!0),o=ce.useRef(null),{getToastToRender:s,isToastActive:a,count:c}=P$n(e),{className:l,style:u,rtl:d,containerId:h}=e;function p(_){const y=j2("Toastify__toast-container",`Toastify__toast-container--${_}`,{"Toastify__toast-container--rtl":d});return _S(l)?l({position:_,rtl:d,defaultClassName:y}):j2(y,UY(l))}function m(){t&&(r(!0),zf.play())}return O$n(()=>{if(t){var _;const y=o.current.querySelectorAll('[data-in="true"]'),x=12,b=(_=e.position)==null?void 0:_.includes("top");let w=0,S=0;Array.from(y).reverse().forEach((k,A)=>{const R=k;R.classList.add("Toastify__toast--stacked"),A>0&&(R.dataset.collapsed=`${i}`),R.dataset.pos||(R.dataset.pos=b?"top":"bot");const M=w*(i?.2:1)+(i?0:x*A);R.style.setProperty("--y",`${b?M:-1*M}px`),R.style.setProperty("--g",`${x}`),R.style.setProperty("--s",""+(1-(i?S:0))),w+=R.offsetHeight,S+=.025})}},[i,c,t]),So.createElement("div",{ref:o,className:"Toastify",id:h,onMouseEnter:()=>{t&&(r(!1),zf.pause())},onMouseLeave:m},s((_,y)=>{const x=y.length?{...u}:{...u,pointerEvents:"none"};return So.createElement("div",{className:p(_),style:x,key:`container-${_}`},y.map(b=>{let{content:w,props:S}=b;return So.createElement(L$n,{...S,stacked:t,collapseAll:m,isIn:a(S.toastId,S.containerId),style:S.style,key:`toast-${S.key}`},w)}))}))}function F$n(){var n=':root{--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-color-info:#3498db;--toastify-color-success:#07bc0c;--toastify-color-warning:#f1c40f;--toastify-color-error:#e74c3c;--toastify-color-transparent:hsla(0,0%,100%,.7);--toastify-icon-color-info:var(--toastify-color-info);--toastify-icon-color-success:var(--toastify-color-success);--toastify-icon-color-warning:var(--toastify-color-warning);--toastify-icon-color-error:var(--toastify-color-error);--toastify-toast-width:320px;--toastify-toast-offset:16px;--toastify-toast-top:max(var(--toastify-toast-offset),env(safe-area-inset-top));--toastify-toast-right:max(var(--toastify-toast-offset),env(safe-area-inset-right));--toastify-toast-left:max(var(--toastify-toast-offset),env(safe-area-inset-left));--toastify-toast-bottom:max(var(--toastify-toast-offset),env(safe-area-inset-bottom));--toastify-toast-background:#fff;--toastify-toast-min-height:64px;--toastify-toast-max-height:800px;--toastify-toast-bd-radius:6px;--toastify-font-family:sans-serif;--toastify-z-index:9999;--toastify-text-color-light:#757575;--toastify-text-color-dark:#fff;--toastify-text-color-info:#fff;--toastify-text-color-success:#fff;--toastify-text-color-warning:#fff;--toastify-text-color-error:#fff;--toastify-spinner-color:#616161;--toastify-spinner-color-empty-area:#e0e0e0;--toastify-color-progress-light:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);--toastify-color-progress-dark:#bb86fc;--toastify-color-progress-info:var(--toastify-color-info);--toastify-color-progress-success:var(--toastify-color-success);--toastify-color-progress-warning:var(--toastify-color-warning);--toastify-color-progress-error:var(--toastify-color-error);--toastify-color-progress-bgo:0.2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translateZ(var(--toastify-z-index));position:fixed;padding:4px;width:var(--toastify-toast-width);box-sizing:border-box;color:#fff}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translateX(-50%)}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right)}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translateX(-50%)}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right)}@media only screen and (max-width:480px){.Toastify__toast-container{width:100vw;padding:0;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translateX(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translateX(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:auto}}.Toastify__toast{--y:0;position:relative;-ms-touch-action:none;touch-action:none;min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:8px;border-radius:var(--toastify-toast-bd-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);cursor:default;direction:ltr;z-index:0;overflow:hidden}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__close-button,.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-body{margin:auto 0;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.Toastify__toast-body>div:last-child{word-break:break-word;-ms-flex:1;flex:1}.Toastify__toast-icon{-webkit-margin-end:10px;margin-inline-end:10px;width:20px;-ms-flex-negative:0;flex-shrink:0;display:-ms-flexbox;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width:480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;-ms-flex-item-align:start;align-self:flex-start;z-index:1}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:auto;transform-origin:right;border-bottom-left-radius:0;border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp{position:absolute;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}',e=document.createElement("style");e.innerText=n,document.head.appendChild(e)}const U$n=WAt(XNt);var Vbe,Kdt;function B$n(){if(Kdt)return Vbe;Kdt=1;var n=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,r=(y,x)=>{for(var b in x)n(y,b,{get:x[b],enumerable:!0})},o=(y,x,b,w)=>{if(x&&typeof x=="object"||typeof x=="function")for(let S of t(x))!i.call(y,S)&&S!==b&&n(y,S,{get:()=>x[S],enumerable:!(w=e(x,S))||w.enumerable});return y},s=y=>o(n({},"__esModule",{value:!0}),y),a={};r(a,{SuperGrid:()=>_,toMMSI:()=>m,toMeterSI:()=>p}),Vbe=s(a);var c=Xw(),l=U$n,u=_4e(),d=(y,x,b)=>{const w=[];if(x<y)for(let S=y;S>=x;S-=Math.abs(b))w.push(S);else for(let S=y;S<=x;S+=Math.abs(b))w.push(S);return w};function h(y,x){return{x:Math.round(x.x/y)*y,y:Math.round(x.y/y)*y}}function p(y,x=1){return y<0?"-"+p(-y):y<1e-6?"0m":y>1e3?Math.floor(y/1e3)+"km":y>1&&x>1?Math.round(y)+"m":y>1&&x<=1?y.toFixed(Math.ceil(-Math.log10(x)))+"m":y<1&&x>=1/1e3?Math.round(y*1e3)+"mm":y<1&&x<1/1e3?(y*1e3).toFixed(Math.ceil(-Math.log10(x*1e3)))+"mm":""}function m(y,x=1){return p(y/1e3,x/1e3)}var _=y=>{var x;const b=(0,c.useRef)(null),[w,S]=(0,c.useState)({x:0,y:0}),{majorColor:k="rgba(0,0,0,0.2)",minorColor:A="rgba(0,0,0,0.1)",textColor:R=(x=y.majorColor)!=null?x:"rgba(0,0,0,0.5)",width:M,height:N,screenSpaceCellSize:C=200,stringifyCoord:U=(X,K,J)=>`${p(X,J)}, ${p(K,J)}`}=y,O=Math.ceil(M/C)+2,H=Math.ceil(N/C)+2;(0,c.useEffect)(()=>{if(!b.current)return;const X=b.current.getContext("2d");if(!X)return;const K=C/10**Math.floor(Math.log10(y.transform.a)),J=y.transform.d<0?-1:1,he=C/10**Math.log10(y.transform.a)/K;function ve(Se,xe,Ve){const tt=Se;let ct,Me,Qe;for(ct=xe.x;ct<=Ve.x;ct+=tt)Me=(0,l.applyToPoint)(y.transform,{x:ct,y:xe.y}),Qe=(0,l.applyToPoint)(y.transform,{x:ct,y:Ve.y}),X.beginPath(),X.moveTo(Me.x,Me.y),X.lineTo(Qe.x,Qe.y),X.stroke();const Xe=d(xe.y,Ve.y,tt*J);for(const Ge of Xe)Me=(0,l.applyToPoint)(y.transform,{x:xe.x,y:Ge}),Qe=(0,l.applyToPoint)(y.transform,{x:Ve.x,y:Ge}),X.beginPath(),X.moveTo(Me.x,Me.y),X.lineTo(Qe.x,Qe.y),X.stroke()}function oe(Se,xe,Ve){const tt=Se;let ct;for(ct=xe.x;ct<=Ve.x;ct+=tt)for(const Me of d(xe.y,Ve.y,tt*J)){const Qe=(0,l.applyToPoint)(y.transform,{x:ct,y:Me});X.fillStyle=R,X.font="12px sans-serif",X.fillText(U(ct,Me,Se),Qe.x+2,Qe.y-2)}}X.clearRect(0,0,M,N);const ae=(0,l.applyToPoint)((0,l.inverse)(y.transform),{x:0,y:0}),de={x:Math.floor((ae.x-K)/K)*K,y:Math.floor((ae.y-K)/K+(J==-1?2:0))*K},Te={x:de.x+K*O,y:de.y+K*H*J},Oe=K*5,$e={x:Math.floor((ae.x-Oe)/Oe)*Oe,y:Math.floor((ae.y-Oe)/Oe+(J==-1?2:0))*Oe},Ae={x:$e.x+Oe*O,y:$e.y+Oe*H*J};X.globalAlpha=1,X.strokeStyle=k,ve(K,de,Te),oe(Oe,$e,Ae),X.globalAlpha=1-he,ve(Oe/10,$e,Ae),X.globalAlpha=1-he,X.strokeStyle=A,ve(K/10,de,Te),X.globalAlpha=Math.max(((1-he)*10-5)/5,0),oe(Oe/10,$e,Ae),X.globalAlpha=1;const se=(0,l.applyToPoint)(y.transform,w);X.font="12px sans-serif",X.fillStyle=R,X.fillText(U(w.x,w.y,K),se.x+2,se.y-2),X.strokeStyle=k,X.strokeRect(se.x-5,se.y-5,10,10)},[b,y.transform,w,M,N]);const Y=X=>{if(!b.current)return;const K=C/10/10**Math.floor(Math.log10(y.transform.a)),J=b.current.getBoundingClientRect(),le=(0,l.applyToPoint)((0,l.inverse)(y.transform),{x:X.clientX-J.left,y:X.clientY-J.top}),he=h(K,le);S(he)};return(0,u.jsx)("canvas",{onMouseUp:X=>{X.button===1&&Y(X)},onDoubleClick:Y,ref:b,width:y.width,height:y.height})};return Vbe}var Gbe=B$n(),Ybe={exports:{}},qbe,Zdt;function Qdt(){return Zdt||(Zdt=1,qbe={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),qbe}var Xbe={exports:{}},Wbe,Jdt;function j$n(){return Jdt||(Jdt=1,Wbe=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}),Wbe}var eht;function H$n(){if(eht)return Xbe.exports;eht=1;var n=j$n(),e=Array.prototype.concat,t=Array.prototype.slice,i=Xbe.exports=function(o){for(var s=[],a=0,c=o.length;a<c;a++){var l=o[a];n(l)?s=e.call(s,t.call(l)):s.push(l)}return s};return i.wrap=function(r){return function(){return r(i(arguments))}},Xbe.exports}var tht;function V$n(){if(tht)return Ybe.exports;tht=1;var n=Qdt(),e=H$n(),t=Object.hasOwnProperty,i=Object.create(null);for(var r in n)t.call(n,r)&&(i[n[r]]=r);var o=Ybe.exports={to:{},get:{}};o.get=function(c){var l=c.substring(0,3).toLowerCase(),u,d;switch(l){case"hsl":u=o.get.hsl(c),d="hsl";break;case"hwb":u=o.get.hwb(c),d="hwb";break;default:u=o.get.rgb(c),d="rgb";break}return u?{model:d,value:u}:null},o.get.rgb=function(c){if(!c)return null;var l=/^#([a-f0-9]{3,4})$/i,u=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,d=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,h=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,p=/^(\w+)$/,m=[0,0,0,1],_,y,x;if(_=c.match(u)){for(x=_[2],_=_[1],y=0;y<3;y++){var b=y*2;m[y]=parseInt(_.slice(b,b+2),16)}x&&(m[3]=parseInt(x,16)/255)}else if(_=c.match(l)){for(_=_[1],x=_[3],y=0;y<3;y++)m[y]=parseInt(_[y]+_[y],16);x&&(m[3]=parseInt(x+x,16)/255)}else if(_=c.match(d)){for(y=0;y<3;y++)m[y]=parseInt(_[y+1],0);_[4]&&(_[5]?m[3]=parseFloat(_[4])*.01:m[3]=parseFloat(_[4]))}else if(_=c.match(h)){for(y=0;y<3;y++)m[y]=Math.round(parseFloat(_[y+1])*2.55);_[4]&&(_[5]?m[3]=parseFloat(_[4])*.01:m[3]=parseFloat(_[4]))}else return(_=c.match(p))?_[1]==="transparent"?[0,0,0,0]:t.call(n,_[1])?(m=n[_[1]],m[3]=1,m):null:null;for(y=0;y<3;y++)m[y]=s(m[y],0,255);return m[3]=s(m[3],0,1),m},o.get.hsl=function(c){if(!c)return null;var l=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var d=parseFloat(u[4]),h=(parseFloat(u[1])%360+360)%360,p=s(parseFloat(u[2]),0,100),m=s(parseFloat(u[3]),0,100),_=s(isNaN(d)?1:d,0,1);return[h,p,m,_]}return null},o.get.hwb=function(c){if(!c)return null;var l=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,u=c.match(l);if(u){var d=parseFloat(u[4]),h=(parseFloat(u[1])%360+360)%360,p=s(parseFloat(u[2]),0,100),m=s(parseFloat(u[3]),0,100),_=s(isNaN(d)?1:d,0,1);return[h,p,m,_]}return null},o.to.hex=function(){var c=e(arguments);return"#"+a(c[0])+a(c[1])+a(c[2])+(c[3]<1?a(Math.round(c[3]*255)):"")},o.to.rgb=function(){var c=e(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},o.to.rgb.percent=function(){var c=e(arguments),l=Math.round(c[0]/255*100),u=Math.round(c[1]/255*100),d=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+l+"%, "+u+"%, "+d+"%)":"rgba("+l+"%, "+u+"%, "+d+"%, "+c[3]+")"},o.to.hsl=function(){var c=e(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},o.to.hwb=function(){var c=e(arguments),l="";return c.length>=4&&c[3]!==1&&(l=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+l+")"},o.to.keyword=function(c){return i[c.slice(0,3)]};function s(c,l,u){return Math.min(Math.max(l,c),u)}function a(c){var l=Math.round(c).toString(16).toUpperCase();return l.length<2?"0"+l:l}return Ybe.exports}var Kbe,nht;function iht(){if(nht)return Kbe;nht=1;const n=Qdt(),e={};for(const r of Object.keys(n))e[n[r]]=r;const t={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Kbe=t;for(const r of Object.keys(t)){if(!("channels"in t[r]))throw new Error("missing channels property: "+r);if(!("labels"in t[r]))throw new Error("missing channel labels property: "+r);if(t[r].labels.length!==t[r].channels)throw new Error("channel and label counts mismatch: "+r);const{channels:o,labels:s}=t[r];delete t[r].channels,delete t[r].labels,Object.defineProperty(t[r],"channels",{value:o}),Object.defineProperty(t[r],"labels",{value:s})}t.rgb.hsl=function(r){const o=r[0]/255,s=r[1]/255,a=r[2]/255,c=Math.min(o,s,a),l=Math.max(o,s,a),u=l-c;let d,h;l===c?d=0:o===l?d=(s-a)/u:s===l?d=2+(a-o)/u:a===l&&(d=4+(o-s)/u),d=Math.min(d*60,360),d<0&&(d+=360);const p=(c+l)/2;return l===c?h=0:p<=.5?h=u/(l+c):h=u/(2-l-c),[d,h*100,p*100]},t.rgb.hsv=function(r){let o,s,a,c,l;const u=r[0]/255,d=r[1]/255,h=r[2]/255,p=Math.max(u,d,h),m=p-Math.min(u,d,h),_=function(y){return(p-y)/6/m+1/2};return m===0?(c=0,l=0):(l=m/p,o=_(u),s=_(d),a=_(h),u===p?c=a-s:d===p?c=1/3+o-a:h===p&&(c=2/3+s-o),c<0?c+=1:c>1&&(c-=1)),[c*360,l*100,p*100]},t.rgb.hwb=function(r){const o=r[0],s=r[1];let a=r[2];const c=t.rgb.hsl(r)[0],l=1/255*Math.min(o,Math.min(s,a));return a=1-1/255*Math.max(o,Math.max(s,a)),[c,l*100,a*100]},t.rgb.cmyk=function(r){const o=r[0]/255,s=r[1]/255,a=r[2]/255,c=Math.min(1-o,1-s,1-a),l=(1-o-c)/(1-c)||0,u=(1-s-c)/(1-c)||0,d=(1-a-c)/(1-c)||0;return[l*100,u*100,d*100,c*100]};function i(r,o){return(r[0]-o[0])**2+(r[1]-o[1])**2+(r[2]-o[2])**2}return t.rgb.keyword=function(r){const o=e[r];if(o)return o;let s=1/0,a;for(const c of Object.keys(n)){const l=n[c],u=i(r,l);u<s&&(s=u,a=c)}return a},t.keyword.rgb=function(r){return n[r]},t.rgb.xyz=function(r){let o=r[0]/255,s=r[1]/255,a=r[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const c=o*.4124+s*.3576+a*.1805,l=o*.2126+s*.7152+a*.0722,u=o*.0193+s*.1192+a*.9505;return[c*100,l*100,u*100]},t.rgb.lab=function(r){const o=t.rgb.xyz(r);let s=o[0],a=o[1],c=o[2];s/=95.047,a/=100,c/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const l=116*a-16,u=500*(s-a),d=200*(a-c);return[l,u,d]},t.hsl.rgb=function(r){const o=r[0]/360,s=r[1]/100,a=r[2]/100;let c,l,u;if(s===0)return u=a*255,[u,u,u];a<.5?c=a*(1+s):c=a+s-a*s;const d=2*a-c,h=[0,0,0];for(let p=0;p<3;p++)l=o+1/3*-(p-1),l<0&&l++,l>1&&l--,6*l<1?u=d+(c-d)*6*l:2*l<1?u=c:3*l<2?u=d+(c-d)*(2/3-l)*6:u=d,h[p]=u*255;return h},t.hsl.hsv=function(r){const o=r[0];let s=r[1]/100,a=r[2]/100,c=s;const l=Math.max(a,.01);a*=2,s*=a<=1?a:2-a,c*=l<=1?l:2-l;const u=(a+s)/2,d=a===0?2*c/(l+c):2*s/(a+s);return[o,d*100,u*100]},t.hsv.rgb=function(r){const o=r[0]/60,s=r[1]/100;let a=r[2]/100;const c=Math.floor(o)%6,l=o-Math.floor(o),u=255*a*(1-s),d=255*a*(1-s*l),h=255*a*(1-s*(1-l));switch(a*=255,c){case 0:return[a,h,u];case 1:return[d,a,u];case 2:return[u,a,h];case 3:return[u,d,a];case 4:return[h,u,a];case 5:return[a,u,d]}},t.hsv.hsl=function(r){const o=r[0],s=r[1]/100,a=r[2]/100,c=Math.max(a,.01);let l,u;u=(2-s)*a;const d=(2-s)*c;return l=s*c,l/=d<=1?d:2-d,l=l||0,u/=2,[o,l*100,u*100]},t.hwb.rgb=function(r){const o=r[0]/360;let s=r[1]/100,a=r[2]/100;const c=s+a;let l;c>1&&(s/=c,a/=c);const u=Math.floor(6*o),d=1-a;l=6*o-u,(u&1)!==0&&(l=1-l);const h=s+l*(d-s);let p,m,_;switch(u){default:case 6:case 0:p=d,m=h,_=s;break;case 1:p=h,m=d,_=s;break;case 2:p=s,m=d,_=h;break;case 3:p=s,m=h,_=d;break;case 4:p=h,m=s,_=d;break;case 5:p=d,m=s,_=h;break}return[p*255,m*255,_*255]},t.cmyk.rgb=function(r){const o=r[0]/100,s=r[1]/100,a=r[2]/100,c=r[3]/100,l=1-Math.min(1,o*(1-c)+c),u=1-Math.min(1,s*(1-c)+c),d=1-Math.min(1,a*(1-c)+c);return[l*255,u*255,d*255]},t.xyz.rgb=function(r){const o=r[0]/100,s=r[1]/100,a=r[2]/100;let c,l,u;return c=o*3.2406+s*-1.5372+a*-.4986,l=o*-.9689+s*1.8758+a*.0415,u=o*.0557+s*-.204+a*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),[c*255,l*255,u*255]},t.xyz.lab=function(r){let o=r[0],s=r[1],a=r[2];o/=95.047,s/=100,a/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,s=s>.008856?s**(1/3):7.787*s+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const c=116*s-16,l=500*(o-s),u=200*(s-a);return[c,l,u]},t.lab.xyz=function(r){const o=r[0],s=r[1],a=r[2];let c,l,u;l=(o+16)/116,c=s/500+l,u=l-a/200;const d=l**3,h=c**3,p=u**3;return l=d>.008856?d:(l-16/116)/7.787,c=h>.008856?h:(c-16/116)/7.787,u=p>.008856?p:(u-16/116)/7.787,c*=95.047,l*=100,u*=108.883,[c,l,u]},t.lab.lch=function(r){const o=r[0],s=r[1],a=r[2];let c;c=Math.atan2(a,s)*360/2/Math.PI,c<0&&(c+=360);const u=Math.sqrt(s*s+a*a);return[o,u,c]},t.lch.lab=function(r){const o=r[0],s=r[1],c=r[2]/360*2*Math.PI,l=s*Math.cos(c),u=s*Math.sin(c);return[o,l,u]},t.rgb.ansi16=function(r,o=null){const[s,a,c]=r;let l=o===null?t.rgb.hsv(r)[2]:o;if(l=Math.round(l/50),l===0)return 30;let u=30+(Math.round(c/255)<<2|Math.round(a/255)<<1|Math.round(s/255));return l===2&&(u+=60),u},t.hsv.ansi16=function(r){return t.rgb.ansi16(t.hsv.rgb(r),r[2])},t.rgb.ansi256=function(r){const o=r[0],s=r[1],a=r[2];return o===s&&s===a?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(s/255*5)+Math.round(a/255*5)},t.ansi16.rgb=function(r){let o=r%10;if(o===0||o===7)return r>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const s=(~~(r>50)+1)*.5,a=(o&1)*s*255,c=(o>>1&1)*s*255,l=(o>>2&1)*s*255;return[a,c,l]},t.ansi256.rgb=function(r){if(r>=232){const l=(r-232)*10+8;return[l,l,l]}r-=16;let o;const s=Math.floor(r/36)/5*255,a=Math.floor((o=r%36)/6)/5*255,c=o%6/5*255;return[s,a,c]},t.rgb.hex=function(r){const s=(((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255)).toString(16).toUpperCase();return"000000".substring(s.length)+s},t.hex.rgb=function(r){const o=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let s=o[0];o[0].length===3&&(s=s.split("").map(d=>d+d).join(""));const a=parseInt(s,16),c=a>>16&255,l=a>>8&255,u=a&255;return[c,l,u]},t.rgb.hcg=function(r){const o=r[0]/255,s=r[1]/255,a=r[2]/255,c=Math.max(Math.max(o,s),a),l=Math.min(Math.min(o,s),a),u=c-l;let d,h;return u<1?d=l/(1-u):d=0,u<=0?h=0:c===o?h=(s-a)/u%6:c===s?h=2+(a-o)/u:h=4+(o-s)/u,h/=6,h%=1,[h*360,u*100,d*100]},t.hsl.hcg=function(r){const o=r[1]/100,s=r[2]/100,a=s<.5?2*o*s:2*o*(1-s);let c=0;return a<1&&(c=(s-.5*a)/(1-a)),[r[0],a*100,c*100]},t.hsv.hcg=function(r){const o=r[1]/100,s=r[2]/100,a=o*s;let c=0;return a<1&&(c=(s-a)/(1-a)),[r[0],a*100,c*100]},t.hcg.rgb=function(r){const o=r[0]/360,s=r[1]/100,a=r[2]/100;if(s===0)return[a*255,a*255,a*255];const c=[0,0,0],l=o%1*6,u=l%1,d=1-u;let h=0;switch(Math.floor(l)){case 0:c[0]=1,c[1]=u,c[2]=0;break;case 1:c[0]=d,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=u;break;case 3:c[0]=0,c[1]=d,c[2]=1;break;case 4:c[0]=u,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=d}return h=(1-s)*a,[(s*c[0]+h)*255,(s*c[1]+h)*255,(s*c[2]+h)*255]},t.hcg.hsv=function(r){const o=r[1]/100,s=r[2]/100,a=o+s*(1-o);let c=0;return a>0&&(c=o/a),[r[0],c*100,a*100]},t.hcg.hsl=function(r){const o=r[1]/100,a=r[2]/100*(1-o)+.5*o;let c=0;return a>0&&a<.5?c=o/(2*a):a>=.5&&a<1&&(c=o/(2*(1-a))),[r[0],c*100,a*100]},t.hcg.hwb=function(r){const o=r[1]/100,s=r[2]/100,a=o+s*(1-o);return[r[0],(a-o)*100,(1-a)*100]},t.hwb.hcg=function(r){const o=r[1]/100,a=1-r[2]/100,c=a-o;let l=0;return c<1&&(l=(a-c)/(1-c)),[r[0],c*100,l*100]},t.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]},t.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]},t.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]},t.gray.hsl=function(r){return[0,0,r[0]]},t.gray.hsv=t.gray.hsl,t.gray.hwb=function(r){return[0,100,r[0]]},t.gray.cmyk=function(r){return[0,0,0,r[0]]},t.gray.lab=function(r){return[r[0],0,0]},t.gray.hex=function(r){const o=Math.round(r[0]/100*255)&255,a=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(a.length)+a},t.rgb.gray=function(r){return[(r[0]+r[1]+r[2])/3/255*100]},Kbe}var Zbe,rht;function G$n(){if(rht)return Zbe;rht=1;const n=iht();function e(){const o={},s=Object.keys(n);for(let a=s.length,c=0;c<a;c++)o[s[c]]={distance:-1,parent:null};return o}function t(o){const s=e(),a=[o];for(s[o].distance=0;a.length;){const c=a.pop(),l=Object.keys(n[c]);for(let u=l.length,d=0;d<u;d++){const h=l[d],p=s[h];p.distance===-1&&(p.distance=s[c].distance+1,p.parent=c,a.unshift(h))}}return s}function i(o,s){return function(a){return s(o(a))}}function r(o,s){const a=[s[o].parent,o];let c=n[s[o].parent][o],l=s[o].parent;for(;s[l].parent;)a.unshift(s[l].parent),c=i(n[s[l].parent][l],c),l=s[l].parent;return c.conversion=a,c}return Zbe=function(o){const s=t(o),a={},c=Object.keys(s);for(let l=c.length,u=0;u<l;u++){const d=c[u];s[d].parent!==null&&(a[d]=r(d,s))}return a},Zbe}var Qbe,oht;function Y$n(){if(oht)return Qbe;oht=1;const n=iht(),e=G$n(),t={},i=Object.keys(n);function r(s){const a=function(...c){const l=c[0];return l==null?l:(l.length>1&&(c=l),s(c))};return"conversion"in s&&(a.conversion=s.conversion),a}function o(s){const a=function(...c){const l=c[0];if(l==null)return l;l.length>1&&(c=l);const u=s(c);if(typeof u=="object")for(let d=u.length,h=0;h<d;h++)u[h]=Math.round(u[h]);return u};return"conversion"in s&&(a.conversion=s.conversion),a}return i.forEach(s=>{t[s]={},Object.defineProperty(t[s],"channels",{value:n[s].channels}),Object.defineProperty(t[s],"labels",{value:n[s].labels});const a=e(s);Object.keys(a).forEach(l=>{const u=a[l];t[s][l]=o(u),t[s][l].raw=r(u)})}),Qbe=t,Qbe}var Jbe,sht;function q$n(){if(sht)return Jbe;sht=1;const n=V$n(),e=Y$n(),t=["keyword","gray","hex"],i={};for(const h of Object.keys(e))i[[...e[h].labels].sort().join("")]=h;const r={};function o(h,p){if(!(this instanceof o))return new o(h,p);if(p&&p in t&&(p=null),p&&!(p in e))throw new Error("Unknown model: "+p);let m,_;if(h==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(h instanceof o)this.model=h.model,this.color=[...h.color],this.valpha=h.valpha;else if(typeof h=="string"){const y=n.get(h);if(y===null)throw new Error("Unable to parse color from string: "+h);this.model=y.model,_=e[this.model].channels,this.color=y.value.slice(0,_),this.valpha=typeof y.value[_]=="number"?y.value[_]:1}else if(h.length>0){this.model=p||"rgb",_=e[this.model].channels;const y=Array.prototype.slice.call(h,0,_);this.color=d(y,_),this.valpha=typeof h[_]=="number"?h[_]:1}else if(typeof h=="number")this.model="rgb",this.color=[h>>16&255,h>>8&255,h&255],this.valpha=1;else{this.valpha=1;const y=Object.keys(h);"alpha"in h&&(y.splice(y.indexOf("alpha"),1),this.valpha=typeof h.alpha=="number"?h.alpha:0);const x=y.sort().join("");if(!(x in i))throw new Error("Unable to parse color from object: "+JSON.stringify(h));this.model=i[x];const{labels:b}=e[this.model],w=[];for(m=0;m<b.length;m++)w.push(h[b[m]]);this.color=d(w)}if(r[this.model])for(_=e[this.model].channels,m=0;m<_;m++){const y=r[this.model][m];y&&(this.color[m]=y(this.color[m]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(h){let p=this.model in n.to?this:this.rgb();p=p.round(typeof h=="number"?h:1);const m=p.valpha===1?p.color:[...p.color,this.valpha];return n.to[p.model](m)},percentString(h){const p=this.rgb().round(typeof h=="number"?h:1),m=p.valpha===1?p.color:[...p.color,this.valpha];return n.to.rgb.percent(m)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const h={},{channels:p}=e[this.model],{labels:m}=e[this.model];for(let _=0;_<p;_++)h[m[_]]=this.color[_];return this.valpha!==1&&(h.alpha=this.valpha),h},unitArray(){const h=this.rgb().color;return h[0]/=255,h[1]/=255,h[2]/=255,this.valpha!==1&&h.push(this.valpha),h},unitObject(){const h=this.rgb().object();return h.r/=255,h.g/=255,h.b/=255,this.valpha!==1&&(h.alpha=this.valpha),h},round(h){return h=Math.max(h||0,0),new o([...this.color.map(a(h)),this.valpha],this.model)},alpha(h){return h!==void 0?new o([...this.color,Math.max(0,Math.min(1,h))],this.model):this.valpha},red:c("rgb",0,l(255)),green:c("rgb",1,l(255)),blue:c("rgb",2,l(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,h=>(h%360+360)%360),saturationl:c("hsl",1,l(100)),lightness:c("hsl",2,l(100)),saturationv:c("hsv",1,l(100)),value:c("hsv",2,l(100)),chroma:c("hcg",1,l(100)),gray:c("hcg",2,l(100)),white:c("hwb",1,l(100)),wblack:c("hwb",2,l(100)),cyan:c("cmyk",0,l(100)),magenta:c("cmyk",1,l(100)),yellow:c("cmyk",2,l(100)),black:c("cmyk",3,l(100)),x:c("xyz",0,l(95.047)),y:c("xyz",1,l(100)),z:c("xyz",2,l(108.833)),l:c("lab",0,l(100)),a:c("lab",1),b:c("lab",2),keyword(h){return h!==void 0?new o(h):e[this.model].keyword(this.color)},hex(h){return h!==void 0?new o(h):n.to.hex(this.rgb().round().color)},hexa(h){if(h!==void 0)return new o(h);const p=this.rgb().round().color;let m=Math.round(this.valpha*255).toString(16).toUpperCase();return m.length===1&&(m="0"+m),n.to.hex(p)+m},rgbNumber(){const h=this.rgb().color;return(h[0]&255)<<16|(h[1]&255)<<8|h[2]&255},luminosity(){const h=this.rgb().color,p=[];for(const[m,_]of h.entries()){const y=_/255;p[m]=y<=.04045?y/12.92:((y+.055)/1.055)**2.4}return .2126*p[0]+.7152*p[1]+.0722*p[2]},contrast(h){const p=this.luminosity(),m=h.luminosity();return p>m?(p+.05)/(m+.05):(m+.05)/(p+.05)},level(h){const p=this.contrast(h);return p>=7?"AAA":p>=4.5?"AA":""},isDark(){const h=this.rgb().color;return(h[0]*2126+h[1]*7152+h[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const h=this.rgb();for(let p=0;p<3;p++)h.color[p]=255-h.color[p];return h},lighten(h){const p=this.hsl();return p.color[2]+=p.color[2]*h,p},darken(h){const p=this.hsl();return p.color[2]-=p.color[2]*h,p},saturate(h){const p=this.hsl();return p.color[1]+=p.color[1]*h,p},desaturate(h){const p=this.hsl();return p.color[1]-=p.color[1]*h,p},whiten(h){const p=this.hwb();return p.color[1]+=p.color[1]*h,p},blacken(h){const p=this.hwb();return p.color[2]+=p.color[2]*h,p},grayscale(){const h=this.rgb().color,p=h[0]*.3+h[1]*.59+h[2]*.11;return o.rgb(p,p,p)},fade(h){return this.alpha(this.valpha-this.valpha*h)},opaquer(h){return this.alpha(this.valpha+this.valpha*h)},rotate(h){const p=this.hsl();let m=p.color[0];return m=(m+h)%360,m=m<0?360+m:m,p.color[0]=m,p},mix(h,p){if(!h||!h.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof h);const m=h.rgb(),_=this.rgb(),y=p===void 0?.5:p,x=2*y-1,b=m.alpha()-_.alpha(),w=((x*b===-1?x:(x+b)/(1+x*b))+1)/2,S=1-w;return o.rgb(w*m.red()+S*_.red(),w*m.green()+S*_.green(),w*m.blue()+S*_.blue(),m.alpha()*y+_.alpha()*(1-y))}};for(const h of Object.keys(e)){if(t.includes(h))continue;const{channels:p}=e[h];o.prototype[h]=function(...m){return this.model===h?new o(this):m.length>0?new o(m,h):new o([...u(e[this.model][h].raw(this.color)),this.valpha],h)},o[h]=function(...m){let _=m[0];return typeof _=="number"&&(_=d(m,p)),new o(_,h)}}function s(h,p){return Number(h.toFixed(p))}function a(h){return function(p){return s(p,h)}}function c(h,p,m){h=Array.isArray(h)?h:[h];for(const _ of h)(r[_]||(r[_]=[]))[p]=m;return h=h[0],function(_){let y;return _!==void 0?(m&&(_=m(_)),y=this[h](),y.color[p]=_,y):(y=this[h]().color[p],m&&(y=m(y)),y)}}function l(h){return function(p){return Math.max(0,Math.min(h,p))}}function u(h){return Array.isArray(h)?h:[h]}function d(h,p){for(let m=0;m<p;m++)typeof h[m]!="number"&&(h[m]=0);return h}return Jbe=o,Jbe}var X$n=q$n();const aht=qw(X$n);var cht={0:"M0.4544564813877358 0L0.2723441540828736 0.03592830447352719L0.1086847233315459 0.14528754990019965L0.020630545837255005 0.3040632652221331L0 0.5395277421960205L0.049259221760993496 0.7369487828466779L0.18080513776237842 0.9005494166306564L0.37036887043974215 0.9872116270037247L0.5864663759301132 1L0.8148695622827444 0.9332890276148733L0.9326583645506394 0.8113052246023419L1 0.4031281830668562L0.833288960385582 0.09886798567812842L0.6801767918233781 0.02483708485091681L0.4544564813877358 0",1:"M 0.198 0.272 L 0.537 0 L 0.54 1",2:"M0.069593147751606 0.19461498231706575L0.1039380353319058 0.1224291500164194L0.20543361884368308 0.05510832064153169L0.3717712794432549 0.009452970962689482L0.4785344452623127 0L0.663238590738758 0.008714098643339864L0.8017933618843684 0.04769189395915288L0.8775637379550322 0.10746757678258442L0.9047778372591005 0.17693069668193287L0.9029710920770878 0.2231347105796246L0.8704496788008566 0.30047744598157516L0.7292906538577354 0.4508486051631194L0.3737955032119913 0.7369006417749693L0 1L1 1",3:"M0.03917438899874637 0.19855364635107545L0.15510940508963084 0.06745632622133718L0.37598645522339846 0L0.8486391893813088 0.0652271323161611L0.9782182415054349 0.21747394183735683L0.9213133780517754 0.3547560290117714L0.6504271515903481 0.4543436297681271L0.22975249764129613 0.48476611625264143L0.7659038682744629 0.5411919558122493L0.9258712987734741 0.6203185665660985L1 0.7458360609169667L0.8938813281118737 0.9059190913045964L0.6166890258875837 1L0.261528440153542 0.9874861530507921L0 0.8837289530851273",4:"M0.7328897338403042 0L0 0.6684672518568535L1 0.6684672518568535M0.7243346007604563 0.4530722484807562L0.7243346007604563 1",5:"M 0 0 L 0 0.4973 L 0.4262 0.4319 L 0.7305 0.4565 L 0.8516 0.5009 L 0.9357 0.5639 L 1 0.7356 L 0.9696 0.8248 L 0.8898 0.895 L 0.733 0.9602 L 0.5518 0.9945 L 0.3814 1 L 0.2379 0.9821 L 0.1219 0.947 L 0 0.8748 M 0 0 L 1 0",6:"M0.6964601700926856 0L0.3639239026215478 0.0743562375769351L0.1415931962925719 0.21735490179786915L0.009977939399608712 0.46336322325406004L0.00029622007592593224 0.7083131475173043L0.09408885043224748 0.8746809149767036L0.3379247445101846 0.9876686500961888L0.7109203869569624 1L0.9260852957913362 0.9103558029693921L1 0.7716571969091733L0.9824294723385016 0.6390635485705886L0.7446504992867332 0.4733643097729175L0.31028858071607296 0.47578021640899115L0.1208702146816024 0.5481452483973847L0 0.6616669755788906",7:"M0 0L1 0L0.9246479649697582 0.030539772727272752L0.8850302419354837 0.05075757575757579L0.7922946068548385 0.11079545454545457L0.7419268208165322 0.15213068181818185L0.6907258064516127 0.20202020202020204L0.6400666267641127 0.26122159090909086L0.5913243447580644 0.33049242424242414L0.5458740234374998 0.4105902777777778L0.5050907258064514 0.5022727272727272L0.4703495148689514 0.6062973484848484L0.43257456133442534 0.787133049242424L0.41612903225806447 1",8:"M0.5143001078924863 0L0.16007477667923162 0.10731570786949331L0.14924628550868277 0.3146018498698755L0.2939585848842112 0.41617921794558677L0.8648302624811545 0.5385163833653317L1 0.7775820770511038L0.8180842915260376 0.9505845566922285L0.41968938540525413 1L0.08062381919779889 0.882831681184498L0 0.6936376947135333L0.17150171673893433 0.5188652309607817L0.6529263782780712 0.4242818653203618L0.8650205888491803 0.29644027376796367L0.8702067371119496 0.09910067291661573L0.5143001078924863 0",9:"M1 0.25379591792994305L0.9514789771111742 0.11679361536614272L0.8702482473521467 0.05711741614054847L0.7327445265851579 0.015213872471965633L0.525248180711544 0L0.3292056884418538 0.012928195113745608L0.15997632037247655 0.058762870026191856L0.05266940041228321 0.12882439350476L0 0.2562067822770946L0.11316462894512366 0.4121335905917837L0.2403060136479954 0.4603365890068938L0.4097241967586011 0.4745978388276783L0.8642414300184816 0.420815170259988L0.9732054796346318 0.34537434075898393L1 0.25379591792994305M0.9647426784191072 0.35488595400360495L0.4756895081034974 1",A:"M0 1L0.4808333333333333 0L1 1M0.24250000000000002 0.6099439775910365L0.7341666666666666 0.6099439775910365",B:"M0 1L0 0.0117369978777208L0.30665717153513444 0L0.5874522807082946 0.03451403469442413L0.7766202217193218 0.15033936404895643L0.7471969743588041 0.31967962568332936L0.5246013359741988 0.4102978954282461L0.04378745314885416 0.44918617613783574L0.5112949594180156 0.469692928091109L0.8540266515643348 0.5552749498651879L1 0.6868463175009967L0.9880091196159324 0.8570018204672155L0.922301719975498 0.9321708046604659L0.7584266951758925 0.9932594737131338L0 1",C:"M1 0.23038928858890784L0.9328355511865092 0.12426412616785204L0.8096380839483327 0.04912601676267708L0.5763225801788256 0L0.4039037709527492 0.015028068281399815L0.2519579390951737 0.06533979308999706L0.10359458463139784 0.18146243506591617L0 0.4862728453971315L0.08129580872733055 0.792689266886982L0.20257034847159672 0.9160822255736587L0.3286572892798542 0.9738230826074175L0.5742878414421707 1L0.7883510303801312 0.9665431511195721L0.946851033994232 0.8689071500976585L1 0.7311049027121912",D:"M0 1L0.015604366822624637 0.020770988281483303L0.22564758265176144 0L0.3865476147957666 0.0024153386496795644L0.6479126635475078 0.051745644338731314L0.841191887805517 0.15827717679529366L0.9517008345536152 0.30172260586872185L0.9957536578687336 0.4504541551987709L1 0.5624359222498485L0.9798483279164735 0.6584121775234548L0.9386273319285215 0.7395945263504481L0.806292129480815 0.8624239259880274L0.6296239151398265 0.9406169638094516L0.3397492767598845 0.9954164354263132L0 1",E:"M0 0L0 1M0 0L1 0M0 0.5L0.7 0.5M0 1L1 1",F:"M0 0L0 1M0.011363636363636364 0.006802721088435374L1 0.006802721088435374M0.011363636363636364 0.4965986394557823L0.8409090909090909 0.4965986394557823",G:"M0.902666857540557 0.03860785012651126L0.6504261864675637 0L0.3838947267237336 0.015442305268228053L0.21293332876776194 0.07706794377239819L0.07799659974941617 0.1994951236187481L0 0.46380381528937314L0.04159964421546915 0.7502491408002389L0.13176692977834842 0.8535497868383203L0.2709176262273927 0.936767572377719L0.4386472596876406 0.9891638569283179L0.6145513562841309 1L0.7782254421419019 0.9585373611026471L0.9092650433859927 0.8540372997461425L1 0.5556012645283437L0.5583959277303046 0.55491741080559",H:"M0 0L0 1M0 0.4788732394366197L0.989010989010989 0.4788732394366197M1 0L1 1",I:"M0.5 0L0.5 1",J:"M0.9976457238788704 0L1 0.7396412315872798L0.9773931362096968 0.8322033314977973L0.9345115952458736 0.882296255506608L0.8743862896259549 0.9221331222466961L0.8024024079884948 0.9526431718061675L0.6443996712151668 0.9893997797356828L0.5035848940343224 1L0.3127211130319937 0.9877004749449337L0.17201910858386513 0.9539509911894274L0.10357419806379677 0.9212555066079295L0.053656568662899015 0.8816079295154184L0.020759483663648916 0.8360407488986785L0.003376206348523566 0.7855864537444934L0 0.7312775330396476",K:"M0 0L0 1M0.8787878787878788 0.06666666666666667L0 0.6148148148148148M0.3333333333333333 0.45925925925925926L1 0.9777777777777777",L:"M0 0L0 1L1 1",M:"M0 1L0 0L0.5 0.6512L1 0L1 1",N:"M0 1L0 0L1 1L0.9803729146221786 0",O:"M0.4718499217948183 1L0.2896765846490613 0.9606979309189402L0.12315162147934663 0.8411184486080473L0 0.4352399966492615L0.11730398524516283 0.13145645436014852L0.2612197451988078 0.04493357858878059L0.5104071592772554 0L0.7450113425917159 0.05393013710105273L0.882367950645524 0.15242300282020502L1 0.5224527406249126L0.9414597290654386 0.7560662329321755L0.8371289514446183 0.8910800547287298L0.6518259868433511 0.9830452628933628L0.4718499217948183 1",P:"M0 1L0 0.018871774228013626L0.29609603495819875 0L0.5609840637427541 0.011794858892508529L0.7332142696692472 0.04353904702296349L0.8102258645858864 0.0691965055027166L0.9330504315465442 0.14445061754775845L0.9876391714147118 0.22527816445836535L1 0.3434414070631638L0.9510549958116356 0.41772808046663146L0.8746646891596713 0.45879131862541683L0.7528523813396283 0.49171525113425024L0.5766919939969619 0.5153253033973054L0.33725744877712827 0.5284469008187558L0.025622667325582785 0.529905468802775",Q:"M0.4618887943546369 0.9755918167206952L0.28356128136544534 0.9372490397450218L0.12055179272160406 0.8205882753548176L0 0.4246165790405623L0.1148276047430244 0.12824784112887844L0.25570518844754375 0.043836831567190586L0.49963205786237674 0L0.7292835601228574 0.0526138004304122L0.8637404608452104 0.14870263423138746L0.9788892040030622 0.5097006183769648L0.9215847647858059 0.7376120297474734L0.8194564929275405 0.869330409436378L0.6380654214095985 0.9590509139448092L0.4618887943546369 0.9755918167206952M0.5824181120212351 0.6861805006946525L1 1",R:"M0 0.9928375167236815L0 0.02590227442068435L0.3611517274211098 0L0.6146286724700761 0.008660554424468435L0.7675462459194776 0.035269459580494614L0.831839975516866 0.056961676692569484L0.8847592491838954 0.08519560521497332L0.9238557535364527 0.120683646438422L0.9583303225312839 0.21691797435320384L0.955092470586235 0.3022616904894429L0.9198097669001631 0.3640573439322699L0.8564862239866702 0.40639258627024005L0.7691258543593579 0.43335506909190874L0.601775027203482 0.4539166070813109L0.023939064200217658 0.46997623755243123M0.5038084874863982 0.5108023922274467L1 1",S:"M0.8886929689221953 0.15146982162688968L0.7276173683050475 0.013780286031594946L0.34582323121005076 0L0.1318235250900008 0.09920162734298861L0.0444543935052531 0.2811287071349243L0.08064065829108809 0.3709571405906485L0.21603115127470426 0.4485505768228281L0.7525409135992945 0.5111160926769565L0.9330263665417677 0.5850732219351329L1 0.7129938124702524L0.9117772389978691 0.9130572743138187L0.6423187128058188 1L0.29586019579751677 0.9935291584506244L0.10638454191462794 0.9229845198431584L0 0.7570771288048773",T:"M0 0L1 0M0.5148514851485149 0L0.5148514851485149 1",U:"M0 0L0.0023103778751369115 0.5467447428390111L0.01823032542100219 0.6954785891481812L0.05895528135268338 0.8056480226151669L0.13703402031421133 0.8894445726483398L0.23918400876232196 0.9448524533417946L0.3917887458926616 0.9848674531975652L0.584341627875137 1L0.7194816196604602 0.9848501456716763L0.8303268115073934 0.9449411544119768L0.8966613970084885 0.898186315516197L0.9251437568455642 0.867453197565408L0.9687114937020809 0.7890904895145239L0.9890470974808324 0.6852857184065537L1 0.0014769088758762145",V:"M0 0L0.5348837209302325 1L1 0",W:"M0 0L0.23300090661831369 0.9873417721518988L0.49954669084315495 0.30081906180193585L0.7851314596554849 1L1 0.0215934475055845",X:"M0 0L0.9893617021276596 1M1 0L0.010638297872340425 1",Y:"M0 0L0.4860515021459227 0.44712562100780695M1 0.0014194464158977947L0.48927038626609437 0.44996451383960256L0.5075107296137339 1",Z:"M0 0L1 0L0 1L1 1",a:"M0.900 0.276L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",b:"M0.100 0.034L0.100 0.759M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",c:"M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",d:"M0.900 0.034L0.900 0.759M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",e:"M0.100 0.483L0.900 0.483M0.900 0.414L0.834 0.345L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",f:"M0.900 0.034L0.700 0.034L0.500 0.069L0.400 0.172L0.400 0.759M0.100 0.276L0.800 0.276",g:"M0.900 0.276L0.900 0.828L0.834 0.931L0.766 0.966L0.634 1.000L0.434 1.000L0.300 0.966L0.166 0.897L0.100 0.793M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",h:"M0.100 0.034L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",i:"M0.466 0.034L0.534 0.034M0.500 0.276L0.500 0.759",j:"M0.634 0.034L0.766 0.034M0.700 0.276L0.700 0.862L0.634 0.966L0.366 1.000L0.166 0.966",k:"M0.100 0.034L0.100 0.759M0.827 0.276L0.100 0.621M0.391 0.483L0.900 0.759",l:"M0.100 0.034L0.100 0.759",m:"M0.100 0.276L0.100 0.759M0.100 0.414L0.209 0.310L0.282 0.276L0.418 0.276L0.491 0.310L0.564 0.414L0.564 0.759M0.564 0.414L0.673 0.310L0.745 0.276L0.882 0.276L0.955 0.310L0.955 0.759",n:"M0.100 0.276L0.100 0.759M0.100 0.414L0.318 0.310L0.464 0.276L0.682 0.276L0.827 0.310L0.900 0.414L0.900 0.759",o:"M0.408 0.276L0.285 0.310L0.162 0.379L0.100 0.483L0.100 0.552L0.162 0.655L0.285 0.724L0.408 0.759L0.592 0.759L0.715 0.724L0.838 0.655L0.900 0.552L0.900 0.483L0.838 0.379L0.715 0.310L0.592 0.276L0.408 0.276",p:"M0.100 0.276L0.100 1.000M0.100 0.379L0.234 0.310L0.366 0.276L0.566 0.276L0.700 0.310L0.834 0.379L0.900 0.483L0.900 0.552L0.834 0.655L0.700 0.724L0.566 0.759L0.366 0.759L0.234 0.724L0.100 0.655",q:"M0.900 0.276L0.900 1.000M0.900 0.379L0.766 0.310L0.634 0.276L0.434 0.276L0.300 0.310L0.166 0.379L0.100 0.483L0.100 0.552L0.166 0.655L0.300 0.724L0.434 0.759L0.634 0.759L0.766 0.724L0.900 0.655",r:"M0.100 0.276L0.100 0.759M0.100 0.483L0.200 0.379L0.400 0.310L0.600 0.276L0.900 0.276",s:"M0.900 0.379L0.827 0.310L0.609 0.276L0.391 0.276L0.173 0.310L0.100 0.379L0.173 0.448L0.391 0.483L0.609 0.517L0.827 0.552L0.900 0.621L0.827 0.724L0.609 0.759L0.391 0.759L0.173 0.724L0.100 0.655",t:"M0.400 0.034L0.400 0.621L0.500 0.724L0.700 0.759L0.900 0.759M0.100 0.276L0.800 0.276",u:"M0.100 0.276L0.100 0.621L0.173 0.724L0.318 0.759L0.536 0.759L0.682 0.724L0.900 0.621M0.900 0.276L0.900 0.759",v:"M0.100 0.276L0.500 0.759M0.900 0.276L0.500 0.759",w:"M0.100 0.276L0.300 0.759M0.500 0.276L0.300 0.759M0.500 0.276L0.700 0.759M0.900 0.276L0.700 0.759",x:"M0.100 0.276L0.900 0.759M0.900 0.276L0.100 0.759",y:"M0.162 0.276L0.530 0.759M0.900 0.276L0.530 0.759L0.408 0.897L0.285 0.966L0.162 1.000L0.100 1.000",z:"M0.900 0.276L0.100 0.759M0.100 0.276L0.900 0.276M0.100 0.759L0.900 0.759",".":"M 0.49 1 L 0.41 1",",":"M0.55 0.85L0.45 0.95L0.5 1","*":"M 0.5 0.25 L 0.8 0.25 M 0.5 0.25 L 0.5927 0.4402 M 0.5 0.25 L 0.2573 0.3676 M 0.5 0.25 L 0.2573 0.1324 M 0.5 0.25 L 0.599 0.055","(":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",")":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","-":"M0 0.5L1 0.5","+":"M 0 0.5 L 1 0.5 M 0.5 0.125 L 0.5 0.875","=":"M0 0.25L1 0.25M0 0.75L1 0.75",_:"M0 1 L1 1","[":"M0.75 0L0.25 0L0.25 1L0.75 1","]":"M0.25 0L0.75 0L0.75 1L0.25 1","<":"M0.75 0L0.25 0.5L0.25 0.5L0.75 1",">":"M0.25 0L0.75 0.5L0.75 0.5L0.25 1","'":"M 0.5 0 L 0.5 0.5",'"':"M 0.25 0 L 0.25 0.5 M 0.75 0 L 0.75 0.5","/":"M0 1L1 0","\\":"M0 0L1 1"},YY={};for(const n in cht){YY[n]=[];const e=cht[n].split("M").slice(1).map(t=>t.split("L").map(i=>i.trim().split(" ").map(parseFloat)));for(const t of e)for(let i=0;i<t.length-1;i++)YY[n].push({x1:t[i][0],y1:1-t[i][1],x2:t[i+1][0],y2:1-t[i+1][1]})}function W$n(n){if(n.sheet)return n.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===n)return document.styleSheets[e]}function K$n(n){var e=document.createElement("style");return e.setAttribute("data-emotion",n.key),n.nonce!==void 0&&e.setAttribute("nonce",n.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Z$n=(function(){function n(t){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=t.speedy===void 0?!0:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=n.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(K$n(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=W$n(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},n})(),iv="-ms-",qY="-moz-",Gh="-webkit-",lht="comm",eve="rule",tve="decl",Q$n="@import",uht="@keyframes",J$n="@layer",eFn=Math.abs,XY=String.fromCharCode,tFn=Object.assign;function nFn(n,e){return bb(n,0)^45?(((e<<2^bb(n,0))<<2^bb(n,1))<<2^bb(n,2))<<2^bb(n,3):0}function dht(n){return n.trim()}function iFn(n,e){return(n=e.exec(n))?n[0]:n}function Yh(n,e,t){return n.replace(e,t)}function nve(n,e){return n.indexOf(e)}function bb(n,e){return n.charCodeAt(e)|0}function B8(n,e,t){return n.slice(e,t)}function zT(n){return n.length}function ive(n){return n.length}function WY(n,e){return e.push(n),n}function rFn(n,e){return n.map(e).join("")}var KY=1,nN=1,hht=0,bw=0,Jg=0,iN="";function ZY(n,e,t,i,r,o,s){return{value:n,root:e,parent:t,type:i,props:r,children:o,line:KY,column:nN,length:s,return:""}}function j8(n,e){return tFn(ZY("",null,null,"",null,null,0),n,{length:-n.length},e)}function oFn(){return Jg}function sFn(){return Jg=bw>0?bb(iN,--bw):0,nN--,Jg===10&&(nN=1,KY--),Jg}function yS(){return Jg=bw<hht?bb(iN,bw++):0,nN++,Jg===10&&(nN=1,KY++),Jg}function $T(){return bb(iN,bw)}function QY(){return bw}function H8(n,e){return B8(iN,n,e)}function V8(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pht(n){return KY=nN=1,hht=zT(iN=n),bw=0,[]}function fht(n){return iN="",n}function JY(n){return dht(H8(bw-1,rve(n===91?n+2:n===40?n+1:n)))}function aFn(n){for(;(Jg=$T())&&Jg<33;)yS();return V8(n)>2||V8(Jg)>3?"":" "}function cFn(n,e){for(;--e&&yS()&&!(Jg<48||Jg>102||Jg>57&&Jg<65||Jg>70&&Jg<97););return H8(n,QY()+(e<6&&$T()==32&&yS()==32))}function rve(n){for(;yS();)switch(Jg){case n:return bw;case 34:case 39:n!==34&&n!==39&&rve(Jg);break;case 40:n===41&&rve(n);break;case 92:yS();break}return bw}function lFn(n,e){for(;yS()&&n+Jg!==57;)if(n+Jg===84&&$T()===47)break;return"/*"+H8(e,bw-1)+"*"+XY(n===47?n:yS())}function uFn(n){for(;!V8($T());)yS();return H8(n,bw)}function dFn(n){return fht(eq("",null,null,null,[""],n=pht(n),0,[0],n))}function eq(n,e,t,i,r,o,s,a,c){for(var l=0,u=0,d=s,h=0,p=0,m=0,_=1,y=1,x=1,b=0,w="",S=r,k=o,A=i,R=w;y;)switch(m=b,b=yS()){case 40:if(m!=108&&bb(R,d-1)==58){nve(R+=Yh(JY(b),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:R+=JY(b);break;case 9:case 10:case 13:case 32:R+=aFn(m);break;case 92:R+=cFn(QY()-1,7);continue;case 47:switch($T()){case 42:case 47:WY(hFn(lFn(yS(),QY()),e,t),c);break;default:R+="/"}break;case 123*_:a[l++]=zT(R)*x;case 125*_:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:x==-1&&(R=Yh(R,/\f/g,"")),p>0&&zT(R)-d&&WY(p>32?_ht(R+";",i,t,d-1):_ht(Yh(R," ","")+";",i,t,d-2),c);break;case 59:R+=";";default:if(WY(A=mht(R,e,t,l,u,r,a,w,S=[],k=[],d),o),b===123)if(u===0)eq(R,e,A,A,S,o,d,a,k);else switch(h===99&&bb(R,3)===110?100:h){case 100:case 108:case 109:case 115:eq(n,A,A,i&&WY(mht(n,A,A,0,0,r,a,w,r,S=[],d),k),r,k,d,a,i?S:k);break;default:eq(R,A,A,A,[""],k,0,a,k)}}l=u=p=0,_=x=1,w=R="",d=s;break;case 58:d=1+zT(R),p=m;default:if(_<1){if(b==123)--_;else if(b==125&&_++==0&&sFn()==125)continue}switch(R+=XY(b),b*_){case 38:x=u>0?1:(R+="\f",-1);break;case 44:a[l++]=(zT(R)-1)*x,x=1;break;case 64:$T()===45&&(R+=JY(yS())),h=$T(),u=d=zT(w=R+=uFn(QY())),b++;break;case 45:m===45&&zT(R)==2&&(_=0)}}return o}function mht(n,e,t,i,r,o,s,a,c,l,u){for(var d=r-1,h=r===0?o:[""],p=ive(h),m=0,_=0,y=0;m<i;++m)for(var x=0,b=B8(n,d+1,d=eFn(_=s[m])),w=n;x<p;++x)(w=dht(_>0?h[x]+" "+b:Yh(b,/&\f/g,h[x])))&&(c[y++]=w);return ZY(n,e,t,r===0?eve:a,c,l,u)}function hFn(n,e,t){return ZY(n,e,t,lht,XY(oFn()),B8(n,2,-2),0)}function _ht(n,e,t,i){return ZY(n,e,t,tve,B8(n,0,i),B8(n,i+1,-1),i)}function rN(n,e){for(var t="",i=ive(n),r=0;r<i;r++)t+=e(n[r],r,n,e)||"";return t}function pFn(n,e,t,i){switch(n.type){case J$n:if(n.children.length)break;case Q$n:case tve:return n.return=n.return||n.value;case lht:return"";case uht:return n.return=n.value+"{"+rN(n.children,i)+"}";case eve:n.value=n.props.join(",")}return zT(t=rN(n.children,i))?n.return=n.value+"{"+t+"}":""}function fFn(n){var e=ive(n);return function(t,i,r,o){for(var s="",a=0;a<e;a++)s+=n[a](t,i,r,o)||"";return s}}function mFn(n){return function(e){e.root||(e=e.return)&&n(e)}}function _Fn(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var yFn=function(e,t,i){for(var r=0,o=0;r=o,o=$T(),r===38&&o===12&&(t[i]=1),!V8(o);)yS();return H8(e,bw)},gFn=function(e,t){var i=-1,r=44;do switch(V8(r)){case 0:r===38&&$T()===12&&(t[i]=1),e[i]+=yFn(bw-1,t,i);break;case 2:e[i]+=JY(r);break;case 4:if(r===44){e[++i]=$T()===58?"&\f":"",t[i]=e[i].length;break}default:e[i]+=XY(r)}while(r=yS());return e},xFn=function(e,t){return fht(gFn(pht(e),t))},yht=new WeakMap,bFn=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!yht.get(i))&&!r){yht.set(e,!0);for(var o=[],s=xFn(t,o),a=i.props,c=0,l=0;c<s.length;c++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[c]?s[c].replace(/&\f/g,a[u]):a[u]+" "+s[c]}}},vFn=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};function ght(n,e){switch(nFn(n,e)){case 5103:return Gh+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gh+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return Gh+n+qY+n+iv+n+n;case 6828:case 4268:return Gh+n+iv+n+n;case 6165:return Gh+n+iv+"flex-"+n+n;case 5187:return Gh+n+Yh(n,/(\w+).+(:[^]+)/,Gh+"box-$1$2"+iv+"flex-$1$2")+n;case 5443:return Gh+n+iv+"flex-item-"+Yh(n,/flex-|-self/,"")+n;case 4675:return Gh+n+iv+"flex-line-pack"+Yh(n,/align-content|flex-|-self/,"")+n;case 5548:return Gh+n+iv+Yh(n,"shrink","negative")+n;case 5292:return Gh+n+iv+Yh(n,"basis","preferred-size")+n;case 6060:return Gh+"box-"+Yh(n,"-grow","")+Gh+n+iv+Yh(n,"grow","positive")+n;case 4554:return Gh+Yh(n,/([^-])(transform)/g,"$1"+Gh+"$2")+n;case 6187:return Yh(Yh(Yh(n,/(zoom-|grab)/,Gh+"$1"),/(image-set)/,Gh+"$1"),n,"")+n;case 5495:case 3959:return Yh(n,/(image-set\([^]*)/,Gh+"$1$`$1");case 4968:return Yh(Yh(n,/(.+:)(flex-)?(.*)/,Gh+"box-pack:$3"+iv+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gh+n+n;case 4095:case 3583:case 4068:case 2532:return Yh(n,/(.+)-inline(.+)/,Gh+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(zT(n)-1-e>6)switch(bb(n,e+1)){case 109:if(bb(n,e+4)!==45)break;case 102:return Yh(n,/(.+:)(.+)-([^]+)/,"$1"+Gh+"$2-$3$1"+qY+(bb(n,e+3)==108?"$3":"$2-$3"))+n;case 115:return~nve(n,"stretch")?ght(Yh(n,"stretch","fill-available"),e)+n:n}break;case 4949:if(bb(n,e+1)!==115)break;case 6444:switch(bb(n,zT(n)-3-(~nve(n,"!important")&&10))){case 107:return Yh(n,":",":"+Gh)+n;case 101:return Yh(n,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Gh+(bb(n,14)===45?"inline-":"")+"box$3$1"+Gh+"$2$3$1"+iv+"$2box$3")+n}break;case 5936:switch(bb(n,e+11)){case 114:return Gh+n+iv+Yh(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return Gh+n+iv+Yh(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return Gh+n+iv+Yh(n,/[svh]\w+-[tblr]{2}/,"lr")+n}return Gh+n+iv+n+n}return n}var wFn=function(e,t,i,r){if(e.length>-1&&!e.return)switch(e.type){case tve:e.return=ght(e.value,e.length);break;case uht:return rN([j8(e,{value:Yh(e.value,"@","@"+Gh)})],r);case eve:if(e.length)return rFn(e.props,function(o){switch(iFn(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return rN([j8(e,{props:[Yh(o,/:(read-\w+)/,":"+qY+"$1")]})],r);case"::placeholder":return rN([j8(e,{props:[Yh(o,/:(plac\w+)/,":"+Gh+"input-$1")]}),j8(e,{props:[Yh(o,/:(plac\w+)/,":"+qY+"$1")]}),j8(e,{props:[Yh(o,/:(plac\w+)/,iv+"input-$1")]})],r)}return""})}},SFn=[wFn],EFn=function(e){var t=e.key;if(t==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(_){var y=_.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var r=e.stylisPlugins||SFn,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(_){for(var y=_.getAttribute("data-emotion").split(" "),x=1;x<y.length;x++)o[y[x]]=!0;a.push(_)});var c,l=[bFn,vFn];{var u,d=[pFn,mFn(function(_){u.insert(_)})],h=fFn(l.concat(r,d)),p=function(y){return rN(dFn(y),h)};c=function(y,x,b,w){u=b,p(y?y+"{"+x.styles+"}":x.styles),w&&(m.inserted[x.name]=!0)}}var m={key:t,sheet:new Z$n({key:t,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:c};return m.sheet.hydrate(a),m};function TFn(n){for(var e=0,t,i=0,r=n.length;r>=4;++i,r-=4)t=n.charCodeAt(i)&255|(n.charCodeAt(++i)&255)<<8|(n.charCodeAt(++i)&255)<<16|(n.charCodeAt(++i)&255)<<24,t=(t&65535)*1540483477+((t>>>16)*59797<<16),t^=t>>>24,e=(t&65535)*1540483477+((t>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(n.charCodeAt(i+2)&255)<<16;case 2:e^=(n.charCodeAt(i+1)&255)<<8;case 1:e^=n.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var MFn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},CFn=/[A-Z]|^ms/g,AFn=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xht=function(e){return e.charCodeAt(1)===45},bht=function(e){return e!=null&&typeof e!="boolean"},ove=_Fn(function(n){return xht(n)?n:n.replace(CFn,"-$&").toLowerCase()}),vht=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(AFn,function(i,r,o){return yC={name:r,styles:o,next:yC},r})}return MFn[e]!==1&&!xht(e)&&typeof t=="number"&&t!==0?t+"px":t};function tq(n,e,t){if(t==null)return"";var i=t;if(i.__emotion_styles!==void 0)return i;switch(typeof t){case"boolean":return"";case"object":{var r=t;if(r.anim===1)return yC={name:r.name,styles:r.styles,next:yC},r.name;var o=t;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)yC={name:s.name,styles:s.styles,next:yC},s=s.next;var a=o.styles+";";return a}return PFn(n,e,t)}}var c=t;if(e==null)return c;var l=e[c];return l!==void 0?l:c}function PFn(n,e,t){var i="";if(Array.isArray(t))for(var r=0;r<t.length;r++)i+=tq(n,e,t[r])+";";else for(var o in t){var s=t[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":bht(a)&&(i+=ove(o)+":"+vht(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var c=0;c<s.length;c++)bht(s[c])&&(i+=ove(o)+":"+vht(o,s[c])+";");else{var l=tq(n,e,s);switch(o){case"animation":case"animationName":{i+=ove(o)+":"+l+";";break}default:i+=o+"{"+l+"}"}}}return i}var wht=/label:\s*([^\s;{]+)\s*(;|$)/g,yC;function sve(n,e,t){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var i=!0,r="";yC=void 0;var o=n[0];if(o==null||o.raw===void 0)i=!1,r+=tq(t,e,o);else{var s=o;r+=s[0]}for(var a=1;a<n.length;a++)if(r+=tq(t,e,n[a]),i){var c=o;r+=c[a]}wht.lastIndex=0;for(var l="",u;(u=wht.exec(r))!==null;)l+="-"+u[1];var d=TFn(r)+l;return{name:d,styles:r,next:yC}}function Sht(n,e,t){var i="";return t.split(" ").forEach(function(r){n[r]!==void 0?e.push(n[r]+";"):r&&(i+=r+" ")}),i}var RFn=function(e,t,i){var r=e.key+"-"+t.name;e.registered[r]===void 0&&(e.registered[r]=t.styles)},IFn=function(e,t,i){RFn(e,t);var r=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Eht(n,e){if(n.inserted[e.name]===void 0)return n.insert("",e,n.sheet,!0)}function Tht(n,e,t){var i=[],r=Sht(n,i,t);return i.length<2?t:r+e(i)}var NFn=function(e){var t=EFn(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=sve(l,t.registered,void 0);return IFn(t,d),t.key+"-"+d.name},r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=sve(l,t.registered),h="animation-"+d.name;return Eht(t,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=sve(l,t.registered);Eht(t,d)},s=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return Tht(t.registered,i,kFn(l))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(c){c.forEach(function(l){t.inserted[l]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Sht.bind(null,t.registered),merge:Tht.bind(null,t.registered,i)}},kFn=function n(e){for(var t="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=n(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(t&&(t+=" "),t+=o)}}return t},OFn=NFn({key:"css"}),oN=OFn.css,LFn=Object.create,Mht=Object.defineProperty,DFn=Object.getOwnPropertyDescriptor,Cht=Object.getOwnPropertyNames,zFn=Object.getPrototypeOf,$Fn=Object.prototype.hasOwnProperty,bh=(n,e)=>function(){return e||(0,n[Cht(n)[0]])((e={exports:{}}).exports,e),e.exports},FFn=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Cht(e))!$Fn.call(n,r)&&r!==t&&Mht(n,r,{get:()=>e[r],enumerable:!(i=DFn(e,r))||i.enumerable});return n},Aht=(n,e,t)=>(t=n!=null?LFn(zFn(n)):{},FFn(Mht(t,"default",{value:n,enumerable:!0}),n)),UFn=bh({"node_modules/svgson/dist/svgson.umd.js"(n,e){(function(t,i){typeof n=="object"&&typeof e<"u"?e.exports=i():typeof define=="function"&&define.amd?define(i):(t=typeof globalThis<"u"?globalThis:t||self,t.svgson=i())})(n,function(){var t=function(oe){return oe!=null&&(i(oe)||r(oe)||!!oe._isBuffer)};function i(oe){return!!oe.constructor&&typeof oe.constructor.isBuffer=="function"&&oe.constructor.isBuffer(oe)}function r(oe){return typeof oe.readFloatLE=="function"&&typeof oe.slice=="function"&&i(oe.slice(0,0))}var o=Object.prototype.toString,s=function(ae){if(typeof ae>"u")return"undefined";if(ae===null)return"null";if(ae===!0||ae===!1||ae instanceof Boolean)return"boolean";if(typeof ae=="string"||ae instanceof String)return"string";if(typeof ae=="number"||ae instanceof Number)return"number";if(typeof ae=="function"||ae instanceof Function)return"function";if(typeof Array.isArray<"u"&&Array.isArray(ae))return"array";if(ae instanceof RegExp)return"regexp";if(ae instanceof Date)return"date";var de=o.call(ae);return de==="[object RegExp]"?"regexp":de==="[object Date]"?"date":de==="[object Arguments]"?"arguments":de==="[object Error]"?"error":t(ae)?"buffer":de==="[object Set]"?"set":de==="[object WeakSet]"?"weakset":de==="[object Map]"?"map":de==="[object WeakMap]"?"weakmap":de==="[object Symbol]"?"symbol":de==="[object Int8Array]"?"int8array":de==="[object Uint8Array]"?"uint8array":de==="[object Uint8ClampedArray]"?"uint8clampedarray":de==="[object Int16Array]"?"int16array":de==="[object Uint16Array]"?"uint16array":de==="[object Int32Array]"?"int32array":de==="[object Uint32Array]"?"uint32array":de==="[object Float32Array]"?"float32array":de==="[object Float64Array]"?"float64array":"object"};function a(oe,ae){return ae={exports:{}},oe(ae,ae.exports),ae.exports}var c=a(function(oe){(function(){function ae(de,Te){if(typeof Te!="function")return de;var Ce={};for(var Oe in de)Object.prototype.hasOwnProperty.call(de,Oe)&&(Ce[Te(Oe,de[Oe])||Oe]=de[Oe]);return Ce}oe.exports?oe.exports=ae:window.rename=ae})()}),l=function oe(ae,de){var Te=s(ae);if(Te!=="object"&&Te!=="array")throw new Error("expected an object");var Ce=[];Te==="object"&&(ae=c(ae,de),Ce={});for(var Oe in ae)if(ae.hasOwnProperty(Oe)){var $e=ae[Oe];s($e)==="object"||s($e)==="array"?Ce[Oe]=oe($e,de):Ce[Oe]=$e}return Ce},u=a(function(oe){var ae=Object.prototype.hasOwnProperty,de="~";function Te(){}Object.create&&(Te.prototype=Object.create(null),new Te().__proto__||(de=!1));function Ce($e,Ae,se){this.fn=$e,this.context=Ae,this.once=se||!1}function Oe(){this._events=new Te,this._eventsCount=0}Oe.prototype.eventNames=function(){var Ae=[],se,Se;if(this._eventsCount===0)return Ae;for(Se in se=this._events)ae.call(se,Se)&&Ae.push(de?Se.slice(1):Se);return Object.getOwnPropertySymbols?Ae.concat(Object.getOwnPropertySymbols(se)):Ae},Oe.prototype.listeners=function(Ae,se){var Se=de?de+Ae:Ae,xe=this._events[Se];if(se)return!!xe;if(!xe)return[];if(xe.fn)return[xe.fn];for(var Ve=0,tt=xe.length,ct=new Array(tt);Ve<tt;Ve++)ct[Ve]=xe[Ve].fn;return ct},Oe.prototype.emit=function(Ae,se,Se,xe,Ve,tt){var ct=de?de+Ae:Ae;if(!this._events[ct])return!1;var Me=this._events[ct],Qe=arguments.length,Xe,Ge;if(Me.fn){switch(Me.once&&this.removeListener(Ae,Me.fn,void 0,!0),Qe){case 1:return Me.fn.call(Me.context),!0;case 2:return Me.fn.call(Me.context,se),!0;case 3:return Me.fn.call(Me.context,se,Se),!0;case 4:return Me.fn.call(Me.context,se,Se,xe),!0;case 5:return Me.fn.call(Me.context,se,Se,xe,Ve),!0;case 6:return Me.fn.call(Me.context,se,Se,xe,Ve,tt),!0}for(Ge=1,Xe=new Array(Qe-1);Ge<Qe;Ge++)Xe[Ge-1]=arguments[Ge];Me.fn.apply(Me.context,Xe)}else{var et=Me.length,De;for(Ge=0;Ge<et;Ge++)switch(Me[Ge].once&&this.removeListener(Ae,Me[Ge].fn,void 0,!0),Qe){case 1:Me[Ge].fn.call(Me[Ge].context);break;case 2:Me[Ge].fn.call(Me[Ge].context,se);break;case 3:Me[Ge].fn.call(Me[Ge].context,se,Se);break;case 4:Me[Ge].fn.call(Me[Ge].context,se,Se,xe);break;default:if(!Xe)for(De=1,Xe=new Array(Qe-1);De<Qe;De++)Xe[De-1]=arguments[De];Me[Ge].fn.apply(Me[Ge].context,Xe)}}return!0},Oe.prototype.on=function(Ae,se,Se){var xe=new Ce(se,Se||this),Ve=de?de+Ae:Ae;return this._events[Ve]?this._events[Ve].fn?this._events[Ve]=[this._events[Ve],xe]:this._events[Ve].push(xe):(this._events[Ve]=xe,this._eventsCount++),this},Oe.prototype.once=function(Ae,se,Se){var xe=new Ce(se,Se||this,!0),Ve=de?de+Ae:Ae;return this._events[Ve]?this._events[Ve].fn?this._events[Ve]=[this._events[Ve],xe]:this._events[Ve].push(xe):(this._events[Ve]=xe,this._eventsCount++),this},Oe.prototype.removeListener=function(Ae,se,Se,xe){var Ve=de?de+Ae:Ae;if(!this._events[Ve])return this;if(!se)return--this._eventsCount===0?this._events=new Te:delete this._events[Ve],this;var tt=this._events[Ve];if(tt.fn)tt.fn===se&&(!xe||tt.once)&&(!Se||tt.context===Se)&&(--this._eventsCount===0?this._events=new Te:delete this._events[Ve]);else{for(var ct=0,Me=[],Qe=tt.length;ct<Qe;ct++)(tt[ct].fn!==se||xe&&!tt[ct].once||Se&&tt[ct].context!==Se)&&Me.push(tt[ct]);Me.length?this._events[Ve]=Me.length===1?Me[0]:Me:--this._eventsCount===0?this._events=new Te:delete this._events[Ve]}return this},Oe.prototype.removeAllListeners=function(Ae){var se;return Ae?(se=de?de+Ae:Ae,this._events[se]&&(--this._eventsCount===0?this._events=new Te:delete this._events[se])):(this._events=new Te,this._eventsCount=0),this},Oe.prototype.off=Oe.prototype.removeListener,Oe.prototype.addListener=Oe.prototype.on,Oe.prototype.setMaxListeners=function(){return this},Oe.prefixed=de,Oe.EventEmitter=Oe,oe.exports=Oe});function d(oe,ae,de){return ae in oe?Object.defineProperty(oe,ae,{value:de,enumerable:!0,configurable:!0,writable:!0}):oe[ae]=de,oe}var h=function(){},p={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},m={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},_={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},y={" ":m.space," ":m.space,"\n":m.space,"\r":m.space,"<":m.lt,">":m.gt,'"':m.quote,"'":m.quote,"=":m.equal,"/":m.slash},x=function(ae){return y[ae]||m.char},b=function(ae){var de,Te,Ce,Oe,$e,Ae,se,Se,xe,Ve;ae=Object.assign({debug:!1},ae);var tt=new u,ct=p.data,Me="",Qe="",Xe="",Ge="",et="",De="",ke=function(We,nt){if(!(Qe[0]==="?"||Qe[0]==="!")){var mt={type:We,value:nt};ae.debug&&console.log("emit:",mt),tt.emit("data",mt)}};tt.stateMachine=(Ve={},d(Ve,p.data,(de={},d(de,m.lt,function(){Me.trim()&&ke(_.text,Me),Qe="",et=!1,ct=p.tagBegin}),d(de,m.char,function(Le){Me+=Le}),de)),d(Ve,p.cdata,d({},m.char,function(Le){Me+=Le,Me.substr(-3)==="]]>"&&(ke(_.text,Me.slice(0,-3)),Me="",ct=p.data)})),d(Ve,p.tagBegin,(Te={},d(Te,m.space,h),d(Te,m.char,function(Le){Qe=Le,ct=p.tagName}),d(Te,m.slash,function(){Qe="",et=!0}),Te)),d(Ve,p.tagName,(Ce={},d(Ce,m.space,function(){et?ct=p.tagEnd:(ct=p.attributeNameStart,ke(_.openTag,Qe))}),d(Ce,m.gt,function(){ke(et?_.closeTag:_.openTag,Qe),Me="",ct=p.data}),d(Ce,m.slash,function(){ct=p.tagEnd,ke(_.openTag,Qe)}),d(Ce,m.char,function(Le){Qe+=Le,Qe==="![CDATA["&&(ct=p.cdata,Me="",Qe="")}),Ce)),d(Ve,p.tagEnd,(Oe={},d(Oe,m.gt,function(){ke(_.closeTag,Qe),Me="",ct=p.data}),d(Oe,m.char,h),Oe)),d(Ve,p.attributeNameStart,($e={},d($e,m.char,function(Le){Xe=Le,ct=p.attributeName}),d($e,m.gt,function(){Me="",ct=p.data}),d($e,m.space,h),d($e,m.slash,function(){et=!0,ct=p.tagEnd}),$e)),d(Ve,p.attributeName,(Ae={},d(Ae,m.space,function(){ct=p.attributeNameEnd}),d(Ae,m.equal,function(){ke(_.attributeName,Xe),ct=p.attributeValueBegin}),d(Ae,m.gt,function(){Ge="",ke(_.attributeName,Xe),ke(_.attributeValue,Ge),Me="",ct=p.data}),d(Ae,m.slash,function(){et=!0,Ge="",ke(_.attributeName,Xe),ke(_.attributeValue,Ge),ct=p.tagEnd}),d(Ae,m.char,function(Le){Xe+=Le}),Ae)),d(Ve,p.attributeNameEnd,(se={},d(se,m.space,h),d(se,m.equal,function(){ke(_.attributeName,Xe),ct=p.attributeValueBegin}),d(se,m.gt,function(){Ge="",ke(_.attributeName,Xe),ke(_.attributeValue,Ge),Me="",ct=p.data}),d(se,m.char,function(Le){Ge="",ke(_.attributeName,Xe),ke(_.attributeValue,Ge),Xe=Le,ct=p.attributeName}),se)),d(Ve,p.attributeValueBegin,(Se={},d(Se,m.space,h),d(Se,m.quote,function(Le){De=Le,Ge="",ct=p.attributeValue}),d(Se,m.gt,function(){Ge="",ke(_.attributeValue,Ge),Me="",ct=p.data}),d(Se,m.char,function(Le){De="",Ge=Le,ct=p.attributeValue}),Se)),d(Ve,p.attributeValue,(xe={},d(xe,m.space,function(Le){De?Ge+=Le:(ke(_.attributeValue,Ge),ct=p.attributeNameStart)}),d(xe,m.quote,function(Le){De===Le?(ke(_.attributeValue,Ge),ct=p.attributeNameStart):Ge+=Le}),d(xe,m.gt,function(Le){De?Ge+=Le:(ke(_.attributeValue,Ge),Me="",ct=p.data)}),d(xe,m.slash,function(Le){De?Ge+=Le:(ke(_.attributeValue,Ge),et=!0,ct=p.tagEnd)}),d(xe,m.char,function(Le){Ge+=Le}),xe)),Ve);var qe=function(We){ae.debug&&console.log(ct,We);var nt=tt.stateMachine[ct],mt=nt[x(We)]||nt[m.error]||nt[m.char];mt(We)};return tt.write=function(Le){for(var We=Le.length,nt=0;nt<We;nt++)qe(Le[nt])},tt},w={State:p,Action:m,Type:_,create:b},S=w.Type,k={element:"element",text:"text"},A=function(ae){return Object.assign({name:"",type:k.element,value:"",parent:null,attributes:{},children:[]},ae)},R=function(ae){ae=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},ae);var de=void 0,Te=void 0,Ce=void 0,Oe=void 0,$e=new u,Ae=function(Se){switch(Se.type){case S.openTag:if(Ce===null)Ce=Te,Ce.name=Se.value;else{var xe=A({name:Se.value,parent:Ce});Ce.children.push(xe),Ce=xe}break;case S.closeTag:var Ve=Ce.parent;if(ae.parentNodes||(Ce.parent=null),Ce.name!==Se.value)break;ae.stream&&Ve===Te&&(Te.children=[],Ce.parent=null),(!ae.emitTopLevelOnly||Ve===Te)&&($e.emit(ae.tagPrefix+Ce.name,Ce),$e.emit("tag",Ce.name,Ce)),Ce===Te&&(de.removeAllListeners("data"),$e.emit(ae.doneEvent,Ce),Te=null),Ce=Ve;break;case S.text:Ce&&Ce.children.push(A({type:k.text,value:Se.value,parent:ae.parentNodes?Ce:null}));break;case S.attributeName:Oe=Se.value,Ce.attributes[Oe]="";break;case S.attributeValue:Ce.attributes[Oe]=Se.value;break}};return $e.reset=function(){de=w.create({debug:ae.debug}),de.on("data",Ae),Te=A(),Ce=null,Oe="",$e.parse=de.write},$e.reset(),$e},M=function(ae,de){de=Object.assign({},de,{stream:!1,tagPrefix:":"});var Te=R(de),Ce=void 0;return Te.on("done",function(Oe){Ce=Oe}),Te.parse(ae),Ce},N={parseSync:M},C=N.parseSync,U=function(ae){var de=C("<root>".concat(ae,"</root>"),{parentNodes:!1}),Te=de.children&&de.children.length>0&&de.children.every(function(Ce){return Ce.name==="svg"});if(Te)return de.children.length===1?de.children[0]:de.children;throw Error("nothing to parse")},O=function(ae){return l(ae,function(de){return Y(de)?de:H(de)})},H=function(ae){return ae.replace(/[-|:]([a-z])/gi,function(de,Te){return Te.toUpperCase()})},Y=function(ae){return/^(data|aria)(-\w+)/.test(ae)},X=function(ae){if(ae){var de=String(ae);return/[&<>]/.test(de)?"<![CDATA[".concat(de.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):de}return""},K=function(ae){return String(ae).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},J=function(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=de.transformNode,Ce=Te===void 0?function(se){return se}:Te,Oe=de.camelcase,$e=Oe===void 0?!1:Oe,Ae=function(Se){var xe;return xe=Ce(Se),$e&&(xe=O(xe)),xe};return Ae(U(ae))};function le(){for(var oe=arguments.length,ae=new Array(oe),de=0;de<oe;de++)ae[de]=arguments[de];return new Promise(function(Te,Ce){try{var Oe=J.apply(void 0,ae);Te(Oe)}catch($e){Ce($e)}})}var he=function oe(ae){var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=de.transformAttr,Ce=Te===void 0?function(ct,Me,Qe){return"".concat(ct,'="').concat(Qe(Me),'"')}:Te,Oe=de.transformNode,$e=Oe===void 0?function(ct){return ct}:Oe,Ae=de.selfClose,se=Ae===void 0?!0:Ae;if(Array.isArray(ae))return ae.map(function(ct){return oe(ct,{transformAttr:Ce,selfClose:se,transformNode:$e})}).join("");var Se=$e(ae);if(Se.type==="text")return X(Se.value);var xe="";for(var Ve in Se.attributes){var tt=Ce(Ve,Se.attributes[Ve],K,Se.name);xe+=tt?" ".concat(tt):""}return Se.children&&Se.children.length>0||!se?"<".concat(Se.name).concat(xe,">").concat(oe(Se.children,{transformAttr:Ce,transformNode:$e,selfClose:se}),"</").concat(Se.name,">"):"<".concat(Se.name).concat(xe,"/>")},ve=Object.assign({},{parse:le,parseSync:J,stringify:he});return ve})}}),ave=bh({"node_modules/js-beautify/js/src/core/output.js"(n,e){function t(o){this.__parent=o,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}t.prototype.clone_empty=function(){var o=new t(this.__parent);return o.set_indent(this.__indent_count,this.__alignment_count),o},t.prototype.item=function(o){return o<0?this.__items[this.__items.length+o]:this.__items[o]},t.prototype.has_match=function(o){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(o))return!0;return!1},t.prototype.set_indent=function(o,s){this.is_empty()&&(this.__indent_count=o||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},t.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},t.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},t.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var o=this.__parent.current_line;return o.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),o.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),o.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,o.__items[0]===" "&&(o.__items.splice(0,1),o.__character_count-=1),!0}return!1},t.prototype.is_empty=function(){return this.__items.length===0},t.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},t.prototype.push=function(o){this.__items.push(o);var s=o.lastIndexOf(`
@@ -5688,7 +5688,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function zht(n,e,t){if(!e||!t)retu
5688
5688
  * Copyright (c) 2013-2015, 2017, Jon Schlinkert.
5689
5689
  * Released under the MIT License.
5690
5690
  *)
5691
- */const LBn=({containerClassName:n,...e})=>{const t=ce.useRef(null),[i,r]=ce.useState(620);return ce.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),re.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:re.jsx(OBn,{...e,height:i})})},DBn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',hq=()=>{ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=DBn,document.head.appendChild(e)},[])},zBn=n=>{ce.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},npt=n=>`hsl(${lw.indexOf(n)*137.5%360}, 70%, 50%)`,$Bn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return re.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[re.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:lw.map(t=>{const i=n[t]||0,r=i/e*100;return re.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:npt(t)},children:re.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),re.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},FBn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},UBn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=ce.useState("chronological"),[r,o]=ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return re.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[re.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&re.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[re.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>re.jsx("option",{value:l.value,children:l.label},l.value))}),re.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>lw.indexOf(l[0])-lw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return re.jsxs("div",{className:"rf-bg-white",children:[re.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[re.jsx("div",{children:"Render Logs"}),re.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&re.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[re.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>re.jsx("option",{value:l.value,children:l.label},l.value))}),re.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),re.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:re.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=FBn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[re.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>re.jsx("option",{value:l.name,children:l.name},l.name))]})}),re.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[re.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),re.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[re.jsx("option",{value:"chronological",children:"Phase Order"}),re.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),re.jsx($Bn,{phaseTimings:n.phaseTimings}),re.jsxs("table",{className:"rf-w-full rf-text-xs",children:[re.jsx("thead",{children:re.jsxs("tr",{children:[re.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),re.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),re.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),re.jsx("tbody",{children:a.map(([l,u])=>re.jsxs("tr",{children:[re.jsx("td",{className:"rf-p-2",children:lw.indexOf(l)}),re.jsx("td",{className:"rf-p-2",children:l}),re.jsx("td",{className:"rf-p-2",children:re.jsx("div",{className:"rf-w-8",children:re.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:npt(l),width:`${u/c*100}%`}})})}),re.jsx("td",{className:"rf-p-2",children:re.jsxs("div",{className:"rf-flex w-full",children:[re.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),re.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},ipt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ce.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Yj.captureException(i)}catch{}}},[n,e]),ce.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Yj.captureException(r,{error_type:i.type})}catch{}}},[t])},rpt="0.0.1198",BBn={version:rpt};function q8(n,e){const[t,i]=ce.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return ce.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const pq=Sze()(Eze(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),jBn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState(null),[o,s]=ce.useState(""),[a,c]=q8("eval-version-selection",null),l=pq(p=>p.setLastRunEvalVersion),u=pq(p=>p.lastRunEvalVersion);return ce.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),ce.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ce.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},HBn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ce.useState(""),[s,a]=ce.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return re.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:re.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[re.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),re.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),re.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>re.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&re.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),re.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[re.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),re.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},VBn=n=>{const e=ce.useRef(null),t=ub(i=>i.recentEvents);ce.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var fq="Dialog",[opt,spt]=eT(fq),[GBn,hE]=opt(fq),apt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ce.useRef(null),c=ce.useRef(null),[l,u]=jA({prop:i,defaultProp:r??!1,onChange:o,caller:fq});return re.jsx(GBn,{scope:e,triggerRef:a,contentRef:c,contentId:Gb(),titleId:Gb(),descriptionId:Gb(),open:l,onOpenChange:u,onOpenToggle:ce.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};apt.displayName=fq;var cpt="DialogTrigger",lpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(cpt,t),o=H_(e,r.triggerRef);return re.jsx(lu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":yve(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});lpt.displayName=cpt;var mve="DialogPortal",[YBn,upt]=opt(mve,{forceMount:void 0}),dpt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=hE(mve,e);return re.jsx(YBn,{scope:e,forceMount:t,children:ce.Children.map(i,s=>re.jsx(KS,{present:t||o.open,children:re.jsx(FG,{asChild:!0,container:r,children:s})}))})};dpt.displayName=mve;var mq="DialogOverlay",hpt=ce.forwardRef((n,e)=>{const t=upt(mq,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=hE(mq,n.__scopeDialog);return o.modal?re.jsx(KS,{present:i||o.open,children:re.jsx(XBn,{...r,ref:e})}):null});hpt.displayName=mq;var qBn=BA("DialogOverlay.RemoveScroll"),XBn=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(mq,t);return re.jsx(qG,{as:qBn,allowPinchZoom:!0,shards:[r.contentRef],children:re.jsx(lu.div,{"data-state":yve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Q4="DialogContent",ppt=ce.forwardRef((n,e)=>{const t=upt(Q4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=hE(Q4,n.__scopeDialog);return re.jsx(KS,{present:i||o.open,children:o.modal?re.jsx(WBn,{...r,ref:e}):re.jsx(KBn,{...r,ref:e})})});ppt.displayName=Q4;var WBn=ce.forwardRef((n,e)=>{const t=hE(Q4,n.__scopeDialog),i=ce.useRef(null),r=H_(e,t.contentRef,i);return ce.useEffect(()=>{const o=i.current;if(o)return o1e(o)},[]),re.jsx(fpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),KBn=ce.forwardRef((n,e)=>{const t=hE(Q4,n.__scopeDialog),i=ce.useRef(!1),r=ce.useRef(!1);return re.jsx(fpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),fpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=hE(Q4,t),c=ce.useRef(null),l=H_(e,c);return Uxe(),re.jsxs(re.Fragment,{children:[re.jsx(CG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:re.jsx(MG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":yve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),re.jsxs(re.Fragment,{children:[re.jsx(QBn,{titleId:a.titleId}),re.jsx(ejn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),_ve="DialogTitle",mpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(_ve,t);return re.jsx(lu.h2,{id:r.titleId,...i,ref:e})});mpt.displayName=_ve;var _pt="DialogDescription",ypt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(_pt,t);return re.jsx(lu.p,{id:r.descriptionId,...i,ref:e})});ypt.displayName=_pt;var gpt="DialogClose",xpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(gpt,t);return re.jsx(lu.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});xpt.displayName=gpt;function yve(n){return n?"open":"closed"}var bpt="DialogTitleWarning",[ZBn,vpt]=hen(bpt,{contentName:Q4,titleName:_ve,docsSlug:"dialog"}),QBn=({titleId:n})=>{const e=vpt(bpt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
5691
+ */const LBn=({containerClassName:n,...e})=>{const t=ce.useRef(null),[i,r]=ce.useState(620);return ce.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),re.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:re.jsx(OBn,{...e,height:i})})},DBn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',hq=()=>{ce.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=DBn,document.head.appendChild(e)},[])},zBn=n=>{ce.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},npt=n=>`hsl(${lw.indexOf(n)*137.5%360}, 70%, 50%)`,$Bn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return re.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[re.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:lw.map(t=>{const i=n[t]||0,r=i/e*100;return re.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:npt(t)},children:re.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),re.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},FBn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},UBn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=ce.useState("chronological"),[r,o]=ce.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return re.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[re.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&re.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[re.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>re.jsx("option",{value:l.value,children:l.label},l.value))}),re.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>lw.indexOf(l[0])-lw.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return re.jsxs("div",{className:"rf-bg-white",children:[re.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[re.jsx("div",{children:"Render Logs"}),re.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&re.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[re.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>re.jsx("option",{value:l.value,children:l.label},l.value))}),re.jsx(R0,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),re.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:re.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=FBn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[re.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>re.jsx("option",{value:l.name,children:l.name},l.name))]})}),re.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[re.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),re.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[re.jsx("option",{value:"chronological",children:"Phase Order"}),re.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),re.jsx($Bn,{phaseTimings:n.phaseTimings}),re.jsxs("table",{className:"rf-w-full rf-text-xs",children:[re.jsx("thead",{children:re.jsxs("tr",{children:[re.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),re.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),re.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),re.jsx("tbody",{children:a.map(([l,u])=>re.jsxs("tr",{children:[re.jsx("td",{className:"rf-p-2",children:lw.indexOf(l)}),re.jsx("td",{className:"rf-p-2",children:l}),re.jsx("td",{className:"rf-p-2",children:re.jsx("div",{className:"rf-w-8",children:re.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:npt(l),width:`${u/c*100}%`}})})}),re.jsx("td",{className:"rf-p-2",children:re.jsxs("div",{className:"rf-flex w-full",children:[re.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),re.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},ipt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ce.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Yj.captureException(i)}catch{}}},[n,e]),ce.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Yj.captureException(r,{error_type:i.type})}catch{}}},[t])},rpt="0.0.1199",BBn={version:rpt};function q8(n,e){const[t,i]=ce.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return ce.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const pq=Sze()(Eze(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),jBn=n=>{const[e,t]=ce.useState([]),[i,r]=ce.useState(null),[o,s]=ce.useState(""),[a,c]=q8("eval-version-selection",null),l=pq(p=>p.setLastRunEvalVersion),u=pq(p=>p.lastRunEvalVersion);return ce.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(p=>p.json()).then(p=>{if(Array.isArray(p?.versions)){let m=[...p.versions];p.tags?.latest&&(r(p.tags.latest),m=m.filter(_=>_!==p.tags.latest)),t(m)}}).catch(()=>{})},[n]),ce.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ce.useMemo(()=>e.filter(p=>p.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:p=>{c(p),s("")}}},HBn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ce.useState(""),[s,a]=ce.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return re.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:re.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[re.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),re.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),re.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>re.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&re.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),re.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[re.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),re.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},VBn=n=>{const e=ce.useRef(null),t=ub(i=>i.recentEvents);ce.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var fq="Dialog",[opt,spt]=eT(fq),[GBn,hE]=opt(fq),apt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ce.useRef(null),c=ce.useRef(null),[l,u]=jA({prop:i,defaultProp:r??!1,onChange:o,caller:fq});return re.jsx(GBn,{scope:e,triggerRef:a,contentRef:c,contentId:Gb(),titleId:Gb(),descriptionId:Gb(),open:l,onOpenChange:u,onOpenToggle:ce.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};apt.displayName=fq;var cpt="DialogTrigger",lpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(cpt,t),o=H_(e,r.triggerRef);return re.jsx(lu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":yve(r.open),...i,ref:o,onClick:ca(n.onClick,r.onOpenToggle)})});lpt.displayName=cpt;var mve="DialogPortal",[YBn,upt]=opt(mve,{forceMount:void 0}),dpt=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=hE(mve,e);return re.jsx(YBn,{scope:e,forceMount:t,children:ce.Children.map(i,s=>re.jsx(KS,{present:t||o.open,children:re.jsx(FG,{asChild:!0,container:r,children:s})}))})};dpt.displayName=mve;var mq="DialogOverlay",hpt=ce.forwardRef((n,e)=>{const t=upt(mq,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=hE(mq,n.__scopeDialog);return o.modal?re.jsx(KS,{present:i||o.open,children:re.jsx(XBn,{...r,ref:e})}):null});hpt.displayName=mq;var qBn=BA("DialogOverlay.RemoveScroll"),XBn=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(mq,t);return re.jsx(qG,{as:qBn,allowPinchZoom:!0,shards:[r.contentRef],children:re.jsx(lu.div,{"data-state":yve(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),Q4="DialogContent",ppt=ce.forwardRef((n,e)=>{const t=upt(Q4,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=hE(Q4,n.__scopeDialog);return re.jsx(KS,{present:i||o.open,children:o.modal?re.jsx(WBn,{...r,ref:e}):re.jsx(KBn,{...r,ref:e})})});ppt.displayName=Q4;var WBn=ce.forwardRef((n,e)=>{const t=hE(Q4,n.__scopeDialog),i=ce.useRef(null),r=H_(e,t.contentRef,i);return ce.useEffect(()=>{const o=i.current;if(o)return o1e(o)},[]),re.jsx(fpt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ca(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ca(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ca(n.onFocusOutside,o=>o.preventDefault())})}),KBn=ce.forwardRef((n,e)=>{const t=hE(Q4,n.__scopeDialog),i=ce.useRef(!1),r=ce.useRef(!1);return re.jsx(fpt,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),fpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=hE(Q4,t),c=ce.useRef(null),l=H_(e,c);return Uxe(),re.jsxs(re.Fragment,{children:[re.jsx(CG,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:re.jsx(MG,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":yve(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),re.jsxs(re.Fragment,{children:[re.jsx(QBn,{titleId:a.titleId}),re.jsx(ejn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),_ve="DialogTitle",mpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(_ve,t);return re.jsx(lu.h2,{id:r.titleId,...i,ref:e})});mpt.displayName=_ve;var _pt="DialogDescription",ypt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(_pt,t);return re.jsx(lu.p,{id:r.descriptionId,...i,ref:e})});ypt.displayName=_pt;var gpt="DialogClose",xpt=ce.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=hE(gpt,t);return re.jsx(lu.button,{type:"button",...i,ref:e,onClick:ca(n.onClick,()=>r.onOpenChange(!1))})});xpt.displayName=gpt;function yve(n){return n?"open":"closed"}var bpt="DialogTitleWarning",[ZBn,vpt]=hen(bpt,{contentName:Q4,titleName:_ve,docsSlug:"dialog"}),QBn=({titleId:n})=>{const e=vpt(bpt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
5692
5692
 
5693
5693
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
5694
5694
 
package/package.json CHANGED
@@ -3,14 +3,13 @@
3
3
  "main": "dist/index.js",
4
4
  "types": "dist/index.d.ts",
5
5
  "type": "module",
6
- "version": "0.0.855",
6
+ "version": "0.0.856-libonly",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/tscircuit/tscircuit"
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
- "cli.mjs",
14
13
  "globals.d.ts"
15
14
  ],
16
15
  "scripts": {
@@ -29,10 +28,6 @@
29
28
  },
30
29
  "./browser": "./dist/browser.min.js"
31
30
  },
32
- "bin": {
33
- "tsci": "cli.mjs",
34
- "tscircuit": "cli.mjs"
35
- },
36
31
  "devDependencies": {
37
32
  "@types/bun": "^1.2.16",
38
33
  "esbuild": "^0.20.2",
@@ -50,7 +45,6 @@
50
45
  "@tscircuit/checks": "^0.0.85",
51
46
  "@tscircuit/circuit-json-flex": "^0.0.3",
52
47
  "@tscircuit/circuit-json-util": "^0.0.72",
53
- "@tscircuit/cli": "^0.1.436",
54
48
  "@tscircuit/core": "^0.0.843",
55
49
  "@tscircuit/eval": "^0.0.449",
56
50
  "@tscircuit/footprinter": "^0.0.236",
@@ -60,7 +54,7 @@
60
54
  "@tscircuit/miniflex": "^0.0.4",
61
55
  "@tscircuit/ngspice-spice-engine": "^0.0.2",
62
56
  "@tscircuit/props": "^0.0.390",
63
- "@tscircuit/runframe": "^0.0.1199",
57
+ "@tscircuit/runframe": "^0.0.1200",
64
58
  "@tscircuit/schematic-match-adapt": "^0.0.16",
65
59
  "@tscircuit/schematic-trace-solver": "^0.0.43",
66
60
  "@tscircuit/simple-3d-svg": "^0.0.41",
@@ -95,4 +89,4 @@
95
89
  "transformation-matrix": "^2.16.1",
96
90
  "zod": "^3.25.67"
97
91
  }
98
- }
92
+ }
package/cli.mjs DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bun
2
-
3
- import { createRequire } from "node:module";
4
- const require = createRequire(import.meta.url);
5
-
6
- // Use require to import package.json
7
- const packageJson = require("./package.json");
8
- global.TSCIRCUIT_VERSION = packageJson.version;
9
-
10
- async function main() {
11
- await import("@tscircuit/cli");
12
- }
13
-
14
- main();