@tscircuit/runframe 0.0.1000 → 0.0.1002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/standalone.min.js
CHANGED
|
@@ -5608,7 +5608,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),Gye={};jwn(Gye,{all_layers:()=>wge
|
|
|
5608
5608
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5609
5609
|
* Released under the MIT License.
|
|
5610
5610
|
*)
|
|
5611
|
-
*/const fEn=({containerClassName:n,...e})=>{const t=be.useRef(null),[i,r]=be.useState(620);return be.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)}},[]),he.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:he.jsx(pEn,{...e,height:i})})},mEn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[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-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.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-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-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-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-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-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-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-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-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=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-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-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-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}',Nge=()=>{be.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=mEn,document.head.appendChild(e)},[])},_En=n=>{be.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Pit=n=>`hsl(${Hv.indexOf(n)*137.5%360}, 70%, 50%)`,yEn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return he.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[he.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Hv.map(t=>{const i=n[t]||0,r=i/e*100;return he.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Pit(t)},children:he.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)})}),he.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},gEn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=be.useState("chronological"),[r,o]=be.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 he.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[he.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.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=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(xm,{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)=>Hv.indexOf(l[0])-Hv.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.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=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(xm,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),he.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:he.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),f=document.createElement("a");f.href=h,f.download=`debug-${u.name}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(h)}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:[he.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>he.jsx("option",{value:l.name,children:l.name},l.name))]})}),he.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.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:[he.jsx("option",{value:"chronological",children:"Phase Order"}),he.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),he.jsx(yEn,{phaseTimings:n.phaseTimings}),he.jsxs("table",{className:"rf-w-full rf-text-xs",children:[he.jsx("thead",{children:he.jsxs("tr",{children:[he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),he.jsx("tbody",{children:a.map(([l,u])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:Hv.indexOf(l)}),he.jsx("td",{className:"rf-p-2",children:l}),he.jsx("td",{className:"rf-p-2",children:he.jsx("div",{className:"rf-w-8",children:he.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Pit(l),width:`${u/c*100}%`}})})}),he.jsx("td",{className:"rf-p-2",children:he.jsxs("div",{className:"rf-flex w-full",children:[he.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},Iit=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{be.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{LB.captureException(i)}catch{}}},[n,e]),be.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{LB.captureException(r,{error_type:i.type})}catch{}}},[t])},bEn="0.0.993";function Nit(n,e){const[t,i]=be.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 be.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const IV=xPe()(vPe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),xEn=n=>{const[e,t]=be.useState([]),[i,r]=be.useState(null),[o,s]=be.useState(""),[a,c]=Nit("eval-version-selection",null),l=IV(f=>f.setLastRunEvalVersion),u=IV(f=>f.lastRunEvalVersion);return be.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(f=>f.json()).then(f=>{if(Array.isArray(f?.versions)){let m=[...f.versions];f.tags?.latest&&(r(f.tags.latest),m=m.filter(y=>y!==f.tags.latest)),t(m)}}).catch(()=>{})},[n]),be.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:be.useMemo(()=>e.filter(f=>f.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:f=>{c(f),s("")}}},vEn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=be.useState(""),[s,a]=be.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return he.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:he.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[he.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),he.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),he.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>he.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&he.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),he.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},wEn=n=>{const e=be.useRef(null),t=uv(i=>i.recentEvents);be.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var NV="Dialog",[kit,Oit]=_w(NV),[SEn,R5]=kit(NV),Lit=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=be.useRef(null),c=be.useRef(null),[l,u]=OT({prop:i,defaultProp:r??!1,onChange:o,caller:NV});return he.jsx(SEn,{scope:e,triggerRef:a,contentRef:c,contentId:Tx(),titleId:Tx(),descriptionId:Tx(),open:l,onOpenChange:u,onOpenToggle:be.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Lit.displayName=NV;var Dit="DialogTrigger",zit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Dit,t),o=R_(e,r.triggerRef);return he.jsx(iu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Lge(r.open),...i,ref:o,onClick:ia(n.onClick,r.onOpenToggle)})});zit.displayName=Dit;var kge="DialogPortal",[EEn,Fit]=kit(kge,{forceMount:void 0}),$it=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=R5(kge,e);return he.jsx(EEn,{scope:e,forceMount:t,children:be.Children.map(i,s=>he.jsx(w2,{present:t||o.open,children:he.jsx(Qj,{asChild:!0,container:r,children:s})}))})};$it.displayName=kge;var kV="DialogOverlay",Bit=be.forwardRef((n,e)=>{const t=Fit(kV,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=R5(kV,n.__scopeDialog);return o.modal?he.jsx(w2,{present:i||o.open,children:he.jsx(MEn,{...r,ref:e})}):null});Bit.displayName=kV;var TEn=kT("DialogOverlay.RemoveScroll"),MEn=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(kV,t);return he.jsx(sH,{as:TEn,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx(iu.div,{"data-state":Lge(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),UM="DialogContent",Uit=be.forwardRef((n,e)=>{const t=Fit(UM,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=R5(UM,n.__scopeDialog);return he.jsx(w2,{present:i||o.open,children:o.modal?he.jsx(AEn,{...r,ref:e}):he.jsx(CEn,{...r,ref:e})})});Uit.displayName=UM;var AEn=be.forwardRef((n,e)=>{const t=R5(UM,n.__scopeDialog),i=be.useRef(null),r=R_(e,t.contentRef,i);return be.useEffect(()=>{const o=i.current;if(o)return h_e(o)},[]),he.jsx(jit,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ia(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ia(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ia(n.onFocusOutside,o=>o.preventDefault())})}),CEn=be.forwardRef((n,e)=>{const t=R5(UM,n.__scopeDialog),i=be.useRef(!1),r=be.useRef(!1);return he.jsx(jit,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),jit=be.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=R5(UM,t),c=be.useRef(null),l=R_(e,c);return qme(),he.jsxs(he.Fragment,{children:[he.jsx(Bj,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:he.jsx($j,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Lge(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(PEn,{titleId:a.titleId}),he.jsx(NEn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Oge="DialogTitle",Hit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Oge,t);return he.jsx(iu.h2,{id:r.titleId,...i,ref:e})});Hit.displayName=Oge;var Vit="DialogDescription",Git=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Vit,t);return he.jsx(iu.p,{id:r.descriptionId,...i,ref:e})});Git.displayName=Vit;var Yit="DialogClose",qit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Yit,t);return he.jsx(iu.button,{type:"button",...i,ref:e,onClick:ia(n.onClick,()=>r.onOpenChange(!1))})});qit.displayName=Yit;function Lge(n){return n?"open":"closed"}var Xit="DialogTitleWarning",[REn,Wit]=pFt(Xit,{contentName:UM,titleName:Oge,docsSlug:"dialog"}),PEn=({titleId:n})=>{const e=Wit(Xit),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5611
|
+
*/const fEn=({containerClassName:n,...e})=>{const t=be.useRef(null),[i,r]=be.useState(620);return be.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)}},[]),he.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:he.jsx(pEn,{...e,height:i})})},mEn='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--radius:0.5rem}.rf-pointer-events-none{pointer-events:none}.rf-invisible{visibility:hidden}.rf-fixed{position:fixed}.rf-absolute{position:absolute}.rf-relative{position:relative}.rf-inset-0{inset:0}.-rf-left-2{left:-.5rem}.-rf-right-10{right:-2.5rem}.-rf-right-2{right:-.5rem}.-rf-right-4{right:-1rem}.-rf-right-6{right:-1.5rem}.-rf-right-7{right:-1.75rem}.-rf-right-8{right:-2rem}.-rf-right-9{right:-2.25rem}.rf-bottom-full{bottom:100%}.rf-left-0{left:0}.rf-left-1{left:.25rem}.rf-left-1\\/2{left:50%}.rf-left-2{left:.5rem}.rf-left-\\[50\\%\\]{left:50%}.rf-right-0{right:0}.rf-right-1{right:.25rem}.rf-right-4{right:1rem}.rf-right-\\[4px\\]{right:4px}.rf-top-0{top:0}.rf-top-1{top:.25rem}.rf-top-2{top:.5rem}.rf-top-2\\.5{top:.625rem}.rf-top-\\[50\\%\\]{top:50%}.rf-top-\\[6px\\]{top:6px}.\\!rf-z-\\[101\\]{z-index:101!important}.\\!rf-z-\\[200\\]{z-index:200!important}.rf-z-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.rf-z-\\[101\\]{z-index:101}.rf-order-1{order:1}.rf-order-2{order:2}.rf-order-3{order:3}.rf-m-1{margin:.25rem}.rf-m-6{margin:1.5rem}.-rf-mx-1,.rf--mx-1{margin-left:-.25rem;margin-right:-.25rem}.rf-mx-1{margin-left:.25rem;margin-right:.25rem}.rf-mx-2{margin-left:.5rem;margin-right:.5rem}.rf-mx-4{margin-left:1rem;margin-right:1rem}.rf-mx-auto{margin-left:auto;margin-right:auto}.rf-my-1{margin-bottom:.25rem;margin-top:.25rem}.rf-my-12{margin-bottom:3rem;margin-top:3rem}.rf-my-4{margin-bottom:1rem;margin-top:1rem}.rf-my-auto{margin-bottom:auto;margin-top:auto}.rf-mb-1{margin-bottom:.25rem}.rf-mb-12{margin-bottom:3rem}.rf-mb-2{margin-bottom:.5rem}.rf-mb-3{margin-bottom:.75rem}.rf-mb-4{margin-bottom:1rem}.rf-mb-6{margin-bottom:1.5rem}.rf-mb-8{margin-bottom:2rem}.rf-ml-1{margin-left:.25rem}.rf-ml-2{margin-left:.5rem}.rf-ml-auto{margin-left:auto}.rf-mr-1{margin-right:.25rem}.rf-mr-2{margin-right:.5rem}.rf-mt-0{margin-top:0}.rf-mt-0\\.5{margin-top:.125rem}.rf-mt-1{margin-top:.25rem}.rf-mt-2{margin-top:.5rem}.rf-mt-3{margin-top:.75rem}.rf-mt-4{margin-top:1rem}.rf-mt-5{margin-top:1.25rem}.rf-mt-auto{margin-top:auto}.rf-block{display:block}.rf-inline-block{display:inline-block}.rf-inline{display:inline}.rf-flex{display:flex}.rf-inline-flex{display:inline-flex}.rf-grid{display:grid}.rf-hidden{display:none}.rf-aspect-square{aspect-ratio:1/1}.rf-aspect-video{aspect-ratio:16/9}.rf-size-14{height:3.5rem;width:3.5rem}.rf-size-4{height:1rem;width:1rem}.\\!rf-h-2{height:.5rem!important}.\\!rf-h-2\\.5{height:.625rem!important}.\\!rf-h-3{height:.75rem!important}.\\!rf-h-full{height:100%!important}.rf-h-1{height:.25rem}.rf-h-10{height:2.5rem}.rf-h-12{height:3rem}.rf-h-2{height:.5rem}.rf-h-2\\.5{height:.625rem}.rf-h-20{height:5rem}.rf-h-24{height:6rem}.rf-h-3{height:.75rem}.rf-h-3\\.5{height:.875rem}.rf-h-4{height:1rem}.rf-h-5{height:1.25rem}.rf-h-6{height:1.5rem}.rf-h-60{height:15rem}.rf-h-64{height:16rem}.rf-h-7{height:1.75rem}.rf-h-8{height:2rem}.rf-h-9{height:2.25rem}.rf-h-\\[400px\\]{height:400px}.rf-h-\\[calc\\(100vh-52px\\)\\]{height:calc(100vh - 52px)}.rf-h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.rf-h-auto{height:auto}.rf-h-fit{height:-moz-fit-content;height:fit-content}.rf-h-full{height:100%}.rf-h-px{height:1px}.rf-h-screen{height:100vh}.\\!rf-max-h-\\[40vh\\]{max-height:40vh!important}.rf-max-h-32{max-height:8rem}.rf-max-h-96{max-height:24rem}.rf-max-h-\\[200px\\]{max-height:200px}.rf-max-h-\\[300px\\]{max-height:300px}.rf-max-h-\\[500px\\]{max-height:500px}.rf-max-h-\\[70vh\\]{max-height:70vh}.rf-max-h-\\[90vh\\]{max-height:90vh}.rf-max-h-full{max-height:100%}.rf-min-h-0{min-height:0}.rf-min-h-\\[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-\\[400px\\]{width:400px}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-32{min-width:8rem}.rf-min-w-80{min-width:20rem}.rf-min-w-96{min-width:24rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[400px\\]{min-width:400px}.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-\\[100px\\]{max-width:100px}.rf-max-w-\\[120px\\]{max-width:120px}.rf-max-w-\\[150px\\]{max-width:150px}.rf-max-w-\\[400px\\]{max-width:400px}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-none{max-width:none}.rf-max-w-xl{max-width:36rem}.rf-max-w-xs{max-width:20rem}.rf-flex-1{flex:1 1 0%}.rf-flex-shrink-0,.rf-shrink-0{flex-shrink:0}.rf-flex-grow{flex-grow:1}.rf-table-auto{table-layout:auto}.rf-origin-\\[--radix-popover-content-transform-origin\\]{transform-origin:var(--radix-popover-content-transform-origin)}.-rf-translate-x-1{--tw-translate-x:-0.25rem}.-rf-translate-x-1,.-rf-translate-x-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rf-translate-x-1\\/2{--tw-translate-x:-50%}.-rf-translate-y-1{--tw-translate-y:-0.25rem}.-rf-translate-y-1,.rf--translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-x-1{--tw-translate-x:-0.25rem}.rf--translate-x-1\\/2{--tw-translate-x:-50%}.rf--translate-x-1\\/2,.rf--translate-y-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf--translate-y-1{--tw-translate-y:-0.25rem}.rf-translate-x-\\[-50\\%\\]{--tw-translate-x:-50%}.rf-translate-x-\\[-50\\%\\],.rf-translate-y-\\[-50\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rf-translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.rf-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes rf-pulse{50%{opacity:.5}}.rf-animate-pulse{animation:rf-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rf-spin{to{transform:rotate(1turn)}}.rf-animate-spin{animation:rf-spin 1s linear infinite}.rf-cursor-default{cursor:default}.rf-cursor-not-allowed{cursor:not-allowed}.rf-cursor-pointer{cursor:pointer}.rf-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.rf-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.rf-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.rf-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.rf-flex-row{flex-direction:row}.rf-flex-col{flex-direction:column}.rf-flex-col-reverse{flex-direction:column-reverse}.rf-flex-wrap{flex-wrap:wrap}.rf-place-items-center{place-items:center}.rf-items-start{align-items:flex-start}.rf-items-end{align-items:flex-end}.rf-items-center{align-items:center}.rf-items-stretch{align-items:stretch}.rf-justify-end{justify-content:flex-end}.rf-justify-center{justify-content:center}.rf-justify-between{justify-content:space-between}.rf-gap-0{gap:0}.rf-gap-1{gap:.25rem}.rf-gap-2{gap:.5rem}.rf-gap-3{gap:.75rem}.rf-gap-4{gap:1rem}.rf-gap-5{gap:1.25rem}.rf-gap-6{gap:1.5rem}.rf-gap-8{gap:2rem}.rf-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rf-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.rf-space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.rf-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.rf-overflow-auto{overflow:auto}.rf-overflow-hidden{overflow:hidden}.rf-overflow-visible{overflow:visible}.\\!rf-overflow-x-auto{overflow-x:auto!important}.rf-overflow-x-auto{overflow-x:auto}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rf-whitespace-normal{white-space:normal}.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-break-all{word-break:break-all}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-none{border-style:none}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.rf-border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity,1))}.rf-border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity,1))}.rf-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.rf-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.rf-border-green-200{--tw-border-opacity:1;border-color:rgb(187 247 208/var(--tw-border-opacity,1))}.rf-border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity,1))}.rf-border-input{border-color:hsl(var(--input))}.rf-border-neutral-200{--tw-border-opacity:1;border-color:rgb(229 229 229/var(--tw-border-opacity,1))}.rf-border-orange-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}.rf-border-primary{border-color:hsl(var(--primary))}.rf-border-red-200{--tw-border-opacity:1;border-color:rgb(254 202 202/var(--tw-border-opacity,1))}.rf-border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity,1))}.rf-border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.rf-border-zinc-200{--tw-border-opacity:1;border-color:rgb(228 228 231/var(--tw-border-opacity,1))}.rf-border-zinc-900{--tw-border-opacity:1;border-color:rgb(24 24 27/var(--tw-border-opacity,1))}.rf-bg-background{background-color:hsl(var(--background))}.rf-bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.rf-bg-black\\/80{background-color:rgba(0,0,0,.8)}.rf-bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.rf-bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity,1))}.rf-bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.rf-bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.rf-bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.rf-bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.rf-bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.rf-bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity,1))}.rf-bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.rf-bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.rf-bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.rf-bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.rf-bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.rf-bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.rf-bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.rf-bg-muted{background-color:hsl(var(--muted))}.rf-bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity,1))}.rf-bg-neutral-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))}.rf-bg-neutral-800{--tw-bg-opacity:1;background-color:rgb(38 38 38/var(--tw-bg-opacity,1))}.rf-bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity,1))}.rf-bg-orange-400{--tw-bg-opacity:1;background-color:rgb(251 146 60/var(--tw-bg-opacity,1))}.rf-bg-orange-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}.rf-bg-popover{background-color:hsl(var(--popover))}.rf-bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.rf-bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.rf-bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.rf-bg-red-900{--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity,1))}.rf-bg-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-current{fill:currentColor}.rf-object-contain{-o-object-fit:contain;object-fit:contain}.rf-object-cover{-o-object-fit:cover;object-fit:cover}.\\!rf-p-0{padding:0!important}.rf-p-0{padding:0}.rf-p-1{padding:.25rem}.rf-p-2{padding:.5rem}.rf-p-3{padding:.75rem}.rf-p-4{padding:1rem}.rf-p-5{padding:1.25rem}.rf-p-6{padding:1.5rem}.rf-p-8{padding:2rem}.rf-px-1{padding-left:.25rem;padding-right:.25rem}.rf-px-2{padding-left:.5rem;padding-right:.5rem}.rf-px-3{padding-left:.75rem;padding-right:.75rem}.rf-px-4{padding-left:1rem;padding-right:1rem}.rf-px-6{padding-left:1.5rem;padding-right:1.5rem}.rf-px-8{padding-left:2rem;padding-right:2rem}.rf-py-0{padding-bottom:0;padding-top:0}.rf-py-0\\.5{padding-bottom:.125rem;padding-top:.125rem}.rf-py-1{padding-bottom:.25rem;padding-top:.25rem}.rf-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.rf-py-10{padding-bottom:2.5rem;padding-top:2.5rem}.rf-py-12{padding-bottom:3rem;padding-top:3rem}.rf-py-2{padding-bottom:.5rem;padding-top:.5rem}.rf-py-3{padding-bottom:.75rem;padding-top:.75rem}.rf-py-4{padding-bottom:1rem;padding-top:1rem}.rf-py-6{padding-bottom:1.5rem;padding-top:1.5rem}.rf-py-8{padding-bottom:2rem;padding-top:2rem}.rf-pb-0{padding-bottom:0}.rf-pb-1{padding-bottom:.25rem}.rf-pb-2{padding-bottom:.5rem}.rf-pb-3{padding-bottom:.75rem}.rf-pb-4{padding-bottom:1rem}.rf-pl-2{padding-left:.5rem}.rf-pl-4{padding-left:1rem}.rf-pl-8{padding-left:2rem}.rf-pr-2{padding-right:.5rem}.rf-pt-0{padding-top:0}.rf-pt-2{padding-top:.5rem}.rf-pt-4{padding-top:1rem}.rf-text-left{text-align:left}.rf-text-center{text-align:center}.rf-text-right{text-align:right}.rf-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.rf-text-2xl{font-size:1.5rem;line-height:2rem}.rf-text-3xl{font-size:1.875rem;line-height:2.25rem}.rf-text-\\[8px\\]{font-size:8px}.rf-text-base{font-size:1rem;line-height:1.5rem}.rf-text-lg{font-size:1.125rem;line-height:1.75rem}.rf-text-sm{font-size:.875rem;line-height:1.25rem}.rf-text-xl{font-size:1.25rem;line-height:1.75rem}.rf-text-xs{font-size:.75rem;line-height:1rem}.\\!rf-font-normal{font-weight:400!important}.rf-font-bold{font-weight:700}.rf-font-medium{font-weight:500}.rf-font-semibold{font-weight:600}.rf-uppercase{text-transform:uppercase}.rf-capitalize{text-transform:capitalize}.rf-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.rf-leading-5{line-height:1.25rem}.rf-leading-none{line-height:1}.rf-leading-relaxed{line-height:1.625}.rf-leading-tight{line-height:1.25}.rf-tracking-wide{letter-spacing:.025em}.rf-tracking-widest{letter-spacing:.1em}.rf-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.rf-text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity,1))}.rf-text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.rf-text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.rf-text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.rf-text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity,1))}.rf-text-current{color:currentColor}.rf-text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.rf-text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.rf-text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.rf-text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.rf-text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.rf-text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.rf-text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.rf-text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.rf-text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.rf-text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.rf-text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.rf-text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity,1))}.rf-text-muted-foreground{color:hsl(var(--muted-foreground))}.rf-text-neutral-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-neutral-500{--tw-text-opacity:1;color:rgb(115 115 115/var(--tw-text-opacity,1))}.rf-text-neutral-900{--tw-text-opacity:1;color:rgb(23 23 23/var(--tw-text-opacity,1))}.rf-text-neutral-950{--tw-text-opacity:1;color:rgb(10 10 10/var(--tw-text-opacity,1))}.rf-text-orange-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}.rf-text-orange-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}.rf-text-orange-800{--tw-text-opacity:1;color:rgb(154 52 18/var(--tw-text-opacity,1))}.rf-text-popover-foreground{color:hsl(var(--popover-foreground))}.rf-text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity,1))}.rf-text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.rf-text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.rf-text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.rf-text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.rf-text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.rf-text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.rf-text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity,1))}.rf-text-slate-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-75{opacity:.75}.rf-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.rf-shadow,.rf-shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.rf-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.rf-shadow-md,.rf-shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.rf-shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.rf-outline-none{outline:2px solid transparent;outline-offset:2px}.rf-ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.rf-ring-blue-500{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.rf-ring-primary{--tw-ring-color:hsl(var(--primary))}.rf-ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.rf-ring-offset-white{--tw-ring-offset-color:#fff}.rf-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.rf-duration-200{transition-duration:.2s}.rf-ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.rf-slide-in-from-left-1{--tw-enter-translate-x:-0.25rem}.rf-slide-out-to-left-1{--tw-exit-translate-x:-0.25rem}.rf-duration-200{animation-duration:.2s}.rf-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.file\\:rf-border-0::file-selector-button{border-width:0}.file\\:rf-bg-transparent::file-selector-button{background-color:transparent}.file\\:rf-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:rf-font-medium::file-selector-button{font-weight:500}.placeholder\\:rf-text-zinc-500::-moz-placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.placeholder\\:rf-text-zinc-500::placeholder{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.hover\\:rf-border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity,1))}.hover\\:\\!rf-bg-transparent:hover{background-color:transparent!important}.hover\\:rf-bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\\:rf-bg-red-500\\/90:hover{background-color:rgba(239,68,68,.9)}.hover\\:rf-bg-zinc-100:hover{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.hover\\:rf-bg-zinc-100\\/80:hover{background-color:hsla(240,5%,96%,.8)}.hover\\:rf-bg-zinc-900\\/90:hover{background-color:rgba(24,24,27,.9)}.hover\\:rf-text-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-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-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=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-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}',Nge=()=>{be.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=mEn,document.head.appendChild(e)},[])},_En=n=>{be.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Pit=n=>`hsl(${Hv.indexOf(n)*137.5%360}, 70%, 50%)`,yEn=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return he.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[he.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:Hv.map(t=>{const i=n[t]||0,r=i/e*100;return he.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:Pit(t)},children:he.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)})}),he.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},gEn=({renderLog:n,onRerunWithDebug:e})=>{const[t,i]=be.useState("chronological"),[r,o]=be.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 he.jsxs("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:[he.jsx("div",{className:"rf-mb-4",children:"No render log, make sure this tab is open when you render"}),e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.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=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(xm,{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)=>Hv.indexOf(l[0])-Hv.indexOf(u[0])):a.sort((l,u)=>u[1]-l[1]);const c=a.reduce((l,[u,d])=>l+d,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mb-4",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-flex rf-gap-4 rf-items-center",children:[e&&he.jsxs("div",{className:"rf-flex rf-gap-2 rf-items-center",children:[he.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=>he.jsx("option",{value:l.value,children:l.label},l.value))}),he.jsx(xm,{onClick:()=>e(r),size:"sm",className:"rf-text-xs",children:"Rerun Render with Debug"})]}),he.jsx("div",{className:"rf-flex rf-gap-2 rf-items-center",children:he.jsxs("select",{onChange:l=>{if(l.target.value){const u=n?.debugOutputs?.find(d=>d.name===l.target.value);if(u){const d=new Blob([u.content],{type:"text/plain"}),h=URL.createObjectURL(d),f=document.createElement("a");f.href=h,f.download=`debug-${u.name}.txt`,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(h)}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:[he.jsx("option",{value:"",children:"Download Debug Output"}),n?.debugOutputs?.map(l=>he.jsx("option",{value:l.name,children:l.name},l.name))]})}),he.jsxs("div",{className:"rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.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:[he.jsx("option",{value:"chronological",children:"Phase Order"}),he.jsx("option",{value:"longest",children:"Duration"})]})]})]})]}),he.jsx(yEn,{phaseTimings:n.phaseTimings}),he.jsxs("table",{className:"rf-w-full rf-text-xs",children:[he.jsx("thead",{children:he.jsxs("tr",{children:[he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),he.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),he.jsx("tbody",{children:a.map(([l,u])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:Hv.indexOf(l)}),he.jsx("td",{className:"rf-p-2",children:l}),he.jsx("td",{className:"rf-p-2",children:he.jsx("div",{className:"rf-w-8",children:he.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:Pit(l),width:`${u/c*100}%`}})})}),he.jsx("td",{className:"rf-p-2",children:he.jsxs("div",{className:"rf-flex w-full",children:[he.jsxs("span",{className:"rf-flex-grow",children:[u,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(u/c*100).toFixed(1),"%"]})]})})]},l))})]})]})},Iit=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{be.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{LB.captureException(i)}catch{}}},[n,e]),be.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{LB.captureException(r,{error_type:i.type})}catch{}}},[t])},bEn="0.0.993";function Nit(n,e){const[t,i]=be.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 be.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const IV=xPe()(vPe(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),xEn=n=>{const[e,t]=be.useState([]),[i,r]=be.useState(null),[o,s]=be.useState(""),[a,c]=Nit("eval-version-selection",null),l=IV(f=>f.setLastRunEvalVersion),u=IV(f=>f.lastRunEvalVersion);return be.useEffect(()=>{n&&fetch("https://data.jsdelivr.com/v1/package/npm/@tscircuit/eval").then(f=>f.json()).then(f=>{if(Array.isArray(f?.versions)){let m=[...f.versions];f.tags?.latest&&(r(f.tags.latest),m=m.filter(y=>y!==f.tags.latest)),t(m)}}).catch(()=>{})},[n]),be.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:be.useMemo(()=>e.filter(f=>f.includes(o)).slice(0,50),[e,o]),latestVersion:i,lastRunEvalVersion:u,search:o,setSearch:s,selectVersion:f=>{c(f),s("")}}},vEn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=be.useState(""),[s,a]=be.useState("");if(!i)return null;const c=n.filter(d=>d.toLowerCase().includes(s.toLowerCase())),l=s&&!n.includes(s),u=d=>{d.key==="Enter"&&(c.length===1?o(c[0]):l&&o(s))};return he.jsx("div",{className:"rf-fixed rf-inset-0 rf-bg-black rf-bg-opacity-50 rf-flex rf-items-center rf-justify-center rf-z-[100]",children:he.jsxs("div",{className:"rf-bg-white rf-rounded-lg rf-p-6 rf-w-96",children:[he.jsx("h2",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Select Snippet"}),he.jsx("input",{type:"text",className:"rf-w-full rf-px-4 rf-py-2 rf-border rf-rounded rf-mb-4",placeholder:"Search snippets or new snippet name...",value:s,onChange:d=>a(d.target.value),onKeyDown:u}),he.jsxs("div",{className:"rf-h-60 rf-overflow-y-auto",children:[c.map(d=>he.jsx("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 ${r===d?"bg-blue-50":""}`,onClick:()=>o(d),children:d},d)),l&&he.jsxs("button",{type:"button",className:`w-full text-left px-4 py-2 rounded hover:bg-gray-100 text-blue-500 ${r===s?"bg-blue-50":""}`,onClick:()=>o(s),children:['Create new "',s,'"']})]}),he.jsxs("div",{className:"rf-mt-4 rf-flex rf-justify-end rf-gap-2",children:[he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-text-gray-600 rf-hover:text-gray-800",onClick:t,children:"Cancel"}),he.jsx("button",{type:"button",className:"rf-px-4 rf-py-2 rf-bg-blue-500 rf-text-white rf-rounded rf-hover:bg-blue-600 rf-disabled:opacity-50",onClick:()=>r&&e(r),disabled:!r,children:r===s?`Create "${r}"`:`Save to ${r}`})]})]})})},wEn=n=>{const e=be.useRef(null),t=uv(i=>i.recentEvents);be.useEffect(()=>{if(t.length===0)return;const i=t[0];i.event_id!==e.current&&(n(i),e.current=i.event_id)},[t,n])};var NV="Dialog",[kit,Oit]=_w(NV),[SEn,R5]=kit(NV),Lit=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=be.useRef(null),c=be.useRef(null),[l,u]=OT({prop:i,defaultProp:r??!1,onChange:o,caller:NV});return he.jsx(SEn,{scope:e,triggerRef:a,contentRef:c,contentId:Tx(),titleId:Tx(),descriptionId:Tx(),open:l,onOpenChange:u,onOpenToggle:be.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Lit.displayName=NV;var Dit="DialogTrigger",zit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Dit,t),o=R_(e,r.triggerRef);return he.jsx(iu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Lge(r.open),...i,ref:o,onClick:ia(n.onClick,r.onOpenToggle)})});zit.displayName=Dit;var kge="DialogPortal",[EEn,Fit]=kit(kge,{forceMount:void 0}),$it=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=R5(kge,e);return he.jsx(EEn,{scope:e,forceMount:t,children:be.Children.map(i,s=>he.jsx(w2,{present:t||o.open,children:he.jsx(Qj,{asChild:!0,container:r,children:s})}))})};$it.displayName=kge;var kV="DialogOverlay",Bit=be.forwardRef((n,e)=>{const t=Fit(kV,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=R5(kV,n.__scopeDialog);return o.modal?he.jsx(w2,{present:i||o.open,children:he.jsx(MEn,{...r,ref:e})}):null});Bit.displayName=kV;var TEn=kT("DialogOverlay.RemoveScroll"),MEn=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(kV,t);return he.jsx(sH,{as:TEn,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx(iu.div,{"data-state":Lge(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),UM="DialogContent",Uit=be.forwardRef((n,e)=>{const t=Fit(UM,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=R5(UM,n.__scopeDialog);return he.jsx(w2,{present:i||o.open,children:o.modal?he.jsx(AEn,{...r,ref:e}):he.jsx(CEn,{...r,ref:e})})});Uit.displayName=UM;var AEn=be.forwardRef((n,e)=>{const t=R5(UM,n.__scopeDialog),i=be.useRef(null),r=R_(e,t.contentRef,i);return be.useEffect(()=>{const o=i.current;if(o)return h_e(o)},[]),he.jsx(jit,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ia(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:ia(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:ia(n.onFocusOutside,o=>o.preventDefault())})}),CEn=be.forwardRef((n,e)=>{const t=R5(UM,n.__scopeDialog),i=be.useRef(!1),r=be.useRef(!1);return he.jsx(jit,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{n.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||t.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:o=>{n.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const s=o.target;t.triggerRef.current?.contains(s)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),jit=be.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=R5(UM,t),c=be.useRef(null),l=R_(e,c);return qme(),he.jsxs(he.Fragment,{children:[he.jsx(Bj,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:he.jsx($j,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Lge(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(PEn,{titleId:a.titleId}),he.jsx(NEn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Oge="DialogTitle",Hit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Oge,t);return he.jsx(iu.h2,{id:r.titleId,...i,ref:e})});Hit.displayName=Oge;var Vit="DialogDescription",Git=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Vit,t);return he.jsx(iu.p,{id:r.descriptionId,...i,ref:e})});Git.displayName=Vit;var Yit="DialogClose",qit=be.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=R5(Yit,t);return he.jsx(iu.button,{type:"button",...i,ref:e,onClick:ia(n.onClick,()=>r.onOpenChange(!1))})});qit.displayName=Yit;function Lge(n){return n?"open":"closed"}var Xit="DialogTitleWarning",[REn,Wit]=pFt(Xit,{contentName:UM,titleName:Oge,docsSlug:"dialog"}),PEn=({titleId:n})=>{const e=Wit(Xit),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5612
5612
|
|
|
5613
5613
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5614
5614
|
|
|
@@ -6399,7 +6399,7 @@ ${i.stack}`),t.complete=!0,"root"in this&&this.root&&this.root.emit("asyncEffect
|
|
|
6399
6399
|
* This source code is licensed under the MIT license found in the
|
|
6400
6400
|
* LICENSE file in the root directory of this source tree.
|
|
6401
6401
|
*)
|
|
6402
|
-
*/const cZn=async(n,e=10)=>{const t=encodeURIComponent(n),i=await fetch(`https://jlcsearch.tscircuit.com/api/search?limit=${e}&q=${t}`);if(!i.ok)throw new Error(`JLCPCB API error: ${i.status}`);return(await i.json()).components??[]},lZn=n=>({lcscId:n.lcsc,manufacturer:n.mfr,description:n.description,partNumber:`C${n.lcsc}`,package:n.package,price:n.price}),uZn=async(n,e)=>{const t=await aZn(n,{fetch:(i,r)=>fetch(`${mw}/proxy`,{...r,headers:{...r?.headers,"X-Target-Url":i.toString(),"X-Sender-Origin":r?.headers?.origin??"","X-Sender-Host":r?.headers?.host??"https://easyeda.com","X-Sender-Referer":r?.headers?.referer??"","X-Sender-User-Agent":r?.headers?.userAgent??"","X-Sender-Cookie":r?.headers?.cookie??"",...e?.headers}})});return rZn(t)},dZn=({query:n,placeholder:e,isSearching:t,onQueryChange:i,onSubmit:r})=>{const o=be.useCallback(s=>{s.key==="Enter"&&(s.preventDefault(),r())},[r]);return he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mt-4",children:[he.jsxs("div",{className:"rf-relative rf-flex-grow",children:[he.jsx(Hme,{className:"rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground"}),he.jsx(bye,{placeholder:e,className:"rf-pl-8",spellCheck:!1,autoComplete:"off",value:n,onChange:s=>i(s.target.value),onKeyDown:o})]}),he.jsx(xm,{onClick:r,disabled:t||n.trim().length<1,className:"sm:rf-px-4 rf-px-3",children:t?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):he.jsxs(he.Fragment,{children:[he.jsx(Hme,{className:"rf-h-4 rf-w-4 sm:rf-hidden"}),he.jsx("span",{className:"rf-hidden sm:rf-inline",children:"Search"})]})})]})},Aft=n=>{switch(n.source){case"tscircuit.com":{const e=n.package;return`tscircuit-${e.package_id??`${e.owner_github_username??"unknown"}-${e.unscoped_name??e.name??"package"}`}`}case"jlcpcb":return`jlc-${n.component.lcscId}`;case"kicad":return`kicad-${n.footprint.path}`;default:return"unknown"}},hZn=n=>{switch(n.source){case"tscircuit.com":return n.package.unscoped_name;case"jlcpcb":return n.component.manufacturer;case"kicad":return n.footprint.qualifiedName}},pZn=n=>{switch(n.source){case"tscircuit.com":return n.package.description||(n.package.owner_github_username?`Component by ${n.package.owner_github_username}`:void 0);case"jlcpcb":return n.component.description;case"kicad":return n.footprint.description}},fZn=n=>{switch(n.source){case"tscircuit.com":return n.package.name;case"jlcpcb":return n.component.partNumber;case"kicad":return}},mZn=({results:n,selected:e,onSelect:t,onShowDetails:i})=>{const r=e?Aft(e):null;return he.jsx("div",{className:"rf-divide-y",children:n.map(o=>{const s=Aft(o),a=r===s,c=hZn(o),l=pZn(o),u=fZn(o);return he.jsxs("div",{className:`rf-p-3 rf-flex rf-flex-col sm:rf-grid sm:rf-grid-cols-[1fr_auto] rf-items-start sm:rf-items-center rf-cursor-pointer hover:rf-bg-zinc-100 rf-gap-2 ${a?"rf-bg-zinc-100":""}`,onClick:()=>t(o),children:[he.jsxs("div",{className:"rf-min-w-0 rf-overflow-hidden",children:[he.jsx("div",{className:"rf-font-medium rf-text-sm rf-truncate",children:c}),he.jsxs("div",{className:"rf-text-xs rf-text-zinc-500 rf-truncate",children:[u?he.jsx("span",{className:"rf-mr-2",children:u}):null,l]})]}),o.source==="tscircuit.com"&&i?he.jsx("div",{className:"rf-flex rf-gap-2 rf-flex-shrink-0 rf-w-full sm:rf-w-auto",children:he.jsx(xm,{variant:"outline",size:"sm",className:"rf-text-xs rf-w-full sm:rf-w-auto",onClick:d=>{d.stopPropagation(),i(o)},children:"See Details"})}):null]},s)})})},Cft=(n,e)=>!n?.owner_github_username||!n?.unscoped_name?null:`https://registry-api.tscircuit.com/packages/images/${n.owner_github_username}/${n.unscoped_name}/${e}.png`,_Zn=({packageResult:n,isOpen:e,onOpenChange:t,isLoading:i,details:r,previewTab:o,onPreviewTabChange:s,isSubmitting:a,onImport:c})=>{const l=n?.package??null,u=Cft(l,"pcb"),d=Cft(l,"schematic"),h=l?.unscoped_name?.split("/").pop()??l?.unscoped_name,f=l?.owner_github_username??void 0,m=f?`https://tscircuit.com/${f}`:void 0,y=f&&h?`https://tscircuit.com/${f}/${h}`:void 0;return he.jsx(zV,{open:e,onOpenChange:t,children:he.jsxs(dk,{showOverlay:!1,style:{width:"calc(100vw - 2rem)"},className:"rf-max-w-5xl !rf-overflow-y-auto rf-max-h-[90vh] rf-overflow-hidden rf-flex rf-flex-col rf-rounded-sm",children:[he.jsx(hk,{className:"rf-pb-4 rf-border-b",children:he.jsx("div",{className:"rf-flex rf-items-start rf-justify-between rf-gap-4",children:he.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[he.jsx(pk,{className:"rf-text-xl rf-font-semibold rf-truncate",children:h}),he.jsx($V,{children:l?.description})]})})}),he.jsxs("div",{className:"rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6",children:[f?he.jsxs("div",{children:[he.jsx("span",{className:"rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide",children:"Created by"}),he.jsx("div",{className:"rf-mt-1 rf-text-sm rf-font-medium",children:m?he.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"rf-text-black hover:rf-underline",children:f}):f})]}):null,he.jsxs("div",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Preview"}),he.jsxs(koe,{value:o,onValueChange:g=>s(g),children:[he.jsxs(zB,{className:"rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",children:[he.jsx(ZS,{value:"pcb",children:"PCB"}),he.jsx(ZS,{value:"schematic",children:"Schematic"})]}),he.jsxs("div",{className:"rf-mt-4",children:[he.jsx(I9,{value:"pcb",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:u?he.jsx("img",{src:u,alt:`${h??"package"} PCB preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null}),he.jsx(I9,{value:"schematic",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:d?he.jsx("img",{src:d,alt:`${h??"package"} schematic preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null})]})]})]}),r?.ai_description?he.jsxs("section",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"AI Description"}),he.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:he.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed",children:r.ai_description})})]}):null,r?.ai_usage_instructions?he.jsxs("section",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"Usage Instructions"}),he.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:he.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap",children:r.ai_usage_instructions})})]}):null,i?he.jsxs("div",{className:"rf-flex rf-justify-center rf-items-center rf-gap-2 rf-text-gray-500",children:[he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}),he.jsx("span",{className:"rf-text-sm",children:"Loading package details..."})]}):null]}),he.jsxs(FV,{className:"rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-gap-2",children:[he.jsx("div",{className:"rf-flex-1",children:y?he.jsxs(xm,{variant:"outline",size:"sm",className:"rf-gap-2 rf-w-full sm:rf-w-auto",onClick:()=>window.open(y,"_blank"),children:[he.jsx(H0n,{className:"rf-h-4 rf-w-4"}),"View on tscircuit.com"]}):null}),he.jsxs("div",{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[he.jsx(xm,{variant:"outline",onClick:()=>t(!1),className:"rf-order-2 sm:rf-order-1",children:"Close"}),he.jsx(xm,{onClick:c,disabled:a,className:"rf-bg-blue-600 hover:rf-bg-blue-700",children:a?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import Component"})]})]})]})})},yZn=()=>{const[n,e]=be.useState(null),[t,i]=be.useState(!1),r=be.useCallback(async(s,a)=>{i(!0);try{const c=await fetch(`https://api.tscircuit.com/packages/get?name=${encodeURIComponent(`${s}/${a}`)}`);if(!c.ok)throw new Error(`Failed to load package details: ${c.status}`);const l=await c.json();e(l.package??null)}catch(c){console.error("Failed to fetch package details",c),e(null)}finally{i(!1)}},[]),o=be.useCallback(()=>{e(null),i(!1)},[]);return{details:n,isLoading:t,fetchDetails:r,reset:o}},gZn=async n=>{const e=await fetch("https://registry-api.tscircuit.com/packages/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n})});if(!e.ok)throw new Error(`tscircuit registry error: ${e.status}`);return(await e.json()).packages??[]},bZn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=u.trim();if(!d)return[];i(!0),o(null);try{const f=(await gZn(d)).map(m=>({source:"tscircuit.com",package:m}));return e(f),f}catch(h){return console.error("Error searching tscircuit packages",h),e([]),o(h instanceof Error?h.message:"Failed to search tscircuit packages"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}},xZn=n=>{const e=n.trim();return/^C\d+/i.test(e)?e.replace(/^C/i,""):e},vZn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=xZn(u);if(!d)return[];i(!0),o(null);try{const f=(await cZn(d,10)).map(m=>({source:"jlcpcb",component:lZn(m)}));return e(f),f}catch(h){return console.error("Error searching JLCPCB components",h),e([]),o(h instanceof Error?h.message:"Failed to search JLCPCB components"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}};function k3(n){return Array.isArray?Array.isArray(n):Ift(n)==="[object Array]"}function wZn(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function SZn(n){return n==null?"":wZn(n)}function pS(n){return typeof n=="string"}function Rft(n){return typeof n=="number"}function EZn(n){return n===!0||n===!1||TZn(n)&&Ift(n)=="[object Boolean]"}function Pft(n){return typeof n=="object"}function TZn(n){return Pft(n)&&n!==null}function Z9(n){return n!=null}function Z2e(n){return!n.trim().length}function Ift(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const MZn="Incorrect 'index' type",AZn=n=>`Invalid value for key ${n}`,CZn=n=>`Pattern length exceeds max of ${n}.`,RZn=n=>`Missing ${n} property in key`,PZn=n=>`Property 'weight' in key '${n}' must be a positive integer`,Nft=Object.prototype.hasOwnProperty;class IZn{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let r=kft(i);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function kft(n){let e=null,t=null,i=null,r=1,o=null;if(pS(n)||k3(n))i=n,e=Oft(n),t=K2e(n);else{if(!Nft.call(n,"name"))throw new Error(RZn("name"));const s=n.name;if(i=s,Nft.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(PZn(s));e=Oft(s),t=K2e(s),o=n.getFn}return{path:e,id:t,weight:r,src:i,getFn:o}}function Oft(n){return k3(n)?n:n.split(".")}function K2e(n){return k3(n)?n.join("."):n}function NZn(n,e){let t=[],i=!1;const r=(o,s,a)=>{if(Z9(o))if(!s[a])t.push(o);else{let c=s[a];const l=o[c];if(!Z9(l))return;if(a===s.length-1&&(pS(l)||Rft(l)||EZn(l)))t.push(SZn(l));else if(k3(l)){i=!0;for(let u=0,d=l.length;u<d;u+=1)r(l[u],s,a+1)}else s.length&&r(l,s,a+1)}};return r(n,pS(e)?e.split("."):e,0),i?t:t[0]}var ka={...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:NZn,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const kZn=/[^ ]+/g;function OZn(n=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(r){const o=r.match(kZn).length;if(t.has(o))return t.get(o);const s=1/Math.pow(o,.5*n),a=parseFloat(Math.round(s*i)/i);return t.set(o,a),a},clear(){t.clear()}}}class Q2e{constructor({getFn:e=ka.getFn,fieldNormWeight:t=ka.fieldNormWeight}={}){this.norm=OZn(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,pS(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();pS(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Z9(e)||Z2e(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((r,o)=>{let s=r.getFn?r.getFn(e):this.getFn(e,r.path);if(Z9(s)){if(k3(s)){let a=[];const c=[{nestedArrIndex:-1,value:s}];for(;c.length;){const{nestedArrIndex:l,value:u}=c.pop();if(Z9(u))if(pS(u)&&!Z2e(u)){let d={v:u,i:l,n:this.norm.get(u)};a.push(d)}else k3(u)&&u.forEach((d,h)=>{c.push({nestedArrIndex:h,value:d})})}i.$[o]=a}else if(pS(s)&&!Z2e(s)){let a={v:s,n:this.norm.get(s)};i.$[o]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Lft(n,e,{getFn:t=ka.getFn,fieldNormWeight:i=ka.fieldNormWeight}={}){const r=new Q2e({getFn:t,fieldNormWeight:i});return r.setKeys(n.map(kft)),r.setSources(e),r.create(),r}function LZn(n,{getFn:e=ka.getFn,fieldNormWeight:t=ka.fieldNormWeight}={}){const{keys:i,records:r}=n,o=new Q2e({getFn:e,fieldNormWeight:t});return o.setKeys(i),o.setIndexRecords(r),o}function ZX(n,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:r=ka.distance,ignoreLocation:o=ka.ignoreLocation}={}){const s=e/n.length;if(o)return s;const a=Math.abs(i-t);return r?s+a/r:a?1:s}function DZn(n=[],e=ka.minMatchCharLength){let t=[],i=-1,r=-1,o=0;for(let s=n.length;o<s;o+=1){let a=n[o];a&&i===-1?i=o:!a&&i!==-1&&(r=o-1,r-i+1>=e&&t.push([i,r]),i=-1)}return n[o-1]&&o-i>=e&&t.push([i,o-1]),t}const a8=32;function zZn(n,e,t,{location:i=ka.location,distance:r=ka.distance,threshold:o=ka.threshold,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,includeMatches:c=ka.includeMatches,ignoreLocation:l=ka.ignoreLocation}={}){if(e.length>a8)throw new Error(CZn(a8));const u=e.length,d=n.length,h=Math.max(0,Math.min(i,d));let f=o,m=h;const y=a>1||c,g=y?Array(d):[];let b;for(;(b=n.indexOf(e,m))>-1;){let P=ZX(e,{currentLocation:b,expectedLocation:h,distance:r,ignoreLocation:l});if(f=Math.min(P,f),m=b+u,y){let M=0;for(;M<u;)g[b+M]=1,M+=1}}m=-1;let v=[],w=1,T=u+d;const N=1<<u-1;for(let P=0;P<u;P+=1){let M=0,I=T;for(;M<I;)ZX(e,{errors:P,currentLocation:h+I,expectedLocation:h,distance:r,ignoreLocation:l})<=f?M=I:T=I,I=Math.floor((T-M)/2+M);T=I;let A=Math.max(1,h-I+1),U=s?d:Math.min(h+I,d)+u,k=Array(U+2);k[U+1]=(1<<P)-1;for(let Y=U;Y>=A;Y-=1){let W=Y-1,K=t[n.charAt(W)];if(y&&(g[W]=+!!K),k[Y]=(k[Y+1]<<1|1)&K,P&&(k[Y]|=(v[Y+1]|v[Y])<<1|1|v[Y+1]),k[Y]&N&&(w=ZX(e,{errors:P,currentLocation:W,expectedLocation:h,distance:r,ignoreLocation:l}),w<=f)){if(f=w,m=W,m<=h)break;A=Math.max(1,2*h-m)}}if(ZX(e,{errors:P+1,currentLocation:h,expectedLocation:h,distance:r,ignoreLocation:l})>f)break;v=k}const R={isMatch:m>=0,score:Math.max(.001,w)};if(y){const P=DZn(g,a);P.length?c&&(R.indices=P):R.isMatch=!1}return R}function FZn(n){let e={};for(let t=0,i=n.length;t<i;t+=1){const r=n.charAt(t);e[r]=(e[r]||0)|1<<i-t-1}return e}const KX=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class Dft{constructor(e,{location:t=ka.location,threshold:i=ka.threshold,distance:r=ka.distance,includeMatches:o=ka.includeMatches,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,isCaseSensitive:c=ka.isCaseSensitive,ignoreDiacritics:l=ka.ignoreDiacritics,ignoreLocation:u=ka.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:u},e=c?e:e.toLowerCase(),e=l?KX(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(f,m)=>{this.chunks.push({pattern:f,alphabet:FZn(f),startIndex:m})},h=this.pattern.length;if(h>a8){let f=0;const m=h%a8,y=h-m;for(;f<y;)d(this.pattern.substr(f,a8),f),f+=a8;if(m){const g=h-a8;d(this.pattern.substr(g),g)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=i?KX(e):e,this.pattern===e){let y={isMatch:!0,score:0};return r&&(y.indices=[[0,e.length-1]]),y}const{location:o,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:u}=this.options;let d=[],h=0,f=!1;this.chunks.forEach(({pattern:y,alphabet:g,startIndex:b})=>{const{isMatch:v,score:w,indices:T}=zZn(e,y,g,{location:o+b,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:r,ignoreLocation:u});v&&(f=!0),h+=w,v&&T&&(d=[...d,...T])});let m={isMatch:f,score:f?h/this.chunks.length:1};return f&&r&&(m.indices=d),m}}class $E{constructor(e){this.pattern=e}static isMultiMatch(e){return zft(e,this.multiRegex)}static isSingleMatch(e){return zft(e,this.singleRegex)}search(){}}function zft(n,e){const t=n.match(e);return t?t[1]:null}class $Zn extends $E{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class BZn extends $E{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class UZn extends $E{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class jZn extends $E{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class HZn extends $E{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class VZn extends $E{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Fft extends $E{constructor(e,{location:t=ka.location,threshold:i=ka.threshold,distance:r=ka.distance,includeMatches:o=ka.includeMatches,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,isCaseSensitive:c=ka.isCaseSensitive,ignoreDiacritics:l=ka.ignoreDiacritics,ignoreLocation:u=ka.ignoreLocation}={}){super(e),this._bitapSearch=new Dft(e,{location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class $ft extends $E{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const r=[],o=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+o,r.push([i,t-1]);const s=!!r.length;return{isMatch:s,score:s?0:1,indices:r}}}const J2e=[$Zn,$ft,UZn,jZn,VZn,HZn,BZn,Fft],Bft=J2e.length,GZn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,YZn="|";function qZn(n,e={}){return n.split(YZn).map(t=>{let i=t.trim().split(GZn).filter(o=>o&&!!o.trim()),r=[];for(let o=0,s=i.length;o<s;o+=1){const a=i[o];let c=!1,l=-1;for(;!c&&++l<Bft;){const u=J2e[l];let d=u.isMultiMatch(a);d&&(r.push(new u(d,e)),c=!0)}if(!c)for(l=-1;++l<Bft;){const u=J2e[l];let d=u.isSingleMatch(a);if(d){r.push(new u(d,e));break}}}return r})}const XZn=new Set([Fft.type,$ft.type]);class WZn{constructor(e,{isCaseSensitive:t=ka.isCaseSensitive,ignoreDiacritics:i=ka.ignoreDiacritics,includeMatches:r=ka.includeMatches,minMatchCharLength:o=ka.minMatchCharLength,ignoreLocation:s=ka.ignoreLocation,findAllMatches:a=ka.findAllMatches,location:c=ka.location,threshold:l=ka.threshold,distance:u=ka.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r,minMatchCharLength:o,findAllMatches:a,ignoreLocation:s,location:c,threshold:l,distance:u},e=t?e:e.toLowerCase(),e=i?KX(e):e,this.pattern=e,this.query=qZn(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:r,ignoreDiacritics:o}=this.options;e=r?e:e.toLowerCase(),e=o?KX(e):e;let s=0,a=[],c=0;for(let l=0,u=t.length;l<u;l+=1){const d=t[l];a.length=0,s=0;for(let h=0,f=d.length;h<f;h+=1){const m=d[h],{isMatch:y,indices:g,score:b}=m.search(e);if(y){if(s+=1,c+=b,i){const v=m.constructor.type;XZn.has(v)?a=[...a,...g]:a.push(g)}}else{c=0,s=0,a.length=0;break}}if(s){let h={isMatch:!0,score:c/s};return i&&(h.indices=a),h}}return{isMatch:!1,score:1}}}const e5e=[];function ZZn(...n){e5e.push(...n)}function t5e(n,e){for(let t=0,i=e5e.length;t<i;t+=1){let r=e5e[t];if(r.condition(n,e))return new r(n,e)}return new Dft(n,e)}const QX={AND:"$and",OR:"$or"},n5e={PATH:"$path",PATTERN:"$val"},i5e=n=>!!(n[QX.AND]||n[QX.OR]),KZn=n=>!!n[n5e.PATH],QZn=n=>!k3(n)&&Pft(n)&&!i5e(n),Uft=n=>({[QX.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function jft(n,e,{auto:t=!0}={}){const i=r=>{let o=Object.keys(r);const s=KZn(r);if(!s&&o.length>1&&!i5e(r))return i(Uft(r));if(QZn(r)){const c=s?r[n5e.PATH]:o[0],l=s?r[n5e.PATTERN]:r[c];if(!pS(l))throw new Error(AZn(c));const u={keyId:K2e(c),pattern:l};return t&&(u.searcher=t5e(l,e)),u}let a={children:[],operator:o[0]};return o.forEach(c=>{const l=r[c];k3(l)&&l.forEach(u=>{a.children.push(i(u))})}),a};return i5e(n)||(n=Uft(n)),i(n)}function JZn(n,{ignoreFieldNorm:e=ka.ignoreFieldNorm}){n.forEach(t=>{let i=1;t.matches.forEach(({key:r,norm:o,score:s})=>{const a=r?r.weight:null;i*=Math.pow(s===0&&a?Number.EPSILON:s,(a||1)*(e?1:o))}),t.score=i})}function eKn(n,e){const t=n.matches;e.matches=[],Z9(t)&&t.forEach(i=>{if(!Z9(i.indices)||!i.indices.length)return;const{indices:r,value:o}=i;let s={indices:r,value:o};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),e.matches.push(s)})}function tKn(n,e){e.score=n.score}function nKn(n,e,{includeMatches:t=ka.includeMatches,includeScore:i=ka.includeScore}={}){const r=[];return t&&r.push(eKn),i&&r.push(tKn),n.map(o=>{const{idx:s}=o,a={item:e[s],refIndex:s};return r.length&&r.forEach(c=>{c(o,a)}),a})}class MR{constructor(e,t={},i){this.options={...ka,...t},this.options.useExtendedSearch,this._keyStore=new IZn(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Q2e))throw new Error(MZn);this._myIndex=t||Lft(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Z9(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,r=this._docs.length;i<r;i+=1){const o=this._docs[i];e(o,i)&&(this.removeAt(i),i-=1,r-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:a}=this.options;let c=pS(e)?pS(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return JZn(c,{ignoreFieldNorm:a}),o&&c.sort(s),Rft(t)&&t>-1&&(c=c.slice(0,t)),nKn(c,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(e){const t=t5e(e,this.options),{records:i}=this._myIndex,r=[];return i.forEach(({v:o,i:s,n:a})=>{if(!Z9(o))return;const{isMatch:c,score:l,indices:u}=t.searchIn(o);c&&r.push({item:o,idx:s,matches:[{score:l,value:o,norm:a,indices:u}]})}),r}_searchLogical(e){const t=jft(e,this.options),i=(a,c,l)=>{if(!a.children){const{keyId:d,searcher:h}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:h});return f&&f.length?[{idx:l,item:c,matches:f}]:[]}const u=[];for(let d=0,h=a.children.length;d<h;d+=1){const f=a.children[d],m=i(f,c,l);if(m.length)u.push(...m);else if(a.operator===QX.AND)return[]}return u},r=this._myIndex.records,o={},s=[];return r.forEach(({$:a,i:c})=>{if(Z9(a)){let l=i(t,a,c);l.length&&(o[c]||(o[c]={idx:c,item:a,matches:[]},s.push(o[c])),l.forEach(({matches:u})=>{o[c].matches.push(...u)}))}}),s}_searchObjectList(e){const t=t5e(e,this.options),{keys:i,records:r}=this._myIndex,o=[];return r.forEach(({$:s,i:a})=>{if(!Z9(s))return;let c=[];i.forEach((l,u)=>{c.push(...this._findMatches({key:l,value:s[u],searcher:t}))}),c.length&&o.push({idx:a,item:s,matches:c})}),o}_findMatches({key:e,value:t,searcher:i}){if(!Z9(t))return[];let r=[];if(k3(t))t.forEach(({v:o,i:s,n:a})=>{if(!Z9(o))return;const{isMatch:c,score:l,indices:u}=i.searchIn(o);c&&r.push({score:l,key:e,value:o,idx:s,norm:a,indices:u})});else{const{v:o,n:s}=t,{isMatch:a,score:c,indices:l}=i.searchIn(o);a&&r.push({score:c,key:e,value:o,norm:s,indices:l})}return r}}MR.version="7.1.0",MR.createIndex=Lft,MR.parseIndex=LZn,MR.config=ka,MR.parseQuery=jft,ZZn(WZn);let r5e=null,rO=null,o5e=null;const iKn=async()=>r5e||rO||(rO=fetch("https://kicad-mod-cache.tscircuit.com/kicad_files.json").then(n=>n.json()).then(n=>(r5e=n,rO=null,n)),rO),rKn=async(n,e=20)=>{const t=await iKn();return o5e||(o5e=new MR(t)),o5e.search(n).slice(0,e).map(i=>i.item)},oKn=n=>{const e=n.replace(".pretty/",":").replace(".kicad_mod",""),t=`kicad:${e}`;return{path:n,qualifiedName:t,description:e}},sKn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=u.trim();if(!d)return[];i(!0),o(null);try{const f=(await rKn(d,20)).map(m=>({source:"kicad",footprint:oKn(m)}));return e(f),f}catch(h){return console.error("Error searching KiCad footprints",h),e([]),o(h instanceof Error?h.message:"Failed to search KiCad footprints"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}},aKn=({onTscircuitPackageSelected:n,onJlcpcbComponentTsxLoaded:e,onKicadStringSelected:t})=>{const i=[];return n&&i.push("tscircuit.com"),e&&i.push("jlcpcb"),t&&i.push("kicad"),i},cKn=({isOpen:n,onClose:e,jlcpcbProxyRequestHeaders:t,onKicadStringSelected:i,onTscircuitPackageSelected:r,onJlcpcbComponentTsxLoaded:o})=>{const s=be.useMemo(()=>aKn({onKicadStringSelected:i,onTscircuitPackageSelected:r,onJlcpcbComponentTsxLoaded:o}),[i,r,o]),a=s.length>0,[c,l]=be.useState(s[0]??"tscircuit.com"),[u,d]=be.useState(""),[h,f]=be.useState(null),{results:m,isSearching:y,error:g,hasSearched:b,search:v,reset:w}=bZn(),{results:T,isSearching:N,error:R,hasSearched:P,search:M,reset:I}=vZn(),{results:A,isSearching:U,error:k,hasSearched:V,search:Y,reset:W}=sKn(),{details:K,isLoading:ee,fetchDetails:ae,reset:ue}=yZn(),[ge,re]=be.useState(null),[oe,pe]=be.useState(!1),[Ee,Re]=be.useState("pcb"),[Oe,Ve]=be.useState(null),[Ne,le]=be.useState(!1);be.useEffect(()=>{Ve(null)},[h]);const Se=be.useCallback(()=>{w(),I(),W(),f(null)},[I,W,w]);be.useEffect(()=>{n||(Se(),d(""),pe(!1),re(null),Ve(null))},[n,Se]),be.useEffect(()=>{d(""),f(null),c==="tscircuit.com"?w():c==="jlcpcb"?I():c==="kicad"&&W()},[c,I,W,w]);const xe=Ie=>{f(Ie),re(Ie),Re("pcb"),pe(!0),ue();const We=Ie.package.owner_github_username,De=Ie.package.unscoped_name;if(We&&De){const qe=De.split("/").pop()??De;ae(We,qe)}},Ye=async()=>{u.trim()&&(f(null),c==="tscircuit.com"?await v(u):c==="jlcpcb"?await M(u):c==="kicad"&&await Y(u))},Qe=async Ie=>{try{if(Ve(null),le(!0),Ie.source==="kicad"){if(!i)throw new Error("KiCad handler not provided");await i({result:Ie,footprint:Ie.footprint.qualifiedName})}else if(Ie.source==="jlcpcb"){if(!o)throw new Error("JLCPCB handler not provided");const We=await uZn(Ie.component.partNumber,{headers:t});await o({result:Ie,tsx:We})}else if(Ie.source==="tscircuit.com"){if(!r)throw new Error("tscircuit package handler not provided");const We=Ie.package.owner_github_username,De=Ie.package.unscoped_name;if(!We||!De)throw new Error("Missing package metadata");const qe=De.split("/").pop()??De,Je=`@tsci/${We}.${qe}`;await r({result:Ie,fullPackageName:Je})}return!0}catch(We){return console.error("Failed to import component",We),Ve(We instanceof Error?We.message:"Failed to import component"),!1}finally{le(!1)}};let ot=[],Te=!1,ut=null,Ke=!1;c==="tscircuit.com"?(ot=m,Te=y,ut=g,Ke=b):c==="jlcpcb"?(ot=T,Te=N,ut=R,Ke=P):c==="kicad"&&(ot=A,Te=U,ut=k,Ke=V);const Xe=async()=>{if(!h)return;await Qe(h)&&(e(),Se(),d(""))},it=Ie=>{Ie||e()},ze=Ie=>{pe(Ie),Ie||re(null)};return he.jsxs(zV,{open:n,onOpenChange:it,children:[he.jsxs(dk,{style:{width:"calc(100vw - 2rem)"},className:"rf-rounded-sm rf-max-h-[90vh] rf-overflow-y-auto rf-flex rf-flex-col",children:[he.jsxs(hk,{children:[he.jsx(pk,{className:"rf-text-lg sm:rf-text-xl",children:"Import Component"}),he.jsx($V,{className:"rf-text-sm",children:a?"Search for components from available sources.":"Import options are disabled because no handlers were provided."})]}),a?he.jsxs(koe,{value:c,onValueChange:Ie=>l(Ie),children:[he.jsx(zB,{className:"rf-flex rf-w-full rf-gap-2",children:s.map(Ie=>he.jsx(ZS,{value:Ie,className:"rf-flex-1 rf-text-xs sm:rf-text-sm",children:jge[Ie].label},Ie))}),he.jsx(dZn,{query:u,placeholder:jge[c].placeholder,isSearching:Te,onQueryChange:d,onSubmit:Ye}),he.jsx("div",{className:"rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-border rf-rounded-md",children:Te?he.jsxs("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:[he.jsx(h3,{className:"rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2"}),he.jsx("p",{children:"Searching..."})]}):ot.length>0?he.jsx(mZn,{results:ot,selected:h,onSelect:f,onShowDetails:c==="tscircuit.com"?xe:void 0}):he.jsx("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:ut?`Error: ${ut}`:Ke?jge[c].emptyMessage:"Enter a search term to find components"})})]}):null,Oe?he.jsx("div",{className:"rf-text-sm rf-text-red-600 rf-mt-2",children:Oe}):null,he.jsxs(FV,{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[he.jsx(xm,{variant:"outline",onClick:e,className:"rf-order-2 sm:rf-order-1",children:"Cancel"}),he.jsx(xm,{onClick:Xe,disabled:!h||Ne,className:"rf-order-1 sm:rf-order-2",children:Ne?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import"})]})]}),he.jsx(_Zn,{packageResult:ge,isOpen:oe,onOpenChange:ze,isLoading:ee,details:K,previewTab:Ee,onPreviewTabChange:Ie=>Re(Ie),isSubmitting:Ne,onImport:()=>{ge&&Qe(ge).then(Ie=>{Ie&&(pe(!1),e(),Se(),d(""))})}})]})};let lKn={data:""},uKn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||lKn,dKn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,hKn=/\/\*[^]*?\*\/| +/g,Hft=/\n+/g,BE=(n,e)=>{let t="",i="",r="";for(let o in n){let s=n[o];o[0]=="@"?o[1]=="i"?t=o+" "+s+";":i+=o[1]=="f"?BE(s,o):o+"{"+BE(s,o[1]=="k"?"":e)+"}":typeof s=="object"?i+=BE(s,e?e.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=BE.p?BE.p(o,s):o+":"+s+";")}return t+(e&&r?e+"{"+r+"}":r)+i},O3={},Vft=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+Vft(n[t]);return e}return n},pKn=(n,e,t,i,r)=>{let o=Vft(n),s=O3[o]||(O3[o]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(o));if(!O3[s]){let c=o!==n?n:(l=>{let u,d,h=[{}];for(;u=dKn.exec(l.replace(hKn,""));)u[4]?h.shift():u[3]?(d=u[3].replace(Hft," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][u[1]]=u[2].replace(Hft," ").trim();return h[0]})(n);O3[s]=BE(r?{["@keyframes "+s]:c}:c,t?"":"."+s)}let a=t&&O3.g?O3.g:null;return t&&(O3.g=O3[s]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(O3[s],e,i,a),s},fKn=(n,e,t)=>n.reduce((i,r,o)=>{let s=e[o];if(s&&s.call){let a=s(t),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=c?"."+c:a&&typeof a=="object"?a.props?"":BE(a,""):a===!1?"":a}return i+r+(s??"")},"");function JX(n){let e=this||{},t=n.call?n(e.p):n;return pKn(t.unshift?t.raw?fKn(t,[].slice.call(arguments,1),e.p):t.reduce((i,r)=>Object.assign(i,r&&r.call?r(e.p):r),{}):t,uKn(e.target),e.g,e.o,e.k)}let Gft,s5e,a5e;JX.bind({g:1});let L3=JX.bind({k:1});function mKn(n,e,t,i){BE.p=e,Gft=n,s5e=t,a5e=i}function UE(n,e){let t=this||{};return function(){let i=arguments;function r(o,s){let a=Object.assign({},o),c=a.className||r.className;t.p=Object.assign({theme:s5e&&s5e()},a),t.o=/ *go\d+/.test(c),a.className=JX.apply(t,i)+(c?" "+c:"");let l=n;return n[0]&&(l=a.as||n,delete a.as),a5e&&l[0]&&a5e(a),Gft(l,a)}return r}}var _Kn=n=>typeof n=="function",eW=(n,e)=>_Kn(n)?n(e):n,yKn=(()=>{let n=0;return()=>(++n).toString()})(),Yft=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),gKn=20,c5e="default",qft=(n,e)=>{let{toastLimit:t}=n.settings;switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,t)};case 1:return{...n,toasts:n.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:i}=e;return qft(n,{type:n.toasts.find(s=>s.id===i.id)?1:0,toast:i});case 3:let{toastId:r}=e;return{...n,toasts:n.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==e.toastId)};case 5:return{...n,pausedAt:e.time};case 6:let o=e.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},tW=[],Xft={toasts:[],pausedAt:void 0,settings:{toastLimit:gKn}},fS={},Wft=(n,e=c5e)=>{fS[e]=qft(fS[e]||Xft,n),tW.forEach(([t,i])=>{t===e&&i(fS[e])})},Zft=n=>Object.keys(fS).forEach(e=>Wft(n,e)),bKn=n=>Object.keys(fS).find(e=>fS[e].toasts.some(t=>t.id===n)),nW=(n=c5e)=>e=>{Wft(e,n)},xKn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},vKn=(n={},e=c5e)=>{let[t,i]=be.useState(fS[e]||Xft),r=be.useRef(fS[e]);be.useEffect(()=>(r.current!==fS[e]&&i(fS[e]),tW.push([e,i]),()=>{let s=tW.findIndex(([a])=>a===e);s>-1&&tW.splice(s,1)}),[e]);let o=t.toasts.map(s=>{var a,c,l;return{...n,...n[s.type],...s,removeDelay:s.removeDelay||((a=n[s.type])==null?void 0:a.removeDelay)||n?.removeDelay,duration:s.duration||((c=n[s.type])==null?void 0:c.duration)||n?.duration||xKn[s.type],style:{...n.style,...(l=n[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},wKn=(n,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...t,id:t?.id||yKn()}),oO=n=>(e,t)=>{let i=wKn(e,n,t);return nW(i.toasterId||bKn(i.id))({type:2,toast:i}),i.id},Xp=(n,e)=>oO("blank")(n,e);Xp.error=oO("error"),Xp.success=oO("success"),Xp.loading=oO("loading"),Xp.custom=oO("custom"),Xp.dismiss=(n,e)=>{let t={type:3,toastId:n};e?nW(e)(t):Zft(t)},Xp.dismissAll=n=>Xp.dismiss(void 0,n),Xp.remove=(n,e)=>{let t={type:4,toastId:n};e?nW(e)(t):Zft(t)},Xp.removeAll=n=>Xp.remove(void 0,n),Xp.promise=(n,e,t)=>{let i=Xp.loading(e.loading,{...t,...t?.loading});return typeof n=="function"&&(n=n()),n.then(r=>{let o=e.success?eW(e.success,r):void 0;return o?Xp.success(o,{id:i,...t,...t?.success}):Xp.dismiss(i),r}).catch(r=>{let o=e.error?eW(e.error,r):void 0;o?Xp.error(o,{id:i,...t,...t?.error}):Xp.dismiss(i)}),n};var SKn=1e3,EKn=(n,e="default")=>{let{toasts:t,pausedAt:i}=vKn(n,e),r=be.useRef(new Map).current,o=be.useCallback((d,h=SKn)=>{if(r.has(d))return;let f=setTimeout(()=>{r.delete(d),s({type:4,toastId:d})},h);r.set(d,f)},[]);be.useEffect(()=>{if(i)return;let d=Date.now(),h=t.map(f=>{if(f.duration===1/0)return;let m=(f.duration||0)+f.pauseDuration-(d-f.createdAt);if(m<0){f.visible&&Xp.dismiss(f.id);return}return setTimeout(()=>Xp.dismiss(f.id,e),m)});return()=>{h.forEach(f=>f&&clearTimeout(f))}},[t,i,e]);let s=be.useCallback(nW(e),[e]),a=be.useCallback(()=>{s({type:5,time:Date.now()})},[s]),c=be.useCallback((d,h)=>{s({type:1,toast:{id:d,height:h}})},[s]),l=be.useCallback(()=>{i&&s({type:6,time:Date.now()})},[i,s]),u=be.useCallback((d,h)=>{let{reverseOrder:f=!1,gutter:m=8,defaultPosition:y}=h||{},g=t.filter(w=>(w.position||y)===(d.position||y)&&w.height),b=g.findIndex(w=>w.id===d.id),v=g.filter((w,T)=>T<b&&w.visible).length;return g.filter(w=>w.visible).slice(...f?[v+1]:[0,v]).reduce((w,T)=>w+(T.height||0)+m,0)},[t]);return be.useEffect(()=>{t.forEach(d=>{if(d.dismissed)o(d.id,d.removeDelay);else{let h=r.get(d.id);h&&(clearTimeout(h),r.delete(d.id))}})},[t,o]),{toasts:t,handlers:{updateHeight:c,startPause:a,endPause:l,calculateOffset:u}}},TKn=L3`
|
|
6402
|
+
*/const cZn=async(n,e=10)=>{const t=encodeURIComponent(n),i=await fetch(`https://jlcsearch.tscircuit.com/api/search?limit=${e}&q=${t}`);if(!i.ok)throw new Error(`JLCPCB API error: ${i.status}`);return(await i.json()).components??[]},lZn=n=>({lcscId:n.lcsc,manufacturer:n.mfr,description:n.description,partNumber:`C${n.lcsc}`,package:n.package,price:n.price,stock:n.stock}),uZn=async(n,e)=>{const t=await aZn(n,{fetch:(i,r)=>fetch(`${mw}/proxy`,{...r,headers:{...r?.headers,"X-Target-Url":i.toString(),"X-Sender-Origin":r?.headers?.origin??"","X-Sender-Host":r?.headers?.host??"https://easyeda.com","X-Sender-Referer":r?.headers?.referer??"","X-Sender-User-Agent":r?.headers?.userAgent??"","X-Sender-Cookie":r?.headers?.cookie??"",...e?.headers}})});return rZn(t)},dZn=({query:n,placeholder:e,isSearching:t,onQueryChange:i,onSubmit:r})=>{const o=be.useCallback(s=>{s.key==="Enter"&&(s.preventDefault(),r())},[r]);return he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-mt-4",children:[he.jsxs("div",{className:"rf-relative rf-flex-grow",children:[he.jsx(Hme,{className:"rf-absolute rf-left-2 rf-top-2.5 rf-h-4 rf-w-4 rf-text-muted-foreground"}),he.jsx(bye,{placeholder:e,className:"rf-pl-8",spellCheck:!1,autoComplete:"off",value:n,onChange:s=>i(s.target.value),onKeyDown:o})]}),he.jsx(xm,{onClick:r,disabled:t||n.trim().length<1,className:"sm:rf-px-4 rf-px-3",children:t?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):he.jsxs(he.Fragment,{children:[he.jsx(Hme,{className:"rf-h-4 rf-w-4 sm:rf-hidden"}),he.jsx("span",{className:"rf-hidden sm:rf-inline",children:"Search"})]})})]})},Aft=n=>{switch(n.source){case"tscircuit.com":{const e=n.package;return`tscircuit-${e.package_id??`${e.owner_github_username??"unknown"}-${e.unscoped_name??e.name??"package"}`}`}case"jlcpcb":return`jlc-${n.component.lcscId}`;case"kicad":return`kicad-${n.footprint.path}`;default:return"unknown"}},hZn=n=>{switch(n.source){case"tscircuit.com":return n.package.unscoped_name;case"jlcpcb":return n.component.manufacturer;case"kicad":return n.footprint.qualifiedName}},pZn=n=>{switch(n.source){case"tscircuit.com":return n.package.description||(n.package.owner_github_username?`Component by ${n.package.owner_github_username}`:void 0);case"jlcpcb":return n.component.description;case"kicad":return n.footprint.description}},fZn=n=>{switch(n.source){case"tscircuit.com":return n.package.name;case"jlcpcb":return n.component.partNumber;case"kicad":return}},mZn=({results:n,selected:e,onSelect:t,onShowDetails:i})=>{const r=e?Aft(e):null;return he.jsx("div",{className:"rf-divide-y",children:n.map(o=>{const s=Aft(o),a=r===s,c=hZn(o),l=pZn(o),u=fZn(o),d=o.source==="jlcpcb"?o.component.stock:null;return he.jsxs("div",{className:`rf-p-3 rf-flex rf-flex-col sm:rf-grid sm:rf-grid-cols-[1fr_auto] rf-items-start sm:rf-items-center rf-cursor-pointer hover:rf-bg-zinc-100 rf-gap-2 ${a?"rf-bg-zinc-100":""}`,onClick:()=>t(o),children:[he.jsxs("div",{className:"rf-min-w-0 rf-overflow-hidden",children:[he.jsx("div",{className:"rf-font-medium rf-text-sm rf-truncate",children:c}),he.jsxs("div",{className:"rf-text-xs rf-text-zinc-500 rf-truncate",children:[u?he.jsx("span",{className:"rf-mr-2",children:u}):null,l]})]}),o.source==="tscircuit.com"&&i?he.jsx("div",{className:"rf-flex rf-gap-2 rf-flex-shrink-0 rf-w-full sm:rf-w-auto",children:he.jsx(xm,{variant:"outline",size:"sm",className:"rf-text-xs rf-w-full sm:rf-w-auto",onClick:h=>{h.stopPropagation(),i(o)},children:"See Details"})}):o.source==="jlcpcb"&&d!=null?he.jsxs("div",{className:"rf-text-xs rf-text-zinc-500 rf-font-medium rf-w-full sm:rf-w-auto sm:rf-text-right sm:rf-justify-self-end rf-whitespace-nowrap",children:[d.toLocaleString()," in stock"]}):null]},s)})})},Cft=(n,e)=>!n?.owner_github_username||!n?.unscoped_name?null:`https://registry-api.tscircuit.com/packages/images/${n.owner_github_username}/${n.unscoped_name}/${e}.png`,_Zn=({packageResult:n,isOpen:e,onOpenChange:t,isLoading:i,details:r,previewTab:o,onPreviewTabChange:s,isSubmitting:a,onImport:c})=>{const l=n?.package??null,u=Cft(l,"pcb"),d=Cft(l,"schematic"),h=l?.unscoped_name?.split("/").pop()??l?.unscoped_name,f=l?.owner_github_username??void 0,m=f?`https://tscircuit.com/${f}`:void 0,y=f&&h?`https://tscircuit.com/${f}/${h}`:void 0;return he.jsx(zV,{open:e,onOpenChange:t,children:he.jsxs(dk,{showOverlay:!1,style:{width:"calc(100vw - 2rem)"},className:"rf-max-w-5xl !rf-overflow-y-auto rf-max-h-[90vh] rf-overflow-hidden rf-flex rf-flex-col rf-rounded-sm",children:[he.jsx(hk,{className:"rf-pb-4 rf-border-b",children:he.jsx("div",{className:"rf-flex rf-items-start rf-justify-between rf-gap-4",children:he.jsxs("div",{className:"rf-flex-1 rf-min-w-0",children:[he.jsx(pk,{className:"rf-text-xl rf-font-semibold rf-truncate",children:h}),he.jsx($V,{children:l?.description})]})})}),he.jsxs("div",{className:"rf-flex-1 rf-overflow-y-auto rf-py-4 rf-space-y-6",children:[f?he.jsxs("div",{children:[he.jsx("span",{className:"rf-text-xs rf-font-medium rf-text-gray-500 rf-uppercase rf-tracking-wide",children:"Created by"}),he.jsx("div",{className:"rf-mt-1 rf-text-sm rf-font-medium",children:m?he.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"rf-text-black hover:rf-underline",children:f}):f})]}):null,he.jsxs("div",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-4",children:"Preview"}),he.jsxs(koe,{value:o,onValueChange:g=>s(g),children:[he.jsxs(zB,{className:"rf-inline-flex rf-h-9 rf-items-center rf-justify-center rf-rounded-lg rf-bg-zinc-100 rf-p-1 rf-text-zinc-500 dark:rf-bg-zinc-800 dark:rf-text-zinc-400",children:[he.jsx(ZS,{value:"pcb",children:"PCB"}),he.jsx(ZS,{value:"schematic",children:"Schematic"})]}),he.jsxs("div",{className:"rf-mt-4",children:[he.jsx(I9,{value:"pcb",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:u?he.jsx("img",{src:u,alt:`${h??"package"} PCB preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null}),he.jsx(I9,{value:"schematic",className:"rf-border rf-rounded-lg rf-overflow-hidden rf-bg-gray-50",children:d?he.jsx("img",{src:d,alt:`${h??"package"} schematic preview`,className:"rf-w-full rf-h-full rf-object-contain rf-bg-white rf-p-4"}):null})]})]})]}),r?.ai_description?he.jsxs("section",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"AI Description"}),he.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:he.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed",children:r.ai_description})})]}):null,r?.ai_usage_instructions?he.jsxs("section",{children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-mb-3",children:"Usage Instructions"}),he.jsx("div",{className:"rf-bg-gray-50 rf-border rf-border-gray-200 rf-rounded-lg rf-p-4",children:he.jsx("p",{className:"rf-text-sm rf-text-gray-700 rf-leading-relaxed rf-whitespace-pre-wrap",children:r.ai_usage_instructions})})]}):null,i?he.jsxs("div",{className:"rf-flex rf-justify-center rf-items-center rf-gap-2 rf-text-gray-500",children:[he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}),he.jsx("span",{className:"rf-text-sm",children:"Loading package details..."})]}):null]}),he.jsxs(FV,{className:"rf-pt-4 rf-border-t rf-flex rf-flex-col sm:rf-flex-row rf-justify-between rf-gap-2",children:[he.jsx("div",{className:"rf-flex-1",children:y?he.jsxs(xm,{variant:"outline",size:"sm",className:"rf-gap-2 rf-w-full sm:rf-w-auto",onClick:()=>window.open(y,"_blank"),children:[he.jsx(H0n,{className:"rf-h-4 rf-w-4"}),"View on tscircuit.com"]}):null}),he.jsxs("div",{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[he.jsx(xm,{variant:"outline",onClick:()=>t(!1),className:"rf-order-2 sm:rf-order-1",children:"Close"}),he.jsx(xm,{onClick:c,disabled:a,className:"rf-bg-blue-600 hover:rf-bg-blue-700",children:a?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import Component"})]})]})]})})},yZn=()=>{const[n,e]=be.useState(null),[t,i]=be.useState(!1),r=be.useCallback(async(s,a)=>{i(!0);try{const c=await fetch(`https://api.tscircuit.com/packages/get?name=${encodeURIComponent(`${s}/${a}`)}`);if(!c.ok)throw new Error(`Failed to load package details: ${c.status}`);const l=await c.json();e(l.package??null)}catch(c){console.error("Failed to fetch package details",c),e(null)}finally{i(!1)}},[]),o=be.useCallback(()=>{e(null),i(!1)},[]);return{details:n,isLoading:t,fetchDetails:r,reset:o}},gZn=async n=>{const e=await fetch("https://registry-api.tscircuit.com/packages/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n})});if(!e.ok)throw new Error(`tscircuit registry error: ${e.status}`);return(await e.json()).packages??[]},bZn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=u.trim();if(!d)return[];i(!0),o(null);try{const f=(await gZn(d)).map(m=>({source:"tscircuit.com",package:m}));return e(f),f}catch(h){return console.error("Error searching tscircuit packages",h),e([]),o(h instanceof Error?h.message:"Failed to search tscircuit packages"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}},xZn=n=>{const e=n.trim();return/^C\d+/i.test(e)?e.replace(/^C/i,""):e},vZn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=xZn(u);if(!d)return[];i(!0),o(null);try{const f=(await cZn(d,10)).map(m=>({source:"jlcpcb",component:lZn(m)}));return e(f),f}catch(h){return console.error("Error searching JLCPCB components",h),e([]),o(h instanceof Error?h.message:"Failed to search JLCPCB components"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}};function k3(n){return Array.isArray?Array.isArray(n):Ift(n)==="[object Array]"}function wZn(n){if(typeof n=="string")return n;let e=n+"";return e=="0"&&1/n==-1/0?"-0":e}function SZn(n){return n==null?"":wZn(n)}function pS(n){return typeof n=="string"}function Rft(n){return typeof n=="number"}function EZn(n){return n===!0||n===!1||TZn(n)&&Ift(n)=="[object Boolean]"}function Pft(n){return typeof n=="object"}function TZn(n){return Pft(n)&&n!==null}function Z9(n){return n!=null}function Z2e(n){return!n.trim().length}function Ift(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const MZn="Incorrect 'index' type",AZn=n=>`Invalid value for key ${n}`,CZn=n=>`Pattern length exceeds max of ${n}.`,RZn=n=>`Missing ${n} property in key`,PZn=n=>`Property 'weight' in key '${n}' must be a positive integer`,Nft=Object.prototype.hasOwnProperty;class IZn{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(i=>{let r=kft(i);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(i=>{i.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function kft(n){let e=null,t=null,i=null,r=1,o=null;if(pS(n)||k3(n))i=n,e=Oft(n),t=K2e(n);else{if(!Nft.call(n,"name"))throw new Error(RZn("name"));const s=n.name;if(i=s,Nft.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(PZn(s));e=Oft(s),t=K2e(s),o=n.getFn}return{path:e,id:t,weight:r,src:i,getFn:o}}function Oft(n){return k3(n)?n:n.split(".")}function K2e(n){return k3(n)?n.join("."):n}function NZn(n,e){let t=[],i=!1;const r=(o,s,a)=>{if(Z9(o))if(!s[a])t.push(o);else{let c=s[a];const l=o[c];if(!Z9(l))return;if(a===s.length-1&&(pS(l)||Rft(l)||EZn(l)))t.push(SZn(l));else if(k3(l)){i=!0;for(let u=0,d=l.length;u<d;u+=1)r(l[u],s,a+1)}else s.length&&r(l,s,a+1)}};return r(n,pS(e)?e.split("."):e,0),i?t:t[0]}var ka={...{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,e)=>n.score===e.score?n.idx<e.idx?-1:1:n.score<e.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:NZn,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const kZn=/[^ ]+/g;function OZn(n=1,e=3){const t=new Map,i=Math.pow(10,e);return{get(r){const o=r.match(kZn).length;if(t.has(o))return t.get(o);const s=1/Math.pow(o,.5*n),a=parseFloat(Math.round(s*i)/i);return t.set(o,a),a},clear(){t.clear()}}}class Q2e{constructor({getFn:e=ka.getFn,fieldNormWeight:t=ka.fieldNormWeight}={}){this.norm=OZn(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,i)=>{this._keysMap[t.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,pS(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();pS(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,i=this.size();t<i;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Z9(e)||Z2e(e))return;let i={v:e,i:t,n:this.norm.get(e)};this.records.push(i)}_addObject(e,t){let i={i:t,$:{}};this.keys.forEach((r,o)=>{let s=r.getFn?r.getFn(e):this.getFn(e,r.path);if(Z9(s)){if(k3(s)){let a=[];const c=[{nestedArrIndex:-1,value:s}];for(;c.length;){const{nestedArrIndex:l,value:u}=c.pop();if(Z9(u))if(pS(u)&&!Z2e(u)){let d={v:u,i:l,n:this.norm.get(u)};a.push(d)}else k3(u)&&u.forEach((d,h)=>{c.push({nestedArrIndex:h,value:d})})}i.$[o]=a}else if(pS(s)&&!Z2e(s)){let a={v:s,n:this.norm.get(s)};i.$[o]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Lft(n,e,{getFn:t=ka.getFn,fieldNormWeight:i=ka.fieldNormWeight}={}){const r=new Q2e({getFn:t,fieldNormWeight:i});return r.setKeys(n.map(kft)),r.setSources(e),r.create(),r}function LZn(n,{getFn:e=ka.getFn,fieldNormWeight:t=ka.fieldNormWeight}={}){const{keys:i,records:r}=n,o=new Q2e({getFn:e,fieldNormWeight:t});return o.setKeys(i),o.setIndexRecords(r),o}function ZX(n,{errors:e=0,currentLocation:t=0,expectedLocation:i=0,distance:r=ka.distance,ignoreLocation:o=ka.ignoreLocation}={}){const s=e/n.length;if(o)return s;const a=Math.abs(i-t);return r?s+a/r:a?1:s}function DZn(n=[],e=ka.minMatchCharLength){let t=[],i=-1,r=-1,o=0;for(let s=n.length;o<s;o+=1){let a=n[o];a&&i===-1?i=o:!a&&i!==-1&&(r=o-1,r-i+1>=e&&t.push([i,r]),i=-1)}return n[o-1]&&o-i>=e&&t.push([i,o-1]),t}const a8=32;function zZn(n,e,t,{location:i=ka.location,distance:r=ka.distance,threshold:o=ka.threshold,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,includeMatches:c=ka.includeMatches,ignoreLocation:l=ka.ignoreLocation}={}){if(e.length>a8)throw new Error(CZn(a8));const u=e.length,d=n.length,h=Math.max(0,Math.min(i,d));let f=o,m=h;const y=a>1||c,g=y?Array(d):[];let b;for(;(b=n.indexOf(e,m))>-1;){let P=ZX(e,{currentLocation:b,expectedLocation:h,distance:r,ignoreLocation:l});if(f=Math.min(P,f),m=b+u,y){let M=0;for(;M<u;)g[b+M]=1,M+=1}}m=-1;let v=[],w=1,T=u+d;const N=1<<u-1;for(let P=0;P<u;P+=1){let M=0,I=T;for(;M<I;)ZX(e,{errors:P,currentLocation:h+I,expectedLocation:h,distance:r,ignoreLocation:l})<=f?M=I:T=I,I=Math.floor((T-M)/2+M);T=I;let A=Math.max(1,h-I+1),U=s?d:Math.min(h+I,d)+u,k=Array(U+2);k[U+1]=(1<<P)-1;for(let Y=U;Y>=A;Y-=1){let W=Y-1,K=t[n.charAt(W)];if(y&&(g[W]=+!!K),k[Y]=(k[Y+1]<<1|1)&K,P&&(k[Y]|=(v[Y+1]|v[Y])<<1|1|v[Y+1]),k[Y]&N&&(w=ZX(e,{errors:P,currentLocation:W,expectedLocation:h,distance:r,ignoreLocation:l}),w<=f)){if(f=w,m=W,m<=h)break;A=Math.max(1,2*h-m)}}if(ZX(e,{errors:P+1,currentLocation:h,expectedLocation:h,distance:r,ignoreLocation:l})>f)break;v=k}const R={isMatch:m>=0,score:Math.max(.001,w)};if(y){const P=DZn(g,a);P.length?c&&(R.indices=P):R.isMatch=!1}return R}function FZn(n){let e={};for(let t=0,i=n.length;t<i;t+=1){const r=n.charAt(t);e[r]=(e[r]||0)|1<<i-t-1}return e}const KX=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class Dft{constructor(e,{location:t=ka.location,threshold:i=ka.threshold,distance:r=ka.distance,includeMatches:o=ka.includeMatches,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,isCaseSensitive:c=ka.isCaseSensitive,ignoreDiacritics:l=ka.ignoreDiacritics,ignoreLocation:u=ka.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:u},e=c?e:e.toLowerCase(),e=l?KX(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const d=(f,m)=>{this.chunks.push({pattern:f,alphabet:FZn(f),startIndex:m})},h=this.pattern.length;if(h>a8){let f=0;const m=h%a8,y=h-m;for(;f<y;)d(this.pattern.substr(f,a8),f),f+=a8;if(m){const g=h-a8;d(this.pattern.substr(g),g)}}else d(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=i?KX(e):e,this.pattern===e){let y={isMatch:!0,score:0};return r&&(y.indices=[[0,e.length-1]]),y}const{location:o,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:u}=this.options;let d=[],h=0,f=!1;this.chunks.forEach(({pattern:y,alphabet:g,startIndex:b})=>{const{isMatch:v,score:w,indices:T}=zZn(e,y,g,{location:o+b,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:r,ignoreLocation:u});v&&(f=!0),h+=w,v&&T&&(d=[...d,...T])});let m={isMatch:f,score:f?h/this.chunks.length:1};return f&&r&&(m.indices=d),m}}class $E{constructor(e){this.pattern=e}static isMultiMatch(e){return zft(e,this.multiRegex)}static isSingleMatch(e){return zft(e,this.singleRegex)}search(){}}function zft(n,e){const t=n.match(e);return t?t[1]:null}class $Zn extends $E{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class BZn extends $E{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class UZn extends $E{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class jZn extends $E{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class HZn extends $E{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class VZn extends $E{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Fft extends $E{constructor(e,{location:t=ka.location,threshold:i=ka.threshold,distance:r=ka.distance,includeMatches:o=ka.includeMatches,findAllMatches:s=ka.findAllMatches,minMatchCharLength:a=ka.minMatchCharLength,isCaseSensitive:c=ka.isCaseSensitive,ignoreDiacritics:l=ka.ignoreDiacritics,ignoreLocation:u=ka.ignoreLocation}={}){super(e),this._bitapSearch=new Dft(e,{location:t,threshold:i,distance:r,includeMatches:o,findAllMatches:s,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class $ft extends $E{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,i;const r=[],o=this.pattern.length;for(;(i=e.indexOf(this.pattern,t))>-1;)t=i+o,r.push([i,t-1]);const s=!!r.length;return{isMatch:s,score:s?0:1,indices:r}}}const J2e=[$Zn,$ft,UZn,jZn,VZn,HZn,BZn,Fft],Bft=J2e.length,GZn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,YZn="|";function qZn(n,e={}){return n.split(YZn).map(t=>{let i=t.trim().split(GZn).filter(o=>o&&!!o.trim()),r=[];for(let o=0,s=i.length;o<s;o+=1){const a=i[o];let c=!1,l=-1;for(;!c&&++l<Bft;){const u=J2e[l];let d=u.isMultiMatch(a);d&&(r.push(new u(d,e)),c=!0)}if(!c)for(l=-1;++l<Bft;){const u=J2e[l];let d=u.isSingleMatch(a);if(d){r.push(new u(d,e));break}}}return r})}const XZn=new Set([Fft.type,$ft.type]);class WZn{constructor(e,{isCaseSensitive:t=ka.isCaseSensitive,ignoreDiacritics:i=ka.ignoreDiacritics,includeMatches:r=ka.includeMatches,minMatchCharLength:o=ka.minMatchCharLength,ignoreLocation:s=ka.ignoreLocation,findAllMatches:a=ka.findAllMatches,location:c=ka.location,threshold:l=ka.threshold,distance:u=ka.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:r,minMatchCharLength:o,findAllMatches:a,ignoreLocation:s,location:c,threshold:l,distance:u},e=t?e:e.toLowerCase(),e=i?KX(e):e,this.pattern=e,this.query=qZn(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:r,ignoreDiacritics:o}=this.options;e=r?e:e.toLowerCase(),e=o?KX(e):e;let s=0,a=[],c=0;for(let l=0,u=t.length;l<u;l+=1){const d=t[l];a.length=0,s=0;for(let h=0,f=d.length;h<f;h+=1){const m=d[h],{isMatch:y,indices:g,score:b}=m.search(e);if(y){if(s+=1,c+=b,i){const v=m.constructor.type;XZn.has(v)?a=[...a,...g]:a.push(g)}}else{c=0,s=0,a.length=0;break}}if(s){let h={isMatch:!0,score:c/s};return i&&(h.indices=a),h}}return{isMatch:!1,score:1}}}const e5e=[];function ZZn(...n){e5e.push(...n)}function t5e(n,e){for(let t=0,i=e5e.length;t<i;t+=1){let r=e5e[t];if(r.condition(n,e))return new r(n,e)}return new Dft(n,e)}const QX={AND:"$and",OR:"$or"},n5e={PATH:"$path",PATTERN:"$val"},i5e=n=>!!(n[QX.AND]||n[QX.OR]),KZn=n=>!!n[n5e.PATH],QZn=n=>!k3(n)&&Pft(n)&&!i5e(n),Uft=n=>({[QX.AND]:Object.keys(n).map(e=>({[e]:n[e]}))});function jft(n,e,{auto:t=!0}={}){const i=r=>{let o=Object.keys(r);const s=KZn(r);if(!s&&o.length>1&&!i5e(r))return i(Uft(r));if(QZn(r)){const c=s?r[n5e.PATH]:o[0],l=s?r[n5e.PATTERN]:r[c];if(!pS(l))throw new Error(AZn(c));const u={keyId:K2e(c),pattern:l};return t&&(u.searcher=t5e(l,e)),u}let a={children:[],operator:o[0]};return o.forEach(c=>{const l=r[c];k3(l)&&l.forEach(u=>{a.children.push(i(u))})}),a};return i5e(n)||(n=Uft(n)),i(n)}function JZn(n,{ignoreFieldNorm:e=ka.ignoreFieldNorm}){n.forEach(t=>{let i=1;t.matches.forEach(({key:r,norm:o,score:s})=>{const a=r?r.weight:null;i*=Math.pow(s===0&&a?Number.EPSILON:s,(a||1)*(e?1:o))}),t.score=i})}function eKn(n,e){const t=n.matches;e.matches=[],Z9(t)&&t.forEach(i=>{if(!Z9(i.indices)||!i.indices.length)return;const{indices:r,value:o}=i;let s={indices:r,value:o};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),e.matches.push(s)})}function tKn(n,e){e.score=n.score}function nKn(n,e,{includeMatches:t=ka.includeMatches,includeScore:i=ka.includeScore}={}){const r=[];return t&&r.push(eKn),i&&r.push(tKn),n.map(o=>{const{idx:s}=o,a={item:e[s],refIndex:s};return r.length&&r.forEach(c=>{c(o,a)}),a})}class MR{constructor(e,t={},i){this.options={...ka,...t},this.options.useExtendedSearch,this._keyStore=new IZn(this.options.keys),this.setCollection(e,i)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Q2e))throw new Error(MZn);this._myIndex=t||Lft(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Z9(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const t=[];for(let i=0,r=this._docs.length;i<r;i+=1){const o=this._docs[i];e(o,i)&&(this.removeAt(i),i-=1,r-=1,t.push(o))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:i,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:a}=this.options;let c=pS(e)?pS(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return JZn(c,{ignoreFieldNorm:a}),o&&c.sort(s),Rft(t)&&t>-1&&(c=c.slice(0,t)),nKn(c,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(e){const t=t5e(e,this.options),{records:i}=this._myIndex,r=[];return i.forEach(({v:o,i:s,n:a})=>{if(!Z9(o))return;const{isMatch:c,score:l,indices:u}=t.searchIn(o);c&&r.push({item:o,idx:s,matches:[{score:l,value:o,norm:a,indices:u}]})}),r}_searchLogical(e){const t=jft(e,this.options),i=(a,c,l)=>{if(!a.children){const{keyId:d,searcher:h}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:h});return f&&f.length?[{idx:l,item:c,matches:f}]:[]}const u=[];for(let d=0,h=a.children.length;d<h;d+=1){const f=a.children[d],m=i(f,c,l);if(m.length)u.push(...m);else if(a.operator===QX.AND)return[]}return u},r=this._myIndex.records,o={},s=[];return r.forEach(({$:a,i:c})=>{if(Z9(a)){let l=i(t,a,c);l.length&&(o[c]||(o[c]={idx:c,item:a,matches:[]},s.push(o[c])),l.forEach(({matches:u})=>{o[c].matches.push(...u)}))}}),s}_searchObjectList(e){const t=t5e(e,this.options),{keys:i,records:r}=this._myIndex,o=[];return r.forEach(({$:s,i:a})=>{if(!Z9(s))return;let c=[];i.forEach((l,u)=>{c.push(...this._findMatches({key:l,value:s[u],searcher:t}))}),c.length&&o.push({idx:a,item:s,matches:c})}),o}_findMatches({key:e,value:t,searcher:i}){if(!Z9(t))return[];let r=[];if(k3(t))t.forEach(({v:o,i:s,n:a})=>{if(!Z9(o))return;const{isMatch:c,score:l,indices:u}=i.searchIn(o);c&&r.push({score:l,key:e,value:o,idx:s,norm:a,indices:u})});else{const{v:o,n:s}=t,{isMatch:a,score:c,indices:l}=i.searchIn(o);a&&r.push({score:c,key:e,value:o,norm:s,indices:l})}return r}}MR.version="7.1.0",MR.createIndex=Lft,MR.parseIndex=LZn,MR.config=ka,MR.parseQuery=jft,ZZn(WZn);let r5e=null,rO=null,o5e=null;const iKn=async()=>r5e||rO||(rO=fetch("https://kicad-mod-cache.tscircuit.com/kicad_files.json").then(n=>n.json()).then(n=>(r5e=n,rO=null,n)),rO),rKn=async(n,e=20)=>{const t=await iKn();return o5e||(o5e=new MR(t)),o5e.search(n).slice(0,e).map(i=>i.item)},oKn=n=>{const e=n.replace(".pretty/",":").replace(".kicad_mod",""),t=`kicad:${e}`;return{path:n,qualifiedName:t,description:e}},sKn=()=>{const[n,e]=be.useState([]),[t,i]=be.useState(!1),[r,o]=be.useState(null),[s,a]=be.useState(!1),c=be.useCallback(async u=>{const d=u.trim();if(!d)return[];i(!0),o(null);try{const f=(await rKn(d,20)).map(m=>({source:"kicad",footprint:oKn(m)}));return e(f),f}catch(h){return console.error("Error searching KiCad footprints",h),e([]),o(h instanceof Error?h.message:"Failed to search KiCad footprints"),[]}finally{i(!1),a(!0)}},[]),l=be.useCallback(()=>{e([]),i(!1),o(null),a(!1)},[]);return{results:n,isSearching:t,error:r,hasSearched:s,search:c,reset:l}},aKn=({onTscircuitPackageSelected:n,onJlcpcbComponentTsxLoaded:e,onKicadStringSelected:t})=>{const i=[];return n&&i.push("tscircuit.com"),e&&i.push("jlcpcb"),t&&i.push("kicad"),i},cKn=({isOpen:n,onClose:e,jlcpcbProxyRequestHeaders:t,onKicadStringSelected:i,onTscircuitPackageSelected:r,onJlcpcbComponentTsxLoaded:o})=>{const s=be.useMemo(()=>aKn({onKicadStringSelected:i,onTscircuitPackageSelected:r,onJlcpcbComponentTsxLoaded:o}),[i,r,o]),a=s.length>0,[c,l]=be.useState(s[0]??"tscircuit.com"),[u,d]=be.useState(""),[h,f]=be.useState(null),{results:m,isSearching:y,error:g,hasSearched:b,search:v,reset:w}=bZn(),{results:T,isSearching:N,error:R,hasSearched:P,search:M,reset:I}=vZn(),{results:A,isSearching:U,error:k,hasSearched:V,search:Y,reset:W}=sKn(),{details:K,isLoading:ee,fetchDetails:ae,reset:ue}=yZn(),[ge,re]=be.useState(null),[oe,pe]=be.useState(!1),[Ee,Re]=be.useState("pcb"),[Oe,Ve]=be.useState(null),[Ne,le]=be.useState(!1);be.useEffect(()=>{Ve(null)},[h]);const Se=be.useCallback(()=>{w(),I(),W(),f(null)},[I,W,w]);be.useEffect(()=>{n||(Se(),d(""),pe(!1),re(null),Ve(null))},[n,Se]),be.useEffect(()=>{d(""),f(null),c==="tscircuit.com"?w():c==="jlcpcb"?I():c==="kicad"&&W()},[c,I,W,w]);const xe=Ie=>{f(Ie),re(Ie),Re("pcb"),pe(!0),ue();const We=Ie.package.owner_github_username,De=Ie.package.unscoped_name;if(We&&De){const qe=De.split("/").pop()??De;ae(We,qe)}},Ye=async()=>{u.trim()&&(f(null),c==="tscircuit.com"?await v(u):c==="jlcpcb"?await M(u):c==="kicad"&&await Y(u))},Qe=async Ie=>{try{if(Ve(null),le(!0),Ie.source==="kicad"){if(!i)throw new Error("KiCad handler not provided");await i({result:Ie,footprint:Ie.footprint.qualifiedName})}else if(Ie.source==="jlcpcb"){if(!o)throw new Error("JLCPCB handler not provided");const We=await uZn(Ie.component.partNumber,{headers:t});await o({result:Ie,tsx:We})}else if(Ie.source==="tscircuit.com"){if(!r)throw new Error("tscircuit package handler not provided");const We=Ie.package.owner_github_username,De=Ie.package.unscoped_name;if(!We||!De)throw new Error("Missing package metadata");const qe=De.split("/").pop()??De,Je=`@tsci/${We}.${qe}`;await r({result:Ie,fullPackageName:Je})}return!0}catch(We){return console.error("Failed to import component",We),Ve(We instanceof Error?We.message:"Failed to import component"),!1}finally{le(!1)}};let ot=[],Te=!1,ut=null,Ke=!1;c==="tscircuit.com"?(ot=m,Te=y,ut=g,Ke=b):c==="jlcpcb"?(ot=T,Te=N,ut=R,Ke=P):c==="kicad"&&(ot=A,Te=U,ut=k,Ke=V);const Xe=async()=>{if(!h)return;await Qe(h)&&(e(),Se(),d(""))},it=Ie=>{Ie||e()},ze=Ie=>{pe(Ie),Ie||re(null)};return he.jsxs(zV,{open:n,onOpenChange:it,children:[he.jsxs(dk,{style:{width:"calc(100vw - 2rem)"},className:"rf-rounded-sm rf-max-h-[90vh] rf-overflow-y-auto rf-flex rf-flex-col",children:[he.jsxs(hk,{children:[he.jsx(pk,{className:"rf-text-lg sm:rf-text-xl",children:"Import Component"}),he.jsx($V,{className:"rf-text-sm",children:a?"Search for components from available sources.":"Import options are disabled because no handlers were provided."})]}),a?he.jsxs(koe,{value:c,onValueChange:Ie=>l(Ie),children:[he.jsx(zB,{className:"rf-flex rf-w-full rf-gap-2",children:s.map(Ie=>he.jsx(ZS,{value:Ie,className:"rf-flex-1 rf-text-xs sm:rf-text-sm",children:jge[Ie].label},Ie))}),he.jsx(dZn,{query:u,placeholder:jge[c].placeholder,isSearching:Te,onQueryChange:d,onSubmit:Ye}),he.jsx("div",{className:"rf-mt-4 rf-flex-1 rf-min-h-[200px] !rf-max-h-[40vh] !rf-overflow-y-auto rf-border rf-rounded-md",children:Te?he.jsxs("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:[he.jsx(h3,{className:"rf-h-8 rf-w-8 rf-animate-spin rf-mx-auto rf-mb-2"}),he.jsx("p",{children:"Searching..."})]}):ot.length>0?he.jsx(mZn,{results:ot,selected:h,onSelect:f,onShowDetails:c==="tscircuit.com"?xe:void 0}):he.jsx("div",{className:"rf-p-8 rf-text-center rf-text-zinc-500",children:ut?`Error: ${ut}`:Ke?jge[c].emptyMessage:"Enter a search term to find components"})})]}):null,Oe?he.jsx("div",{className:"rf-text-sm rf-text-red-600 rf-mt-2",children:Oe}):null,he.jsxs(FV,{className:"rf-flex rf-flex-col sm:rf-flex-row rf-gap-2",children:[he.jsx(xm,{variant:"outline",onClick:e,className:"rf-order-2 sm:rf-order-1",children:"Cancel"}),he.jsx(xm,{onClick:Xe,disabled:!h||Ne,className:"rf-order-1 sm:rf-order-2",children:Ne?he.jsx(h3,{className:"rf-h-4 rf-w-4 rf-animate-spin"}):"Import"})]})]}),he.jsx(_Zn,{packageResult:ge,isOpen:oe,onOpenChange:ze,isLoading:ee,details:K,previewTab:Ee,onPreviewTabChange:Ie=>Re(Ie),isSubmitting:Ne,onImport:()=>{ge&&Qe(ge).then(Ie=>{Ie&&(pe(!1),e(),Se(),d(""))})}})]})};let lKn={data:""},uKn=n=>typeof window=="object"?((n?n.querySelector("#_goober"):window._goober)||Object.assign((n||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:n||lKn,dKn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,hKn=/\/\*[^]*?\*\/| +/g,Hft=/\n+/g,BE=(n,e)=>{let t="",i="",r="";for(let o in n){let s=n[o];o[0]=="@"?o[1]=="i"?t=o+" "+s+";":i+=o[1]=="f"?BE(s,o):o+"{"+BE(s,o[1]=="k"?"":e)+"}":typeof s=="object"?i+=BE(s,e?e.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,a):a?a+" "+c:c)):o):s!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=BE.p?BE.p(o,s):o+":"+s+";")}return t+(e&&r?e+"{"+r+"}":r)+i},O3={},Vft=n=>{if(typeof n=="object"){let e="";for(let t in n)e+=t+Vft(n[t]);return e}return n},pKn=(n,e,t,i,r)=>{let o=Vft(n),s=O3[o]||(O3[o]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(o));if(!O3[s]){let c=o!==n?n:(l=>{let u,d,h=[{}];for(;u=dKn.exec(l.replace(hKn,""));)u[4]?h.shift():u[3]?(d=u[3].replace(Hft," ").trim(),h.unshift(h[0][d]=h[0][d]||{})):h[0][u[1]]=u[2].replace(Hft," ").trim();return h[0]})(n);O3[s]=BE(r?{["@keyframes "+s]:c}:c,t?"":"."+s)}let a=t&&O3.g?O3.g:null;return t&&(O3.g=O3[s]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(O3[s],e,i,a),s},fKn=(n,e,t)=>n.reduce((i,r,o)=>{let s=e[o];if(s&&s.call){let a=s(t),c=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=c?"."+c:a&&typeof a=="object"?a.props?"":BE(a,""):a===!1?"":a}return i+r+(s??"")},"");function JX(n){let e=this||{},t=n.call?n(e.p):n;return pKn(t.unshift?t.raw?fKn(t,[].slice.call(arguments,1),e.p):t.reduce((i,r)=>Object.assign(i,r&&r.call?r(e.p):r),{}):t,uKn(e.target),e.g,e.o,e.k)}let Gft,s5e,a5e;JX.bind({g:1});let L3=JX.bind({k:1});function mKn(n,e,t,i){BE.p=e,Gft=n,s5e=t,a5e=i}function UE(n,e){let t=this||{};return function(){let i=arguments;function r(o,s){let a=Object.assign({},o),c=a.className||r.className;t.p=Object.assign({theme:s5e&&s5e()},a),t.o=/ *go\d+/.test(c),a.className=JX.apply(t,i)+(c?" "+c:"");let l=n;return n[0]&&(l=a.as||n,delete a.as),a5e&&l[0]&&a5e(a),Gft(l,a)}return r}}var _Kn=n=>typeof n=="function",eW=(n,e)=>_Kn(n)?n(e):n,yKn=(()=>{let n=0;return()=>(++n).toString()})(),Yft=(()=>{let n;return()=>{if(n===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");n=!e||e.matches}return n}})(),gKn=20,c5e="default",qft=(n,e)=>{let{toastLimit:t}=n.settings;switch(e.type){case 0:return{...n,toasts:[e.toast,...n.toasts].slice(0,t)};case 1:return{...n,toasts:n.toasts.map(s=>s.id===e.toast.id?{...s,...e.toast}:s)};case 2:let{toast:i}=e;return qft(n,{type:n.toasts.find(s=>s.id===i.id)?1:0,toast:i});case 3:let{toastId:r}=e;return{...n,toasts:n.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==e.toastId)};case 5:return{...n,pausedAt:e.time};case 6:let o=e.time-(n.pausedAt||0);return{...n,pausedAt:void 0,toasts:n.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},tW=[],Xft={toasts:[],pausedAt:void 0,settings:{toastLimit:gKn}},fS={},Wft=(n,e=c5e)=>{fS[e]=qft(fS[e]||Xft,n),tW.forEach(([t,i])=>{t===e&&i(fS[e])})},Zft=n=>Object.keys(fS).forEach(e=>Wft(n,e)),bKn=n=>Object.keys(fS).find(e=>fS[e].toasts.some(t=>t.id===n)),nW=(n=c5e)=>e=>{Wft(e,n)},xKn={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},vKn=(n={},e=c5e)=>{let[t,i]=be.useState(fS[e]||Xft),r=be.useRef(fS[e]);be.useEffect(()=>(r.current!==fS[e]&&i(fS[e]),tW.push([e,i]),()=>{let s=tW.findIndex(([a])=>a===e);s>-1&&tW.splice(s,1)}),[e]);let o=t.toasts.map(s=>{var a,c,l;return{...n,...n[s.type],...s,removeDelay:s.removeDelay||((a=n[s.type])==null?void 0:a.removeDelay)||n?.removeDelay,duration:s.duration||((c=n[s.type])==null?void 0:c.duration)||n?.duration||xKn[s.type],style:{...n.style,...(l=n[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},wKn=(n,e="blank",t)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:e,ariaProps:{role:"status","aria-live":"polite"},message:n,pauseDuration:0,...t,id:t?.id||yKn()}),oO=n=>(e,t)=>{let i=wKn(e,n,t);return nW(i.toasterId||bKn(i.id))({type:2,toast:i}),i.id},Xp=(n,e)=>oO("blank")(n,e);Xp.error=oO("error"),Xp.success=oO("success"),Xp.loading=oO("loading"),Xp.custom=oO("custom"),Xp.dismiss=(n,e)=>{let t={type:3,toastId:n};e?nW(e)(t):Zft(t)},Xp.dismissAll=n=>Xp.dismiss(void 0,n),Xp.remove=(n,e)=>{let t={type:4,toastId:n};e?nW(e)(t):Zft(t)},Xp.removeAll=n=>Xp.remove(void 0,n),Xp.promise=(n,e,t)=>{let i=Xp.loading(e.loading,{...t,...t?.loading});return typeof n=="function"&&(n=n()),n.then(r=>{let o=e.success?eW(e.success,r):void 0;return o?Xp.success(o,{id:i,...t,...t?.success}):Xp.dismiss(i),r}).catch(r=>{let o=e.error?eW(e.error,r):void 0;o?Xp.error(o,{id:i,...t,...t?.error}):Xp.dismiss(i)}),n};var SKn=1e3,EKn=(n,e="default")=>{let{toasts:t,pausedAt:i}=vKn(n,e),r=be.useRef(new Map).current,o=be.useCallback((d,h=SKn)=>{if(r.has(d))return;let f=setTimeout(()=>{r.delete(d),s({type:4,toastId:d})},h);r.set(d,f)},[]);be.useEffect(()=>{if(i)return;let d=Date.now(),h=t.map(f=>{if(f.duration===1/0)return;let m=(f.duration||0)+f.pauseDuration-(d-f.createdAt);if(m<0){f.visible&&Xp.dismiss(f.id);return}return setTimeout(()=>Xp.dismiss(f.id,e),m)});return()=>{h.forEach(f=>f&&clearTimeout(f))}},[t,i,e]);let s=be.useCallback(nW(e),[e]),a=be.useCallback(()=>{s({type:5,time:Date.now()})},[s]),c=be.useCallback((d,h)=>{s({type:1,toast:{id:d,height:h}})},[s]),l=be.useCallback(()=>{i&&s({type:6,time:Date.now()})},[i,s]),u=be.useCallback((d,h)=>{let{reverseOrder:f=!1,gutter:m=8,defaultPosition:y}=h||{},g=t.filter(w=>(w.position||y)===(d.position||y)&&w.height),b=g.findIndex(w=>w.id===d.id),v=g.filter((w,T)=>T<b&&w.visible).length;return g.filter(w=>w.visible).slice(...f?[v+1]:[0,v]).reduce((w,T)=>w+(T.height||0)+m,0)},[t]);return be.useEffect(()=>{t.forEach(d=>{if(d.dismissed)o(d.id,d.removeDelay);else{let h=r.get(d.id);h&&(clearTimeout(h),r.delete(d.id))}})},[t,o]),{toasts:t,handlers:{updateHeight:c,startPause:a,endPause:l,calculateOffset:u}}},TKn=L3`
|
|
6403
6403
|
from {
|
|
6404
6404
|
transform: scale(0) rotate(45deg);
|
|
6405
6405
|
opacity: 0;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tscircuit/runframe",
|
|
3
3
|
"main": "dist/preview.js",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.1002",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./dist/preview.js",
|
|
8
8
|
"./preview": "./dist/preview.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@tscircuit/assembly-viewer": "^0.0.5",
|
|
48
48
|
"@tscircuit/checks": "^0.0.77",
|
|
49
49
|
"@tscircuit/create-snippet-url": "^0.0.9",
|
|
50
|
-
"@tscircuit/eval": "^0.0.
|
|
50
|
+
"@tscircuit/eval": "^0.0.338",
|
|
51
51
|
"@tscircuit/fake-snippets": "^0.0.87",
|
|
52
52
|
"@tscircuit/file-server": "^0.0.31",
|
|
53
53
|
"@tscircuit/footprinter": "^0.0.236",
|