@ragrails/api-playground-react 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![types](https://img.shields.io/npm/types/@ragrails/api-playground-react.svg)](https://www.npmjs.com/package/@ragrails/api-playground-react)
6
6
  [![license](https://img.shields.io/npm/l/@ragrails/api-playground-react.svg)](./LICENSE)
7
7
 
8
- A lightweight, embeddable React API playground for interactive API docs, developer portals, SDK docs, and internal tools.
8
+ A lightweight, embeddable React API playground by [RagRails](https://docs.ragrails.com) for interactive API docs, developer portals, SDK docs, and internal tools.
9
9
 
10
10
  Give developers a fast way to understand and test your API without leaving your docs. Add one component and get cURL-powered code snippets, a **Try it out** console, request editing, auth, cURL import, live API responses, and history.
11
11
 
@@ -109,7 +109,7 @@ export function CreatePostDocs() {
109
109
  | --- | --- | --- | --- |
110
110
  | `request` | `string` | Required | The cURL request shown and tested by the widget. |
111
111
  | `onUpdateRequest` | `(request: string) => void` | `undefined` | Receives the latest cURL request after edits or imports. |
112
- | `title` | `string` | inferred | Label shown above the snippet. Defaults to the request method and path. |
112
+ | `title` | `string` | `undefined` | Optional console heading. Replaces “Try it Out” when set. |
113
113
  | `sampleResponse` | `string` | `undefined` | Example response body shown below the snippet. JSON strings are syntax-highlighted. |
114
114
  | `editable` | `boolean` | `true` | Enables or disables editing in the console. |
115
115
  | `allowImport` | `boolean` | `true` | Shows or hides the cURL import action. |
package/dist/index.cjs CHANGED
@@ -1,16 +1,16 @@
1
- const __RAGRAILS_API_PLAYGROUND_CSS__="/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--font-heading:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-px{bottom:-1px}.left-0{left:0}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.\\[field-sizing\\:content\\]{field-sizing:content}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-full{width:100%}.w-max{width:max-content}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-\\[7rem\\]{min-width:7rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.-skew-x-12{--tw-skew-x:skewX(calc(12deg * -1));transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[shimmer_2s_linear_infinite\\]{animation:2s linear infinite shimmer}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.\\[grid-template-rows\\:1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[\\#52b788\\]\\/25{border-color:oklab(70.6413% -.111726 .0387149/.25)}.border-\\[\\#FC7070\\]\\/20{border-color:oklab(71.4755% .158854 .0655041/.2)}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-primary,.border-primary\\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/60{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.border-sky-500\\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.border-sky-500\\/30{border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#4A0F0F\\]{background-color:#4a0f0f}.bg-\\[\\#52b788\\]\\/15{background-color:oklab(70.6413% -.111726 .0387149/.15)}.bg-\\[\\#EF5350\\]{background-color:#ef5350}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-bg{background-color:var(--bg)}.bg-primary{background-color:var(--primary)}.bg-primary-soft{background-color:var(--primary-soft)}.bg-sky-500\\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\\/15{background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-muted{--tw-gradient-from:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-content{--tw-gradient-via:var(--text);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/5{--tw-gradient-via:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.via-white\\/5{--tw-gradient-via:color-mix(in oklab, var(--color-white) 5%, transparent)}}.via-white\\/5{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/10{--tw-gradient-via:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.via-white\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-white) 10%, transparent)}}.via-white\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/25{--tw-gradient-via:#ffffff40}@supports (color:color-mix(in lab, red, red)){.via-white\\/25{--tw-gradient-via:color-mix(in oklab, var(--color-white) 25%, transparent)}}.via-white\\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-muted{--tw-gradient-to:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pr-28{padding-right:calc(var(--spacing) * 28)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-heading{font-family:var(--font-heading)}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-\\[550\\]{--tw-font-weight:550;font-weight:550}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre{white-space:pre}.text-\\[\\#52b788\\]{color:#52b788}.text-\\[\\#FC7070\\]{color:#fc7070}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-content{color:var(--text)}.text-green-500{color:var(--color-green-500)}.text-muted,.text-muted\\/60{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/60{color:color-mix(in oklab, var(--text-muted) 60%, transparent)}}.text-primary{color:var(--primary)}.text-primary-contrast{color:var(--primary-contrast)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-sky-400{color:var(--color-sky-400)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.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,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\:text-transparent:is(:where(.group):hover *){color:#0000}.group-hover\\:duration-\\[1200ms\\]:is(:where(.group):hover *){--tw-duration:1.2s;transition-duration:1.2s}.group-hover\\/seg\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group\\/seg):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\/seg\\:text-transparent:is(:where(.group\\/seg):hover *){color:#0000}}.group-disabled\\:hidden:is(:where(.group):disabled *){display:none}.placeholder\\:text-muted::placeholder,.placeholder\\:text-muted\\/50::placeholder{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-muted\\/50::placeholder{color:color-mix(in oklab, var(--text-muted) 50%, transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-default:read-only{cursor:default}.focus-within\\:border-primary:focus-within,.focus-within\\:border-primary\\/60:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/60:focus-within{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus-within\\:border-primary\\/70:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/70:focus-within{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}@media (hover:hover){.hover\\:border-primary\\/70:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-primary\\/70:hover{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.hover\\:bg-\\[\\#e53935\\]:hover{background-color:#e53935}.hover\\:bg-border:hover{background-color:var(--border)}.hover\\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\\:text-content:hover{color:var(--text)}.hover\\:text-primary-hover:hover{color:var(--primary-hover)}}.focus\\:border-primary\\/60:focus{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:border-primary\\/60:focus{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-primary\\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.active\\:scale-105:active{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[dropdown-expand_0\\.2s_ease-out\\]{animation:.2s ease-out dropdown-expand}.motion-safe\\:animate-\\[dropdown-expand_0\\.18s_ease-in_reverse_forwards\\]{animation:.18s ease-in reverse forwards dropdown-expand}.motion-safe\\:animate-\\[fade-in_0\\.6s_ease-out_both\\]{animation:.6s ease-out both fade-in}.motion-safe\\:animate-\\[widget-slide-in_180ms_ease-out\\]{animation:.18s ease-out widget-slide-in}}@media (prefers-reduced-motion:reduce){.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@media (min-width:40rem){.sm\\:inline{display:inline}}@media (min-width:48rem){.md\\:col-start-auto{grid-column-start:auto}.md\\:row-span-1{grid-row:span 1/span 1}.md\\:inline{display:inline}.md\\:grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.md\\:grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.md\\:grid-cols-\\[auto_1fr_1fr_auto\\]{grid-template-columns:auto 1fr 1fr auto}.md\\:grid-cols-\\[minmax\\(0\\,0\\.7fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}}.\\[\\&_button\\]\\:text-\\[14px\\] button{font-size:14px}[data-theme=light]{--bg:#f2f4f7;--surface:#fff;--surface-2:#e7ebf3;--border:#d2d7df;--text:#0f1216;--text-muted:#4b5563;--primary:#7855ff;--primary-contrast:#fff}[data-theme=dark]{--bg:#16171d;--surface:#1f2028;--surface-2:#2a2c36;--border:#2e303a;--text:#f3f4f6;--text-muted:#9ca3af;--primary:#7855ff;--primary-contrast:#fff}[data-theme]{--primary-hover:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-hover:color-mix(in srgb, var(--primary) 86%, #000)}}[data-theme]{--primary-soft:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-soft:color-mix(in srgb, var(--primary) 16%, transparent)}}@keyframes shimmer{to{transform:translate(100%)}}@keyframes text-shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes dropdown-expand{0%{opacity:0;grid-template-rows:0fr}to{opacity:1;grid-template-rows:1fr}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes widget-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--text-muted);font-style:italic}.token.punctuation{color:var(--text-muted)}.token.property,.token.tag,.token.symbol,.token.deleted{color:#7aa2f7}.token.number{color:#e5c07b}.token.boolean,.token.null,.token.keyword,.token.atrule,.token.important{color:var(--primary)}.token.string,.token.char,.token.attr-name,.token.attr-value,.token.regex,.token.inserted,.token.selector{color:#9ece6a}.token.operator,.token.entity,.token.url,.token.variable{color:var(--text)}.token.function,.token.class-name{color:#61afef}.token.builtin{color:#56b6c2}[data-theme=light] .token.property,[data-theme=light] .token.tag,[data-theme=light] .token.symbol,[data-theme=light] .token.deleted{color:#0550ae}[data-theme=light] .token.number{color:#953800}[data-theme=light] .token.string,[data-theme=light] .token.char,[data-theme=light] .token.attr-name,[data-theme=light] .token.attr-value,[data-theme=light] .token.regex,[data-theme=light] .token.inserted,[data-theme=light] .token.selector{color:#116329}[data-theme=light] .token.function,[data-theme=light] .token.class-name{color:#1f6feb}[data-theme=light] .token.builtin{color:#0e7490}@layer base{[data-theme] button:not(:disabled),[data-theme] [role=button]:not([aria-disabled=true]){cursor:pointer}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}";
1
+ const __RAGRAILS_API_PLAYGROUND_CSS__="/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-green-500:oklch(72.3% .219 149.579);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--font-heading:system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.top-2{top:calc(var(--spacing) * 2)}.top-5{top:calc(var(--spacing) * 5)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-px{bottom:-1px}.left-0{left:0}.isolate{isolation:isolate}.-z-10{z-index:calc(10 * -1)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.\\[field-sizing\\:content\\]{field-sizing:content}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-full{height:100%}.min-h-0{min-height:0}.min-h-10{min-height:calc(var(--spacing) * 10)}.w-3{width:calc(var(--spacing) * 3)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-full{width:100%}.w-max{width:max-content}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-28{min-width:calc(var(--spacing) * 28)}.min-w-\\[7rem\\]{min-width:7rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.-skew-x-12{--tw-skew-x:skewX(calc(12deg * -1));transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[shimmer_2s_linear_infinite\\]{animation:2s linear infinite shimmer}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[auto_1fr_auto\\]{grid-template-columns:auto 1fr auto}.\\[grid-template-rows\\:1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\\[\\#52b788\\]\\/25{border-color:oklab(70.6413% -.111726 .0387149/.25)}.border-\\[\\#FC7070\\]\\/20{border-color:oklab(71.4755% .158854 .0655041/.2)}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--border)}.border-current{border-color:currentColor}.border-primary,.border-primary\\/30{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\\/30{border-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.border-red-500{border-color:var(--color-red-500)}.border-red-500\\/60{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-red-500\\/60{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.border-sky-500\\/30{border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.border-sky-500\\/30{border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.border-transparent{border-color:#0000}.border-t-primary{border-top-color:var(--primary)}.border-t-transparent{border-top-color:#0000}.bg-\\[\\#4A0F0F\\]{background-color:#4a0f0f}.bg-\\[\\#52b788\\]\\/15{background-color:oklab(70.6413% -.111726 .0387149/.15)}.bg-\\[\\#EF5350\\]{background-color:#ef5350}.bg-amber-500\\/15{background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\\/15{background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.bg-primary{background-color:var(--primary)}.bg-primary-soft{background-color:var(--primary-soft)}.bg-sky-500\\/15{background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\\/15{background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.bg-surface{background-color:var(--surface)}.bg-surface-2{background-color:var(--surface-2)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-muted{--tw-gradient-from:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-content{--tw-gradient-via:var(--text);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/5{--tw-gradient-via:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.via-white\\/5{--tw-gradient-via:color-mix(in oklab, var(--color-white) 5%, transparent)}}.via-white\\/5{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/10{--tw-gradient-via:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.via-white\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-white) 10%, transparent)}}.via-white\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/25{--tw-gradient-via:#ffffff40}@supports (color:color-mix(in lab, red, red)){.via-white\\/25{--tw-gradient-via:color-mix(in oklab, var(--color-white) 25%, transparent)}}.via-white\\/25{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-muted{--tw-gradient-to:var(--text-muted);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.pr-28{padding-right:calc(var(--spacing) * 28)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-heading{font-family:var(--font-heading)}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[16px\\]{font-size:16px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-\\[550\\]{--tw-font-weight:550;font-weight:550}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.whitespace-pre{white-space:pre}.text-\\[\\#52b788\\]{color:#52b788}.text-\\[\\#FC7070\\]{color:#fc7070}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-content{color:var(--text)}.text-green-500{color:var(--color-green-500)}.text-muted,.text-muted\\/45{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/45{color:color-mix(in oklab, var(--text-muted) 45%, transparent)}}.text-muted\\/60{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.text-muted\\/60{color:color-mix(in oklab, var(--text-muted) 60%, transparent)}}.text-primary{color:var(--primary)}.text-primary-contrast{color:var(--primary-contrast)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-sky-400{color:var(--color-sky-400)}.text-transparent{color:#0000}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.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,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-70{opacity:.7}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-\\[240ms\\]{--tw-duration:.24s;transition-duration:.24s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\:text-transparent:is(:where(.group):hover *){color:#0000}.group-hover\\:duration-\\[1200ms\\]:is(:where(.group):hover *){--tw-duration:1.2s;transition-duration:1.2s}.group-hover\\/seg\\:\\[animation\\:text-shimmer_1\\.2s_linear_1_forwards\\]:is(:where(.group\\/seg):hover *){animation:1.2s linear forwards text-shimmer}.group-hover\\/seg\\:text-transparent:is(:where(.group\\/seg):hover *){color:#0000}}.group-disabled\\:hidden:is(:where(.group):disabled *){display:none}.placeholder\\:text-muted::placeholder,.placeholder\\:text-muted\\/50::placeholder{color:var(--text-muted)}@supports (color:color-mix(in lab, red, red)){.placeholder\\:text-muted\\/50::placeholder{color:color-mix(in oklab, var(--text-muted) 50%, transparent)}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.read-only\\:cursor-default:read-only{cursor:default}.focus-within\\:border-primary:focus-within,.focus-within\\:border-primary\\/60:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/60:focus-within{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus-within\\:border-primary\\/70:focus-within{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:border-primary\\/70:focus-within{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 15%, transparent)}}.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-primary\\/20:focus-within{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}@media (hover:hover){.hover\\:border-primary\\/70:hover{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-primary\\/70:hover{border-color:color-mix(in oklab, var(--primary) 70%, transparent)}}.hover\\:bg-\\[\\#e53935\\]:hover{background-color:#e53935}.hover\\:bg-border:hover{background-color:var(--border)}.hover\\:bg-primary-hover:hover{background-color:var(--primary-hover)}.hover\\:bg-surface-2:hover{background-color:var(--surface-2)}.hover\\:text-content:hover{color:var(--text)}.hover\\:text-muted:hover{color:var(--text-muted)}.hover\\:text-primary-hover:hover{color:var(--primary-hover)}}.focus\\:border-primary\\/60:focus{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:border-primary\\/60:focus{border-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-primary\\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-primary\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-primary\\/60:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 60%, transparent)}}.active\\:scale-105:active{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[dropdown-expand_0\\.2s_ease-out\\]{animation:.2s ease-out dropdown-expand}.motion-safe\\:animate-\\[dropdown-expand_0\\.18s_ease-in_reverse_forwards\\]{animation:.18s ease-in reverse forwards dropdown-expand}.motion-safe\\:animate-\\[fade-in_0\\.6s_ease-out_both\\]{animation:.6s ease-out both fade-in}.motion-safe\\:animate-\\[widget-slide-in_180ms_ease-out\\]{animation:.18s ease-out widget-slide-in}}@media (prefers-reduced-motion:reduce){.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}}@media (min-width:40rem){.sm\\:inline{display:inline}}@media (min-width:48rem){.md\\:col-start-auto{grid-column-start:auto}.md\\:row-span-1{grid-row:span 1/span 1}.md\\:inline{display:inline}.md\\:grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.md\\:grid-cols-\\[auto_1fr\\]{grid-template-columns:auto 1fr}.md\\:grid-cols-\\[auto_1fr_1fr_auto\\]{grid-template-columns:auto 1fr 1fr auto}.md\\:grid-cols-\\[minmax\\(0\\,0\\.7fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}}.\\[\\&_button\\]\\:text-\\[14px\\] button{font-size:14px}[data-theme=light]{--bg:#f2f4f7;--surface:#fff;--surface-2:#e7ebf3;--border:#d2d7df;--text:#0f1216;--text-muted:#4b5563;--primary:#7855ff;--primary-contrast:#fff}[data-theme=dark]{--bg:#16171d;--surface:#1f2028;--surface-2:#2a2c36;--border:#2e303a;--text:#f3f4f6;--text-muted:#9ca3af;--primary:#7855ff;--primary-contrast:#fff}[data-theme]{--primary-hover:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-hover:color-mix(in srgb, var(--primary) 86%, #000)}}[data-theme]{--primary-soft:var(--primary)}@supports (color:color-mix(in lab, red, red)){[data-theme]{--primary-soft:color-mix(in srgb, var(--primary) 16%, transparent)}}@keyframes shimmer{to{transform:translate(100%)}}@keyframes text-shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes dropdown-expand{0%{opacity:0;grid-template-rows:0fr}to{opacity:1;grid-template-rows:1fr}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes widget-slide-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:var(--text-muted);font-style:italic}.token.punctuation{color:var(--text-muted)}.token.property,.token.tag,.token.symbol,.token.deleted{color:#7aa2f7}.token.number{color:#e5c07b}.token.boolean,.token.null,.token.keyword,.token.atrule,.token.important{color:var(--primary)}.token.string,.token.char,.token.attr-name,.token.attr-value,.token.regex,.token.inserted,.token.selector{color:#9ece6a}.token.operator,.token.entity,.token.url,.token.variable{color:var(--text)}.token.function,.token.class-name{color:#61afef}.token.builtin{color:#56b6c2}[data-theme=light] .token.property,[data-theme=light] .token.tag,[data-theme=light] .token.symbol,[data-theme=light] .token.deleted{color:#0550ae}[data-theme=light] .token.number{color:#953800}[data-theme=light] .token.string,[data-theme=light] .token.char,[data-theme=light] .token.attr-name,[data-theme=light] .token.attr-value,[data-theme=light] .token.regex,[data-theme=light] .token.inserted,[data-theme=light] .token.selector{color:#116329}[data-theme=light] .token.function,[data-theme=light] .token.class-name{color:#1f6feb}[data-theme=light] .token.builtin{color:#0e7490}@layer base{[data-theme] button:not(:disabled),[data-theme] [role=button]:not([aria-disabled=true]){cursor:pointer}}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}";
2
2
  if(typeof document!=="undefined"&&!document.getElementById("ragrails-api-playground-react-styles")){const style=document.createElement("style");style.id="ragrails-api-playground-react-styles";style.textContent=__RAGRAILS_API_PLAYGROUND_CSS__;(document.head||document.documentElement).appendChild(style);}
3
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");function u(...e){return e.filter(Boolean).join(` `)}var d={copy:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593s1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.6 3.6 0 0 0 15.24 2`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847S21 8.671 21 11.397v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936z`})]}),check:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m4 12.9l3.143 3.6L15 7.5m5 .063l-8.572 9L11 16`}),download:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15M12 3v13m0 0l4-4.375M12 16l-4-4.375`}),send:(0,l.jsxs)(`g`,{fill:`none`,children:[(0,l.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,d:`m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M16.212 8.848a.75.75 0 0 0-1.055-1.066zm-5.55 5.488l5.55-5.488l-1.055-1.066l-5.55 5.488z`})]}),share:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinejoin:`round`,d:`M22 7h-8c-1.818 0-2.913.892-3.32 1.3q-.187.19-.19.19q0 .003-.19.19C9.892 9.087 9 10.182 9 12v3m13-8l-5-5m5 5l-5 5`}),(0,l.jsx)(`path`,{d:`M3.465 20.535C4.93 22 7.287 22 12.003 22c4.715 0 7.073 0 8.537-1.465c1.242-1.241 1.431-3.123 1.46-6.537M3.465 20.535C2 19.07 2 16.713 2 11.997m1.465 8.538C4.929 22 7.286 22 12 22s7.071 0 8.535-1.465c1.241-1.24 1.43-3.122 1.46-6.536m-18.53 6.536C2 19.071 2 16.714 2 12m1.465-8.54C4.706 2.218 6.588 2.029 10.002 2M2.055 8c.11-2.193.436-3.562 1.41-4.536c1.24-1.24 3.122-1.43 6.535-1.459`})]}),code:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,d:`m17 7.83l1.697 1.526c1.542 1.389 2.313 2.083 2.313 2.974c0 .89-.771 1.585-2.314 2.973L17 16.83M13.987 5L12 12.415l-1.987 7.415M7 7.83L5.304 9.356C3.76 10.745 2.99 11.44 2.99 12.33s.771 1.585 2.314 2.973L7 16.83`}),"arrow-left":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M20 12H4m0 0l6-6m-6 6l6 6`}),"arrow-right":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M4 12h16m0 0l-6-6m6 6l-6 6`}),"chevron-down":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m19 9l-7 6l-7-6`}),trash:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5`}),(0,l.jsx)(`path`,{d:`M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6`})]}),plus:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M15 12h-3m0 0H9m3 0V9m0 3v3`})]}),moon:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10`}),sun:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M17 12a5 5 0 1 1-10 0a5 5 0 0 1 10 0`}),(0,l.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M1.25 12a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75`,clipRule:`evenodd`})]}),palette:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`mask`,{id:`solar-palette-a`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsx)(`mask`,{id:`solar-palette-b`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,children:[(0,l.jsx)(`path`,{strokeWidth:`1.5`,d:`M2 12.026c0 5.146 3.867 9.387 8.847 9.96c.735.085 1.447-.228 1.97-.753a1.68 1.68 0 0 0 0-2.372c-.523-.525-.95-1.307-.555-1.934c1.576-2.508 9.738 3.251 9.738-4.9C22 6.488 17.523 2 12 2S2 6.489 2 12.026Z`}),(0,l.jsx)(`circle`,{cx:`17.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`circle`,{cx:`6.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-a)`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-b)`})]})]}),magic:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51l.038-.04l4-4l.04-.038l-1.588-1.587a2.883 2.883 0 0 0-4.077 0m6.723 2.645l-.038.04l-4 4l-.04.038l9.588 9.588a2.884 2.884 0 0 0 4.078-4.078zM16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274zm3.867 6.823a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273zM5.133 15.307a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z`}),restart:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m18.364 8.05l-.707-.707a8 8 0 1 0 2.28 4.658m-1.573-3.95h-4.243m4.243 0V3.807`}),close:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`m14.5 9.5l-5 5m0-5l5 5`})]}),eye:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{d:`M3.275 15.296C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296C4.972 6.5 7.818 4 12 4s7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704Z`}),(0,l.jsx)(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z`})]}),"eye-closed":(0,l.jsx)(`path`,{fill:`currentColor`,d:`M2.69 6.705a.75.75 0 0 0-1.38.59zm12.897 6.624l-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818zm-2.67 1.353a.75.75 0 1 0 1.258.818zM22.69 7.295a.75.75 0 0 0-1.378-.59zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06zm-8.72 3.34a.75.75 0 0 0 1.5 0zm5.121-.591a.75.75 0 1 0 1.258-.818zm-10.84-4.25A.75.75 0 0 0 4.47 10.6zm-2.561.44a.75.75 0 0 0 1.06 1.06zM12 13.25c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28a12 12 0 0 1-.507-.946l-.022-.049l-.004-.01l-.001-.001L2 7l-.69.296h.001l.001.003l.003.006l.04.088q.039.088.117.243c.103.206.256.496.462.841c.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.313-.62c-.97.383-2.071.62-3.313.62v1.5c1.438 0 2.725-.276 3.862-.723zm-7.529.29l-1.413 2.17l1.258.818l1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013l-.028.062a12 12 0 0 1-.64 1.162a13.3 13.3 0 0 1-2.15 2.639l1.027 1.094a14.8 14.8 0 0 0 3.122-4.26l.039-.085l.01-.024l.004-.007v-.003h.001v-.001zm-3.513 3.582c-.86.806-1.913 1.552-3.174 2.049l.549 1.396c1.473-.58 2.685-1.444 3.651-2.351zm-.017 1.077l1.5 1.5l1.06-1.06l-1.5-1.5zM11.25 14v2.5h1.5V14zm3.709-.262l1.412 2.171l1.258-.818l-1.413-2.171zm-10.49-3.14l-1.5 1.5L4.03 13.16l1.5-1.5z`})},f=({name:e,size:t,className:n,...r})=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t??`1em`,height:t??`1em`,className:u(`inline-block shrink-0`,n),"aria-hidden":r[`aria-label`]?void 0:!0,...r,children:d[e]}),p={primary:`bg-primary text-primary-contrast hover:bg-primary-hover`,secondary:`bg-surface-2 text-content border border-border hover:bg-border`,ghost:`bg-transparent text-muted hover:text-content`,danger:`bg-[#EF5350] text-white hover:bg-[#e53935]`},m={sm:`text-[12px] px-3 py-1.5`,md:`text-[14px] px-4 py-2`,lg:`text-[16px] px-5 py-2.5`},h={sm:`gap-1.5`,md:`gap-2`,lg:`gap-2`},g=({variant:e=`primary`,size:t=`md`,isLoading:n=!1,leftIcon:r,rightIcon:i,className:a,children:o,disabled:s,...c})=>(0,l.jsxs)(`button`,{className:u(`group relative isolate overflow-hidden rounded-lg font-heading font-medium`,`inline-flex items-center justify-center`,`transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`active:scale-105 motion-reduce:active:scale-100`,`disabled:opacity-50 disabled:cursor-not-allowed`,p[e],m[t],a),disabled:s||n,...c,children:[e!==`ghost`&&(0,l.jsx)(`span`,{"aria-hidden":`true`,className:u(`pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12`,`bg-gradient-to-r from-transparent via-white/25 to-transparent`,`transition-transform duration-0 ease-out`,`group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden`)}),(0,l.jsxs)(`span`,{className:u(`inline-flex items-center`,h[t]),children:[n?(0,l.jsx)(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`}):r,(0,l.jsx)(`span`,{className:u(e===`ghost`&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:o}),!n&&i]})]}),_={ghost:`text-muted hover:bg-surface-2 hover:text-content`,surface:`bg-surface-2 text-muted border border-border hover:text-content`,solid:`bg-primary text-primary-contrast hover:bg-primary-hover`},v={sm:`h-7 w-7`,md:`h-9 w-9`},y=({variant:e=`ghost`,size:t=`md`,className:n,children:r,...i})=>(0,l.jsx)(`button`,{className:u(`inline-flex items-center justify-center rounded-lg transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:opacity-50 disabled:cursor-not-allowed`,_[e],v[t],n),...i,children:r});async function b(e){try{if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard API failed, trying fallback:`,e)}let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);try{let e=document.execCommand(`copy`);return document.body.removeChild(t),e}catch(e){return console.error(`execCommand copy failed:`,e),document.body.removeChild(t),!1}}catch(e){return console.error(`Failed to copy text:`,e),!1}}function x(e=2e3){let[t,n]=c.default.useState(!1),r=c.default.useRef(null);return c.default.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),{copy:async t=>{let i=await b(t);return i&&(n(!0),r.current&&clearTimeout(r.current),r.current=window.setTimeout(()=>{n(!1)},e)),i},copied:t}}var S=({value:e,variant:t=`surface`,size:n=`md`,className:r,label:i=`Copy to clipboard`})=>{let{copy:a,copied:o}=x(),s=n===`sm`?14:16;return(0,l.jsx)(y,{"aria-label":o?`Copied`:i,variant:t,size:n,className:r,onClick:()=>a(e),children:o?(0,l.jsx)(f,{name:`check`,size:s,className:`text-green-500`}):(0,l.jsx)(f,{name:`copy`,size:s})})},C={neutral:`bg-surface-2 text-muted border border-border`,primary:`bg-primary-soft text-primary border border-primary/30`,success:`bg-[#52b788]/15 text-[#52b788] border border-[#52b788]/25`,error:`bg-[#4A0F0F] text-[#FC7070] border border-[#FC7070]/20`,warning:`bg-amber-500/15 text-amber-500 border border-amber-500/30`,info:`bg-sky-500/15 text-sky-400 border border-sky-500/30`},w=({tone:e=`neutral`,className:t,children:n})=>(0,l.jsx)(`span`,{className:u(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]`,C[e],t),children:n}),T={GET:`success`,POST:`info`,PUT:`warning`,PATCH:`primary`,DELETE:`error`},ee=({method:e,className:t})=>(0,l.jsx)(w,{tone:T[e],className:t,children:e}),E=({status:e,statusText:t,className:n})=>(0,l.jsxs)(w,{tone:e>=200&&e<300?`success`:e>=300&&e<400?`warning`:`error`,className:n,children:[e,` `,t]}),D={sm:`h-4 w-4 rounded`,md:`h-5 w-5 rounded-md`},O={sm:`h-3 w-3`,md:`h-3.5 w-3.5`},k={sm:`text-xs`,md:`text-sm`},te=({checked:e,onChange:t,label:n,disabled:r,size:i=`md`,className:a,"aria-label":o})=>{let s=(0,l.jsx)(`button`,{type:`button`,role:`checkbox`,"aria-checked":e,"aria-label":o??n,disabled:r,onClick:()=>t(!e),className:u(`inline-flex shrink-0 items-center justify-center border transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-50`,D[i],e?`border-primary bg-primary text-primary-contrast`:`border-border bg-surface-2 text-transparent hover:border-primary/70`),children:(0,l.jsx)(f,{name:`check`,className:O[i]})});return n?(0,l.jsxs)(`label`,{className:u(`inline-flex cursor-pointer select-none items-center gap-2`,a),children:[s,(0,l.jsx)(`span`,{className:u(`text-content`,k[i]),children:n})]}):(0,l.jsx)(`span`,{className:a,children:s})},A=({label:e,flush:t,className:n,children:r})=>(0,l.jsxs)(`div`,{className:`w-full`,children:[e&&(0,l.jsx)(`div`,{className:`mb-2 text-sm text-muted`,children:e}),(0,l.jsx)(`div`,{className:u(`rounded-xl border border-border bg-surface`,!t&&`p-3`,n),children:r})]}),j=({items:e,activeId:t,onChange:n,variant:r=`underline`,size:i=`md`,className:a})=>{let o=(0,c.useRef)({}),[s,d]=(0,c.useState)({left:0,top:0,width:0,height:0});return(0,c.useLayoutEffect)(()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})},[t,e]),(0,c.useEffect)(()=>{let e=()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[t]),r===`segmented`?(0,l.jsxs)(`div`,{className:u(`relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1`,a),children:[(0,l.jsx)(`span`,{className:`pointer-events-none absolute z-0 rounded-md bg-primary transition-all duration-300 ease-out`,style:{left:s.left,top:s.top,width:s.width,height:s.height}}),e.map(e=>{let r=e.id===t;return(0,l.jsx)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150`,i===`sm`?`px-2.5 py-1 text-[12px]`:`px-3 py-1.5 text-[14px]`,r?`text-primary-contrast`:`text-muted`),children:(0,l.jsxs)(`span`,{className:u(`relative z-10`,!r&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`ml-1.5 opacity-70`,children:e.badge})]})},e.id)})]}):(0,l.jsxs)(`div`,{className:u(`relative flex gap-1 border-b border-border`,a),children:[e.map(e=>{let r=e.id===t;return(0,l.jsxs)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150`,i===`sm`?`px-2 py-2 text-[12px]`:`px-3 py-2.5 text-[14px]`,r?`text-content`:`text-muted hover:text-content`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`text-xs text-muted`,children:e.badge})]},e.id)}),(0,l.jsx)(`span`,{className:`pointer-events-none absolute -bottom-px h-0.5 rounded-full bg-primary transition-all duration-300 ease-out`,style:{left:s.left,width:s.width}})]})},M={sm:`gap-1.5 rounded-md px-2.5`,md:`gap-2 rounded-lg px-3`,lg:`gap-2.5 rounded-lg px-4`},N={sm:`py-1.5 text-[12px]`,md:`py-2 text-sm`,lg:`py-2.5 text-base`},ne={sm:`mb-1 text-xs`,md:`mb-1.5 text-sm`,lg:`mb-2 text-sm`},P={sm:`mt-1 text-[11px]`,md:`mt-1 text-xs`,lg:`mt-1.5 text-xs`},F=({label:e,error:t,hint:n,size:r=`md`,leftSlot:i,rightSlot:a,className:o,containerClassName:s,id:d,...f})=>{let p=(0,c.useId)(),m=d??p;return(0,l.jsxs)(`div`,{className:u(`w-full`,s),children:[e&&(0,l.jsx)(`label`,{htmlFor:m,className:u(`block font-medium text-muted`,ne[r]),children:e}),(0,l.jsxs)(`div`,{className:u(`flex items-center border bg-surface-2`,`focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15`,M[r],t?`border-red-500`:`border-border`),children:[i,(0,l.jsx)(`input`,{id:m,className:u(`w-full bg-transparent text-content placeholder:text-muted`,`focus:outline-none disabled:cursor-not-allowed disabled:opacity-60`,N[r],o),...f}),a]}),t?(0,l.jsx)(`p`,{className:u(`text-red-500`,P[r]),children:t}):n?(0,l.jsx)(`p`,{className:u(`text-muted`,P[r]),children:n}):null]})},re={sm:`gap-1.5 px-2.5 py-1.5 text-[12px]`,md:`gap-1 px-2 py-1.5 text-[14px]`},ie={sm:`px-2.5 py-1.5 text-[12px]`,md:`px-3 py-1.5 text-[14px]`};function ae({items:e,value:t,onChange:n,size:r=`md`,disabled:i,minWidthClassName:a=`min-w-[7rem]`,className:o}){let[s,d]=(0,c.useState)(!1),[p,m]=(0,c.useState)(!1),h=(0,c.useRef)(null),g=e.find(e=>e.id===t)??e[0];(0,c.useEffect)(()=>{if(s){m(!0);return}let e=window.setTimeout(()=>m(!1),200);return()=>window.clearTimeout(e)},[s]),(0,c.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&d(!1)},t=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let _=e=>{i||(n(e),d(!1))};return(0,l.jsxs)(`div`,{ref:h,className:u(`relative inline-flex`,o),children:[(0,l.jsxs)(`button`,{type:`button`,"aria-haspopup":`listbox`,"aria-expanded":s,disabled:i,onClick:()=>d(e=>!e),className:u(`inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-60`,re[r],g?.className??`text-content hover:bg-surface-2`),children:[g?.label,(0,l.jsx)(f,{name:`chevron-down`,className:u(`h-4 w-4 text-muted transition-transform duration-200`,s&&`rotate-180`)})]}),p&&(0,l.jsx)(`div`,{className:u(`absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]`,a,s?`motion-safe:animate-[dropdown-expand_0.2s_ease-out]`:`motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]`),children:(0,l.jsx)(`ul`,{role:`listbox`,className:`min-h-0 overflow-hidden p-1`,children:e.map(e=>{let n=e.id===t;return(0,l.jsx)(`li`,{role:`option`,"aria-selected":n,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>_(e.id),className:u(`flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2`,ie[r],e.className??`text-muted hover:text-content`,n&&`bg-surface-2`),children:[e.label,n&&(0,l.jsx)(f,{name:`check`,className:`h-4 w-4`})]})},e.id)})})})]})}var oe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],se={GET:`text-[#52b788]`,POST:`text-sky-400`,PUT:`text-amber-400`,PATCH:`text-primary`,DELETE:`text-red-400`},ce=e=>e.map(e=>({id:e,label:e,className:`${se[e]} font-semibold`})),le=({value:e,onChange:t,methods:n=oe,disabled:r,className:i})=>(0,l.jsx)(ae,{value:e,onChange:t,items:ce(n),disabled:r,minWidthClassName:`min-w-[7rem]`,className:i}),ue={json:[{type:`property`,pattern:/"(?:\\.|[^"\\])*"(?=\s*:)/y},{type:`string`,pattern:/"(?:\\.|[^"\\])*"/y},{type:`number`,pattern:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/iy},{type:`boolean`,pattern:/\b(?:true|false)\b/y},{type:`keyword`,pattern:/\bnull\b/y},{type:`operator`,pattern:/:/y},{type:`punctuation`,pattern:/[{}[\],]/y}],bash:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'(?:[^']*)'|"(?:\\.|[^"\\])*"/y},{type:`function`,pattern:/\b(?:curl|wget|fetch|http|httpie)\b/y},{type:`variable`,pattern:/\$[A-Za-z_][\w]*|\$\{[^}]+\}/y},{type:`keyword`,pattern:/\b(?:if|then|else|fi|for|do|done|while|case|esac)\b/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/&&|\|\||[|&;=<>]/y},{type:`punctuation`,pattern:/\\|[()[\]{}]/y},{type:`builtin`,pattern:/-{1,2}[A-Za-z][\w-]*/y}],javascript:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`/y},{type:`keyword`,pattern:/\b(?:await|async|const|let|var|return|if|else|for|while|try|catch|throw|new|import|export|from|function|class)\b/y},{type:`boolean`,pattern:/\b(?:true|false|null|undefined)\b/y},{type:`function`,pattern:/\b[A-Za-z_$][\w$]*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/=>|===|!==|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!?:]/y},{type:`punctuation`,pattern:/[()[\]{}.,;]/y}],python:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'''[\s\S]*?'''|"""[\s\S]*?"""|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:import|from|as|def|class|return|if|elif|else|for|while|try|except|with|lambda|pass|None|True|False|and|or|not|in|is)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/==|!=|<=|>=|:=|[+\-*/%=<>]/y},{type:`punctuation`,pattern:/[()[\]{}.,:;]/y}],go:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/`[^`]*`|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|switch|default|nil|true|false)\b/y},{type:`builtin`,pattern:/\b(?:append|bool|byte|cap|close|complex64|complex128|copy|delete|error|float32|float64|int|int8|int16|int32|int64|len|make|new|panic|print|println|real|recover|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/:=|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!&|]/y},{type:`punctuation`,pattern:/[()[\]{}.,;:]/y}]};function de(e,t,n){for(let r of n){r.pattern.lastIndex=t;let n=r.pattern.exec(e);if(n?.index===t&&n[0])return{type:r.type,value:n[0]}}return null}function fe(e,t){if(t===`plain`||!e)return e;let n=ue[t],r=[],i=``,a=0,o=0;for(;a<e.length;){let t=de(e,a,n);if(!t){i+=e[a],a+=1;continue}i&&=(r.push(i),``),r.push((0,l.jsx)(`span`,{className:`token ${t.type}`,children:t.value},o)),o+=1,a+=t.value.length}return i&&r.push(i),r}var I=({code:e,language:t=`plain`,showLineNumbers:n=!1,copyable:r=!0,maxHeight:i,reveal:a=!1,revealStagger:o=70,className:s})=>{let d=(0,c.useMemo)(()=>e.replace(/\n$/,``).split(`
4
- `),[e]),f=String(d.length).length;return(0,l.jsxs)(`div`,{className:u(`group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2`,s),children:[r&&(0,l.jsx)(`div`,{className:`absolute right-2 top-2 z-10`,children:(0,l.jsx)(S,{value:e,size:`sm`})}),(0,l.jsx)(`div`,{className:`overflow-auto`,style:i?{maxHeight:i}:void 0,children:(0,l.jsx)(`pre`,{className:`w-max min-w-full p-3 font-mono text-[14px] leading-relaxed text-content`,children:(0,l.jsx)(`code`,{className:`flex flex-col bg-transparent p-0 text-[14px] text-content`,children:d.map((e,r)=>(0,l.jsxs)(`span`,{className:u(`flex`,a&&`motion-safe:animate-[fade-in_0.6s_ease-out_both]`),style:a?{animationDelay:`${r*o}ms`}:void 0,children:[n&&(0,l.jsx)(`span`,{className:`mr-4 shrink-0 select-none text-right text-muted`,style:{width:`${f}ch`},children:r+1}),(0,l.jsx)(`span`,{className:`whitespace-pre`,children:fe(e,t)||` `})]},r))})})})]})},L=new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]);function pe(e){return!e.auth||e.auth.type===`none`?null:e.auth.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.auth.token}`}:{key:e.auth.key,value:e.auth.value}}function me(e){let t=new Headers;for(let n of e.headers??[])n.key.trim()&&(L.has(n.key.trim().toLowerCase())||t.set(n.key,n.value));let n=pe(e);return n&&!L.has(n.key.toLowerCase())&&t.set(n.key,n.value),t}function he(e){return[...e.entries()].map(([e,t])=>({key:e,value:t}))}function R(e){let t=new TextEncoder().encode(e).length;return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function ge(e,t){if(!(t?.includes(`json`)||/^[\s\n]*(?:\[|\{)/.test(e)))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function _e(e){return e instanceof Error?e.message:`Request failed`}function z(e,t=performance.now()){let n=_e(e);return{status:0,statusText:`Network Error`,headers:[],body:JSON.stringify({error:n,hint:`The browser may have blocked this request because of CORS or network policy.`},null,2),timeMs:Math.round(performance.now()-t),size:`0 B`,error:n}}async function B(e){let t=performance.now();try{let n=await fetch(e.url,{method:e.method,headers:me(e),body:e.body&&e.method!==`GET`?e.body:void 0}),r=await n.text(),i=ge(r,n.headers.get(`content-type`));return{status:n.status,statusText:n.statusText||(n.ok?`OK`:`Error`),headers:he(n.headers),body:i,timeMs:Math.round(performance.now()-t),size:R(r)}}catch(e){return z(e,t)}}function V(e){let t=e.sampleResponse??JSON.stringify({ok:!0,request:e.title},null,2);return{status:200,statusText:`OK`,headers:[{key:`content-type`,value:`application/json`},{key:`cache-control`,value:`no-store`}],body:t,timeMs:142,size:R(t)}}var H=`Authorization`,U=`Bearer `,ve=[{key:`Content-Type`,value:`application/json`,enabled:!0}];function ye(e){return e.type===`none`?null:e.type===`bearer`?{key:H,value:`${U}${e.token}`,enabled:!0}:{key:e.key,value:e.value,enabled:!0}}function W(e,t){return e.toLowerCase()===t.toLowerCase()}function be(e){return e.toLowerCase().startsWith(U.toLowerCase())}function xe(e){return be(e)?e.slice(7):e}function Se(e){return e?W(e.key,H)&&be(e.value)?{type:`bearer`,token:xe(e.value)}:{type:`apiKey`,key:e.key||H,value:e.value,in:`header`}:{type:`none`}}function Ce(e){return e.type===`apiKey`?e.key:H}function G(e,t){return t.type===`none`?W(e.key,H):W(e.key,Ce(t))}function we(e){return e.auth?e.auth:Se(e.headers?.find(e=>W(e.key,H)))}function Te(e,t){let n=(e.headers?.length?e.headers:ve).filter(e=>!G(e,t)).map(e=>({...e,enabled:!0})),r=ye(t);return r?[...n,r]:n}function Ee(e,t,n){if(t.type===`none`)return e.map(e=>G(e,n)||W(e.key,H)?{...e,enabled:!1}:e);let r=ye(t);return r?[...e.filter(e=>!G(e,n)&&!G(e,t)),r]:e}function De(e,t){return e.filter(e=>e.enabled&&e.key.trim()&&!G(e,t)).map(({key:e,value:t})=>({key:e,value:t}))}function K(e){return JSON.stringify({method:e.method,url:e.url,headers:e.headers??[],auth:e.auth??{type:`none`},body:e.body??``})}function Oe(e,t){let n=t.body.trim()?t.body:void 0;return{...e,method:t.method,url:t.url,body:n,auth:t.auth,headers:De(t.headers,t.auth)}}var ke=`{
3
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");function u(...e){return e.filter(Boolean).join(` `)}var d={copy:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593s1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.6 3.6 0 0 0 15.24 2`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847S21 8.671 21 11.397v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936z`})]}),check:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m4 12.9l3.143 3.6L15 7.5m5 .063l-8.572 9L11 16`}),download:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M3 15c0 2.828 0 4.243.879 5.121C4.757 21 6.172 21 9 21h6c2.828 0 4.243 0 5.121-.879C21 19.243 21 17.828 21 15M12 3v13m0 0l4-4.375M12 16l-4-4.375`}),send:(0,l.jsxs)(`g`,{fill:`none`,children:[(0,l.jsx)(`path`,{stroke:`currentColor`,strokeWidth:`1.5`,d:`m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z`}),(0,l.jsx)(`path`,{fill:`currentColor`,d:`M16.212 8.848a.75.75 0 0 0-1.055-1.066zm-5.55 5.488l5.55-5.488l-1.055-1.066l-5.55 5.488z`})]}),share:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinejoin:`round`,d:`M22 7h-8c-1.818 0-2.913.892-3.32 1.3q-.187.19-.19.19q0 .003-.19.19C9.892 9.087 9 10.182 9 12v3m13-8l-5-5m5 5l-5 5`}),(0,l.jsx)(`path`,{d:`M3.465 20.535C4.93 22 7.287 22 12.003 22c4.715 0 7.073 0 8.537-1.465c1.242-1.241 1.431-3.123 1.46-6.537M3.465 20.535C2 19.07 2 16.713 2 11.997m1.465 8.538C4.929 22 7.286 22 12 22s7.071 0 8.535-1.465c1.241-1.24 1.43-3.122 1.46-6.536m-18.53 6.536C2 19.071 2 16.714 2 12m1.465-8.54C4.706 2.218 6.588 2.029 10.002 2M2.055 8c.11-2.193.436-3.562 1.41-4.536c1.24-1.24 3.122-1.43 6.535-1.459`})]}),code:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,d:`m17 7.83l1.697 1.526c1.542 1.389 2.313 2.083 2.313 2.974c0 .89-.771 1.585-2.314 2.973L17 16.83M13.987 5L12 12.415l-1.987 7.415M7 7.83L5.304 9.356C3.76 10.745 2.99 11.44 2.99 12.33s.771 1.585 2.314 2.973L7 16.83`}),"arrow-left":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M20 12H4m0 0l6-6m-6 6l6 6`}),"arrow-right":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M4 12h16m0 0l-6-6m6 6l-6 6`}),"chevron-down":(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m19 9l-7 6l-7-6`}),trash:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.196.81-4.856.81h-.774c-2.66 0-3.991 0-4.856-.81c-.865-.809-.954-2.136-1.13-4.79l-.46-6.9M9.5 11l.5 5m4.5-5l-.5 5`}),(0,l.jsx)(`path`,{d:`M6.5 6h.11a2 2 0 0 0 1.83-1.32l.034-.103l.097-.291c.083-.249.125-.373.18-.479a1.5 1.5 0 0 1 1.094-.788C9.962 3 10.093 3 10.355 3h3.29c.262 0 .393 0 .51.019a1.5 1.5 0 0 1 1.094.788c.055.106.097.23.18.479l.097.291A2 2 0 0 0 17.5 6`})]}),plus:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`M15 12h-3m0 0H9m3 0V9m0 3v3`})]}),moon:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M12 22c5.523 0 10-4.477 10-10c0-.463-.694-.54-.933-.143a6.5 6.5 0 1 1-8.924-8.924C12.54 2.693 12.463 2 12 2C6.477 2 2 6.477 2 12s4.477 10 10 10`}),sun:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`path`,{fill:`currentColor`,d:`M17 12a5 5 0 1 1-10 0a5 5 0 0 1 10 0`}),(0,l.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M12 1.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0V2a.75.75 0 0 1 .75-.75M3.669 3.716a.75.75 0 0 1 1.06-.047L6.95 5.7a.75.75 0 1 1-1.012 1.107L3.716 4.776a.75.75 0 0 1-.047-1.06m16.662 0a.75.75 0 0 1-.047 1.06l-2.222 2.031A.75.75 0 0 1 17.05 5.7l2.222-2.031a.75.75 0 0 1 1.06.047M1.25 12a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1-.75-.75m18 0a.75.75 0 0 1 .75-.75h2a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1-.75-.75m-2.224 5.025a.75.75 0 0 1 1.06 0l2.222 2.223a.75.75 0 0 1-1.06 1.06l-2.222-2.222a.75.75 0 0 1 0-1.06m-10.051 0a.75.75 0 0 1 0 1.061l-2.223 2.222a.75.75 0 0 1-1.06-1.06l2.222-2.223a.75.75 0 0 1 1.06 0M12 19.25a.75.75 0 0 1 .75.75v2a.75.75 0 0 1-1.5 0v-2a.75.75 0 0 1 .75-.75`,clipRule:`evenodd`})]}),palette:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`mask`,{id:`solar-palette-a`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsx)(`mask`,{id:`solar-palette-b`,fill:`#fff`,children:(0,l.jsx)(`path`,{d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0`})}),(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,children:[(0,l.jsx)(`path`,{strokeWidth:`1.5`,d:`M2 12.026c0 5.146 3.867 9.387 8.847 9.96c.735.085 1.447-.228 1.97-.753a1.68 1.68 0 0 0 0-2.372c-.523-.525-.95-1.307-.555-1.934c1.576-2.508 9.738 3.251 9.738-4.9C22 6.488 17.523 2 12 2S2 6.489 2 12.026Z`}),(0,l.jsx)(`circle`,{cx:`17.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`circle`,{cx:`6.5`,cy:`11.5`,r:`.75`,strokeWidth:`1.5`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M11.085 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-a)`}),(0,l.jsx)(`path`,{strokeWidth:`3`,d:`M16 7a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0Z`,mask:`url(#solar-palette-b)`})]})]}),magic:(0,l.jsx)(`path`,{fill:`currentColor`,d:`M3.845 3.845a2.883 2.883 0 0 0 0 4.077L5.432 9.51l.038-.04l4-4l.04-.038l-1.588-1.587a2.883 2.883 0 0 0-4.077 0m6.723 2.645l-.038.04l-4 4l-.04.038l9.588 9.588a2.884 2.884 0 0 0 4.078-4.078zM16.1 2.307a.483.483 0 0 1 .9 0l.43 1.095a.48.48 0 0 0 .272.274l1.091.432a.486.486 0 0 1 0 .903l-1.09.432a.5.5 0 0 0-.273.273L17 6.81a.483.483 0 0 1-.9 0l-.43-1.095a.5.5 0 0 0-.273-.273l-1.09-.432a.486.486 0 0 1 0-.903l1.09-.432a.5.5 0 0 0 .273-.274zm3.867 6.823a.483.483 0 0 1 .9 0l.156.399c.05.125.148.224.273.273l.398.158a.486.486 0 0 1 0 .902l-.398.158a.5.5 0 0 0-.273.273l-.156.4a.483.483 0 0 1-.9 0l-.157-.4a.5.5 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.902l.398-.158a.5.5 0 0 0 .272-.273zM5.133 15.307a.483.483 0 0 1 .9 0l.157.4a.48.48 0 0 0 .272.273l.398.157a.486.486 0 0 1 0 .903l-.398.158a.48.48 0 0 0-.272.273l-.157.4a.483.483 0 0 1-.9 0l-.157-.4a.48.48 0 0 0-.272-.273l-.398-.158a.486.486 0 0 1 0-.903l.398-.157a.48.48 0 0 0 .272-.274z`}),restart:(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`m18.364 8.05l-.707-.707a8 8 0 1 0 2.28 4.658m-1.573-3.95h-4.243m4.243 0V3.807`}),close:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,l.jsx)(`path`,{strokeLinecap:`round`,d:`m14.5 9.5l-5 5m0-5l5 5`})]}),eye:(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,l.jsx)(`path`,{d:`M3.275 15.296C2.425 14.192 2 13.639 2 12c0-1.64.425-2.191 1.275-3.296C4.972 6.5 7.818 4 12 4s7.028 2.5 8.725 4.704C21.575 9.81 22 10.361 22 12c0 1.64-.425 2.191-1.275 3.296C19.028 17.5 16.182 20 12 20s-7.028-2.5-8.725-4.704Z`}),(0,l.jsx)(`path`,{d:`M15 12a3 3 0 1 1-6 0a3 3 0 0 1 6 0Z`})]}),"eye-closed":(0,l.jsx)(`path`,{fill:`currentColor`,d:`M2.69 6.705a.75.75 0 0 0-1.38.59zm12.897 6.624l-.274-.698zm-6.546.409a.75.75 0 1 0-1.257-.818zm-2.67 1.353a.75.75 0 1 0 1.258.818zM22.69 7.295a.75.75 0 0 0-1.378-.59zM19 11.13l-.513-.547zm.97 2.03a.75.75 0 1 0 1.06-1.06zm-8.72 3.34a.75.75 0 0 0 1.5 0zm5.121-.591a.75.75 0 1 0 1.258-.818zm-10.84-4.25A.75.75 0 0 0 4.47 10.6zm-2.561.44a.75.75 0 0 0 1.06 1.06zM12 13.25c-3.224 0-5.539-1.605-7.075-3.26a13.6 13.6 0 0 1-1.702-2.28a12 12 0 0 1-.507-.946l-.022-.049l-.004-.01l-.001-.001L2 7l-.69.296h.001l.001.003l.003.006l.04.088q.039.088.117.243c.103.206.256.496.462.841c.41.69 1.035 1.61 1.891 2.533C5.54 12.855 8.224 14.75 12 14.75zm3.313-.62c-.97.383-2.071.62-3.313.62v1.5c1.438 0 2.725-.276 3.862-.723zm-7.529.29l-1.413 2.17l1.258.818l1.412-2.171zM22 7l-.69-.296h.001v.002l-.007.013l-.028.062a12 12 0 0 1-.64 1.162a13.3 13.3 0 0 1-2.15 2.639l1.027 1.094a14.8 14.8 0 0 0 3.122-4.26l.039-.085l.01-.024l.004-.007v-.003h.001v-.001zm-3.513 3.582c-.86.806-1.913 1.552-3.174 2.049l.549 1.396c1.473-.58 2.685-1.444 3.651-2.351zm-.017 1.077l1.5 1.5l1.06-1.06l-1.5-1.5zM11.25 14v2.5h1.5V14zm3.709-.262l1.412 2.171l1.258-.818l-1.413-2.171zm-10.49-3.14l-1.5 1.5L4.03 13.16l1.5-1.5z`})},f=({name:e,size:t,className:n,...r})=>(0,l.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t??`1em`,height:t??`1em`,className:u(`inline-block shrink-0`,n),"aria-hidden":r[`aria-label`]?void 0:!0,...r,children:d[e]}),p={primary:`bg-primary text-primary-contrast hover:bg-primary-hover`,secondary:`bg-surface-2 text-content border border-border hover:bg-border`,ghost:`bg-transparent text-muted hover:text-content`,danger:`bg-[#EF5350] text-white hover:bg-[#e53935]`},m={sm:`text-[12px] px-3 py-1.5`,md:`text-[14px] px-4 py-2`,lg:`text-[16px] px-5 py-2.5`},h={sm:`gap-1.5`,md:`gap-2`,lg:`gap-2`},g=({variant:e=`primary`,size:t=`md`,isLoading:n=!1,leftIcon:r,rightIcon:i,className:a,children:o,disabled:s,...c})=>(0,l.jsxs)(`button`,{className:u(`group relative isolate overflow-hidden rounded-lg font-heading font-medium`,`inline-flex items-center justify-center`,`transition duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`active:scale-105 motion-reduce:active:scale-100`,`disabled:opacity-50 disabled:cursor-not-allowed`,p[e],m[t],a),disabled:s||n,...c,children:[e!==`ghost`&&(0,l.jsx)(`span`,{"aria-hidden":`true`,className:u(`pointer-events-none absolute inset-0 -z-10 -translate-x-full -skew-x-12`,`bg-gradient-to-r from-transparent via-white/25 to-transparent`,`transition-transform duration-0 ease-out`,`group-hover:translate-x-full group-hover:duration-[1200ms] group-disabled:hidden`)}),(0,l.jsxs)(`span`,{className:u(`inline-flex items-center`,h[t]),children:[n?(0,l.jsx)(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`}):r,(0,l.jsx)(`span`,{className:u(e===`ghost`&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover:text-transparent group-hover:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:o}),!n&&i]})]}),_={ghost:`text-muted hover:bg-surface-2 hover:text-content`,surface:`bg-surface-2 text-muted border border-border hover:text-content`,solid:`bg-primary text-primary-contrast hover:bg-primary-hover`},v={sm:`h-7 w-7`,md:`h-9 w-9`},y=({variant:e=`ghost`,size:t=`md`,className:n,children:r,...i})=>(0,l.jsx)(`button`,{className:u(`inline-flex items-center justify-center rounded-lg transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:opacity-50 disabled:cursor-not-allowed`,_[e],v[t],n),...i,children:r});async function b(e){try{if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(e){console.warn(`Clipboard API failed, trying fallback:`,e)}let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.focus(),t.select(),t.setSelectionRange(0,t.value.length);try{let e=document.execCommand(`copy`);return document.body.removeChild(t),e}catch(e){return console.error(`execCommand copy failed:`,e),document.body.removeChild(t),!1}}catch(e){return console.error(`Failed to copy text:`,e),!1}}function x(e=2e3){let[t,n]=c.default.useState(!1),r=c.default.useRef(null);return c.default.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]),{copy:async t=>{let i=await b(t);return i&&(n(!0),r.current&&clearTimeout(r.current),r.current=window.setTimeout(()=>{n(!1)},e)),i},copied:t}}var S=({value:e,variant:t=`surface`,size:n=`md`,className:r,label:i=`Copy to clipboard`})=>{let{copy:a,copied:o}=x(),s=n===`sm`?14:16;return(0,l.jsx)(y,{"aria-label":o?`Copied`:i,variant:t,size:n,className:r,onClick:()=>a(e),children:o?(0,l.jsx)(f,{name:`check`,size:s,className:`text-green-500`}):(0,l.jsx)(f,{name:`copy`,size:s})})},C={neutral:`bg-surface-2 text-muted border border-border`,primary:`bg-primary-soft text-primary border border-primary/30`,success:`bg-[#52b788]/15 text-[#52b788] border border-[#52b788]/25`,error:`bg-[#4A0F0F] text-[#FC7070] border border-[#FC7070]/20`,warning:`bg-amber-500/15 text-amber-500 border border-amber-500/30`,info:`bg-sky-500/15 text-sky-400 border border-sky-500/30`},w=({tone:e=`neutral`,className:t,children:n})=>(0,l.jsx)(`span`,{className:u(`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-heading font-[550]`,C[e],t),children:n}),ee={GET:`success`,POST:`info`,PUT:`warning`,PATCH:`primary`,DELETE:`error`},T=({method:e,className:t})=>(0,l.jsx)(w,{tone:ee[e],className:t,children:e}),E=({status:e,statusText:t,className:n})=>(0,l.jsxs)(w,{tone:e>=200&&e<300?`success`:e>=300&&e<400?`warning`:`error`,className:n,children:[e,` `,t]}),te={sm:`h-4 w-4 rounded`,md:`h-5 w-5 rounded-md`},D={sm:`h-3 w-3`,md:`h-3.5 w-3.5`},ne={sm:`text-xs`,md:`text-sm`},O=({checked:e,onChange:t,label:n,disabled:r,size:i=`md`,className:a,"aria-label":o})=>{let s=(0,l.jsx)(`button`,{type:`button`,role:`checkbox`,"aria-checked":e,"aria-label":o??n,disabled:r,onClick:()=>t(!e),className:u(`inline-flex shrink-0 items-center justify-center border transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-50`,te[i],e?`border-primary bg-primary text-primary-contrast`:`border-border bg-surface-2 text-transparent hover:border-primary/70`),children:(0,l.jsx)(f,{name:`check`,className:D[i]})});return n?(0,l.jsxs)(`label`,{className:u(`inline-flex cursor-pointer select-none items-center gap-2`,a),children:[s,(0,l.jsx)(`span`,{className:u(`text-content`,ne[i]),children:n})]}):(0,l.jsx)(`span`,{className:a,children:s})},k=({label:e,flush:t,className:n,children:r})=>(0,l.jsxs)(`div`,{className:`w-full`,children:[e&&(0,l.jsx)(`div`,{className:`mb-2 text-sm text-muted`,children:e}),(0,l.jsx)(`div`,{className:u(`rounded-xl border border-border bg-surface`,!t&&`p-3`,n),children:r})]}),A=({items:e,activeId:t,onChange:n,variant:r=`underline`,size:i=`md`,className:a})=>{let o=(0,c.useRef)({}),[s,d]=(0,c.useState)({left:0,top:0,width:0,height:0});return(0,c.useLayoutEffect)(()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})},[t,e]),(0,c.useEffect)(()=>{let e=()=>{let e=o.current[t];e&&d({left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[t]),r===`segmented`?(0,l.jsxs)(`div`,{className:u(`relative inline-flex gap-1 rounded-lg border border-border bg-surface-2 p-1`,a),children:[(0,l.jsx)(`span`,{className:`pointer-events-none absolute z-0 rounded-md bg-primary transition-all duration-300 ease-out`,style:{left:s.left,top:s.top,width:s.width,height:s.height}}),e.map(e=>{let r=e.id===t;return(0,l.jsx)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`group/seg relative z-10 cursor-pointer rounded-md font-heading transition-colors duration-150`,i===`sm`?`px-2.5 py-1 text-[12px]`:`px-3 py-1.5 text-[14px]`,r?`text-primary-contrast`:`text-muted`),children:(0,l.jsxs)(`span`,{className:u(`relative z-10`,!r&&`bg-gradient-to-r from-muted via-content to-muted bg-[length:200%_100%] bg-clip-text group-hover/seg:text-transparent group-hover/seg:[animation:text-shimmer_1.2s_linear_1_forwards]`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`ml-1.5 opacity-70`,children:e.badge})]})},e.id)})]}):(0,l.jsxs)(`div`,{className:u(`relative flex gap-1 border-b border-border`,a),children:[e.map(e=>{let r=e.id===t;return(0,l.jsxs)(`button`,{ref:t=>{o.current[e.id]=t},onClick:()=>n(e.id),className:u(`inline-flex cursor-pointer items-center gap-1.5 font-heading transition-colors duration-150`,i===`sm`?`px-2 py-2 text-[12px]`:`px-3 py-2.5 text-[14px]`,r?`text-content`:`text-muted hover:text-content`),children:[e.label,e.badge!==void 0&&(0,l.jsx)(`span`,{className:`text-xs text-muted`,children:e.badge})]},e.id)}),(0,l.jsx)(`span`,{className:`pointer-events-none absolute -bottom-px h-0.5 rounded-full bg-primary transition-all duration-300 ease-out`,style:{left:s.left,width:s.width}})]})},j={sm:`gap-1.5 rounded-md px-2.5`,md:`gap-2 rounded-lg px-3`,lg:`gap-2.5 rounded-lg px-4`},M={sm:`py-1.5 text-[12px]`,md:`py-2 text-sm`,lg:`py-2.5 text-base`},N={sm:`mb-1 text-xs`,md:`mb-1.5 text-sm`,lg:`mb-2 text-sm`},P={sm:`mt-1 text-[11px]`,md:`mt-1 text-xs`,lg:`mt-1.5 text-xs`},F=({label:e,error:t,hint:n,size:r=`md`,leftSlot:i,rightSlot:a,className:o,containerClassName:s,id:d,...f})=>{let p=(0,c.useId)(),m=d??p;return(0,l.jsxs)(`div`,{className:u(`w-full`,s),children:[e&&(0,l.jsx)(`label`,{htmlFor:m,className:u(`block font-medium text-muted`,N[r]),children:e}),(0,l.jsxs)(`div`,{className:u(`flex items-center border bg-surface-2`,`focus-within:border-primary/70 focus-within:ring-2 focus-within:ring-primary/15`,j[r],t?`border-red-500`:`border-border`),children:[i,(0,l.jsx)(`input`,{id:m,className:u(`w-full bg-transparent text-content placeholder:text-muted`,`focus:outline-none disabled:cursor-not-allowed disabled:opacity-60`,M[r],o),...f}),a]}),t?(0,l.jsx)(`p`,{className:u(`text-red-500`,P[r]),children:t}):n?(0,l.jsx)(`p`,{className:u(`text-muted`,P[r]),children:n}):null]})},I={sm:`gap-1.5 px-2.5 py-1.5 text-[12px]`,md:`gap-1 px-2 py-1.5 text-[14px]`},re={sm:`px-2.5 py-1.5 text-[12px]`,md:`px-3 py-1.5 text-[14px]`};function ie({items:e,value:t,onChange:n,size:r=`md`,disabled:i,minWidthClassName:a=`min-w-[7rem]`,className:o}){let[s,d]=(0,c.useState)(!1),[p,m]=(0,c.useState)(!1),h=(0,c.useRef)(null),g=e.find(e=>e.id===t)??e[0];(0,c.useEffect)(()=>{if(s){m(!0);return}let e=window.setTimeout(()=>m(!1),200);return()=>window.clearTimeout(e)},[s]),(0,c.useEffect)(()=>{if(!s)return;let e=e=>{h.current&&!h.current.contains(e.target)&&d(!1)},t=e=>{e.key===`Escape`&&d(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[s]);let _=e=>{i||(n(e),d(!1))};return(0,l.jsxs)(`div`,{ref:h,className:u(`relative inline-flex`,o),children:[(0,l.jsxs)(`button`,{type:`button`,"aria-haspopup":`listbox`,"aria-expanded":s,disabled:i,onClick:()=>d(e=>!e),className:u(`inline-flex cursor-pointer items-center rounded-md font-heading transition-colors duration-150`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,`disabled:cursor-not-allowed disabled:opacity-60`,I[r],g?.className??`text-content hover:bg-surface-2`),children:[g?.label,(0,l.jsx)(f,{name:`chevron-down`,className:u(`h-4 w-4 text-muted transition-transform duration-200`,s&&`rotate-180`)})]}),p&&(0,l.jsx)(`div`,{className:u(`absolute left-0 top-full z-20 mt-1 grid overflow-hidden rounded-lg border border-border bg-surface shadow-lg [grid-template-rows:1fr]`,a,s?`motion-safe:animate-[dropdown-expand_0.2s_ease-out]`:`motion-safe:animate-[dropdown-expand_0.18s_ease-in_reverse_forwards]`),children:(0,l.jsx)(`ul`,{role:`listbox`,className:`min-h-0 overflow-hidden p-1`,children:e.map(e=>{let n=e.id===t;return(0,l.jsx)(`li`,{role:`option`,"aria-selected":n,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>_(e.id),className:u(`flex w-full cursor-pointer items-center justify-between rounded-md font-heading transition-colors duration-150 hover:bg-surface-2`,re[r],e.className??`text-muted hover:text-content`,n&&`bg-surface-2`),children:[e.label,n&&(0,l.jsx)(f,{name:`check`,className:`h-4 w-4`})]})},e.id)})})})]})}var ae=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],oe={GET:`text-[#52b788]`,POST:`text-sky-400`,PUT:`text-amber-400`,PATCH:`text-primary`,DELETE:`text-red-400`},se=e=>e.map(e=>({id:e,label:e,className:`${oe[e]} font-semibold`})),ce=({value:e,onChange:t,methods:n=ae,disabled:r,className:i})=>(0,l.jsx)(ie,{value:e,onChange:t,items:se(n),disabled:r,minWidthClassName:`min-w-[7rem]`,className:i}),le={json:[{type:`property`,pattern:/"(?:\\.|[^"\\])*"(?=\s*:)/y},{type:`string`,pattern:/"(?:\\.|[^"\\])*"/y},{type:`number`,pattern:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/iy},{type:`boolean`,pattern:/\b(?:true|false)\b/y},{type:`keyword`,pattern:/\bnull\b/y},{type:`operator`,pattern:/:/y},{type:`punctuation`,pattern:/[{}[\],]/y}],bash:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'(?:[^']*)'|"(?:\\.|[^"\\])*"/y},{type:`function`,pattern:/\b(?:curl|wget|fetch|http|httpie)\b/y},{type:`variable`,pattern:/\$[A-Za-z_][\w]*|\$\{[^}]+\}/y},{type:`keyword`,pattern:/\b(?:if|then|else|fi|for|do|done|while|case|esac)\b/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/&&|\|\||[|&;=<>]/y},{type:`punctuation`,pattern:/\\|[()[\]{}]/y},{type:`builtin`,pattern:/-{1,2}[A-Za-z][\w-]*/y}],javascript:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|`(?:\\.|[^`\\])*`/y},{type:`keyword`,pattern:/\b(?:await|async|const|let|var|return|if|else|for|while|try|catch|throw|new|import|export|from|function|class)\b/y},{type:`boolean`,pattern:/\b(?:true|false|null|undefined)\b/y},{type:`function`,pattern:/\b[A-Za-z_$][\w$]*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/=>|===|!==|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!?:]/y},{type:`punctuation`,pattern:/[()[\]{}.,;]/y}],python:[{type:`comment`,pattern:/#.*/y},{type:`string`,pattern:/'''[\s\S]*?'''|"""[\s\S]*?"""|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:import|from|as|def|class|return|if|elif|else|for|while|try|except|with|lambda|pass|None|True|False|and|or|not|in|is)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/==|!=|<=|>=|:=|[+\-*/%=<>]/y},{type:`punctuation`,pattern:/[()[\]{}.,:;]/y}],go:[{type:`comment`,pattern:/\/\/.*|\/\*.*?\*\//y},{type:`string`,pattern:/`[^`]*`|'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"/y},{type:`keyword`,pattern:/\b(?:package|import|func|var|const|type|struct|interface|return|if|else|for|range|go|defer|select|case|switch|default|nil|true|false)\b/y},{type:`builtin`,pattern:/\b(?:append|bool|byte|cap|close|complex64|complex128|copy|delete|error|float32|float64|int|int8|int16|int32|int64|len|make|new|panic|print|println|real|recover|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\b/y},{type:`function`,pattern:/\b[A-Za-z_]\w*(?=\s*\()/y},{type:`number`,pattern:/\b\d+(?:\.\d+)?\b/y},{type:`operator`,pattern:/:=|==|!=|<=|>=|\+\+|--|&&|\|\||[+\-*/%=<>!&|]/y},{type:`punctuation`,pattern:/[()[\]{}.,;:]/y}]};function ue(e,t,n){for(let r of n){r.pattern.lastIndex=t;let n=r.pattern.exec(e);if(n?.index===t&&n[0])return{type:r.type,value:n[0]}}return null}function de(e,t){if(t===`plain`||!e)return e;let n=le[t],r=[],i=``,a=0,o=0;for(;a<e.length;){let t=ue(e,a,n);if(!t){i+=e[a],a+=1;continue}i&&=(r.push(i),``),r.push((0,l.jsx)(`span`,{className:`token ${t.type}`,children:t.value},o)),o+=1,a+=t.value.length}return i&&r.push(i),r}var L=({code:e,language:t=`plain`,showLineNumbers:n=!1,copyable:r=!0,maxHeight:i,reveal:a=!1,revealStagger:o=70,className:s})=>{let d=(0,c.useMemo)(()=>e.replace(/\n$/,``).split(`
4
+ `),[e]),f=String(d.length).length;return(0,l.jsxs)(`div`,{className:u(`group relative w-full overflow-hidden rounded-lg border border-border bg-surface-2`,s),children:[r&&(0,l.jsx)(`div`,{className:`absolute right-2 top-2 z-10`,children:(0,l.jsx)(S,{value:e,size:`sm`})}),(0,l.jsx)(`div`,{className:`overflow-auto`,style:i?{maxHeight:i}:void 0,children:(0,l.jsx)(`pre`,{className:`w-max min-w-full p-3 font-mono text-[14px] leading-relaxed text-content`,children:(0,l.jsx)(`code`,{className:`flex flex-col bg-transparent p-0 text-[14px] text-content`,children:d.map((e,r)=>(0,l.jsxs)(`span`,{className:u(`flex`,a&&`motion-safe:animate-[fade-in_0.6s_ease-out_both]`),style:a?{animationDelay:`${r*o}ms`}:void 0,children:[n&&(0,l.jsx)(`span`,{className:`mr-4 shrink-0 select-none text-right text-muted`,style:{width:`${f}ch`},children:r+1}),(0,l.jsx)(`span`,{className:`whitespace-pre`,children:de(e,t)||` `})]},r))})})})]})},R=new Set([`accept-charset`,`accept-encoding`,`access-control-request-headers`,`access-control-request-method`,`connection`,`content-length`,`cookie`,`cookie2`,`date`,`dnt`,`expect`,`host`,`keep-alive`,`origin`,`referer`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`via`]);function fe(e){return!e.auth||e.auth.type===`none`?null:e.auth.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.auth.token}`}:{key:e.auth.key,value:e.auth.value}}function pe(e){let t=new Headers;for(let n of e.headers??[])n.key.trim()&&(R.has(n.key.trim().toLowerCase())||t.set(n.key,n.value));let n=fe(e);return n&&!R.has(n.key.toLowerCase())&&t.set(n.key,n.value),t}function me(e){return[...e.entries()].map(([e,t])=>({key:e,value:t}))}function z(e){let t=new TextEncoder().encode(e).length;return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function he(e,t){if(!(t?.includes(`json`)||/^[\s\n]*(?:\[|\{)/.test(e)))return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function ge(e){return e instanceof Error?e.message:`Request failed`}function B(e,t=performance.now()){let n=ge(e);return{status:0,statusText:`Network Error`,headers:[],body:JSON.stringify({error:n,hint:`The browser may have blocked this request because of CORS or network policy.`},null,2),timeMs:Math.round(performance.now()-t),size:`0 B`,error:n}}async function V(e){let t=performance.now();try{let n=await fetch(e.url,{method:e.method,headers:pe(e),body:e.body&&e.method!==`GET`?e.body:void 0}),r=await n.text(),i=he(r,n.headers.get(`content-type`));return{status:n.status,statusText:n.statusText||(n.ok?`OK`:`Error`),headers:me(n.headers),body:i,timeMs:Math.round(performance.now()-t),size:z(r)}}catch(e){return B(e,t)}}function H(e){let t=e.sampleResponse??JSON.stringify({ok:!0,request:e.title},null,2);return{status:200,statusText:`OK`,headers:[{key:`content-type`,value:`application/json`},{key:`cache-control`,value:`no-store`}],body:t,timeMs:142,size:z(t)}}var U=`Authorization`,_e=`Bearer `,ve=[{key:`Content-Type`,value:`application/json`,enabled:!0}];function ye(e){return e.type===`none`?null:e.type===`bearer`?{key:U,value:`${_e}${e.token}`,enabled:!0}:{key:e.key,value:e.value,enabled:!0}}function W(e,t){return e.toLowerCase()===t.toLowerCase()}function be(e){return e.toLowerCase().startsWith(_e.toLowerCase())}function xe(e){return be(e)?e.slice(7):e}function Se(e){return e?W(e.key,U)&&be(e.value)?{type:`bearer`,token:xe(e.value)}:{type:`apiKey`,key:e.key||U,value:e.value,in:`header`}:{type:`none`}}function Ce(e){return e.type===`apiKey`?e.key:U}function G(e,t){return t.type===`none`?W(e.key,U):W(e.key,Ce(t))}function we(e){return e.auth?e.auth:Se(e.headers?.find(e=>W(e.key,U)))}function Te(e,t){let n=(e.headers?.length?e.headers:ve).filter(e=>!G(e,t)).map(e=>({...e,enabled:!0})),r=ye(t);return r?[...n,r]:n}function Ee(e,t,n){if(t.type===`none`)return e.map(e=>G(e,n)||W(e.key,U)?{...e,enabled:!1}:e);let r=ye(t);return r?[...e.filter(e=>!G(e,n)&&!G(e,t)),r]:e}function De(e,t){return e.filter(e=>e.enabled&&e.key.trim()&&!G(e,t)).map(({key:e,value:t})=>({key:e,value:t}))}function K(e){return JSON.stringify({method:e.method,url:e.url,headers:e.headers??[],auth:e.auth??{type:`none`},body:e.body??``})}function Oe(e,t){let n=t.body.trim()?t.body:void 0;return{...e,method:t.method,url:t.url,body:n,auth:t.auth,headers:De(t.headers,t.auth)}}var ke=`{
5
5
 
6
6
  }`,q=`Authorization`,Ae=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],je=[{id:`body`,label:`Body`},{id:`headers`,label:`Headers`},{id:`auth`,label:`Auth`}],Me=[{id:`response`,label:`Response`},{id:`history`,label:`History`}],Ne=[`body`,`headers`],Pe=[{id:`none`,label:`None`,className:`font-semibold text-content hover:bg-surface-2`},{id:`bearer`,label:`Bearer`,className:`font-semibold text-content hover:bg-surface-2`},{id:`apiKey`,label:`API key`,className:`font-semibold text-content hover:bg-surface-2`}];function Fe(e){return Math.max(3,e.split(`
7
- `).length)}function Ie(e){return JSON.stringify(JSON.parse(e),null,2)}function Le(e){try{return Ie(e)}catch{return e}}var Re=({children:e,className:t})=>(0,l.jsx)(`div`,{className:u(`flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content`,`focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20`,t),children:e}),ze=({value:e,onChange:t})=>(0,l.jsx)(`div`,{className:`inline-flex items-center gap-4`,children:Ne.map(n=>(0,l.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:u(`text-xs font-medium capitalize transition-colors`,e===n?`text-content`:`text-muted hover:text-content`),children:n},n))}),Be=({method:e,url:t,isSending:n,editable:r,onMethodChange:i,onUrlChange:a,onSend:o})=>(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[1fr_auto]`,children:[(0,l.jsxs)(Re,{className:`min-w-0`,children:[(0,l.jsx)(le,{value:e,onChange:i,methods:Ae,disabled:!r}),(0,l.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),readOnly:!r,"aria-label":`Request URL`,className:`min-w-0 flex-1 bg-transparent px-2 py-2 font-mono text-[14px] text-muted outline-none read-only:cursor-default`})]}),(0,l.jsx)(g,{size:`md`,variant:`primary`,isLoading:n,onClick:o,rightIcon:(0,l.jsx)(f,{name:`send`,className:`h-4 w-4`}),className:`min-h-10 px-7`,children:`Send`})]}),Ve=({header:e,index:t,editable:n,onUpdate:r,onRemove:i})=>(0,l.jsxs)(`div`,{className:`grid grid-cols-[auto_1fr_auto] gap-3 md:grid-cols-[auto_1fr_1fr_auto]`,children:[(0,l.jsx)(`span`,{className:`flex h-8 items-center`,children:(0,l.jsx)(te,{size:`sm`,checked:e.enabled,onChange:e=>r(t,{enabled:e}),disabled:!n,"aria-label":`Enable ${e.key}`})}),(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:e=>r(t,{key:e.target.value}),readOnly:!n,"aria-label":`Header name`,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,value:e.value,onChange:e=>r(t,{value:e.target.value}),readOnly:!n,"aria-label":`Header value`,containerClassName:`col-start-2 md:col-start-auto`,className:`font-mono`}),(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key}`,onClick:()=>i(t),disabled:!n,className:`row-span-2 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-content disabled:cursor-not-allowed disabled:opacity-40 md:row-span-1`,children:(0,l.jsx)(f,{name:`trash`,className:`h-4 w-4`})})]}),He=({body:e,error:t,editable:n,onBodyChange:r,onClearError:i})=>(0,l.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,l.jsx)(`div`,{className:`text-xs text-muted`,children:t}),(0,l.jsx)(`textarea`,{value:e,onChange:e=>{r(e.target.value),t&&i()},readOnly:!n,"aria-label":`Request body`,spellCheck:!1,rows:Fe(e),className:u(`w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]`,`font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default`)})]}),Ue=({auth:e,editable:t,onChange:n})=>{let[r,i]=(0,c.useState)(!1),a=(0,l.jsx)(`button`,{type:`button`,"aria-label":r?`Hide secret`:`Show secret`,onClick:()=>i(e=>!e),className:`inline-flex h-6 w-6 items-center justify-center rounded-md text-muted transition-colors hover:text-content`,children:(0,l.jsx)(f,{name:r?`eye-closed`:`eye`,className:`h-4 w-4`})});return(0,l.jsxs)(`div`,{className:`grid items-start gap-3 md:grid-cols-[auto_1fr]`,children:[(0,l.jsx)(ae,{value:e.type,onChange:t=>{t===`none`&&n({type:`none`}),t===`bearer`&&n({type:`bearer`,token:e.type===`bearer`?e.token:``}),t===`apiKey`&&n({type:`apiKey`,key:e.type===`apiKey`?e.key:q,value:e.type===`apiKey`?e.value:``,in:`header`})},items:Pe,size:`md`,disabled:!t,minWidthClassName:`min-w-28`}),e.type===`none`&&(0,l.jsx)(`div`,{className:`rounded-lg border border-border bg-surface-2 p-2.5 text-xs text-muted`,children:`Auth is disabled for this request.`}),e.type===`bearer`&&(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.token,onChange:e=>n({type:`bearer`,token:e.target.value}),readOnly:!t,rightSlot:a,className:`font-mono`}),e.type===`apiKey`&&(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,0.7fr)_minmax(0,1fr)]`,children:[(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:t=>n({type:`apiKey`,key:t.target.value,value:e.value,in:`header`}),readOnly:!t,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.value,onChange:t=>n({type:`apiKey`,key:e.key,value:t.target.value,in:`header`}),readOnly:!t,rightSlot:a,className:`font-mono`})]})]})},We=({activeTab:e,auth:t,headers:n,body:r,bodyError:i,editable:a,onAuthChange:o,onHeaderUpdate:s,onHeaderRemove:c,onHeaderAdd:u,onBodyChange:d,onBodyErrorClear:p})=>e===`body`?(0,l.jsx)(He,{body:r,error:i,editable:a,onBodyChange:d,onClearError:p}):e===`auth`?(0,l.jsx)(Ue,{auth:t,editable:a,onChange:o}):(0,l.jsxs)(`div`,{className:`space-y-2.5`,children:[n.map((e,t)=>(0,l.jsx)(Ve,{header:e,index:t,editable:a,onUpdate:s,onRemove:c},`${e.key}-${t}`)),(0,l.jsxs)(`button`,{type:`button`,onClick:u,disabled:!a,className:`inline-flex items-center gap-1.5 rounded-md px-1 py-1 text-xs font-medium text-primary transition-colors hover:text-primary-hover disabled:cursor-not-allowed disabled:opacity-40`,children:[(0,l.jsx)(f,{name:`plus`,className:`h-4 w-4`}),`Add header`]})]}),Ge=({responsePanel:e,response:t})=>{let n=e===`body`,r=t.headers.map(e=>`${e.key}: ${e.value}`).join(`
8
- `),i=n?t.body:r||`No response headers`;return(0,l.jsxs)(`div`,{className:`relative p-3`,children:[(0,l.jsxs)(`div`,{className:`absolute right-5 top-5 z-10 flex items-center gap-1`,children:[(0,l.jsx)(y,{"aria-label":`Download response`,variant:`surface`,size:`sm`,onClick:()=>{let e=new Blob([i],{type:n?`application/json`:`text/plain`}),t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n?`response.json`:`response-headers.txt`,r.click(),URL.revokeObjectURL(t)},children:(0,l.jsx)(f,{name:`download`,size:14})}),(0,l.jsx)(y,{"aria-label":`Share response`,variant:`surface`,size:`sm`,onClick:async()=>{if(navigator.share)try{await navigator.share({title:`API response`,text:i})}catch{}else await navigator.clipboard?.writeText(i)},children:(0,l.jsx)(f,{name:`share`,size:14})}),(0,l.jsx)(S,{value:i,size:`sm`})]}),(0,l.jsx)(I,{code:i,language:n?`json`:`plain`,copyable:!1,reveal:!0,className:`pr-28`})]})};function Ke(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}var qe=({entries:e,onSelect:t,onClear:n})=>e.length===0?(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-6 py-10 text-center`,children:[(0,l.jsx)(f,{name:`restart`,className:`h-6 w-6 text-muted`}),(0,l.jsx)(`p`,{className:`text-sm font-medium text-content`,children:`No requests yet`}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Requests you send will show up here.`})]}):(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-0.5`,children:[(0,l.jsxs)(`span`,{className:`text-xs text-muted`,children:[e.length,` request`,e.length===1?``:`s`]}),(0,l.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs text-muted transition-colors hover:text-content`,children:`Clear`})]}),(0,l.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border`,children:e.map(e=>(0,l.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>t(e),className:`flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-surface-2`,children:[(0,l.jsx)(ee,{method:e.request.method,className:`shrink-0`}),(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[13px] text-content`,children:e.request.url}),(0,l.jsx)(E,{status:e.response.status,statusText:e.response.statusText,className:`shrink-0`}),(0,l.jsxs)(`span`,{className:`hidden shrink-0 tabular-nums text-xs text-muted sm:inline`,children:[e.response.timeMs,`ms`]}),(0,l.jsx)(`span`,{className:`hidden shrink-0 text-xs text-muted md:inline`,children:Ke(e.at)})]})},K(e.request)))})]});async function Je(e,t){let n=performance.now();try{return t?await t(e):await B(e)}catch(e){return z(e,n)}}var Ye=({request:e,onRequestChange:t,onSend:n,editable:r=!0,onBack:i,onImport:a,className:o})=>{let s=(0,c.useMemo)(()=>we(e),[e]),d=(0,c.useMemo)(()=>Te(e,s),[e,s]),p=Le(e.body??ke),m=e.body??``,[h,_]=(0,c.useState)(`body`),[v,y]=(0,c.useState)(`response`),[b,x]=(0,c.useState)(`body`),[S,C]=(0,c.useState)(!1),[w,T]=(0,c.useState)([]),[ee,D]=(0,c.useState)(null),[O,k]=(0,c.useState)(null),te=(0,c.useMemo)(()=>V(e),[e]),M=O??te,N=d.filter(e=>e.enabled).length,ne=je.map(e=>e.id===`headers`?{...e,badge:N}:e),P=n=>{if(!r)return;let i=Oe(e,{method:e.method,url:e.url,body:m,auth:s,headers:d,...n});t?.(i)};return(0,l.jsxs)(`div`,{className:u(`space-y-3`,o),children:[(0,l.jsxs)(A,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`p-3`,children:[(0,l.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[i&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back to request snippets`,onClick:i,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Try it Out`})]}),r&&a&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:a,leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(Be,{method:e.method,url:e.url,isSending:S,editable:r,onMethodChange:e=>P({method:e}),onUrlChange:e=>P({url:e}),onSend:async()=>{let t=Oe(e,{method:e.method,url:e.url,body:m,auth:s,headers:d}),r=K(t);C(!0);let i=await Je(t,n);C(!1),k(i),y(`response`),T(e=>[{request:t,response:i,at:Date.now()},...e.filter(e=>K(e.request)!==r)].slice(0,25))}})]}),(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-y border-border px-3`,children:[(0,l.jsx)(j,{items:ne,activeId:h,onChange:e=>_(e),className:`border-b-0`}),h===`body`&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{try{P({body:Ie(p)}),D(null)}catch{D(`Invalid JSON`)}},disabled:!r,leftIcon:(0,l.jsx)(f,{name:`magic`,className:`h-4 w-4`}),children:`Format`})]}),(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(We,{activeTab:h,auth:s,headers:d,body:p,bodyError:ee,editable:r,onAuthChange:e=>{P({auth:e,headers:Ee(d,e,s)})},onHeaderUpdate:(e,t)=>{let n=d[e],r=d.map((n,r)=>r===e?{...n,...t}:n),i=r[e];P({auth:i&&(n&&G(n,s)||G(i,s)||W(i.key,q))?i.enabled?Se(i):{type:`none`}:s,headers:r})},onHeaderRemove:e=>{let t=d[e];P({auth:t&&(G(t,s)||W(t.key,q))?{type:`none`}:s,headers:d.filter((t,n)=>n!==e)})},onHeaderAdd:()=>{P({headers:[...d,{key:``,value:``,enabled:!0}]})},onBodyChange:e=>P({body:e}),onBodyErrorClear:()=>D(null)})})]}),(0,l.jsxs)(A,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border px-3`,children:[(0,l.jsx)(j,{items:Me,activeId:v,onChange:e=>y(e),className:`border-b-0`}),v===`response`&&(0,l.jsx)(ze,{value:b,onChange:x})]}),v===`response`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted`,children:[(0,l.jsx)(E,{status:M.status,statusText:M.statusText}),(0,l.jsxs)(`span`,{children:[M.timeMs,`ms`]}),(0,l.jsx)(`span`,{children:M.size})]}),(0,l.jsx)(Ge,{responsePanel:b,response:M})]}):(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(qe,{entries:w,onSelect:e=>{t?.(e.request),k(e.response),y(`response`)},onClear:()=>T([])})})]})]})},Xe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],Ze=new Set([`-d`,`--data`,`--data-raw`,`--data-binary`,`--data-ascii`]),Qe=new Set([`-H`,`--header`]),$e=new Set([`-X`,`--request`]),et=new Set([`--url`]),tt=`authorization`,nt=`Bearer `;function rt(e){return e.replace(/\\\s*\n\s*/g,` `).trim()}function it(e){return e.trim().replace(/^```(?:bash|sh|shell|zsh|curl)?\s*/i,``).replace(/\s*```$/i,``).replace(/^\s*[$>]\s*/gm,``).replace(/\\n/g,`
9
- `).replace(/\\"/g,`"`).replace(/\\'/g,`'`)}function at(e){let t=[],n=``,r=null,i=!1,a=rt(it(e)),o=()=>{n&&=(t.push(n),``)};for(let e=0;e<a.length;e++){let t=a[e];if(i){n+=t,i=!1;continue}if(t===`\\`&&r!==`'`){let t=a[e+1];if(!r&&t===`n`){o(),e++;continue}if(!r&&t&&/\s/.test(t)){for(o();e+1<a.length&&/\s/.test(a[e+1]);)e++;continue}i=!0;continue}if((t===`"`||t===`'`)&&(!r||r===t)){r=r?null:t;continue}if(!r&&/\s/.test(t)){o();continue}n+=t}return i&&(n+=`\\`),o(),t}function ot(e){let t=e.findIndex(e=>e===`curl`||e.endsWith(`/curl`));return t>=0?e.slice(t+1):e}function st(e){return/^(?:https?:\/\/\S+|\/\S*|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\S*)$/.test(e)}function J(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)?e:`https://${e}`}function ct(e){let t=e.toUpperCase();return Xe.includes(t)?t:null}function Y(e){let t=e.indexOf(`:`);return t<0?null:{key:e.slice(0,t).trim(),value:e.slice(t+1).trim()}}function lt(e){let t=e.find(e=>e.key.toLowerCase()===tt);if(t)return t.value.toLowerCase().startsWith(nt.toLowerCase())?{type:`bearer`,token:t.value.slice(7)}:{type:`apiKey`,key:t.key,value:t.value,in:`header`}}function ut(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function X(e){let t=ot(at(e));if(t.length===0)return null;let n=[],r=[],i=null,a=``;for(let e=0;e<t.length;e++){let o=t[e],s=t[e+1];if($e.has(o)&&s){i=ct(s)??i,e++;continue}if(o.startsWith(`-X`)&&o.length>2){i=ct(o.slice(2))??i;continue}if(Qe.has(o)&&s){let t=Y(s);t&&n.push(t),e++;continue}if(o.startsWith(`-H`)&&o.length>2){let e=Y(o.slice(2));e&&n.push(e);continue}if(Ze.has(o)&&s!==void 0){r.push(s),e++;continue}let c=[...Ze].find(e=>o.startsWith(`${e}=`));if(c){r.push(o.slice(c.length+1));continue}if(et.has(o)&&s){a=J(s),e++;continue}if(o.startsWith(`--url=`)){a=J(o.slice(6));continue}!o.startsWith(`-`)&&st(o)&&(a=J(o))}if(!a)return null;let o=r.length?ut(r.join(`&`)):``,s=i??(o?`POST`:`GET`),c=lt(n);return{title:`Imported request`,method:s,url:a,headers:c?n.filter(e=>e.key.toLowerCase()!==tt):n,auth:c,body:o||void 0}}var dt=`curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\
7
+ `).length)}function Ie(e){return JSON.stringify(JSON.parse(e),null,2)}function Le(e){try{return Ie(e)}catch{return e}}var Re=({children:e,className:t})=>(0,l.jsx)(`div`,{className:u(`flex min-h-10 items-center rounded-md border border-transparent bg-surface-2 px-3 text-sm text-content`,`focus-within:border-primary/60 focus-within:ring-2 focus-within:ring-primary/20`,t),children:e}),ze=({value:e,onChange:t})=>(0,l.jsx)(`div`,{className:`inline-flex items-center gap-4`,children:Ne.map(n=>(0,l.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:u(`text-xs font-medium capitalize transition-colors`,e===n?`text-content`:`text-muted hover:text-content`),children:n},n))}),Be=({method:e,url:t,isSending:n,editable:r,onMethodChange:i,onUrlChange:a,onSend:o})=>(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[1fr_auto]`,children:[(0,l.jsxs)(Re,{className:`min-w-0`,children:[(0,l.jsx)(ce,{value:e,onChange:i,methods:Ae,disabled:!r}),(0,l.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),readOnly:!r,"aria-label":`Request URL`,className:`min-w-0 flex-1 bg-transparent px-2 py-2 font-mono text-[14px] text-muted outline-none read-only:cursor-default`})]}),(0,l.jsx)(g,{size:`md`,variant:`primary`,isLoading:n,onClick:o,rightIcon:(0,l.jsx)(f,{name:`send`,className:`h-4 w-4`}),className:`min-h-10 px-7`,children:`Send`})]}),Ve=({header:e,index:t,editable:n,onUpdate:r,onRemove:i})=>(0,l.jsxs)(`div`,{className:`grid grid-cols-[auto_1fr_auto] gap-3 md:grid-cols-[auto_1fr_1fr_auto]`,children:[(0,l.jsx)(`span`,{className:`flex h-8 items-center`,children:(0,l.jsx)(O,{size:`sm`,checked:e.enabled,onChange:e=>r(t,{enabled:e}),disabled:!n,"aria-label":`Enable ${e.key}`})}),(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:e=>r(t,{key:e.target.value}),readOnly:!n,"aria-label":`Header name`,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,value:e.value,onChange:e=>r(t,{value:e.target.value}),readOnly:!n,"aria-label":`Header value`,containerClassName:`col-start-2 md:col-start-auto`,className:`font-mono`}),(0,l.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.key}`,onClick:()=>i(t),disabled:!n,className:`row-span-2 inline-flex h-8 w-8 items-center justify-center rounded-md text-muted transition-colors hover:bg-surface-2 hover:text-content disabled:cursor-not-allowed disabled:opacity-40 md:row-span-1`,children:(0,l.jsx)(f,{name:`trash`,className:`h-4 w-4`})})]}),He=({body:e,error:t,editable:n,onBodyChange:r,onClearError:i})=>(0,l.jsxs)(`div`,{className:`space-y-2`,children:[t&&(0,l.jsx)(`div`,{className:`text-xs text-muted`,children:t}),(0,l.jsx)(`textarea`,{value:e,onChange:e=>{r(e.target.value),t&&i()},readOnly:!n,"aria-label":`Request body`,spellCheck:!1,rows:Fe(e),className:u(`w-full resize-none overflow-hidden rounded-lg border border-border bg-surface-2 p-3 [field-sizing:content]`,`font-mono text-[13px] leading-relaxed text-content outline-none placeholder:text-muted read-only:cursor-default`)})]}),Ue=({auth:e,editable:t,onChange:n})=>{let[r,i]=(0,c.useState)(!1),a=(0,l.jsx)(`button`,{type:`button`,"aria-label":r?`Hide secret`:`Show secret`,onClick:()=>i(e=>!e),className:`inline-flex h-6 w-6 items-center justify-center rounded-md text-muted transition-colors hover:text-content`,children:(0,l.jsx)(f,{name:r?`eye-closed`:`eye`,className:`h-4 w-4`})});return(0,l.jsxs)(`div`,{className:`grid items-start gap-3 md:grid-cols-[auto_1fr]`,children:[(0,l.jsx)(ie,{value:e.type,onChange:t=>{t===`none`&&n({type:`none`}),t===`bearer`&&n({type:`bearer`,token:e.type===`bearer`?e.token:``}),t===`apiKey`&&n({type:`apiKey`,key:e.type===`apiKey`?e.key:q,value:e.type===`apiKey`?e.value:``,in:`header`})},items:Pe,size:`md`,disabled:!t,minWidthClassName:`min-w-28`}),e.type===`none`&&(0,l.jsx)(`div`,{className:`rounded-lg border border-border bg-surface-2 p-2.5 text-xs text-muted`,children:`Auth is disabled for this request.`}),e.type===`bearer`&&(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.token,onChange:e=>n({type:`bearer`,token:e.target.value}),readOnly:!t,rightSlot:a,className:`font-mono`}),e.type===`apiKey`&&(0,l.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[minmax(0,0.7fr)_minmax(0,1fr)]`,children:[(0,l.jsx)(F,{size:`sm`,value:e.key,onChange:t=>n({type:`apiKey`,key:t.target.value,value:e.value,in:`header`}),readOnly:!t,className:`font-mono`}),(0,l.jsx)(F,{size:`sm`,type:r?`text`:`password`,value:e.value,onChange:t=>n({type:`apiKey`,key:e.key,value:t.target.value,in:`header`}),readOnly:!t,rightSlot:a,className:`font-mono`})]})]})},We=({activeTab:e,auth:t,headers:n,body:r,bodyError:i,editable:a,onAuthChange:o,onHeaderUpdate:s,onHeaderRemove:c,onHeaderAdd:u,onBodyChange:d,onBodyErrorClear:p})=>e===`body`?(0,l.jsx)(He,{body:r,error:i,editable:a,onBodyChange:d,onClearError:p}):e===`auth`?(0,l.jsx)(Ue,{auth:t,editable:a,onChange:o}):(0,l.jsxs)(`div`,{className:`space-y-2.5`,children:[n.map((e,t)=>(0,l.jsx)(Ve,{header:e,index:t,editable:a,onUpdate:s,onRemove:c},`${e.key}-${t}`)),(0,l.jsxs)(`button`,{type:`button`,onClick:u,disabled:!a,className:`inline-flex items-center gap-1.5 rounded-md px-1 py-1 text-xs font-medium text-primary transition-colors hover:text-primary-hover disabled:cursor-not-allowed disabled:opacity-40`,children:[(0,l.jsx)(f,{name:`plus`,className:`h-4 w-4`}),`Add header`]})]}),Ge=({responsePanel:e,response:t})=>{let n=e===`body`,r=t.headers.map(e=>`${e.key}: ${e.value}`).join(`
8
+ `),i=n?t.body:r||`No response headers`;return(0,l.jsxs)(`div`,{className:`relative p-3`,children:[(0,l.jsxs)(`div`,{className:`absolute right-5 top-5 z-10 flex items-center gap-1`,children:[(0,l.jsx)(y,{"aria-label":`Download response`,variant:`surface`,size:`sm`,onClick:()=>{let e=new Blob([i],{type:n?`application/json`:`text/plain`}),t=URL.createObjectURL(e),r=document.createElement(`a`);r.href=t,r.download=n?`response.json`:`response-headers.txt`,r.click(),URL.revokeObjectURL(t)},children:(0,l.jsx)(f,{name:`download`,size:14})}),(0,l.jsx)(y,{"aria-label":`Share response`,variant:`surface`,size:`sm`,onClick:async()=>{if(navigator.share)try{await navigator.share({title:`API response`,text:i})}catch{}else await navigator.clipboard?.writeText(i)},children:(0,l.jsx)(f,{name:`share`,size:14})}),(0,l.jsx)(S,{value:i,size:`sm`})]}),(0,l.jsx)(L,{code:i,language:n?`json`:`plain`,copyable:!1,reveal:!0,className:`pr-28`})]})};function Ke(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}var qe=({entries:e,onSelect:t,onClear:n})=>e.length===0?(0,l.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border px-6 py-10 text-center`,children:[(0,l.jsx)(f,{name:`restart`,className:`h-6 w-6 text-muted`}),(0,l.jsx)(`p`,{className:`text-sm font-medium text-content`,children:`No requests yet`}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Requests you send will show up here.`})]}):(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsxs)(`div`,{className:`flex items-center justify-between px-0.5`,children:[(0,l.jsxs)(`span`,{className:`text-xs text-muted`,children:[e.length,` request`,e.length===1?``:`s`]}),(0,l.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs text-muted transition-colors hover:text-content`,children:`Clear`})]}),(0,l.jsx)(`ul`,{className:`overflow-hidden rounded-lg border border-border`,children:e.map(e=>(0,l.jsx)(`li`,{className:`border-b border-border last:border-b-0`,children:(0,l.jsxs)(`button`,{type:`button`,onClick:()=>t(e),className:`flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors hover:bg-surface-2`,children:[(0,l.jsx)(T,{method:e.request.method,className:`shrink-0`}),(0,l.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[13px] text-content`,children:e.request.url}),(0,l.jsx)(E,{status:e.response.status,statusText:e.response.statusText,className:`shrink-0`}),(0,l.jsxs)(`span`,{className:`hidden shrink-0 tabular-nums text-xs text-muted sm:inline`,children:[e.response.timeMs,`ms`]}),(0,l.jsx)(`span`,{className:`hidden shrink-0 text-xs text-muted md:inline`,children:Ke(e.at)})]})},K(e.request)))})]});async function Je(e,t){let n=performance.now();try{return t?await t(e):await V(e)}catch(e){return B(e,n)}}var Ye=({request:e,onRequestChange:t,onSend:n,title:r,editable:i=!0,onBack:a,onImport:o,className:s})=>{let d=(0,c.useMemo)(()=>we(e),[e]),p=(0,c.useMemo)(()=>Te(e,d),[e,d]),m=Le(e.body??ke),h=e.body??``,[_,v]=(0,c.useState)(`body`),[y,b]=(0,c.useState)(`response`),[x,S]=(0,c.useState)(`body`),[C,w]=(0,c.useState)(!1),[ee,T]=(0,c.useState)([]),[te,D]=(0,c.useState)(null),[ne,O]=(0,c.useState)(null),j=(0,c.useRef)(null),M=(0,c.useMemo)(()=>H(e),[e]),N=ne??M,P=p.filter(e=>e.enabled).length,F=je.map(e=>e.id===`headers`?{...e,badge:P}:e),I=n=>{if(!i)return;let r=Oe(e,{method:e.method,url:e.url,body:h,auth:d,headers:p,...n});t?.(r)};return(0,l.jsxs)(`div`,{className:u(`space-y-3`,s),children:[(0,l.jsxs)(k,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`p-3`,children:[(0,l.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,l.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[a&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back to request snippets`,onClick:a,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`truncate font-heading text-sm font-semibold text-content`,children:r??`Try it Out`})]}),i&&o&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:o,leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(Be,{method:e.method,url:e.url,isSending:C,editable:i,onMethodChange:e=>I({method:e}),onUrlChange:e=>I({url:e}),onSend:async()=>{let t=Oe(e,{method:e.method,url:e.url,body:h,auth:d,headers:p}),r=K(t);w(!0);let i=await Je(t,n);w(!1),O(i),b(`response`),window.requestAnimationFrame(()=>{j.current?.scrollIntoView({behavior:`smooth`,block:`center`})}),T(e=>[{request:t,response:i,at:Date.now()},...e.filter(e=>K(e.request)!==r)].slice(0,25))}})]}),(0,l.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-y border-border px-3`,children:[(0,l.jsx)(A,{items:F,activeId:_,onChange:e=>v(e),className:`border-b-0`}),_===`body`&&(0,l.jsx)(g,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>{try{I({body:Ie(m)}),D(null)}catch{D(`Invalid JSON`)}},disabled:!i,leftIcon:(0,l.jsx)(f,{name:`magic`,className:`h-4 w-4`}),children:`Format`})]}),(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(We,{activeTab:_,auth:d,headers:p,body:m,bodyError:te,editable:i,onAuthChange:e=>{I({auth:e,headers:Ee(p,e,d)})},onHeaderUpdate:(e,t)=>{let n=p[e],r=p.map((n,r)=>r===e?{...n,...t}:n),i=r[e];I({auth:i&&(n&&G(n,d)||G(i,d)||W(i.key,q))?i.enabled?Se(i):{type:`none`}:d,headers:r})},onHeaderRemove:e=>{let t=p[e];I({auth:t&&(G(t,d)||W(t.key,q))?{type:`none`}:d,headers:p.filter((t,n)=>n!==e)})},onHeaderAdd:()=>{I({headers:[...p,{key:``,value:``,enabled:!0}]})},onBodyChange:e=>I({body:e}),onBodyErrorClear:()=>D(null)})})]}),(0,l.jsx)(`div`,{ref:j,children:(0,l.jsxs)(k,{flush:!0,children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border px-3`,children:[(0,l.jsx)(A,{items:Me,activeId:y,onChange:e=>b(e),className:`border-b-0`}),y===`response`&&(0,l.jsx)(ze,{value:x,onChange:S})]}),y===`response`?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5 border-b border-border px-3 py-3 text-xs text-muted`,children:[(0,l.jsx)(E,{status:N.status,statusText:N.statusText}),(0,l.jsxs)(`span`,{children:[N.timeMs,`ms`]}),(0,l.jsx)(`span`,{children:N.size})]}),(0,l.jsx)(Ge,{responsePanel:x,response:N})]}):(0,l.jsx)(`div`,{className:`p-3`,children:(0,l.jsx)(qe,{entries:ee,onSelect:e=>{t?.(e.request),O(e.response),b(`response`)},onClear:()=>T([])})})]})})]})},Xe=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`],Ze=new Set([`-d`,`--data`,`--data-raw`,`--data-binary`,`--data-ascii`]),Qe=new Set([`-H`,`--header`]),$e=new Set([`-X`,`--request`]),et=new Set([`--url`]),tt=`authorization`,nt=`Bearer `;function rt(e){return e.replace(/\\\s*\n\s*/g,` `).trim()}function it(e){return e.trim().replace(/^```(?:bash|sh|shell|zsh|curl)?\s*/i,``).replace(/\s*```$/i,``).replace(/^\s*[$>]\s*/gm,``).replace(/\\n/g,`
9
+ `).replace(/\\"/g,`"`).replace(/\\'/g,`'`)}function at(e){let t=[],n=``,r=null,i=!1,a=rt(it(e)),o=()=>{n&&=(t.push(n),``)};for(let e=0;e<a.length;e++){let t=a[e];if(i){n+=t,i=!1;continue}if(t===`\\`&&r!==`'`){let t=a[e+1];if(!r&&t===`n`){o(),e++;continue}if(!r&&t&&/\s/.test(t)){for(o();e+1<a.length&&/\s/.test(a[e+1]);)e++;continue}i=!0;continue}if((t===`"`||t===`'`)&&(!r||r===t)){r=r?null:t;continue}if(!r&&/\s/.test(t)){o();continue}n+=t}return i&&(n+=`\\`),o(),t}function ot(e){let t=e.findIndex(e=>e===`curl`||e.endsWith(`/curl`));return t>=0?e.slice(t+1):e}function st(e){return/^(?:https?:\/\/\S+|\/\S*|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\S*)$/.test(e)}function J(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`/`)?e:`https://${e}`}function ct(e){let t=e.toUpperCase();return Xe.includes(t)?t:null}function lt(e){let t=e.indexOf(`:`);return t<0?null:{key:e.slice(0,t).trim(),value:e.slice(t+1).trim()}}function ut(e){let t=e.find(e=>e.key.toLowerCase()===tt);if(t)return t.value.toLowerCase().startsWith(nt.toLowerCase())?{type:`bearer`,token:t.value.slice(7)}:{type:`apiKey`,key:t.key,value:t.value,in:`header`}}function dt(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Y(e){let t=ot(at(e));if(t.length===0)return null;let n=[],r=[],i=null,a=``;for(let e=0;e<t.length;e++){let o=t[e],s=t[e+1];if($e.has(o)&&s){i=ct(s)??i,e++;continue}if(o.startsWith(`-X`)&&o.length>2){i=ct(o.slice(2))??i;continue}if(Qe.has(o)&&s){let t=lt(s);t&&n.push(t),e++;continue}if(o.startsWith(`-H`)&&o.length>2){let e=lt(o.slice(2));e&&n.push(e);continue}if(Ze.has(o)&&s!==void 0){r.push(s),e++;continue}let c=[...Ze].find(e=>o.startsWith(`${e}=`));if(c){r.push(o.slice(c.length+1));continue}if(et.has(o)&&s){a=J(s),e++;continue}if(o.startsWith(`--url=`)){a=J(o.slice(6));continue}!o.startsWith(`-`)&&st(o)&&(a=J(o))}if(!a)return null;let o=r.length?dt(r.join(`&`)):``,s=i??(o?`POST`:`GET`),c=ut(n);return{title:`Imported request`,method:s,url:a,headers:c?n.filter(e=>e.key.toLowerCase()!==tt):n,auth:c,body:o||void 0}}var ft=`curl -X POST 'https://jsonplaceholder.typicode.com/posts' \\
10
10
  -H 'Content-Type: application/json' \\
11
- -d '{ "title": "API client", "body": "Live request", "userId": 1 }'`,ft=({onImport:e,onCancel:t,className:n})=>{let[r,i]=(0,c.useState)(``),[a,o]=(0,c.useState)(null);return(0,l.jsx)(A,{flush:!0,className:n,children:(0,l.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back`,onClick:t,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Import`})]}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Paste a cURL command to populate the request.`}),(0,l.jsx)(`textarea`,{value:r,onChange:e=>{i(e.target.value),a&&o(null)},spellCheck:!1,rows:5,placeholder:dt,"aria-label":`cURL command`,className:u(`w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none`,`placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20`,a?`border-red-500/60`:`border-border focus:border-primary/60`)}),a&&(0,l.jsx)(`p`,{className:`text-xs text-red-400`,children:a}),(0,l.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,l.jsx)(g,{size:`sm`,onClick:()=>{let t=X(r);if(!t){o(`Could not parse a valid cURL command. Make sure it includes a URL.`);return}e(t,r),i(``),o(null)},disabled:!r.trim(),leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})})]})})},pt=[{id:`curl`,label:`cURL`},{id:`javascript`,label:`Javascript`},{id:`python`,label:`Python`},{id:`go`,label:`Go`}];function mt(e){return e===`curl`?`bash`:e}function ht(e){return!e||e.type===`none`?null:e.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.token}`}:{key:e.key,value:e.value}}function Z(e){let t=ht(e.auth);return t?[...(e.headers??[]).filter(e=>e.key.toLowerCase()!==t.key.toLowerCase()),t]:e.headers??[]}function gt(e){let t=`curl -X ${e.method} '${e.url}'`;for(let n of Z(e))t+=` \\\n -H '${n.key}: ${n.value}'`;return e.body&&(t+=` \\\n -d '${e.body}'`),t}function _t(e){let t=[`method: '${e.method}'`],n=Z(e);if(n.length){let e=n.map(e=>` '${e.key}': '${e.value}'`).join(`,
11
+ -d '{ "title": "API client", "body": "Live request", "userId": 1 }'`,pt=({onImport:e,onCancel:t,className:n})=>{let[r,i]=(0,c.useState)(``),[a,o]=(0,c.useState)(null);return(0,l.jsx)(k,{flush:!0,className:n,children:(0,l.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t&&(0,l.jsx)(`button`,{type:`button`,"aria-label":`Back`,onClick:t,className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-content transition-colors hover:bg-surface-2`,children:(0,l.jsx)(f,{name:`arrow-left`,className:`h-5 w-5`})}),(0,l.jsx)(`div`,{className:`font-heading text-sm font-semibold text-content`,children:`Import`})]}),(0,l.jsx)(`p`,{className:`text-xs text-muted`,children:`Paste a cURL command to populate the request.`}),(0,l.jsx)(`textarea`,{value:r,onChange:e=>{i(e.target.value),a&&o(null)},spellCheck:!1,rows:5,placeholder:ft,"aria-label":`cURL command`,className:u(`w-full resize-none rounded-lg border bg-surface-2 p-3 font-mono text-[13px] leading-relaxed text-content outline-none`,`placeholder:text-muted/50 focus:ring-2 focus:ring-primary/20`,a?`border-red-500/60`:`border-border focus:border-primary/60`)}),a&&(0,l.jsx)(`p`,{className:`text-xs text-red-400`,children:a}),(0,l.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,l.jsx)(g,{size:`sm`,onClick:()=>{let t=Y(r);if(!t){o(`Could not parse a valid cURL command. Make sure it includes a URL.`);return}e(t,r),i(``),o(null)},disabled:!r.trim(),leftIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})})]})})};function mt(e){let t=e.trim();if(!t)return e;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}}var X=[{id:`curl`,label:`cURL`},{id:`javascript`,label:`Javascript`},{id:`python`,label:`Python`},{id:`go`,label:`Go`}];function ht(e){return e===`curl`?`bash`:e}function gt(e){return!e||e.type===`none`?null:e.type===`bearer`?{key:`Authorization`,value:`Bearer ${e.token}`}:{key:e.key,value:e.value}}function Z(e){let t=gt(e.auth);return t?[...(e.headers??[]).filter(e=>e.key.toLowerCase()!==t.key.toLowerCase()),t]:e.headers??[]}function _t(e){let t=`curl -X ${e.method} '${e.url}'`;for(let n of Z(e))t+=` \\\n -H '${n.key}: ${n.value}'`;return e.body&&(t+=` \\\n -d '${e.body}'`),t}function vt(e){let t=[`method: '${e.method}'`],n=Z(e);if(n.length){let e=n.map(e=>` '${e.key}': '${e.value}'`).join(`,
12
12
  `);t.push(`headers: {\n${e}\n }`)}return e.body&&t.push(`body: JSON.stringify(${e.body})`),[`const res = await fetch('${e.url}', {`,` ${t.join(`,
13
13
  `)},`,`});`,``,`const data = await res.json();`,`console.log(data);`].join(`
14
- `)}function vt(e){let t=[`import requests`,``,`url = "${e.url}"`],n=[`url`],r=Z(e);if(r.length){t.push(``,`headers = {`);for(let e of r)t.push(` "${e.key}": "${e.value}",`);t.push(`}`),n.push(`headers=headers`)}return e.body&&(t.push(``,`payload = ${e.body}`),n.push(`json=payload`)),t.push(``,`response = requests.${e.method.toLowerCase()}(${n.join(`, `)})`,`print(response.json())`),t.join(`
15
- `)}function yt(e){let t=[`"fmt"`,`"io"`,`"net/http"`];e.body&&t.push(`"strings"`);let n=[`package main`,``,`import (`];for(let e of t)n.push(`\t${e}`);n.push(`)`,``,`func main() {`),e.body?(n.push(`\tpayload := strings.NewReader(\`${e.body}\`)`),n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", payload)`)):n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", nil)`);for(let t of Z(e))n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);return n.push(` res, _ := http.DefaultClient.Do(req)`,` defer res.Body.Close()`,``,` body, _ := io.ReadAll(res.Body)`,` fmt.Println(string(body))`,`}`),n.join(`
16
- `)}function Q(e,t){switch(t){case`curl`:return gt(e);case`javascript`:return _t(e);case`python`:return vt(e);case`go`:return yt(e)}}var bt=({request:e,onTryItOut:t})=>{let[n,r]=(0,c.useState)(`curl`),i=(0,c.useMemo)(()=>Q(e,n),[e,n]),a=!!t;return(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsxs)(A,{label:e.title,children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(j,{items:pt,activeId:n,onChange:e=>{r(e)},className:`[&_button]:text-[14px]`}),a&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:t,rightIcon:(0,l.jsx)(f,{name:`arrow-right`,className:`h-4 w-4`}),children:`Try it`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(I,{code:i,language:mt(n),showLineNumbers:!0})})]}),e.sampleResponse&&(0,l.jsx)(A,{label:``,children:(0,l.jsx)(I,{code:e.sampleResponse,language:`json`})})]})};function xt(e){let[t,n]=(0,c.useState)(()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`);return(0,c.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>n(t.matches?`dark`:`light`);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),e===`system`?t:e}function St(e){try{let t=new URL(e.url);return`${e.method} ${t.pathname||`/`}`}catch{return`${e.method} ${e.url||`/`}`}}var Ct=({request:e,allowImport:t,editable:n,onTryImport:r})=>(0,l.jsxs)(A,{label:`Invalid request`,children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(`div`,{className:`text-sm font-medium text-content`,children:`cURL`}),t&&n&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:r,rightIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(I,{code:e.trim()||`Paste or pass a cURL request with a URL.`,language:`bash`,showLineNumbers:!0})}),(0,l.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`The request could not be parsed into a valid URL.`})]});function $(e,t,n){return{...e,title:t??St(e),sampleResponse:n}}var wt=({request:e,title:t,sampleResponse:n,onUpdateRequest:r,editable:i=!0,allowImport:a=!0,mode:o=`dark`,syncSnippet:s=!1,customization:u})=>{let d=xt(o),[f,p]=(0,c.useState)(`idle`),[m,h]=(0,c.useState)(e);(0,c.useEffect)(()=>{h(e)},[e]);let g=(0,c.useMemo)(()=>{let e=X(m);return e?$(e,t,n):null},[m,t,n]),_=s?m:e,v=(0,c.useMemo)(()=>{let e=X(_);return e?$(e,t,n):null},[_,t,n]),y=e=>{h(e),r?.(e)},b=e=>{y(Q(e,`curl`))},x=(e,t)=>{y(t.trim()),p(`console`)};return(0,l.jsx)(`div`,{"data-theme":d,style:{...u?.primary?{"--primary":u.primary}:{},...u?.background?{"--bg":u.background}:{}},className:`bg-bg text-content text-left`,children:f===`import`?(0,l.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,l.jsx)(ft,{onImport:x,onCancel:()=>p(g?`console`:`idle`)})},`import`):f===`console`&&g?(0,l.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:(0,l.jsx)(Ye,{request:g,onRequestChange:b,editable:i,onBack:()=>p(`idle`),onImport:a&&i?()=>p(`import`):void 0})},`console`):v?(0,l.jsx)(bt,{request:v,onTryItOut:()=>p(`console`)}):(0,l.jsx)(Ct,{request:_,allowImport:a,editable:i,onTryImport:()=>p(`import`)})})};exports.ApiConsole=Ye,exports.ApiPlayground=wt,exports.ImportCard=ft,exports.RequestSnippet=bt,exports.SNIPPET_LANGUAGES=pt,exports.executeWidgetRequest=B,exports.generateSnippet=Q,exports.highlightFor=mt,exports.mockWidgetResponse=V,exports.parseCurl=X,exports.widgetErrorResponse=z;
14
+ `)}function yt(e){let t=[`import requests`,``,`url = "${e.url}"`],n=[`url`],r=Z(e);if(r.length){t.push(``,`headers = {`);for(let e of r)t.push(` "${e.key}": "${e.value}",`);t.push(`}`),n.push(`headers=headers`)}return e.body&&(t.push(``,`payload = ${e.body}`),n.push(`json=payload`)),t.push(``,`response = requests.${e.method.toLowerCase()}(${n.join(`, `)})`,`print(response.json())`),t.join(`
15
+ `)}function bt(e){let t=[`"fmt"`,`"io"`,`"net/http"`];e.body&&t.push(`"strings"`);let n=[`package main`,``,`import (`];for(let e of t)n.push(`\t${e}`);n.push(`)`,``,`func main() {`),e.body?(n.push(`\tpayload := strings.NewReader(\`${e.body}\`)`),n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", payload)`)):n.push(`\treq, _ := http.NewRequest("${e.method}", "${e.url}", nil)`);for(let t of Z(e))n.push(`\treq.Header.Set("${t.key}", "${t.value}")`);return n.push(` res, _ := http.DefaultClient.Do(req)`,` defer res.Body.Close()`,``,` body, _ := io.ReadAll(res.Body)`,` fmt.Println(string(body))`,`}`),n.join(`
16
+ `)}function Q(e,t){switch(t){case`curl`:return _t(e);case`javascript`:return vt(e);case`python`:return yt(e);case`go`:return bt(e)}}var xt=({request:e,onTryItOut:t})=>{let[n,r]=(0,c.useState)(`curl`),i=(0,c.useMemo)(()=>Q(e,n),[e,n]),a=(0,c.useMemo)(()=>e.sampleResponse?mt(e.sampleResponse):``,[e.sampleResponse]),o=!!t;return(0,l.jsxs)(`div`,{className:`space-y-3`,children:[(0,l.jsxs)(k,{children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(A,{items:X,activeId:n,onChange:e=>{r(e)},className:`[&_button]:text-[14px]`}),o&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:t,rightIcon:(0,l.jsx)(f,{name:`arrow-right`,className:`h-4 w-4`}),children:`Try it`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(L,{code:i,language:ht(n),showLineNumbers:!0})})]}),a&&(0,l.jsx)(k,{label:``,children:(0,l.jsx)(L,{code:a,language:`json`})})]})};function St(e){let[t,n]=(0,c.useState)(()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`);return(0,c.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>n(t.matches?`dark`:`light`);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),e===`system`?t:e}function Ct(e){try{let t=new URL(e.url);return`${e.method} ${t.pathname||`/`}`}catch{return`${e.method} ${e.url||`/`}`}}var wt=({request:e,allowImport:t,editable:n,onTryImport:r})=>(0,l.jsxs)(k,{label:`Invalid request`,children:[(0,l.jsxs)(`div`,{className:`relative flex items-center justify-between`,children:[(0,l.jsx)(`div`,{className:`text-sm font-medium text-content`,children:`cURL`}),t&&n&&(0,l.jsx)(g,{size:`sm`,variant:`primary`,onClick:r,rightIcon:(0,l.jsx)(f,{name:`download`,className:`h-4 w-4`}),children:`Import`})]}),(0,l.jsx)(`div`,{className:`mt-4`,children:(0,l.jsx)(L,{code:e.trim()||`Paste or pass a cURL request with a URL.`,language:`bash`,showLineNumbers:!0})}),(0,l.jsx)(`p`,{className:`mt-3 text-xs text-muted`,children:`The request could not be parsed into a valid URL.`})]}),Tt=240,Et=({panelKey:e,children:t})=>{let n=(0,c.useRef)(null),r=(0,c.useRef)(null),i=(0,c.useRef)(e),a=(0,c.useRef)(null),[o,s]=(0,c.useState)(null),[u,d]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{let t=n.current,o=r.current;if(!t||!o||i.current===e)return;let c=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,l=a.current??t.getBoundingClientRect().height,u=o.getBoundingClientRect().height;if(i.current=e,a.current=u,c||Math.abs(l-u)<1){s(null),d(!1);return}d(!0),s(l);let f=window.requestAnimationFrame(()=>{s(u)}),p=window.setTimeout(()=>{s(null),d(!1)},Tt);return()=>{window.cancelAnimationFrame(f),window.clearTimeout(p)}},[e]),(0,c.useEffect)(()=>{let e=r.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(([e])=>{a.current=e.contentRect.height});return t.observe(e),()=>t.disconnect()},[]),(0,l.jsx)(`div`,{ref:n,className:`transition-[height] duration-[240ms] ease-out`,style:{height:o===null?void 0:`${o}px`,overflow:u?`hidden`:void 0},children:(0,l.jsx)(`div`,{ref:r,children:t})})};function $(e,t,n){return{...e,title:t??Ct(e),sampleResponse:n?mt(n):void 0}}var Dt=({request:e,title:t,sampleResponse:n,onUpdateRequest:r,editable:i=!0,allowImport:a=!0,mode:o=`dark`,syncSnippet:s=!1,customization:u})=>{let d=St(o),[f,p]=(0,c.useState)(`idle`),[m,h]=(0,c.useState)(e);(0,c.useEffect)(()=>{h(e)},[e]);let g=(0,c.useMemo)(()=>{let e=Y(m);return e?$(e,t,n):null},[m,t,n]),_=s?m:e,v=(0,c.useMemo)(()=>{let e=Y(_);return e?$(e,t,n):null},[_,t,n]),y=e=>{h(e),r?.(e)},b=e=>{y(Q(e,`curl`))},x=(e,t)=>{y(t.trim()),p(`console`)},S={...u?.primary?{"--primary":u.primary}:{},...u?.background?{"--bg":u.background}:{}},C=f===`console`&&g,w=f===`import`?`import`:C?`console`:v?`snippet`:`invalid`;return(0,l.jsxs)(`div`,{"data-theme":d,style:S,className:`text-content text-left`,children:[(0,l.jsx)(Et,{panelKey:w,children:(0,l.jsx)(`div`,{className:`motion-safe:animate-[widget-slide-in_180ms_ease-out]`,children:f===`import`?(0,l.jsx)(pt,{onImport:x,onCancel:()=>p(g?`console`:`idle`)}):C?(0,l.jsx)(Ye,{request:g,onRequestChange:b,title:t,editable:i,onBack:()=>p(`idle`),onImport:a&&i?()=>p(`import`):void 0}):v?(0,l.jsx)(xt,{request:v,onTryItOut:()=>p(`console`)}):(0,l.jsx)(wt,{request:_,allowImport:a,editable:i,onTryImport:()=>p(`import`)})},w)}),(0,l.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,l.jsx)(`a`,{href:`https://www.npmjs.com/package/@ragrails/api-playground-react`,target:`_blank`,rel:`noreferrer`,className:`text-[11px] font-medium text-muted/45 transition-colors hover:text-muted`,children:`Build yours with RagRails`})})]})};exports.ApiConsole=Ye,exports.ApiPlayground=Dt,exports.ImportCard=pt,exports.RequestSnippet=xt,exports.SNIPPET_LANGUAGES=X,exports.executeWidgetRequest=V,exports.generateSnippet=Q,exports.highlightFor=ht,exports.mockWidgetResponse=H,exports.parseCurl=Y,exports.widgetErrorResponse=B;