@tscircuit/runframe 0.0.893 → 0.0.894

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.
@@ -5604,7 +5604,7 @@ $1`).replace(/>(\s*)(?=<!--\s*\/)/g,"> ")}}}),mQe={};fxn(mQe,{all_layers:()=>v_e
5604
5604
  * Copyright (c) 2013-2015, 2017, Jon Schlinkert.
5605
5605
  * Released under the MIT License.
5606
5606
  *)
5607
- */const B5n=({containerClassName:n,...e})=>{const t=Te.useRef(null),[i,r]=Te.useState(620);return Te.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)}},[]),_e.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:_e.jsx(z5n,{...e,height:i})})},F5n='*,: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}',U5n=()=>{Te.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=F5n,document.head.appendChild(e)},[])},$5n=n=>{Te.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},zet=n=>`hsl(${c2.indexOf(n)*137.5%360}, 70%, 50%)`,j5n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return _e.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[_e.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:c2.map(t=>{const i=n[t]||0,r=i/e*100;return _e.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:zet(t)},children:_e.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)})}),_e.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},H5n=({renderLog:n})=>{const[e,t]=Te.useState("chronological");if(!n)return _e.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)=>c2.indexOf(o[0])-c2.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return _e.jsxs("div",{className:"rf-bg-white",children:[_e.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[_e.jsx("div",{children:"Render Logs"}),_e.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[_e.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),_e.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:[_e.jsx("option",{value:"chronological",children:"Phase Order"}),_e.jsx("option",{value:"longest",children:"Duration"})]})]})]}),_e.jsx(j5n,{phaseTimings:n.phaseTimings}),_e.jsxs("table",{className:"rf-w-full rf-text-xs",children:[_e.jsx("thead",{children:_e.jsxs("tr",{children:[_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),_e.jsx("tbody",{children:i.map(([o,s])=>_e.jsxs("tr",{children:[_e.jsx("td",{className:"rf-p-2",children:c2.indexOf(o)}),_e.jsx("td",{className:"rf-p-2",children:o}),_e.jsx("td",{className:"rf-p-2",children:_e.jsx("div",{className:"rf-w-8",children:_e.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:zet(o),width:`${s/r*100}%`}})})}),_e.jsx("td",{className:"rf-p-2",children:_e.jsxs("div",{className:"rf-flex w-full",children:[_e.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),_e.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},Bet=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{Te.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{VO.captureException(i)}catch{}}},[n,e]),Te.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{VO.captureException(r,{error_type:i.type})}catch{}}},[t])},V5n="0.0.892";function G5n(n,e){const[t,i]=Te.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 Te.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const T_e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},M_e=new Map,lH=n=>{const e=M_e.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},q5n=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=M_e.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return M_e.set(t.name,r),{type:"tracked",store:n,...r}},Fet=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(T_e?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(T_e?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=q5n(a,l,c);let h=!0;r.setState=(y,g,x)=>{const b=t(y,g);if(!h)return b;const w=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u?.send(w,i()),b):(u?.send({...w,type:`${a}/${w.type}`},{...lH(c.name),[a]:r.getState()}),b)};const f=(...y)=>{const g=h;h=!1,t(...y),h=g},m=n(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([y,g])=>[y,y===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const g=r.dispatch;r.dispatch=(...x)=>{(T_e?"production":void 0)!=="production"&&x[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),g(...x)}}return u.subscribe(y=>{var g;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return C_e(y.payload,x=>{if(x.type==="__setState"){if(a===void 0){f(x.state);return}Object.keys(x.state).length!==1&&console.error(`
5607
+ */const B5n=({containerClassName:n,...e})=>{const t=Te.useRef(null),[i,r]=Te.useState(620);return Te.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)}},[]),_e.jsx("div",{ref:t,className:n||"rf-w-full rf-h-full",children:_e.jsx(z5n,{...e,height:i})})},F5n='*,: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}',U5n=()=>{Te.useEffect(()=>{if(document.querySelector('style[data-styles="tscircuit-runframe"]'))return;const e=document.createElement("style");e.setAttribute("data-styles","tscircuit-runframe"),e.textContent=F5n,document.head.appendChild(e)},[])},$5n=n=>{Te.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n])},zet=n=>`hsl(${c2.indexOf(n)*137.5%360}, 70%, 50%)`,j5n=({phaseTimings:n})=>{if(!n)return null;const e=Object.values(n).reduce((t,i)=>t+i,0);return _e.jsxs("div",{className:"rf-space-y-2 rf-w-full rf-px-4",children:[_e.jsx("div",{className:"rf-relative rf-h-8 rf-flex rf-rounded-sm",children:c2.map(t=>{const i=n[t]||0,r=i/e*100;return _e.jsx("div",{className:"rf-group/bar rf-relative rf-overflow-visible",style:{width:`${r}%`,backgroundColor:zet(t)},children:_e.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)})}),_e.jsxs("div",{className:"rf-text-xs rf-text-gray-500",children:["Total: ",e.toFixed(2),"ms"]})]})},H5n=({renderLog:n})=>{const[e,t]=Te.useState("chronological");if(!n)return _e.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)=>c2.indexOf(o[0])-c2.indexOf(s[0])):i.sort((o,s)=>s[1]-o[1]);const r=i.reduce((o,[s,a])=>o+a,0);return _e.jsxs("div",{className:"rf-bg-white",children:[_e.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center",children:[_e.jsx("div",{children:"Render Logs"}),_e.jsxs("div",{className:"rf-mb-4 rf-pr-2 rf-flex rf-text-xs rf-items-center",children:[_e.jsx("div",{className:"rf-mr-2",children:"Sort by:"}),_e.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:[_e.jsx("option",{value:"chronological",children:"Phase Order"}),_e.jsx("option",{value:"longest",children:"Duration"})]})]})]}),_e.jsx(j5n,{phaseTimings:n.phaseTimings}),_e.jsxs("table",{className:"rf-w-full rf-text-xs",children:[_e.jsx("thead",{children:_e.jsxs("tr",{children:[_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase Order"}),_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Phase"}),_e.jsx("th",{className:"rf-text-left rf-p-2",children:"Duration (ms)"})]})}),_e.jsx("tbody",{children:i.map(([o,s])=>_e.jsxs("tr",{children:[_e.jsx("td",{className:"rf-p-2",children:c2.indexOf(o)}),_e.jsx("td",{className:"rf-p-2",children:o}),_e.jsx("td",{className:"rf-p-2",children:_e.jsx("div",{className:"rf-w-8",children:_e.jsx("div",{className:"rf-h-2 rf-rounded-sm",style:{backgroundColor:zet(o),width:`${s/r*100}%`}})})}),_e.jsx("td",{className:"rf-p-2",children:_e.jsxs("div",{className:"rf-flex w-full",children:[_e.jsxs("span",{className:"rf-flex-grow",children:[s,"ms"]}),_e.jsxs("span",{className:"rf-text-gray-500 rf-pr-2",children:[(s/r*100).toFixed(1),"%"]})]})})]},o))})]})]})},Bet=({errorMessage:n,errorStack:e,circuitJsonErrors:t})=>{Te.useEffect(()=>{if(n){const i=new Error(n);e&&(i.stack=e);try{VO.captureException(i)}catch{}}},[n,e]),Te.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{VO.captureException(r,{error_type:i.type})}catch{}}},[t])},V5n="0.0.893";function G5n(n,e){const[t,i]=Te.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 Te.useEffect(()=>{try{window.localStorage.setItem(n,JSON.stringify(t))}catch(r){console.error("Error writing to localStorage:",r)}},[n,t]),[t,i]}const T_e={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},M_e=new Map,lH=n=>{const e=M_e.get(n);return e?Object.fromEntries(Object.entries(e.stores).map(([t,i])=>[t,i.getState()])):{}},q5n=(n,e,t)=>{if(n===void 0)return{type:"untracked",connection:e.connect(t)};const i=M_e.get(t.name);if(i)return{type:"tracked",store:n,...i};const r={connection:e.connect(t),stores:{}};return M_e.set(t.name,r),{type:"tracked",store:n,...r}},Fet=(n,e={})=>(t,i,r)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let l;try{l=(o??(T_e?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return(T_e?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),n(t,i,r);const{connection:u,...d}=q5n(a,l,c);let h=!0;r.setState=(y,g,x)=>{const b=t(y,g);if(!h)return b;const w=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(u?.send(w,i()),b):(u?.send({...w,type:`${a}/${w.type}`},{...lH(c.name),[a]:r.getState()}),b)};const f=(...y)=>{const g=h;h=!1,t(...y),h=g},m=n(r.setState,i,r);if(d.type==="untracked"?u?.init(m):(d.stores[d.store]=r,u?.init(Object.fromEntries(Object.entries(d.stores).map(([y,g])=>[y,y===d.store?m:g.getState()])))),r.dispatchFromDevtools&&typeof r.dispatch=="function"){let y=!1;const g=r.dispatch;r.dispatch=(...x)=>{(T_e?"production":void 0)!=="production"&&x[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),g(...x)}}return u.subscribe(y=>{var g;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return C_e(y.payload,x=>{if(x.type==="__setState"){if(a===void 0){f(x.state);return}Object.keys(x.state).length!==1&&console.error(`
5608
5608
  [zustand devtools middleware] Unsupported __setState action format.
5609
5609
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
5610
5610
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
@@ -6697,4 +6697,4 @@ ${n}</tr>
6697
6697
  `}tablecell(n){const e=this.parser.parseInline(n.tokens),t=n.header?"th":"td";return(n.align?`<${t} align="${n.align}">`:`<${t}>`)+e+`</${t}>
6698
6698
  `}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>${X3(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=Oht(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return e&&(o+=' title="'+X3(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=Oht(n);if(r===null)return X3(t);n=r;let o=`<img src="${n}" alt="${t}"`;return e&&(o+=` title="${X3(e)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:X3(n.text)}},g9e=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""}},gS=class Q9e{options;renderer;textRenderer;constructor(e){this.options=e||B8,this.options.renderer=this.options.renderer||new jY,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new g9e}static parse(e,t){return new Q9e(t).parse(e)}static parseInline(e,t){return new Q9e(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+=`
6699
6699
  `+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}},HY=class{options;block;constructor(n){this.options=n||B8}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?yS.lex:yS.lexInline}provideParser(){return this.block?gS.parse:gS.parseInline}},mWn=class{defaults=l9e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=gS;Renderer=jY;TextRenderer=g9e;Lexer=yS;Tokenizer=$Y;Hooks=HY;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 jY(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 $Y(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 HY;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];HY.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 yS.lex(n,e??this.defaults)}parser(n,e){return gS.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?yS.lex:yS.lexInline,c=o.hooks?o.hooks.provideParser():n?gS.parse:gS.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+=`
6700
- Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+X3(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},F8=new mWn;function Jd(n,e){return F8.parse(n,e)}Jd.options=Jd.setOptions=function(n){return F8.setOptions(n),Jd.defaults=F8.defaults,xht(Jd.defaults),Jd},Jd.getDefaults=l9e,Jd.defaults=B8,Jd.use=function(...n){return F8.use(...n),Jd.defaults=F8.defaults,xht(Jd.defaults),Jd},Jd.walkTokens=function(n,e){return F8.walkTokens(n,e)},Jd.parseInline=F8.parseInline,Jd.Parser=gS,Jd.parser=gS.parse,Jd.Renderer=jY,Jd.TextRenderer=g9e,Jd.Lexer=yS,Jd.lexer=yS.lex,Jd.Tokenizer=$Y,Jd.Hooks=HY,Jd.parse=Jd,Jd.options,Jd.setOptions,Jd.use,Jd.walkTokens,Jd.parseInline,gS.parse,yS.lex;const _Wn=({review:n,onBack:e})=>{const[t,i]=Te.useState(n.ai_review_text??null),r=KA(),o=n.ai_review_id;Te.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=Te.useMemo(()=>Jd.parse(n.ai_review_text||""),[n.ai_review_text]);return _e.jsxs(_e.Fragment,{children:[_e.jsxs(vN,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[_e.jsx(r_,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),_e.jsx(bN,{children:"AI Review"})]}),t?_e.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):_e.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:_e.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[_e.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:[_e.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),_e.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),_e.jsx("span",{children:"Loading..."})]})})]})},yWn=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=Te.useState("list_reviews"),[o,s]=Te.useState(null),a=c=>{s(c),r("view_review")};return _e.jsx(pH,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:_e.jsxs(gN,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&_e.jsx(kXn,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&_e.jsx(_Wn,{review:o,onBack:()=>r("list_reviews")})]})})};function v9e(n,e){return v9e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},v9e(n,e)}function QA(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,v9e(n,e)}var JA=(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 Xc(){return Xc=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},Xc.apply(null,arguments)}var VY=typeof window>"u";function W1(){}function gWn(n,e){return typeof n=="function"?n(e):n}function b9e(n){return typeof n=="number"&&n>=0&&n!==1/0}function GY(n){return Array.isArray(n)?n:[n]}function zht(n,e){return Math.max(n+(e||0)-Date.now(),0)}function qY(n,e,t){return gk(n)?typeof e=="function"?Xc({},t,{queryKey:n,queryFn:e}):Xc({},e,{queryKey:n}):n}function vWn(n,e,t){return gk(n)?Xc({},e,{mutationKey:n}):typeof n=="function"?Xc({},e,{mutationFn:n}):Xc({},n)}function xE(n,e,t){return gk(n)?[Xc({},e,{queryKey:n}),t]:[n||{},e]}function bWn(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 Bht(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(gk(a)){if(i){if(e.queryHash!==x9e(a,e.options))return!1}else if(!YY(e.queryKey,a))return!1}var l=bWn(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 Fht(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(gk(o)){if(!e.options.mutationKey)return!1;if(t){if(U8(e.options.mutationKey)!==U8(o))return!1}else if(!YY(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function x9e(n,e){var t=e?.queryKeyHashFn||U8;return t(n)}function U8(n){var e=GY(n);return xWn(e)}function xWn(n){return JSON.stringify(n,function(e,t){return w9e(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function YY(n,e){return Uht(GY(n),GY(e))}function Uht(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!Uht(n[t],e[t])}):!1}function XY(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||w9e(n)&&w9e(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]=XY(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function wWn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function w9e(n){if(!$ht(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!$ht(t)||!t.hasOwnProperty("isPrototypeOf"))}function $ht(n){return Object.prototype.toString.call(n)==="[object Object]"}function gk(n){return typeof n=="string"||Array.isArray(n)}function SWn(n){return new Promise(function(e){setTimeout(e,n)})}function jht(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Hht(){if(typeof AbortController=="function")return new AbortController}var EWn=(function(n){QA(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!VY&&((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})(JA),vk=new EWn,TWn=(function(n){QA(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!VY&&((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})(JA),WY=new TWn;function MWn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function ZY(n){return typeof n?.cancel=="function"}var Vht=function(e){this.revert=e?.revert,this.silent=e?.silent};function KY(n){return n instanceof Vht}var Ght=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 Vht(y)),t.abort==null||t.abort(),ZY(f)))try{f.cancel()}catch{}},t.isTransportCancelable=ZY(f),Promise.resolve(f).then(c).catch(function(m){var y,g;if(!t.isResolved){var x=(y=e.retry)!=null?y:3,b=(g=e.retryDelay)!=null?g:MWn,w=typeof b=="function"?b(t.failureCount,m):b,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),SWn(w).then(function(){if(!vk.isFocused()||!WY.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},CWn=(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):jht(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&&jht(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})(),e0=new CWn,qht=console;function QY(){return qht}function AWn(n){qht=n}var RWn=(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=Xc({},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(),b9e(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=gWn(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=XY(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||!zht(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=GY(this.queryKey),h=Hht(),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 Ght({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){KY(w)&&w.silent||o.dispatch({type:"error",error:w}),KY(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),QY().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),e0.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 Xc({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Xc({},i,{isPaused:!0});case"continue":return Xc({},i,{isPaused:!1});case"fetch":return Xc({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Xc({},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 KY(a)&&a.revert&&this.revertState?Xc({},this.revertState):Xc({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Xc({},i,{isInvalidated:!0});case"setState":return Xc({},i,r.state);default:return i}},n})(),PWn=(function(n){QA(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:x9e(c,o),u=this.get(l);return u||(u=new RWn({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;e0.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=xE(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return Bht(a,c)})},t.findAll=function(r,o){var s=xE(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return Bht(a,c)}):this.queries},t.notify=function(r){var o=this;e0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;e0.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;e0.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(JA),IWn=(function(){function n(t){this.options=Xc({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Yht(),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),QY().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 Ght({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=NWn(this.state,i),e0.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function Yht(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function NWn(n,e){switch(e.type){case"failed":return Xc({},n,{failureCount:n.failureCount+1});case"pause":return Xc({},n,{isPaused:!0});case"continue":return Xc({},n,{isPaused:!1});case"loading":return Xc({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Xc({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Xc({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Xc({},n,e.state);default:return n}}var kWn=(function(n){QA(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 IWn({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;e0.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 Fht(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Fht(r,o)})},t.notify=function(r){var o=this;e0.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 e0.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(W1)})},Promise.resolve())})},e})(JA);function OWn(){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=Hht(),g=y?.signal,x=m,b=!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(b)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},se=w(ie),fe=Promise.resolve(se).then(function(ce){return T(q,W,ce,K)});if(ZY(se)){var ne=fe;ne.cancel=se.cancel}return fe},R;if(!f.length)R=k([]);else if(d){var N=typeof u<"u",M=N?u:Xht(e.options,f);R=k(f,N,M)}else if(h){var I=typeof u<"u",C=I?u:DWn(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(se){var fe=c&&f[ie]?c(f[ie],ie,f):!0;if(fe){var ne=j?m[ie]:Xht(e.options,se);return k(se,j,ne)}return Promise.resolve(T(se,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(){b=!0,y?.abort(),ZY(R)&&R.cancel()},$}}}}function Xht(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function DWn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var LWn=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new PWn,this.mutationCache=t.mutationCache||new kWn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=vk.subscribe(function(){vk.isFocused()&&WY.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=WY.subscribe(function(){vk.isFocused()&&WY.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=xE(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(Xc({},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=qY(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return e0.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=xE(i,r),s=o[0],a=this.queryCache;e0.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=xE(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=Xc({},c,{active:!0});return e0.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=xE(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=e0.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=xE(i,r,o),d=u[0],h=u[1],f=Xc({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return e0.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=xE(i,r,o),c=a[0],l=a[1],u=e0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Xc({},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=qY(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=qY(i,r,o);return s.behavior=OWn(),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=e0.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 U8(i)===U8(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 YY(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return U8(i)===U8(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 YY(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=Xc({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=x9e(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:Xc({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),zWn=(function(n){QA(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),Wht(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return S9e(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return S9e(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&&Zht(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(Xc({},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(),!(VY||this.currentResult.isStale||!b9e(this.options.staleTime))){var o=zht(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,!(VY||this.options.enabled===!1||!b9e(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||vk.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,b=m.isFetching,w=m.status,T=!1,k=!1,R;if(o.optimisticResults){var N=this.hasListeners(),M=!N&&Wht(r,o),I=N&&Zht(r,s,o,a);(M||I)&&(b=!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=XY(c?.data,R)),this.selectResult=R,this.selectError=null}catch(P){QY().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=XY(c?.data,C)),this.selectError=null}catch(P){QY().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:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:T,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:E9e(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,!wWn(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(Xc({},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"&&!KY(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;e0.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})(JA);function BWn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Wht(n,e){return BWn(n,e)||n.state.dataUpdatedAt>0&&S9e(n,e,e.refetchOnMount)}function S9e(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&E9e(n,e)}return!1}function Zht(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&E9e(n,t)}function E9e(n,e){return n.isStaleByTime(e.staleTime)}var FWn=(function(n){QA(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,Xc({},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:Yht(),o=Xc({},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;e0.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})(JA),UWn=VX.unstable_batchedUpdates;e0.setBatchNotifyFunction(UWn);var $Wn=console;AWn($Wn);var Kht=bo.createContext(void 0),Qht=bo.createContext(!1);function Jht(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Kht),window.ReactQueryClientContext):Kht}var T9e=function(){var e=bo.useContext(Jht(bo.useContext(Qht)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},jWn=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=Jht(r);return bo.createElement(Qht.Provider,{value:r},bo.createElement(s.Provider,{value:t},o))};function HWn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var VWn=bo.createContext(HWn()),GWn=function(){return bo.useContext(VWn)};function ept(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function qWn(n,e,t){var i=bo.useRef(!1),r=bo.useState(0),o=r[1],s=vWn(n,e),a=T9e(),c=bo.useRef();c.current?c.current.setOptions(s):c.current=new FWn(a,s);var l=c.current.getCurrentResult();bo.useEffect(function(){i.current=!0;var d=c.current.subscribe(e0.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&&ept(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Xc({},l,{mutate:u,mutateAsync:l.mutate})}function YWn(n,e){var t=bo.useRef(!1),i=bo.useState(0),r=i[1],o=T9e(),s=GWn(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=e0.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=e0.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=e0.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(e0.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&&ept(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function XWn(n,e,t){var i=qY(n,e,t);return YWn(i,zWn)}function WWn({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return _e.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[_e.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ndn,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),_e.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[_e.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),_e.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),_e.jsx("hr",{className:"rf-border-gray-200"}),_e.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[_e.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),_e.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>_e.jsxs("button",{type:"button",className:aa("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:[_e.jsx(Odn,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),_e.jsxs("div",{className:"rf-text-left rf-flex-1",children:[_e.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),_e.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[_e.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),_e.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&_e.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:_e.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[_e.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[_e.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),_e.jsx("div",{className:"rf-flex rf-items-center",children:_e.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const ZWn=async n=>{try{const{order_quote_id:e}=await LY.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Xxe){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},KWn=async n=>{const{order_quote:e}=await LY.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},QWn=()=>{const n=T9e();return qWn({mutationKey:["createOrderQuote"],mutationFn:e=>ZWn(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},JWn=n=>{const{data:e,error:t,status:i}=XWn(["getOrderQuote",n],()=>KWn(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}},eZn=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=Te.useState(null),[s,a]=Te.useState(null),{mutate:c,error:l}=QWn();Te.useEffect(()=>{e&&c(e,{onSuccess:y=>{a(y.order_quote_id)}})},[e]);const{data:u}=JWn(s||void 0),d=l&&l.error?.message||u?.error?.message;Bet({errorMessage:d});const h=async y=>{const g=DY("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${y}&shipping_option=${r}`};Te.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=Te.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?_e.jsx(iZn,{signIn:t}):_e.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:[_e.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&_e.jsx(tZn,{message:"Fetching quotes..."}),(l||u?.error)&&_e.jsx(nZn,{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&&_e.jsxs(_e.Fragment,{children:[_e.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"}),_e.jsx(WWn,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:f+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),_e.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[_e.jsx(r_,{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"}),_e.jsx(r_,{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"})]}),_e.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},tZn=({message:n})=>_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[_e.jsx(IC,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),_e.jsx("p",{className:"rf-text-gray-600",children:n})]}),nZn=({message:n})=>_e.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),iZn=({signIn:n})=>_e.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:[_e.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[_e.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),_e.jsxs(r_,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ufe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),rZn=new LWn,oZn=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>_e.jsx(jWn,{client:rZn,children:_e.jsx(pH,{open:n,onOpenChange:c=>{c||e()},children:_e.jsx(gN,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:_e.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&_e.jsx(eZn,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),sZn=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=Q4(a=>a.circuitJson);return _e.jsx(oZn,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},aZn=()=>{const[n,e]=Te.useState(!1),[t,i]=Te.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:sZn}},cZn=n=>{const e=A_e(se=>se.lastRunEvalVersion),[t,i]=Te.useState(null),[r,o]=Te.useState(!1),[s,a]=Te.useState(!0),[c,l]=Te.useState(!1),[u,d]=Te.useState(null),[h,f]=Te.useState(null),[m,y]=Te.useState(!1),[g,x]=Te.useState(null),[b,w]=Te.useState(null),[T,k]=Te.useState(!1),[R,N]=Te.useState(!1),M=aZn(),I=Q4(se=>se.pushEvent),C=Q4(se=>se.recentEvents),$=Te.useMemo(()=>Date.now(),[]);Q5n(se=>{if(!(new Date(se.created_at).valueOf()<$+500)){if(se.event_type==="FILE_UPDATED"){o(!0);return}if(se.event_type==="SNIPPET_SAVED"){o(!1),a(!1),x("Snippet saved successfully."),k(!1);return}se.event_type==="REQUEST_EXPORT"&&(N(!0),x("Export processing..."),k(!1)),se.event_type==="EXPORT_CREATED"&&(x(`Export created: ${se.exportFilePath}`),k(!1),N(!1))}}),Te.useEffect(()=>{if(!c||u===null)return;const se=C.filter(ce=>new Date(ce.created_at).valueOf()>u),fe=se.find(ce=>ce.event_type==="FAILED_TO_SAVE_SNIPPET"),ne=se.find(ce=>ce.event_type==="SNIPPET_SAVED");fe&&(l(!1),d(null),w(fe.message??"Failed to save snippet. See console for error."),console.error(fe.message),k(!0),fe.error_code==="SNIPPET_UNSET"&&fe.available_snippet_names&&(f(fe.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=Q4(se=>se.circuitJson)??n.circuitJson,[X,W]=Te.useState(!1),[K,ie]=Te.useState(!1);return _e.jsxs(_e.Fragment,{children:[_e.jsxs(T0e,{children:[_e.jsx(M0e,{asChild:!0,children:_e.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),_e.jsxs(q$,{children:[!n.isWebEmbedded&&_e.jsxs(_e.Fragment,{children:[_e.jsx(Ib,{className:"rf-text-xs",onSelect:P,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>{M.open()},children:"Order"}),_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>W(!0),disabled:c,children:"Import"}),_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>{if(!c9e()){ap.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),_e.jsxs(A0e,{children:[_e.jsx(V$,{className:"rf-text-xs",disabled:R,children:R?"Exporting...":"Export"}),_e.jsx(C0e,{children:_e.jsx(G$,{children:IXn.map((se,fe)=>_e.jsx(Ib,{onSelect:()=>{if(!q){ap.error("No Circuit JSON to export");return}NXn({exportName:se.name,circuitJson:q,projectName:t??"Untitled"})},disabled:R,children:_e.jsx("span",{className:"rf-text-xs",children:se.name})},fe))})})]}),!n.isWebEmbedded&&_e.jsxs(A0e,{children:[_e.jsx(V$,{className:"rf-text-xs",children:"Advanced"}),_e.jsx(C0e,{children:_e.jsxs(G$,{children:[_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ftt,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:se=>{n.onChangeShouldLoadLatestEval?.(se===!0)}}),_e.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:_e.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),_e.jsx(w3n,{open:T,onOpenChange:k,children:_e.jsxs(Mtt,{children:[_e.jsxs(Ctt,{children:[_e.jsx(Rtt,{children:"Error Saving Snippet"}),_e.jsx(Ptt,{children:b})]}),_e.jsx(Att,{children:_e.jsx(Itt,{onClick:()=>k(!1),children:"Dismiss"})})]})}),_e.jsx(K5n,{snippetNames:h??[],onSelect:async se=>{l(!0),d(Date.now()),i(se),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:se}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),_e.jsx(Xqn,{isOpen:X,onClose:()=>W(!1)}),_e.jsx(yWn,{isOpen:K,onClose:()=>ie(!1),packageName:t}),_e.jsx(Yqn,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),_e.jsx(M.OrderDialog,{isOpen:M.isOpen,onClose:M.close,stage:M.stage,setStage:M.setStage})]})},lZn=["assembly","bom","circuit_json","errors","render_log"],uZn=({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:b,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:se=!1,isWebEmbedded:fe=!1})=>{U5n();const{versions:ne,latestVersion:ce,lastRunEvalVersion:pe,search:we,setSearch:Me,selectVersion:Oe}=Y5n(ie),Ue=Te.useMemo(()=>o?o.filter(Fe=>Fe&&"error_type"in Fe||Fe.type.includes("error")):null,[o]),Ae=Te.useMemo(()=>o?o.filter(Fe=>Fe&&"warning_type"in Fe||Fe.type.includes("warning")):null,[o]);Bet({errorMessage:i,errorStack:r,circuitJsonErrors:Ue});const[oe,ve]=Te.useState(C??$??P?.[0]??"pcb"),[ye,$e]=Te.useState(null),[Ve,Ze]=Te.useState(W);$5n(Ve);const be=Te.useCallback(Fe=>{ve(Fe),h?.(Fe)},[h]),nt=()=>{Ze(!Ve)};Te.useEffect(()=>{i&&(oe!=="errors"&&$e(oe),be("errors"))},[i]),Te.useEffect(()=>{(oe==="code"||oe==="errors")&&o&&!i&&be(ye??C??$??P?.[0]??"pcb")},[o]);const je=Te.useCallback(Fe=>{window.TSCIRCUIT_3D_OBJECT_REF=Fe===null?void 0:Fe},[]);return _e.jsx("div",{className:aa("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:_e.jsx("div",{className:aa("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:_e.jsxs(fZ,{value:oe,onValueChange:be,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[_e.jsxs("div",{className:aa("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,se&&!x&&_e.jsx(cZn,{isWebEmbedded:fe,circuitJson:o}),(x||se)&&_e.jsx("div",{className:"rf-flex-grow"}),!x&&!se&&R&&_e.jsx(IC,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!se&&_e.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&!i&&_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[K?_e.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:K,children:K}):f.lastRenderEvent&&_e.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:f.lastRenderEvent?.phase??"",children:f.lastRenderEvent?.phase??""}),_e.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:_e.jsx(IC,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),_e.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&&_e.jsxs(qO,{children:[c&&_e.jsx(Y5,{value:"code",children:"Code"}),!P||P.includes("pcb")?_e.jsxs(Y5,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&_e.jsx("span",{className:aa("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")?_e.jsxs(Y5,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&_e.jsx("span",{className:aa("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")?_e.jsxs(Y5,{value:"cad",children:[o&&_e.jsx("span",{className:aa("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)&&_e.jsx(Y5,{value:oe,children:Mwe(oe)}),_e.jsxs(T0e,{children:[_e.jsx(M0e,{asChild:!0,children:_e.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[_e.jsx(Cdn,{className:"rf-w-4 rf-h-4"}),(Ue&&Ue.length>0||i)&&_e.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"})]})}),_e.jsxs(q$,{className:"rf-*:text-xs",children:[lZn.filter(Fe=>!P||P.includes(Fe)).map(Fe=>_e.jsxs(Ib,{onSelect:()=>be(Fe),children:[oe!==Fe&&_e.jsx(zqe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),oe===Fe&&_e.jsx($fe,{className:"rf-w-3 rf-h-3"}),_e.jsx("div",{className:"rf-pr-2",children:Mwe(Fe)}),Fe==="errors"&&(Ue&&Ue.length>0||i)&&_e.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})]},Fe)),_e.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",V5n.split(".").map((Fe,Ge)=>Ge===2?parseInt(Fe)+1:Fe).join(".")]})}),ie?_e.jsxs(A0e,{onOpenChange:Fe=>!Fe&&Me(""),children:[_e.jsx(V$,{className:"rf-text-xs rf-opacity-60",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe??ce??"latest"]})}),_e.jsx(C0e,{children:_e.jsxs(G$,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[_e.jsx("div",{className:"rf-p-1",children:_e.jsx(pme,{value:we,onChange:Fe=>Me(Fe.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),_e.jsx(VXe,{}),_e.jsx(Ib,{onSelect:()=>Oe(null),children:ce?`${ce} (latest)`:"latest"}),ne.map(Fe=>_e.jsx(Ib,{onSelect:()=>Oe(Fe),children:Fe},Fe))]})})]}):pe&&_e.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe]})})]})]})]}),X&&_e.jsx(r_,{onClick:nt,variant:"ghost",children:Ve?_e.jsx(Idn,{size:16}):_e.jsx(Rdn,{size:16})})]}),c&&_e.jsx(K9,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:_e.jsx("div",{className:"rf-h-full",children:l})}),(!P||P.includes("pcb"))&&_e.jsx(K9,{value:"pcb",children:_e.jsx("div",{className:aa("rf-overflow-hidden",Ve?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(B5n,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:aa("rf-h-full rf-w-full",Ve?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Fe=>{if(M)for(const Ge of Fe)M(Ge)}}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("assembly"))&&_e.jsx(K9,{value:"assembly",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallback:_e.jsx("div",{children:"Error loading Assembly"}),children:o?_e.jsx(zvn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("schematic"))&&_e.jsx(K9,{value:"schematic",children:_e.jsx("div",{className:aa("rf-overflow-auto rf-bg-white",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(Ovn,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Fe=>{M?.(Fe)},debugGrid:q}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("cad"))&&_e.jsx(K9,{value:"cad",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{FallbackComponent:mdn,children:o?_e.jsx(pdn,{ref:je,circuitJson:o,autoRotateDisabled:j}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("bom"))&&_e.jsx(K9,{value:"bom",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(jvn,{circuitJson:o}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("circuit_json"))&&_e.jsx(K9,{value:"circuit_json",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallback:_e.jsx("div",{children:"Error loading JSON viewer"}),children:o?_e.jsx(Uvn,{elements:o}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("errors"))&&_e.jsx(K9,{value:"errors",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||Ue&&Ue.length>0||o?_e.jsx(x0n,{code:n,fsMap:e,circuitJsonErrors:Ue,circuitJsonWarnings:Ae,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:pe,autoroutingLog:T,onReportAutoroutingLog:k}):_e.jsx(l8,{onRunClicked:t})})}),d&&(!P||P.includes("render_log"))&&_e.jsx(K9,{value:"render_log",children:_e.jsx(H5n,{renderLog:f})})]})})})};sft.createRoot(document.getElementById("root")).render(_e.jsx("div",{style:{height:"100vh"},children:_e.jsx(uZn,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}})}))}));
6700
+ Please report this to https://github.com/markedjs/marked.`,n){const i="<p>An error occurred:</p><pre>"+X3(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},F8=new mWn;function Jd(n,e){return F8.parse(n,e)}Jd.options=Jd.setOptions=function(n){return F8.setOptions(n),Jd.defaults=F8.defaults,xht(Jd.defaults),Jd},Jd.getDefaults=l9e,Jd.defaults=B8,Jd.use=function(...n){return F8.use(...n),Jd.defaults=F8.defaults,xht(Jd.defaults),Jd},Jd.walkTokens=function(n,e){return F8.walkTokens(n,e)},Jd.parseInline=F8.parseInline,Jd.Parser=gS,Jd.parser=gS.parse,Jd.Renderer=jY,Jd.TextRenderer=g9e,Jd.Lexer=yS,Jd.lexer=yS.lex,Jd.Tokenizer=$Y,Jd.Hooks=HY,Jd.parse=Jd,Jd.options,Jd.setOptions,Jd.use,Jd.walkTokens,Jd.parseInline,gS.parse,yS.lex;const _Wn=({review:n,onBack:e})=>{const[t,i]=Te.useState(n.ai_review_text??null),r=KA(),o=n.ai_review_id;Te.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=Te.useMemo(()=>Jd.parse(n.ai_review_text||""),[n.ai_review_text]);return _e.jsxs(_e.Fragment,{children:[_e.jsxs(vN,{className:"rf-flex rf-flex-row rf-items-center rf-justify-between",children:[_e.jsx(r_,{variant:"ghost",size:"sm",onClick:e,children:"Back"}),_e.jsx(bN,{children:"AI Review"})]}),t?_e.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",dangerouslySetInnerHTML:{__html:s}}):_e.jsx("div",{className:"rf-h-64 rf-overflow-y-auto rf-prose rf-max-w-none rf-mt-2",children:_e.jsxs("div",{className:"rf-flex rf-items-center rf-justify-center rf-h-full",children:[_e.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:[_e.jsx("circle",{className:"rf-opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),_e.jsx("path",{className:"rf-opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}),_e.jsx("span",{children:"Loading..."})]})})]})},yWn=({isOpen:n,onClose:e,packageName:t})=>{const[i,r]=Te.useState("list_reviews"),[o,s]=Te.useState(null),a=c=>{s(c),r("view_review")};return _e.jsx(pH,{open:n,onOpenChange:c=>{c||(r("list_reviews"),s(null),e())},children:_e.jsxs(gN,{className:"rf-max-w-2xl",children:[i==="list_reviews"&&_e.jsx(kXn,{packageName:t,onSelectReview:a}),i==="view_review"&&o&&_e.jsx(_Wn,{review:o,onBack:()=>r("list_reviews")})]})})};function v9e(n,e){return v9e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},v9e(n,e)}function QA(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,v9e(n,e)}var JA=(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 Xc(){return Xc=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},Xc.apply(null,arguments)}var VY=typeof window>"u";function W1(){}function gWn(n,e){return typeof n=="function"?n(e):n}function b9e(n){return typeof n=="number"&&n>=0&&n!==1/0}function GY(n){return Array.isArray(n)?n:[n]}function zht(n,e){return Math.max(n+(e||0)-Date.now(),0)}function qY(n,e,t){return gk(n)?typeof e=="function"?Xc({},t,{queryKey:n,queryFn:e}):Xc({},e,{queryKey:n}):n}function vWn(n,e,t){return gk(n)?Xc({},e,{mutationKey:n}):typeof n=="function"?Xc({},e,{mutationFn:n}):Xc({},n)}function xE(n,e,t){return gk(n)?[Xc({},e,{queryKey:n}),t]:[n||{},e]}function bWn(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 Bht(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(gk(a)){if(i){if(e.queryHash!==x9e(a,e.options))return!1}else if(!YY(e.queryKey,a))return!1}var l=bWn(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 Fht(n,e){var t=n.exact,i=n.fetching,r=n.predicate,o=n.mutationKey;if(gk(o)){if(!e.options.mutationKey)return!1;if(t){if(U8(e.options.mutationKey)!==U8(o))return!1}else if(!YY(e.options.mutationKey,o))return!1}return!(typeof i=="boolean"&&e.state.status==="loading"!==i||r&&!r(e))}function x9e(n,e){var t=e?.queryKeyHashFn||U8;return t(n)}function U8(n){var e=GY(n);return xWn(e)}function xWn(n){return JSON.stringify(n,function(e,t){return w9e(t)?Object.keys(t).sort().reduce(function(i,r){return i[r]=t[r],i},{}):t})}function YY(n,e){return Uht(GY(n),GY(e))}function Uht(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!Uht(n[t],e[t])}):!1}function XY(n,e){if(n===e)return n;var t=Array.isArray(n)&&Array.isArray(e);if(t||w9e(n)&&w9e(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]=XY(n[l],e[l]),s[l]===n[l]&&a++}return i===o&&a===i?n:s}return e}function wWn(n,e){if(n&&!e||e&&!n)return!1;for(var t in n)if(n[t]!==e[t])return!1;return!0}function w9e(n){if(!$ht(n))return!1;var e=n.constructor;if(typeof e>"u")return!0;var t=e.prototype;return!(!$ht(t)||!t.hasOwnProperty("isPrototypeOf"))}function $ht(n){return Object.prototype.toString.call(n)==="[object Object]"}function gk(n){return typeof n=="string"||Array.isArray(n)}function SWn(n){return new Promise(function(e){setTimeout(e,n)})}function jht(n){Promise.resolve().then(n).catch(function(e){return setTimeout(function(){throw e})})}function Hht(){if(typeof AbortController=="function")return new AbortController}var EWn=(function(n){QA(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!VY&&((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})(JA),vk=new EWn,TWn=(function(n){QA(e,n);function e(){var i;return i=n.call(this)||this,i.setup=function(r){var o;if(!VY&&((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})(JA),WY=new TWn;function MWn(n){return Math.min(1e3*Math.pow(2,n),3e4)}function ZY(n){return typeof n?.cancel=="function"}var Vht=function(e){this.revert=e?.revert,this.silent=e?.silent};function KY(n){return n instanceof Vht}var Ght=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 Vht(y)),t.abort==null||t.abort(),ZY(f)))try{f.cancel()}catch{}},t.isTransportCancelable=ZY(f),Promise.resolve(f).then(c).catch(function(m){var y,g;if(!t.isResolved){var x=(y=e.retry)!=null?y:3,b=(g=e.retryDelay)!=null?g:MWn,w=typeof b=="function"?b(t.failureCount,m):b,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),SWn(w).then(function(){if(!vk.isFocused()||!WY.isOnline())return u()}).then(function(){i?l(m):h()})}})}};d()},CWn=(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):jht(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&&jht(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})(),e0=new CWn,qht=console;function QY(){return qht}function AWn(n){qht=n}var RWn=(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=Xc({},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(),b9e(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=gWn(i,a);return(o=(s=this.options).isDataEqual)!=null&&o.call(s,a,c)?c=a:this.options.structuralSharing!==!1&&(c=XY(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||!zht(this.state.dataUpdatedAt,i)},e.onFocus=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnWindowFocus()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.onOnline=function(){var i,r=this.observers.find(function(o){return o.shouldFetchOnReconnect()});r&&r.refetch(),(i=this.retryer)==null||i.continue()},e.addObserver=function(i){this.observers.indexOf(i)===-1&&(this.observers.push(i),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:i}))},e.removeObserver=function(i){this.observers.indexOf(i)!==-1&&(this.observers=this.observers.filter(function(r){return r!==i}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:i}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(i,r){var o=this,s,a,c;if(this.state.isFetching){if(this.state.dataUpdatedAt&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(i&&this.setOptions(i),!this.options.queryFn){var u=this.observers.find(function(b){return b.options.queryFn});u&&this.setOptions(u.options)}var d=GY(this.queryKey),h=Hht(),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 Ght({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){KY(w)&&w.silent||o.dispatch({type:"error",error:w}),KY(w)||(o.cache.config.onError==null||o.cache.config.onError(w,o),QY().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),e0.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 Xc({},i,{fetchFailureCount:i.fetchFailureCount+1});case"pause":return Xc({},i,{isPaused:!0});case"continue":return Xc({},i,{isPaused:!1});case"fetch":return Xc({},i,{fetchFailureCount:0,fetchMeta:(o=r.meta)!=null?o:null,isFetching:!0,isPaused:!1},!i.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Xc({},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 KY(a)&&a.revert&&this.revertState?Xc({},this.revertState):Xc({},i,{error:a,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return Xc({},i,{isInvalidated:!0});case"setState":return Xc({},i,r.state);default:return i}},n})(),PWn=(function(n){QA(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:x9e(c,o),u=this.get(l);return u||(u=new RWn({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;e0.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=xE(r,o),a=s[0];return typeof a.exact>"u"&&(a.exact=!0),this.queries.find(function(c){return Bht(a,c)})},t.findAll=function(r,o){var s=xE(r,o),a=s[0];return Object.keys(a).length>0?this.queries.filter(function(c){return Bht(a,c)}):this.queries},t.notify=function(r){var o=this;e0.batch(function(){o.listeners.forEach(function(s){s(r)})})},t.onFocus=function(){var r=this;e0.batch(function(){r.queries.forEach(function(o){o.onFocus()})})},t.onOnline=function(){var r=this;e0.batch(function(){r.queries.forEach(function(o){o.onOnline()})})},e})(JA),IWn=(function(){function n(t){this.options=Xc({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||Yht(),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),QY().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 Ght({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=NWn(this.state,i),e0.batch(function(){r.observers.forEach(function(o){o.onMutationUpdate(i)}),r.mutationCache.notify(r)})},n})();function Yht(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}function NWn(n,e){switch(e.type){case"failed":return Xc({},n,{failureCount:n.failureCount+1});case"pause":return Xc({},n,{isPaused:!0});case"continue":return Xc({},n,{isPaused:!1});case"loading":return Xc({},n,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return Xc({},n,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return Xc({},n,{data:void 0,error:e.error,failureCount:n.failureCount+1,isPaused:!1,status:"error"});case"setState":return Xc({},n,e.state);default:return n}}var kWn=(function(n){QA(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 IWn({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;e0.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 Fht(r,o)})},t.findAll=function(r){return this.mutations.filter(function(o){return Fht(r,o)})},t.notify=function(r){var o=this;e0.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 e0.batch(function(){return r.reduce(function(o,s){return o.then(function(){return s.continue().catch(W1)})},Promise.resolve())})},e})(JA);function OWn(){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=Hht(),g=y?.signal,x=m,b=!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(b)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},se=w(ie),fe=Promise.resolve(se).then(function(ce){return T(q,W,ce,K)});if(ZY(se)){var ne=fe;ne.cancel=se.cancel}return fe},R;if(!f.length)R=k([]);else if(d){var N=typeof u<"u",M=N?u:Xht(e.options,f);R=k(f,N,M)}else if(h){var I=typeof u<"u",C=I?u:DWn(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(se){var fe=c&&f[ie]?c(f[ie],ie,f):!0;if(fe){var ne=j?m[ie]:Xht(e.options,se);return k(se,j,ne)}return Promise.resolve(T(se,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(){b=!0,y?.abort(),ZY(R)&&R.cancel()},$}}}}function Xht(n,e){return n.getNextPageParam==null?void 0:n.getNextPageParam(e[e.length-1],e)}function DWn(n,e){return n.getPreviousPageParam==null?void 0:n.getPreviousPageParam(e[0],e)}var LWn=(function(){function n(t){t===void 0&&(t={}),this.queryCache=t.queryCache||new PWn,this.mutationCache=t.mutationCache||new kWn,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=n.prototype;return e.mount=function(){var i=this;this.unsubscribeFocus=vk.subscribe(function(){vk.isFocused()&&WY.isOnline()&&(i.mutationCache.onFocus(),i.queryCache.onFocus())}),this.unsubscribeOnline=WY.subscribe(function(){vk.isFocused()&&WY.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=xE(i,r),s=o[0];return s.fetching=!0,this.queryCache.findAll(s).length},e.isMutating=function(i){return this.mutationCache.findAll(Xc({},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=qY(i),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(r,o)},e.setQueriesData=function(i,r,o){var s=this;return e0.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=xE(i,r),s=o[0],a=this.queryCache;e0.batch(function(){a.findAll(s).forEach(function(c){a.remove(c)})})},e.resetQueries=function(i,r,o){var s=this,a=xE(i,r,o),c=a[0],l=a[1],u=this.queryCache,d=Xc({},c,{active:!0});return e0.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=xE(i,r,o),c=a[0],l=a[1],u=l===void 0?{}:l;typeof u.revert>"u"&&(u.revert=!0);var d=e0.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=xE(i,r,o),d=u[0],h=u[1],f=Xc({},d,{active:(s=(a=d.refetchActive)!=null?a:d.active)!=null?s:!0,inactive:(c=d.refetchInactive)!=null?c:!1});return e0.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=xE(i,r,o),c=a[0],l=a[1],u=e0.batch(function(){return s.queryCache.findAll(c).map(function(h){return h.fetch(void 0,Xc({},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=qY(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=qY(i,r,o);return s.behavior=OWn(),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=e0.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 U8(i)===U8(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 YY(i,o.queryKey)}))==null?void 0:r.defaultOptions:void 0},e.setMutationDefaults=function(i,r){var o=this.mutationDefaults.find(function(s){return U8(i)===U8(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 YY(i,o.mutationKey)}))==null?void 0:r.defaultOptions:void 0},e.defaultQueryOptions=function(i){if(i?._defaulted)return i;var r=Xc({},this.defaultOptions.queries,this.getQueryDefaults(i?.queryKey),i,{_defaulted:!0});return!r.queryHash&&r.queryKey&&(r.queryHash=x9e(r.queryKey,r)),r},e.defaultQueryObserverOptions=function(i){return this.defaultQueryOptions(i)},e.defaultMutationOptions=function(i){return i?._defaulted?i:Xc({},this.defaultOptions.mutations,this.getMutationDefaults(i?.mutationKey),i,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},n})(),zWn=(function(n){QA(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),Wht(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},t.onUnsubscribe=function(){this.listeners.length||this.destroy()},t.shouldFetchOnReconnect=function(){return S9e(this.currentQuery,this.options,this.options.refetchOnReconnect)},t.shouldFetchOnWindowFocus=function(){return S9e(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&&Zht(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(Xc({},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(),!(VY||this.currentResult.isStale||!b9e(this.options.staleTime))){var o=zht(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,!(VY||this.options.enabled===!1||!b9e(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(function(){(o.options.refetchIntervalInBackground||vk.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,b=m.isFetching,w=m.status,T=!1,k=!1,R;if(o.optimisticResults){var N=this.hasListeners(),M=!N&&Wht(r,o),I=N&&Zht(r,s,o,a);(M||I)&&(b=!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=XY(c?.data,R)),this.selectResult=R,this.selectError=null}catch(P){QY().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=XY(c?.data,C)),this.selectError=null}catch(P){QY().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:b,isRefetching:b&&w!=="loading",isLoadingError:w==="error"&&m.dataUpdatedAt===0,isPlaceholderData:k,isPreviousData:T,isRefetchError:w==="error"&&m.dataUpdatedAt!==0,isStale:E9e(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,!wWn(this.currentResult,o)){var s={cache:!0};r?.listeners!==!1&&this.shouldNotifyListeners(this.currentResult,o)&&(s.listeners=!0),this.notify(Xc({},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"&&!KY(r.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()},t.notify=function(r){var o=this;e0.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})(JA);function BWn(n,e){return e.enabled!==!1&&!n.state.dataUpdatedAt&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Wht(n,e){return BWn(n,e)||n.state.dataUpdatedAt>0&&S9e(n,e,e.refetchOnMount)}function S9e(n,e,t){if(e.enabled!==!1){var i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&E9e(n,e)}return!1}function Zht(n,e,t,i){return t.enabled!==!1&&(n!==e||i.enabled===!1)&&(!t.suspense||n.state.status!=="error")&&E9e(n,t)}function E9e(n,e){return n.isStaleByTime(e.staleTime)}var FWn=(function(n){QA(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,Xc({},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:Yht(),o=Xc({},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;e0.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})(JA),UWn=VX.unstable_batchedUpdates;e0.setBatchNotifyFunction(UWn);var $Wn=console;AWn($Wn);var Kht=bo.createContext(void 0),Qht=bo.createContext(!1);function Jht(n){return n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Kht),window.ReactQueryClientContext):Kht}var T9e=function(){var e=bo.useContext(Jht(bo.useContext(Qht)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},jWn=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=Jht(r);return bo.createElement(Qht.Provider,{value:r},bo.createElement(s.Provider,{value:t},o))};function HWn(){var n=!1;return{clearReset:function(){n=!1},reset:function(){n=!0},isReset:function(){return n}}}var VWn=bo.createContext(HWn()),GWn=function(){return bo.useContext(VWn)};function ept(n,e,t){return typeof e=="function"?e.apply(void 0,t):typeof e=="boolean"?e:!!n}function qWn(n,e,t){var i=bo.useRef(!1),r=bo.useState(0),o=r[1],s=vWn(n,e),a=T9e(),c=bo.useRef();c.current?c.current.setOptions(s):c.current=new FWn(a,s);var l=c.current.getCurrentResult();bo.useEffect(function(){i.current=!0;var d=c.current.subscribe(e0.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&&ept(void 0,c.current.options.useErrorBoundary,[l.error]))throw l.error;return Xc({},l,{mutate:u,mutateAsync:l.mutate})}function YWn(n,e){var t=bo.useRef(!1),i=bo.useState(0),r=i[1],o=T9e(),s=GWn(),a=o.defaultQueryObserverOptions(n);a.optimisticResults=!0,a.onError&&(a.onError=e0.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=e0.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=e0.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(e0.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&&ept(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return a.notifyOnChangeProps==="tracked"&&(u=l.trackResult(u,a)),u}function XWn(n,e,t){var i=qY(n,e,t);return YWn(i,zWn)}function WWn({orderQuote:n,selectedShippingCarrier:e,onSelectShippingCarrier:t,lowestShippingCarrierCost:i}){const r=e?n.shipping_options.find(o=>o.carrier===e):null;return _e.jsxs("div",{className:"rf-rounded-xl rf-bg-white rf-shadow-lg rf-border rf-border-gray-200",children:[_e.jsxs("div",{className:"rf-flex rf-items-center rf-justify-between rf-px-6 rf-pt-4 rf-pb-2",children:[_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ndn,{className:"rf-w-6 rf-h-6 rf-text-blue-500"}),_e.jsx("span",{className:"rf-font-semibold rf-text-lg",children:n.vendor_name.toUpperCase()})]}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[_e.jsx("span",{className:"rf-text-gray-500 rf-text-sm",children:"Fully Assembled PCB"}),_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",i.toFixed(2)]}),_e.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})]})]})]}),_e.jsx("hr",{className:"rf-border-gray-200"}),_e.jsxs("div",{className:"rf-px-6 rf-pt-4 rf-pb-2",children:[_e.jsx("div",{className:"rf-mb-2 rf-text-sm rf-font-bold rf-text-gray-700",children:"Shipping Options:"}),_e.jsx("div",{className:"rf-flex rf-flex-col rf-gap-2 rf-mb-2",children:n.shipping_options.map((o,s)=>_e.jsxs("button",{type:"button",className:aa("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:[_e.jsx(Odn,{className:"rf-w-5 rf-h-5 rf-text-yellow-500"}),_e.jsxs("div",{className:"rf-text-left rf-flex-1",children:[_e.jsx("div",{className:"rf-leading-tight rf-font-medium",children:o.carrier}),_e.jsx("div",{className:"rf-text-xs rf-text-gray-500",children:"Express, 5-12 days"})]}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end rf-ml-2",children:[_e.jsxs("span",{className:"rf-text-gray-400 rf-line-through rf-text-sm",children:["$",o.cost.toFixed(2)]}),_e.jsx("span",{className:"rf-text-xs rf-text-blue-600 rf-font-medium",children:"waived"})]})]},o.carrier+s))})]}),e!==null&&r&&_e.jsx("div",{className:"rf-px-6 rf-pb-4 rf-pt-2",children:_e.jsxs("div",{className:"rf-flex rf-justify-between rf-items-center rf-mt-3 rf-mb-2",children:[_e.jsx("span",{className:"rf-text-gray-700 rf-font-bold",children:"Total (incl. shipping):"}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-end",children:[_e.jsxs("div",{className:"rf-text-gray-400 rf-line-through rf-text-base",children:["$",(n.total_cost_without_shipping+r.cost).toFixed(2)]}),_e.jsx("div",{className:"rf-flex rf-items-center",children:_e.jsx("span",{className:"rf-font-bold rf-text-xl rf-text-blue-600",children:"$50.00"})})]})]})})]})}const ZWn=async n=>{try{const{order_quote_id:e}=await LY.post("order_quotes/create",{json:{package_release_id:n,vendor_name:"jlcpcb"}}).json();return{order_quote_id:e}}catch(e){if(e instanceof Xxe){const t=await e.response.json();throw{error:{message:t.message,error_code:t.error_code}}}throw e}},KWn=async n=>{const{order_quote:e}=await LY.get("order_quotes/get",{searchParams:{order_quote_id:n}}).json();return e},QWn=()=>{const n=T9e();return qWn({mutationKey:["createOrderQuote"],mutationFn:e=>ZWn(e),onSuccess:e=>{n.invalidateQueries(["getOrderQuote",e.order_quote_id])}})},JWn=n=>{const{data:e,error:t,status:i}=XWn(["getOrderQuote",n],()=>KWn(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}},eZn=({onCancel:n,packageReleaseId:e,signIn:t,isLoggedIn:i})=>{const[r,o]=Te.useState(null),[s,a]=Te.useState(null),{mutate:c,error:l}=QWn();Te.useEffect(()=>{e&&c(e,{onSuccess:y=>{a(y.order_quote_id)}})},[e]);const{data:u}=JWn(s||void 0),d=l&&l.error?.message||u?.error?.message;Bet({errorMessage:d});const h=async y=>{const g=DY("TSCIRCUIT_STRIPE_CHECKOUT_BASE_URL");window.location.href=`${g}?client_reference_id=${y}&shipping_option=${r}`};Te.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=Te.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?_e.jsx(iZn,{signIn:t}):_e.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:[_e.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),!(l||u?.error)&&(!s||!u||u?.is_processing)&&_e.jsx(tZn,{message:"Fetching quotes..."}),(l||u?.error)&&_e.jsx(nZn,{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&&_e.jsxs(_e.Fragment,{children:[_e.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"}),_e.jsx(WWn,{orderQuote:u,selectedShippingCarrier:r,onSelectShippingCarrier:o,lowestShippingCarrierCost:f+(u.total_cost_without_shipping||0)},u?.order_quote_id)]}),_e.jsxs("div",{className:"rf-flex rf-justify-between rf-mt-5 rf-gap-4",children:[_e.jsx(r_,{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"}),_e.jsx(r_,{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"})]}),_e.jsx("div",{className:"rf-text-xs rf-text-center rf-text-gray-400 rf-mt-4",children:"Pricing may vary based on specifications."})]})},tZn=({message:n})=>_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-2 rf-my-12",children:[_e.jsx(IC,{className:"rf-animate-spin rf-w-8 rf-h-8 rf-text-gray-400"}),_e.jsx("p",{className:"rf-text-gray-600",children:n})]}),nZn=({message:n})=>_e.jsx("div",{className:"rf-text-red-600 rf-text-center rf-py-12",children:n}),iZn=({signIn:n})=>_e.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:[_e.jsx("h2",{className:"rf-text-3xl rf-font-bold rf-text-center",children:"Order PCB"}),_e.jsxs("div",{className:"rf-flex rf-flex-col rf-items-center rf-gap-4 rf-py-8",children:[_e.jsx("p",{className:"rf-text-gray-600",children:"Please sign in to continue"}),_e.jsxs(r_,{onClick:n,className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ufe,{className:"rf-w-5 rf-h-5"}),"Sign in with GitHub"]})]})]}),rZn=new LWn,oZn=({isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:r,packageReleaseId:o,signIn:s,isLoggedIn:a})=>_e.jsx(jWn,{client:rZn,children:_e.jsx(pH,{open:n,onOpenChange:c=>{c||e()},children:_e.jsx(gN,{className:"!rf-max-w-[660px] !rf-p-0 !rf-z-[101]",children:_e.jsx("div",{className:"rf-relative rf-w-full",children:t==="initial"&&_e.jsx(eZn,{onCancel:e,packageReleaseId:o??"",signIn:s??(()=>{}),isLoggedIn:a})})})})}),sZn=({isOpen:n,onClose:e,stage:t,setStage:i,signIn:r,isLoggedIn:o})=>{const s=Q4(a=>a.circuitJson);return _e.jsx(oZn,{signIn:r,isOpen:n,onClose:e,stage:t,setStage:i,circuitJson:s,isLoggedIn:o??!1})},aZn=()=>{const[n,e]=Te.useState(!1),[t,i]=Te.useState("initial");return{isOpen:n,stage:t,open:()=>e(!0),close:()=>{e(!1),i("initial")},setStage:i,OrderDialog:sZn}},cZn=n=>{const e=A_e(se=>se.lastRunEvalVersion),[t,i]=Te.useState(null),[r,o]=Te.useState(!1),[s,a]=Te.useState(!0),[c,l]=Te.useState(!1),[u,d]=Te.useState(null),[h,f]=Te.useState(null),[m,y]=Te.useState(!1),[g,x]=Te.useState(null),[b,w]=Te.useState(null),[T,k]=Te.useState(!1),[R,N]=Te.useState(!1),M=aZn(),I=Q4(se=>se.pushEvent),C=Q4(se=>se.recentEvents),$=Te.useMemo(()=>Date.now(),[]);Q5n(se=>{if(!(new Date(se.created_at).valueOf()<$+500)){if(se.event_type==="FILE_UPDATED"){o(!0);return}if(se.event_type==="SNIPPET_SAVED"){o(!1),a(!1),x("Snippet saved successfully."),k(!1);return}se.event_type==="REQUEST_EXPORT"&&(N(!0),x("Export processing..."),k(!1)),se.event_type==="EXPORT_CREATED"&&(x(`Export created: ${se.exportFilePath}`),k(!1),N(!1))}}),Te.useEffect(()=>{if(!c||u===null)return;const se=C.filter(ce=>new Date(ce.created_at).valueOf()>u),fe=se.find(ce=>ce.event_type==="FAILED_TO_SAVE_SNIPPET"),ne=se.find(ce=>ce.event_type==="SNIPPET_SAVED");fe&&(l(!1),d(null),w(fe.message??"Failed to save snippet. See console for error."),console.error(fe.message),k(!0),fe.error_code==="SNIPPET_UNSET"&&fe.available_snippet_names&&(f(fe.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=Q4(se=>se.circuitJson)??n.circuitJson,[X,W]=Te.useState(!1),[K,ie]=Te.useState(!1);return _e.jsxs(_e.Fragment,{children:[_e.jsxs(T0e,{children:[_e.jsx(M0e,{asChild:!0,children:_e.jsx("div",{className:"rf-whitespace-nowrap rf-text-xs font-medium rf-p-2 rf-mx-1 rf-cursor-pointer rf-relative",children:"File"})}),_e.jsxs(q$,{children:[!n.isWebEmbedded&&_e.jsxs(_e.Fragment,{children:[_e.jsx(Ib,{className:"rf-text-xs",onSelect:P,disabled:c,children:c?"Saving...":"Push"}),parseInt(window.location.port)>5e3&&_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>{M.open()},children:"Order"}),_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>W(!0),disabled:c,children:"Import"}),_e.jsx(Ib,{className:"rf-text-xs",onSelect:()=>{if(!c9e()){ap.error("Requires tscircuit token");return}ie(!0)},children:"AI Review"})]}),_e.jsxs(A0e,{children:[_e.jsx(V$,{className:"rf-text-xs",disabled:R,children:R?"Exporting...":"Export"}),_e.jsx(C0e,{children:_e.jsx(G$,{children:IXn.map((se,fe)=>_e.jsx(Ib,{onSelect:()=>{if(!q){ap.error("No Circuit JSON to export");return}NXn({exportName:se.name,circuitJson:q,projectName:t??"Untitled"})},disabled:R,children:_e.jsx("span",{className:"rf-text-xs",children:se.name})},fe))})})]}),!n.isWebEmbedded&&_e.jsxs(A0e,{children:[_e.jsx(V$,{className:"rf-text-xs",children:"Advanced"}),_e.jsx(C0e,{children:_e.jsxs(G$,{children:[_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2",children:[_e.jsx(Ftt,{id:"load-latest-eval",checked:n.shouldLoadLatestEval,onCheckedChange:se=>{n.onChangeShouldLoadLatestEval?.(se===!0)}}),_e.jsx("label",{htmlFor:"load-latest-eval",className:"rf-text-xs rf-cursor-pointer",children:"Force Latest @tscircuit/eval"})]})}),e&&_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsxs("span",{className:"rf-text-xs",children:["@tscircuit/eval@",e]})})}),_e.jsx(Ib,{className:"rf-flex rf-items-center rf-gap-2",onClick:()=>{window.open("/api/admin","_blank")},children:_e.jsx("div",{className:"rf-flex rf-items-center rf-gap-2",children:_e.jsx("span",{className:"rf-text-xs",children:"CLI Admin Panel"})})})]})})]})]}),_e.jsx(w3n,{open:T,onOpenChange:k,children:_e.jsxs(Mtt,{children:[_e.jsxs(Ctt,{children:[_e.jsx(Rtt,{children:"Error Saving Snippet"}),_e.jsx(Ptt,{children:b})]}),_e.jsx(Att,{children:_e.jsx(Itt,{onClick:()=>k(!1),children:"Dismiss"})})]})}),_e.jsx(K5n,{snippetNames:h??[],onSelect:async se=>{l(!0),d(Date.now()),i(se),await I({event_type:"REQUEST_TO_SAVE_SNIPPET",snippet_name:se}),y(!1)},onCancel:()=>y(!1),isOpen:m})]}),_e.jsx(Xqn,{isOpen:X,onClose:()=>W(!1)}),_e.jsx(yWn,{isOpen:K,onClose:()=>ie(!1),packageName:t}),_e.jsx(Yqn,{position:"top-center",reverseOrder:!1,containerStyle:{zIndex:1e5},toastOptions:{style:{zIndex:1e5}}}),_e.jsx(M.OrderDialog,{isOpen:M.isOpen,onClose:M.close,stage:M.stage,setStage:M.setStage})]})},lZn=["assembly","bom","circuit_json","errors","render_log"],uZn=({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:b,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:se=!1,isWebEmbedded:fe=!1})=>{U5n();const{versions:ne,latestVersion:ce,lastRunEvalVersion:pe,search:we,setSearch:Me,selectVersion:Oe}=Y5n(ie),Ue=Te.useMemo(()=>o?o.filter(Fe=>Fe&&"error_type"in Fe||Fe.type.includes("error")):null,[o]),Ae=Te.useMemo(()=>o?o.filter(Fe=>Fe&&"warning_type"in Fe||Fe.type.includes("warning")):null,[o]);Bet({errorMessage:i,errorStack:r,circuitJsonErrors:Ue});const[oe,ve]=Te.useState(C??$??P?.[0]??"pcb"),[ye,$e]=Te.useState(null),[Ve,Ze]=Te.useState(W);$5n(Ve);const be=Te.useCallback(Fe=>{ve(Fe),h?.(Fe)},[h]),nt=()=>{Ze(!Ve)};Te.useEffect(()=>{i&&(oe!=="errors"&&$e(oe),be("errors"))},[i]),Te.useEffect(()=>{(oe==="code"||oe==="errors")&&o&&!i&&be(ye??C??$??P?.[0]??"pcb")},[o]);const je=Te.useCallback(Fe=>{window.TSCIRCUIT_3D_OBJECT_REF=Fe===null?void 0:Fe},[]);return _e.jsx("div",{className:aa("flex flex-col relative rf-overflow-x-hidden rf-h-full",y),children:_e.jsx("div",{className:aa("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:_e.jsxs(fZ,{value:oe,onValueChange:be,className:"rf-flex-grow rf-flex rf-flex-col rf-h-full",children:[_e.jsxs("div",{className:aa("rf-flex rf-items-center rf-gap-2 rf-p-2 rf-pb-0",g),children:[x,se&&!x&&_e.jsx(cZn,{isWebEmbedded:fe,circuitJson:o}),(x||se)&&_e.jsx("div",{className:"rf-flex-grow"}),!x&&!se&&R&&_e.jsx(IC,{className:"rf-w-4 rf-h-4 rf-animate-spin"}),!x&&!se&&_e.jsx("div",{className:"rf-flex-grow"}),f&&f.progress!==1&&!i&&_e.jsxs("div",{className:"rf-flex rf-items-center rf-gap-2 rf-min-w-0 rf-max-w-xs",children:[K?_e.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:K,children:K}):f.lastRenderEvent&&_e.jsx("div",{className:"rf-text-xs rf-text-gray-500 rf-truncate rf-min-w-0",title:f.lastRenderEvent?.phase??"",children:f.lastRenderEvent?.phase??""}),_e.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:_e.jsx(IC,{className:"rf-w-4 rf-h-4 rf-animate-spin"})}),_e.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&&_e.jsxs(qO,{children:[c&&_e.jsx(Y5,{value:"code",children:"Code"}),!P||P.includes("pcb")?_e.jsxs(Y5,{value:"pcb",className:"rf-whitespace-nowrap",children:[o&&_e.jsx("span",{className:aa("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")?_e.jsxs(Y5,{value:"schematic",className:"rf-whitespace-nowrap",children:[o&&_e.jsx("span",{className:aa("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")?_e.jsxs(Y5,{value:"cad",children:[o&&_e.jsx("span",{className:aa("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)&&_e.jsx(Y5,{value:oe,children:Mwe(oe)}),_e.jsxs(T0e,{children:[_e.jsx(M0e,{asChild:!0,children:_e.jsxs("div",{className:"rf-whitespace-nowrap rf-p-2 rf-mr-1 rf-cursor-pointer rf-relative",children:[_e.jsx(Cdn,{className:"rf-w-4 rf-h-4"}),(Ue&&Ue.length>0||i)&&_e.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"})]})}),_e.jsxs(q$,{className:"rf-*:text-xs rf-z-[101]",children:[lZn.filter(Fe=>!P||P.includes(Fe)).map(Fe=>_e.jsxs(Ib,{onSelect:()=>be(Fe),children:[oe!==Fe&&_e.jsx(zqe,{className:"rf-w-3 rf-h-3 rf-opacity-30"}),oe===Fe&&_e.jsx($fe,{className:"rf-w-3 rf-h-3"}),_e.jsx("div",{className:"rf-pr-2",children:Mwe(Fe)}),Fe==="errors"&&(Ue&&Ue.length>0||i)&&_e.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})]},Fe)),_e.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/runframe@",V5n.split(".").map((Fe,Ge)=>Ge===2?parseInt(Fe)+1:Fe).join(".")]})}),ie?_e.jsxs(A0e,{onOpenChange:Fe=>!Fe&&Me(""),children:[_e.jsx(V$,{className:"rf-text-xs rf-opacity-60",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe??ce??"latest"]})}),_e.jsx(C0e,{children:_e.jsxs(G$,{className:"rf-*:text-xs rf-w-40 rf-max-h-[200px] rf-overflow-y-auto",children:[_e.jsx("div",{className:"rf-p-1",children:_e.jsx(pme,{value:we,onChange:Fe=>Me(Fe.target.value),placeholder:"Search...",className:"rf-h-7 rf-text-xs"})}),_e.jsx(VXe,{}),_e.jsx(Ib,{onSelect:()=>Oe(null),children:ce?`${ce} (latest)`:"latest"}),ne.map(Fe=>_e.jsx(Ib,{onSelect:()=>Oe(Fe),children:Fe},Fe))]})})]}):pe&&_e.jsx(Ib,{disabled:!0,className:"rf-opacity-60 rf-cursor-default rf-select-none",children:_e.jsxs("div",{className:"rf-pr-2 rf-text-xs rf-text-gray-500",children:["@tscircuit/eval@",pe]})})]})]})]}),X&&_e.jsx(r_,{onClick:nt,variant:"ghost",children:Ve?_e.jsx(Idn,{size:16}):_e.jsx(Rdn,{size:16})})]}),c&&_e.jsx(K9,{value:"code",className:"rf-flex-grow rf-overflow-hidden",children:_e.jsx("div",{className:"rf-h-full",children:l})}),(!P||P.includes("pcb"))&&_e.jsx(K9,{value:"pcb",children:_e.jsx("div",{className:aa("rf-overflow-hidden",Ve?"rf-h-[calc(100vh-52px)]":"rf-h-full"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading PCB viewer"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(B5n,{focusOnHover:!1,circuitJson:o,debugGraphics:s,containerClassName:aa("rf-h-full rf-w-full",Ve?"rf-min-h-[calc(100vh-240px)]":"rf-min-h-[620px]"),onEditEventsChanged:Fe=>{if(M)for(const Ge of Fe)M(Ge)}}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("assembly"))&&_e.jsx(K9,{value:"assembly",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallback:_e.jsx("div",{children:"Error loading Assembly"}),children:o?_e.jsx(zvn,{circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,debugGrid:!0}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("schematic"))&&_e.jsx(K9,{value:"schematic",children:_e.jsx("div",{className:aa("rf-overflow-auto rf-bg-white",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Schematic"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(Ovn,{spiceSimulationEnabled:!0,circuitJson:o,containerStyle:{height:"100%"},editingEnabled:!0,onEditEvent:Fe=>{M?.(Fe)},debugGrid:q}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("cad"))&&_e.jsx(K9,{value:"cad",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{FallbackComponent:mdn,children:o?_e.jsx(pdn,{ref:je,circuitJson:o,autoRotateDisabled:j}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("bom"))&&_e.jsx(K9,{value:"bom",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallbackRender:({error:Fe})=>_e.jsx("div",{className:"rf-mt-4 rf-bg-red-50 rf-rounded-md rf-border rf-border-red-200",children:_e.jsxs("div",{className:"rf-p-4",children:[_e.jsx("h3",{className:"rf-text-lg rf-font-semibold rf-text-red-800 rf-mb-3",children:"Error loading Bill of Materials"}),_e.jsx("p",{className:"rf-text-xs rf-font-mono rf-whitespace-pre-wrap rf-text-red-600 rf-mt-2",children:Fe?.message||"An unknown error occurred"})]})}),children:o?_e.jsx(jvn,{circuitJson:o}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("circuit_json"))&&_e.jsx(K9,{value:"circuit_json",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:_e.jsx(PC,{fallback:_e.jsx("div",{children:"Error loading JSON viewer"}),children:o?_e.jsx(Uvn,{elements:o}):_e.jsx(l8,{onRunClicked:t})})})}),(!P||P.includes("errors"))&&_e.jsx(K9,{value:"errors",children:_e.jsx("div",{className:aa("rf-overflow-auto",Ve?"rf-h-screen":"rf-h-full rf-min-h-[620px]"),children:i||Ue&&Ue.length>0||o?_e.jsx(x0n,{code:n,fsMap:e,circuitJsonErrors:Ue,circuitJsonWarnings:Ae,errorMessage:i,errorStack:r,circuitJson:o,evalVersion:pe,autoroutingLog:T,onReportAutoroutingLog:k}):_e.jsx(l8,{onRunClicked:t})})}),d&&(!P||P.includes("render_log"))&&_e.jsx(K9,{value:"render_log",children:_e.jsx(H5n,{renderLog:f})})]})})})};sft.createRoot(document.getElementById("root")).render(_e.jsx("div",{style:{height:"100vh"},children:_e.jsx(uZn,{defaultActiveTab:"cad",autoRotate3dViewerDisabled:!0,showRightHeaderContent:!1,circuitJson:window.CIRCUIT_JSON||{},...window.CIRCUIT_JSON_PREVIEW_PROPS||{}})}))}));