@tscircuit/runframe 0.0.1224 → 0.0.1226

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.
@@ -5501,7 +5501,7 @@ to {
5501
5501
  }
5502
5502
  `,vG=16,hNn=({reverseOrder:n,position:e="top-center",toastOptions:t,gutter:i,children:r,toasterId:o,containerStyle:s,containerClassName:a})=>{let{toasts:c,handlers:l}=UIn(t,o);return fe.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:vG,left:vG,right:vG,bottom:vG,pointerEvents:"none",...s},className:a,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(u=>{let d=u.position||e,h=l.calculateOffset(u,{reverseOrder:n,gutter:i,defaultPosition:e}),p=uNn(d,h);return fe.createElement(lNn,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?dNn:"",style:p},u.type==="custom"?gG(u.message,u):r?r(u):fe.createElement(cNn,{toast:u,position:d}))}))};const pNn=({code:n,fsMap:e,autoroutingLog:t,circuitJsonErrors:i,circuitJsonWarnings:r,onReportAutoroutingLog:o,errorMessage:s,errorStack:a,circuitJson:c,evalVersion:l})=>{const u=fe.useMemo(()=>{const N=[];if(s&&N.push({type:"Execution Error",message:s,stack:a||void 0,source:"execution"}),i&&i.length>0)for(const A of i)N.push({type:A.type||"Circuit JSON Error",message:A.message||"No error message available",stack:A.stack||"",source:"circuitJson"});return N},[s,a,i]),d=fe.useMemo(()=>!c||!Array.isArray(c)?void 0:c.find(A=>A.type==="source_project_metadata")?.software_used_string,[c]),h=fe.useMemo(()=>{const N=[];if(r&&r.length>0)for(const A of r)N.push({type:A.type||"Circuit JSON Warning",message:A.message||"No warning message available",stack:A.stack||"",source:"circuitJson"});return N},[r]),p=()=>{if(e)try{return CPt(e instanceof Map?Object.fromEntries(e.entries()):e)}catch{}return H4n(n??"")},m=(N,A)=>{const I=`https://github.com/tscircuit/tscircuit.com/issues/new?title=${encodeURIComponent(N)}&body=${encodeURIComponent(A)}`;window.open(I,"_blank")};if(u.length===0&&h.length===0)return ce.jsxs("div",{className:"px-2",children:[ce.jsx("div",{className:"rf-mt-4 rf-bg-green-50 rf-rounded-md rf-border rf-border-green-200",children:ce.jsxs("div",{className:"rf-p-4",children:[ce.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-green-800 rf-mb-3",children:"No errors or warnings!"}),ce.jsx("p",{className:"rf-text-sm rf-text-green-700",children:"Your code is running without any errors or warnings."})]})}),ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[ce.jsx(xot,{autoroutingLog:t,onReportAutoroutingLog:o}),ce.jsxs(V_,{variant:"outline",className:"rf-p-1",onClick:()=>{const N=p();m("Issue Report",`[Package code to reproduce](${N})`)},children:[ce.jsx(Dge,{className:"rf-w-4 rf-h-4"}),"Report Issue"]})]})]});fe.useEffect(()=>{if(s){let N=s;a&&(N+=`
5503
5503
 
5504
- ${a}`),typeof window<"u"&&(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=N)}},[s,a]);const[_,g]=fe.useState(()=>{const N=new Set;return u.forEach((A,I)=>N.add(I)),N}),[x,b]=fe.useState(()=>{const N=new Set;return h.forEach((A,I)=>N.add(I)),N}),w=N=>{g(A=>{const I=new Set(A);return I.has(N)?I.delete(N):I.add(N),I})},E=N=>{b(A=>{const I=new Set(A);return I.has(N)?I.delete(N):I.add(N),I})};return ce.jsx(ce.Fragment,{children:ce.jsxs("div",{className:"rf-w-full",children:[u.length>0&&ce.jsxs("div",{className:"rf-mt-2",children:[ce.jsxs("div",{className:"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200",children:[u.length," ",u.length===1?"error":"errors"]}),u.map((N,A)=>{const I=_.has(A);N.message;const M=N.stack||l||d;return ce.jsxs("div",{className:"rf-bg-white hover:rf-bg-red-100",children:[ce.jsxs("div",{className:"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50",onClick:()=>M&&w(A),children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",style:{marginTop:"3px"},children:[ce.jsx(C4n,{className:"rf-h-4 rf-w-4 rf-text-red-500 rf-flex-shrink-0"}),M&&ce.jsx($ge,{className:`rf-h-3 rf-w-3 rf-text-red-500 rf-flex-shrink-0 rf-transition-transform ${I?"rf-rotate-90":""}`})]}),ce.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-leading-[1rem]",children:[ce.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-700 rf-leading-[0.95rem]",children:[N.type,":"]}),ce.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-600 rf-ml-1 rf-leading-[0.95rem]",children:N.message})]})]}),I&&M&&ce.jsxs("div",{className:"rf-bg-red-50/50 rf-pl-12",children:[N.stack?.split(`
5504
+ ${a}`),typeof window<"u"&&(window.__TSCIRCUIT_LAST_EXECUTION_ERROR=N)}},[s,a]);const[_,g]=fe.useState(()=>{const N=new Set;return u.forEach((A,I)=>N.add(I)),N}),[x,b]=fe.useState(()=>{const N=new Set;return h.forEach((A,I)=>N.add(I)),N}),w=N=>{g(A=>{const I=new Set(A);return I.has(N)?I.delete(N):I.add(N),I})},E=N=>{b(A=>{const I=new Set(A);return I.has(N)?I.delete(N):I.add(N),I})};return ce.jsx(ce.Fragment,{children:ce.jsxs("div",{className:"rf-w-full",children:[u.length>0&&ce.jsxs("div",{className:"rf-mt-2",children:[ce.jsxs("div",{className:"rf-text-xs rf-text-red-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-red-50 rf-border-b rf-border-red-200",children:[u.length," ",u.length===1?"error":"errors"]}),u.map((N,A)=>{const I=_.has(A);N.message;const M=N.stack||l||d;return ce.jsxs("div",{className:"rf-bg-white hover:rf-bg-red-100",children:[ce.jsxs("div",{className:"rf-flex rf-items-start rf-gap-1 rf-px-2 rf-pt-1 rf-pb-1 rf-cursor-pointer rf-bg-red-50/50",onClick:()=>M&&w(A),children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",style:{marginTop:"2px"},children:[ce.jsx(C4n,{className:"rf-h-4 rf-w-4 rf-text-red-500 rf-flex-shrink-0"}),M&&ce.jsx($ge,{className:`rf-h-3 rf-w-3 rf-text-red-500 rf-flex-shrink-0 rf-transition-transform ${I?"rf-rotate-90":""}`})]}),ce.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-leading-[1rem]",children:[ce.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-700 rf-leading-[0.95rem]",children:[N.type,":"]}),ce.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-600 rf-ml-1 rf-leading-[0.95rem]",children:N.message})]})]}),I&&M&&ce.jsxs("div",{className:"rf-bg-red-50/50 rf-pl-12",children:[N.stack?.split(`
5505
5505
  `).filter(k=>k.trim()).slice(1).map((k,C)=>ce.jsx("div",{className:"rf-px-2 rf-leading-tight",children:ce.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-red-500",children:k})},C)),(l||d)&&ce.jsx("div",{className:"rf-px-2",children:ce.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-red-400",children:[l&&`@tscircuit/eval@${l}`,l&&d&&" • ",d]})})]})]},A)})]}),h.length>0&&ce.jsxs("div",{className:"rf-mt-2",children:[ce.jsxs("div",{className:"rf-text-xs rf-text-orange-700 rf-font-semibold rf-px-2 rf-py-1 rf-bg-orange-50 rf-border-b rf-border-orange-200",children:[h.length," ",h.length===1?"warning":"warnings"]}),h.map((N,A)=>{const I=x.has(A);N.message;const M=!!N.stack;return ce.jsxs("div",{className:"rf-bg-white hover:rf-bg-orange-100",children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-px-2 rf-py-1 rf-cursor-pointer rf-bg-orange-50/50",onClick:()=>M&&E(A),children:[ce.jsx(M4n,{className:"rf-h-4 rf-w-4 rf-text-orange-500 rf-flex-shrink-0"}),M&&ce.jsx($ge,{className:`rf-h-3 rf-w-3 rf-text-orange-500 rf-flex-shrink-0 rf-transition-transform ${I?"rf-rotate-90":""}`}),ce.jsxs("div",{className:"rf-flex-1 rf-min-w-0 rf-flex rf-items-center rf-flex-wrap",children:[ce.jsxs("span",{className:"rf-text-xs rf-font-mono rf-text-orange-700 rf-break-words",children:[N.type,":"]}),ce.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-600 rf-ml-1 rf-break-words",children:N.message})]})]}),I&&M&&ce.jsx("div",{className:"rf-bg-orange-50/50 rf-pl-12",children:N.stack?.split(`
5506
5506
  `).filter(k=>k.trim()).slice(1).map((k,C)=>ce.jsx("div",{className:"rf-px-2 rf-leading-tight",children:ce.jsx("span",{className:"rf-text-xs rf-font-mono rf-text-orange-500",children:k})},C))})]},A)})]}),ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-mt-4 rf-justify-end",children:[ce.jsx(xot,{autoroutingLog:t,onReportAutoroutingLog:o}),ce.jsxs(V_,{variant:"outline",className:"rf-p-1",onClick:()=>{const N=u[0];let A=`${N.type}: ${N.message}`;l&&(A+=`
5507
5507
  @tscircuit/eval@${l}`),d&&(A+=`
@@ -5810,7 +5810,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}});function Ddt(n,e,t){if(!e||!t)retu
5810
5810
  * Copyright (c) 2013-2015, 2017, Jon Schlinkert.
5811
5811
  * Released under the MIT License.
5812
5812
  *)
