@tscircuit/runframe 0.0.572 → 0.0.573

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.
@@ -1172,7 +1172,7 @@ var RenderLogViewer = ({
1172
1172
  };
1173
1173
 
1174
1174
  // package.json
1175
- var version = "0.0.571";
1175
+ var version = "0.0.572";
1176
1176
 
1177
1177
  // lib/components/CircuitJsonPreview/CircuitJsonPreview.tsx
1178
1178
  import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -2033,7 +2033,7 @@ var InitialOrderScreen = ({
2033
2033
  orderQuote.shipping_options[0]
2034
2034
  ).cost : 0;
2035
2035
  }, [orderQuote]);
2036
- const isNoTokenError = createOrderQuoteError && createOrderQuoteError.error_code?.includes("no_token") || orderQuote?.error?.error_code?.includes("no_token") && signIn;
2036
+ const isNoTokenError = createOrderQuoteError && createOrderQuoteError.error?.error_code?.includes("no_token") || orderQuote?.error?.error_code?.includes("no_token") && signIn;
2037
2037
  if (!isLoggedIn || isNoTokenError) {
2038
2038
  return /* @__PURE__ */ jsx19(SignInView, { signIn });
2039
2039
  }
@@ -2043,7 +2043,7 @@ var InitialOrderScreen = ({
2043
2043
  (createOrderQuoteError || orderQuote?.error) && /* @__PURE__ */ jsx19(
2044
2044
  ErrorMessage,
2045
2045
  {
2046
- message: createOrderQuoteError && createOrderQuoteError.message || orderQuote?.error?.message || "Failed to fetch quotes"
2046
+ message: createOrderQuoteError && createOrderQuoteError.error?.message || orderQuote?.error?.message || "Failed to fetch quotes"
2047
2047
  }
2048
2048
  ),
2049
2049
  orderQuote?.is_completed && !createOrderQuoteError && !orderQuote?.error && Array.isArray(orderQuote?.shipping_options) && orderQuote.shipping_options.length > 0 && /* @__PURE__ */ jsxs15(Fragment3, { children: [
package/dist/preview.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  linkify,
9
9
  useOrderDialog,
10
10
  useOrderDialogCli
11
- } from "./chunk-5QIG76NK.js";
11
+ } from "./chunk-JMNMP22C.js";
12
12
  export {
13
13
  BomTable,
14
14
  CadViewer,
package/dist/runner.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  useOrderDialog,
29
29
  useOrderDialogCli,
30
30
  useRunFrameStore
31
- } from "./chunk-5QIG76NK.js";
31
+ } from "./chunk-JMNMP22C.js";
32
32
 
33
33
  // lib/components/RunFrame/RunFrame.tsx
34
34
  import { createCircuitWebWorker } from "@tscircuit/eval/worker";
@@ -13464,4 +13464,4 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Tae}ULt();function nUe(r,e,t,n=
13464
13464
  &:hover {
13465
13465
  background-color: rgba(255, 255, 255, 0.1);
13466
13466
  }
13467
- `,onClick:n=>{n.stopPropagation(),t()},children:[ut.jsx("input",{type:"checkbox",checked:e}),ut.jsx("span",{style:{color:"#eee"},children:r})]}),czt=({children:r,elements:e})=>{const[t,n]=b1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=yt.useState(!1),[o,s]=yt.useState(!1),[l,c]=yt.useState(!1),[A,u]=b1(j=>[j.selected_layer,j.selectLayer]),[d,g,m,E,C,_]=b1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),x=b1(j=>j.setEditMode),Q=b1(j=>j.setIsShowingRatsNest),P=b1(j=>j.setIsShowingMultipleTracesLength),z=b1(j=>j.setIsShowingAutorouting),O=b1(j=>j.setIsShowingDrcErrors);tQ("1",()=>u("top")),tQ("2",()=>u("bottom")),tQ("3",()=>u("inner1")),tQ("4",()=>u("inner2")),tQ("5",()=>u("inner3")),tQ("6",()=>u("inner4")),tQ("7",()=>u("inner5")),tQ("8",()=>u("inner6"));const Y=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return ut.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,ut.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",szt.version]}),ut.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:H_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[ut.jsxs(v3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[ut.jsxs("div",{children:["layer:"," ",ut.jsx("span",{style:{marginLeft:2,fontWeight:500,color:y3[A]},children:A})]}),o&&ut.jsx("div",{style:{marginTop:4,minWidth:120},children:goe.map(j=>j.replace(/-/g,"")).map(j=>ut.jsx(lzt,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),ut.jsxs(v3,{style:Y>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[ut.jsxs("div",{children:[Y," errors"]}),l&&ut.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,q)=>ut.jsxs(yt.Fragment,{children:[ut.jsx("div",{children:j.error_type}),ut.jsx("div",{children:j.message})]},q))})]}),ut.jsx(v3,{style:{},onClick:()=>{x(g?"off":"draw_trace")},children:ut.jsxs("div",{children:[g?"✖ ":"","Edit Traces"]})}),ut.jsx(v3,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:ut.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),ut.jsx(v3,{style:{},onClick:()=>{Q(!m)},children:ut.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),ut.jsx(v3,{onClick:()=>{a(!i)},children:ut.jsxs("div",{children:[ut.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",ut.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&ut.jsxs("div",{style:{marginTop:4,minWidth:120},children:[ut.jsx(Coe,{label:"Show All Trace Lengths",checked:E,onClick:()=>{P(!E)}}),ut.jsx(Coe,{label:"Show Autorouting Animation",checked:C,onClick:()=>{z(!C)}}),ut.jsx(Coe,{label:"Show DRC Errors",checked:_,onClick:()=>{O(!_)}})]})]})})]})]})},Azt=r=>{const{transform:e,elements:t}=r,[n,i]=yt.useMemo(()=>{const c=r.elements.flatMap(u=>COt(u,r.elements)),A=pS(r.elements);return[c,A]},[r.elements]),[a,o]=yt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=yt.useMemo(()=>vOt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=yt.useCallback(c=>{var d,g;const A=[];for(const m of c)if(m._element){const E=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(g=m._element)==null?void 0:g.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return ut.jsx(azt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:ut.jsx(zOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:ut.jsx(KOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:ut.jsx(LOt,{transform:e,focusOnHover:r.focusOnHover,children:ut.jsx(czt,{elements:t,children:ut.jsx(WOt,{transform:e,elements:t,children:ut.jsx(ozt,{transform:e,soup:t,children:ut.jsx(FOt,{transform:e,debugGraphics:r.debugGraphics,children:ut.jsx(GOt,{transform:e,elements:t,children:ut.jsx(kOt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},uzt=OA(Jd(400,300),z1(40,-40)),dzt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=yt.useState(!l),[u,d]=voe(),[g,m]=yt.useState(uzt),{ref:E,setTransform:C,cancelDrag:_}=yOt({transform:g,onSetTransform:m,enabled:c});let[x,Q]=yt.useState([]);x=a??x;const P=yt.useRef(!1),z=yt.useRef(null),O=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,Y=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:ve,height:Ee}=q.some(Ie=>Ie.type.startsWith("pcb_"))?lOt(q.filter(Ie=>Ie.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/ve,(oe.height??0)/Ee,100)*.75,Be=OA(Jd((oe.width??0)/2,(oe.height??0)/2),z1(pe,-pe,0,0),Jd(-de.x,-de.y));C(Be)};yt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(Y(),P.current=!0))},[r,d]);const j=yt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[O]),q=yt.useMemo(()=>CGt({circuitJson:j,editEvents:x}),[j,x]),J=oe=>{Q([...x,oe]),o==null||o([...x,oe])},le=oe=>{const de=x.map(ve=>ve.edit_event_id===oe.edit_event_id?{...ve,...oe}:ve);Q(de),o==null||o(de)};return ut.jsxs("div",{ref:E,style:{position:"relative"},children:[ut.jsx("div",{ref:u,children:ut.jsxs(AOt,{initialState:n,children:[ut.jsx(Azt,{transform:g,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:le,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),ut.jsx(dOt,{})]})}),l&&!c&&ut.jsx("div",{onClick:()=>{A(!0),Y()},onTouchStart:oe=>{const de=oe.touches[0];z.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],ve=z.current;if(!ve)return;const Ee=Math.abs(de.clientX-ve.x),pe=Math.abs(de.clientY-ve.y);Ee<10&&pe<10&&(oe.preventDefault(),A(!0),Y()),z.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:H_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:ut.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const fzt=({containerClassName:r,...e})=>{const t=yt.useRef(null),[n,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),ut.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:ut.jsx(dzt,{...e,height:n})})},hzt='*,: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.17 | 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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!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-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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}.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}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-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-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-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-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-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-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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-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\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',gzt=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=hzt,document.head.appendChild(e)},[])},mFe=r=>`hsl(${Tx.indexOf(r)*137.5%360}, 70%, 50%)`,pzt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return ut.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ut.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Tx.map(t=>{const n=r[t]||0,i=n/e*100;return ut.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:mFe(t)},children:ut.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,": ",n.toFixed(1),"ms"]})},t)})}),ut.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},mzt=({renderLog:r})=>{const[e,t]=yt.useState("chronological");if(!r)return ut.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Tx.indexOf(a[0])-Tx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return ut.jsxs("div",{className:"rf-bg-white",children:[ut.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[ut.jsx("div",{children:"Render Logs"}),ut.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[ut.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ut.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ut.jsx("option",{value:"chronological",children:"Phase Order"}),ut.jsx("option",{value:"longest",children:"Duration"})]})]})]}),ut.jsx(pzt,{phaseTimings:r.phaseTimings}),ut.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ut.jsx("thead",{children:ut.jsxs("tr",{children:[ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ut.jsx("tbody",{children:n.map(([a,o])=>ut.jsxs("tr",{children:[ut.jsx("td",{className:"rf-p-2",children:Tx.indexOf(a)}),ut.jsx("td",{className:"rf-p-2",children:a}),ut.jsx("td",{className:"rf-p-2",children:ut.jsx("div",{className:"rf-w-8",children:ut.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:mFe(a),width:`${o/i*100}%`}})})}),ut.jsx("td",{className:"rf-p-2",children:ut.jsxs("div",{className:"rf-flex w-full",children:[ut.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),ut.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},yzt="0.0.571",vzt=["assembly","bom","circuit_json","errors","render_log"],Izt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:g=!0,className:m,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:x,autoroutingLog:Q,onReportAutoroutingLog:P,isRunningCode:z,hasCodeChangedSinceLastRun:O,onEditEvent:Y,editEvents:j,defaultActiveTab:q,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:le=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1,activeEffectName:ve})=>{var nt;gzt();const Ee=yt.useMemo(()=>i?i.filter(At=>At&&"error_type"in At||At.type.includes("error")):null,[i]),pe=yt.useMemo(()=>i?i.filter(At=>At&&"warning_type"in At||At.type.includes("warning")):null,[i]),[Be,Ie]=yt.useState(q??"pcb"),[De,we]=yt.useState(de),Ue=yt.useCallback(At=>{Ie(At),u==null||u(At)},[u]),ke=()=>{we(!De)};yt.useEffect(()=>{t&&Ue("errors")},[t]),yt.useEffect(()=>{(Be==="code"||Be==="errors")&&i&&!t&&Ue(q??"pcb")},[i]);const it=yt.useCallback(At=>{window.TSCIRCUIT_3D_OBJECT_REF=At===null?void 0:At},[]);return ut.jsx("div",{className:Kv("flex flex-col relative rf-overflow-x-hidden",m),children:ut.jsx("div",{className:Kv("rf-md:sticky rf-md:top-2",De&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:ut.jsxs(x7e,{value:Be,onValueChange:Ue,className:"rf-flex-grow rf-flex rf-flex-col",children:[ut.jsxs("div",{className:Kv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&ut.jsx("div",{className:"rf-flex-grow"}),!C&&z&&ut.jsx(aTe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&ut.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&ut.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ve?ut.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:ve}):d.lastRenderEvent&&ut.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((nt=d.lastRenderEvent)==null?void 0:nt.phase)??""}),ut.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:ut.jsx(aTe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),ut.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&ut.jsxs(Qle,{children:[s&&ut.jsx(r9,{value:"code",children:"Code"}),ut.jsxs(r9,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&ut.jsx("span",{className:Kv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),ut.jsxs(r9,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&ut.jsx("span",{className:Kv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),ut.jsxs(r9,{value:"cad",children:[i&&ut.jsx("span",{className:Kv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Be)&&ut.jsx(r9,{value:Be,children:Sle(Be)}),ut.jsxs(gPe,{children:[ut.jsx(pPe,{asChild:!0,children:ut.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[ut.jsx(JTt,{className:"rf-w-4 rf-h-4"}),(Ee&&Ee.length>0||t)&&ut.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),ut.jsxs(Nie,{className:"rf-*:text-xs",children:[vzt.map(At=>ut.jsxs(YG,{onSelect:()=>Ue(At),children:[Be!==At&&ut.jsx(iTe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Be===At&&ut.jsx(nTe,{className:"rf-w-3 rf-h-3"}),ut.jsx("div",{className:"rf-pr-2",children:Sle(At)}),At==="errors"&&(Ee&&Ee.length>0||t)&&ut.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ee==null?void 0:Ee.length})]},At)),ut.jsx(YG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ut.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",yzt.split(".").map((At,_t)=>_t===2?parseInt(At)+1:At).join(".")]})})]})]})]}),oe&&ut.jsx(Y2,{onClick:ke,variant:"ghost",children:De?ut.jsx(ZTt,{size:16}):ut.jsx(jTt,{size:16})})]}),s&&ut.jsx(pb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:ut.jsx("div",{className:"rf-h-full",children:l})}),ut.jsx(pb,{value:"pcb",children:ut.jsx("div",{className:Kv("rf-overflow-hidden",De?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(fzt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Kv("rf-h-full rf-w-full",De?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:At=>{Y&&At.forEach(_t=>Y(_t))}}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"assembly",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallback:ut.jsx("div",{children:"Error loading Assembly"}),children:i?ut.jsx(BFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"schematic",children:ut.jsx("div",{className:Kv("rf-overflow-auto rf-bg-white",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(CFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:At=>{Y==null||Y(At)},debugGrid:le}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"cad",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{FallbackComponent:TTt,children:i?ut.jsx(RTt,{ref:it,circuitJson:i,autoRotateDisabled:J}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"bom",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(wFt,{circuitJson:i}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"circuit_json",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallback:ut.jsx("div",{children:"Error loading JSON viewer"}),children:i?ut.jsx(SFt,{elements:i}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"errors",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ee&&Ee.length>0||i?ut.jsx(JUt,{code:r,circuitJsonErrors:Ee,circuitJsonWarnings:pe,errorMessage:t,errorStack:n,autoroutingLog:Q,onReportAutoroutingLog:P}):ut.jsx(kw,{onRunClicked:e})})}),A&&ut.jsx(pb,{value:"render_log",children:ut.jsx(mzt,{renderLog:d})})]})})})};jse.createRoot(document.getElementById("root")).render(ut.jsx(Izt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const Czt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
13467
+ `,onClick:n=>{n.stopPropagation(),t()},children:[ut.jsx("input",{type:"checkbox",checked:e}),ut.jsx("span",{style:{color:"#eee"},children:r})]}),czt=({children:r,elements:e})=>{const[t,n]=b1(j=>[j.is_mouse_over_container,j.setIsMouseOverContainer]),[i,a]=yt.useState(!1),[o,s]=yt.useState(!1),[l,c]=yt.useState(!1),[A,u]=b1(j=>[j.selected_layer,j.selectLayer]),[d,g,m,E,C,_]=b1(j=>[j.in_move_footprint_mode,j.in_draw_trace_mode,j.is_showing_rats_nest,j.is_showing_multiple_traces_length,j.is_showing_autorouting,j.is_showing_drc_errors]),x=b1(j=>j.setEditMode),Q=b1(j=>j.setIsShowingRatsNest),P=b1(j=>j.setIsShowingMultipleTracesLength),z=b1(j=>j.setIsShowingAutorouting),O=b1(j=>j.setIsShowingDrcErrors);tQ("1",()=>u("top")),tQ("2",()=>u("bottom")),tQ("3",()=>u("inner1")),tQ("4",()=>u("inner2")),tQ("5",()=>u("inner3")),tQ("6",()=>u("inner4")),tQ("7",()=>u("inner5")),tQ("8",()=>u("inner6"));const Y=(e==null?void 0:e.filter(j=>j.type.includes("error")).length)??0;return ut.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:j=>{n(!1),s(!1)},children:[r,ut.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",szt.version]}),ut.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:H_.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[ut.jsxs(v3,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[ut.jsxs("div",{children:["layer:"," ",ut.jsx("span",{style:{marginLeft:2,fontWeight:500,color:y3[A]},children:A})]}),o&&ut.jsx("div",{style:{marginTop:4,minWidth:120},children:goe.map(j=>j.replace(/-/g,"")).map(j=>ut.jsx(lzt,{name:j,selected:j===A,onClick:()=>{u(j.replace(/-/,""))}},j))})]}),ut.jsxs(v3,{style:Y>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[ut.jsxs("div",{children:[Y," errors"]}),l&&ut.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(j=>j.type.includes("error")).map((j,q)=>ut.jsxs(yt.Fragment,{children:[ut.jsx("div",{children:j.error_type}),ut.jsx("div",{children:j.message})]},q))})]}),ut.jsx(v3,{style:{},onClick:()=>{x(g?"off":"draw_trace")},children:ut.jsxs("div",{children:[g?"✖ ":"","Edit Traces"]})}),ut.jsx(v3,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:ut.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),ut.jsx(v3,{style:{},onClick:()=>{Q(!m)},children:ut.jsxs("div",{children:[m?"✖ ":"","Rats Nest"]})}),ut.jsx(v3,{onClick:()=>{a(!i)},children:ut.jsxs("div",{children:[ut.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",ut.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&ut.jsxs("div",{style:{marginTop:4,minWidth:120},children:[ut.jsx(Coe,{label:"Show All Trace Lengths",checked:E,onClick:()=>{P(!E)}}),ut.jsx(Coe,{label:"Show Autorouting Animation",checked:C,onClick:()=>{z(!C)}}),ut.jsx(Coe,{label:"Show DRC Errors",checked:_,onClick:()=>{O(!_)}})]})]})})]})]})},Azt=r=>{const{transform:e,elements:t}=r,[n,i]=yt.useMemo(()=>{const c=r.elements.flatMap(u=>COt(u,r.elements)),A=pS(r.elements);return[c,A]},[r.elements]),[a,o]=yt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=yt.useMemo(()=>vOt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=yt.useCallback(c=>{var d,g;const A=[];for(const m of c)if(m._element){const E=i.getNetConnectedToId("pcb_port_id"in m._element?(d=m._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in m._element?(g=m._element)==null?void 0:g.pcb_trace_id:"");A.push(...i.getIdsConnectedToNet(E))}const u=new Set(c.map(m=>m._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:u,primitiveIdsInMousedOverNet:A})},[i]);return ut.jsx(azt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:ut.jsx(zOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:ut.jsx(KOt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:ut.jsx(LOt,{transform:e,focusOnHover:r.focusOnHover,children:ut.jsx(czt,{elements:t,children:ut.jsx(WOt,{transform:e,elements:t,children:ut.jsx(ozt,{transform:e,soup:t,children:ut.jsx(FOt,{transform:e,debugGraphics:r.debugGraphics,children:ut.jsx(GOt,{transform:e,elements:t,children:ut.jsx(kOt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},uzt=OA(Jd(400,300),z1(40,-40)),dzt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,A]=yt.useState(!l),[u,d]=voe(),[g,m]=yt.useState(uzt),{ref:E,setTransform:C,cancelDrag:_}=yOt({transform:g,onSetTransform:m,enabled:c});let[x,Q]=yt.useState([]);x=a??x;const P=yt.useRef(!1),z=yt.useRef(null),O=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,Y=()=>{const oe=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:de,width:ve,height:Ee}=q.some(Ie=>Ie.type.startsWith("pcb_"))?lOt(q.filter(Ie=>Ie.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},pe=Math.min((oe.width??0)/ve,(oe.height??0)/Ee,100)*.75,Be=OA(Jd((oe.width??0)/2,(oe.height??0)/2),z1(pe,-pe,0,0),Jd(-de.x,-de.y));C(Be)};yt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(P.current||(Y(),P.current=!0))},[r,d]);const j=yt.useMemo(()=>(r==null?void 0:r.filter(oe=>oe.type.startsWith("pcb_")||oe.type.startsWith("source_")))??[],[O]),q=yt.useMemo(()=>CGt({circuitJson:j,editEvents:x}),[j,x]),J=oe=>{Q([...x,oe]),o==null||o([...x,oe])},le=oe=>{const de=x.map(ve=>ve.edit_event_id===oe.edit_event_id?{...ve,...oe}:ve);Q(de),o==null||o(de)};return ut.jsxs("div",{ref:E,style:{position:"relative"},children:[ut.jsx("div",{ref:u,children:ut.jsxs(AOt,{initialState:n,children:[ut.jsx(Azt,{transform:g,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:_,onCreateEditEvent:J,onModifyEditEvent:le,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:q,debugGraphics:e},d.width),ut.jsx(dOt,{})]})}),l&&!c&&ut.jsx("div",{onClick:()=>{A(!0),Y()},onTouchStart:oe=>{const de=oe.touches[0];z.current={x:de.clientX,y:de.clientY}},onTouchEnd:oe=>{const de=oe.changedTouches[0],ve=z.current;if(!ve)return;const Ee=Math.abs(de.clientX-ve.x),pe=Math.abs(de.clientY-ve.y);Ee<10&&pe<10&&(oe.preventDefault(),A(!0),Y()),z.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:H_.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:ut.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const fzt=({containerClassName:r,...e})=>{const t=yt.useRef(null),[n,i]=yt.useState(620);return yt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),ut.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:ut.jsx(dzt,{...e,height:n})})},hzt='*,: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.17 | 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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!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-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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}.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}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-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-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-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-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-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-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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-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\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',gzt=()=>{yt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=hzt,document.head.appendChild(e)},[])},mFe=r=>`hsl(${Tx.indexOf(r)*137.5%360}, 70%, 50%)`,pzt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return ut.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ut.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Tx.map(t=>{const n=r[t]||0,i=n/e*100;return ut.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:mFe(t)},children:ut.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,": ",n.toFixed(1),"ms"]})},t)})}),ut.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},mzt=({renderLog:r})=>{const[e,t]=yt.useState("chronological");if(!r)return ut.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Tx.indexOf(a[0])-Tx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return ut.jsxs("div",{className:"rf-bg-white",children:[ut.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[ut.jsx("div",{children:"Render Logs"}),ut.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[ut.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ut.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ut.jsx("option",{value:"chronological",children:"Phase Order"}),ut.jsx("option",{value:"longest",children:"Duration"})]})]})]}),ut.jsx(pzt,{phaseTimings:r.phaseTimings}),ut.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ut.jsx("thead",{children:ut.jsxs("tr",{children:[ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ut.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ut.jsx("tbody",{children:n.map(([a,o])=>ut.jsxs("tr",{children:[ut.jsx("td",{className:"rf-p-2",children:Tx.indexOf(a)}),ut.jsx("td",{className:"rf-p-2",children:a}),ut.jsx("td",{className:"rf-p-2",children:ut.jsx("div",{className:"rf-w-8",children:ut.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:mFe(a),width:`${o/i*100}%`}})})}),ut.jsx("td",{className:"rf-p-2",children:ut.jsxs("div",{className:"rf-flex w-full",children:[ut.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),ut.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},yzt="0.0.572",vzt=["assembly","bom","circuit_json","errors","render_log"],Izt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:A=!0,onActiveTabChange:u,renderLog:d,showImportAndFormatButtons:g=!0,className:m,headerClassName:E,leftHeaderContent:C,readOnly:_,isStreaming:x,autoroutingLog:Q,onReportAutoroutingLog:P,isRunningCode:z,hasCodeChangedSinceLastRun:O,onEditEvent:Y,editEvents:j,defaultActiveTab:q,autoRotate3dViewerDisabled:J,showSchematicDebugGrid:le=!1,showToggleFullScreen:oe=!0,defaultToFullScreen:de=!1,activeEffectName:ve})=>{var nt;gzt();const Ee=yt.useMemo(()=>i?i.filter(At=>At&&"error_type"in At||At.type.includes("error")):null,[i]),pe=yt.useMemo(()=>i?i.filter(At=>At&&"warning_type"in At||At.type.includes("warning")):null,[i]),[Be,Ie]=yt.useState(q??"pcb"),[De,we]=yt.useState(de),Ue=yt.useCallback(At=>{Ie(At),u==null||u(At)},[u]),ke=()=>{we(!De)};yt.useEffect(()=>{t&&Ue("errors")},[t]),yt.useEffect(()=>{(Be==="code"||Be==="errors")&&i&&!t&&Ue(q??"pcb")},[i]);const it=yt.useCallback(At=>{window.TSCIRCUIT_3D_OBJECT_REF=At===null?void 0:At},[]);return ut.jsx("div",{className:Kv("flex flex-col relative rf-overflow-x-hidden",m),children:ut.jsx("div",{className:Kv("rf-md:sticky rf-md:top-2",De&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:ut.jsxs(x7e,{value:Be,onValueChange:Ue,className:"rf-flex-grow rf-flex rf-flex-col",children:[ut.jsxs("div",{className:Kv("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",E),children:[C,C&&ut.jsx("div",{className:"rf-flex-grow"}),!C&&z&&ut.jsx(aTe,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!C&&ut.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&ut.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ve?ut.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:ve}):d.lastRenderEvent&&ut.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((nt=d.lastRenderEvent)==null?void 0:nt.phase)??""}),ut.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:ut.jsx(aTe,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),ut.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&ut.jsxs(Qle,{children:[s&&ut.jsx(r9,{value:"code",children:"Code"}),ut.jsxs(r9,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&ut.jsx("span",{className:Kv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),ut.jsxs(r9,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&ut.jsx("span",{className:Kv("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),ut.jsxs(r9,{value:"cad",children:[i&&ut.jsx("span",{className:Kv("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",O?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Be)&&ut.jsx(r9,{value:Be,children:Sle(Be)}),ut.jsxs(gPe,{children:[ut.jsx(pPe,{asChild:!0,children:ut.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[ut.jsx(JTt,{className:"rf-w-4 rf-h-4"}),(Ee&&Ee.length>0||t)&&ut.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),ut.jsxs(Nie,{className:"rf-*:text-xs",children:[vzt.map(At=>ut.jsxs(YG,{onSelect:()=>Ue(At),children:[Be!==At&&ut.jsx(iTe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Be===At&&ut.jsx(nTe,{className:"rf-w-3 rf-h-3"}),ut.jsx("div",{className:"rf-pr-2",children:Sle(At)}),At==="errors"&&(Ee&&Ee.length>0||t)&&ut.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ee==null?void 0:Ee.length})]},At)),ut.jsx(YG,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ut.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",yzt.split(".").map((At,_t)=>_t===2?parseInt(At)+1:At).join(".")]})})]})]})]}),oe&&ut.jsx(Y2,{onClick:ke,variant:"ghost",children:De?ut.jsx(ZTt,{size:16}):ut.jsx(jTt,{size:16})})]}),s&&ut.jsx(pb,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:ut.jsx("div",{className:"rf-h-full",children:l})}),ut.jsx(pb,{value:"pcb",children:ut.jsx("div",{className:Kv("rf-overflow-hidden",De?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(fzt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Kv("rf-h-full rf-w-full",De?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:At=>{Y&&At.forEach(_t=>Y(_t))}}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"assembly",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallback:ut.jsx("div",{children:"Error loading Assembly"}),children:i?ut.jsx(BFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"schematic",children:ut.jsx("div",{className:Kv("rf-overflow-auto rf-bg-white",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(CFt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:At=>{Y==null||Y(At)},debugGrid:le}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"cad",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{FallbackComponent:TTt,children:i?ut.jsx(RTt,{ref:it,circuitJson:i,autoRotateDisabled:J}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"bom",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallbackRender:({error:At})=>ut.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ut.jsxs("div",{className:"rf-p-4",children:[ut.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),ut.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(At==null?void 0:At.message)||"An unknown error occurred"})]})}),children:i?ut.jsx(wFt,{circuitJson:i}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"circuit_json",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:ut.jsx(WM,{fallback:ut.jsx("div",{children:"Error loading JSON viewer"}),children:i?ut.jsx(SFt,{elements:i}):ut.jsx(kw,{onRunClicked:e})})})}),ut.jsx(pb,{value:"errors",children:ut.jsx("div",{className:Kv("rf-overflow-auto",De?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ee&&Ee.length>0||i?ut.jsx(JUt,{code:r,circuitJsonErrors:Ee,circuitJsonWarnings:pe,errorMessage:t,errorStack:n,autoroutingLog:Q,onReportAutoroutingLog:P}):ut.jsx(kw,{onRunClicked:e})})}),A&&ut.jsx(pb,{value:"render_log",children:ut.jsx(mzt,{renderLog:d})})]})})})};jse.createRoot(document.getElementById("root")).render(ut.jsx(Izt,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}}));const Czt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}))});
@@ -13493,7 +13493,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}return Use}qVt();function bLe(r,e,t,n=
13493
13493
  &:hover {
13494
13494
  background-color: rgba(255, 255, 255, 0.1);
13495
13495
  }
13496
- `,onClick:n=>{n.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:r})]}),_Wt=({children:r,elements:e})=>{const[t,n]=z1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=z1(G=>[G.selected_layer,G.selectLayer]),[d,f,g,_,I,E]=z1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=z1(G=>G.setEditMode),B=z1(G=>G.setIsShowingRatsNest),N=z1(G=>G.setIsShowingMultipleTracesLength),L=z1(G=>G.setIsShowingAutorouting),U=z1(G=>G.setIsShowingDrcErrors);kw("1",()=>A("top")),kw("2",()=>A("bottom")),kw("3",()=>A("inner1")),kw("4",()=>A("inner2")),kw("5",()=>A("inner3")),kw("6",()=>A("inner4")),kw("7",()=>A("inner5")),kw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",CWt.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:ux.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(A5,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:u5[u]},children:u})]}),o&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:yle.map(G=>G.replace(/-/g,"")).map(G=>Ge.jsx(EWt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ge.jsxs(A5,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[H," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,W)=>Ge.jsxs(nt.Fragment,{children:[Ge.jsx("div",{children:G.error_type}),Ge.jsx("div",{children:G.message})]},W))})]}),Ge.jsx(A5,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ge.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ge.jsx(A5,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(A5,{style:{},onClick:()=>{B(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(A5,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx(xle,{label:"Show All Trace Lengths",checked:_,onClick:()=>{N(!_)}}),Ge.jsx(xle,{label:"Show Autorouting Animation",checked:I,onClick:()=>{L(!I)}}),Ge.jsx(xle,{label:"Show DRC Errors",checked:E,onClick:()=>{U(!E)}})]})]})})]})]})},xWt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>PJt(A,r.elements)),u=GS(r.elements);return[c,u]},[r.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>NJt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=nt.useCallback(c=>{var d,f;const u=[];for(const g of c)if(g._element){const _=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(f=g._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(vWt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ge.jsx(nWt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ge.jsx(oWt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ge.jsx(eWt,{transform:e,focusOnHover:r.focusOnHover,children:Ge.jsx(_Wt,{elements:t,children:Ge.jsx(cWt,{transform:e,elements:t,children:Ge.jsx(IWt,{transform:e,soup:t,children:Ge.jsx(XJt,{transform:e,debugGraphics:r.debugGraphics,children:Ge.jsx($Jt,{transform:e,elements:t,children:Ge.jsx(ZJt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},BWt=Fu(Od(400,300),T1(40,-40)),bWt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Ele(),[f,g]=nt.useState(BWt),{ref:_,setTransform:I,cancelDrag:E}=RJt({transform:f,onSetTransform:g,enabled:c});let[x,B]=nt.useState([]);x=a??x;const N=nt.useRef(!1),L=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:le,width:pe,height:Ae}=W.some(ge=>ge.type.startsWith("pcb_"))?EJt(W.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((te.width??0)/pe,(te.height??0)/Ae,100)*.75,Ie=Fu(Od((te.width??0)/2,(te.height??0)/2),T1(he,-he,0,0),Od(-le.x,-le.y));I(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(N.current||(H(),N.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),W=nt.useMemo(()=>Nft({circuitJson:G,editEvents:x}),[G,x]),z=te=>{B([...x,te]),o==null||o([...x,te])},ie=te=>{const le=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);B(le),o==null||o(le)};return Ge.jsxs("div",{ref:_,style:{position:"relative"},children:[Ge.jsx("div",{ref:A,children:Ge.jsxs(xJt,{initialState:n,children:[Ge.jsx(xWt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:z,onModifyEditEvent:ie,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ge.jsx(bJt,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const le=te.touches[0];L.current={x:le.clientX,y:le.clientY}},onTouchEnd:te=>{const le=te.changedTouches[0],pe=L.current;if(!pe)return;const Ae=Math.abs(le.clientX-pe.x),he=Math.abs(le.clientY-pe.y);Ae<10&&he<10&&(te.preventDefault(),u(!0),H()),L.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:ux.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const SWt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ge.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ge.jsx(bWt,{...e,height:n})})},wWt='*,: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.17 | 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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!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-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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}.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}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-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-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-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-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-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-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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-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\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',QWt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=wWt,document.head.appendChild(e)},[])},OGe=r=>`hsl(${Vx.indexOf(r)*137.5%360}, 70%, 50%)`,MWt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Vx.map(t=>{const n=r[t]||0,i=n/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:OGe(t)},children:Ge.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,": ",n.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},DWt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ge.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Vx.indexOf(a[0])-Vx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(MWt,{phaseTimings:r.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:n.map(([a,o])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:Vx.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:OGe(a),width:`${o/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},RWt="0.0.571",NWt=["assembly","bom","circuit_json","errors","render_log"],TWt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:f=!0,className:g,headerClassName:_,leftHeaderContent:I,readOnly:E,isStreaming:x,autoroutingLog:B,onReportAutoroutingLog:N,isRunningCode:L,hasCodeChangedSinceLastRun:U,onEditEvent:H,editEvents:G,defaultActiveTab:W,autoRotate3dViewerDisabled:z,showSchematicDebugGrid:ie=!1,showToggleFullScreen:te=!0,defaultToFullScreen:le=!1,activeEffectName:pe})=>{var Ze;QWt();const Ae=nt.useMemo(()=>i?i.filter(it=>it&&"error_type"in it||it.type.includes("error")):null,[i]),he=nt.useMemo(()=>i?i.filter(it=>it&&"warning_type"in it||it.type.includes("warning")):null,[i]),[Ie,ge]=nt.useState(W??"pcb"),[Qe,be]=nt.useState(le),Re=nt.useCallback(it=>{ge(it),A==null||A(it)},[A]),we=()=>{be(!Qe)};nt.useEffect(()=>{t&&Re("errors")},[t]),nt.useEffect(()=>{(Ie==="code"||Ie==="errors")&&i&&!t&&Re(W??"pcb")},[i]);const Ve=nt.useCallback(it=>{window.TSCIRCUIT_3D_OBJECT_REF=it===null?void 0:it},[]);return Ge.jsx("div",{className:Dp("flex flex-col relative rf-overflow-x-hidden",g),children:Ge.jsx("div",{className:Dp("rf-md:sticky rf-md:top-2",Qe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(LK,{value:Ie,onValueChange:Re,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:Dp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[I,I&&Ge.jsx("div",{className:"rf-flex-grow"}),!I&&L&&Ge.jsx(I9,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&Ge.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[pe?Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:pe}):d.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Ze=d.lastRenderEvent)==null?void 0:Ze.phase)??""}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(I9,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ge.jsxs(Ik,{children:[s&&Ge.jsx(qb,{value:"code",children:"Code"}),Ge.jsxs(qb,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ge.jsx("span",{className:Dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(qb,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ge.jsx("span",{className:Dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(qb,{value:"cad",children:[i&&Ge.jsx("span",{className:Dp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ie)&&Ge.jsx(qb,{value:Ie,children:dIe(Ie)}),Ge.jsxs(Voe,{children:[Ge.jsx(Koe,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(OGt,{className:"rf-w-4 rf-h-4"}),(Ae&&Ae.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ge.jsxs(nG,{className:"rf-*:text-xs",children:[NWt.map(it=>Ge.jsxs(Ib,{onSelect:()=>Re(it),children:[Ie!==it&&Ge.jsx(JPe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ie===it&&Ge.jsx(Xae,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:dIe(it)}),it==="errors"&&(Ae&&Ae.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ae==null?void 0:Ae.length})]},it)),Ge.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",RWt.split(".").map((it,pt)=>pt===2?parseInt(it)+1:it).join(".")]})})]})]})]}),te&&Ge.jsx(M_,{onClick:we,variant:"ghost",children:Qe?Ge.jsx(VGt,{size:16}):Ge.jsx(HGt,{size:16})})]}),s&&Ge.jsx(FB,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:l})}),Ge.jsx(FB,{value:"pcb",children:Ge.jsx("div",{className:Dp("rf-overflow-hidden",Qe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(SWt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Dp("rf-h-full rf-w-full",Qe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:it=>{H&&it.forEach(pt=>H(pt))}}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"assembly",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:i?Ge.jsx(gVt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"schematic",children:Ge.jsx("div",{className:Dp("rf-overflow-auto rf-bg-white",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(fVt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:it=>{H==null||H(it)},debugGrid:ie}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"cad",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{FallbackComponent:QGt,children:i?Ge.jsx(SGt,{ref:Ve,circuitJson:i,autoRotateDisabled:z}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"bom",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(CVt,{circuitJson:i}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"circuit_json",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ge.jsx(vVt,{elements:i}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"errors",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ae&&Ae.length>0||i?Ge.jsx(LHt,{code:r,circuitJsonErrors:Ae,circuitJsonWarnings:he,errorMessage:t,errorStack:n,autoroutingLog:B,onReportAutoroutingLog:N}):Ge.jsx(B9,{onRunClicked:e})})}),u&&Ge.jsx(FB,{value:"render_log",children:Ge.jsx(DWt,{renderLog:d})})]})})})};var JG="Dialog",[zGe,HGe]=VS(JG),[PWt,Bb]=zGe(JG),YGe=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=EM({prop:n,defaultProp:i??!1,onChange:a,caller:JG});return Ge.jsx(PWt,{scope:e,triggerRef:s,contentRef:l,contentId:KS(),titleId:KS(),descriptionId:KS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};YGe.displayName=JG;var VGe="DialogTrigger",KGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(VGe,t),a=s1(e,i.triggerRef);return Ge.jsx(Bv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Sle(i.open),...n,ref:a,onClick:zh(r.onClick,i.onOpenToggle)})});KGe.displayName=VGe;var Ble="DialogPortal",[kWt,jGe]=zGe(Ble,{forceMount:void 0}),JGe=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,a=Bb(Ble,e);return Ge.jsx(kWt,{scope:e,forceMount:t,children:nt.Children.map(n,o=>Ge.jsx(Jb,{present:t||a.open,children:Ge.jsx(Qoe,{asChild:!0,container:i,children:o})}))})};JGe.displayName=Ble;var WG="DialogOverlay",WGe=nt.forwardRef((r,e)=>{const t=jGe(WG,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Bb(WG,r.__scopeDialog);return a.modal?Ge.jsx(Jb,{present:n||a.open,children:Ge.jsx(FWt,{...i,ref:e})}):null});WGe.displayName=WG;var UWt=CM("DialogOverlay.RemoveScroll"),FWt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(WG,t);return Ge.jsx(Poe,{as:UWt,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(Bv.div,{"data-state":Sle(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),D9="DialogContent",qGe=nt.forwardRef((r,e)=>{const t=jGe(D9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Bb(D9,r.__scopeDialog);return Ge.jsx(Jb,{present:n||a.open,children:a.modal?Ge.jsx(LWt,{...i,ref:e}):Ge.jsx(GWt,{...i,ref:e})})});qGe.displayName=D9;var LWt=nt.forwardRef((r,e)=>{const t=Bb(D9,r.__scopeDialog),n=nt.useRef(null),i=s1(e,t.contentRef,n);return nt.useEffect(()=>{const a=n.current;if(a)return Xke(a)},[]),Ge.jsx(ZGe,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zh(r.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:zh(r.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:zh(r.onFocusOutside,a=>a.preventDefault())})}),GWt=nt.forwardRef((r,e)=>{const t=Bb(D9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ge.jsx(ZGe,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=r.onCloseAutoFocus)==null||o.call(r,a),a.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),ZGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=r,s=Bb(D9,t),l=nt.useRef(null),c=s1(e,l);return fke(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(hoe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(uoe,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sle(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(zWt,{titleId:s.titleId}),Ge.jsx(YWt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),ble="DialogTitle",XGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(ble,t);return Ge.jsx(Bv.h2,{id:i.titleId,...n,ref:e})});XGe.displayName=ble;var $Ge="DialogDescription",e7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb($Ge,t);return Ge.jsx(Bv.p,{id:i.descriptionId,...n,ref:e})});e7e.displayName=$Ge;var t7e="DialogClose",n7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(t7e,t);return Ge.jsx(Bv.button,{type:"button",...n,ref:e,onClick:zh(r.onClick,()=>i.onOpenChange(!1))})});n7e.displayName=t7e;function Sle(r){return r?"open":"closed"}var r7e="DialogTitleWarning",[OWt,i7e]=Uht(r7e,{contentName:D9,titleName:ble,docsSlug:"dialog"}),zWt=({titleId:r})=>{const e=i7e(r7e),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13496
+ `,onClick:n=>{n.stopPropagation(),t()},children:[Ge.jsx("input",{type:"checkbox",checked:e}),Ge.jsx("span",{style:{color:"#eee"},children:r})]}),_Wt=({children:r,elements:e})=>{const[t,n]=z1(G=>[G.is_mouse_over_container,G.setIsMouseOverContainer]),[i,a]=nt.useState(!1),[o,s]=nt.useState(!1),[l,c]=nt.useState(!1),[u,A]=z1(G=>[G.selected_layer,G.selectLayer]),[d,f,g,_,I,E]=z1(G=>[G.in_move_footprint_mode,G.in_draw_trace_mode,G.is_showing_rats_nest,G.is_showing_multiple_traces_length,G.is_showing_autorouting,G.is_showing_drc_errors]),x=z1(G=>G.setEditMode),B=z1(G=>G.setIsShowingRatsNest),N=z1(G=>G.setIsShowingMultipleTracesLength),L=z1(G=>G.setIsShowingAutorouting),U=z1(G=>G.setIsShowingDrcErrors);kw("1",()=>A("top")),kw("2",()=>A("bottom")),kw("3",()=>A("inner1")),kw("4",()=>A("inner2")),kw("5",()=>A("inner3")),kw("6",()=>A("inner4")),kw("7",()=>A("inner5")),kw("8",()=>A("inner6"));const H=(e==null?void 0:e.filter(G=>G.type.includes("error")).length)??0;return Ge.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>{n(!0)},onMouseLeave:G=>{n(!1),s(!1)},children:[r,Ge.jsxs("div",{style:{position:"absolute",bottom:4,right:8,pointerEvents:"none",color:"white",fontSize:11,opacity:t?.5:0,transition:"opacity 1s",transitionDelay:"2s",fontFamily:"sans-serif"},children:["@tscircuit/pcb-viewer@",CWt.version]}),Ge.jsxs("div",{style:{position:"absolute",opacity:t?1:0,top:16,left:16,transition:t?"opacity 100ms linear":"opacity 1s linear",zIndex:ux.toolbarOverlay,color:"red",display:"flex",fontSize:12,height:100,fontFamily:"sans-serif"},children:[Ge.jsxs(A5,{onClick:()=>{s(!o)},onMouseLeave:()=>{o&&s(!1)},children:[Ge.jsxs("div",{children:["layer:"," ",Ge.jsx("span",{style:{marginLeft:2,fontWeight:500,color:u5[u]},children:u})]}),o&&Ge.jsx("div",{style:{marginTop:4,minWidth:120},children:yle.map(G=>G.replace(/-/g,"")).map(G=>Ge.jsx(EWt,{name:G,selected:G===u,onClick:()=>{A(G.replace(/-/,""))}},G))})]}),Ge.jsxs(A5,{style:H>0?{color:"red"}:{},onClick:()=>c(!l),onMouseLeave:()=>c(!1),children:[Ge.jsxs("div",{children:[H," errors"]}),l&&Ge.jsx("div",{style:{display:"grid",gridTemplateColumns:"100px 300px"},children:e==null?void 0:e.filter(G=>G.type.includes("error")).map((G,W)=>Ge.jsxs(nt.Fragment,{children:[Ge.jsx("div",{children:G.error_type}),Ge.jsx("div",{children:G.message})]},W))})]}),Ge.jsx(A5,{style:{},onClick:()=>{x(f?"off":"draw_trace")},children:Ge.jsxs("div",{children:[f?"✖ ":"","Edit Traces"]})}),Ge.jsx(A5,{style:{},onClick:()=>{x(d?"off":"move_footprint")},children:Ge.jsxs("div",{children:[d?"✖ ":"","Move Components"]})}),Ge.jsx(A5,{style:{},onClick:()=>{B(!g)},children:Ge.jsxs("div",{children:[g?"✖ ":"","Rats Nest"]})}),Ge.jsx(A5,{onClick:()=>{a(!i)},children:Ge.jsxs("div",{children:[Ge.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:["View"," ",Ge.jsx("span",{style:{fontSize:"8px",transform:i?"rotate(180deg)":"rotate(0)",transition:"transform 0.1s ease",display:"inline-block"},children:"▼"})]}),i&&Ge.jsxs("div",{style:{marginTop:4,minWidth:120},children:[Ge.jsx(xle,{label:"Show All Trace Lengths",checked:_,onClick:()=>{N(!_)}}),Ge.jsx(xle,{label:"Show Autorouting Animation",checked:I,onClick:()=>{L(!I)}}),Ge.jsx(xle,{label:"Show DRC Errors",checked:E,onClick:()=>{U(!E)}})]})]})})]})]})},xWt=r=>{const{transform:e,elements:t}=r,[n,i]=nt.useMemo(()=>{const c=r.elements.flatMap(A=>PJt(A,r.elements)),u=GS(r.elements);return[c,u]},[r.elements]),[a,o]=nt.useState({drawingObjectIdsWithMouseOver:new Set,primitiveIdsInMousedOverNet:[]}),s=nt.useMemo(()=>NJt({primitivesWithoutInteractionMetadata:n,drawingObjectIdsWithMouseOver:a.drawingObjectIdsWithMouseOver,primitiveIdsInMousedOverNet:a.primitiveIdsInMousedOverNet}),[n,a]),l=nt.useCallback(c=>{var d,f;const u=[];for(const g of c)if(g._element){const _=i.getNetConnectedToId("pcb_port_id"in g._element?(d=g._element)==null?void 0:d.pcb_port_id:"pcb_trace_id"in g._element?(f=g._element)==null?void 0:f.pcb_trace_id:"");u.push(...i.getIdsConnectedToNet(_))}const A=new Set(c.map(g=>g._pcb_drawing_object_id));o({drawingObjectIdsWithMouseOver:A,primitiveIdsInMousedOverNet:u})},[i]);return Ge.jsx(vWt,{elements:t,transform:e,primitives:n,onMouseHoverOverPrimitives:l,children:Ge.jsx(nWt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ge.jsx(oWt,{disabled:!r.allowEditing,transform:e,soup:t,cancelPanDrag:r.cancelPanDrag,onCreateEditEvent:r.onCreateEditEvent,onModifyEditEvent:r.onModifyEditEvent,children:Ge.jsx(eWt,{transform:e,focusOnHover:r.focusOnHover,children:Ge.jsx(_Wt,{elements:t,children:Ge.jsx(cWt,{transform:e,elements:t,children:Ge.jsx(IWt,{transform:e,soup:t,children:Ge.jsx(XJt,{transform:e,debugGraphics:r.debugGraphics,children:Ge.jsx($Jt,{transform:e,elements:t,children:Ge.jsx(ZJt,{transform:e,primitives:s,width:r.width,height:r.height,grid:r.grid})})})})})})})})})})},BWt=Fu(Od(400,300),T1(40,-40)),bWt=({circuitJson:r,debugGraphics:e,height:t=600,initialState:n,allowEditing:i=!0,editEvents:a,onEditEventsChanged:o,focusOnHover:s=!1,clickToInteractEnabled:l=!1})=>{const[c,u]=nt.useState(!l),[A,d]=Ele(),[f,g]=nt.useState(BWt),{ref:_,setTransform:I,cancelDrag:E}=RJt({transform:f,onSetTransform:g,enabled:c});let[x,B]=nt.useState([]);x=a??x;const N=nt.useRef(!1),L=nt.useRef(null),U=`${(r==null?void 0:r.length)||0}_${(r==null?void 0:r.editCount)||0}`,H=()=>{const te=(d==null?void 0:d.width)>0?d:{width:500,height:500},{center:le,width:pe,height:Ae}=W.some(ge=>ge.type.startsWith("pcb_"))?EJt(W.filter(ge=>ge.type.startsWith("pcb_"))):{center:{x:0,y:0},width:.001,height:.001},he=Math.min((te.width??0)/pe,(te.height??0)/Ae,100)*.75,Ie=Fu(Od((te.width??0)/2,(te.height??0)/2),T1(he,-he,0,0),Od(-le.x,-le.y));I(Ie)};nt.useEffect(()=>{d!=null&&d.width&&r&&r.length!==0&&(N.current||(H(),N.current=!0))},[r,d]);const G=nt.useMemo(()=>(r==null?void 0:r.filter(te=>te.type.startsWith("pcb_")||te.type.startsWith("source_")))??[],[U]),W=nt.useMemo(()=>Nft({circuitJson:G,editEvents:x}),[G,x]),z=te=>{B([...x,te]),o==null||o([...x,te])},ie=te=>{const le=x.map(pe=>pe.edit_event_id===te.edit_event_id?{...pe,...te}:pe);B(le),o==null||o(le)};return Ge.jsxs("div",{ref:_,style:{position:"relative"},children:[Ge.jsx("div",{ref:A,children:Ge.jsxs(xJt,{initialState:n,children:[Ge.jsx(xWt,{transform:f,height:t,width:d.width,allowEditing:i,focusOnHover:s,cancelPanDrag:E,onCreateEditEvent:z,onModifyEditEvent:ie,grid:{spacing:1,view_window:{left:0,right:d.width||500,top:t,bottom:0}},elements:W,debugGraphics:e},d.width),Ge.jsx(bJt,{})]})}),l&&!c&&Ge.jsx("div",{onClick:()=>{u(!0),H()},onTouchStart:te=>{const le=te.touches[0];L.current={x:le.clientX,y:le.clientY}},onTouchEnd:te=>{const le=te.changedTouches[0],pe=L.current;if(!pe)return;const Ae=Math.abs(le.clientX-pe.x),he=Math.abs(le.clientY-pe.y);Ae<10&&he<10&&(te.preventDefault(),u(!0),H()),L.current=null},style:{position:"absolute",inset:0,cursor:"pointer",zIndex:ux.clickToInteractOverlay,display:"flex",alignItems:"center",justifyContent:"center",touchAction:"pan-x pan-y pinch-zoom"},children:Ge.jsx("div",{style:{backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"12px 24px",borderRadius:"8px",fontSize:"16px",pointerEvents:"none"},children:typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)?"Touch to Interact":"Click to Interact"})})]})};const SWt=({containerClassName:r,...e})=>{const t=nt.useRef(null),[n,i]=nt.useState(620);return nt.useLayoutEffect(()=>{const a=()=>{if(t.current){const s=t.current.clientHeight,l=window.innerHeight;i(Math.min(Math.max(s,620),l))}};a();const o=new ResizeObserver(a);return t.current&&o.observe(t.current),window.addEventListener("resize",a),()=>{o.disconnect(),window.removeEventListener("resize",a)}},[]),Ge.jsx("div",{ref:t,className:r||"rf-w-full rf-h-full",children:Ge.jsx(bWt,{...e,height:n})})},wWt='*,: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.17 | 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-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-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.-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-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-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{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-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-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[620px\\]{height:620px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[calc\\(100vh-96px\\)\\]{height:calc(100vh - 96px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.\\!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-\\[500px\\]{max-height:500px}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[200px\\]{min-height:200px}.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-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.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-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-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.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-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-xl{max-width:36rem}.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-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-\\[-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-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-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}.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}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.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-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/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-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-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-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-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-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-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-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.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-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-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-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-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-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-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-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.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,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-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-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-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/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-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\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.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-\\[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-\\[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\\]\\: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-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-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\\: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-\\[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-\\[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-mt-0{margin-top:0}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-justify-end{justify-content:flex-end}.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-rounded-lg{border-radius:var(--radius)}.sm\\:rf-text-left{text-align:left}}@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))}.\\[\\&_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}',QWt=()=>{nt.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=wWt,document.head.appendChild(e)},[])},OGe=r=>`hsl(${Vx.indexOf(r)*137.5%360}, 70%, 50%)`,MWt=({phaseTimings:r})=>{if(!r)return null;const e=Object.values(r).reduce((t,n)=>t+n,0);return Ge.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[Ge.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Vx.map(t=>{const n=r[t]||0,i=n/e*100;return Ge.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${i}%`,backgroundColor:OGe(t)},children:Ge.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,": ",n.toFixed(1),"ms"]})},t)})}),Ge.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},DWt=({renderLog:r})=>{const[e,t]=nt.useState("chronological");if(!r)return Ge.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const n=Object.entries((r==null?void 0:r.phaseTimings)??{});e==="chronological"?n.sort((a,o)=>Vx.indexOf(a[0])-Vx.indexOf(o[0])):n.sort((a,o)=>o[1]-a[1]);const i=n.reduce((a,[o,s])=>a+s,0);return Ge.jsxs("div",{className:"rf-bg-white",children:[Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[Ge.jsx("div",{children:"Render Logs"}),Ge.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[Ge.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),Ge.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[Ge.jsx("option",{value:"chronological",children:"Phase Order"}),Ge.jsx("option",{value:"longest",children:"Duration"})]})]})]}),Ge.jsx(MWt,{phaseTimings:r.phaseTimings}),Ge.jsxs("table",{className:"rf-w-full rf-text-xs",children:[Ge.jsx("thead",{children:Ge.jsxs("tr",{children:[Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),Ge.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),Ge.jsx("tbody",{children:n.map(([a,o])=>Ge.jsxs("tr",{children:[Ge.jsx("td",{className:"rf-p-2",children:Vx.indexOf(a)}),Ge.jsx("td",{className:"rf-p-2",children:a}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsx("div",{className:"rf-w-8",children:Ge.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:OGe(a),width:`${o/i*100}%`}})})}),Ge.jsx("td",{className:"rf-p-2",children:Ge.jsxs("div",{className:"rf-flex w-full",children:[Ge.jsxs("span",{className:"rf-flex-grow",children:[o,"ms"]}),Ge.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(o/i*100).toFixed(1),"%"]})]})})]},a))})]})]})},RWt="0.0.572",NWt=["assembly","bom","circuit_json","errors","render_log"],TWt=({code:r,onRunClicked:e=void 0,errorMessage:t,errorStack:n,circuitJson:i,autoroutingGraphics:a,showRightHeaderContent:o=!0,showCodeTab:s=!1,codeTabContent:l,showJsonTab:c=!0,showRenderLogTab:u=!0,onActiveTabChange:A,renderLog:d,showImportAndFormatButtons:f=!0,className:g,headerClassName:_,leftHeaderContent:I,readOnly:E,isStreaming:x,autoroutingLog:B,onReportAutoroutingLog:N,isRunningCode:L,hasCodeChangedSinceLastRun:U,onEditEvent:H,editEvents:G,defaultActiveTab:W,autoRotate3dViewerDisabled:z,showSchematicDebugGrid:ie=!1,showToggleFullScreen:te=!0,defaultToFullScreen:le=!1,activeEffectName:pe})=>{var Ze;QWt();const Ae=nt.useMemo(()=>i?i.filter(it=>it&&"error_type"in it||it.type.includes("error")):null,[i]),he=nt.useMemo(()=>i?i.filter(it=>it&&"warning_type"in it||it.type.includes("warning")):null,[i]),[Ie,ge]=nt.useState(W??"pcb"),[Qe,be]=nt.useState(le),Re=nt.useCallback(it=>{ge(it),A==null||A(it)},[A]),we=()=>{be(!Qe)};nt.useEffect(()=>{t&&Re("errors")},[t]),nt.useEffect(()=>{(Ie==="code"||Ie==="errors")&&i&&!t&&Re(W??"pcb")},[i]);const Ve=nt.useCallback(it=>{window.TSCIRCUIT_3D_OBJECT_REF=it===null?void 0:it},[]);return Ge.jsx("div",{className:Dp("flex flex-col relative rf-overflow-x-hidden",g),children:Ge.jsx("div",{className:Dp("rf-md:sticky rf-md:top-2",Qe&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-bg-white"),children:Ge.jsxs(LK,{value:Ie,onValueChange:Re,className:"rf-flex-grow rf-flex rf-flex-col",children:[Ge.jsxs("div",{className:Dp("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",_),children:[I,I&&Ge.jsx("div",{className:"rf-flex-grow"}),!I&&L&&Ge.jsx(I9,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!I&&Ge.jsx("div",{className:"rf-flex-grow"}),d&&d.progress!==1&&!t&&Ge.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[pe?Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:pe}):d.lastRenderEvent&&Ge.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:((Ze=d.lastRenderEvent)==null?void 0:Ze.phase)??""}),Ge.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white",children:Ge.jsx(I9,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),Ge.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums",children:[((d.progress??0)*100).toFixed(1),"%"]})]}),o&&Ge.jsxs(Ik,{children:[s&&Ge.jsx(qb,{value:"code",children:"Code"}),Ge.jsxs(qb,{value:"pcb",className:"rf-whitespace-nowrap",children:[i&&Ge.jsx("span",{className:Dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}),Ge.jsxs(qb,{value:"schematic",className:"rf-whitespace-nowrap",children:[i&&Ge.jsx("span",{className:Dp("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}),Ge.jsxs(qb,{value:"cad",children:[i&&Ge.jsx("span",{className:Dp("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",U?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}),!["pcb","cad","schematic"].includes(Ie)&&Ge.jsx(qb,{value:Ie,children:dIe(Ie)}),Ge.jsxs(Voe,{children:[Ge.jsx(Koe,{asChild:!0,children:Ge.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[Ge.jsx(OGt,{className:"rf-w-4 rf-h-4"}),(Ae&&Ae.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),Ge.jsxs(nG,{className:"rf-*:text-xs",children:[NWt.map(it=>Ge.jsxs(Ib,{onSelect:()=>Re(it),children:[Ie!==it&&Ge.jsx(JPe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),Ie===it&&Ge.jsx(Xae,{className:"rf-w-3 rf-h-3"}),Ge.jsx("div",{className:"rf-pr-2",children:dIe(it)}),it==="errors"&&(Ae&&Ae.length>0||t)&&Ge.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:t?1:Ae==null?void 0:Ae.length})]},it)),Ge.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:Ge.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",RWt.split(".").map((it,pt)=>pt===2?parseInt(it)+1:it).join(".")]})})]})]})]}),te&&Ge.jsx(M_,{onClick:we,variant:"ghost",children:Qe?Ge.jsx(VGt,{size:16}):Ge.jsx(HGt,{size:16})})]}),s&&Ge.jsx(FB,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:Ge.jsx("div",{className:"rf-h-full",children:l})}),Ge.jsx(FB,{value:"pcb",children:Ge.jsx("div",{className:Dp("rf-overflow-hidden",Qe?"rf-h-[calc(100vh-52px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(SWt,{focusOnHover:!1,circuitJson:i,debugGraphics:a,containerClassName:Dp("rf-h-full rf-w-full",Qe?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:it=>{H&&it.forEach(pt=>H(pt))}}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"assembly",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallback:Ge.jsx("div",{children:"Error loading Assembly"}),children:i?Ge.jsx(gVt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"schematic",children:Ge.jsx("div",{className:Dp("rf-overflow-auto rf-bg-white",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(fVt,{circuitJson:i,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:it=>{H==null||H(it)},debugGrid:ie}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"cad",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{FallbackComponent:QGt,children:i?Ge.jsx(SGt,{ref:Ve,circuitJson:i,autoRotateDisabled:z}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"bom",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallbackRender:({error:it})=>Ge.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:Ge.jsxs("div",{className:"rf-p-4",children:[Ge.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),Ge.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:(it==null?void 0:it.message)||"An unknown error occurred"})]})}),children:i?Ge.jsx(CVt,{circuitJson:i}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"circuit_json",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:Ge.jsx(z3,{fallback:Ge.jsx("div",{children:"Error loading JSON viewer"}),children:i?Ge.jsx(vVt,{elements:i}):Ge.jsx(B9,{onRunClicked:e})})})}),Ge.jsx(FB,{value:"errors",children:Ge.jsx("div",{className:Dp("rf-overflow-auto",Qe?"rf-h-[calc(100vh-96px)]":"rf-h-[620px]"),children:t||Ae&&Ae.length>0||i?Ge.jsx(LHt,{code:r,circuitJsonErrors:Ae,circuitJsonWarnings:he,errorMessage:t,errorStack:n,autoroutingLog:B,onReportAutoroutingLog:N}):Ge.jsx(B9,{onRunClicked:e})})}),u&&Ge.jsx(FB,{value:"render_log",children:Ge.jsx(DWt,{renderLog:d})})]})})})};var JG="Dialog",[zGe,HGe]=VS(JG),[PWt,Bb]=zGe(JG),YGe=r=>{const{__scopeDialog:e,children:t,open:n,defaultOpen:i,onOpenChange:a,modal:o=!0}=r,s=nt.useRef(null),l=nt.useRef(null),[c,u]=EM({prop:n,defaultProp:i??!1,onChange:a,caller:JG});return Ge.jsx(PWt,{scope:e,triggerRef:s,contentRef:l,contentId:KS(),titleId:KS(),descriptionId:KS(),open:c,onOpenChange:u,onOpenToggle:nt.useCallback(()=>u(A=>!A),[u]),modal:o,children:t})};YGe.displayName=JG;var VGe="DialogTrigger",KGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(VGe,t),a=s1(e,i.triggerRef);return Ge.jsx(Bv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Sle(i.open),...n,ref:a,onClick:zh(r.onClick,i.onOpenToggle)})});KGe.displayName=VGe;var Ble="DialogPortal",[kWt,jGe]=zGe(Ble,{forceMount:void 0}),JGe=r=>{const{__scopeDialog:e,forceMount:t,children:n,container:i}=r,a=Bb(Ble,e);return Ge.jsx(kWt,{scope:e,forceMount:t,children:nt.Children.map(n,o=>Ge.jsx(Jb,{present:t||a.open,children:Ge.jsx(Qoe,{asChild:!0,container:i,children:o})}))})};JGe.displayName=Ble;var WG="DialogOverlay",WGe=nt.forwardRef((r,e)=>{const t=jGe(WG,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Bb(WG,r.__scopeDialog);return a.modal?Ge.jsx(Jb,{present:n||a.open,children:Ge.jsx(FWt,{...i,ref:e})}):null});WGe.displayName=WG;var UWt=CM("DialogOverlay.RemoveScroll"),FWt=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(WG,t);return Ge.jsx(Poe,{as:UWt,allowPinchZoom:!0,shards:[i.contentRef],children:Ge.jsx(Bv.div,{"data-state":Sle(i.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),D9="DialogContent",qGe=nt.forwardRef((r,e)=>{const t=jGe(D9,r.__scopeDialog),{forceMount:n=t.forceMount,...i}=r,a=Bb(D9,r.__scopeDialog);return Ge.jsx(Jb,{present:n||a.open,children:a.modal?Ge.jsx(LWt,{...i,ref:e}):Ge.jsx(GWt,{...i,ref:e})})});qGe.displayName=D9;var LWt=nt.forwardRef((r,e)=>{const t=Bb(D9,r.__scopeDialog),n=nt.useRef(null),i=s1(e,t.contentRef,n);return nt.useEffect(()=>{const a=n.current;if(a)return Xke(a)},[]),Ge.jsx(ZGe,{...r,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:zh(r.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=t.triggerRef.current)==null||o.focus()}),onPointerDownOutside:zh(r.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:zh(r.onFocusOutside,a=>a.preventDefault())})}),GWt=nt.forwardRef((r,e)=>{const t=Bb(D9,r.__scopeDialog),n=nt.useRef(!1),i=nt.useRef(!1);return Ge.jsx(ZGe,{...r,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=r.onCloseAutoFocus)==null||o.call(r,a),a.defaultPrevented||(n.current||(s=t.triggerRef.current)==null||s.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=r.onInteractOutside)==null||l.call(r,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=t.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),ZGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=r,s=Bb(D9,t),l=nt.useRef(null),c=s1(e,l);return fke(),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(hoe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Ge.jsx(uoe,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sle(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),Ge.jsxs(Ge.Fragment,{children:[Ge.jsx(zWt,{titleId:s.titleId}),Ge.jsx(YWt,{contentRef:l,descriptionId:s.descriptionId})]})]})}),ble="DialogTitle",XGe=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(ble,t);return Ge.jsx(Bv.h2,{id:i.titleId,...n,ref:e})});XGe.displayName=ble;var $Ge="DialogDescription",e7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb($Ge,t);return Ge.jsx(Bv.p,{id:i.descriptionId,...n,ref:e})});e7e.displayName=$Ge;var t7e="DialogClose",n7e=nt.forwardRef((r,e)=>{const{__scopeDialog:t,...n}=r,i=Bb(t7e,t);return Ge.jsx(Bv.button,{type:"button",...n,ref:e,onClick:zh(r.onClick,()=>i.onOpenChange(!1))})});n7e.displayName=t7e;function Sle(r){return r?"open":"closed"}var r7e="DialogTitleWarning",[OWt,i7e]=Uht(r7e,{contentName:D9,titleName:ble,docsSlug:"dialog"}),zWt=({titleId:r})=>{const e=i7e(r7e),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
13497
13497
 
13498
13498
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
13499
13499
 
@@ -13673,7 +13673,7 @@ to {
13673
13673
  > * {
13674
13674
  pointer-events: auto;
13675
13675
  }
13676
- `,l7=16,mZt=({reverseOrder:r,position:e="top-center",toastOptions:t,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=Vqt(t);return nt.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:l7,left:l7,right:l7,bottom:l7,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,A=l.calculateOffset(c,{reverseOrder:r,gutter:n,defaultPosition:e}),d=pZt(u,A);return nt.createElement(hZt,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?gZt:"",style:d},c.type==="custom"?o7(c.message,c):i?i(c):nt.createElement(fZt,{toast:c,position:u}))}))};class Ole extends Error{constructor(t,n,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${n.method} ${n.url}`);Ke(this,"response");Ke(this,"request");Ke(this,"options");this.name="HTTPError",this.response=t,this.request=n,this.options=i}}class N7e extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);Ke(this,"request");this.name="TimeoutError",this.request=t}}const T7e=(()=>{let r=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(t&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return r&&!e})(),yZt=typeof globalThis.AbortController=="function",vZt=typeof globalThis.ReadableStream=="function",IZt=typeof globalThis.FormData=="function",P7e=["get","post","put","patch","head","delete"],CZt={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},zle=2147483647,EZt=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,k7e=Symbol("stop"),_Zt={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},xZt={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},BZt=r=>{if(!r)return 0;if(r instanceof FormData){let e=0;for(const[t,n]of r)e+=EZt,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return e}if(r instanceof Blob)return r.size;if(r instanceof ArrayBuffer)return r.byteLength;if(typeof r=="string")return new TextEncoder().encode(r).length;if(r instanceof URLSearchParams)return new TextEncoder().encode(r.toString()).length;if("byteLength"in r)return r.byteLength;if(typeof r=="object"&&r!==null)try{const e=JSON.stringify(r);return new TextEncoder().encode(e).length}catch{return 0}return 0},bZt=(r,e)=>{const t=Number(r.headers.get("content-length"))||0;let n=0;return r.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:n},new Uint8Array),new Response(null,{status:r.status,statusText:r.statusText,headers:r.headers})):new Response(new ReadableStream({async start(i){const a=r.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){n+=l.byteLength;const c=t===0?0:n/t;e({percent:c,transferredBytes:n,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:r.status,statusText:r.statusText,headers:r.headers})},SZt=(r,e)=>{const t=BZt(r.body);let n=0;return new Request(r,{duplex:"half",body:new ReadableStream({async start(i){const a=r.body instanceof ReadableStream?r.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:n,totalBytes:Math.max(t,n)},new Uint8Array),i.close();return}n+=l.byteLength;let c=t===0?0:n/t;(t<n||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:n,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},N4=r=>r!==null&&typeof r=="object",c7=(...r)=>{for(const e of r)if((!N4(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Hle({},...r)},U7e=(r={},e={})=>{const t=new globalThis.Headers(r),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())n&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function u7(r,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:Hle(r[t]??[],e[t]??[])}const F7e=(r={},e={})=>({beforeRequest:u7(r,e,"beforeRequest"),beforeRetry:u7(r,e,"beforeRetry"),afterResponse:u7(r,e,"afterResponse"),beforeError:u7(r,e,"beforeError")}),Hle=(...r)=>{let e={},t={},n={};for(const i of r)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(N4(i)){for(let[a,o]of Object.entries(i))N4(o)&&a in e&&(o=Hle(e[a],o)),e={...e,[a]:o};N4(i.hooks)&&(n=F7e(n,i.hooks),e.hooks=n),N4(i.headers)&&(t=U7e(t,i.headers),e.headers=t)}return e},wZt=r=>P7e.includes(r)?r.toUpperCase():r,L7e={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:r=>.3*2**(r-1)*1e3},QZt=(r={})=>{if(typeof r=="number")return{...L7e,limit:r};if(r.methods&&!Array.isArray(r.methods))throw new Error("retry.methods must be an array");if(r.statusCodes&&!Array.isArray(r.statusCodes))throw new Error("retry.statusCodes must be an array");return{...L7e,...r}};async function MZt(r,e,t,n){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new N7e(r))},n.timeout);n.fetch(r,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function DZt(r,{signal:e}){return new Promise((t,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),n(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},r)})}const RZt=(r,e)=>{const t={};for(const n in e)!(n in xZt)&&!(n in _Zt)&&!(n in r)&&(t[n]=e[n]);return t};class A7{constructor(e,t={}){Ke(this,"request");Ke(this,"abortController");Ke(this,"_retryCount",0);Ke(this,"_input");Ke(this,"_options");var n,i;if(this._input=e,this._options={...t,headers:U7e(this._input.headers,t.headers),hooks:F7e({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:wZt(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:QZt(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(yZt){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(T7e&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(n=this._options).stringifyJson)==null?void 0:i.call(n,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(IZt&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!T7e)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=SZt(this.request,this._options.onUploadProgress))}}static create(e,t){const n=new A7(e,t),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>zle)throw new RangeError(`The \`timeout\` option cannot be greater than ${zle}`);await Promise.resolve();let s=await n._fetch();for(const l of n._options.hooks.afterResponse){const c=await l(n.request,n._options,n._decorateResponse(s.clone()));c instanceof globalThis.Response&&(s=c)}if(n._decorateResponse(s),!s.ok&&n._options.throwHttpErrors){let l=new Ole(s,n.request,n._options);for(const c of n._options.hooks.beforeError)l=await c(l);throw l}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!vZt)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return bZt(s.clone(),n._options.onDownloadProgress)}return s},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i()).finally(async()=>{var s;n.request.bodyUsed||await((s=n.request.body)==null?void 0:s.cancel())});for(const[s,l]of Object.entries(CZt))o[s]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof N7e)throw e;if(e instanceof Ole){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const n=Math.min(this._calculateRetryDelay(t),zle);if(this._retryCount<1)throw t;await DZt(n,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===k7e)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=RZt(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):MZt(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Yle=r=>{const e=(t,n)=>A7.create(t,c7(r,n));for(const t of P7e)e[t]=(n,i)=>A7.create(n,c7(r,i,{method:t}));return e.create=t=>Yle(c7(t)),e.extend=t=>(typeof t=="function"&&(t=t(r??{})),Yle(c7(r,t))),e.stop=k7e,e},G7e=Yle();function Vle(r){return typeof window<"u"?window[r]:null}function T4(){const r=Vle("TSCIRCUIT_REGISTRY_API_BASE_URL")||void 0||"https://registry-api.tscircuit.com",e=Vle("TSCIRCUIT_REGISTRY_TOKEN");return G7e.create({prefixUrl:r,headers:{Authorization:`Bearer ${e}`},timeout:3e4})}const Kle={get:(r,e)=>T4().get(r,e),post:(r,e)=>T4().post(r,e),put:(r,e)=>T4().put(r,e),delete:(r,e)=>T4().delete(r,e),patch:(r,e)=>T4().patch(r,e)},NZt=async r=>{try{const{order_quote_id:e}=await Kle.post("order_quotes/create",{json:{package_release_id:r,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Ole){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},TZt=async r=>{const{order_quote:e}=await Kle.get("order_quotes/get",{searchParams:{order_quote_id:r}}).json();return e},PZt=()=>{const r=Fle();return xqt({mutationKey:["createOrderQuote"],mutationFn:e=>NZt(e),onSuccess:e=>{r.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},kZt=r=>{const{data:e,error:t,status:n}=bqt(["getOrderQuote",r],()=>TZt(r||""),{enabled:!!r,refetchInterval:i=>i!=null&&i.is_completed||i!=null&&i.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:n==="loading"?"loading":n==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},UZt=({onCancel:r,packageReleaseId:e,signIn:t,isLoggedIn:n})=>{var g,_,I,E;const[i,a]=nt.useState(null),[o,s]=nt.useState(null),{mutate:l,error:c}=PZt();nt.useEffect(()=>{e&&l(e,{onSuccess:x=>{s(x.order_quote_id)}})},[e]);const{data:u}=kZt(o||void 0),A=async x=>{const B=Vle("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${B}?client_reference_id=${x}&shipping_option=${i}`};nt.useEffect(()=>{if(i===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const x=u.shipping_options.reduce((B,N)=>N.cost<B.cost?N:B,u.shipping_options[0]);a((x==null?void 0:x.carrier)||null)}},[u]);const d=nt.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((x,B)=>B.cost<x.cost?B:x,u.shipping_options[0]).cost:0,[u]),f=c&&((g=c.error_code)==null?void 0:g.includes("no_token"))||((I=(_=u==null?void 0:u.error)==null?void 0:_.error_code)==null?void 0:I.includes("no_token"))&&t;return!n||f?Ge.jsx(GZt,{signIn:t}):Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(c||u!=null&&u.error)&&(!o||!u||(u==null?void 0:u.is_processing))&&Ge.jsx(FZt,{message:"Fetching quotes..."}),(c||(u==null?void 0:u.error))&&Ge.jsx(LZt,{message:c&&c.message||((E=u==null?void 0:u.error)==null?void 0:E.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!c&&!(u!=null&&u.error)&&Array.isArray(u==null?void 0:u.shipping_options)&&u.shipping_options.length>0&&Ge.jsxs(Ge.Fragment,{children:[Ge.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),Ge.jsx(Sqt,{orderQuote:u,selectedShippingCarrier:i,onSelectShippingCarrier:a,lowestShippingCarrierCost:d+(u.total_cost_without_shipping||0)},u==null?void 0:u.order_quote_id)]}),Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[Ge.jsx(M_,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:r,children:"Cancel"}),Ge.jsx(M_,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:i===null,onClick:()=>{if(i===null){T_.error("Please select a shipping option.");return}u&&A(u.order_quote_id)},children:"Continue"})]}),Ge.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},FZt=({message:r})=>Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[Ge.jsx(I9,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),Ge.jsx("p",{className:"rf-text-gray-600",children:r})]}),LZt=({message:r})=>Ge.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:r}),GZt=({signIn:r})=>Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[Ge.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),Ge.jsxs(M_,{onClick:r,className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsx(YPe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),OZt=new hqt,zZt=({isOpen:r,onClose:e,stage:t,setStage:n,circuitJson:i,packageReleaseId:a,signIn:o,isLoggedIn:s})=>Ge.jsx(Iqt,{client:OZt,children:Ge.jsx(KWt,{open:r,onOpenChange:l=>{l||e()},children:Ge.jsx(c7e,{className:"!rf-max-w-[660px] !rf-p-0",children:Ge.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&Ge.jsx(UZt,{onCancel:e,packageReleaseId:a??"",signIn:o??(()=>{}),isLoggedIn:s})})})})}),HZt=({isOpen:r,onClose:e,stage:t,setStage:n,signIn:i,isLoggedIn:a})=>{const o=lb(s=>s.circuitJson);return Ge.jsx(zZt,{signIn:i,isOpen:r,onClose:e,stage:t,setStage:n,circuitJson:o,isLoggedIn:a??!1})},YZt=()=>{const[r,e]=nt.useState(!1),[t,n]=nt.useState("initial");return{isOpen:r,stage:t,open:()=>e(!0),close:()=>{e(!1),n("initial")},setStage:n,OrderDialog:HZt}};/**
13676
+ `,l7=16,mZt=({reverseOrder:r,position:e="top-center",toastOptions:t,gutter:n,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=Vqt(t);return nt.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:l7,left:l7,right:l7,bottom:l7,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||e,A=l.calculateOffset(c,{reverseOrder:r,gutter:n,defaultPosition:e}),d=pZt(u,A);return nt.createElement(hZt,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?gZt:"",style:d},c.type==="custom"?o7(c.message,c):i?i(c):nt.createElement(fZt,{toast:c,position:u}))}))};class Ole extends Error{constructor(t,n,i){const a=t.status||t.status===0?t.status:"",o=t.statusText||"",s=`${a} ${o}`.trim(),l=s?`status code ${s}`:"an unknown error";super(`Request failed with ${l}: ${n.method} ${n.url}`);Ke(this,"response");Ke(this,"request");Ke(this,"options");this.name="HTTPError",this.response=t,this.request=n,this.options=i}}class N7e extends Error{constructor(t){super(`Request timed out: ${t.method} ${t.url}`);Ke(this,"request");this.name="TimeoutError",this.request=t}}const T7e=(()=>{let r=!1,e=!1;const t=typeof globalThis.ReadableStream=="function",n=typeof globalThis.Request=="function";if(t&&n)try{e=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type")}catch(i){if(i instanceof Error&&i.message==="unsupported BodyInit type")return!1;throw i}return r&&!e})(),yZt=typeof globalThis.AbortController=="function",vZt=typeof globalThis.ReadableStream=="function",IZt=typeof globalThis.FormData=="function",P7e=["get","post","put","patch","head","delete"],CZt={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},zle=2147483647,EZt=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,k7e=Symbol("stop"),_Zt={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},xZt={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},BZt=r=>{if(!r)return 0;if(r instanceof FormData){let e=0;for(const[t,n]of r)e+=EZt,e+=new TextEncoder().encode(`Content-Disposition: form-data; name="${t}"`).length,e+=typeof n=="string"?new TextEncoder().encode(n).length:n.size;return e}if(r instanceof Blob)return r.size;if(r instanceof ArrayBuffer)return r.byteLength;if(typeof r=="string")return new TextEncoder().encode(r).length;if(r instanceof URLSearchParams)return new TextEncoder().encode(r.toString()).length;if("byteLength"in r)return r.byteLength;if(typeof r=="object"&&r!==null)try{const e=JSON.stringify(r);return new TextEncoder().encode(e).length}catch{return 0}return 0},bZt=(r,e)=>{const t=Number(r.headers.get("content-length"))||0;let n=0;return r.status===204?(e&&e({percent:1,totalBytes:t,transferredBytes:n},new Uint8Array),new Response(null,{status:r.status,statusText:r.statusText,headers:r.headers})):new Response(new ReadableStream({async start(i){const a=r.body.getReader();e&&e({percent:0,transferredBytes:0,totalBytes:t},new Uint8Array);async function o(){const{done:s,value:l}=await a.read();if(s){i.close();return}if(e){n+=l.byteLength;const c=t===0?0:n/t;e({percent:c,transferredBytes:n,totalBytes:t},l)}i.enqueue(l),await o()}await o()}}),{status:r.status,statusText:r.statusText,headers:r.headers})},SZt=(r,e)=>{const t=BZt(r.body);let n=0;return new Request(r,{duplex:"half",body:new ReadableStream({async start(i){const a=r.body instanceof ReadableStream?r.body.getReader():new Response("").body.getReader();async function o(){const{done:s,value:l}=await a.read();if(s){e&&e({percent:1,transferredBytes:n,totalBytes:Math.max(t,n)},new Uint8Array),i.close();return}n+=l.byteLength;let c=t===0?0:n/t;(t<n||c===1)&&(c=.99),e&&e({percent:Number(c.toFixed(2)),transferredBytes:n,totalBytes:t},l),i.enqueue(l),await o()}await o()}})})},N4=r=>r!==null&&typeof r=="object",c7=(...r)=>{for(const e of r)if((!N4(e)||Array.isArray(e))&&e!==void 0)throw new TypeError("The `options` argument must be an object");return Hle({},...r)},U7e=(r={},e={})=>{const t=new globalThis.Headers(r),n=e instanceof globalThis.Headers,i=new globalThis.Headers(e);for(const[a,o]of i.entries())n&&o==="undefined"||o===void 0?t.delete(a):t.set(a,o);return t};function u7(r,e,t){return Object.hasOwn(e,t)&&e[t]===void 0?[]:Hle(r[t]??[],e[t]??[])}const F7e=(r={},e={})=>({beforeRequest:u7(r,e,"beforeRequest"),beforeRetry:u7(r,e,"beforeRetry"),afterResponse:u7(r,e,"afterResponse"),beforeError:u7(r,e,"beforeError")}),Hle=(...r)=>{let e={},t={},n={};for(const i of r)if(Array.isArray(i))Array.isArray(e)||(e=[]),e=[...e,...i];else if(N4(i)){for(let[a,o]of Object.entries(i))N4(o)&&a in e&&(o=Hle(e[a],o)),e={...e,[a]:o};N4(i.hooks)&&(n=F7e(n,i.hooks),e.hooks=n),N4(i.headers)&&(t=U7e(t,i.headers),e.headers=t)}return e},wZt=r=>P7e.includes(r)?r.toUpperCase():r,L7e={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:r=>.3*2**(r-1)*1e3},QZt=(r={})=>{if(typeof r=="number")return{...L7e,limit:r};if(r.methods&&!Array.isArray(r.methods))throw new Error("retry.methods must be an array");if(r.statusCodes&&!Array.isArray(r.statusCodes))throw new Error("retry.statusCodes must be an array");return{...L7e,...r}};async function MZt(r,e,t,n){return new Promise((i,a)=>{const o=setTimeout(()=>{t&&t.abort(),a(new N7e(r))},n.timeout);n.fetch(r,e).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function DZt(r,{signal:e}){return new Promise((t,n)=>{e&&(e.throwIfAborted(),e.addEventListener("abort",i,{once:!0}));function i(){clearTimeout(a),n(e.reason)}const a=setTimeout(()=>{e==null||e.removeEventListener("abort",i),t()},r)})}const RZt=(r,e)=>{const t={};for(const n in e)!(n in xZt)&&!(n in _Zt)&&!(n in r)&&(t[n]=e[n]);return t};class A7{constructor(e,t={}){Ke(this,"request");Ke(this,"abortController");Ke(this,"_retryCount",0);Ke(this,"_input");Ke(this,"_options");var n,i;if(this._input=e,this._options={...t,headers:U7e(this._input.headers,t.headers),hooks:F7e({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:wZt(t.method??this._input.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:QZt(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!="string"&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input=="string"){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(yZt){const a=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=a?AbortSignal.any([a,this.abortController.signal]):this.abortController.signal}if(T7e&&(this._options.duplex="half"),this._options.json!==void 0&&(this._options.body=((i=(n=this._options).stringifyJson)==null?void 0:i.call(n,this._options.json))??JSON.stringify(this._options.json),this._options.headers.set("content-type",this._options.headers.get("content-type")??"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const o="?"+(typeof this._options.searchParams=="string"?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),s=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,o);(IZt&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(s,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!="function")throw new TypeError("The `onUploadProgress` option must be a function");if(!T7e)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=SZt(this.request,this._options.onUploadProgress))}}static create(e,t){const n=new A7(e,t),i=async()=>{if(typeof n._options.timeout=="number"&&n._options.timeout>zle)throw new RangeError(`The \`timeout\` option cannot be greater than ${zle}`);await Promise.resolve();let s=await n._fetch();for(const l of n._options.hooks.afterResponse){const c=await l(n.request,n._options,n._decorateResponse(s.clone()));c instanceof globalThis.Response&&(s=c)}if(n._decorateResponse(s),!s.ok&&n._options.throwHttpErrors){let l=new Ole(s,n.request,n._options);for(const c of n._options.hooks.beforeError)l=await c(l);throw l}if(n._options.onDownloadProgress){if(typeof n._options.onDownloadProgress!="function")throw new TypeError("The `onDownloadProgress` option must be a function");if(!vZt)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return bZt(s.clone(),n._options.onDownloadProgress)}return s},o=(n._options.retry.methods.includes(n.request.method.toLowerCase())?n._retry(i):i()).finally(async()=>{var s;n.request.bodyUsed||await((s=n.request.body)==null?void 0:s.cancel())});for(const[s,l]of Object.entries(CZt))o[s]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||l);const c=await o;if(s==="json"){if(c.status===204||(await c.clone().arrayBuffer()).byteLength===0)return"";if(t.parseJson)return t.parseJson(await c.text())}return c[s]()};return o}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof N7e)throw e;if(e instanceof Ole){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;const n=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(n&&this._options.retry.afterStatusCodes.includes(e.response.status)){let i=Number(n)*1e3;Number.isNaN(i)?i=Date.parse(n)-Date.now():i>=Date.parse("2024-01-01")&&(i-=Date.now());const a=this._options.retry.maxRetryAfter??i;return i<a?i:a}if(e.response.status===413)throw e}const t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){const n=Math.min(this._calculateRetryDelay(t),zle);if(this._retryCount<1)throw t;await DZt(n,{signal:this._options.signal});for(const i of this._options.hooks.beforeRetry)if(await i({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===k7e)return;return this._retry(e)}}async _fetch(){for(const n of this._options.hooks.beforeRequest){const i=await n(this.request,this._options);if(i instanceof Request){this.request=i;break}if(i instanceof Response)return i}const e=RZt(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):MZt(t,e,this.abortController,this._options)}}/*! MIT License © Sindre Sorhus */const Yle=r=>{const e=(t,n)=>A7.create(t,c7(r,n));for(const t of P7e)e[t]=(n,i)=>A7.create(n,c7(r,i,{method:t}));return e.create=t=>Yle(c7(t)),e.extend=t=>(typeof t=="function"&&(t=t(r??{})),Yle(c7(r,t))),e.stop=k7e,e},G7e=Yle();function Vle(r){return typeof window<"u"?window[r]:null}function T4(){const r=Vle("TSCIRCUIT_REGISTRY_API_BASE_URL")||void 0||"https://registry-api.tscircuit.com",e=Vle("TSCIRCUIT_REGISTRY_TOKEN");return G7e.create({prefixUrl:r,headers:{Authorization:`Bearer ${e}`},timeout:3e4})}const Kle={get:(r,e)=>T4().get(r,e),post:(r,e)=>T4().post(r,e),put:(r,e)=>T4().put(r,e),delete:(r,e)=>T4().delete(r,e),patch:(r,e)=>T4().patch(r,e)},NZt=async r=>{try{const{order_quote_id:e}=await Kle.post("order_quotes/create",{json:{package_release_id:r,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Ole){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},TZt=async r=>{const{order_quote:e}=await Kle.get("order_quotes/get",{searchParams:{order_quote_id:r}}).json();return e},PZt=()=>{const r=Fle();return xqt({mutationKey:["createOrderQuote"],mutationFn:e=>NZt(e),onSuccess:e=>{r.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},kZt=r=>{const{data:e,error:t,status:n}=bqt(["getOrderQuote",r],()=>TZt(r||""),{enabled:!!r,refetchInterval:i=>i!=null&&i.is_completed||i!=null&&i.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:n==="loading"?"loading":n==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},UZt=({onCancel:r,packageReleaseId:e,signIn:t,isLoggedIn:n})=>{var g,_,I,E,x,B;const[i,a]=nt.useState(null),[o,s]=nt.useState(null),{mutate:l,error:c}=PZt();nt.useEffect(()=>{e&&l(e,{onSuccess:N=>{s(N.order_quote_id)}})},[e]);const{data:u}=kZt(o||void 0),A=async N=>{const L=Vle("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${L}?client_reference_id=${N}&shipping_option=${i}`};nt.useEffect(()=>{if(i===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const N=u.shipping_options.reduce((L,U)=>U.cost<L.cost?U:L,u.shipping_options[0]);a((N==null?void 0:N.carrier)||null)}},[u]);const d=nt.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((N,L)=>L.cost<N.cost?L:N,u.shipping_options[0]).cost:0,[u]),f=c&&((_=(g=c.error)==null?void 0:g.error_code)==null?void 0:_.includes("no_token"))||((E=(I=u==null?void 0:u.error)==null?void 0:I.error_code)==null?void 0:E.includes("no_token"))&&t;return!n||f?Ge.jsx(GZt,{signIn:t}):Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(c||u!=null&&u.error)&&(!o||!u||(u==null?void 0:u.is_processing))&&Ge.jsx(FZt,{message:"Fetching quotes..."}),(c||(u==null?void 0:u.error))&&Ge.jsx(LZt,{message:c&&((x=c.error)==null?void 0:x.message)||((B=u==null?void 0:u.error)==null?void 0:B.message)||"Failed to fetch quotes"}),(u==null?void 0:u.is_completed)&&!c&&!(u!=null&&u.error)&&Array.isArray(u==null?void 0:u.shipping_options)&&u.shipping_options.length>0&&Ge.jsxs(Ge.Fragment,{children:[Ge.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),Ge.jsx(Sqt,{orderQuote:u,selectedShippingCarrier:i,onSelectShippingCarrier:a,lowestShippingCarrierCost:d+(u.total_cost_without_shipping||0)},u==null?void 0:u.order_quote_id)]}),Ge.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[Ge.jsx(M_,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:r,children:"Cancel"}),Ge.jsx(M_,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:i===null,onClick:()=>{if(i===null){T_.error("Please select a shipping option.");return}u&&A(u.order_quote_id)},children:"Continue"})]}),Ge.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},FZt=({message:r})=>Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[Ge.jsx(I9,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),Ge.jsx("p",{className:"rf-text-gray-600",children:r})]}),LZt=({message:r})=>Ge.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:r}),GZt=({signIn:r})=>Ge.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[Ge.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),Ge.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[Ge.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),Ge.jsxs(M_,{onClick:r,className:"rf-flex rf-items-center rf-gap-2",children:[Ge.jsx(YPe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),OZt=new hqt,zZt=({isOpen:r,onClose:e,stage:t,setStage:n,circuitJson:i,packageReleaseId:a,signIn:o,isLoggedIn:s})=>Ge.jsx(Iqt,{client:OZt,children:Ge.jsx(KWt,{open:r,onOpenChange:l=>{l||e()},children:Ge.jsx(c7e,{className:"!rf-max-w-[660px] !rf-p-0",children:Ge.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&Ge.jsx(UZt,{onCancel:e,packageReleaseId:a??"",signIn:o??(()=>{}),isLoggedIn:s})})})})}),HZt=({isOpen:r,onClose:e,stage:t,setStage:n,signIn:i,isLoggedIn:a})=>{const o=lb(s=>s.circuitJson);return Ge.jsx(zZt,{signIn:i,isOpen:r,onClose:e,stage:t,setStage:n,circuitJson:o,isLoggedIn:a??!1})},YZt=()=>{const[r,e]=nt.useState(!1),[t,n]=nt.useState("initial");return{isOpen:r,stage:t,open:()=>e(!0),close:()=>{e(!1),n("initial")},setStage:n,OrderDialog:HZt}};/**
13677
13677
  * @license
13678
13678
  * Copyright 2019 Google LLC
13679
13679
  * SPDX-License-Identifier: Apache-2.0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tscircuit/runframe",
3
3
  "main": "dist/preview.js",
4
4
  "type": "module",
5
- "version": "0.0.572",
5
+ "version": "0.0.573",
6
6
  "exports": {
7
7
  ".": "./dist/preview.js",
8
8
  "./preview": "./dist/preview.js",