@tscircuit/runframe 0.0.893 → 0.0.895
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
|
@@ -5618,7 +5618,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),nJe={};G9n(nJe,{all_layers:()=>eye
|
|
|
5618
5618
|
* Copyright (c) 2013-2015, 2017, Jon Schlinkert.
|
|
5619
5619
|
* Released under the MIT License.
|
|
5620
5620
|
*)
|
|
5621
|
-
*/const mwn=({containerClassName:n,...e})=>{const t=ge.useRef(null),[i,r]=ge.useState(620);return ge.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(fwn,{...e,height:i})})},_wn='*,: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-10{z-index:10}.rf-z-50{z-index:50}.rf-z-\\[100\\]{z-index:100}.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-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-\\[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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-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-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-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-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-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=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-hidden{display:none}.sm\\:rf-w-auto{width: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}',Ett=()=>{ge.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=_wn,document.head.appendChild(e)},[])},ywn=n=>{ge.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Ttt=n=>`hsl(${fx.indexOf(n)*137.5%360}, 70%, 50%)`,gwn=({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:fx.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:Ttt(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"]})]})},vwn=({renderLog:n})=>{const[e,t]=ge.useState("chronological");if(!n)return he.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries(n?.phaseTimings??{});e==="chronological"?i.sort((o,s)=>fx.indexOf(o[0])-fx.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.jsxs("select",{value:e,onChange:o=>t(o.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(gwn,{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:i.map(([o,s])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:fx.indexOf(o)}),he.jsx("td",{className:"rf-p-2",children:o}),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:Ttt(o),width:`${s/r*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:[s,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},Mtt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ge.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{$B.captureException(i)}catch{}}},[n,e]),ge.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{$B.captureException(r,{error_type:i.type})}catch{}}},[t])},bwn="0.0.892";function Ctt(n,e){const[t,i]=ge.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 ge.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const IH=D7e()(L7e(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),xwn=n=>{const[e,t]=ge.useState([]),[i,r]=ge.useState(null),[o,s]=ge.useState(""),[a,c]=Ctt("eval-version-selection",null),l=IH(f=>f.setLastRunEvalVersion),u=IH(f=>f.lastRunEvalVersion);return ge.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]),ge.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ge.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("")}}},wwn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ge.useState(""),[s,a]=ge.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}`})]})]})})},Swn=n=>{const e=ge.useRef(null),t=_x(i=>i.recentEvents);ge.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 NH="Dialog",[Att,Rtt]=n3(NH),[Ewn,_5]=Att(NH),Ptt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ge.useRef(null),c=ge.useRef(null),[l,u]=wT({prop:i,defaultProp:r??!1,onChange:o,caller:NH});return he.jsx(Ewn,{scope:e,triggerRef:a,contentRef:c,contentId:Mv(),titleId:Mv(),descriptionId:Mv(),open:l,onOpenChange:u,onOpenToggle:ge.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Ptt.displayName=NH;var Itt="DialogTrigger",Ntt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(Itt,t),o=L0(e,r.triggerRef);return he.jsx($c.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":cye(r.open),...i,ref:o,onClick:vs(n.onClick,r.onOpenToggle)})});Ntt.displayName=Itt;var sye="DialogPortal",[Twn,ktt]=Att(sye,{forceMount:void 0}),Ott=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=_5(sye,e);return he.jsx(Twn,{scope:e,forceMount:t,children:ge.Children.map(i,s=>he.jsx(r2,{present:t||o.open,children:he.jsx(tj,{asChild:!0,container:r,children:s})}))})};Ott.displayName=sye;var kH="DialogOverlay",Dtt=ge.forwardRef((n,e)=>{const t=ktt(kH,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=_5(kH,n.__scopeDialog);return o.modal?he.jsx(r2,{present:i||o.open,children:he.jsx(Cwn,{...r,ref:e})}):null});Dtt.displayName=kH;var Mwn=xT("DialogOverlay.RemoveScroll"),Cwn=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(kH,t);return he.jsx(lj,{as:Mwn,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx($c.div,{"data-state":cye(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),C8="DialogContent",Ltt=ge.forwardRef((n,e)=>{const t=ktt(C8,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=_5(C8,n.__scopeDialog);return he.jsx(r2,{present:i||o.open,children:o.modal?he.jsx(Awn,{...r,ref:e}):he.jsx(Rwn,{...r,ref:e})})});Ltt.displayName=C8;var Awn=ge.forwardRef((n,e)=>{const t=_5(C8,n.__scopeDialog),i=ge.useRef(null),r=L0(e,t.contentRef,i);return ge.useEffect(()=>{const o=i.current;if(o)return Z0e(o)},[]),he.jsx(ztt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vs(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:vs(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:vs(n.onFocusOutside,o=>o.preventDefault())})}),Rwn=ge.forwardRef((n,e)=>{const t=_5(C8,n.__scopeDialog),i=ge.useRef(!1),r=ge.useRef(!1);return he.jsx(ztt,{...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()}})}),ztt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=_5(C8,t),c=ge.useRef(null),l=L0(e,c);return I0e(),he.jsxs(he.Fragment,{children:[he.jsx(H$,{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":cye(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(Iwn,{titleId:a.titleId}),he.jsx(kwn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),aye="DialogTitle",Ftt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(aye,t);return he.jsx($c.h2,{id:r.titleId,...i,ref:e})});Ftt.displayName=aye;var Btt="DialogDescription",Utt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(Btt,t);return he.jsx($c.p,{id:r.descriptionId,...i,ref:e})});Utt.displayName=Btt;var $tt="DialogClose",jtt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5($tt,t);return he.jsx($c.button,{type:"button",...i,ref:e,onClick:vs(n.onClick,()=>r.onOpenChange(!1))})});jtt.displayName=$tt;function cye(n){return n?"open":"closed"}var Htt="DialogTitleWarning",[Pwn,Vtt]=wLt(Htt,{contentName:C8,titleName:aye,docsSlug:"dialog"}),Iwn=({titleId:n})=>{const e=Vtt(Htt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5621
|
+
*/const mwn=({containerClassName:n,...e})=>{const t=ge.useRef(null),[i,r]=ge.useState(620);return ge.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(fwn,{...e,height:i})})},_wn='*,: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-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-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-\\[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-9{width:2.25rem}.rf-w-96{width:24rem}.rf-w-\\[95\\%\\]{width:95%}.rf-w-fit{width:-moz-fit-content;width:fit-content}.rf-w-full{width:100%}.rf-w-screen{width:100vw}.rf-min-w-0{min-width:0}.rf-min-w-10{min-width:2.5rem}.rf-min-w-16{min-width:4rem}.rf-min-w-\\[148px\\]{min-width:148px}.rf-min-w-\\[8rem\\]{min-width:8rem}.rf-min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.\\!rf-max-w-\\[660px\\]{max-width:660px!important}.rf-max-w-2xl{max-width:42rem}.rf-max-w-3xl{max-width:48rem}.rf-max-w-4xl{max-width:56rem}.rf-max-w-5xl{max-width:64rem}.rf-max-w-full{max-width:100%}.rf-max-w-lg{max-width:32rem}.rf-max-w-md{max-width:28rem}.rf-max-w-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-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}.\\!rf-overflow-y-auto{overflow-y:auto!important}.rf-overflow-y-auto{overflow-y:auto}.rf-overflow-x-hidden{overflow-x:hidden}.rf-overflow-x-clip{overflow-x:clip}.rf-truncate{overflow:hidden;text-overflow:ellipsis}.rf-truncate,.rf-whitespace-nowrap{white-space:nowrap}.rf-whitespace-pre-wrap{white-space:pre-wrap}.rf-break-words{overflow-wrap:break-word}.rf-rounded{border-radius:.25rem}.rf-rounded-2xl{border-radius:1rem}.rf-rounded-full{border-radius:9999px}.rf-rounded-lg{border-radius:var(--radius)}.rf-rounded-md{border-radius:calc(var(--radius) - 2px)}.rf-rounded-sm{border-radius:calc(var(--radius) - 4px)}.rf-rounded-xl{border-radius:.75rem}.rf-border{border-width:1px}.rf-border-2{border-width:2px}.rf-border-b{border-bottom-width:1px}.rf-border-t{border-top-width:1px}.rf-border-blue-200{--tw-border-opacity:1;border-color:rgb(191 219 254/var(--tw-border-opacity,1))}.rf-border-blue-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-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-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-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-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.rf-text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity,1))}.rf-text-yellow-500{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity,1))}.rf-text-yellow-900{--tw-text-opacity:1;color:rgb(113 63 18/var(--tw-text-opacity,1))}.rf-text-zinc-200{--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity,1))}.rf-text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.rf-text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.rf-text-zinc-50{--tw-text-opacity:1;color:rgb(250 250 250/var(--tw-text-opacity,1))}.rf-text-zinc-500{--tw-text-opacity:1;color:rgb(113 113 122/var(--tw-text-opacity,1))}.rf-text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.rf-text-zinc-950{--tw-text-opacity:1;color:rgb(9 9 11/var(--tw-text-opacity,1))}.rf-underline{text-decoration-line:underline}.rf-line-through{text-decoration-line:line-through}.rf-underline-offset-4{text-underline-offset:4px}.rf-opacity-0{opacity:0}.rf-opacity-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-red-400:hover{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.hover\\:rf-text-zinc-900:hover{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.hover\\:rf-underline:hover{text-decoration-line:underline}.focus\\:rf-bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.focus\\:rf-bg-zinc-100:focus{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity,1))}.focus\\:rf-text-gray-900:focus{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.focus\\:rf-text-zinc-900:focus{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity,1))}.focus\\:rf-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:rf-ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\\:rf-ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\\:rf-ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\\:rf-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:rf-ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\\:rf-ring-zinc-950:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(9 9 11/var(--tw-ring-opacity,1))}.focus-visible\\:rf-ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\\:rf-pointer-events-none:disabled{pointer-events:none}.disabled\\:rf-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:rf-opacity-50:disabled{opacity:.5}.rf-group\\/bar:hover .group-hover\\/bar\\:rf-opacity-100{opacity:1}.data-\\[disabled\\=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-hidden{display:none}.sm\\:rf-w-auto{width: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}',Ett=()=>{ge.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=_wn,document.head.appendChild(e)},[])},ywn=n=>{ge.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},Ttt=n=>`hsl(${fx.indexOf(n)*137.5%360}, 70%, 50%)`,gwn=({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:fx.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:Ttt(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"]})]})},vwn=({renderLog:n})=>{const[e,t]=ge.useState("chronological");if(!n)return he.jsx("div",{className:"rf-p-4 rf-bg-gray-100 rf-rounded-md",children:"No render log, make sure this tab is open when you render (TODO add a rerender button here)"});const i=Object.entries(n?.phaseTimings??{});e==="chronological"?i.sort((o,s)=>fx.indexOf(o[0])-fx.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return he.jsxs("div",{className:"rf-bg-white",children:[he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[he.jsx("div",{children:"Render Logs"}),he.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[he.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),he.jsxs("select",{value:e,onChange:o=>t(o.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(gwn,{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:i.map(([o,s])=>he.jsxs("tr",{children:[he.jsx("td",{className:"rf-p-2",children:fx.indexOf(o)}),he.jsx("td",{className:"rf-p-2",children:o}),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:Ttt(o),width:`${s/r*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:[s,"ms"]}),he.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},Mtt=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{ge.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{$B.captureException(i)}catch{}}},[n,e]),ge.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{$B.captureException(r,{error_type:i.type})}catch{}}},[t])},bwn="0.0.894";function Ctt(n,e){const[t,i]=ge.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 ge.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const IH=D7e()(L7e(n=>({lastRunEvalVersion:void 0,setLastRunEvalVersion:e=>{n({lastRunEvalVersion:e})}}),{name:"runframe-runner-store"})),xwn=n=>{const[e,t]=ge.useState([]),[i,r]=ge.useState(null),[o,s]=ge.useState(""),[a,c]=Ctt("eval-version-selection",null),l=IH(f=>f.setLastRunEvalVersion),u=IH(f=>f.lastRunEvalVersion);return ge.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]),ge.useEffect(()=>{n&&(a?(window.TSCIRCUIT_LATEST_EVAL_VERSION=a,l(a)):i&&(window.TSCIRCUIT_LATEST_EVAL_VERSION=i,l(i)))},[n,a,i]),{versions:ge.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("")}}},wwn=({snippetNames:n,onSelect:e,onCancel:t,isOpen:i})=>{const[r,o]=ge.useState(""),[s,a]=ge.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}`})]})]})})},Swn=n=>{const e=ge.useRef(null),t=_x(i=>i.recentEvents);ge.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 NH="Dialog",[Att,Rtt]=n3(NH),[Ewn,_5]=Att(NH),Ptt=n=>{const{__scopeDialog:e,children:t,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=n,a=ge.useRef(null),c=ge.useRef(null),[l,u]=wT({prop:i,defaultProp:r??!1,onChange:o,caller:NH});return he.jsx(Ewn,{scope:e,triggerRef:a,contentRef:c,contentId:Mv(),titleId:Mv(),descriptionId:Mv(),open:l,onOpenChange:u,onOpenToggle:ge.useCallback(()=>u(d=>!d),[u]),modal:s,children:t})};Ptt.displayName=NH;var Itt="DialogTrigger",Ntt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(Itt,t),o=L0(e,r.triggerRef);return he.jsx($c.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":cye(r.open),...i,ref:o,onClick:vs(n.onClick,r.onOpenToggle)})});Ntt.displayName=Itt;var sye="DialogPortal",[Twn,ktt]=Att(sye,{forceMount:void 0}),Ott=n=>{const{__scopeDialog:e,forceMount:t,children:i,container:r}=n,o=_5(sye,e);return he.jsx(Twn,{scope:e,forceMount:t,children:ge.Children.map(i,s=>he.jsx(r2,{present:t||o.open,children:he.jsx(tj,{asChild:!0,container:r,children:s})}))})};Ott.displayName=sye;var kH="DialogOverlay",Dtt=ge.forwardRef((n,e)=>{const t=ktt(kH,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=_5(kH,n.__scopeDialog);return o.modal?he.jsx(r2,{present:i||o.open,children:he.jsx(Cwn,{...r,ref:e})}):null});Dtt.displayName=kH;var Mwn=xT("DialogOverlay.RemoveScroll"),Cwn=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(kH,t);return he.jsx(lj,{as:Mwn,allowPinchZoom:!0,shards:[r.contentRef],children:he.jsx($c.div,{"data-state":cye(r.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),C8="DialogContent",Ltt=ge.forwardRef((n,e)=>{const t=ktt(C8,n.__scopeDialog),{forceMount:i=t.forceMount,...r}=n,o=_5(C8,n.__scopeDialog);return he.jsx(r2,{present:i||o.open,children:o.modal?he.jsx(Awn,{...r,ref:e}):he.jsx(Rwn,{...r,ref:e})})});Ltt.displayName=C8;var Awn=ge.forwardRef((n,e)=>{const t=_5(C8,n.__scopeDialog),i=ge.useRef(null),r=L0(e,t.contentRef,i);return ge.useEffect(()=>{const o=i.current;if(o)return Z0e(o)},[]),he.jsx(ztt,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:vs(n.onCloseAutoFocus,o=>{o.preventDefault(),t.triggerRef.current?.focus()}),onPointerDownOutside:vs(n.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:vs(n.onFocusOutside,o=>o.preventDefault())})}),Rwn=ge.forwardRef((n,e)=>{const t=_5(C8,n.__scopeDialog),i=ge.useRef(!1),r=ge.useRef(!1);return he.jsx(ztt,{...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()}})}),ztt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=n,a=_5(C8,t),c=ge.useRef(null),l=L0(e,c);return I0e(),he.jsxs(he.Fragment,{children:[he.jsx(H$,{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":cye(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),he.jsxs(he.Fragment,{children:[he.jsx(Iwn,{titleId:a.titleId}),he.jsx(kwn,{contentRef:c,descriptionId:a.descriptionId})]})]})}),aye="DialogTitle",Ftt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(aye,t);return he.jsx($c.h2,{id:r.titleId,...i,ref:e})});Ftt.displayName=aye;var Btt="DialogDescription",Utt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5(Btt,t);return he.jsx($c.p,{id:r.descriptionId,...i,ref:e})});Utt.displayName=Btt;var $tt="DialogClose",jtt=ge.forwardRef((n,e)=>{const{__scopeDialog:t,...i}=n,r=_5($tt,t);return he.jsx($c.button,{type:"button",...i,ref:e,onClick:vs(n.onClick,()=>r.onOpenChange(!1))})});jtt.displayName=$tt;function cye(n){return n?"open":"closed"}var Htt="DialogTitleWarning",[Pwn,Vtt]=wLt(Htt,{contentName:C8,titleName:aye,docsSlug:"dialog"}),Iwn=({titleId:n})=>{const e=Vtt(Htt),t=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
5622
5622
|
|
|
5623
5623
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5624
5624
|
|
|
@@ -6707,7 +6707,7 @@ ${n}</tr>
|
|
|
6707
6707
|
`}tablecell(n){const e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
|
|
6708
6708
|
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${J3(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:e,tokens:t}){const i=this.parser.parseInline(t),r=vpt(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+J3(e)+'"'),o+=">"+i+"</a>",o}image({href:n,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));const r=vpt(n);if(r===null)return J3(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${J3(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:J3(n.text)}},Y9e=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},SS=class z2e{options;renderer;textRenderer;constructor(e){this.options=e||Y8,this.options.renderer=this.options.renderer||new dX,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Y9e}static parse(e,t){return new z2e(t).parse(e)}static parseInline(e,t){return new z2e(t).parseInline(e)}parse(e,t=!0){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=o,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=c||"";continue}}const s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,c=this.renderer.text(a);for(;r+1<e.length&&e[r+1].type==="text";)a=e[++r],c+=`
|
|
6709
6709
|
`+this.renderer.text(a);t?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(e,t=this.renderer){let i="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions?.renderers?.[o.type]){const a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}const s=o;switch(s.type){case"escape":{i+=t.text(s);break}case"html":{i+=t.html(s);break}case"link":{i+=t.link(s);break}case"image":{i+=t.image(s);break}case"strong":{i+=t.strong(s);break}case"em":{i+=t.em(s);break}case"codespan":{i+=t.codespan(s);break}case"br":{i+=t.br(s);break}case"del":{i+=t.del(s);break}case"text":{i+=t.text(s);break}default:{const a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},hX=class{options;block;constructor(n){this.options=n||Y8}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?wS.lex:wS.lexInline}provideParser(){return this.block?SS.parse:SS.parseInline}},UZn=class{defaults=F9e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=SS;Renderer=dX;TextRenderer=Y9e;Lexer=wS;Tokenizer=uX;Hooks=hX;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(const i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{const r=i;for(const o of r.header)t=t.concat(this.walkTokens(o.tokens,e));for(const o of r.rows)for(const s of o)t=t.concat(this.walkTokens(s.tokens,e));break}case"list":{const r=i;t=t.concat(this.walkTokens(r.items,e));break}default:{const r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{const s=r[o].flat(1/0);t=t.concat(this.walkTokens(s,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{const i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=e.renderers[r.name];o?e.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=e[r.level];o?o.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),t.renderer){const r=this.defaults.renderer||new dX(this.defaults);for(const o in t.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o,a=t.renderer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u||""}}i.renderer=r}if(t.tokenizer){const r=this.defaults.tokenizer||new uX(this.defaults);for(const o in t.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,a=t.tokenizer[s],c=r[s];r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.tokenizer=r}if(t.hooks){const r=this.defaults.hooks||new hX;for(const o in t.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const s=o,a=t.hooks[s],c=r[s];hX.passThroughHooks.has(o)?r[s]=l=>{if(this.defaults.async)return Promise.resolve(a.call(r,l)).then(d=>c.call(r,d));const u=a.call(r,l);return c.call(r,u)}:r[s]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=c.apply(r,l)),u}}i.hooks=r}if(t.walkTokens){const r=this.defaults.walkTokens,o=t.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults={...this.defaults,...i}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,e){return wS.lex(n,e??this.defaults)}parser(n,e){return SS.parse(n,e??this.defaults)}parseMarkdown(n){return(t,i)=>{const r={...i},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);const a=o.hooks?o.hooks.provideLexer():n?wS.lex:wS.lexInline,c=o.hooks?o.hooks.provideParser():n?SS.parse:SS.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(l=>a(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>c(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let l=a(t,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let u=c(l,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(l){return s(l)}}}onError(n,e){return t=>{if(t.message+=`
|
|
6710
|
-
Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+J3(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},X8=new UZn;function eh(n,e){return X8.parse(n,e)}eh.options=eh.setOptions=function(n){return X8.setOptions(n),eh.defaults=X8.defaults,spt(eh.defaults),eh},eh.getDefaults=F9e,eh.defaults=Y8,eh.use=function(...n){return X8.use(...n),eh.defaults=X8.defaults,spt(eh.defaults),eh},eh.walkTokens=function(n,e){return X8.walkTokens(n,e)},eh.parseInline=X8.parseInline,eh.Parser=SS,eh.parser=SS.parse,eh.Renderer=dX,eh.TextRenderer=Y9e,eh.Lexer=wS,eh.lexer=wS.lex,eh.Tokenizer=uX,eh.Hooks=hX,eh.parse=eh,eh.options,eh.setOptions,eh.use,eh.walkTokens,eh.parseInline,SS.parse,wS.lex;const $Zn=({review:n,onBack:e})=>{const[t,i]=ge.useState(n.ai_review_text??null),r=o7(),o=n.ai_review_id;ge.useEffect(()=>{if(!o)return;let a;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=ge.useMemo(()=>eh.parse(n.ai_review_text||""),[n.ai_review_text]);return he.jsxs(he.Fragment,{children:[he.jsxs(PN,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[he.jsx(B0,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),he.jsx(IN,{children:"AI Review"})]}),t?he.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):he.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:he.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[he.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[he.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),he.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),he.jsx("span",{children:"Loading..."})]})})]})},jZn=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=ge.useState("list_reviews"),[o,s]=ge.useState(null),a=c=>{s(c),r("view_review")};return he.jsx(zH,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:he.jsxs(RN,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&he.jsx(rZn,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&he.jsx($Zn,{review:o,onBack:()=>r("list_reviews")})]})})};function X9e(n,e){return X9e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},X9e(n,e)}function s7(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,X9e(n,e)}var a7=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function Wc(){return Wc=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Wc.apply(null,arguments)}var pX=typeof window>"u";function W1(){}function HZn(n,e){return typeof n=="function"?n(e):n}function W9e(n){return typeof n=="number"&&n>=0&&n!==1/0}function fX(n){return Array.isArray(n)?n:[n]}function wpt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function mX(n,e,t){return Pk(n)?typeof e=="function"?Wc({},t,{queryKey:n,queryFn:e}):Wc({},e,{queryKey:n}):n}function VZn(n,e,t){return Pk(n)?Wc({},e,{mutationKey:n}):typeof n=="function"?Wc({},e,{mutationFn:n}):Wc({},n)}function TE(n,e,t){return Pk(n)?[Wc({},e,{queryKey:n}),t]:[n||{},e]}function GZn(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function Spt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(Pk(a)){if(i){if(e.queryHash!==Z9e(a,e.options))return!1}else if(!_X(e.queryKey,a))return!1}var l=GZn(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||s&&!s(e))}function Ept(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(Pk(o)){if(!e.options.mutationKey)return!1;if(t){if(W8(e.options.mutationKey)!==W8(o))return!1}else if(!_X(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function Z9e(n,e){var t=e?.queryKeyHashFn||W8;return t(n)}function W8(n){var e=fX(n);return qZn(e)}function qZn(n){return JSON.stringify(n,function(e,t){return K9e(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function _X(n,e){return Tpt(fX(n),fX(e))}function Tpt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!Tpt(n[t],e[t])}):!1}function yX(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||K9e(n)&&K9e(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=yX(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function YZn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function K9e(n){if(!Mpt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!Mpt(t)||!t.hasOwnProperty("isPrototypeOf"))}function Mpt(n){return Object.prototype.toString.call(n)==="[object Object]"}function Pk(n){return typeof n=="string"||Array.isArray(n)}function XZn(n){return new Promise(function(e){setTimeout(e,n)})}function Cpt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Apt(){if(typeof AbortController=="function")return new AbortController}var WZn=(function(n){s7(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!pX&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})(a7),Ik=new WZn,ZZn=(function(n){s7(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!pX&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})(a7),gX=new ZZn;function KZn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function vX(n){return typeof n?.cancel=="function"}var Rpt=function(e){this.revert=e?.revert,this.silent=e?.silent};function bX(n){return n instanceof Rpt}var Ppt=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,f){s=h,a=f});var c=function(f){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(f),o?.(),s(f))},l=function(f){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(f),o?.(),a(f))},u=function(){return new Promise(function(f){o=f,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},d=function h(){if(!t.isResolved){var f;try{f=e.fn()}catch(m){f=Promise.reject(m)}r=function(y){if(!t.isResolved&&(l(new Rpt(y)),t.abort==null||t.abort(),vX(f)))try{f.cancel()}catch{}},t.isTransportCancelable=vX(f),Promise.resolve(f).then(c).catch(function(m){var y,g;if(!t.isResolved){var x=(y=e.retry)!=null?y:3,v=(g=e.retryDelay)!=null?g:KZn,w=typeof v=="function"?v(t.failureCount,m):v,T=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!T){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),XZn(w).then(function(){if(!Ik.isFocused()||!gX.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},QZn=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):Cpt(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&Cpt(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),t0=new QZn,Ipt=console;function xX(){return Ipt}function JZn(n){Ipt=n}var eKn=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=Wc({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),W9e(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(i,r){var o,s,a=this.state.data,c=HZn(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=yX(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(W1).catch(W1):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!wpt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(v){return v.options.queryFn});u&&this.setOptions(u.options)}var d=fX(this.queryKey),h=Apt(),f={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(f,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(f)):Promise.reject("Missing queryFn")},y={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(y)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=y.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=y.fetchOptions)==null?void 0:x.meta})}return this.retryer=new Ppt({fn:y.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){bX(w)&&w.silent||o.dispatch({type:"error",error:w}),bX(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),xX().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),t0.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return Wc({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Wc({},i,{isPaused:!0});case"continue":return Wc({},i,{isPaused:!1});case"fetch":return Wc({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Wc({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return bX(a)&&a.revert&&this.revertState?Wc({},this.revertState):Wc({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Wc({},i,{isInvalidated:!0});case"setState":return Wc({},i,r.state);default:return i}},n})(),tKn=(function(n){s7(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:Z9e(c,o),u=this.get(l);return u||(u=new eKn({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var s=TE(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return Spt(a,c)})},t.findAll=function(r,o){var s=TE(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return Spt(a,c)}):this.queries},t.notify=function(r){var o=this;t0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(a7),nKn=(function(){function n(t){this.options=Wc({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Npt(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(W1).catch(W1)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),xX().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new Ppt({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=iKn(this.state,i),t0.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function Npt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function iKn(n,e){switch(e.type){case"failed":return Wc({},n,{failureCount:n.failureCount+1});case"pause":return Wc({},n,{isPaused:!0});case"continue":return Wc({},n,{isPaused:!1});case"loading":return Wc({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Wc({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Wc({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Wc({},n,e.state);default:return n}}var rKn=(function(n){s7(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new nKn({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;t0.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return Ept(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Ept(r,o)})},t.notify=function(r){var o=this;t0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return t0.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(W1)})},Promise.resolve())})},e})(a7);function oKn(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",f=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],y=Apt(),g=y?.signal,x=m,v=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},T=function(q,X,W,K){return x=K?[X].concat(x):[].concat(x,[X]),K?[W].concat(q):[].concat(q,[W])},k=function(q,X,W,K){if(v)return Promise.reject("Cancelled");if(typeof W>"u"&&!X&&q.length)return Promise.resolve(q);var ie={queryKey:e.queryKey,signal:g,pageParam:W,meta:e.meta},ae=w(ie),me=Promise.resolve(ae).then(function(re){return T(q,W,re,K)});if(vX(ae)){var ne=me;ne.cancel=ae.cancel}return me},R;if(!f.length)R=k([]);else if(d){var N=typeof u<"u",M=N?u:kpt(e.options,f);R=k(f,N,M)}else if(h){var I=typeof u<"u",C=I?u:sKn(e.options,f);R=k(f,I,C,!0)}else(function(){x=[];var j=typeof e.options.getNextPageParam>"u",q=c&&f[0]?c(f[0],0,f):!0;R=q?k([],j,m[0]):Promise.resolve(T([],m[0],f[0]));for(var X=function(ie){R=R.then(function(ae){var me=c&&f[ie]?c(f[ie],ie,f):!0;if(me){var ne=j?m[ie]:kpt(e.options,ae);return k(ae,j,ne)}return Promise.resolve(T(ae,m[ie],f[ie]))})},W=1;W<f.length;W++)X(W)})();var $=R.then(function(j){return{pages:j,pageParams:x}}),P=$;return P.cancel=function(){v=!0,y?.abort(),vX(R)&&R.cancel()},$}}}}function kpt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function sKn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var aKn=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new tKn,this.mutationCache=t.mutationCache||new rKn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=Ik.subscribe(function(){Ik.isFocused()&&gX.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=gX.subscribe(function(){Ik.isFocused()&&gX.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=TE(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(Wc({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=mX(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return t0.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=TE(i,r),s=o[0],a=this.queryCache;t0.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=Wc({},c,{active:!0});return t0.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=t0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(W1).catch(W1)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=TE(i,r,o),d=u[0],h=u[1],f=Wc({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return t0.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(f,h)})},e.refetchQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=t0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Wc({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(W1);return l?.throwOnError||(d=d.catch(W1)),d},e.fetchQuery=function(i,r,o){var s=mX(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(W1).catch(W1)},e.fetchInfiniteQuery=function(i,r,o){var s=mX(i,r,o);return s.behavior=oKn(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(W1).catch(W1)},e.cancelMutations=function(){var i=this,r=t0.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(W1).catch(W1)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return W8(i)===W8(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return _X(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return W8(i)===W8(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return _X(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=Wc({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=Z9e(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:Wc({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),cKn=(function(n){s7(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Opt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return Q9e(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return Q9e(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&Dpt(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(Wc({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r?.throwOnError||(o=o.catch(W1)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(pX||this.currentResult.isStale||!W9e(this.options.staleTime))){var o=wpt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(pX||this.options.enabled===!1||!W9e(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||Ik.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(r,o){var s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,f=d?this.currentResult:this.previousQueryResult,m=r.state,y=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,v=m.isFetching,w=m.status,T=!1,k=!1,R;if(o.optimisticResults){var N=this.hasListeners(),M=!N&&Opt(r,o),I=N&&Dpt(r,s,o,a);(M||I)&&(v=!0,y||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&f?.isSuccess&&w!=="error")R=f.data,y=f.dataUpdatedAt,w=f.status,T=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)R=this.selectResult;else try{this.selectFn=o.select,R=o.select(m.data),o.structuralSharing!==!1&&(R=yX(c?.data,R)),this.selectResult=R,this.selectError=null}catch(P){xX().error(P),this.selectError=P}else R=m.data;if(typeof o.placeholderData<"u"&&typeof R>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=yX(c?.data,C)),this.selectError=null}catch(P){xX().error(P),this.selectError=P}typeof C<"u"&&(w="success",R=C,k=!0)}this.selectError&&(g=this.selectError,R=this.selectResult,x=Date.now(),w="error");var $={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:R,dataUpdatedAt:y,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:v,isRefetching:v&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:T,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:J9e(r,o),refetch:this.refetch,remove:this.remove};return $},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],f=l?.some(function(y){return y===u}),m=c?.some(function(y){return y===u});return h&&!m&&(!l||f)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!YZn(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(Wc({},s,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!bX(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;t0.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(a7);function lKn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Opt(n,e){return lKn(n,e)||n.state.dataUpdatedAt>0&&Q9e(n,e,e.refetchOnMount)}function Q9e(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&J9e(n,e)}return!1}function Dpt(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&J9e(n,t)}function J9e(n,e){return n.isStaleByTime(e.staleTime)}var uKn=(function(n){s7(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Wc({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:Npt(),o=Wc({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;t0.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)})})},e})(a7),dKn=eie.unstable_batchedUpdates;t0.setBatchNotifyFunction(dKn);var hKn=console;JZn(hKn);var Lpt=bo.createContext(void 0),zpt=bo.createContext(!1);function Fpt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Lpt),window.ReactQueryClientContext):Lpt}var e2e=function(){var e=bo.useContext(Fpt(bo.useContext(zpt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},pKn=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;bo.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=Fpt(r);return bo.createElement(zpt.Provider,{value:r},bo.createElement(s.Provider,{value:t},o))};function fKn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var mKn=bo.createContext(fKn()),_Kn=function(){return bo.useContext(mKn)};function Bpt(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function yKn(n,e,t){var i=bo.useRef(!1),r=bo.useState(0),o=r[1],s=VZn(n,e),a=e2e(),c=bo.useRef();c.current?c.current.setOptions(s):c.current=new uKn(a,s);var l=c.current.getCurrentResult();bo.useEffect(function(){i.current=!0;var d=c.current.subscribe(t0.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=bo.useCallback(function(d,h){c.current.mutate(d,h).catch(W1)},[]);if(l.error&&Bpt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Wc({},l,{mutate:u,mutateAsync:l.mutate})}function gKn(n,e){var t=bo.useRef(!1),i=bo.useState(0),r=i[1],o=e2e(),s=_Kn(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=t0.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=t0.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=t0.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=bo.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(bo.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(t0.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),bo.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&Bpt(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function vKn(n,e,t){var i=mX(n,e,t);return gKn(i,cKn)}function bKn({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return he.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[he.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(Epn,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),he.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[he.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),he.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),he.jsx("hr",{className:"rf-border-gray-200"}),he.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[he.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),he.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>he.jsxs("button",{type:"button",className:qo("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===o.carrier?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:()=>t(o.carrier),children:[he.jsx(Mpn,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),he.jsxs("div",{className:"rf-text-left rf-flex-1",children:[he.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),he.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[he.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),he.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&he.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[he.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[he.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),he.jsx("div",{className:"rf-flex rf-items-center",children:he.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const xKn=async n=>{try{const{order_quote_id:e}=await Tk.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof S9e){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},wKn=async n=>{const{order_quote:e}=await Tk.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},SKn=()=>{const n=e2e();return yKn({mutationKey:["createOrderQuote"],mutationFn:e=>xKn(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},EKn=n=>{const{data:e,error:t,status:i}=vKn(["getOrderQuote",n],()=>wKn(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},TKn=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=ge.useState(null),[s,a]=ge.useState(null),{mutate:c,error:l}=SKn();ge.useEffect(()=>{e&&c(e,{onSuccess:y=>{a(y.order_quote_id)}})},[e]);const{data:u}=EKn(s||void 0),d=l&&l.error?.message||u?.error?.message;Mtt({errorMessage:d});const h=async y=>{const g=oX("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${y}&shipping_option=${r}`};ge.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const y=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(y?.carrier||null)}},[u]);const f=ge.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((y,g)=>g.cost<y.cost?g:y,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?he.jsx(AKn,{signIn:t}):he.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[he.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&he.jsx(MKn,{message:"Fetching quotes..."}),(l||u?.error)&&he.jsx(CKn,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&he.jsxs(he.Fragment,{children:[he.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),he.jsx(bKn,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:f+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),he.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[he.jsx(B0,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:n,children:"Cancel"}),he.jsx(B0,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){ap.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),he.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},MKn=({message:n})=>he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[he.jsx(n8,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),he.jsx("p",{className:"rf-text-gray-600",children:n})]}),CKn=({message:n})=>he.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),AKn=({signIn:n})=>he.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[he.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[he.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),he.jsxs(B0,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(T0e,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),RKn=new aKn,PKn=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>he.jsx(pKn,{client:RKn,children:he.jsx(zH,{open:n,onOpenChange:c=>{c||e()},children:he.jsx(RN,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:he.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&he.jsx(TKn,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),IKn=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=_x(a=>a.circuitJson);return he.jsx(PKn,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},NKn=()=>{const[n,e]=ge.useState(!1),[t,i]=ge.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:IKn}},t2e=n=>{const e=IH(ae=>ae.lastRunEvalVersion),[t,i]=ge.useState(null),[r,o]=ge.useState(!1),[s,a]=ge.useState(!0),[c,l]=ge.useState(!1),[u,d]=ge.useState(null),[h,f]=ge.useState(null),[m,y]=ge.useState(!1),[g,x]=ge.useState(null),[v,w]=ge.useState(null),[T,k]=ge.useState(!1),[R,N]=ge.useState(!1),M=NKn(),I=_x(ae=>ae.pushEvent),C=_x(ae=>ae.recentEvents),$=ge.useMemo(()=>Date.now(),[]);Swn(ae=>{if(!(new Date(ae.created_at).valueOf()<$+500)){if(ae.event_type==="FILE_UPDATED"){o(!0);return}if(ae.event_type==="SNIPPET_SAVED"){o(!1),a(!1),x("Snippet saved successfully."),k(!1);return}ae.event_type==="REQUEST_EXPORT"&&(N(!0),x("Export processing..."),k(!1)),ae.event_type==="EXPORT_CREATED"&&(x(`Export created: ${ae.exportFilePath}`),k(!1),N(!1))}}),ge.useEffect(()=>{if(!c||u===null)return;const ae=C.filter(re=>new Date(re.created_at).valueOf()>u),me=ae.find(re=>re.event_type==="FAILED_TO_SAVE_SNIPPET"),ne=ae.find(re=>re.event_type==="SNIPPET_SAVED");me&&(l(!1),d(null),w(me.message??"Failed to save snippet. See console for error."),console.error(me.message),k(!0),me.error_code==="SNIPPET_UNSET"&&me.available_snippet_names&&(f(me.available_snippet_names),y(!0))),ne&&(l(!1),d(null),x("Snippet saved successfully."),k(!1))},[C,c]);const P=async()=>{l(!0),d(Date.now()),x(null),k(!1),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},q=_x(ae=>ae.circuitJson)??n.circuitJson,[X,W]=ge.useState(!1),[K,ie]=ge.useState(!1);return he.jsxs(he.Fragment,{children:[he.jsxs(ume,{children:[he.jsx(dme,{asChild:!0,children:he.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),he.jsxs(_j,{children:[!n.isWebEmbedded&&he.jsxs(he.Fragment,{children:[he.jsx(kb,{className:"rf-text-xs",onSelect:P,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&he.jsx(kb,{className:"rf-text-xs",onSelect:()=>{M.open()},children:"Order"}),he.jsx(kb,{className:"rf-text-xs",onSelect:()=>W(!0),disabled:c,children:"Import"}),he.jsx(kb,{className:"rf-text-xs",onSelect:()=>{if(!z9e()){ap.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),he.jsxs(pme,{children:[he.jsx(fj,{className:"rf-text-xs",disabled:R,children:R?"Exporting...":"Export"}),he.jsx(hme,{children:he.jsx(mj,{children:nZn.map((ae,me)=>he.jsx(kb,{onSelect:()=>{if(!q){ap.error("No Circuit JSON to export");return}iZn({exportName:ae.name,circuitJson:q,projectName:t??"Untitled"})},disabled:R,children:he.jsx("span",{className:"rf-text-xs",children:ae.name})},me))})})]}),!n.isWebEmbedded&&he.jsxs(pme,{children:[he.jsx(fj,{className:"rf-text-xs",children:"Advanced"}),he.jsx(hme,{children:he.jsxs(mj,{children:[he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",children:he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(Ent,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:ae=>{n.onChangeShouldLoadLatestEval?.(ae===!0)}}),he.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",children:he.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:he.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:he.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:he.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),he.jsx(Ywn,{open:T,onOpenChange:k,children:he.jsxs(dnt,{children:[he.jsxs(hnt,{children:[he.jsx(fnt,{children:"Error Saving Snippet"}),he.jsx(mnt,{children:v})]}),he.jsx(pnt,{children:he.jsx(_nt,{onClick:()=>k(!1),children:"Dismiss"})})]})}),he.jsx(wwn,{snippetNames:h??[],onSelect:async ae=>{l(!0),d(Date.now()),i(ae),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:ae}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),he.jsx(vXn,{isOpen:X,onClose:()=>W(!1)}),he.jsx(jZn,{isOpen:K,onClose:()=>ie(!1),packageName:t}),he.jsx(gXn,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),he.jsx(M.OrderDialog,{isOpen:M.isOpen,onClose:M.close,stage:M.stage,setStage:M.setStage})]})},kKn=["assembly","bom","circuit_json","errors","render_log"],OKn=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:h,renderLog:f,showImportAndFormatButtons:m=!0,className:y,headerClassName:g,leftHeaderContent:x,readOnly:v,isStreaming:w,autoroutingLog:T,onReportAutoroutingLog:k,isRunningCode:R,hasCodeChangedSinceLastRun:N,onEditEvent:M,editEvents:I,defaultActiveTab:C,defaultTab:$,availableTabs:P,autoRotate3dViewerDisabled:j,showSchematicDebugGrid:q=!1,showToggleFullScreen:X=!0,defaultToFullScreen:W=!1,activeEffectName:K,allowSelectingVersion:ie=!0,showFileMenu:ae=!1,isWebEmbedded:me=!1})=>{Ett();const{versions:ne,latestVersion:re,lastRunEvalVersion:le,search:xe,setSearch:Te,selectVersion:Ie}=xwn(ie),Ue=ge.useMemo(()=>o?o.filter(Be=>Be&&"error_type"in Be||Be.type.includes("error")):null,[o]),Ae=ge.useMemo(()=>o?o.filter(Be=>Be&&"warning_type"in Be||Be.type.includes("warning")):null,[o]);Mtt({errorMessage:i,errorStack:r,circuitJsonErrors:Ue});const[oe,be]=ge.useState(C??$??P?.[0]??"pcb"),[ye,$e]=ge.useState(null),[Ve,Ze]=ge.useState(W);ywn(Ve);const we=ge.useCallback(Be=>{be(Be),h?.(Be)},[h]),nt=()=>{Ze(!Ve)};ge.useEffect(()=>{i&&(oe!=="errors"&&$e(oe),we("errors"))},[i]),ge.useEffect(()=>{(oe==="code"||oe==="errors")&&o&&!i&&we(ye??C??$??P?.[0]??"pcb")},[o]);const je=ge.useCallback(Be=>{window.TSCIRCUIT_3D_OBJECT_REF=Be===null?void 0:Be},[]);return he.jsx("div",{className:qo("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:he.jsx("div",{className:qo("rf-md:sticky rf-md:top-2 rf-h-full",Ve&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:he.jsxs(Ere,{value:oe,onValueChange:we,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[he.jsxs("div",{className:qo("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,ae&&!x&&he.jsx(t2e,{isWebEmbedded:me,circuitJson:o}),(x||ae)&&he.jsx("div",{className:"rf-flex-grow"}),!x&&!ae&&R&&he.jsx(n8,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!ae&&he.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&!i&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[K?he.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:K,children:K}):f.lastRenderEvent&&he.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:f.lastRenderEvent?.phase??"",children:f.lastRenderEvent?.phase??""}),he.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:he.jsx(n8,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),he.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&he.jsxs(HB,{children:[c&&he.jsx(d3,{value:"code",children:"Code"}),!P||P.includes("pcb")?he.jsxs(d3,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&he.jsx("span",{className:qo("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!P||P.includes("schematic")?he.jsxs(d3,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&he.jsx("span",{className:qo("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!P||P.includes("cad")?he.jsxs(d3,{value:"cad",children:[o&&he.jsx("span",{className:qo("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(oe)&&he.jsx(d3,{value:oe,children:XIe(oe)}),he.jsxs(ume,{children:[he.jsx(dme,{asChild:!0,children:he.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[he.jsx(vpn,{className:"rf-w-4 rf-h-4"}),(Ue&&Ue.length>0||i)&&he.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),he.jsxs(_j,{className:"rf-*:text-xs",children:[kKn.filter(Be=>!P||P.includes(Be)).map(Be=>he.jsxs(kb,{onSelect:()=>we(Be),children:[oe!==Be&&he.jsx(BYe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),oe===Be&&he.jsx($$,{className:"rf-w-3 rf-h-3"}),he.jsx("div",{className:"rf-pr-2",children:XIe(Be)}),Be==="errors"&&(Ue&&Ue.length>0||i)&&he.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:i?1:Ue?.length})]},Be)),he.jsx(kb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",bwn.split(".").map((Be,Ge)=>Ge===2?parseInt(Be)+1:Be).join(".")]})}),ie?he.jsxs(pme,{onOpenChange:Be=>!Be&&Te(""),children:[he.jsx(fj,{className:"rf-text-xs rf-opacity-60",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",le??re??"latest"]})}),he.jsx(hme,{children:he.jsxs(mj,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[he.jsx("div",{className:"rf-p-1",children:he.jsx(Qme,{value:xe,onChange:Be=>Te(Be.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),he.jsx(VWe,{}),he.jsx(kb,{onSelect:()=>Ie(null),children:re?`${re} (latest)`:"latest"}),ne.map(Be=>he.jsx(kb,{onSelect:()=>Ie(Be),children:Be},Be))]})})]}):le&&he.jsx(kb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",le]})})]})]})]}),X&&he.jsx(B0,{onClick:nt,variant:"ghost",children:Ve?he.jsx(Spn,{size:16}):he.jsx(xpn,{size:16})})]}),c&&he.jsx(c2,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:he.jsx("div",{className:"rf-h-full",children:l})}),(!P||P.includes("pcb"))&&he.jsx(c2,{value:"pcb",children:he.jsx("div",{className:qo("rf-overflow-hidden",Ve?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(mwn,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:qo("rf-h-full rf-w-full",Ve?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Be=>{if(M)for(const Ge of Be)M(Ge)}}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("assembly"))&&he.jsx(c2,{value:"assembly",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallback:he.jsx("div",{children:"Error loading Assembly"}),children:o?he.jsx(Mxn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("schematic"))&&he.jsx(c2,{value:"schematic",children:he.jsx("div",{className:qo("rf-overflow-auto rf-bg-white",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(Sxn,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Be=>{M?.(Be)},debugGrid:q}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("cad"))&&he.jsx(c2,{value:"cad",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{FallbackComponent:spn,children:o?he.jsx(rpn,{ref:je,circuitJson:o,autoRotateDisabled:j}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("bom"))&&he.jsx(c2,{value:"bom",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(Ixn,{circuitJson:o}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("circuit_json"))&&he.jsx(c2,{value:"circuit_json",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallback:he.jsx("div",{children:"Error loading JSON viewer"}),children:o?he.jsx(Rxn,{elements:o}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("errors"))&&he.jsx(c2,{value:"errors",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||Ue&&Ue.length>0||o?he.jsx(u_n,{code:n,fsMap:e,circuitJsonErrors:Ue,circuitJsonWarnings:Ae,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:le,autoroutingLog:T,onReportAutoroutingLog:k}):he.jsx(v8,{onRunClicked:t})})}),d&&(!P||P.includes("render_log"))&&he.jsx(c2,{value:"render_log",children:he.jsx(vwn,{renderLog:f})})]})})})};/**
|
|
6710
|
+
Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+J3(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},X8=new UZn;function eh(n,e){return X8.parse(n,e)}eh.options=eh.setOptions=function(n){return X8.setOptions(n),eh.defaults=X8.defaults,spt(eh.defaults),eh},eh.getDefaults=F9e,eh.defaults=Y8,eh.use=function(...n){return X8.use(...n),eh.defaults=X8.defaults,spt(eh.defaults),eh},eh.walkTokens=function(n,e){return X8.walkTokens(n,e)},eh.parseInline=X8.parseInline,eh.Parser=SS,eh.parser=SS.parse,eh.Renderer=dX,eh.TextRenderer=Y9e,eh.Lexer=wS,eh.lexer=wS.lex,eh.Tokenizer=uX,eh.Hooks=hX,eh.parse=eh,eh.options,eh.setOptions,eh.use,eh.walkTokens,eh.parseInline,SS.parse,wS.lex;const $Zn=({review:n,onBack:e})=>{const[t,i]=ge.useState(n.ai_review_text??null),r=o7(),o=n.ai_review_id;ge.useEffect(()=>{if(!o)return;let a;async function c(){try{const l=await r.get("ai_reviews/get",{searchParams:{ai_review_id:o}}),{ai_review:u}=await l.json();if(u.ai_review_text){i(u.ai_review_text);return}}catch(l){console.error("Failed to load AI review text",l)}a=setTimeout(c,1e3)}return a=setTimeout(c,1e3),()=>clearTimeout(a)},[o]);const s=ge.useMemo(()=>eh.parse(n.ai_review_text||""),[n.ai_review_text]);return he.jsxs(he.Fragment,{children:[he.jsxs(PN,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[he.jsx(B0,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),he.jsx(IN,{children:"AI Review"})]}),t?he.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):he.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:he.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[he.jsxs("svg",{className:"rf-animate-spin rf-h-6 rf-w-6 rf-text-zinc-400 rf-mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[he.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),he.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),he.jsx("span",{children:"Loading..."})]})})]})},jZn=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=ge.useState("list_reviews"),[o,s]=ge.useState(null),a=c=>{s(c),r("view_review")};return he.jsx(zH,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:he.jsxs(RN,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&he.jsx(rZn,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&he.jsx($Zn,{review:o,onBack:()=>r("list_reviews")})]})})};function X9e(n,e){return X9e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},X9e(n,e)}function s7(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,X9e(n,e)}var a7=(function(){function n(){this.listeners=[]}var e=n.prototype;return e.subscribe=function(i){var r=this,o=i||function(){};return this.listeners.push(o),this.onSubscribe(),function(){r.listeners=r.listeners.filter(function(s){return s!==o}),r.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},n})();function Wc(){return Wc=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Wc.apply(null,arguments)}var pX=typeof window>"u";function W1(){}function HZn(n,e){return typeof n=="function"?n(e):n}function W9e(n){return typeof n=="number"&&n>=0&&n!==1/0}function fX(n){return Array.isArray(n)?n:[n]}function wpt(n,e){return Math.max(n+(e||0)-Date.now(),0)}function mX(n,e,t){return Pk(n)?typeof e=="function"?Wc({},t,{queryKey:n,queryFn:e}):Wc({},e,{queryKey:n}):n}function VZn(n,e,t){return Pk(n)?Wc({},e,{mutationKey:n}):typeof n=="function"?Wc({},e,{mutationFn:n}):Wc({},n)}function TE(n,e,t){return Pk(n)?[Wc({},e,{queryKey:n}),t]:[n||{},e]}function GZn(n,e){if(n===!0&&e===!0||n==null&&e==null)return"all";if(n===!1&&e===!1)return"none";var t=n??!e;return t?"active":"inactive"}function Spt(n,e){var t=n.active,i=n.exact,r=n.fetching,o=n.inactive,s=n.predicate,a=n.queryKey,c=n.stale;if(Pk(a)){if(i){if(e.queryHash!==Z9e(a,e.options))return!1}else if(!_X(e.queryKey,a))return!1}var l=GZn(t,o);if(l==="none")return!1;if(l!=="all"){var u=e.isActive();if(l==="active"&&!u||l==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||typeof r=="boolean"&&e.isFetching()!==r||s&&!s(e))}function Ept(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(Pk(o)){if(!e.options.mutationKey)return!1;if(t){if(W8(e.options.mutationKey)!==W8(o))return!1}else if(!_X(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function Z9e(n,e){var t=e?.queryKeyHashFn||W8;return t(n)}function W8(n){var e=fX(n);return qZn(e)}function qZn(n){return JSON.stringify(n,function(e,t){return K9e(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function _X(n,e){return Tpt(fX(n),fX(e))}function Tpt(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?!Object.keys(e).some(function(t){return!Tpt(n[t],e[t])}):!1}function yX(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||K9e(n)&&K9e(e)){for(var i=t?n.length:Object.keys(n).length,r=t?e:Object.keys(e),o=r.length,s=t?[]:{},a=0,c=0;c<o;c++){var l=t?c:r[c];s[l]=yX(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function YZn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function K9e(n){if(!Mpt(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!Mpt(t)||!t.hasOwnProperty("isPrototypeOf"))}function Mpt(n){return Object.prototype.toString.call(n)==="[object Object]"}function Pk(n){return typeof n=="string"||Array.isArray(n)}function XZn(n){return new Promise(function(e){setTimeout(e,n)})}function Cpt(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Apt(){if(typeof AbortController=="function")return new AbortController}var WZn=(function(n){s7(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!pX&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("visibilitychange",s,!1),window.addEventListener("focus",s,!1),function(){window.removeEventListener("visibilitychange",s),window.removeEventListener("focus",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setFocused(a):s.onFocus()})},t.setFocused=function(r){this.focused=r,r&&this.onFocus()},t.onFocus=function(){this.listeners.forEach(function(r){r()})},t.isFocused=function(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)},e})(a7),Ik=new WZn,ZZn=(function(n){s7(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!pX&&((o=window)!=null&&o.addEventListener)){var s=function(){return r()};return window.addEventListener("online",s,!1),window.addEventListener("offline",s,!1),function(){window.removeEventListener("online",s),window.removeEventListener("offline",s)}}},i}var t=e.prototype;return t.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},t.onUnsubscribe=function(){if(!this.hasListeners()){var r;(r=this.cleanup)==null||r.call(this),this.cleanup=void 0}},t.setEventListener=function(r){var o,s=this;this.setup=r,(o=this.cleanup)==null||o.call(this),this.cleanup=r(function(a){typeof a=="boolean"?s.setOnline(a):s.onOnline()})},t.setOnline=function(r){this.online=r,r&&this.onOnline()},t.onOnline=function(){this.listeners.forEach(function(r){r()})},t.isOnline=function(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine},e})(a7),gX=new ZZn;function KZn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function vX(n){return typeof n?.cancel=="function"}var Rpt=function(e){this.revert=e?.revert,this.silent=e?.silent};function bX(n){return n instanceof Rpt}var Ppt=function(e){var t=this,i=!1,r,o,s,a;this.abort=e.abort,this.cancel=function(h){return r?.(h)},this.cancelRetry=function(){i=!0},this.continueRetry=function(){i=!1},this.continue=function(){return o?.()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(h,f){s=h,a=f});var c=function(f){t.isResolved||(t.isResolved=!0,e.onSuccess==null||e.onSuccess(f),o?.(),s(f))},l=function(f){t.isResolved||(t.isResolved=!0,e.onError==null||e.onError(f),o?.(),a(f))},u=function(){return new Promise(function(f){o=f,t.isPaused=!0,e.onPause==null||e.onPause()}).then(function(){o=void 0,t.isPaused=!1,e.onContinue==null||e.onContinue()})},d=function h(){if(!t.isResolved){var f;try{f=e.fn()}catch(m){f=Promise.reject(m)}r=function(y){if(!t.isResolved&&(l(new Rpt(y)),t.abort==null||t.abort(),vX(f)))try{f.cancel()}catch{}},t.isTransportCancelable=vX(f),Promise.resolve(f).then(c).catch(function(m){var y,g;if(!t.isResolved){var x=(y=e.retry)!=null?y:3,v=(g=e.retryDelay)!=null?g:KZn,w=typeof v=="function"?v(t.failureCount,m):v,T=x===!0||typeof x=="number"&&t.failureCount<x||typeof x=="function"&&x(t.failureCount,m);if(i||!T){l(m);return}t.failureCount++,e.onFail==null||e.onFail(t.failureCount,m),XZn(w).then(function(){if(!Ik.isFocused()||!gX.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},QZn=(function(){function n(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=n.prototype;return e.batch=function(i){var r;this.transactions++;try{r=i()}finally{this.transactions--,this.transactions||this.flush()}return r},e.schedule=function(i){var r=this;this.transactions?this.queue.push(i):Cpt(function(){r.notifyFn(i)})},e.batchCalls=function(i){var r=this;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];r.schedule(function(){i.apply(void 0,s)})}},e.flush=function(){var i=this,r=this.queue;this.queue=[],r.length&&Cpt(function(){i.batchNotifyFn(function(){r.forEach(function(o){i.notifyFn(o)})})})},e.setNotifyFunction=function(i){this.notifyFn=i},e.setBatchNotifyFunction=function(i){this.batchNotifyFn=i},n})(),t0=new QZn,Ipt=console;function xX(){return Ipt}function JZn(n){Ipt=n}var eKn=(function(){function n(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=n.prototype;return e.setOptions=function(i){var r;this.options=Wc({},this.defaultOptions,i),this.meta=i?.meta,this.cacheTime=Math.max(this.cacheTime||0,(r=this.options.cacheTime)!=null?r:300*1e3)},e.setDefaultOptions=function(i){this.defaultOptions=i},e.scheduleGc=function(){var i=this;this.clearGcTimeout(),W9e(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){i.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(i,r){var o,s,a=this.state.data,c=HZn(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=yX(a,c)),this.dispatch({data:c,type:"success",dataUpdatedAt:r?.updatedAt}),c},e.setState=function(i,r){this.dispatch({type:"setState",state:i,setStateOptions:r})},e.cancel=function(i){var r,o=this.promise;return(r=this.retryer)==null||r.cancel(i),o?o.then(W1).catch(W1):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(i){return i.options.enabled!==!1})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(i){return i.getCurrentResult().isStale})},e.isStaleByTime=function(i){return i===void 0&&(i=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!wpt(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(v){return v.options.queryFn});u&&this.setOptions(u.options)}var d=fX(this.queryKey),h=Apt(),f={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(f,"signal",{enumerable:!0,get:function(){if(h)return o.abortSignalConsumed=!0,h.signal}});var m=function(){return o.options.queryFn?(o.abortSignalConsumed=!1,o.options.queryFn(f)):Promise.reject("Missing queryFn")},y={fetchOptions:r,options:this.options,queryKey:d,state:this.state,fetchFn:m,meta:this.meta};if((s=this.options.behavior)!=null&&s.onFetch){var g;(g=this.options.behavior)==null||g.onFetch(y)}if(this.revertState=this.state,!this.state.isFetching||this.state.fetchMeta!==((a=y.fetchOptions)==null?void 0:a.meta)){var x;this.dispatch({type:"fetch",meta:(x=y.fetchOptions)==null?void 0:x.meta})}return this.retryer=new Ppt({fn:y.fetchFn,abort:h==null||(c=h.abort)==null?void 0:c.bind(h),onSuccess:function(w){o.setData(w),o.cache.config.onSuccess==null||o.cache.config.onSuccess(w,o),o.cacheTime===0&&o.optionalRemove()},onError:function(w){bX(w)&&w.silent||o.dispatch({type:"error",error:w}),bX(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),xX().error(w)),o.cacheTime===0&&o.optionalRemove()},onFail:function(){o.dispatch({type:"failed"})},onPause:function(){o.dispatch({type:"pause"})},onContinue:function(){o.dispatch({type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(i){var r=this;this.state=this.reducer(this.state,i),t0.batch(function(){r.observers.forEach(function(o){o.onQueryUpdate(i)}),r.cache.notify({query:r,type:"queryUpdated",action:i})})},e.getDefaultState=function(i){var r=typeof i.initialData=="function"?i.initialData():i.initialData,o=typeof i.initialData<"u",s=o?typeof i.initialDataUpdatedAt=="function"?i.initialDataUpdatedAt():i.initialDataUpdatedAt:0,a=typeof r<"u";return{data:r,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:a?"success":"idle"}},e.reducer=function(i,r){var o,s;switch(r.type){case"failed":return Wc({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Wc({},i,{isPaused:!0});case"continue":return Wc({},i,{isPaused:!1});case"fetch":return Wc({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Wc({},i,{data:r.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:(s=r.dataUpdatedAt)!=null?s:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=r.error;return bX(a)&&a.revert&&this.revertState?Wc({},this.revertState):Wc({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Wc({},i,{isInvalidated:!0});case"setState":return Wc({},i,r.state);default:return i}},n})(),tKn=(function(n){s7(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.queries=[],r.queriesMap={},r}var t=e.prototype;return t.build=function(r,o,s){var a,c=o.queryKey,l=(a=o.queryHash)!=null?a:Z9e(c,o),u=this.get(l);return u||(u=new eKn({cache:this,queryKey:c,queryHash:l,options:r.defaultQueryOptions(o),state:s,defaultOptions:r.getQueryDefaults(c),meta:o.meta}),this.add(u)),u},t.add=function(r){this.queriesMap[r.queryHash]||(this.queriesMap[r.queryHash]=r,this.queries.push(r),this.notify({type:"queryAdded",query:r}))},t.remove=function(r){var o=this.queriesMap[r.queryHash];o&&(r.destroy(),this.queries=this.queries.filter(function(s){return s!==r}),o===r&&delete this.queriesMap[r.queryHash],this.notify({type:"queryRemoved",query:r}))},t.clear=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){r.remove(o)})})},t.get=function(r){return this.queriesMap[r]},t.getAll=function(){return this.queries},t.find=function(r,o){var s=TE(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return Spt(a,c)})},t.findAll=function(r,o){var s=TE(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return Spt(a,c)}):this.queries},t.notify=function(r){var o=this;t0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;t0.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(a7),nKn=(function(){function n(t){this.options=Wc({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Npt(),this.meta=t.meta}var e=n.prototype;return e.setState=function(i){this.dispatch({type:"setState",state:i})},e.addObserver=function(i){this.observers.indexOf(i)===-1&&this.observers.push(i)},e.removeObserver=function(i){this.observers=this.observers.filter(function(r){return r!==i})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(W1).catch(W1)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var i=this,r,o=this.state.status==="loading",s=Promise.resolve();return o||(this.dispatch({type:"loading",variables:this.options.variables}),s=s.then(function(){i.mutationCache.config.onMutate==null||i.mutationCache.config.onMutate(i.state.variables,i)}).then(function(){return i.options.onMutate==null?void 0:i.options.onMutate(i.state.variables)}).then(function(a){a!==i.state.context&&i.dispatch({type:"loading",context:a,variables:i.state.variables})})),s.then(function(){return i.executeMutation()}).then(function(a){r=a,i.mutationCache.config.onSuccess==null||i.mutationCache.config.onSuccess(r,i.state.variables,i.state.context,i)}).then(function(){return i.options.onSuccess==null?void 0:i.options.onSuccess(r,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(r,null,i.state.variables,i.state.context)}).then(function(){return i.dispatch({type:"success",data:r}),r}).catch(function(a){return i.mutationCache.config.onError==null||i.mutationCache.config.onError(a,i.state.variables,i.state.context,i),xX().error(a),Promise.resolve().then(function(){return i.options.onError==null?void 0:i.options.onError(a,i.state.variables,i.state.context)}).then(function(){return i.options.onSettled==null?void 0:i.options.onSettled(void 0,a,i.state.variables,i.state.context)}).then(function(){throw i.dispatch({type:"error",error:a}),a})})},e.executeMutation=function(){var i=this,r;return this.retryer=new Ppt({fn:function(){return i.options.mutationFn?i.options.mutationFn(i.state.variables):Promise.reject("No mutationFn found")},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:(r=this.options.retry)!=null?r:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(i){var r=this;this.state=iKn(this.state,i),t0.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function Npt(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function iKn(n,e){switch(e.type){case"failed":return Wc({},n,{failureCount:n.failureCount+1});case"pause":return Wc({},n,{isPaused:!0});case"continue":return Wc({},n,{isPaused:!1});case"loading":return Wc({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Wc({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Wc({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Wc({},n,e.state);default:return n}}var rKn=(function(n){s7(e,n);function e(i){var r;return r=n.call(this)||this,r.config=i||{},r.mutations=[],r.mutationId=0,r}var t=e.prototype;return t.build=function(r,o,s){var a=new nKn({mutationCache:this,mutationId:++this.mutationId,options:r.defaultMutationOptions(o),state:s,defaultOptions:o.mutationKey?r.getMutationDefaults(o.mutationKey):void 0,meta:o.meta});return this.add(a),a},t.add=function(r){this.mutations.push(r),this.notify(r)},t.remove=function(r){this.mutations=this.mutations.filter(function(o){return o!==r}),r.cancel(),this.notify(r)},t.clear=function(){var r=this;t0.batch(function(){r.mutations.forEach(function(o){r.remove(o)})})},t.getAll=function(){return this.mutations},t.find=function(r){return typeof r.exact>"u"&&(r.exact=!0),this.mutations.find(function(o){return Ept(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Ept(r,o)})},t.notify=function(r){var o=this;t0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){this.resumePausedMutations()},t.onOnline=function(){this.resumePausedMutations()},t.resumePausedMutations=function(){var r=this.mutations.filter(function(o){return o.state.isPaused});return t0.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(W1)})},Promise.resolve())})},e})(a7);function oKn(){return{onFetch:function(e){e.fetchFn=function(){var t,i,r,o,s,a,c=(t=e.fetchOptions)==null||(i=t.meta)==null?void 0:i.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l?.pageParam,d=l?.direction==="forward",h=l?.direction==="backward",f=((s=e.state.data)==null?void 0:s.pages)||[],m=((a=e.state.data)==null?void 0:a.pageParams)||[],y=Apt(),g=y?.signal,x=m,v=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},T=function(q,X,W,K){return x=K?[X].concat(x):[].concat(x,[X]),K?[W].concat(q):[].concat(q,[W])},k=function(q,X,W,K){if(v)return Promise.reject("Cancelled");if(typeof W>"u"&&!X&&q.length)return Promise.resolve(q);var ie={queryKey:e.queryKey,signal:g,pageParam:W,meta:e.meta},ae=w(ie),me=Promise.resolve(ae).then(function(re){return T(q,W,re,K)});if(vX(ae)){var ne=me;ne.cancel=ae.cancel}return me},R;if(!f.length)R=k([]);else if(d){var N=typeof u<"u",M=N?u:kpt(e.options,f);R=k(f,N,M)}else if(h){var I=typeof u<"u",C=I?u:sKn(e.options,f);R=k(f,I,C,!0)}else(function(){x=[];var j=typeof e.options.getNextPageParam>"u",q=c&&f[0]?c(f[0],0,f):!0;R=q?k([],j,m[0]):Promise.resolve(T([],m[0],f[0]));for(var X=function(ie){R=R.then(function(ae){var me=c&&f[ie]?c(f[ie],ie,f):!0;if(me){var ne=j?m[ie]:kpt(e.options,ae);return k(ae,j,ne)}return Promise.resolve(T(ae,m[ie],f[ie]))})},W=1;W<f.length;W++)X(W)})();var $=R.then(function(j){return{pages:j,pageParams:x}}),P=$;return P.cancel=function(){v=!0,y?.abort(),vX(R)&&R.cancel()},$}}}}function kpt(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function sKn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var aKn=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new tKn,this.mutationCache=t.mutationCache||new rKn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=Ik.subscribe(function(){Ik.isFocused()&&gX.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=gX.subscribe(function(){Ik.isFocused()&&gX.isOnline()&&(i.mutationCache.onOnline(),i.queryCache.onOnline())})},e.unmount=function(){var i,r;(i=this.unsubscribeFocus)==null||i.call(this),(r=this.unsubscribeOnline)==null||r.call(this)},e.isFetching=function(i,r){var o=TE(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(Wc({},i,{fetching:!0})).length},e.getQueryData=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state.data},e.getQueriesData=function(i){return this.getQueryCache().findAll(i).map(function(r){var o=r.queryKey,s=r.state,a=s.data;return[o,a]})},e.setQueryData=function(i,r,o){var s=mX(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return t0.batch(function(){return s.getQueryCache().findAll(i).map(function(a){var c=a.queryKey;return[c,s.setQueryData(c,r,o)]})})},e.getQueryState=function(i,r){var o;return(o=this.queryCache.find(i,r))==null?void 0:o.state},e.removeQueries=function(i,r){var o=TE(i,r),s=o[0],a=this.queryCache;t0.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=Wc({},c,{active:!0});return t0.batch(function(){return u.findAll(c).forEach(function(h){h.reset()}),s.refetchQueries(d,l)})},e.cancelQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=t0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.cancel(u)})});return Promise.all(d).then(W1).catch(W1)},e.invalidateQueries=function(i,r,o){var s,a,c,l=this,u=TE(i,r,o),d=u[0],h=u[1],f=Wc({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return t0.batch(function(){return l.queryCache.findAll(d).forEach(function(m){m.invalidate()}),l.refetchQueries(f,h)})},e.refetchQueries=function(i,r,o){var s=this,a=TE(i,r,o),c=a[0],l=a[1],u=t0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Wc({},l,{meta:{refetchPage:c?.refetchPage}}))})}),d=Promise.all(u).then(W1);return l?.throwOnError||(d=d.catch(W1)),d},e.fetchQuery=function(i,r,o){var s=mX(i,r,o),a=this.defaultQueryOptions(s);typeof a.retry>"u"&&(a.retry=!1);var c=this.queryCache.build(this,a);return c.isStaleByTime(a.staleTime)?c.fetch(a):Promise.resolve(c.state.data)},e.prefetchQuery=function(i,r,o){return this.fetchQuery(i,r,o).then(W1).catch(W1)},e.fetchInfiniteQuery=function(i,r,o){var s=mX(i,r,o);return s.behavior=oKn(),this.fetchQuery(s)},e.prefetchInfiniteQuery=function(i,r,o){return this.fetchInfiniteQuery(i,r,o).then(W1).catch(W1)},e.cancelMutations=function(){var i=this,r=t0.batch(function(){return i.mutationCache.getAll().map(function(o){return o.cancel()})});return Promise.all(r).then(W1).catch(W1)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(i){return this.mutationCache.build(this,i).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(i){this.defaultOptions=i},e.setQueryDefaults=function(i,r){var o=this.queryDefaults.find(function(s){return W8(i)===W8(s.queryKey)});o?o.defaultOptions=r:this.queryDefaults.push({queryKey:i,defaultOptions:r})},e.getQueryDefaults=function(i){var r;return i?(r=this.queryDefaults.find(function(o){return _X(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return W8(i)===W8(s.mutationKey)});o?o.defaultOptions=r:this.mutationDefaults.push({mutationKey:i,defaultOptions:r})},e.getMutationDefaults=function(i){var r;return i?(r=this.mutationDefaults.find(function(o){return _X(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=Wc({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=Z9e(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:Wc({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),cKn=(function(n){s7(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.options=r,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(r),o}var t=e.prototype;return t.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},t.onSubscribe=function(){this.listeners.length===1&&(this.currentQuery.addObserver(this),Opt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return Q9e(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return Q9e(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},t.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},t.setOptions=function(r,o){var s=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(r),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();var c=this.hasListeners();c&&Dpt(this.currentQuery,a,this.options,s)&&this.executeFetch(),this.updateResult(o),c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();var l=this.computeRefetchInterval();c&&(this.currentQuery!==a||this.options.enabled!==s.enabled||l!==this.currentRefetchInterval)&&this.updateRefetchInterval(l)},t.getOptimisticResult=function(r){var o=this.client.defaultQueryObserverOptions(r),s=this.client.getQueryCache().build(this.client,o);return this.createResult(s,o)},t.getCurrentResult=function(){return this.currentResult},t.trackResult=function(r,o){var s=this,a={},c=function(u){s.trackedProps.includes(u)||s.trackedProps.push(u)};return Object.keys(r).forEach(function(l){Object.defineProperty(a,l,{configurable:!1,enumerable:!0,get:function(){return c(l),r[l]}})}),(o.useErrorBoundary||o.suspense)&&c("error"),a},t.getNextResult=function(r){var o=this;return new Promise(function(s,a){var c=o.subscribe(function(l){l.isFetching||(c(),l.isError&&r?.throwOnError?a(l.error):s(l))})})},t.getCurrentQuery=function(){return this.currentQuery},t.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},t.refetch=function(r){return this.fetch(Wc({},r,{meta:{refetchPage:r?.refetchPage}}))},t.fetchOptimistic=function(r){var o=this,s=this.client.defaultQueryObserverOptions(r),a=this.client.getQueryCache().build(this.client,s);return a.fetch().then(function(){return o.createResult(a,s)})},t.fetch=function(r){var o=this;return this.executeFetch(r).then(function(){return o.updateResult(),o.currentResult})},t.executeFetch=function(r){this.updateQuery();var o=this.currentQuery.fetch(this.options,r);return r?.throwOnError||(o=o.catch(W1)),o},t.updateStaleTimeout=function(){var r=this;if(this.clearStaleTimeout(),!(pX||this.currentResult.isStale||!W9e(this.options.staleTime))){var o=wpt(this.currentResult.dataUpdatedAt,this.options.staleTime),s=o+1;this.staleTimeoutId=setTimeout(function(){r.currentResult.isStale||r.updateResult()},s)}},t.computeRefetchInterval=function(){var r;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(r=this.options.refetchInterval)!=null?r:!1},t.updateRefetchInterval=function(r){var o=this;this.clearRefetchInterval(),this.currentRefetchInterval=r,!(pX||this.options.enabled===!1||!W9e(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||Ik.isFocused())&&o.executeFetch()},this.currentRefetchInterval))},t.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},t.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},t.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},t.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},t.createResult=function(r,o){var s=this.currentQuery,a=this.options,c=this.currentResult,l=this.currentResultState,u=this.currentResultOptions,d=r!==s,h=d?r.state:this.currentQueryInitialState,f=d?this.currentResult:this.previousQueryResult,m=r.state,y=m.dataUpdatedAt,g=m.error,x=m.errorUpdatedAt,v=m.isFetching,w=m.status,T=!1,k=!1,R;if(o.optimisticResults){var N=this.hasListeners(),M=!N&&Opt(r,o),I=N&&Dpt(r,s,o,a);(M||I)&&(v=!0,y||(w="loading"))}if(o.keepPreviousData&&!m.dataUpdateCount&&f?.isSuccess&&w!=="error")R=f.data,y=f.dataUpdatedAt,w=f.status,T=!0;else if(o.select&&typeof m.data<"u")if(c&&m.data===l?.data&&o.select===this.selectFn)R=this.selectResult;else try{this.selectFn=o.select,R=o.select(m.data),o.structuralSharing!==!1&&(R=yX(c?.data,R)),this.selectResult=R,this.selectError=null}catch(P){xX().error(P),this.selectError=P}else R=m.data;if(typeof o.placeholderData<"u"&&typeof R>"u"&&(w==="loading"||w==="idle")){var C;if(c?.isPlaceholderData&&o.placeholderData===u?.placeholderData)C=c.data;else if(C=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof C<"u")try{C=o.select(C),o.structuralSharing!==!1&&(C=yX(c?.data,C)),this.selectError=null}catch(P){xX().error(P),this.selectError=P}typeof C<"u"&&(w="success",R=C,k=!0)}this.selectError&&(g=this.selectError,R=this.selectResult,x=Date.now(),w="error");var $={status:w,isLoading:w==="loading",isSuccess:w==="success",isError:w==="error",isIdle:w==="idle",data:R,dataUpdatedAt:y,error:g,errorUpdatedAt:x,failureCount:m.fetchFailureCount,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:v,isRefetching:v&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:T,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:J9e(r,o),refetch:this.refetch,remove:this.remove};return $},t.shouldNotifyListeners=function(r,o){if(!o)return!0;var s=this.options,a=s.notifyOnChangeProps,c=s.notifyOnChangePropsExclusions;if(!a&&!c||a==="tracked"&&!this.trackedProps.length)return!0;var l=a==="tracked"?this.trackedProps:a;return Object.keys(r).some(function(u){var d=u,h=r[d]!==o[d],f=l?.some(function(y){return y===u}),m=c?.some(function(y){return y===u});return h&&!m&&(!l||f)})},t.updateResult=function(r){var o=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!YZn(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(Wc({},s,r))}},t.updateQuery=function(){var r=this.client.getQueryCache().build(this.client,this.options);if(r!==this.currentQuery){var o=this.currentQuery;this.currentQuery=r,this.currentQueryInitialState=r.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o?.removeObserver(this),r.addObserver(this))}},t.onQueryUpdate=function(r){var o={};r.type==="success"?o.onSuccess=!0:r.type==="error"&&!bX(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;t0.batch(function(){r.onSuccess?(o.options.onSuccess==null||o.options.onSuccess(o.currentResult.data),o.options.onSettled==null||o.options.onSettled(o.currentResult.data,null)):r.onError&&(o.options.onError==null||o.options.onError(o.currentResult.error),o.options.onSettled==null||o.options.onSettled(void 0,o.currentResult.error)),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)}),r.cache&&o.client.getQueryCache().notify({query:o.currentQuery,type:"observerResultsUpdated"})})},e})(a7);function lKn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Opt(n,e){return lKn(n,e)||n.state.dataUpdatedAt>0&&Q9e(n,e,e.refetchOnMount)}function Q9e(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&J9e(n,e)}return!1}function Dpt(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&J9e(n,t)}function J9e(n,e){return n.isStaleByTime(e.staleTime)}var uKn=(function(n){s7(e,n);function e(i,r){var o;return o=n.call(this)||this,o.client=i,o.setOptions(r),o.bindMethods(),o.updateResult(),o}var t=e.prototype;return t.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},t.setOptions=function(r){this.options=this.client.defaultMutationOptions(r)},t.onUnsubscribe=function(){if(!this.listeners.length){var r;(r=this.currentMutation)==null||r.removeObserver(this)}},t.onMutationUpdate=function(r){this.updateResult();var o={listeners:!0};r.type==="success"?o.onSuccess=!0:r.type==="error"&&(o.onError=!0),this.notify(o)},t.getCurrentResult=function(){return this.currentResult},t.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},t.mutate=function(r,o){return this.mutateOptions=o,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,Wc({},this.options,{variables:typeof r<"u"?r:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},t.updateResult=function(){var r=this.currentMutation?this.currentMutation.state:Npt(),o=Wc({},r,{isLoading:r.status==="loading",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset});this.currentResult=o},t.notify=function(r){var o=this;t0.batch(function(){o.mutateOptions&&(r.onSuccess?(o.mutateOptions.onSuccess==null||o.mutateOptions.onSuccess(o.currentResult.data,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(o.currentResult.data,null,o.currentResult.variables,o.currentResult.context)):r.onError&&(o.mutateOptions.onError==null||o.mutateOptions.onError(o.currentResult.error,o.currentResult.variables,o.currentResult.context),o.mutateOptions.onSettled==null||o.mutateOptions.onSettled(void 0,o.currentResult.error,o.currentResult.variables,o.currentResult.context))),r.listeners&&o.listeners.forEach(function(s){s(o.currentResult)})})},e})(a7),dKn=eie.unstable_batchedUpdates;t0.setBatchNotifyFunction(dKn);var hKn=console;JZn(hKn);var Lpt=bo.createContext(void 0),zpt=bo.createContext(!1);function Fpt(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Lpt),window.ReactQueryClientContext):Lpt}var e2e=function(){var e=bo.useContext(Fpt(bo.useContext(zpt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},pKn=function(e){var t=e.client,i=e.contextSharing,r=i===void 0?!1:i,o=e.children;bo.useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=Fpt(r);return bo.createElement(zpt.Provider,{value:r},bo.createElement(s.Provider,{value:t},o))};function fKn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var mKn=bo.createContext(fKn()),_Kn=function(){return bo.useContext(mKn)};function Bpt(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function yKn(n,e,t){var i=bo.useRef(!1),r=bo.useState(0),o=r[1],s=VZn(n,e),a=e2e(),c=bo.useRef();c.current?c.current.setOptions(s):c.current=new uKn(a,s);var l=c.current.getCurrentResult();bo.useEffect(function(){i.current=!0;var d=c.current.subscribe(t0.batchCalls(function(){i.current&&o(function(h){return h+1})}));return function(){i.current=!1,d()}},[]);var u=bo.useCallback(function(d,h){c.current.mutate(d,h).catch(W1)},[]);if(l.error&&Bpt(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Wc({},l,{mutate:u,mutateAsync:l.mutate})}function gKn(n,e){var t=bo.useRef(!1),i=bo.useState(0),r=i[1],o=e2e(),s=_Kn(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=t0.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=t0.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=t0.batchCalls(a.onSettled)),a.suspense&&(typeof a.staleTime!="number"&&(a.staleTime=1e3),a.cacheTime===0&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(s.isReset()||(a.retryOnMount=!1));var c=bo.useState(function(){return new e(o,a)}),l=c[0],u=l.getOptimisticResult(a);if(bo.useEffect(function(){t.current=!0,s.clearReset();var d=l.subscribe(t0.batchCalls(function(){t.current&&r(function(h){return h+1})}));return l.updateResult(),function(){t.current=!1,d()}},[s,l]),bo.useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.fetchOptimistic(a).then(function(d){var h=d.data;a.onSuccess==null||a.onSuccess(h),a.onSettled==null||a.onSettled(h,null)}).catch(function(d){s.clearReset(),a.onError==null||a.onError(d),a.onSettled==null||a.onSettled(void 0,d)});if(u.isError&&!s.isReset()&&!u.isFetching&&Bpt(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function vKn(n,e,t){var i=mX(n,e,t);return gKn(i,cKn)}function bKn({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return he.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[he.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(Epn,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),he.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[he.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),he.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),he.jsx("hr",{className:"rf-border-gray-200"}),he.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[he.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),he.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>he.jsxs("button",{type:"button",className:qo("rf-flex rf-items-center rf-gap-3 rf-px-4 rf-py-3 rf-rounded-lg rf-border rf-min-w-[148px] rf-transition-colors rf-bg-white",e===o.carrier?"rf-border-blue-600 rf-bg-blue-50 rf-ring-2 rf-ring-blue-500":"rf-border-gray-300 rf-bg-gray-50 hover:rf-border-blue-300"),onClick:()=>t(o.carrier),children:[he.jsx(Mpn,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),he.jsxs("div",{className:"rf-text-left rf-flex-1",children:[he.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),he.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[he.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),he.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&he.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:he.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[he.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[he.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),he.jsx("div",{className:"rf-flex rf-items-center",children:he.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const xKn=async n=>{try{const{order_quote_id:e}=await Tk.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof S9e){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},wKn=async n=>{const{order_quote:e}=await Tk.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},SKn=()=>{const n=e2e();return yKn({mutationKey:["createOrderQuote"],mutationFn:e=>xKn(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},EKn=n=>{const{data:e,error:t,status:i}=vKn(["getOrderQuote",n],()=>wKn(n||""),{enabled:!!n,refetchInterval:r=>r?.is_completed||r?.has_error?!1:4e3,refetchIntervalInBackground:!0,retry:!1});return{status:i==="loading"?"loading":i==="error"?"error":"success",data:e??null,error:t instanceof Error?t:null}},TKn=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=ge.useState(null),[s,a]=ge.useState(null),{mutate:c,error:l}=SKn();ge.useEffect(()=>{e&&c(e,{onSuccess:y=>{a(y.order_quote_id)}})},[e]);const{data:u}=EKn(s||void 0),d=l&&l.error?.message||u?.error?.message;Mtt({errorMessage:d});const h=async y=>{const g=oX("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${y}&shipping_option=${r}`};ge.useEffect(()=>{if(r===null&&u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0){const y=u.shipping_options.reduce((g,x)=>x.cost<g.cost?x:g,u.shipping_options[0]);o(y?.carrier||null)}},[u]);const f=ge.useMemo(()=>u&&Array.isArray(u.shipping_options)&&u.shipping_options.length>0?u.shipping_options.reduce((y,g)=>g.cost<y.cost?g:y,u.shipping_options[0]).cost:0,[u]),m=l&&l.error?.error_code?.includes("no_token")||u?.error?.error_code?.includes("no_token")&&t;return!i||m?he.jsx(AKn,{signIn:t}):he.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[he.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&he.jsx(MKn,{message:"Fetching quotes..."}),(l||u?.error)&&he.jsx(CKn,{message:l&&l.error?.message||u?.error?.message||"Failed to fetch quotes"}),u?.is_completed&&!l&&!u?.error&&Array.isArray(u?.shipping_options)&&u.shipping_options.length>0&&he.jsxs(he.Fragment,{children:[he.jsx("div",{className:"rf-bg-blue-100 rf-text-blue-800 rf-p-3 rf-rounded-md rf-text-center rf-text-sm",children:"This board is eligible for the tscircuit Flat Fee"}),he.jsx(bKn,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:f+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),he.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[he.jsx(B0,{variant:"outline",type:"button",className:"rf-w-1/2 rf-border-red-500 rf-text-red-500 rf-hover:bg-red-50 rf-hover:text-red-600",onClick:n,children:"Cancel"}),he.jsx(B0,{type:"button",className:"rf-w-1/2 rf-bg-blue-600 rf-hover:bg-blue-700",disabled:r===null,onClick:()=>{if(r===null){ap.error("Please select a shipping option.");return}u&&h(u.order_quote_id)},children:"Continue"})]}),he.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},MKn=({message:n})=>he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[he.jsx(n8,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),he.jsx("p",{className:"rf-text-gray-600",children:n})]}),CKn=({message:n})=>he.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),AKn=({signIn:n})=>he.jsxs("div",{className:"rf-max-w-lg rf-mx-auto rf-bg-white rf-rounded-2xl rf-py-8 rf-flex rf-flex-col rf-gap-3",children:[he.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),he.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[he.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),he.jsxs(B0,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(T0e,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),RKn=new aKn,PKn=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>he.jsx(pKn,{client:RKn,children:he.jsx(zH,{open:n,onOpenChange:c=>{c||e()},children:he.jsx(RN,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:he.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&he.jsx(TKn,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),IKn=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=_x(a=>a.circuitJson);return he.jsx(PKn,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},NKn=()=>{const[n,e]=ge.useState(!1),[t,i]=ge.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:IKn}},t2e=n=>{const e=IH(ae=>ae.lastRunEvalVersion),[t,i]=ge.useState(null),[r,o]=ge.useState(!1),[s,a]=ge.useState(!0),[c,l]=ge.useState(!1),[u,d]=ge.useState(null),[h,f]=ge.useState(null),[m,y]=ge.useState(!1),[g,x]=ge.useState(null),[v,w]=ge.useState(null),[T,k]=ge.useState(!1),[R,N]=ge.useState(!1),M=NKn(),I=_x(ae=>ae.pushEvent),C=_x(ae=>ae.recentEvents),$=ge.useMemo(()=>Date.now(),[]);Swn(ae=>{if(!(new Date(ae.created_at).valueOf()<$+500)){if(ae.event_type==="FILE_UPDATED"){o(!0);return}if(ae.event_type==="SNIPPET_SAVED"){o(!1),a(!1),x("Snippet saved successfully."),k(!1);return}ae.event_type==="REQUEST_EXPORT"&&(N(!0),x("Export processing..."),k(!1)),ae.event_type==="EXPORT_CREATED"&&(x(`Export created: ${ae.exportFilePath}`),k(!1),N(!1))}}),ge.useEffect(()=>{if(!c||u===null)return;const ae=C.filter(re=>new Date(re.created_at).valueOf()>u),me=ae.find(re=>re.event_type==="FAILED_TO_SAVE_SNIPPET"),ne=ae.find(re=>re.event_type==="SNIPPET_SAVED");me&&(l(!1),d(null),w(me.message??"Failed to save snippet. See console for error."),console.error(me.message),k(!0),me.error_code==="SNIPPET_UNSET"&&me.available_snippet_names&&(f(me.available_snippet_names),y(!0))),ne&&(l(!1),d(null),x("Snippet saved successfully."),k(!1))},[C,c]);const P=async()=>{l(!0),d(Date.now()),x(null),k(!1),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:t})},q=_x(ae=>ae.circuitJson)??n.circuitJson,[X,W]=ge.useState(!1),[K,ie]=ge.useState(!1);return he.jsxs(he.Fragment,{children:[he.jsxs(ume,{children:[he.jsx(dme,{asChild:!0,children:he.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),he.jsxs(_j,{children:[!n.isWebEmbedded&&he.jsxs(he.Fragment,{children:[he.jsx(kb,{className:"rf-text-xs",onSelect:P,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&he.jsx(kb,{className:"rf-text-xs",onSelect:()=>{M.open()},children:"Order"}),he.jsx(kb,{className:"rf-text-xs",onSelect:()=>W(!0),disabled:c,children:"Import"}),he.jsx(kb,{className:"rf-text-xs",onSelect:()=>{if(!z9e()){ap.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),he.jsxs(pme,{children:[he.jsx(fj,{className:"rf-text-xs",disabled:R,children:R?"Exporting...":"Export"}),he.jsx(hme,{children:he.jsx(mj,{children:nZn.map((ae,me)=>he.jsx(kb,{onSelect:()=>{if(!q){ap.error("No Circuit JSON to export");return}iZn({exportName:ae.name,circuitJson:q,projectName:t??"Untitled"})},disabled:R,children:he.jsx("span",{className:"rf-text-xs",children:ae.name})},me))})})]}),!n.isWebEmbedded&&he.jsxs(pme,{children:[he.jsx(fj,{className:"rf-text-xs",children:"Advanced"}),he.jsx(hme,{children:he.jsxs(mj,{children:[he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",children:he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[he.jsx(Ent,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:ae=>{n.onChangeShouldLoadLatestEval?.(ae===!0)}}),he.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",children:he.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:he.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),he.jsx(kb,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:he.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:he.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),he.jsx(Ywn,{open:T,onOpenChange:k,children:he.jsxs(dnt,{children:[he.jsxs(hnt,{children:[he.jsx(fnt,{children:"Error Saving Snippet"}),he.jsx(mnt,{children:v})]}),he.jsx(pnt,{children:he.jsx(_nt,{onClick:()=>k(!1),children:"Dismiss"})})]})}),he.jsx(wwn,{snippetNames:h??[],onSelect:async ae=>{l(!0),d(Date.now()),i(ae),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:ae}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),he.jsx(vXn,{isOpen:X,onClose:()=>W(!1)}),he.jsx(jZn,{isOpen:K,onClose:()=>ie(!1),packageName:t}),he.jsx(gXn,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),he.jsx(M.OrderDialog,{isOpen:M.isOpen,onClose:M.close,stage:M.stage,setStage:M.setStage})]})},kKn=["assembly","bom","circuit_json","errors","render_log"],OKn=({code:n,fsMap:e,onRunClicked:t=void 0,errorMessage:i,errorStack:r,circuitJson:o,autoroutingGraphics:s,showRightHeaderContent:a=!0,showCodeTab:c=!1,codeTabContent:l,showJsonTab:u=!0,showRenderLogTab:d=!0,onActiveTabChange:h,renderLog:f,showImportAndFormatButtons:m=!0,className:y,headerClassName:g,leftHeaderContent:x,readOnly:v,isStreaming:w,autoroutingLog:T,onReportAutoroutingLog:k,isRunningCode:R,hasCodeChangedSinceLastRun:N,onEditEvent:M,editEvents:I,defaultActiveTab:C,defaultTab:$,availableTabs:P,autoRotate3dViewerDisabled:j,showSchematicDebugGrid:q=!1,showToggleFullScreen:X=!0,defaultToFullScreen:W=!1,activeEffectName:K,allowSelectingVersion:ie=!0,showFileMenu:ae=!1,isWebEmbedded:me=!1})=>{Ett();const{versions:ne,latestVersion:re,lastRunEvalVersion:le,search:xe,setSearch:Te,selectVersion:Ie}=xwn(ie),Ue=ge.useMemo(()=>o?o.filter(Be=>Be&&"error_type"in Be||Be.type.includes("error")):null,[o]),Ae=ge.useMemo(()=>o?o.filter(Be=>Be&&"warning_type"in Be||Be.type.includes("warning")):null,[o]);Mtt({errorMessage:i,errorStack:r,circuitJsonErrors:Ue});const[oe,be]=ge.useState(C??$??P?.[0]??"pcb"),[ye,$e]=ge.useState(null),[Ve,Ze]=ge.useState(W);ywn(Ve);const we=ge.useCallback(Be=>{be(Be),h?.(Be)},[h]),nt=()=>{Ze(!Ve)};ge.useEffect(()=>{i&&(oe!=="errors"&&$e(oe),we("errors"))},[i]),ge.useEffect(()=>{(oe==="code"||oe==="errors")&&o&&!i&&we(ye??C??$??P?.[0]??"pcb")},[o]);const je=ge.useCallback(Be=>{window.TSCIRCUIT_3D_OBJECT_REF=Be===null?void 0:Be},[]);return he.jsx("div",{className:qo("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:he.jsx("div",{className:qo("rf-md:sticky rf-md:top-2 rf-h-full",Ve&&"rf-fixed rf-top-0 rf-left-0 rf-w-full rf-h-full rf-bg-white rf-overflow-hidden"),children:he.jsxs(Ere,{value:oe,onValueChange:we,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[he.jsxs("div",{className:qo("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,ae&&!x&&he.jsx(t2e,{isWebEmbedded:me,circuitJson:o}),(x||ae)&&he.jsx("div",{className:"rf-flex-grow"}),!x&&!ae&&R&&he.jsx(n8,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!ae&&he.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&!i&&he.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[K?he.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:K,children:K}):f.lastRenderEvent&&he.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:f.lastRenderEvent?.phase??"",children:f.lastRenderEvent?.phase??""}),he.jsx("div",{className:"rf-w-4 rf-h-4 rf-bg-blue-500 rf-opacity-50 rf-rounded-full rf-text-white rf-flex-shrink-0",children:he.jsx(n8,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),he.jsxs("div",{className:"rf-text-xs rf-font-bold rf-text-gray-700 rf-tabular-nums rf-flex-shrink-0",children:[((f.progress??0)*100).toFixed(1),"%"]})]}),a&&he.jsxs(HB,{children:[c&&he.jsx(d3,{value:"code",children:"Code"}),!P||P.includes("pcb")?he.jsxs(d3,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&he.jsx("span",{className:qo("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"PCB"]}):null,!P||P.includes("schematic")?he.jsxs(d3,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&he.jsx("span",{className:qo("rf-inline-flex rf-items-center rf-justify-center rf-w-2 rf-h-2 rf-mr-1 rf-text-xs rf-font-bold rf-text-white rf-rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"Schematic"]}):null,!P||P.includes("cad")?he.jsxs(d3,{value:"cad",children:[o&&he.jsx("span",{className:qo("inline-flex items-center justify-center w-2 h-2 mr-1 text-xs font-bold text-white rounded-full",N?"rf-bg-gray-500":"rf-bg-blue-500")}),"3D"]}):null,!["pcb","cad","schematic"].includes(oe)&&he.jsx(d3,{value:oe,children:XIe(oe)}),he.jsxs(ume,{children:[he.jsx(dme,{asChild:!0,children:he.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[he.jsx(vpn,{className:"rf-w-4 rf-h-4"}),(Ue&&Ue.length>0||i)&&he.jsx("span",{className:"rf-inline-flex rf-absolute rf-top-[6px] rf-right-[4px] rf-items-center rf-justify-center rf-w-1 rf-h-1 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full"})]})}),he.jsxs(_j,{className:"rf-*:text-xs rf-z-[101]",children:[kKn.filter(Be=>!P||P.includes(Be)).map(Be=>he.jsxs(kb,{onSelect:()=>we(Be),children:[oe!==Be&&he.jsx(BYe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),oe===Be&&he.jsx($$,{className:"rf-w-3 rf-h-3"}),he.jsx("div",{className:"rf-pr-2",children:XIe(Be)}),Be==="errors"&&(Ue&&Ue.length>0||i)&&he.jsx("span",{className:"rf-inline-flex rf-items-center rf-justify-center rf-w-3 rf-h-3 rf-ml-2 rf-text-[8px] rf-font-bold rf-text-white rf-bg-red-500 rf-rounded-full",children:i?1:Ue?.length})]},Be)),he.jsx(kb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",bwn.split(".").map((Be,Ge)=>Ge===2?parseInt(Be)+1:Be).join(".")]})}),ie?he.jsxs(pme,{onOpenChange:Be=>!Be&&Te(""),children:[he.jsx(fj,{className:"rf-text-xs rf-opacity-60",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",le??re??"latest"]})}),he.jsx(hme,{children:he.jsxs(mj,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[he.jsx("div",{className:"rf-p-1",children:he.jsx(Qme,{value:xe,onChange:Be=>Te(Be.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),he.jsx(VWe,{}),he.jsx(kb,{onSelect:()=>Ie(null),children:re?`${re} (latest)`:"latest"}),ne.map(Be=>he.jsx(kb,{onSelect:()=>Ie(Be),children:Be},Be))]})})]}):le&&he.jsx(kb,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:he.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",le]})})]})]})]}),X&&he.jsx(B0,{onClick:nt,variant:"ghost",children:Ve?he.jsx(Spn,{size:16}):he.jsx(xpn,{size:16})})]}),c&&he.jsx(c2,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:he.jsx("div",{className:"rf-h-full",children:l})}),(!P||P.includes("pcb"))&&he.jsx(c2,{value:"pcb",children:he.jsx("div",{className:qo("rf-overflow-hidden",Ve?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(mwn,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:qo("rf-h-full rf-w-full",Ve?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Be=>{if(M)for(const Ge of Be)M(Ge)}}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("assembly"))&&he.jsx(c2,{value:"assembly",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallback:he.jsx("div",{children:"Error loading Assembly"}),children:o?he.jsx(Mxn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("schematic"))&&he.jsx(c2,{value:"schematic",children:he.jsx("div",{className:qo("rf-overflow-auto rf-bg-white",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(Sxn,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Be=>{M?.(Be)},debugGrid:q}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("cad"))&&he.jsx(c2,{value:"cad",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{FallbackComponent:spn,children:o?he.jsx(rpn,{ref:je,circuitJson:o,autoRotateDisabled:j}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("bom"))&&he.jsx(c2,{value:"bom",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallbackRender:({error:Be})=>he.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:he.jsxs("div",{className:"rf-p-4",children:[he.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),he.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Be?.message||"An unknown error occurred"})]})}),children:o?he.jsx(Ixn,{circuitJson:o}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("circuit_json"))&&he.jsx(c2,{value:"circuit_json",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:he.jsx(BC,{fallback:he.jsx("div",{children:"Error loading JSON viewer"}),children:o?he.jsx(Rxn,{elements:o}):he.jsx(v8,{onRunClicked:t})})})}),(!P||P.includes("errors"))&&he.jsx(c2,{value:"errors",children:he.jsx("div",{className:qo("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||Ue&&Ue.length>0||o?he.jsx(u_n,{code:n,fsMap:e,circuitJsonErrors:Ue,circuitJsonWarnings:Ae,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:le,autoroutingLog:T,onReportAutoroutingLog:k}):he.jsx(v8,{onRunClicked:t})})}),d&&(!P||P.includes("render_log"))&&he.jsx(c2,{value:"render_log",children:he.jsx(vwn,{renderLog:f})})]})})})};/**
|
|
6711
6711
|
* @license
|
|
6712
6712
|
* Copyright 2019 Google LLC
|
|
6713
6713
|
* SPDX-License-Identifier: Apache-2.0
|