5813
- */const nUn=({containerClassName:n,...e})=>{const t=fe.useRef(null),[i,r]=fe.useState(620);return fe.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),ce.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:ce.jsx(tUn,{...e,height:i})})},iUn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.rf-w-1{width:.25rem}.rf-w-1\\/2{width:50%}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/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-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/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-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/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-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-w-auto{width:auto}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',tht=()=>{fe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=iUn,document.head.appendChild(e)},[])},rUn=n=>{fe.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])};function nht(n,e){const[t,i]=fe.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return fe.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const iht=n=>`hsl(${QS.indexOf(n)*137.5%360}, 70%, 50%)`,oUn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return ce.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ce.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:QS.map(t=>{const i=n[t]||0,r=i/e*100;return ce.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:iht(t)},children:ce.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),ce.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},sUn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},aUn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=fe.useState("chronological"),[r,o]=fe.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return ce.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[ce.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ce.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ce.jsx("option",{value:l.value,children:l.label},l.value))}),ce.jsx(V_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>QS.indexOf(l[0])-QS.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return ce.jsxs("div",{className:"rf-bg-white",children:[ce.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[ce.jsx("div",{children:"Render Logs"}),ce.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ce.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ce.jsx("option",{value:l.value,children:l.label},l.value))}),ce.jsx(V_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),ce.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:ce.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=sUn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[ce.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>ce.jsx("option",{value:l.name,children:l.name},l.name))]})}),ce.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[ce.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ce.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ce.jsx("option",{value:"chronological",children:"Phase Order"}),ce.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),ce.jsx(oUn,{phaseTimings:n.phaseTimings}),ce.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ce.jsx("thead",{children:ce.jsxs("tr",{children:[ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ce.jsx("tbody",{children:a.map(([l,u])=>ce.jsxs("tr",{children:[ce.jsx("td",{className:"rf-p-2",children:QS.indexOf(l)}),ce.jsx("td",{className:"rf-p-2",children:l}),ce.jsx("td",{className:"rf-p-2",children:ce.jsx("div",{className:"rf-w-8",children:ce.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:iht(l),width:`${u/c*100}%`}})})}),ce.jsx("td",{className:"rf-p-2",children:ce.jsxs("div",{className:"rf-flex w-full",children:[ce.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),ce.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},rht=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{fe.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Lz.captureException(i)}catch{}}},[n,e]),fe.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Lz.captureException(r,{error_type:i.type})}catch{}}},[t])},oht="0.0.1223",cUn={version:oht},Sbe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Ebe=new Map,LY=n=>{const e=Ebe.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},lUn=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=Ebe.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return Ebe.set(t.name,r),{type:"tracked",store:n,...r}},sht=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(Sbe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(Sbe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=lUn(a,l,c);let h=!0;r.setState=(_,g,x)=>{const b=t(_,g);if(!h)return b;const w=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u?.send(w,i()),b):(u?.send({...w,type:`${a}/${w.type}`},{...LY(c.name),[a]:r.getState()}),b)};const p=(..._)=>{const g=h;h=!1,t(..._),h=g},m=n(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([_,g])=>[_,_===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let _=!1;const g=r.dispatch;r.dispatch=(...x)=>{(Sbe?"production":void 0)!=="production"&&x[0].type==="__setState"&&!_&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),_=!0),g(...x)}}return u.subscribe(_=>{var g;switch(_.type){case"ACTION":if(typeof _.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Tbe(_.payload,x=>{if(x.type==="__setState"){if(a===void 0){p(x.state);return}Object.keys(x.state).length!==1&&console.error(`
5813
+ */const nUn=({containerClassName:n,...e})=>{const t=fe.useRef(null),[i,r]=fe.useState(620);return fe.useLayoutEffect(()=>{const o=()=>{if(t.current){const a=t.current.clientHeight,c=window.innerHeight;r(Math.min(Math.max(a,620),c))}};o();const s=new ResizeObserver(o);return t.current&&s.observe(t.current),window.addEventListener("resize",o),()=>{s.disconnect(),window.removeEventListener("resize",o)}},[]),ce.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:ce.jsx(tUn,{...e,height:i})})},iUn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-6{margin-left:1.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mr-4{margin-right:1rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[100px\\]{min-height:100px}.rf-min-h-\\[200px\\]{min-height:200px}.rf-min-h-\\[300px\\]{min-height:300px}.rf-min-h-\\[620px\\]{min-height:620px}.rf-min-h-\\[calc\\(100vh-240px\\)\\]{min-height:calc(100vh - 240px)}.\\!rf-w-2{width:.5rem!important}.\\!rf-w-2\\.5{width:.625rem!important}.\\!rf-w-\\[95vw\\]{width:95vw!important}.rf-w-1{width:.25rem}.rf-w-11{width:2.75rem}.rf-w-11\\/12{width:91.666667%}.rf-w-12{width:3rem}.rf-w-16{width:4rem}.rf-w-2{width:.5rem}.rf-w-2\\.5{width:.625rem}.rf-w-20{width:5rem}.rf-w-24{width:6rem}.rf-w-28{width:7rem}.rf-w-3{width:.75rem}.rf-w-3\\.5{width:.875rem}.rf-w-32{width:8rem}.rf-w-4{width:1rem}.rf-w-40{width:10rem}.rf-w-48{width:12rem}.rf-w-5{width:1.25rem}.rf-w-6{width:1.5rem}.rf-w-64{width:16rem}.rf-w-72{width:18rem}.rf-w-8{width:2rem}.rf-w-80{width:20rem}.rf-w-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[600px\\]{min-width:600px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[95vw\\]{max-width:95vw!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-64{max-width:16rem}.rf-max-w-96{max-width:24rem}.rf-max-w-\\[1000px\\]{max-width:1000px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[200px\\]{max-width:200px}.rf-max-w-\\[40\\%\\]{max-width:40%}.rf-max-w-\\[600px\\]{max-width:600px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-rotate-90{--tw-rotate:90deg}.rf-rotate-90,.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-baseline{align-items:baseline}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.\\!rf-overflow-hidden{overflow:hidden!important}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-l-2{border-left-width:2px}.rf-border-l-4{border-left-width:4px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-300{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-100{--tw-border-opacity:1;border-color:rgb(255 237 213/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-orange-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-100{--tw-border-opacity:1;border-color:rgb(254 226 226/var(--tw-border-opacity,1))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-red-600{--tw-border-opacity:1;border-color:rgb(220 38 38/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-amber-50{--tw-bg-opacity:1;background-color:rgb(255 251 235/var(--tw-bg-opacity,1))}.rf-bg-amber-50\\/30{background-color:rgba(255,251,235,.3)}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-50\\/30{background-color:rgba(239,246,255,.3)}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-orange-50\\/50{background-color:rgba(255,247,237,.5)}.rf-bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/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-50\\/50{background-color:hsla(0,86%,97%,.5)}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.rf-bg-transparent{background-color:transparent}.rf-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rf-bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.rf-bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.rf-bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity,1))}.rf-bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.rf-bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.rf-bg-opacity-50{--tw-bg-opacity:0.5}.rf-fill-amber-500{fill:#f59e0b}.rf-fill-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pb-px{padding-bottom:1px}.rf-pl-10{padding-left:2.5rem}.rf-pl-11{padding-left:2.75rem}.rf-pl-12{padding-left:3rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-1{padding-top:.25rem}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-\\[0\\.95rem\\]{line-height:.95rem}.rf-leading-\\[1rem\\]{line-height:1rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-amber-500{--tw-text-opacity:1;color:rgb(245 158 11/var(--tw-text-opacity,1))}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-400{--tw-text-opacity:1;color:rgb(251 146 60/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-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.rf-text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.rf-text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.rf-text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.rf-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-600{--tw-text-opacity:1;color:rgb(202 138 4/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-100{opacity:1}.rf-opacity-25{opacity:.25}.rf-opacity-30{opacity:.3}.rf-opacity-50{opacity:.5}.rf-opacity-60{opacity:.6}.rf-opacity-70{opacity:.7}.rf-opacity-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:rf-border-blue-500:hover{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-orange-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-slate-200:hover{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\\:rf-text-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-800:hover{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.hover\\:rf-text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group:hover .group-hover\\:rf-opacity-100,.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=true\\]\\:rf-pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:rf-pointer-events-none[data-disabled]{pointer-events:none}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\\[side\\=bottom\\]\\:rf-translate-y-1[data-side=bottom],.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-rf-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\\[side\\=right\\]\\:rf-translate-x-1[data-side=right],.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-rf-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\\[selected\\=true\\]\\:rf-bg-zinc-100[data-selected=true]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[state\\=active\\]\\:rf-bg-white[data-state=active]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.data-\\[state\\=checked\\]\\:rf-bg-zinc-900[data-state=checked]{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.data-\\[state\\=open\\]\\:rf-bg-zinc-100[data-state=open]{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.data-\\[selected\\=true\\]\\:rf-text-zinc-900[data-selected=true]{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.data-\\[state\\=active\\]\\:rf-text-zinc-950[data-state=active]{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.data-\\[state\\=checked\\]\\:rf-text-zinc-50[data-state=checked]{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.data-\\[disabled\\=true\\]\\:rf-opacity-50[data-disabled=true],.data-\\[disabled\\]\\:rf-opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:rf-shadow[data-state=active]{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\\[state\\=open\\]\\:rf-animate-in[data-state=open]{animation-duration:.15s;animation-name:enter;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-animate-out[data-state=closed]{animation-duration:.15s;animation-name:exit;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\\[state\\=closed\\]\\:rf-fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=open\\]\\:rf-fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=closed\\]\\:rf-zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=open\\]\\:rf-zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[side\\=bottom\\]\\:rf-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\\[side\\=left\\]\\:rf-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\\[side\\=right\\]\\:rf-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\\[side\\=top\\]\\:rf-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\\[state\\=closed\\]\\:rf-slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\\[state\\=closed\\]\\:rf-slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\\[state\\=open\\]\\:rf-slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\\[state\\=open\\]\\:rf-slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y:-48%}.dark\\:rf-border-zinc-50:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(250 250 250/var(--tw-border-opacity,1))}.dark\\:rf-border-zinc-800:is(.rf-dark *){--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity,1))}.dark\\:rf-bg-gray-700:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\\:rf-bg-gray-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\\:rf-bg-red-900:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-50:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-800:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:rf-bg-zinc-950:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:rf-text-gray-500:is(.rf-dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-400:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-50:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:rf-text-zinc-900:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-placeholder-zinc-400:is(.rf-dark *)::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity,1))}.dark\\:rf-ring-offset-zinc-950:is(.rf-dark *){--tw-ring-offset-color:#09090b}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::-moz-placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:placeholder\\:rf-text-zinc-400:is(.rf-dark *)::placeholder{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.dark\\:hover\\:rf-bg-red-900\\/90:hover:is(.rf-dark *){background-color:rgba(127,29,29,.9)}.dark\\:hover\\:rf-bg-zinc-50\\/90:hover:is(.rf-dark *){background-color:hsla(0,0%,98%,.9)}.dark\\:hover\\:rf-bg-zinc-800:hover:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:hover\\:rf-bg-zinc-800\\/80:hover:is(.rf-dark *){background-color:rgba(39,39,42,.8)}.dark\\:hover\\:rf-text-zinc-50:hover:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus\\:rf-bg-zinc-800:focus:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:focus\\:rf-text-zinc-50:focus:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:focus-visible\\:rf-ring-zinc-300:focus-visible:is(.rf-dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(212 212 216/var(--tw-ring-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-bg-zinc-800[data-selected=true]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-bg-zinc-950[data-state=active]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(9 9 11/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-bg-zinc-50[data-state=checked]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.dark\\:data-\\[state\\=open\\]\\:rf-bg-zinc-800[data-state=open]:is(.rf-dark *){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.dark\\:data-\\[selected\\=true\\]\\:rf-text-zinc-50[data-selected=true]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=active\\]\\:rf-text-zinc-50[data-state=active]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.dark\\:data-\\[state\\=checked\\]\\:rf-text-zinc-900[data-state=checked]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\\:rf-order-1{order:1}.sm\\:rf-order-2{order:2}.sm\\:rf-mt-0{margin-top:0}.sm\\:rf-mt-4{margin-top:1rem}.sm\\:rf-block{display:block}.sm\\:rf-inline{display:inline}.sm\\:rf-grid{display:grid}.sm\\:rf-hidden{display:none}.sm\\:rf-h-5{height:1.25rem}.sm\\:rf-w-1\\/2{width:50%}.sm\\:rf-w-5{width:1.25rem}.sm\\:rf-w-\\[90vw\\]{width:90vw}.sm\\:rf-w-auto{width:auto}.sm\\:rf-max-w-\\[500px\\]{max-width:500px}.sm\\:rf-max-w-md{max-width:28rem}.sm\\:rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:rf-grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.sm\\:rf-flex-row{flex-direction:row}.sm\\:rf-items-center{align-items:center}.sm\\:rf-justify-end{justify-content:flex-end}.sm\\:rf-gap-3{gap:.75rem}.sm\\:rf-gap-4{gap:1rem}.sm\\:rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.sm\\:rf-justify-self-end{justify-self:end}.sm\\:rf-rounded-lg{border-radius:var(--radius)}.sm\\:rf-p-3{padding:.75rem}.sm\\:rf-p-6{padding:1.5rem}.sm\\:rf-px-4{padding-left:1rem;padding-right:1rem}.sm\\:rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.sm\\:rf-text-left{text-align:left}.sm\\:rf-text-right{text-align:right}.sm\\:rf-text-2xl{font-size:1.5rem;line-height:2rem}.sm\\:rf-text-base{font-size:1rem;line-height:1.5rem}.sm\\:rf-text-sm{font-size:.875rem;line-height:1.25rem}.sm\\:rf-text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:768px){.md\\:rf-w-auto{width:auto}.md\\:rf-max-w-\\[660px\\]{max-width:660px}.md\\:rf-max-w-lg{max-width:32rem}.md\\:rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:rf-p-8{padding:2rem}.md\\:rf-py-8{padding-bottom:2rem;padding-top:2rem}.md\\:rf-text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width:1024px){.lg\\:rf-max-w-\\[720px\\]{max-width:720px}.lg\\:rf-max-w-xl{max-width:36rem}}@media (min-width:1280px){.xl\\:rf-max-w-\\[800px\\]{max-width:800px}}.\\[\\&\\>span\\]\\:rf-line-clamp-1>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\]\\:rf-size-4>svg{height:1rem;width:1rem}.\\[\\&\\>svg\\]\\:rf-shrink-0>svg{flex-shrink:0}.\\[\\&\\>svg\\]\\:rf-text-red-300>svg{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.\\[\\&\\>svg\\]\\:hover\\:rf-text-red-400:hover>svg{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-py-1\\.5 [cmdk-group-heading]{padding-bottom:.375rem;padding-top:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-500 [cmdk-group-heading]{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:rf-text-zinc-400 [cmdk-group-heading]:is(.rf-dark *){--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:rf-pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:rf-px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:rf-w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:rf-h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:rf-py-3 [cmdk-item]{padding-bottom:.75rem;padding-top:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:rf-w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_svg\\]\\:rf-pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:rf-size-4 svg{height:1rem;width:1rem}.\\[\\&_svg\\]\\:rf-shrink-0 svg{flex-shrink:0}',tht=()=>{fe.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=iUn,document.head.appendChild(e)},[])},rUn=n=>{fe.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])};function nht(n,e){const[t,i]=fe.useState(()=>{try{const r=window.localStorage.getItem(n);return r?JSON.parse(r):e}catch(r){return console.error("Error reading from localStorage:",r),e}});return fe.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const iht=n=>`hsl(${QS.indexOf(n)*137.5%360}, 70%, 50%)`,oUn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return ce.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[ce.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:QS.map(t=>{const i=n[t]||0,r=i/e*100;return ce.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:iht(t)},children:ce.jsxs("div",{className:"rf-opacity-0 group-hover/bar:rf-opacity-100 rf-transition-opacity rf-absolute rf-bottom-full rf-left-1/2 rf-transform -rf-translate-x-1/2 rf-mb-2 rf-px-2 rf-py-1 rf-text-xs rf-whitespace-nowrap rf-rounded rf-bg-gray-900 rf-text-white rf-pointer-events-none",children:[t,": ",i.toFixed(1),"ms"]})},t)})}),ce.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},sUn=n=>{if(n instanceof Blob)return n;if(n==null)return"";if(typeof n=="string")return n;if(typeof n=="object")try{return JSON.stringify(n,null,2)}catch{return String(n)}return String(n)},aUn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=fe.useState("chronological"),[r,o]=fe.useState(""),s=[{value:"",label:"None"},{value:"DEBUG=Group_doInitialSchematicTraceRender",label:"DEBUG=Group_doInitialSchematicTraceRender"},{value:"DEBUG=Group_doInitialSchematicLayoutMatchpack",label:"DEBUG=Group_doInitialSchematicLayoutMatchpack"},{value:"DEBUG=Group_doInitialPcbLayoutPack",label:"DEBUG=Group_doInitialPcbLayoutPack"}];if(!n)return ce.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[ce.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ce.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ce.jsx("option",{value:l.value,children:l.label},l.value))}),ce.jsx(V_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]})]});const a=Object.entries(n?.phaseTimings??{});t==="chronological"?a.sort((l,u)=>QS.indexOf(l[0])-QS.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return ce.jsxs("div",{className:"rf-bg-white",children:[ce.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[ce.jsx("div",{children:"Render Logs"}),ce.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&ce.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[ce.jsx("select",{value:r,onChange:l=>o(l.target.value),className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white",children:s.map(l=>ce.jsx("option",{value:l.value,children:l.label},l.value))}),ce.jsx(V_,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),ce.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:ce.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=sUn(u.content),h=d instanceof Blob?d:new Blob([d],{type:"text/plain"}),p=URL.createObjectURL(h),m=document.createElement("a");m.href=p,m.download=`debug-${u.name}.txt`,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(p)}l.target.value=""}},disabled:!n?.debugOutputs||n.debugOutputs.length===0,className:"rf-px-3 rf-py-1 rf-border rf-rounded rf-text-xs rf-bg-white disabled:rf-opacity-50 disabled:rf-cursor-not-allowed",children:[ce.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>ce.jsx("option",{value:l.name,children:l.name},l.name))]})}),ce.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[ce.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),ce.jsxs("select",{value:t,onChange:l=>i(l.target.value),className:"rf-px-2 rf-py-1 rf-border rf-rounded rf-text-xs",children:[ce.jsx("option",{value:"chronological",children:"Phase Order"}),ce.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),ce.jsx(oUn,{phaseTimings:n.phaseTimings}),ce.jsxs("table",{className:"rf-w-full rf-text-xs",children:[ce.jsx("thead",{children:ce.jsxs("tr",{children:[ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),ce.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),ce.jsx("tbody",{children:a.map(([l,u])=>ce.jsxs("tr",{children:[ce.jsx("td",{className:"rf-p-2",children:QS.indexOf(l)}),ce.jsx("td",{className:"rf-p-2",children:l}),ce.jsx("td",{className:"rf-p-2",children:ce.jsx("div",{className:"rf-w-8",children:ce.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:iht(l),width:`${u/c*100}%`}})})}),ce.jsx("td",{className:"rf-p-2",children:ce.jsxs("div",{className:"rf-flex w-full",children:[ce.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),ce.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},rht=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{fe.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{Lz.captureException(i)}catch{}}},[n,e]),fe.useEffect(()=>{if(t&&t.length>0)for(const i of t){const r=new Error(i.message||"Circuit JSON Error");i.stack&&(r.stack=i.stack);try{Lz.captureException(r,{error_type:i.type})}catch{}}},[t])},oht="0.0.1225",cUn={version:oht},Sbe={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Ebe=new Map,LY=n=>{const e=Ebe.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},lUn=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=Ebe.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return Ebe.set(t.name,r),{type:"tracked",store:n,...r}},sht=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(Sbe?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(Sbe?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=lUn(a,l,c);let h=!0;r.setState=(_,g,x)=>{const b=t(_,g);if(!h)return b;const w=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u?.send(w,i()),b):(u?.send({...w,type:`${a}/${w.type}`},{...LY(c.name),[a]:r.getState()}),b)};const p=(..._)=>{const g=h;h=!1,t(..._),h=g},m=n(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([_,g])=>[_,_===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let _=!1;const g=r.dispatch;r.dispatch=(...x)=>{(Sbe?"production":void 0)!=="production"&&x[0].type==="__setState"&&!_&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),_=!0),g(...x)}}return u.subscribe(_=>{var g;switch(_.type){case"ACTION":if(typeof _.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Tbe(_.payload,x=>{if(x.type==="__setState"){if(a===void 0){p(x.state);return}Object.keys(x.state).length!==1&&console.error(`
5814
5814
  [zustand devtools middleware] Unsupported __setState action format.
5815
5815
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
5816
5816
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
@@ -6789,6 +6789,24 @@ ${n}</tr>
6789
6789
  `}tablecell(n){const e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
6790
6790
  `}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${WT(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){const i=this.parser.parseInline(t),r=UEt(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+WT(e)+'"'),o+=">"+i+"</a>",o}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));const r=UEt(n);if(r===null)return WT(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${WT(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:WT(n.text)}},MCe=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},M3=class tAe{options;renderer;textRenderer;constructor(e){this.options=e||dP,this.options.renderer=this.options.renderer||new WZ,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new MCe}static parse(e,t){return new tAe(t).parse(e)}static parseInline(e,t){return new tAe(t).parseInline(e)}parse(e,t=!0){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=o,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=c||"";continue}}const s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,c=this.renderer.text(a);for(;r+1<e.length&&e[r+1].type==="text";)a=e[++r],c+=`
6791
6791
  `+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t=this.renderer){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}const s=o;switch(s.type){case"escape":{i+=t.text(s);break}case"html":{i+=t.html(s);break}case"link":{i+=t.link(s);break}case"image":{i+=t.image(s);break}case"strong":{i+=t.strong(s);break}case"em":{i+=t.em(s);break}case"codespan":{i+=t.codespan(s);break}case"br":{i+=t.br(s);break}case"del":{i+=t.del(s);break}case"text":{i+=t.text(s);break}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},KZ=class{options;block;constructor(n){this.options=n||dP}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?T3.lex:T3.lexInline}provideParser(){return this.block?M3.parse:M3.parseInline}},Zbi=class{defaults=yCe();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=M3;Renderer=WZ;TextRenderer=MCe;Lexer=T3;Tokenizer=XZ;Hooks=KZ;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(const i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{const r=i;for(const o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(const o of r.rows)for(const s of o)t=t.concat(this.walkTokens(s.tokens,e));break}case"list":{const r=i;t=t.concat(this.walkTokens(r.items,e));break}default:{const r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{const s=r[o].flat(1/0);t=t.concat(this.walkTokens(s,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{const i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=e.renderers[r.name];o?e.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),t.renderer){const r=this.defaults.renderer||new WZ(this.defaults);for(const o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o,a=t.renderer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u||""}}i.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new XZ(this.defaults);for(const o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,a=t.tokenizer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new KZ;for(const o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const s=o,a=t.hooks[s],c=r[s];KZ.passThroughHooks.has(o)?r[s]=l=>{if(this.defaults.async)return Promise.resolve(a.call(r,l)).then(d=>c.call(r,d));const u=a.call(r,l);return c.call(r,u)}:r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,o=t.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return T3.lex(n,e??this.defaults)}parser(n,e){return M3.parse(n,e??this.defaults)}parseMarkdown(n){return(t,i)=>{const r={...i},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);const a=o.hooks?o.hooks.provideLexer():n?T3.lex:T3.lexInline,c=o.hooks?o.hooks.provideParser():n?M3.parse:M3.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(l=>a(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>c(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let l=a(t,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let u=c(l,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(l){return s(l)}}}onError(n,e){return t=>{if(t.message+=`
6792
- Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+WT(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},hP=new Zbi;function Qp(n,e){return hP.parse(n,e)}Qp.options=Qp.setOptions=function(n){return hP.setOptions(n),Qp.defaults=hP.defaults,CEt(Qp.defaults),Qp},Qp.getDefaults=yCe,Qp.defaults=dP,Qp.use=function(...n){return hP.use(...n),Qp.defaults=hP.defaults,CEt(Qp.defaults),Qp},Qp.walkTokens=function(n,e){return hP.walkTokens(n,e)},Qp.parseInline=hP.parseInline,Qp.Parser=M3,Qp.parser=M3.parse,Qp.Renderer=WZ,Qp.TextRenderer=MCe,Qp.Lexer=T3,Qp.lexer=T3.lex,Qp.Tokenizer=XZ,Qp.Hooks=KZ,Qp.parse=Qp,Qp.options,Qp.setOptions,Qp.use,Qp.walkTokens,Qp.parseInline,M3.parse,T3.lex;const Qbi=({review:n,onBack:e})=>{const[t,i]=fe.useState(n.ai_review_text??null),r=uP(),o=n.ai_review_id;fe.useEffect(()=>{if(!o)return;let a;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=fe.useMemo(()=>Qp.parse(n.ai_review_text||""),[n.ai_review_text]);return ce.jsxs(ce.Fragment,{children:[ce.jsxs(RL,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[ce.jsx(V_,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),ce.jsx(IL,{children:"AI Review"})]}),t?ce.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):ce.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:ce.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[ce.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[ce.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),ce.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),ce.jsx("span",{children:"Loading..."})]})})]})},Jbi=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=fe.useState("list_reviews"),[o,s]=fe.useState(null),a=c=>{s(c),r("view_review")};return ce.jsx(FY,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:ce.jsxs(PL,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&ce.jsx(mbi,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&ce.jsx(Qbi,{review:o,onBack:()=>r("list_reviews")})]})})};function CCe(n,e){return CCe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},CCe(n,e)}function WN(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,CCe(n,e)}var KN=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function _u(){return _u=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},_u.apply(null,arguments)}var ZZ=typeof window>"u";function Sb(){}function evi(n,e){return typeof n=="function"?n(e):n}function ACe(n){return typeof n=="number"&&n>=0&&n!==1/0}function QZ(n){return Array.isArray(n)?n:[n]}function HEt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function JZ(n,e,t){return r7(n)?typeof e=="function"?_u({},t,{queryKey:n,queryFn:e}):_u({},e,{queryKey:n}):n}function tvi(n,e,t){return r7(n)?_u({},e,{mutationKey:n}):typeof n=="function"?_u({},e,{mutationFn:n}):_u({},n)}function UC(n,e,t){return r7(n)?[_u({},e,{queryKey:n}),t]:[n||{},e]}function nvi(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function VEt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(r7(a)){if(i){if(e.queryHash!==PCe(a,e.options))return!1}else if(!eQ(e.queryKey,a))return!1}var l=nvi(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||s&&!s(e))}function GEt(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(r7(o)){if(!e.options.mutationKey)return!1;if(t){if(pP(e.options.mutationKey)!==pP(o))return!1}else if(!eQ(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function PCe(n,e){var t=e?.queryKeyHashFn||pP;return t(n)}function pP(n){var e=QZ(n);return ivi(e)}function ivi(n){return JSON.stringify(n,function(e,t){return RCe(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function eQ(n,e){return YEt(QZ(n),QZ(e))}function YEt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!YEt(n[t],e[t])}):!1}function tQ(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||RCe(n)&&RCe(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=tQ(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function rvi(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function RCe(n){if(!qEt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!qEt(t)||!t.hasOwnProperty("isPrototypeOf"))}function qEt(n){return Object.prototype.toString.call(n)==="[object Object]"}function r7(n){return typeof n=="string"||Array.isArray(n)}function ovi(n){return new Promise(function(e){setTimeout(e,n)})}function XEt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function WEt(){if(typeof AbortController=="function")return new AbortController}var svi=(function(n){WN(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!ZZ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})(KN),o7=new svi,avi=(function(n){WN(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!ZZ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})(KN),nQ=new avi;function cvi(n){return Math.min(1e3*Math.pow(2,n),3e4)}function iQ(n){return typeof n?.cancel=="function"}var KEt=function(e){this.revert=e?.revert,this.silent=e?.silent};function rQ(n){return n instanceof KEt}var ZEt=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){s=h,a=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o?.(),s(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o?.(),a(p))},u=function(){return new Promise(function(p){o=p,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},d=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(_){if(!t.isResolved&&(l(new KEt(_)),t.abort==null||t.abort(),iQ(p)))try{p.cancel()}catch{}},t.isTransportCancelable=iQ(p),Promise.resolve(p).then(c).catch(function(m){var _,g;if(!t.isResolved){var x=(_=e.retry)!=null?_:3,b=(g=e.retryDelay)!=null?g:cvi,w=typeof b=="function"?b(t.failureCount,m):b,E=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!E){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),ovi(w).then(function(){if(!o7.isFocused()||!nQ.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},lvi=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):XEt(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&XEt(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),u_=new lvi,QEt=console;function oQ(){return QEt}function uvi(n){QEt=n}var dvi=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=_u({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),ACe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(i,r){var o,s,a=this.state.data,c=evi(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=tQ(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(Sb).catch(Sb):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!HEt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=QZ(this.queryKey),h=WEt(),p={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},_={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(_)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=_.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=_.fetchOptions)==null?void 0:x.meta})}return this.retryer=new ZEt({fn:_.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){rQ(w)&&w.silent||o.dispatch({type:"error",error:w}),rQ(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),oQ().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),u_.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return _u({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return _u({},i,{isPaused:!0});case"continue":return _u({},i,{isPaused:!1});case"fetch":return _u({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return _u({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return rQ(a)&&a.revert&&this.revertState?_u({},this.revertState):_u({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return _u({},i,{isInvalidated:!0});case"setState":return _u({},i,r.state);default:return i}},n})(),hvi=(function(n){WN(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:PCe(c,o),u=this.get(l);return u||(u=new dvi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var s=UC(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return VEt(a,c)})},t.findAll=function(r,o){var s=UC(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return VEt(a,c)}):this.queries},t.notify=function(r){var o=this;u_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(KN),pvi=(function(){function n(t){this.options=_u({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||JEt(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Sb).catch(Sb)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),oQ().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new ZEt({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=fvi(this.state,i),u_.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function JEt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function fvi(n,e){switch(e.type){case"failed":return _u({},n,{failureCount:n.failureCount+1});case"pause":return _u({},n,{isPaused:!0});case"continue":return _u({},n,{isPaused:!1});case"loading":return _u({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return _u({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return _u({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return _u({},n,e.state);default:return n}}var mvi=(function(n){WN(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new pvi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;u_.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return GEt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return GEt(r,o)})},t.notify=function(r){var o=this;u_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return u_.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(Sb)})},Promise.resolve())})},e})(KN);function _vi(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",p=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],_=WEt(),g=_?.signal,x=m,b=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},E=function(Y,W,K,J){return x=J?[W].concat(x):[].concat(x,[W]),J?[K].concat(Y):[].concat(Y,[K])},N=function(Y,W,K,J){if(b)return Promise.reject("Cancelled");if(typeof K>"u"&&!W&&Y.length)return Promise.resolve(Y);var se={queryKey:e.queryKey,signal:g,pageParam:K,meta:e.meta},de=w(se),ve=Promise.resolve(de).then(function(ue){return E(Y,K,ue,J)});if(iQ(de)){var re=ve;re.cancel=de.cancel}return ve},A;if(!p.length)A=N([]);else if(d){var I=typeof u<"u",M=I?u:eTt(e.options,p);A=N(p,I,M)}else if(h){var k=typeof u<"u",C=k?u:yvi(e.options,p);A=N(p,k,C,!0)}else(function(){x=[];var H=typeof e.options.getNextPageParam>"u",Y=c&&p[0]?c(p[0],0,p):!0;A=Y?N([],H,m[0]):Promise.resolve(E([],m[0],p[0]));for(var W=function(se){A=A.then(function(de){var ve=c&&p[se]?c(p[se],se,p):!0;if(ve){var re=H?m[se]:eTt(e.options,de);return N(de,H,re)}return Promise.resolve(E(de,m[se],p[se]))})},K=1;K<p.length;K++)W(K)})();var U=A.then(function(H){return{pages:H,pageParams:x}}),O=U;return O.cancel=function(){b=!0,_?.abort(),iQ(A)&&A.cancel()},U}}}}function eTt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function yvi(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var gvi=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new hvi,this.mutationCache=t.mutationCache||new mvi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=o7.subscribe(function(){o7.isFocused()&&nQ.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=nQ.subscribe(function(){o7.isFocused()&&nQ.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=UC(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(_u({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=JZ(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return u_.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=UC(i,r),s=o[0],a=this.queryCache;u_.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=_u({},c,{active:!0});return u_.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=u_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(Sb).catch(Sb)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=UC(i,r,o),d=u[0],h=u[1],p=_u({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return u_.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=u_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,_u({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(Sb);return l?.throwOnError||(d=d.catch(Sb)),d},e.fetchQuery=function(i,r,o){var s=JZ(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(Sb).catch(Sb)},e.fetchInfiniteQuery=function(i,r,o){var s=JZ(i,r,o);return s.behavior=_vi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(Sb).catch(Sb)},e.cancelMutations=function(){var i=this,r=u_.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Sb).catch(Sb)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return pP(i)===pP(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return eQ(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return pP(i)===pP(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return eQ(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=_u({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=PCe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:_u({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),xvi=(function(n){WN(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),tTt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return ICe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return ICe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&nTt(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(_u({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r?.throwOnError||(o=o.catch(Sb)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(ZZ||this.currentResult.isStale||!ACe(this.options.staleTime))){var o=HEt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(ZZ||this.options.enabled===!1||!ACe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||o7.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(r,o){var s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,p=d?this.currentResult:this.previousQueryResult,m=r.state,_=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,b=m.isFetching,w=m.status,E=!1,N=!1,A;if(o.optimisticResults){var I=this.hasListeners(),M=!I&&tTt(r,o),k=I&&nTt(r,s,o,a);(M||k)&&(b=!0,_||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&p?.isSuccess&&w!=="error")A=p.data,_=p.dataUpdatedAt,w=p.status,E=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)A=this.selectResult;else try{this.selectFn=o.select,A=o.select(m.data),o.structuralSharing!==!1&&(A=tQ(c?.data,A)),this.selectResult=A,this.selectError=null}catch(O){oQ().error(O),this.selectError=O}else A=m.data;if(typeof o.placeholderData<"u"&&typeof A>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=tQ(c?.data,C)),this.selectError=null}catch(O){oQ().error(O),this.selectError=O}typeof C<"u"&&(w="success",A=C,N=!0)}this.selectError&&(g=this.selectError,A=this.selectResult,x=Date.now(),w="error");var U={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:A,dataUpdatedAt:_,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:N,isPreviousData:E,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:NCe(r,o),refetch:this.refetch,remove:this.remove};return U},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],p=l?.some(function(_){return _===u}),m=c?.some(function(_){return _===u});return h&&!m&&(!l||p)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!rvi(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(_u({},s,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!rQ(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;u_.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(KN);function bvi(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function tTt(n,e){return bvi(n,e)||n.state.dataUpdatedAt>0&&ICe(n,e,e.refetchOnMount)}function ICe(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&NCe(n,e)}return!1}function nTt(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&NCe(n,t)}function NCe(n,e){return n.isStaleByTime(e.staleTime)}var vvi=(function(n){WN(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,_u({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:JEt(),o=_u({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;u_.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)})})},e})(KN),wvi=rz.unstable_batchedUpdates;u_.setBatchNotifyFunction(wvi);var Svi=console;uvi(Svi);var iTt=wo.createContext(void 0),rTt=wo.createContext(!1);function oTt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=iTt),window.ReactQueryClientContext):iTt}var kCe=function(){var e=wo.useContext(oTt(wo.useContext(rTt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Evi=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;wo.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=oTt(r);return wo.createElement(rTt.Provider,{value:r},wo.createElement(s.Provider,{value:t},o))};function Tvi(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Mvi=wo.createContext(Tvi()),Cvi=function(){return wo.useContext(Mvi)};function sTt(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Avi(n,e,t){var i=wo.useRef(!1),r=wo.useState(0),o=r[1],s=tvi(n,e),a=kCe(),c=wo.useRef();c.current?c.current.setOptions(s):c.current=new vvi(a,s);var l=c.current.getCurrentResult();wo.useEffect(function(){i.current=!0;var d=c.current.subscribe(u_.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=wo.useCallback(function(d,h){c.current.mutate(d,h).catch(Sb)},[]);if(l.error&&sTt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return _u({},l,{mutate:u,mutateAsync:l.mutate})}function Pvi(n,e){var t=wo.useRef(!1),i=wo.useState(0),r=i[1],o=kCe(),s=Cvi(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=u_.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=u_.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=u_.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=wo.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(wo.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(u_.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),wo.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&sTt(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function Rvi(n,e,t){var i=JZ(n,e,t);return Pvi(i,xvi)}function Ivi({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return ce.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsx(D4n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),ce.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[ce.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),ce.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),ce.jsx("hr",{className:"rf-border-gray-200"}),ce.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[ce.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),ce.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>ce.jsxs("button",{type:"button",className:Va("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===o.carrier?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:()=>t(o.carrier),children:[ce.jsx($4n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),ce.jsxs("div",{className:"rf-text-left rf-flex-1",children:[ce.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),ce.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[ce.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),ce.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&ce.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:ce.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[ce.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[ce.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),ce.jsx("div",{className:"rf-flex rf-items-center",children:ce.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const Nvi=async n=>{try{const{order_quote_id:e}=await HZ.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof QD){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},kvi=async n=>{const{order_quote:e}=await HZ.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},Ovi=()=>{const n=kCe();return Avi({mutationKey:["createOrderQuote"],mutationFn:e=>Nvi(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},Lvi=n=>{const{data:e,error:t,status:i}=Rvi(["getOrderQuote",n],()=>kvi(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},Dvi=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=fe.useState(null),[s,a]=fe.useState(null),{mutate:c,error:l}=Ovi();fe.useEffect(()=>{e&&c(e,{onSuccess:_=>{a(_.order_quote_id)}})},[e]);const{data:u}=Lvi(s||void 0),d=l&&l.error?.message||u?.error?.message;rht({errorMessage:d});const h=async _=>{const g=BZ("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${_}&shipping_option=${r}`};fe.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const _=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(_?.carrier||null)}},[u]);const p=fe.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((_,g)=>g.cost<_.cost?g:_,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?ce.jsx(Fvi,{signIn:t}):ce.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:[ce.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&ce.jsx(zvi,{message:"Fetching quotes..."}),(l||u?.error)&&ce.jsx($vi,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&ce.jsxs(ce.Fragment,{children:[ce.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"}),ce.jsx(Ivi,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),ce.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[ce.jsx(V_,{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:n,children:"Cancel"}),ce.jsx(V_,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){ql.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),ce.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},zvi=({message:n})=>ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[ce.jsx(ZM,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),ce.jsx("p",{className:"rf-text-gray-600",children:n})]}),$vi=({message:n})=>ce.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),Fvi=({signIn:n})=>ce.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:[ce.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[ce.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),ce.jsxs(V_,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsx(Dge,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),Uvi=new gvi,Bvi=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>ce.jsx(Evi,{client:Uvi,children:ce.jsx(FY,{open:n,onOpenChange:c=>{c||e()},children:ce.jsx(PL,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:ce.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&ce.jsx(Dvi,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),jvi=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=NT(a=>a.circuitJson);return ce.jsx(Bvi,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},Hvi=()=>{const[n,e]=fe.useState(!1),[t,i]=fe.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:jvi}};async function aTt(){const n=await fetch(`${mC}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const i of e){const o=await(await fetch(`${mC}/files/get?file_path=${encodeURIComponent(i.file_path)}`)).json();(o.file?.text_content||o.file?.binary_content_b64)&&t.set(i.file_path,{text_content:o.file.text_content,binary_content_b64:o.file.binary_content_b64})}return t}const Vvi="https://api.tscircuit.com/bug_reports/view?bug_report_id=",Gvi=n=>`${Vvi}${n}`,Yvi=()=>{const[n,e]=fe.useState(!1),[t,i]=fe.useState(!1),[r,o]=fe.useState(null),s=fe.useRef(null),[a,c]=fe.useState(null),[l,u]=fe.useState(0),d=fe.useMemo(()=>jZ()?!0:typeof document>"u"?!1:document.cookie.split(";").some(g=>g.trim().startsWith("session=")),[n]);fe.useEffect(()=>{if(n&&!a&&s.current){const g=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;g&&(s.current.value=`I'm getting this execution error:
6792
+ Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+WT(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},hP=new Zbi;function Qp(n,e){return hP.parse(n,e)}Qp.options=Qp.setOptions=function(n){return hP.setOptions(n),Qp.defaults=hP.defaults,CEt(Qp.defaults),Qp},Qp.getDefaults=yCe,Qp.defaults=dP,Qp.use=function(...n){return hP.use(...n),Qp.defaults=hP.defaults,CEt(Qp.defaults),Qp},Qp.walkTokens=function(n,e){return hP.walkTokens(n,e)},Qp.parseInline=hP.parseInline,Qp.Parser=M3,Qp.parser=M3.parse,Qp.Renderer=WZ,Qp.TextRenderer=MCe,Qp.Lexer=T3,Qp.lexer=T3.lex,Qp.Tokenizer=XZ,Qp.Hooks=KZ,Qp.parse=Qp,Qp.options,Qp.setOptions,Qp.use,Qp.walkTokens,Qp.parseInline,M3.parse,T3.lex;const Qbi=({review:n,onBack:e})=>{const[t,i]=fe.useState(n.ai_review_text??null),r=uP(),o=n.ai_review_id;fe.useEffect(()=>{if(!o)return;let a;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=fe.useMemo(()=>Qp.parse(n.ai_review_text||""),[n.ai_review_text]);return ce.jsxs(ce.Fragment,{children:[ce.jsxs(RL,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[ce.jsx(V_,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),ce.jsx(IL,{children:"AI Review"})]}),t?ce.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):ce.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:ce.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[ce.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[ce.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),ce.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),ce.jsx("span",{children:"Loading..."})]})})]})},Jbi=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=fe.useState("list_reviews"),[o,s]=fe.useState(null),a=c=>{s(c),r("view_review")};return ce.jsx(FY,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:ce.jsxs(PL,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&ce.jsx(mbi,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&ce.jsx(Qbi,{review:o,onBack:()=>r("list_reviews")})]})})};function CCe(n,e){return CCe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},CCe(n,e)}function WN(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,CCe(n,e)}var KN=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function _u(){return _u=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},_u.apply(null,arguments)}var ZZ=typeof window>"u";function Sb(){}function evi(n,e){return typeof n=="function"?n(e):n}function ACe(n){return typeof n=="number"&&n>=0&&n!==1/0}function QZ(n){return Array.isArray(n)?n:[n]}function HEt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function JZ(n,e,t){return r7(n)?typeof e=="function"?_u({},t,{queryKey:n,queryFn:e}):_u({},e,{queryKey:n}):n}function tvi(n,e,t){return r7(n)?_u({},e,{mutationKey:n}):typeof n=="function"?_u({},e,{mutationFn:n}):_u({},n)}function UC(n,e,t){return r7(n)?[_u({},e,{queryKey:n}),t]:[n||{},e]}function nvi(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function VEt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(r7(a)){if(i){if(e.queryHash!==PCe(a,e.options))return!1}else if(!eQ(e.queryKey,a))return!1}var l=nvi(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||s&&!s(e))}function GEt(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(r7(o)){if(!e.options.mutationKey)return!1;if(t){if(pP(e.options.mutationKey)!==pP(o))return!1}else if(!eQ(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function PCe(n,e){var t=e?.queryKeyHashFn||pP;return t(n)}function pP(n){var e=QZ(n);return ivi(e)}function ivi(n){return JSON.stringify(n,function(e,t){return RCe(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function eQ(n,e){return YEt(QZ(n),QZ(e))}function YEt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!YEt(n[t],e[t])}):!1}function tQ(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||RCe(n)&&RCe(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=tQ(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function rvi(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function RCe(n){if(!qEt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!qEt(t)||!t.hasOwnProperty("isPrototypeOf"))}function qEt(n){return Object.prototype.toString.call(n)==="[object Object]"}function r7(n){return typeof n=="string"||Array.isArray(n)}function ovi(n){return new Promise(function(e){setTimeout(e,n)})}function XEt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function WEt(){if(typeof AbortController=="function")return new AbortController}var svi=(function(n){WN(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!ZZ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})(KN),o7=new svi,avi=(function(n){WN(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!ZZ&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})(KN),nQ=new avi;function cvi(n){return Math.min(1e3*Math.pow(2,n),3e4)}function iQ(n){return typeof n?.cancel=="function"}var KEt=function(e){this.revert=e?.revert,this.silent=e?.silent};function rQ(n){return n instanceof KEt}var ZEt=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,p){s=h,a=p});var c=function(p){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(p),o?.(),s(p))},l=function(p){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(p),o?.(),a(p))},u=function(){return new Promise(function(p){o=p,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},d=function h(){if(!t.isResolved){var p;try{p=e.fn()}catch(m){p=Promise.reject(m)}r=function(_){if(!t.isResolved&&(l(new KEt(_)),t.abort==null||t.abort(),iQ(p)))try{p.cancel()}catch{}},t.isTransportCancelable=iQ(p),Promise.resolve(p).then(c).catch(function(m){var _,g;if(!t.isResolved){var x=(_=e.retry)!=null?_:3,b=(g=e.retryDelay)!=null?g:cvi,w=typeof b=="function"?b(t.failureCount,m):b,E=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!E){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),ovi(w).then(function(){if(!o7.isFocused()||!nQ.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},lvi=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):XEt(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&XEt(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),u_=new lvi,QEt=console;function oQ(){return QEt}function uvi(n){QEt=n}var dvi=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=_u({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),ACe(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(i,r){var o,s,a=this.state.data,c=evi(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=tQ(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(Sb).catch(Sb):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!HEt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=QZ(this.queryKey),h=WEt(),p={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(p)):Promise.reject("Missing queryFn")},_={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(_)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=_.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=_.fetchOptions)==null?void 0:x.meta})}return this.retryer=new ZEt({fn:_.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){rQ(w)&&w.silent||o.dispatch({type:"error",error:w}),rQ(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),oQ().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:_.options.retry,retryDelay:_.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),u_.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return _u({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return _u({},i,{isPaused:!0});case"continue":return _u({},i,{isPaused:!1});case"fetch":return _u({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return _u({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return rQ(a)&&a.revert&&this.revertState?_u({},this.revertState):_u({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return _u({},i,{isInvalidated:!0});case"setState":return _u({},i,r.state);default:return i}},n})(),hvi=(function(n){WN(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:PCe(c,o),u=this.get(l);return u||(u=new dvi({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var s=UC(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return VEt(a,c)})},t.findAll=function(r,o){var s=UC(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return VEt(a,c)}):this.queries},t.notify=function(r){var o=this;u_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;u_.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(KN),pvi=(function(){function n(t){this.options=_u({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||JEt(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(Sb).catch(Sb)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),oQ().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new ZEt({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=fvi(this.state,i),u_.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function JEt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function fvi(n,e){switch(e.type){case"failed":return _u({},n,{failureCount:n.failureCount+1});case"pause":return _u({},n,{isPaused:!0});case"continue":return _u({},n,{isPaused:!1});case"loading":return _u({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return _u({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return _u({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return _u({},n,e.state);default:return n}}var mvi=(function(n){WN(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new pvi({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;u_.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return GEt(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return GEt(r,o)})},t.notify=function(r){var o=this;u_.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return u_.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(Sb)})},Promise.resolve())})},e})(KN);function _vi(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",p=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],_=WEt(),g=_?.signal,x=m,b=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},E=function(Y,W,K,J){return x=J?[W].concat(x):[].concat(x,[W]),J?[K].concat(Y):[].concat(Y,[K])},N=function(Y,W,K,J){if(b)return Promise.reject("Cancelled");if(typeof K>"u"&&!W&&Y.length)return Promise.resolve(Y);var se={queryKey:e.queryKey,signal:g,pageParam:K,meta:e.meta},de=w(se),ve=Promise.resolve(de).then(function(ue){return E(Y,K,ue,J)});if(iQ(de)){var re=ve;re.cancel=de.cancel}return ve},A;if(!p.length)A=N([]);else if(d){var I=typeof u<"u",M=I?u:eTt(e.options,p);A=N(p,I,M)}else if(h){var k=typeof u<"u",C=k?u:yvi(e.options,p);A=N(p,k,C,!0)}else(function(){x=[];var H=typeof e.options.getNextPageParam>"u",Y=c&&p[0]?c(p[0],0,p):!0;A=Y?N([],H,m[0]):Promise.resolve(E([],m[0],p[0]));for(var W=function(se){A=A.then(function(de){var ve=c&&p[se]?c(p[se],se,p):!0;if(ve){var re=H?m[se]:eTt(e.options,de);return N(de,H,re)}return Promise.resolve(E(de,m[se],p[se]))})},K=1;K<p.length;K++)W(K)})();var U=A.then(function(H){return{pages:H,pageParams:x}}),O=U;return O.cancel=function(){b=!0,_?.abort(),iQ(A)&&A.cancel()},U}}}}function eTt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function yvi(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var gvi=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new hvi,this.mutationCache=t.mutationCache||new mvi,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=o7.subscribe(function(){o7.isFocused()&&nQ.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=nQ.subscribe(function(){o7.isFocused()&&nQ.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=UC(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(_u({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=JZ(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return u_.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=UC(i,r),s=o[0],a=this.queryCache;u_.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=_u({},c,{active:!0});return u_.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=u_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(Sb).catch(Sb)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=UC(i,r,o),d=u[0],h=u[1],p=_u({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return u_.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(p,h)})},e.refetchQueries=function(i,r,o){var s=this,a=UC(i,r,o),c=a[0],l=a[1],u=u_.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,_u({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(Sb);return l?.throwOnError||(d=d.catch(Sb)),d},e.fetchQuery=function(i,r,o){var s=JZ(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(Sb).catch(Sb)},e.fetchInfiniteQuery=function(i,r,o){var s=JZ(i,r,o);return s.behavior=_vi(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(Sb).catch(Sb)},e.cancelMutations=function(){var i=this,r=u_.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(Sb).catch(Sb)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return pP(i)===pP(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return eQ(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return pP(i)===pP(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return eQ(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=_u({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=PCe(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:_u({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),xvi=(function(n){WN(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),tTt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return ICe(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return ICe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&nTt(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(_u({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r?.throwOnError||(o=o.catch(Sb)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(ZZ||this.currentResult.isStale||!ACe(this.options.staleTime))){var o=HEt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(ZZ||this.options.enabled===!1||!ACe(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||o7.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(r,o){var s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,p=d?this.currentResult:this.previousQueryResult,m=r.state,_=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,b=m.isFetching,w=m.status,E=!1,N=!1,A;if(o.optimisticResults){var I=this.hasListeners(),M=!I&&tTt(r,o),k=I&&nTt(r,s,o,a);(M||k)&&(b=!0,_||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&p?.isSuccess&&w!=="error")A=p.data,_=p.dataUpdatedAt,w=p.status,E=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)A=this.selectResult;else try{this.selectFn=o.select,A=o.select(m.data),o.structuralSharing!==!1&&(A=tQ(c?.data,A)),this.selectResult=A,this.selectError=null}catch(O){oQ().error(O),this.selectError=O}else A=m.data;if(typeof o.placeholderData<"u"&&typeof A>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=tQ(c?.data,C)),this.selectError=null}catch(O){oQ().error(O),this.selectError=O}typeof C<"u"&&(w="success",A=C,N=!0)}this.selectError&&(g=this.selectError,A=this.selectResult,x=Date.now(),w="error");var U={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:A,dataUpdatedAt:_,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:N,isPreviousData:E,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:NCe(r,o),refetch:this.refetch,remove:this.remove};return U},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],p=l?.some(function(_){return _===u}),m=c?.some(function(_){return _===u});return h&&!m&&(!l||p)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!rvi(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(_u({},s,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!rQ(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;u_.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(KN);function bvi(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function tTt(n,e){return bvi(n,e)||n.state.dataUpdatedAt>0&&ICe(n,e,e.refetchOnMount)}function ICe(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&NCe(n,e)}return!1}function nTt(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&NCe(n,t)}function NCe(n,e){return n.isStaleByTime(e.staleTime)}var vvi=(function(n){WN(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,_u({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:JEt(),o=_u({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;u_.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)})})},e})(KN),wvi=rz.unstable_batchedUpdates;u_.setBatchNotifyFunction(wvi);var Svi=console;uvi(Svi);var iTt=wo.createContext(void 0),rTt=wo.createContext(!1);function oTt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=iTt),window.ReactQueryClientContext):iTt}var kCe=function(){var e=wo.useContext(oTt(wo.useContext(rTt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Evi=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;wo.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=oTt(r);return wo.createElement(rTt.Provider,{value:r},wo.createElement(s.Provider,{value:t},o))};function Tvi(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var Mvi=wo.createContext(Tvi()),Cvi=function(){return wo.useContext(Mvi)};function sTt(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function Avi(n,e,t){var i=wo.useRef(!1),r=wo.useState(0),o=r[1],s=tvi(n,e),a=kCe(),c=wo.useRef();c.current?c.current.setOptions(s):c.current=new vvi(a,s);var l=c.current.getCurrentResult();wo.useEffect(function(){i.current=!0;var d=c.current.subscribe(u_.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=wo.useCallback(function(d,h){c.current.mutate(d,h).catch(Sb)},[]);if(l.error&&sTt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return _u({},l,{mutate:u,mutateAsync:l.mutate})}function Pvi(n,e){var t=wo.useRef(!1),i=wo.useState(0),r=i[1],o=kCe(),s=Cvi(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=u_.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=u_.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=u_.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=wo.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(wo.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(u_.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),wo.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&sTt(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function Rvi(n,e,t){var i=JZ(n,e,t);return Pvi(i,xvi)}function Ivi({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return ce.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsx(D4n,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),ce.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[ce.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),ce.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),ce.jsx("hr",{className:"rf-border-gray-200"}),ce.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[ce.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),ce.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>ce.jsxs("button",{type:"button",className:Va("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===o.carrier?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:()=>t(o.carrier),children:[ce.jsx($4n,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),ce.jsxs("div",{className:"rf-text-left rf-flex-1",children:[ce.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),ce.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[ce.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),ce.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&ce.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:ce.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[ce.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[ce.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),ce.jsx("div",{className:"rf-flex rf-items-center",children:ce.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const Nvi=async n=>{try{const{order_quote_id:e}=await HZ.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof QD){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},kvi=async n=>{const{order_quote:e}=await HZ.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},Ovi=()=>{const n=kCe();return Avi({mutationKey:["createOrderQuote"],mutationFn:e=>Nvi(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},Lvi=n=>{const{data:e,error:t,status:i}=Rvi(["getOrderQuote",n],()=>kvi(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},Dvi=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=fe.useState(null),[s,a]=fe.useState(null),{mutate:c,error:l}=Ovi();fe.useEffect(()=>{e&&c(e,{onSuccess:_=>{a(_.order_quote_id)}})},[e]);const{data:u}=Lvi(s||void 0),d=l&&l.error?.message||u?.error?.message;rht({errorMessage:d});const h=async _=>{const g=BZ("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${_}&shipping_option=${r}`};fe.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const _=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(_?.carrier||null)}},[u]);const p=fe.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((_,g)=>g.cost<_.cost?g:_,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?ce.jsx(Fvi,{signIn:t}):ce.jsxs("div",{className:`
6793
+ rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl
6794
+ rf-p-4 sm:rf-p-6 md:rf-p-8
6795
+ rf-flex rf-flex-col rf-gap-3
6796
+ rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
6797
+ `,children:[ce.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&ce.jsx(zvi,{message:"Fetching quotes..."}),(l||u?.error)&&ce.jsx($vi,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&ce.jsxs(ce.Fragment,{children:[ce.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-2 sm:rf-p-3 rf-rounded-md rf-text-center rf-text-xs sm:rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),ce.jsx(Ivi,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:p+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),ce.jsxs("div",{className:"rf-flex rf-flex-col-reverse sm:rf-flex-row rf-justify-between rf-mt-5 rf-gap-3 sm:rf-gap-4",children:[ce.jsx(V_,{variant:"outline",type:"button",className:"rf-w-full sm:rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600 rf-text-sm sm:rf-text-base",onClick:n,children:"Cancel"}),ce.jsx(V_,{type:"button",className:"rf-w-full sm:rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700 rf-text-sm sm:rf-text-base",disabled:r===null,onClick:()=>{if(r===null){ql.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),ce.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-3 sm:rf-mt-4 rf-px-2",children:"Pricing may vary based on specifications."})]})},zvi=({message:n})=>ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[ce.jsx(ZM,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),ce.jsx("p",{className:"rf-text-gray-600",children:n})]}),$vi=({message:n})=>ce.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),Fvi=({signIn:n})=>ce.jsxs("div",{className:`
6798
+ rf-w-full rf-mx-auto rf-bg-white rf-rounded-2xl
6799
+ rf-p-4 sm:rf-p-6 md:rf-p-8
6800
+ rf-flex rf-flex-col rf-gap-3
6801
+ rf-max-w-full sm:rf-max-w-md md:rf-max-w-lg lg:rf-max-w-xl
6802
+ `,children:[ce.jsx("h2",{className:"rf-text-xl sm:rf-text-2xl md:rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),ce.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-4 sm:rf-py-6 md:rf-py-8",children:[ce.jsx("p",{className:"rf-text-gray-600 rf-text-sm sm:rf-text-base rf-text-center rf-px-2",children:"Please sign in to continue"}),ce.jsxs(V_,{onClick:n,className:"rf-flex rf-items-center rf-gap-2 rf-text-sm sm:rf-text-base rf-px-4 sm:rf-px-6",children:[ce.jsx(Dge,{className:"rf-w-4 rf-h-4 sm:rf-w-5 sm:rf-h-5"}),"Sign in with GitHub"]})]})]}),Uvi=new gvi,Bvi=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>ce.jsx(Evi,{client:Uvi,children:ce.jsx(FY,{open:n,onOpenChange:c=>{c||e()},children:ce.jsx(PL,{className:`
6803
+ !rf-p-0 !rf-z-[101] rf-rounded-md
6804
+ !rf-w-[95vw] !rf-max-w-[95vw]
6805
+ sm:rf-w-[90vw] sm:rf-max-w-[500px]
6806
+ md:rf-w-auto md:rf-max-w-[660px]
6807
+ lg:rf-max-w-[720px]
6808
+ xl:rf-max-w-[800px]
6809
+ rf-max-h-[90vh] rf-overflow-y-auto
6810
+ `,children:ce.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&ce.jsx(Dvi,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),jvi=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=NT(a=>a.circuitJson);return ce.jsx(Bvi,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},Hvi=()=>{const[n,e]=fe.useState(!1),[t,i]=fe.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:jvi}};async function aTt(){const n=await fetch(`${mC}/files/list`),{file_list:e}=await n.json(),t=new Map;for(const i of e){const o=await(await fetch(`${mC}/files/get?file_path=${encodeURIComponent(i.file_path)}`)).json();(o.file?.text_content||o.file?.binary_content_b64)&&t.set(i.file_path,{text_content:o.file.text_content,binary_content_b64:o.file.binary_content_b64})}return t}const Vvi="https://api.tscircuit.com/bug_reports/view?bug_report_id=",Gvi=n=>`${Vvi}${n}`,Yvi=()=>{const[n,e]=fe.useState(!1),[t,i]=fe.useState(!1),[r,o]=fe.useState(null),s=fe.useRef(null),[a,c]=fe.useState(null),[l,u]=fe.useState(0),d=fe.useMemo(()=>jZ()?!0:typeof document>"u"?!1:document.cookie.split(";").some(g=>g.trim().startsWith("session=")),[n]);fe.useEffect(()=>{if(n&&!a&&s.current){const g=typeof window<"u"?window.__TSCIRCUIT_LAST_EXECUTION_ERROR:void 0;g&&(s.current.value=`I'm getting this execution error:
6793
6811
 
6794
6812
  ${g}`)}},[n,a]),fe.useEffect(()=>{n&&!a&&aTt().then(g=>{u(g.size)}).catch(g=>{console.error("Failed to fetch file count",g),u(0)})},[n,a]);const h=fe.useCallback(()=>{o(null),c(null),s.current&&(s.current.value=""),e(!0)},[]),p=fe.useCallback(()=>{e(!1)},[]),m=fe.useCallback(async()=>{i(!0),o(null);const g=uP(),x=s.current?.value||"";try{const b=await aTt();if(b.size===0){ql.error("No project files available to include in the bug report"),i(!1);return}const w=new Date(Date.now()+1440*60*1e3).toISOString(),N=(await g.post("bug_reports/create",{json:{text:x.trim()||void 0,is_auto_deleted:!0,delete_at:w}}).json()).bug_report.bug_report_id;for(const[I,M]of b.entries()){const k={bug_report_id:N,file_path:I};M.text_content&&(k.content_text=M.text_content),M.binary_content_b64&&(k.content_base64=M.binary_content_b64),await g.post("bug_reports/upload_file",{json:k})}const A=Gvi(N);c({bugReportUrl:A})}catch(b){if(console.error("Failed to submit bug report",b),b instanceof QD)if(b.response.status===401){const w="You must be logged in to report a bug. Please sign in and try again.";o(w),ql.error(w)}else{const w=`Failed to submit bug report (${b.response.status})`;o(w),ql.error(w)}else if(b instanceof Error)o(b.message),ql.error(b.message);else{const w="Failed to submit bug report";o(w),ql.error(w)}}finally{i(!1)}},[]);return{BugReportDialog:fe.useMemo(()=>ce.jsx(Yht,{open:n,onOpenChange:g=>{g?(o(null),c(null),e(!0)):t||p()},children:ce.jsxs(Dbe,{children:[ce.jsxs(zbe,{children:[ce.jsx(Fbe,{children:a?"Bug Report Created":"Report Bug"}),ce.jsx(Ube,{asChild:!0,children:a?ce.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[ce.jsx("p",{children:"Bug report created successfully."}),ce.jsx("div",{children:ce.jsx("a",{className:"rf-text-blue-600 hover:rf-underline",href:a.bugReportUrl,target:"_blank",rel:"noreferrer",children:"View bug report"})}),ce.jsxs("p",{children:["Please share this link privately with tscircuit staff so we can help debug. Join the",ce.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"tscircuit Discord"}),"."]})]}):ce.jsxs("div",{className:"rf-text-left rf-space-y-3 rf-text-sm",children:[ce.jsxs("p",{children:["Reporting a bug will upload your entire project",l>0?` (${l} file${l===1?"":"s"})`:""," ","to tscircuit support."]}),ce.jsxs("div",{className:"rf-space-y-2",children:[ce.jsx("label",{htmlFor:"bug-description",className:"rf-block rf-font-medium",children:"Description (optional)"}),ce.jsx("textarea",{ref:s,id:"bug-description",className:"rf-w-full rf-min-h-[100px] rf-px-3 rf-py-2 rf-text-sm rf-border rf-border-gray-300 rf-rounded-md focus:rf-outline-none focus:rf-ring-2 focus:rf-ring-blue-500",placeholder:"Describe the issue you're experiencing...",disabled:t})]}),ce.jsxs("p",{children:["Share the generated bug report link privately with tscircuit staff so we can help debug your issue. You can also reach out on our",ce.jsx("a",{className:"rf-ml-1 rf-text-blue-600 hover:rf-underline",href:"https://tscircuit.com/join",target:"_blank",rel:"noreferrer",children:"Discord community"}),"."]}),!d&&ce.jsx("p",{className:"rf-text-red-600",children:"You appear to be logged out. Please log in before reporting a bug or the upload will fail."}),r&&ce.jsx("p",{className:"rf-text-red-600",children:r})]})})]}),ce.jsx($be,{children:a?ce.jsx("button",{type:"button",className:k8(),onClick:()=>{p()},children:"Close"}):ce.jsxs(ce.Fragment,{children:[ce.jsx(Bbe,{disabled:t,onClick:()=>{t||p()},children:"Cancel"}),ce.jsx("button",{type:"button",className:P2(k8(),t&&"rf-opacity-70 rf-cursor-not-allowed"),disabled:t,onClick:g=>{g.preventDefault(),m()},children:t?"Reporting...":"Upload & Report"})]})})]})},"bug-report-dialog"),[n,t,p,r,a,l,d,m]),openBugReportDialog:h}},qvi=n=>{const e=Mbe(ue=>ue.lastRunEvalVersion),t=NT(ue=>ue.currentMainComponentPath),[i,r]=fe.useState(null),[o,s]=fe.useState(!1),[a,c]=fe.useState(!0),[l,u]=fe.useState(!1),[d,h]=fe.useState(null),[p,m]=fe.useState(null),[_,g]=fe.useState(!1),[x,b]=fe.useState(null),[w,E]=fe.useState(null),[N,A]=fe.useState(!1),[I,M]=fe.useState(!1),k=Hvi(),C=NT(ue=>ue.pushEvent),U=NT(ue=>ue.recentEvents),O=fe.useMemo(()=>Date.now(),[]);_Un(ue=>{if(!(new Date(ue.created_at).valueOf()<O+500)){if(ue.event_type==="FILE_UPDATED"){s(!0);return}if(ue.event_type==="SNIPPET_SAVED"){s(!1),c(!1),b("Snippet saved successfully."),A(!1);return}ue.event_type==="REQUEST_EXPORT"&&(M(!0),b("Export processing..."),A(!1)),ue.event_type==="EXPORT_CREATED"&&(b(`Export created: ${ue.exportFilePath}`),A(!1),M(!1))}}),fe.useEffect(()=>{if(!l||d===null)return;const ue=U.filter(ke=>new Date(ke.created_at).valueOf()>d),ye=ue.find(ke=>ke.event_type==="FAILED_TO_SAVE_SNIPPET"),Te=ue.find(ke=>ke.event_type==="SNIPPET_SAVED");ye&&(u(!1),h(null),E(ye.message??"Failed to save snippet. See console for error."),console.error(ye.message),A(!0),ye.error_code==="SNIPPET_UNSET"&&ye.available_snippet_names&&(m(ye.available_snippet_names),g(!0))),Te&&(u(!1),h(null),b("Snippet saved successfully."),A(!1))},[U,l]);const H=async()=>{u(!0),h(Date.now()),b(null),A(!1),await C({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:i})},W=NT(ue=>ue.circuitJson)??n.circuitJson,[K,J]=fe.useState(!1),[se,de]=fe.useState(!1),{BugReportDialog:ve,openBugReportDialog:re}=Yvi();return ce.jsxs(ce.Fragment,{children:[ce.jsxs(bxe,{children:[ce.jsx(vxe,{asChild:!0,children:ce.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),ce.jsxs(_G,{className:"rf-z-[101]",children:[!n.isWebEmbedded&&ce.jsxs(ce.Fragment,{children:[ce.jsx(yb,{className:"rf-text-xs",onSelect:H,disabled:l,children:l?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&ce.jsx(yb,{className:"rf-text-xs",onSelect:()=>{k.open()},children:"Order"}),ce.jsx(yb,{className:"rf-text-xs",onSelect:()=>J(!0),disabled:l,children:"Import"}),ce.jsx(yb,{className:"rf-text-xs",onSelect:()=>{if(!jZ()){ql.error("Requires tscircuit token");return}de(!0)},children:"AI Review"})]}),!n.isWebEmbedded&&ce.jsx(yb,{className:"rf-text-xs",onSelect:()=>{re()},children:"Report Bug"}),ce.jsxs(Sxe,{children:[ce.jsx(fG,{className:"rf-text-xs",disabled:I,children:I?"Exporting...":"Export"}),ce.jsx(wxe,{children:ce.jsx(mG,{children:G1i.map((ue,ye)=>ce.jsx(yb,{onSelect:()=>{if(!W){ql.error("No Circuit JSON to export");return}let Te="Untitled";if(t){const ke=t.split("/").pop();ke&&(Te=ke.replace(/\.[^.]+$/,""))}Y1i({exportName:ue.name,circuitJson:W,projectName:n.projectName??i??Te})},disabled:I,children:ce.jsx("span",{className:"rf-text-xs",children:ue.name})},ye))})})]}),!n.isWebEmbedded&&ce.jsxs(Sxe,{children:[ce.jsx(fG,{className:"rf-text-xs",children:"Advanced"}),ce.jsx(wxe,{children:ce.jsxs(mG,{children:[ce.jsx(yb,{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[ce.jsx(tpt,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:ue=>{n.onChangeShouldLoadLatestEval?.(ue===!0)}}),ce.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&ce.jsx(yb,{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),ce.jsx(yb,{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/runframe@",cUn.version]})})}),ce.jsx(yb,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:ce.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:ce.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),ce.jsx(Yht,{open:N,onOpenChange:A,children:ce.jsxs(Dbe,{children:[ce.jsxs(zbe,{children:[ce.jsx(Fbe,{children:"Error Saving Snippet"}),ce.jsx(Ube,{children:w})]}),ce.jsx($be,{children:ce.jsx(Bbe,{onClick:()=>A(!1),children:"Dismiss"})})]})}),ce.jsx(mUn,{snippetNames:p??[],onSelect:async ue=>{u(!0),h(Date.now()),r(ue),await C({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:ue}),g(!1)},onCancel:()=>g(!1),isOpen:_})]}),ve,ce.jsx(jvt,{isOpen:K,onClose:()=>J(!1)}),ce.jsx(Jbi,{isOpen:se,onClose:()=>de(!1),packageName:i}),ce.jsx(hNn,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{className:"rf-break-all",style:{zIndex:1e5}}}),ce.jsx(k.OrderDialog,{isOpen:k.isOpen,onClose:k.close,stage:k.stage,setStage:k.setStage})]})},Xvi=["assembly","pinout","bom","circuit_json","errors","render_log"],Wvi=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:h,renderLog:p,showImportAndFormatButtons:m=!0,className:_,headerClassName:g,leftHeaderContent:x,readOnly:b,isStreaming:w,autoroutingLog:E,onReportAutoroutingLog:N,isRunningCode:A,hasCodeChangedSinceLastRun:I,onEditEvent:M,editEvents:k,defaultActiveTab:C,defaultTab:U,availableTabs:O,autoRotate3dViewerDisabled:H,showSchematicDebugGrid:Y=!1,showToggleFullScreen:W=!0,defaultToFullScreen:K=!1,activeEffectName:J,allowSelectingVersion:se=!0,showFileMenu:de=!1,isWebEmbedded:ve=!1,projectName:re,onRerunWithDebug:ue})=>{tht();const{versions:ye,latestVersion:Te,lastRunEvalVersion:ke,search:ze,setSearch:je,selectVersion:Re}=uUn(se),oe=fe.useMemo(()=>o?o.filter(Le=>Le&&"error_type"in Le||Le.type.includes("error")):null,[o]),Ee=fe.useMemo(()=>o?o.filter(Le=>Le&&"warning_type"in Le||Le.type.includes("warning")):null,[o]);rht({errorMessage:i,errorStack:r,circuitJsonErrors:oe});const[be,Ge]=nht("runframe-active-tab",C??U??O?.[0]??"pcb"),[nt,ct]=fe.useState(null),[Me,Qe]=fe.useState(K);rUn(Me);const Xe=fe.useCallback(Le=>{Ge(Le),h?.(Le)},[h,Ge]),Ve=()=>{Qe(!Me)};fe.useEffect(()=>{i&&(be!=="errors"&&ct(be),Xe("errors"))},[i]),fe.useEffect(()=>{(be==="code"||be==="errors")&&o&&!i&&Xe(nt??C??U??O?.[0]??"pcb")},[o]);const et=fe.useCallback(Le=>{window.TSCIRCUIT_3D_OBJECT_REF=Le===null?void 0:Le},[]);return ce.jsx("div",{className:Va("flex flex-col relative rf-overflow-x-hidden rf-h-full",_),children:ce.jsx("div",{className:Va("rf-md:sticky rf-md:top-2 rf-h-full",Me&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:ce.jsxs(aee,{value:be,onValueChange:Xe,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[ce.jsxs("div",{className:Va("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,de&&!x&&ce.jsx(qvi,{isWebEmbedded:ve,circuitJson:o,projectName:re}),(x||de)&&ce.jsx("div",{className:"rf-flex-grow"}),!x&&!de&&A&&ce.jsx(ZM,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!de&&ce.jsx("div",{className:"rf-flex-grow"}),p&&p.progress!==1&&!i&&ce.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[J?ce.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:J,children:J}):p.lastRenderEvent&&ce.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:p.lastRenderEvent?.phase??"",children:p.lastRenderEvent?.phase??""}),ce.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:ce.jsx(ZM,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),ce.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((p.progress??0)*100).toFixed(1),"%"]})]}),a&&ce.jsxs(zz,{children:[c&&ce.jsx(f5,{value:"code",children:"Code"}),!O||O.includes("pcb")?ce.jsxs(f5,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&ce.jsx("span",{className:Va("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",I?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!O||O.includes("schematic")?ce.jsxs(f5,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&ce.jsx("span",{className:Va("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",I?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!O||O.includes("cad")?ce.jsxs(f5,{value:"cad",children:[o&&ce.jsx("span",{className:Va("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",I?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(be)&&ce.jsx(f5,{value:be,children:_9e(be)}),ce.jsxs(bxe,{children:[ce.jsx(vxe,{asChild:!0,children:ce.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[ce.jsx(I4n,{className:"rf-w-4 rf-h-4"}),(oe&&oe.length>0||i)&&ce.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"})]})}),ce.jsxs(_G,{className:"rf-*:text-xs rf-z-[101]",children:[Xvi.filter(Le=>!O||O.includes(Le)).map(Le=>ce.jsxs(yb,{onSelect:()=>Xe(Le),children:[be!==Le&&ce.jsx(dit,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),be===Le&&ce.jsx(zge,{className:"rf-w-3 rf-h-3"}),ce.jsx("div",{className:"rf-pr-2",children:_9e(Le)}),Le==="errors"&&(oe&&oe.length>0||i)&&ce.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:i?1:oe?.length})]},Le)),ce.jsx(yb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ce.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",oht.split(".").map((Le,Ne)=>Ne===2?parseInt(Le)+1:Le).join(".")]})}),se?ce.jsxs(Sxe,{onOpenChange:Le=>!Le&&je(""),children:[ce.jsx(fG,{className:"rf-text-xs rf-opacity-60",children:ce.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",ke??Te??"latest"]})}),ce.jsx(wxe,{children:ce.jsxs(mG,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[ce.jsx("div",{className:"rf-p-1",children:ce.jsx(y1e,{value:ze,onChange:Le=>je(Le.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),ce.jsx(got,{}),ce.jsx(yb,{onSelect:()=>Re(null),children:Te?`${Te} (latest)`:"latest"}),ye.map(Le=>ce.jsx(yb,{onSelect:()=>Re(Le),children:Le},Le))]})})]}):ke&&ce.jsx(yb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:ce.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",ke]})})]})]})]}),W&&ce.jsx(V_,{onClick:Ve,variant:"ghost",children:Me?ce.jsx(L4n,{size:16}):ce.jsx(k4n,{size:16})})]}),c&&ce.jsx(Xw,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:ce.jsx("div",{className:"rf-h-full",children:l})}),(!O||O.includes("pcb"))&&ce.jsx(Xw,{value:"pcb",children:ce.jsx("div",{className:Va("rf-overflow-hidden",Me?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:ce.jsx(g4,{fallbackRender:({error:Le})=>ce.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ce.jsxs("div",{className:"rf-p-4",children:[ce.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),ce.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Le?.message||"An unknown error occurred"})]})}),children:o?ce.jsx(nUn,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:Va("rf-h-full rf-w-full",Me?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Le=>{if(M)for(const Ne of Le)M(Ne)}}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("assembly"))&&ce.jsx(Xw,{value:"assembly",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{fallback:ce.jsx("div",{children:"Error loading Assembly"}),children:o?ce.jsx(e7n,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("pinout"))&&ce.jsx(Xw,{value:"pinout",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{fallback:ce.jsx("div",{children:"Error loading Pinout Viewer"}),children:o?ce.jsx(t7n,{circuitJson:o,containerStyle:{height:"100%"}}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("schematic"))&&ce.jsx(Xw,{value:"schematic",children:ce.jsx("div",{className:Va("rf-overflow-auto rf-bg-white",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{fallbackRender:({error:Le})=>ce.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ce.jsxs("div",{className:"rf-p-4",children:[ce.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),ce.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Le?.message||"An unknown error occurred"})]})}),children:o?ce.jsx(JDn,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Le=>{M?.(Le)},debugGrid:Y}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("cad"))&&ce.jsx(Xw,{value:"cad",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{FallbackComponent:y4n,children:o?ce.jsx(m4n,{ref:et,circuitJson:o,autoRotateDisabled:H}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("bom"))&&ce.jsx(Xw,{value:"bom",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{fallbackRender:({error:Le})=>ce.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:ce.jsxs("div",{className:"rf-p-4",children:[ce.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),ce.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Le?.message||"An unknown error occurred"})]})}),children:o?ce.jsx(s7n,{circuitJson:o}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("circuit_json"))&&ce.jsx(Xw,{value:"circuit_json",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:ce.jsx(g4,{fallback:ce.jsx("div",{children:"Error loading JSON viewer"}),children:o?ce.jsx(r7n,{elements:o}):ce.jsx(dC,{onRunClicked:t})})})}),(!O||O.includes("errors"))&&ce.jsx(Xw,{value:"errors",children:ce.jsx("div",{className:Va("rf-overflow-auto",Me?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||oe&&oe.length>0||o?ce.jsx(pNn,{code:n,fsMap:e,circuitJsonErrors:oe,circuitJsonWarnings:Ee,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:ke,autoroutingLog:E,onReportAutoroutingLog:N}):ce.jsx(dC,{onRunClicked:t})})}),d&&(!O||O.includes("render_log"))&&ce.jsx(Xw,{value:"render_log",children:ce.jsx(aUn,{renderLog:p,onRerunWithDebug:ue})})]})})})};YMt.createRoot(document.getElementById("root")).render(ce.jsx("div",{style:{height:"100vh"},children:ce.jsx(Wvi,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}})}));async function cTt(n,e={}){const t={background:e.background,fitTo:e.width?{mode:"width",value:e.width}:e.height?{mode:"height",value:e.height}:void 0,font:{fontFiles:e.fonts||[]}},o=new OP.Resvg(n,t).render().asPng();return Buffer.from(o)}async function Kvi(n,e={}){return`data:image/png;base64,${(await cTt(n,e)).toString("base64")}`}const Zvi=Object.freeze(Object.defineProperty({__proto__:null,svgToPng:cTt,svgToPngDataUrl:Kvi},Symbol.toStringTag,{value:"Module"}));async function lTt(n,e={}){const t={background:e.background,fitTo:e.width?{mode:"width",value:e.width}:e.height?{mode:"height",value:e.height}:void 0,font:{fontFiles:e.fonts||[]}},o=new OP.Resvg(n,t).render().asPng();return Buffer.from(o)}async function Qvi(n,e={}){return`data:image/png;base64,${(await lTt(n,e)).toString("base64")}`}const Jvi=Object.freeze(Object.defineProperty({__proto__:null,svgToPng:lTt,svgToPngDataUrl:Qvi},Symbol.toStringTag,{value:"Module"}))}));