diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ef9a1c..a25d1bc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.14.0" + ".": "1.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9110a..09434cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.15.0](https://github.com/PMDevSolutions/Claudius/compare/v1.14.0...v1.15.0) (2026-09-01) + + +### Features + +* **attachments:** image and PDF attachments for widget and worker ([95a3c7a](https://github.com/PMDevSolutions/Claudius/commit/95a3c7aa0c04d4192d3e1e5fc74e528e0e8a7d76)) +* **attachments:** image and PDF attachments for widget and worker ([2c5854a](https://github.com/PMDevSolutions/Claudius/commit/2c5854aad475b8a921e3906758df4fcb90836951)) + ## [1.14.0](https://github.com/PMDevSolutions/Claudius/compare/v1.13.0...v1.14.0) (2026-08-31) diff --git a/cdn/claudius.css b/cdn/claudius.css index a588c76..d31cdba 100644 --- a/cdn/claudius.css +++ b/cdn/claudius.css @@ -1 +1 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-20{bottom:5rem}.bottom-24{bottom:6rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-3{left:.75rem}.left-4{left:1rem}.left-6{left:1.5rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-1{top:.25rem}.top-20{top:5rem}.top-24{top:6rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[90vh\]{height:90vh}.h-\[min\(500px\,calc\(100vh-7rem\)\)\]{height:min(500px,calc(100vh - 7rem))}.h-full{height:100%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[280px\]{width:280px}.w-\[calc\(100vw-1\.5rem\)\]{width:calc(100vw - 1.5rem)}.w-full{width:100%}.min-w-4{min-width:1rem}.max-w-\[380px\]{max-width:380px}.max-w-\[85\%\]{max-width:85%}.max-w-\[90\%\]{max-width:90%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-claudius-bubble{border-radius:var(--claudius-radius-bubble, var(--cl-radius-lg, 16px))}.rounded-claudius-full{border-radius:var(--cl-radius-full, 9999px)}.rounded-claudius-lg{border-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-claudius-md{border-radius:var(--claudius-radius-button, var(--cl-radius-md, 12px))}.rounded-claudius-sm{border-radius:var(--cl-radius-sm, 8px)}.rounded-r-claudius-lg{border-top-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px));border-bottom-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-t-claudius-lg{border-top-left-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px));border-top-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-bl-claudius-tail{border-bottom-left-radius:var(--cl-radius-tail, 2px)}.rounded-br-claudius-tail{border-bottom-right-radius:var(--cl-radius-tail, 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-claudius-border{border-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.bg-claudius-accent{background-color:var(--claudius-primary, var(--cl-color-accent, #2563eb))}.bg-claudius-accent-soft{background-color:var(--cl-color-accent-soft, rgb(255 255 255 / .2))}.bg-claudius-assistant-bubble{background-color:var(--claudius-assistant-bg, var(--cl-color-assistant-bubble, var(--cl-color-surface-muted, #f1f5f9)))}.bg-claudius-border{background-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.bg-claudius-error{background-color:var(--claudius-error, var(--cl-color-error, #dc2626))}.bg-claudius-error-surface{background-color:var(--claudius-error-bg, var(--cl-color-error-surface, #fef2f2))}.bg-claudius-field{background-color:var(--cl-color-field, #ffffff)}.bg-claudius-scrim{background-color:var(--cl-color-scrim, rgb(0 0 0 / .5))}.bg-claudius-surface{background-color:var(--cl-color-surface, #ffffff)}.bg-claudius-surface-muted{background-color:var(--claudius-light, var(--cl-color-surface-muted, #f1f5f9))}.bg-claudius-text-muted{background-color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.bg-claudius-user-bubble{background-color:var(--claudius-user-bg, var(--cl-color-user-bubble, var(--cl-color-accent, #2563eb)))}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-body{font-family:var(--claudius-font-body, var(--cl-font-body, system-ui)),sans-serif}.font-heading{font-family:var(--claudius-font-heading, var(--cl-font-heading, system-ui)),sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-claudius-accent-text{color:var(--cl-color-accent-text, #ffffff)}.text-claudius-accent-text-muted{color:var(--cl-color-accent-text-muted, rgb(255 255 255 / .7))}.text-claudius-assistant-bubble-text{color:var(--claudius-assistant-text, var(--cl-color-assistant-bubble-text, var(--cl-color-text, #1e293b)))}.text-claudius-error{color:var(--claudius-error, var(--cl-color-error, #dc2626))}.text-claudius-error-text{color:var(--cl-color-error-text, #ffffff)}.text-claudius-link{color:var(--cl-color-link, currentColor)}.text-claudius-text{color:var(--claudius-dark, var(--cl-color-text, #1e293b))}.text-claudius-text-muted{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.text-claudius-user-bubble-text{color:var(--claudius-user-text, var(--cl-color-user-bubble-text, #ffffff))}.underline{text-decoration-line:underline}.shadow-claudius-elevated{--tw-shadow: var(--cl-shadow-elevated, 0 25px 50px -12px rgb(0 0 0 / .25));--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-claudius-floating{--tw-shadow: var(--cl-shadow-floating, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-claudius-border{--tw-ring-color: var(--claudius-border, var(--cl-color-border, #e2e8f0))}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[animation-delay\:0ms\]{animation-delay:0ms}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}[data-claudius-dark=true]{--cl-color-accent: var(--cl-color-accent-dark, #2563eb);--cl-color-accent-text: var(--cl-color-accent-text-dark, #ffffff);--cl-color-accent-soft: var( --cl-color-accent-soft-dark, rgb(255 255 255 / .2) );--cl-color-accent-text-muted: var( --cl-color-accent-text-muted-dark, rgb(255 255 255 / .7) );--cl-color-surface: var(--cl-color-surface-dark, #111827);--cl-color-surface-muted: var(--cl-color-surface-muted-dark, #1f2937);--cl-color-text: var(--cl-color-text-dark, #f3f4f6);--cl-color-text-muted: var(--cl-color-text-muted-dark, #9ca3af);--cl-color-border: var(--cl-color-border-dark, #374151);--cl-color-user-bubble: var( --cl-color-user-bubble-dark, var(--cl-color-accent) );--cl-color-user-bubble-text: var(--cl-color-user-bubble-text-dark, #ffffff);--cl-color-assistant-bubble: var( --cl-color-assistant-bubble-dark, var(--cl-color-surface-muted) );--cl-color-assistant-bubble-text: var( --cl-color-assistant-bubble-text-dark, #e5e7eb );--cl-color-field: var(--cl-color-field-dark, #1f2937);--cl-color-error: var(--cl-color-error-dark, #f87171);--cl-color-error-surface: var( --cl-color-error-surface-dark, rgb(127 29 29 / .3) );--cl-color-error-text: var(--cl-color-error-text-dark, #ffffff);--cl-color-link: var(--cl-color-link-dark, #60a5fa);--cl-color-scrim: var(--cl-color-scrim-dark, rgb(0 0 0 / .5))}.claudius-bottom-sheet{transition:transform .3s cubic-bezier(.32,.72,0,1)}.claudius-bottom-sheet[data-dragging=true]{transition:none}.claudius-scrim{transition:opacity .3s ease}@media(prefers-reduced-motion:reduce){.claudius-bottom-sheet{transition:opacity .2s ease;transform:none!important}.claudius-scrim{transition:opacity .15s ease}}.placeholder\:text-claudius-text-muted::-moz-placeholder{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.placeholder\:text-claudius-text-muted::placeholder{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-claudius-accent-soft:hover{background-color:var(--cl-color-accent-soft, rgb(255 255 255 / .2))}.hover\:bg-claudius-border:hover{background-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.hover\:bg-claudius-surface-muted:hover{background-color:var(--claudius-light, var(--cl-color-surface-muted, #f1f5f9))}.hover\:text-claudius-accent-text:hover{color:var(--cl-color-accent-text, #ffffff)}.hover\:text-claudius-text:hover{color:var(--claudius-dark, var(--cl-color-text, #1e293b))}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-claudius-floating-hover:hover{--tw-shadow: var(--cl-shadow-floating-hover, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-claudius-accent:focus{border-color:var(--claudius-primary, var(--cl-color-accent, #2563eb))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-claudius-accent:focus{--tw-ring-color: var(--claudius-primary, var(--cl-color-accent, #2563eb))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-claudius-error:focus-visible{--tw-ring-color: var(--claudius-error, var(--cl-color-error, #dc2626))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:opacity-100:hover:disabled{opacity:1}@media(prefers-reduced-motion:no-preference){@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.motion-safe\:animate-bounce{animation:bounce 1s infinite}}@media(min-width:640px){.sm\:left-6{left:1.5rem}.sm\:right-6{right:1.5rem}.sm\:max-w-\[400px\]{max-width:400px}}@media(min-width:768px){.md\:max-w-\[440px\]{max-width:440px}} +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-right-1\.5{right:-.375rem}.-top-1{top:-.25rem}.-top-1\.5{top:-.375rem}.bottom-0{bottom:0}.bottom-20{bottom:5rem}.bottom-24{bottom:6rem}.bottom-6{bottom:1.5rem}.left-0{left:0}.left-3{left:.75rem}.left-4{left:1rem}.left-6{left:1.5rem}.right-1{right:.25rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-1{top:.25rem}.top-20{top:5rem}.top-24{top:6rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[90vh\]{height:90vh}.h-\[min\(500px\,calc\(100vh-7rem\)\)\]{height:min(500px,calc(100vh - 7rem))}.h-full{height:100%}.max-h-48{max-height:12rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[280px\]{width:280px}.w-\[calc\(100vw-1\.5rem\)\]{width:calc(100vw - 1.5rem)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-4{min-width:1rem}.max-w-\[220px\]{max-width:220px}.max-w-\[380px\]{max-width:380px}.max-w-\[85\%\]{max-width:85%}.max-w-\[90\%\]{max-width:90%}.max-w-full{max-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-claudius-bubble{border-radius:var(--claudius-radius-bubble, var(--cl-radius-lg, 16px))}.rounded-claudius-full{border-radius:var(--cl-radius-full, 9999px)}.rounded-claudius-lg{border-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-claudius-md{border-radius:var(--claudius-radius-button, var(--cl-radius-md, 12px))}.rounded-claudius-sm{border-radius:var(--cl-radius-sm, 8px)}.rounded-r-claudius-lg{border-top-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px));border-bottom-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-t-claudius-lg{border-top-left-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px));border-top-right-radius:var(--claudius-radius-card, var(--cl-radius-lg, 16px))}.rounded-bl-claudius-tail{border-bottom-left-radius:var(--cl-radius-tail, 2px)}.rounded-br-claudius-tail{border-bottom-right-radius:var(--cl-radius-tail, 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-claudius-border{border-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.bg-claudius-accent{background-color:var(--claudius-primary, var(--cl-color-accent, #2563eb))}.bg-claudius-accent-soft{background-color:var(--cl-color-accent-soft, rgb(255 255 255 / .2))}.bg-claudius-assistant-bubble{background-color:var(--claudius-assistant-bg, var(--cl-color-assistant-bubble, var(--cl-color-surface-muted, #f1f5f9)))}.bg-claudius-border{background-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.bg-claudius-error{background-color:var(--claudius-error, var(--cl-color-error, #dc2626))}.bg-claudius-error-surface{background-color:var(--claudius-error-bg, var(--cl-color-error-surface, #fef2f2))}.bg-claudius-field{background-color:var(--cl-color-field, #ffffff)}.bg-claudius-scrim{background-color:var(--cl-color-scrim, rgb(0 0 0 / .5))}.bg-claudius-surface{background-color:var(--cl-color-surface, #ffffff)}.bg-claudius-surface-muted{background-color:var(--claudius-light, var(--cl-color-surface-muted, #f1f5f9))}.bg-claudius-text{background-color:var(--claudius-dark, var(--cl-color-text, #1e293b))}.bg-claudius-text-muted{background-color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.bg-claudius-user-bubble{background-color:var(--claudius-user-bg, var(--cl-color-user-bubble, var(--cl-color-accent, #2563eb)))}.bg-transparent{background-color:transparent}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pr-8{padding-right:2rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-body{font-family:var(--claudius-font-body, var(--cl-font-body, system-ui)),sans-serif}.font-heading{font-family:var(--claudius-font-heading, var(--cl-font-heading, system-ui)),sans-serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.tracking-wide{letter-spacing:.025em}.text-claudius-accent{color:var(--claudius-primary, var(--cl-color-accent, #2563eb))}.text-claudius-accent-text{color:var(--cl-color-accent-text, #ffffff)}.text-claudius-accent-text-muted{color:var(--cl-color-accent-text-muted, rgb(255 255 255 / .7))}.text-claudius-assistant-bubble-text{color:var(--claudius-assistant-text, var(--cl-color-assistant-bubble-text, var(--cl-color-text, #1e293b)))}.text-claudius-error{color:var(--claudius-error, var(--cl-color-error, #dc2626))}.text-claudius-error-text{color:var(--cl-color-error-text, #ffffff)}.text-claudius-link{color:var(--cl-color-link, currentColor)}.text-claudius-surface{color:var(--cl-color-surface, #ffffff)}.text-claudius-text{color:var(--claudius-dark, var(--cl-color-text, #1e293b))}.text-claudius-text-muted{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.text-claudius-user-bubble-text{color:var(--claudius-user-text, var(--cl-color-user-bubble-text, #ffffff))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.opacity-70{opacity:.7}.shadow-claudius-elevated{--tw-shadow: var(--cl-shadow-elevated, 0 25px 50px -12px rgb(0 0 0 / .25));--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-claudius-floating{--tw-shadow: var(--cl-shadow-floating, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-claudius-accent{--tw-ring-color: var(--claudius-primary, var(--cl-color-accent, #2563eb))}.ring-claudius-border{--tw-ring-color: var(--claudius-border, var(--cl-color-border, #e2e8f0))}.sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[animation-delay\:0ms\]{animation-delay:0ms}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}[data-claudius-dark=true]{--cl-color-accent: var(--cl-color-accent-dark, #2563eb);--cl-color-accent-text: var(--cl-color-accent-text-dark, #ffffff);--cl-color-accent-soft: var( --cl-color-accent-soft-dark, rgb(255 255 255 / .2) );--cl-color-accent-text-muted: var( --cl-color-accent-text-muted-dark, rgb(255 255 255 / .7) );--cl-color-surface: var(--cl-color-surface-dark, #111827);--cl-color-surface-muted: var(--cl-color-surface-muted-dark, #1f2937);--cl-color-text: var(--cl-color-text-dark, #f3f4f6);--cl-color-text-muted: var(--cl-color-text-muted-dark, #9ca3af);--cl-color-border: var(--cl-color-border-dark, #374151);--cl-color-user-bubble: var( --cl-color-user-bubble-dark, var(--cl-color-accent) );--cl-color-user-bubble-text: var(--cl-color-user-bubble-text-dark, #ffffff);--cl-color-assistant-bubble: var( --cl-color-assistant-bubble-dark, var(--cl-color-surface-muted) );--cl-color-assistant-bubble-text: var( --cl-color-assistant-bubble-text-dark, #e5e7eb );--cl-color-field: var(--cl-color-field-dark, #1f2937);--cl-color-error: var(--cl-color-error-dark, #f87171);--cl-color-error-surface: var( --cl-color-error-surface-dark, rgb(127 29 29 / .3) );--cl-color-error-text: var(--cl-color-error-text-dark, #ffffff);--cl-color-link: var(--cl-color-link-dark, #60a5fa);--cl-color-scrim: var(--cl-color-scrim-dark, rgb(0 0 0 / .5))}.claudius-bottom-sheet{transition:transform .3s cubic-bezier(.32,.72,0,1)}.claudius-bottom-sheet[data-dragging=true]{transition:none}.claudius-scrim{transition:opacity .3s ease}@media(prefers-reduced-motion:reduce){.claudius-bottom-sheet{transition:opacity .2s ease;transform:none!important}.claudius-scrim{transition:opacity .15s ease}}.placeholder\:text-claudius-text-muted::-moz-placeholder{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.placeholder\:text-claudius-text-muted::placeholder{color:var(--claudius-gray, var(--cl-color-text-muted, #64748b))}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-claudius-accent-soft:hover{background-color:var(--cl-color-accent-soft, rgb(255 255 255 / .2))}.hover\:bg-claudius-border:hover{background-color:var(--claudius-border, var(--cl-color-border, #e2e8f0))}.hover\:bg-claudius-surface-muted:hover{background-color:var(--claudius-light, var(--cl-color-surface-muted, #f1f5f9))}.hover\:text-claudius-accent-text:hover{color:var(--cl-color-accent-text, #ffffff)}.hover\:text-claudius-text:hover{color:var(--claudius-dark, var(--cl-color-text, #1e293b))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-80:hover{opacity:.8}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-claudius-floating-hover:hover{--tw-shadow: var(--cl-shadow-floating-hover, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-claudius-accent:focus{border-color:var(--claudius-primary, var(--cl-color-accent, #2563eb))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-claudius-accent:focus{--tw-ring-color: var(--claudius-primary, var(--cl-color-accent, #2563eb))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-claudius-accent:focus-visible{--tw-ring-color: var(--claudius-primary, var(--cl-color-accent, #2563eb))}.focus-visible\:ring-claudius-error:focus-visible{--tw-ring-color: var(--claudius-error, var(--cl-color-error, #dc2626))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:hover\:opacity-100:hover:disabled{opacity:1}@media(prefers-reduced-motion:no-preference){@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.motion-safe\:animate-bounce{animation:bounce 1s infinite}}@media(min-width:640px){.sm\:left-6{left:1.5rem}.sm\:right-6{right:1.5rem}.sm\:max-w-\[400px\]{max-width:400px}}@media(min-width:768px){.md\:max-w-\[440px\]{max-width:440px}} diff --git a/cdn/claudius.iife.js b/cdn/claudius.iife.js index d458420..ca5bc59 100644 --- a/cdn/claudius.iife.js +++ b/cdn/claudius.iife.js @@ -1,4 +1,4 @@ -var Claudius=(function(Nt){"use strict";var vp=Object.defineProperty;var gp=(Nt,dt,xt)=>dt in Nt?vp(Nt,dt,{enumerable:!0,configurable:!0,writable:!0,value:xt}):Nt[dt]=xt;var nn=(Nt,dt,xt)=>gp(Nt,typeof dt!="symbol"?dt+"":dt,xt);var dt={exports:{}},xt={},Hl={exports:{}},re={};/** +var Claudius=(function(jt){"use strict";var Fp=Object.defineProperty;var Up=(jt,pt,St)=>pt in jt?Fp(jt,pt,{enumerable:!0,configurable:!0,writable:!0,value:St}):jt[pt]=St;var un=(jt,pt,St)=>Up(jt,typeof pt!="symbol"?pt+"":pt,St);var pt={exports:{}},St={},Wl={exports:{}},le={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Claudius=(function(Nt){"use strict";var vp=Object.defineProperty;var gp=(Nt, * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Vi;function nc(){if(Vi)return re;Vi=1;var a=Symbol.for("react.element"),d=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),R=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),P=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),V=Symbol.iterator;function ee(p){return p===null||typeof p!="object"?null:(p=V&&p[V]||p["@@iterator"],typeof p=="function"?p:null)}var oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ie=Object.assign,U={};function W(p,x,X){this.props=p,this.context=x,this.refs=U,this.updater=X||oe}W.prototype.isReactComponent={},W.prototype.setState=function(p,x){if(typeof p!="object"&&typeof p!="function"&&p!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,x,"setState")},W.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function fe(){}fe.prototype=W.prototype;function ye(p,x,X){this.props=p,this.context=x,this.refs=U,this.updater=X||oe}var ne=ye.prototype=new fe;ne.constructor=ye,ie(ne,W.prototype),ne.isPureReactComponent=!0;var $=Array.isArray,ue=Object.prototype.hasOwnProperty,he={current:null},me={key:!0,ref:!0,__self:!0,__source:!0};function q(p,x,X){var Y,D={},G=null,Z=null;if(x!=null)for(Y in x.ref!==void 0&&(Z=x.ref),x.key!==void 0&&(G=""+x.key),x)ue.call(x,Y)&&!me.hasOwnProperty(Y)&&(D[Y]=x[Y]);var te=arguments.length-2;if(te===1)D.children=X;else if(1>>1,x=M[p];if(0>>1;py(D,E))Gy(Z,D)?(M[p]=Z,M[G]=E,p=G):(M[p]=D,M[Y]=E,p=Y);else if(Gy(Z,E))M[p]=Z,M[G]=E,p=G;else break e}}return H}function y(M,H){var E=M.sortIndex-H.sortIndex;return E!==0?E:M.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var w=performance;a.unstable_now=function(){return w.now()}}else{var R=Date,L=R.now();a.unstable_now=function(){return R.now()-L}}var N=[],P=[],B=1,V=null,ee=3,oe=!1,ie=!1,U=!1,W=typeof setTimeout=="function"?setTimeout:null,fe=typeof clearTimeout=="function"?clearTimeout:null,ye=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ne(M){for(var H=u(P);H!==null;){if(H.callback===null)v(P);else if(H.startTime<=M)v(P),H.sortIndex=H.expirationTime,d(N,H);else break;H=u(P)}}function $(M){if(U=!1,ne(M),!ie)if(u(N)!==null)ie=!0,je(ue);else{var H=u(P);H!==null&&de($,H.startTime-M)}}function ue(M,H){ie=!1,U&&(U=!1,fe(q),q=-1),oe=!0;var E=ee;try{for(ne(H),V=u(N);V!==null&&(!(V.expirationTime>H)||M&&!_e());){var p=V.callback;if(typeof p=="function"){V.callback=null,ee=V.priorityLevel;var x=p(V.expirationTime<=H);H=a.unstable_now(),typeof x=="function"?V.callback=x:V===u(N)&&v(N),ne(H)}else v(N);V=u(N)}if(V!==null)var X=!0;else{var Y=u(P);Y!==null&&de($,Y.startTime-H),X=!1}return X}finally{V=null,ee=E,oe=!1}}var he=!1,me=null,q=-1,He=5,Ce=-1;function _e(){return!(a.unstable_now()-CeM||125p?(M.sortIndex=E,d(P,M),u(N)===null&&M===u(P)&&(U?(fe(q),q=-1):U=!0,de($,E-p))):(M.sortIndex=x,d(N,M),ie||oe||(ie=!0,je(ue))),M},a.unstable_shouldYield=_e,a.unstable_wrapCallback=function(M){var H=ee;return function(){var E=ee;ee=H;try{return M.apply(this,arguments)}finally{ee=E}}}})($l)),$l}var Gi;function ic(){return Gi||(Gi=1,Wl.exports=oc()),Wl.exports}/** + */var Zo;function hc(){return Zo||(Zo=1,(function(s){function c(L,V){var C=L.length;L.push(V);e:for(;0>>1,S=L[f];if(0>>1;fg(re,C))eeg(I,re)?(L[f]=I,L[ee]=C,f=ee):(L[f]=re,L[J]=C,f=J);else if(eeg(I,C))L[f]=I,L[ee]=C,f=ee;else break e}}return V}function g(L,V){var C=L.sortIndex-V.sortIndex;return C!==0?C:L.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var k=performance;s.unstable_now=function(){return k.now()}}else{var x=Date,E=x.now();s.unstable_now=function(){return x.now()-E}}var T=[],M=[],W=1,H=null,te=3,ie=!1,oe=!1,O=!1,Y=typeof setTimeout=="function"?setTimeout:null,se=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ue(L){for(var V=u(M);V!==null;){if(V.callback===null)h(M);else if(V.startTime<=L)h(M),V.sortIndex=V.expirationTime,c(T,V);else break;V=u(M)}}function X(L){if(O=!1,ue(L),!oe)if(u(T)!==null)oe=!0,Me(b);else{var V=u(M);V!==null&&me(X,V.startTime-L)}}function b(L,V){oe=!1,O&&(O=!1,se(ne),ne=-1),ie=!0;var C=te;try{for(ue(V),H=u(T);H!==null&&(!(H.expirationTime>V)||L&&!Se());){var f=H.callback;if(typeof f=="function"){H.callback=null,te=H.priorityLevel;var S=f(H.expirationTime<=V);V=s.unstable_now(),typeof S=="function"?H.callback=S:H===u(T)&&h(T),ue(V)}else h(T);H=u(T)}if(H!==null)var B=!0;else{var J=u(M);J!==null&&me(X,J.startTime-V),B=!1}return B}finally{H=null,te=C,ie=!1}}var he=!1,ge=null,ne=-1,Le=5,de=-1;function Se(){return!(s.unstable_now()-deL||125f?(L.sortIndex=C,c(M,L),u(T)===null&&L===u(M)&&(O?(se(ne),ne=-1):O=!0,me(X,C-f))):(L.sortIndex=S,c(T,L),oe||ie||(oe=!0,Me(b))),L},s.unstable_shouldYield=Se,s.unstable_wrapCallback=function(L){var V=te;return function(){var C=te;te=V;try{return L.apply(this,arguments)}finally{te=C}}}})(Gl)),Gl}var Jo;function mc(){return Jo||(Jo=1,Kl.exports=hc()),Kl.exports}/** * @license React * react-dom.production.min.js * @@ -30,17 +30,17 @@ var Claudius=(function(Nt){"use strict";var vp=Object.defineProperty;var gp=(Nt, * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Yi;function uc(){if(Yi)return Xe;Yi=1;var a=Bl(),d=ic();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N=Object.prototype.hasOwnProperty,P=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,B={},V={};function ee(e){return N.call(V,e)?!0:N.call(B,e)?!1:P.test(e)?V[e]=!0:(B[e]=!0,!1)}function oe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ie(e,t,n,r){if(t===null||typeof t>"u"||oe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function U(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var W={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){W[e]=new U(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];W[t]=new U(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){W[e]=new U(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){W[e]=new U(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){W[e]=new U(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){W[e]=new U(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){W[e]=new U(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){W[e]=new U(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){W[e]=new U(e,5,!1,e.toLowerCase(),null,!1,!1)});var fe=/[\-:]([a-z])/g;function ye(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(fe,ye);W[t]=new U(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(fe,ye);W[t]=new U(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(fe,ye);W[t]=new U(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){W[e]=new U(e,1,!1,e.toLowerCase(),null,!1,!1)}),W.xlinkHref=new U("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){W[e]=new U(e,1,!1,e.toLowerCase(),null,!0,!0)});function ne(e,t,n,r){var l=W.hasOwnProperty(t)?W[t]:null;(l!==null?l.type!==0:r||!(2s||l[i]!==o[s]){var c=` -`+l[i].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=i&&0<=s);break}}}finally{X=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?x(e):""}function D(e){switch(e.tag){case 5:return x(e.type);case 16:return x("Lazy");case 13:return x("Suspense");case 19:return x("SuspenseList");case 0:case 2:case 15:return e=Y(e.type,!1),e;case 11:return e=Y(e.type.render,!1),e;case 1:return e=Y(e.type,!0),e;default:return""}}function G(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case me:return"Fragment";case he:return"Portal";case He:return"Profiler";case q:return"StrictMode";case ke:return"Suspense";case Be:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _e:return(e.displayName||"Context")+".Consumer";case Ce:return(e._context.displayName||"Context")+".Provider";case b:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return t=e.displayName||null,t!==null?t:G(e.type)||"Memo";case je:t=e._payload,e=e._init;try{return G(e(t))}catch{}}return null}function Z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(t);case 8:return t===q?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function te(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function le(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Le(e){var t=le(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ve(e){e._valueTracker||(e._valueTracker=Le(e))}function St(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=le(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function It(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ze(e,t){var n=t.checked;return E({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wn(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=te(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pr(e,t){t=t.checked,t!=null&&ne(e,"checked",t,!1)}function Xl(e,t){Pr(e,t);var n=te(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zl(e,t.type,te(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Zl(e,t,n){(t!=="number"||It(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function gn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=jr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xf=["Webkit","ms","Moz","O"];Object.keys(Kn).forEach(function(e){xf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kn[t]=Kn[e]})});function gu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kn.hasOwnProperty(e)&&Kn[e]?(""+t).trim():t+"px"}function yu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=gu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Sf=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bl(e,t){if(t){if(Sf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function eo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var to=null;function no(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ro=null,yn=null,wn=null;function wu(e){if(e=hr(e)){if(typeof ro!="function")throw Error(u(280));var t=e.stateNode;t&&(t=tl(t),ro(e.stateNode,e.type,t))}}function xu(e){yn?wn?wn.push(e):wn=[e]:yn=e}function Su(){if(yn){var e=yn,t=wn;if(wn=yn=null,wu(e),t)for(e=0;e>>=0,e===0?32:31-(jf(e)/zf|0)|0}var Ar=64,Fr=4194304;function Zn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ur(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~l;s!==0?r=Zn(s):(o&=i,o!==0&&(r=Zn(o)))}else i=n&~l,i!==0?r=Zn(i):o!==0&&(r=Zn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Jn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=n}function Af(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=or),Xu=" ",Zu=!1;function Ju(e,t){switch(e){case"keyup":return fd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function pd(e,t){switch(e){case"compositionend":return qu(t);case"keypress":return t.which!==32?null:(Zu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Zu?null:e;default:return null}}function hd(e,t){if(kn)return e==="compositionend"||!ko&&Ju(e,t)?(e=Wu(),$r=vo=Bt=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=os(n)}}function us(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?us(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ss(){for(var e=window,t=It();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=It(e.document)}return t}function _o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ed(e){var t=ss(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&us(n.ownerDocument.documentElement,n)){if(r!==null&&_o(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=is(n,o);var i=is(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,En=null,Ro=null,ar=null,No=!1;function as(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;No||En==null||En!==It(r)||(r=En,"selectionStart"in r&&_o(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ar&&sr(ar,r)||(ar=r,r=qr(Ro,"onSelect"),0Tn||(e.current=Uo[Tn],Uo[Tn]=null,Tn--)}function pe(e,t){Tn++,Uo[Tn]=e.current,e.current=t}var Qt={},We=$t(Qt),Ze=$t(!1),on=Qt;function Ln(e,t){var n=e.type.contextTypes;if(!n)return Qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Je(e){return e=e.childContextTypes,e!=null}function nl(){ge(Ze),ge(We)}function Cs(e,t,n){if(We.current!==Qt)throw Error(u(168));pe(We,t),pe(Ze,n)}function _s(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,Z(e)||"Unknown",l));return E({},n,r)}function rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qt,on=We.current,pe(We,e),pe(Ze,Ze.current),!0}function Rs(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=_s(e,t,on),r.__reactInternalMemoizedMergedChildContext=e,ge(Ze),ge(We),pe(We,e)):ge(Ze),pe(Ze,n)}var Lt=null,ll=!1,Ho=!1;function Ns(e){Lt===null?Lt=[e]:Lt.push(e)}function Dd(e){ll=!0,Ns(e)}function Kt(){if(!Ho&&Lt!==null){Ho=!0;var e=0,t=ce;try{var n=Lt;for(ce=1;e>=i,l-=i,Mt=1<<32-pt(t)+l|n<J?(Ie=K,K=null):Ie=K.sibling;var ae=k(h,K,m[J],T);if(ae===null){K===null&&(K=Ie);break}e&&K&&ae.alternate===null&&t(h,K),f=o(ae,f,J),Q===null?F=ae:Q.sibling=ae,Q=ae,K=Ie}if(J===m.length)return n(h,K),we&&sn(h,J),F;if(K===null){for(;JJ?(Ie=K,K=null):Ie=K.sibling;var tn=k(h,K,ae.value,T);if(tn===null){K===null&&(K=Ie);break}e&&K&&tn.alternate===null&&t(h,K),f=o(tn,f,J),Q===null?F=tn:Q.sibling=tn,Q=tn,K=Ie}if(ae.done)return n(h,K),we&&sn(h,J),F;if(K===null){for(;!ae.done;J++,ae=m.next())ae=_(h,ae.value,T),ae!==null&&(f=o(ae,f,J),Q===null?F=ae:Q.sibling=ae,Q=ae);return we&&sn(h,J),F}for(K=r(h,K);!ae.done;J++,ae=m.next())ae=j(K,h,J,ae.value,T),ae!==null&&(e&&ae.alternate!==null&&K.delete(ae.key===null?J:ae.key),f=o(ae,f,J),Q===null?F=ae:Q.sibling=ae,Q=ae);return e&&K.forEach(function(mp){return t(h,mp)}),we&&sn(h,J),F}function Ne(h,f,m,T){if(typeof m=="object"&&m!==null&&m.type===me&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ue:e:{for(var F=m.key,Q=f;Q!==null;){if(Q.key===F){if(F=m.type,F===me){if(Q.tag===7){n(h,Q.sibling),f=l(Q,m.props.children),f.return=h,h=f;break e}}else if(Q.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===je&&zs(F)===Q.type){n(h,Q.sibling),f=l(Q,m.props),f.ref=mr(h,Q,m),f.return=h,h=f;break e}n(h,Q);break}else t(h,Q);Q=Q.sibling}m.type===me?(f=vn(m.props.children,h.mode,T,m.key),f.return=h,h=f):(T=jl(m.type,m.key,m.props,null,h.mode,T),T.ref=mr(h,f,m),T.return=h,h=T)}return i(h);case he:e:{for(Q=m.key;f!==null;){if(f.key===Q)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){n(h,f.sibling),f=l(f,m.children||[]),f.return=h,h=f;break e}else{n(h,f);break}else t(h,f);f=f.sibling}f=Ai(m,h.mode,T),f.return=h,h=f}return i(h);case je:return Q=m._init,Ne(h,f,Q(m._payload),T)}if($n(m))return I(h,f,m,T);if(H(m))return A(h,f,m,T);sl(h,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,f!==null&&f.tag===6?(n(h,f.sibling),f=l(f,m),f.return=h,h=f):(n(h,f),f=Ii(m,h.mode,T),f.return=h,h=f),i(h)):n(h,f)}return Ne}var zn=Os(!0),Ds=Os(!1),al=$t(null),cl=null,On=null,Ko=null;function Go(){Ko=On=cl=null}function Yo(e){var t=al.current;ge(al),e._currentValue=t}function Xo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Dn(e,t){cl=e,Ko=On=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(Ko!==e)if(e={context:e,memoizedValue:t,next:null},On===null){if(cl===null)throw Error(u(308));On=e,cl.dependencies={lanes:0,firstContext:e}}else On=On.next=e;return t}var an=null;function Zo(e){an===null?an=[e]:an.push(e)}function Is(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Zo(t)):(n.next=l.next,l.next=n),t.interleaved=n,jt(e,r)}function jt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Gt=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function As(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(se&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,jt(e,n)}return l=r.interleaved,l===null?(t.next=t,Zo(r)):(t.next=l.next,l.next=t),r.interleaved=t,jt(e,n)}function fl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,co(e,n)}}function Fs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function dl(e,t,n,r){var l=e.updateQueue;Gt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var c=s,g=c.next;c.next=null,i===null?o=g:i.next=g,i=c;var C=e.alternate;C!==null&&(C=C.updateQueue,s=C.lastBaseUpdate,s!==i&&(s===null?C.firstBaseUpdate=g:s.next=g,C.lastBaseUpdate=c))}if(o!==null){var _=l.baseState;i=0,C=g=c=null,s=o;do{var k=s.lane,j=s.eventTime;if((r&k)===k){C!==null&&(C=C.next={eventTime:j,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var I=e,A=s;switch(k=t,j=n,A.tag){case 1:if(I=A.payload,typeof I=="function"){_=I.call(j,_,k);break e}_=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=A.payload,k=typeof I=="function"?I.call(j,_,k):I,k==null)break e;_=E({},_,k);break e;case 2:Gt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,k=l.effects,k===null?l.effects=[s]:k.push(s))}else j={eventTime:j,lane:k,tag:s.tag,payload:s.payload,callback:s.callback,next:null},C===null?(g=C=j,c=_):C=C.next=j,i|=k;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;k=s,s=k.next,k.next=null,l.lastBaseUpdate=k,l.shared.pending=null}}while(!0);if(C===null&&(c=_),l.baseState=c,l.firstBaseUpdate=g,l.lastBaseUpdate=C,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);dn|=i,e.lanes=i,e.memoizedState=_}}function Us(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ni.transition;ni.transition={};try{e(!1),t()}finally{ce=n,ni.transition=r}}function la(){return at().memoizedState}function Ud(e,t,n){var r=qt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},oa(e))ia(t,n);else if(n=Is(e,t,n,r),n!==null){var l=Ye();wt(n,e,r,l),ua(n,t,r)}}function Hd(e,t,n){var r=qt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(oa(e))ia(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,ht(s,i)){var c=t.interleaved;c===null?(l.next=l,Zo(t)):(l.next=c.next,c.next=l),t.interleaved=l;return}}catch{}finally{}n=Is(e,t,l,r),n!==null&&(l=Ye(),wt(n,e,r,l),ua(n,t,r))}}function oa(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function ia(e,t){wr=ml=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ua(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,co(e,n)}}var yl={readContext:st,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},Bd={readContext:st,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vl(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vl(4194308,4,e,t)},useInsertionEffect:function(e,t){return vl(4,2,e,t)},useMemo:function(e,t){var n=_t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=_t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ud.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:Ys,useDebugValue:ai,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=Ys(!1),t=e[0];return e=Fd.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,l=_t();if(we){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),De===null)throw Error(u(349));(fn&30)!==0||Ws(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Zs(Qs.bind(null,r,o,e),[e]),r.flags|=2048,kr(9,$s.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=_t(),t=De.identifierPrefix;if(we){var n=Pt,r=Mt;n=(r&~(1<<32-pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=xr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Et]=t,e[pr]=r,Na(e,t,!1,!1),t.stateNode=e;e:{switch(i=eo(n,r),n){case"dialog":ve("cancel",e),ve("close",e),l=r;break;case"iframe":case"object":case"embed":ve("load",e),l=r;break;case"video":case"audio":for(l=0;lHn&&(t.flags|=128,r=!0,Er(o,!1),t.lanes=4194304)}else{if(!r)if(e=pl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Er(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!we)return Qe(t),null}else 2*Re()-o.renderingStartTime>Hn&&n!==1073741824&&(t.flags|=128,r=!0,Er(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Re(),t.sibling=null,n=xe.current,pe(xe,r?n&1|2:n&1),t):(Qe(t),null);case 22:case 23:return zi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function Xd(e,t){switch(Vo(t),t.tag){case 1:return Je(t.type)&&nl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(),ge(Ze),ge(We),ti(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return bo(t),null;case 13:if(ge(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(xe),null;case 4:return In(),null;case 10:return Yo(t.type._context),null;case 22:case 23:return zi(),null;case 24:return null;default:return null}}var kl=!1,Ke=!1,Zd=typeof WeakSet=="function"?WeakSet:Set,z=null;function Fn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ee(e,t,r)}else n.current=null}function Si(e,t,n){try{n()}catch(r){Ee(e,t,r)}}var Ma=!1;function Jd(e,t){if(zo=Vr,e=ss(),_o(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,s=-1,c=-1,g=0,C=0,_=e,k=null;t:for(;;){for(var j;_!==n||l!==0&&_.nodeType!==3||(s=i+l),_!==o||r!==0&&_.nodeType!==3||(c=i+r),_.nodeType===3&&(i+=_.nodeValue.length),(j=_.firstChild)!==null;)k=_,_=j;for(;;){if(_===e)break t;if(k===n&&++g===l&&(s=i),k===o&&++C===r&&(c=i),(j=_.nextSibling)!==null)break;_=k,k=_.parentNode}_=j}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Oo={focusedElem:e,selectionRange:n},Vr=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var I=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var A=I.memoizedProps,Ne=I.memoizedState,h=t.stateNode,f=h.getSnapshotBeforeUpdate(t.elementType===t.type?A:vt(t.type,A),Ne);h.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(T){Ee(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return I=Ma,Ma=!1,I}function Cr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Si(t,n,o)}l=l.next}while(l!==r)}}function El(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ki(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Pa(e){var t=e.alternate;t!==null&&(e.alternate=null,Pa(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[pr],delete t[Fo],delete t[zd],delete t[Od])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ja(e){return e.tag===5||e.tag===3||e.tag===4}function za(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ja(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ei(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=el));else if(r!==4&&(e=e.child,e!==null))for(Ei(e,t,n),e=e.sibling;e!==null;)Ei(e,t,n),e=e.sibling}function Ci(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ci(e,t,n),e=e.sibling;e!==null;)Ci(e,t,n),e=e.sibling}var Fe=null,gt=!1;function Xt(e,t,n){for(n=n.child;n!==null;)Oa(e,t,n),n=n.sibling}function Oa(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Ir,n)}catch{}switch(n.tag){case 5:Ke||Fn(n,t);case 6:var r=Fe,l=gt;Fe=null,Xt(e,t,n),Fe=r,gt=l,Fe!==null&&(gt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(gt?(e=Fe,n=n.stateNode,e.nodeType===8?Ao(e.parentNode,n):e.nodeType===1&&Ao(e,n),nr(e)):Ao(Fe,n.stateNode));break;case 4:r=Fe,l=gt,Fe=n.stateNode.containerInfo,gt=!0,Xt(e,t,n),Fe=r,gt=l;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&((o&2)!==0||(o&4)!==0)&&Si(n,t,i),l=l.next}while(l!==r)}Xt(e,t,n);break;case 1:if(!Ke&&(Fn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ee(n,t,s)}Xt(e,t,n);break;case 21:Xt(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Xt(e,t,n),Ke=r):Xt(e,t,n);break;default:Xt(e,t,n)}}function Da(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zd),t.forEach(function(r){var l=ip.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function yt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Re()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bd(r/1960))-r,10e?16:e,Jt===null)var r=!1;else{if(e=Jt,Jt=null,Tl=0,(se&6)!==0)throw Error(u(331));var l=se;for(se|=4,z=e.current;z!==null;){var o=z,i=o.child;if((z.flags&16)!==0){var s=o.deletions;if(s!==null){for(var c=0;cRe()-Ni?hn(e,0):Ri|=n),et(e,t)}function Ya(e,t){t===0&&((e.mode&1)===0?t=1:(t=Fr,Fr<<=1,(Fr&130023424)===0&&(Fr=4194304)));var n=Ye();e=jt(e,t),e!==null&&(Jn(e,t,n),et(e,n))}function op(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ya(e,n)}function ip(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),Ya(e,n)}var Xa;Xa=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,Gd(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,we&&(t.flags&1048576)!==0&&Ts(t,il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Sl(e,t),e=t.pendingProps;var l=Ln(t,We.current);Dn(t,n),l=li(null,t,r,e,l,n);var o=oi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Je(r)?(o=!0,rl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Jo(t),l.updater=wl,t.stateNode=l,l._reactInternals=t,fi(t,r,e,n),t=mi(null,t,r,!0,o,n)):(t.tag=0,we&&o&&Bo(t),Ge(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Sl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=sp(r),e=vt(r,e),l){case 0:t=hi(null,t,r,e,n);break e;case 1:t=Sa(null,t,r,e,n);break e;case 11:t=va(null,t,r,e,n);break e;case 14:t=ga(null,t,r,vt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),hi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Sa(e,t,r,l,n);case 3:e:{if(ka(t),e===null)throw Error(u(387));r=t.pendingProps,o=t.memoizedState,l=o.element,As(e,t),dl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=An(Error(u(423)),t),t=Ea(e,t,r,n,l);break e}else if(r!==l){l=An(Error(u(424)),t),t=Ea(e,t,r,n,l);break e}else for(lt=Wt(t.stateNode.containerInfo.firstChild),rt=t,we=!0,mt=null,n=Ds(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jn(),r===l){t=Ot(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return Hs(t),e===null&&$o(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Do(r,l)?i=null:o!==null&&Do(r,o)&&(t.flags|=32),xa(e,t),Ge(e,t,i,n),t.child;case 6:return e===null&&$o(t),null;case 13:return Ca(e,t,n);case 4:return qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=zn(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),va(e,t,r,l,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,pe(al,r._currentValue),r._currentValue=i,o!==null)if(ht(o.value,i)){if(o.children===l.children&&!Ze.current){t=Ot(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=zt(-1,n&-n),c.tag=2;var g=o.updateQueue;if(g!==null){g=g.shared;var C=g.pending;C===null?c.next=c:(c.next=C.next,C.next=c),g.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xo(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(u(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Xo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ge(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Dn(t,n),l=st(l),r=r(l),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,l=vt(r,t.pendingProps),l=vt(r.type,l),ga(e,t,r,l,n);case 15:return ya(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Sl(e,t),t.tag=1,Je(r)?(e=!0,rl(t)):e=!1,Dn(t,n),aa(t,r,l),fi(t,r,l,n),mi(null,t,r,!0,e,n);case 19:return Ra(e,t,n);case 22:return wa(e,t,n)}throw Error(u(156,t.tag))};function Za(e,t){return Lu(e,t)}function up(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,r){return new up(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return Di(e)?1:0;if(e!=null){if(e=e.$$typeof,e===b)return 11;if(e===Ae)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Di(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case me:return vn(n.children,l,o,t);case q:i=8,l|=8;break;case He:return e=ft(12,n,t,l|2),e.elementType=He,e.lanes=o,e;case ke:return e=ft(13,n,t,l),e.elementType=ke,e.lanes=o,e;case Be:return e=ft(19,n,t,l),e.elementType=Be,e.lanes=o,e;case de:return zl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ce:i=10;break e;case _e:i=9;break e;case b:i=11;break e;case Ae:i=14;break e;case je:i=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=ft(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function vn(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function zl(e,t,n,r){return e=ft(22,e,r,t),e.elementType=de,e.lanes=n,e.stateNode={isHidden:!1},e}function Ii(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Ai(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ap(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ao(0),this.expirationTimes=ao(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ao(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Fi(e,t,n,r,l,o,i,s,c){return e=new ap(e,t,n,s,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ft(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(o),e}function cp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(d){console.error(d)}}return a(),Vl.exports=uc(),Vl.exports}var Zi;function ac(){if(Zi)return Lr;Zi=1;var a=sc();return Lr.createRoot=a.createRoot,Lr.hydrateRoot=a.hydrateRoot,Lr}var Ji=ac(),O=Bl();class tt extends Error{constructor(d,u,v,y){super(d),this.status=u,this.code=v,this.retryAfter=y,this.name="ChatApiError"}}class Ql extends Error{constructor(){super("Request debounced"),this.name="DebounceError"}}const cc=3e4;class fc{constructor(d,u){nn(this,"baseUrl");nn(this,"maxRetries");nn(this,"debounceMs");nn(this,"timeoutMs");nn(this,"lastSendTime",0);this.baseUrl=d,this.maxRetries=(u==null?void 0:u.maxRetries)??2,this.debounceMs=(u==null?void 0:u.debounceMs)??300,this.timeoutMs=(u==null?void 0:u.timeoutMs)??cc}async sendMessage(d){if(this.debounceMs>0&&Date.now()-this.lastSendTime({})),R=y.headers.get("Retry-After"),L=R?Number(R):void 0;if(u=new tt(w.error??`Request failed with status ${y.status}`,y.status,w.code,L),!this.isRetryable(y.status))throw u;if(v"u")return this.sendMessage(d);if(this.debounceMs>0&&Date.now()-this.lastSendTime({})),P=R.headers.get("Retry-After");if(v=new tt(N.error??`Request failed with status ${R.status}`,R.status,N.code,P?Number(P):void 0),!this.isRetryable(R.status))throw v;w{v.cancel().catch(()=>{})};(B=u.signal)==null||B.addEventListener("abort",P,{once:!0});try{for(;;){let fe;try{fe=await v.read()}catch(ne){if((V=u.signal)!=null&&V.aborted)break;throw ne}if((ee=u.signal)!=null&&ee.aborted||fe.done)break;w+=y.decode(fe.value,{stream:!0});let ye;for(;(ye=w.indexOf(` + */var bo;function gc(){if(bo)return Xe;bo=1;var s=$l(),c=mc();function u(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),T=Object.prototype.hasOwnProperty,M=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,W={},H={};function te(e){return T.call(H,e)?!0:T.call(W,e)?!1:M.test(e)?H[e]=!0:(W[e]=!0,!1)}function ie(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function oe(e,t,n,r){if(t===null||typeof t>"u"||ie(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function O(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Y[e]=new O(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Y[t]=new O(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Y[e]=new O(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Y[e]=new O(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Y[e]=new O(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Y[e]=new O(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Y[e]=new O(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Y[e]=new O(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Y[e]=new O(e,5,!1,e.toLowerCase(),null,!1,!1)});var se=/[\-:]([a-z])/g;function ae(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(se,ae);Y[t]=new O(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(se,ae);Y[t]=new O(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(se,ae);Y[t]=new O(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Y[e]=new O(e,1,!1,e.toLowerCase(),null,!1,!1)}),Y.xlinkHref=new O("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Y[e]=new O(e,1,!1,e.toLowerCase(),null,!0,!0)});function ue(e,t,n,r){var l=Y.hasOwnProperty(t)?Y[t]:null;(l!==null?l.type!==0:r||!(2a||l[o]!==i[a]){var d=` +`+l[o].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),d}while(1<=o&&0<=a);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?S(e):""}function re(e){switch(e.tag){case 5:return S(e.type);case 16:return S("Lazy");case 13:return S("Suspense");case 19:return S("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function ee(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ge:return"Fragment";case he:return"Portal";case Le:return"Profiler";case ne:return"StrictMode";case q:return"Suspense";case Re:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Se:return(e.displayName||"Context")+".Consumer";case de:return(e._context.displayName||"Context")+".Provider";case ke:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ze:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case Me:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}function I(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(t);case 8:return t===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function K(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ye(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ze(e){e._valueTracker||(e._valueTracker=ye(e))}function kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ft(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Et(e,t){var n=t.checked;return C({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ke(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=K(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function De(e,t){t=t.checked,t!=null&&ue(e,"checked",t,!1)}function Ut(e,t){De(e,t);var n=K(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ti(e,t.type,n):t.hasOwnProperty("defaultValue")&&ti(e,t.type,K(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ti(e,t,n){(t!=="number"||Ft(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Gn=Array.isArray;function Sn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Vf=["Webkit","ms","Moz","O"];Object.keys(Xn).forEach(function(e){Vf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xn[t]=Xn[e]})});function Nu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Xn.hasOwnProperty(e)&&Xn[e]?(""+t).trim():t+"px"}function Ru(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Nu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Wf=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function li(e,t){if(t){if(Wf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(u(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(u(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(u(61))}if(t.style!=null&&typeof t.style!="object")throw Error(u(62))}}function ii(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var oi=null;function ui(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var si=null,kn=null,En=null;function _u(e){if(e=vr(e)){if(typeof si!="function")throw Error(u(280));var t=e.stateNode;t&&(t=ll(t),si(e.stateNode,e.type,t))}}function ju(e){kn?En?En.push(e):En=[e]:kn=e}function Lu(){if(kn){var e=kn,t=En;if(En=kn=null,_u(e),t)for(e=0;e>>=0,e===0?32:31-(ed(e)/td|0)|0}var Br=64,Hr=4194304;function bn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~l;a!==0?r=bn(a):(i&=o,i!==0&&(r=bn(i)))}else o=n&~l,o!==0?r=bn(o):i!==0&&(r=bn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function er(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function id(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=sr),ls=" ",is=!1;function os(e,t){switch(e){case"keyup":return zd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function us(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nn=!1;function Od(e,t){switch(e){case"compositionend":return us(t);case"keypress":return t.which!==32?null:(is=!0,ls);case"textInput":return e=t.data,e===ls&&is?null:e;default:return null}}function Ad(e,t){if(Nn)return e==="compositionend"||!Ni&&os(e,t)?(e=Ju(),Gr=xi=Qt=null,Nn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hs(n)}}function gs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vs(){for(var e=window,t=Ft();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ft(e.document)}return t}function ji(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Qd(e){var t=vs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gs(n.ownerDocument.documentElement,n)){if(r!==null&&ji(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=ms(n,i);var o=ms(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Rn=null,Li=null,dr=null,Mi=!1;function ys(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mi||Rn==null||Rn!==Ft(r)||(r=Rn,"selectionStart"in r&&ji(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),dr&&fr(dr,r)||(dr=r,r=tl(Li,"onSelect"),0Pn||(e.current=Wi[Pn],Wi[Pn]=null,Pn--)}function ve(e,t){Pn++,Wi[Pn]=e.current,e.current=t}var Xt={},Ve=Yt(Xt),Je=Yt(!1),cn=Xt;function zn(e,t){var n=e.type.contextTypes;if(!n)return Xt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function be(e){return e=e.childContextTypes,e!=null}function il(){xe(Je),xe(Ve)}function zs(e,t,n){if(Ve.current!==Xt)throw Error(u(168));ve(Ve,t),ve(Je,n)}function Ds(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(u(108,I(e)||"Unknown",l));return C({},n,r)}function ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xt,cn=Ve.current,ve(Ve,e),ve(Je,Je.current),!0}function Os(e,t,n){var r=e.stateNode;if(!r)throw Error(u(169));n?(e=Ds(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,xe(Je),xe(Ve),ve(Ve,e)):xe(Je),ve(Je,n)}var Mt=null,ul=!1,$i=!1;function As(e){Mt===null?Mt=[e]:Mt.push(e)}function rp(e){ul=!0,As(e)}function qt(){if(!$i&&Mt!==null){$i=!0;var e=0,t=pe;try{var n=Mt;for(pe=1;e>=o,l-=o,Pt=1<<32-ht(t)+l|n<Z?(Ue=Q,Q=null):Ue=Q.sibling;var fe=N(m,Q,v[Z],j);if(fe===null){Q===null&&(Q=Ue);break}e&&Q&&fe.alternate===null&&t(m,Q),p=i(fe,p,Z),$===null?U=fe:$.sibling=fe,$=fe,Q=Ue}if(Z===v.length)return n(m,Q),Ee&&dn(m,Z),U;if(Q===null){for(;ZZ?(Ue=Q,Q=null):Ue=Q.sibling;var on=N(m,Q,fe.value,j);if(on===null){Q===null&&(Q=Ue);break}e&&Q&&on.alternate===null&&t(m,Q),p=i(on,p,Z),$===null?U=on:$.sibling=on,$=on,Q=Ue}if(fe.done)return n(m,Q),Ee&&dn(m,Z),U;if(Q===null){for(;!fe.done;Z++,fe=v.next())fe=_(m,fe.value,j),fe!==null&&(p=i(fe,p,Z),$===null?U=fe:$.sibling=fe,$=fe);return Ee&&dn(m,Z),U}for(Q=r(m,Q);!fe.done;Z++,fe=v.next())fe=z(Q,m,Z,fe.value,j),fe!==null&&(e&&fe.alternate!==null&&Q.delete(fe.key===null?Z:fe.key),p=i(fe,p,Z),$===null?U=fe:$.sibling=fe,$=fe);return e&&Q.forEach(function(Ip){return t(m,Ip)}),Ee&&dn(m,Z),U}function je(m,p,v,j){if(typeof v=="object"&&v!==null&&v.type===ge&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case b:e:{for(var U=v.key,$=p;$!==null;){if($.key===U){if(U=v.type,U===ge){if($.tag===7){n(m,$.sibling),p=l($,v.props.children),p.return=m,m=p;break e}}else if($.elementType===U||typeof U=="object"&&U!==null&&U.$$typeof===Me&&Vs(U)===$.type){n(m,$.sibling),p=l($,v.props),p.ref=yr(m,$,v),p.return=m,m=p;break e}n(m,$);break}else t(m,$);$=$.sibling}v.type===ge?(p=xn(v.props.children,m.mode,j,v.key),p.return=m,m=p):(j=Ol(v.type,v.key,v.props,null,m.mode,j),j.ref=yr(m,p,v),j.return=m,m=j)}return o(m);case he:e:{for($=v.key;p!==null;){if(p.key===$)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=l(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Vo(v,m.mode,j),p.return=m,m=p}return o(m);case Me:return $=v._init,je(m,p,$(v._payload),j)}if(Gn(v))return A(m,p,v,j);if(V(v))return F(m,p,v,j);fl(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=l(p,v),p.return=m,m=p):(n(m,p),p=Ho(v,m.mode,j),p.return=m,m=p),o(m)):n(m,p)}return je}var In=Ws(!0),$s=Ws(!1),dl=Yt(null),pl=null,Fn=null,qi=null;function Zi(){qi=Fn=pl=null}function Ji(e){var t=dl.current;xe(dl),e._currentValue=t}function bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Un(e,t){pl=e,qi=Fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(et=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(qi!==e)if(e={context:e,memoizedValue:t,next:null},Fn===null){if(pl===null)throw Error(u(308));Fn=e,pl.dependencies={lanes:0,firstContext:e}}else Fn=Fn.next=e;return t}var pn=null;function eo(e){pn===null?pn=[e]:pn.push(e)}function Qs(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,eo(t)):(n.next=l.next,l.next=n),t.interleaved=n,Dt(e,r)}function Dt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zt=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ks(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ce&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Dt(e,n)}return l=r.interleaved,l===null?(t.next=t,eo(r)):(t.next=l.next,l.next=t),r.interleaved=t,Dt(e,n)}function hl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mi(e,n)}}function Gs(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ml(e,t,n,r){var l=e.updateQueue;Zt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var d=a,w=d.next;d.next=null,o===null?i=w:o.next=w,o=d;var R=e.alternate;R!==null&&(R=R.updateQueue,a=R.lastBaseUpdate,a!==o&&(a===null?R.firstBaseUpdate=w:a.next=w,R.lastBaseUpdate=d))}if(i!==null){var _=l.baseState;o=0,R=w=d=null,a=i;do{var N=a.lane,z=a.eventTime;if((r&N)===N){R!==null&&(R=R.next={eventTime:z,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var A=e,F=a;switch(N=t,z=n,F.tag){case 1:if(A=F.payload,typeof A=="function"){_=A.call(z,_,N);break e}_=A;break e;case 3:A.flags=A.flags&-65537|128;case 0:if(A=F.payload,N=typeof A=="function"?A.call(z,_,N):A,N==null)break e;_=C({},_,N);break e;case 2:Zt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,N=l.effects,N===null?l.effects=[a]:N.push(a))}else z={eventTime:z,lane:N,tag:a.tag,payload:a.payload,callback:a.callback,next:null},R===null?(w=R=z,d=_):R=R.next=z,o|=N;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;N=a,a=N.next,N.next=null,l.lastBaseUpdate=N,l.shared.pending=null}}while(!0);if(R===null&&(d=_),l.baseState=d,l.firstBaseUpdate=w,l.lastBaseUpdate=R,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);gn|=o,e.lanes=o,e.memoizedState=_}}function Ys(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=oo.transition;oo.transition={};try{e(!1),t()}finally{pe=n,oo.transition=r}}function pa(){return ct().memoizedState}function up(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ha(e))ma(t,n);else if(n=Qs(e,t,n,r),n!==null){var l=Ye();xt(n,e,r,l),ga(n,t,r)}}function sp(e,t,n){var r=nn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ha(e))ma(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(l.hasEagerState=!0,l.eagerState=a,mt(a,o)){var d=t.interleaved;d===null?(l.next=l,eo(t)):(l.next=d.next,d.next=l),t.interleaved=l;return}}catch{}finally{}n=Qs(e,t,l,r),n!==null&&(l=Ye(),xt(n,e,r,l),ga(n,t,r))}}function ha(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function ma(e,t){kr=yl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ga(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mi(e,n)}}var Sl={readContext:at,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},ap={readContext:at,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:ia,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,wl(4194308,4,sa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wl(4194308,4,e,t)},useInsertionEffect:function(e,t){return wl(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=up.bind(null,Te,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:ra,useDebugValue:ho,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=ra(!1),t=e[0];return e=op.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Te,l=Rt();if(Ee){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Fe===null)throw Error(u(349));(mn&30)!==0||Js(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,ia(ea.bind(null,r,i,e),[e]),r.flags|=2048,Tr(9,bs.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Rt(),t=Fe.identifierPrefix;if(Ee){var n=zt,r=Pt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Er++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Tt]=t,e[gr]=r,Aa(e,t,!1,!1),t.stateNode=e;e:{switch(o=ii(n,r),n){case"dialog":we("cancel",e),we("close",e),l=r;break;case"iframe":case"object":case"embed":we("load",e),l=r;break;case"video":case"audio":for(l=0;l$n&&(t.flags|=128,r=!0,Nr(i,!1),t.lanes=4194304)}else{if(!r)if(e=gl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ee)return $e(t),null}else 2*_e()-i.renderingStartTime>$n&&n!==1073741824&&(t.flags|=128,r=!0,Nr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_e(),t.sibling=null,n=Ce.current,ve(Ce,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Fo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ot&1073741824)!==0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(u(156,t.tag))}function vp(e,t){switch(Ki(t),t.tag){case 1:return be(t.type)&&il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bn(),xe(Je),xe(Ve),io(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ro(t),null;case 13:if(xe(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));An()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(Ce),null;case 4:return Bn(),null;case 10:return Ji(t.type._context),null;case 22:case 23:return Fo(),null;case 24:return null;default:return null}}var Tl=!1,Qe=!1,yp=typeof WeakSet=="function"?WeakSet:Set,D=null;function Vn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function No(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Ua=!1;function wp(e,t){if(Ii=Qr,e=vs(),ji(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,d=-1,w=0,R=0,_=e,N=null;t:for(;;){for(var z;_!==n||l!==0&&_.nodeType!==3||(a=o+l),_!==i||r!==0&&_.nodeType!==3||(d=o+r),_.nodeType===3&&(o+=_.nodeValue.length),(z=_.firstChild)!==null;)N=_,_=z;for(;;){if(_===e)break t;if(N===n&&++w===l&&(a=o),N===i&&++R===r&&(d=o),(z=_.nextSibling)!==null)break;_=N,N=_.parentNode}_=z}n=a===-1||d===-1?null:{start:a,end:d}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fi={focusedElem:e,selectionRange:n},Qr=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var A=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var F=A.memoizedProps,je=A.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?F:vt(t.type,F),je);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(j){Ne(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return A=Ua,Ua=!1,A}function Rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&No(t,n,i)}l=l.next}while(l!==r)}}function Nl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ro(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ba(e){var t=e.alternate;t!==null&&(e.alternate=null,Ba(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tt],delete t[gr],delete t[Vi],delete t[tp],delete t[np])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ha(e){return e.tag===5||e.tag===3||e.tag===4}function Va(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ha(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _o(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rl));else if(r!==4&&(e=e.child,e!==null))for(_o(e,t,n),e=e.sibling;e!==null;)_o(e,t,n),e=e.sibling}function jo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(jo(e,t,n),e=e.sibling;e!==null;)jo(e,t,n),e=e.sibling}var Be=null,yt=!1;function bt(e,t,n){for(n=n.child;n!==null;)Wa(e,t,n),n=n.sibling}function Wa(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Ur,n)}catch{}switch(n.tag){case 5:Qe||Vn(n,t);case 6:var r=Be,l=yt;Be=null,bt(e,t,n),Be=r,yt=l,Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&&(yt?(e=Be,n=n.stateNode,e.nodeType===8?Hi(e.parentNode,n):e.nodeType===1&&Hi(e,n),ir(e)):Hi(Be,n.stateNode));break;case 4:r=Be,l=yt,Be=n.stateNode.containerInfo,yt=!0,bt(e,t,n),Be=r,yt=l;break;case 0:case 11:case 14:case 15:if(!Qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&((i&2)!==0||(i&4)!==0)&&No(n,t,o),l=l.next}while(l!==r)}bt(e,t,n);break;case 1:if(!Qe&&(Vn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(Qe=(r=Qe)||n.memoizedState!==null,bt(e,t,n),Qe=r):bt(e,t,n);break;default:bt(e,t,n)}}function $a(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yp),t.forEach(function(r){var l=_p.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sp(r/1960))-r,10e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,Ml=0,(ce&6)!==0)throw Error(u(331));var l=ce;for(ce|=4,D=e.current;D!==null;){var i=D,o=i.child;if((D.flags&16)!==0){var a=i.deletions;if(a!==null){for(var d=0;d_e()-Po?yn(e,0):Mo|=n),nt(e,t)}function rc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Hr,Hr<<=1,(Hr&130023424)===0&&(Hr=4194304)));var n=Ye();e=Dt(e,t),e!==null&&(er(e,t,n),nt(e,n))}function Rp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rc(e,n)}function _p(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(u(314))}r!==null&&r.delete(t),rc(e,n)}var lc;lc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)et=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return et=!1,mp(e,t,n);et=(e.flags&131072)!==0}else et=!1,Ee&&(t.flags&1048576)!==0&&Is(t,al,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cl(e,t),e=t.pendingProps;var l=zn(t,Ve.current);Un(t,n),l=so(null,t,r,e,l,n);var i=ao();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,be(r)?(i=!0,ol(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,to(t),l.updater=kl,t.stateNode=l,l._reactInternals=t,go(t,r,e,n),t=xo(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&Qi(t),Ge(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Lp(r),e=vt(r,e),l){case 0:t=wo(null,t,r,e,n);break e;case 1:t=La(null,t,r,e,n);break e;case 11:t=Ta(null,t,r,e,n);break e;case 14:t=Na(null,t,r,vt(r.type,e),n);break e}throw Error(u(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),wo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),La(e,t,r,l,n);case 3:e:{if(Ma(t),e===null)throw Error(u(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Ks(e,t),ml(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Hn(Error(u(423)),t),t=Pa(e,t,r,n,l);break e}else if(r!==l){l=Hn(Error(u(424)),t),t=Pa(e,t,r,n,l);break e}else for(it=Gt(t.stateNode.containerInfo.firstChild),lt=t,Ee=!0,gt=null,n=$s(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(An(),r===l){t=At(e,t,n);break e}Ge(e,t,r,n)}t=t.child}return t;case 5:return Xs(t),e===null&&Yi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Ui(r,l)?o=null:i!==null&&Ui(r,i)&&(t.flags|=32),ja(e,t),Ge(e,t,o,n),t.child;case 6:return e===null&&Yi(t),null;case 13:return za(e,t,n);case 4:return no(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=In(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Ta(e,t,r,l,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,ve(dl,r._currentValue),r._currentValue=o,i!==null)if(mt(i.value,o)){if(i.children===l.children&&!Je.current){t=At(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var d=a.firstContext;d!==null;){if(d.context===r){if(i.tag===1){d=Ot(-1,n&-n),d.tag=2;var w=i.updateQueue;if(w!==null){w=w.shared;var R=w.pending;R===null?d.next=d:(d.next=R.next,R.next=d),w.pending=d}}i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),bi(i.return,n,t),a.lanes|=n;break}d=d.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(u(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),bi(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ge(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Un(t,n),l=at(l),r=r(l),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return r=t.type,l=vt(r,t.pendingProps),l=vt(r.type,l),Na(e,t,r,l,n);case 15:return Ra(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:vt(r,l),Cl(e,t),t.tag=1,be(r)?(e=!0,ol(t)):e=!1,Un(t,n),ya(t,r,l),go(t,r,l,n),xo(null,t,r,!0,e,n);case 19:return Oa(e,t,n);case 22:return _a(e,t,n)}throw Error(u(156,t.tag))};function ic(e,t){return Fu(e,t)}function jp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new jp(e,t,n,r)}function Bo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Lp(e){if(typeof e=="function")return Bo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ke)return 11;if(e===ze)return 14}return 2}function ln(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ol(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Bo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ge:return xn(n.children,l,i,t);case ne:o=8,l|=8;break;case Le:return e=dt(12,n,t,l|2),e.elementType=Le,e.lanes=i,e;case q:return e=dt(13,n,t,l),e.elementType=q,e.lanes=i,e;case Re:return e=dt(19,n,t,l),e.elementType=Re,e.lanes=i,e;case me:return Al(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case de:o=10;break e;case Se:o=9;break e;case ke:o=11;break e;case ze:o=14;break e;case Me:o=16,r=null;break e}throw Error(u(130,e==null?e:typeof e,""))}return t=dt(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function xn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Al(e,t,n,r){return e=dt(22,e,r,t),e.elementType=me,e.lanes=n,e.stateNode={isHidden:!1},e}function Ho(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Vo(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hi(0),this.expirationTimes=hi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Wo(e,t,n,r,l,i,o,a,d){return e=new Mp(e,t,n,a,d),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},to(i),e}function Pp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),Ql.exports=gc(),Ql.exports}var tu;function yc(){if(tu)return Pr;tu=1;var s=vc();return Pr.createRoot=s.createRoot,Pr.hydrateRoot=s.hydrateRoot,Pr}var nu=yc(),P=$l();class qe extends Error{constructor(c,u,h,g){super(c),this.status=u,this.code=h,this.retryAfter=g,this.name="ChatApiError"}}class Yl extends Error{constructor(){super("Request debounced"),this.name="DebounceError"}}const wc=3e4;function xc(s,c){const u=atob(s),h=new Uint8Array(u.length);for(let g=0;g0&&Date.now()-this.lastSendTime({})),x=g.headers.get("Retry-After"),E=x?Number(x):void 0;if(u=new qe(k.error??`Request failed with status ${g.status}`,g.status,k.code,E),!this.isRetryable(g.status))throw u;if(h{var x;return(x=k.attachments)==null?void 0:x.some(E=>!!E.data)}))return{headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:c})};const h=new FormData,g=c.map(k=>k.attachments?{...k,attachments:k.attachments.map(x=>{const E={...x};return delete E.data,E})}:k);h.append("payload",JSON.stringify({messages:g}));for(const k of c)for(const x of k.attachments??[])x.data&&h.append(x.id,xc(x.data,x.mediaType),x.name);return{body:h}}async streamMessage(c,u={}){var g;if(typeof ReadableStream>"u")return this.sendMessage(c);if(this.debounceMs>0&&Date.now()-this.lastSendTime({})),M=x.headers.get("Retry-After");if(h=new qe(T.error??`Request failed with status ${x.status}`,x.status,T.code,M?Number(M):void 0),!this.isRetryable(x.status))throw h;k{h.cancel().catch(()=>{})};(W=u.signal)==null||W.addEventListener("abort",M,{once:!0});try{for(;;){let se;try{se=await h.read()}catch(ue){if((H=u.signal)!=null&&H.aborted)break;throw ue}if((te=u.signal)!=null&&te.aborted||se.done)break;k+=g.decode(se.value,{stream:!0});let ae;for(;(ae=k.indexOf(` -`))!==-1;){const ne=w.slice(0,ye);w=w.slice(ye+2);const $=dc(ne);if($){if($.event==="chunk"){const ue=typeof $.data.text=="string"?$.data.text:"";ue&&(R+=ue,(oe=u.onChunk)==null||oe.call(u,ue,R))}else if($.event==="tool"){if(typeof $.data.name=="string"){const ue=$.data;L.push(ue),(ie=u.onToolUse)==null||ie.call(u,ue,L)}}else if($.event==="done"){const ue=Array.isArray($.data.toolUses)?$.data.toolUses:L;N={reply:typeof $.data.reply=="string"?$.data.reply:R,sources:$.data.sources,...ue.length>0?{toolUses:ue}:{}}}else if($.event==="error")throw new tt(typeof $.data.error=="string"?$.data.error:"Something went wrong. Please try again.",0,"STREAM_ERROR")}}}}finally{(U=u.signal)==null||U.removeEventListener("abort",P),v.releaseLock()}if((W=u.signal)!=null&&W.aborted)return{reply:R,aborted:!0,...L.length>0?{toolUses:L}:{}};if(N)return N;throw new tt("Connection interrupted. Please try again.",0,"STREAM_ERROR")}async fetchStream(d,u){const v=new AbortController,y=()=>v.abort();u==null||u.addEventListener("abort",y,{once:!0});let w=!1;const R=this.timeoutMs>0?setTimeout(()=>{w=!0,v.abort()},this.timeoutMs):void 0;try{return await fetch(`${this.baseUrl}/api/chat/stream`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:d}),signal:v.signal})}catch(L){throw w?new tt("Request timed out. Please try again.",0,"TIMEOUT"):L}finally{R!==void 0&&clearTimeout(R),u==null||u.removeEventListener("abort",y)}}async fetchWithTimeout(d){if(this.timeoutMs<=0)return fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:d})});const u=new AbortController,v=setTimeout(()=>u.abort(),this.timeoutMs);try{return await fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:d}),signal:u.signal})}catch(y){throw u.signal.aborted?new tt("Request timed out. Please try again.",0,"TIMEOUT"):y}finally{clearTimeout(v)}}isRetryable(d,u){return u==="TIMEOUT"||u==="NETWORK_ERROR"?!0:d===429||d===503}getRetryDelay(d,u){if(d&&d.status===429){const v=d.headers.get("Retry-After");if(v){const y=Number(v);return Math.min(y*1e3,6e4)}}return u===0?1e3:3e3}delay(d){return new Promise(u=>setTimeout(u,d))}}function dc(a){let d="message";const u=[];for(const v of a.split(` -`))v.startsWith("event:")?d=v.slice(6).trim():v.startsWith("data:")&&u.push(v.slice(5).trimStart());if(u.length===0)return null;try{const v=JSON.parse(u.join(` -`));return typeof v!="object"||v===null?null:{event:d,data:v}}catch{return null}}function qi(a){return typeof a=="string"?{content:a}:a}function Kl(a,d,u){console.error(`[claudius] plugin "${a.name}" failed in ${d}:`,u)}async function pc(a,d,u){let v=d;for(const y of a){if(!y.onBeforeSend)continue;let w=null;const R={...u,respondWith(L){w={type:"respond",message:v,reply:qi(L)}},abort(L){w={type:"abort",reason:L}}};try{const L=await y.onBeforeSend(v,R);if(w)return w;L&&(v=L)}catch(L){Kl(y,"onBeforeSend",L)}}return{type:"send",message:v}}async function hc(a,d,u){let v=d;for(const y of a)if(y.onAfterReceive)try{const w=await y.onAfterReceive(v,u);w&&(v=w)}catch(w){Kl(y,"onAfterReceive",w)}return v}async function mc(a,d,u){for(const v of a){if(!v.onError)continue;let y=null;const w={...u,respondWith(R){y=qi(R)}};try{if(await v.onError(d,w),y)return y}catch(R){Kl(v,"onError",R)}}return null}const vc=200,gc="claudius:messages";function yc(a,d){let u;try{u=new URL(d).host}catch{u=d}return`${a}:${u}`}function Gl(){try{return typeof sessionStorage<"u"?sessionStorage:null}catch{return null}}function wc(a){const d=Gl();if(!d)return[];try{const u=d.getItem(a);if(!u)return[];const v=JSON.parse(u);return Array.isArray(v)?v:[]}catch{return[]}}function xc({apiUrl:a,persistMessages:d=!0,storageKeyPrefix:u=gc,timeoutMs:v,translations:y,plugins:w,streaming:R=!0}){const L=O.useMemo(()=>new fc(a,{debounceMs:0,timeoutMs:v}),[a,v]),N=yc(u,a),P=d?wc(N):[],[B,V]=O.useState(P),[ee,oe]=O.useState(!1),[ie,U]=O.useState(!1),[W,fe]=O.useState(null),[ye,ne]=O.useState(null),[$,ue]=O.useState(!1),he=O.useRef(P.length),me=O.useRef(!1),q=O.useRef(P),He=O.useRef(null),Ce=O.useRef(w??[]);Ce.current=w??[];const _e=O.useCallback(E=>{if(!d)return;const p=Gl();if(p)try{const x=E.slice(-vc);p.setItem(N,JSON.stringify(x))}catch{}},[d,N]),b=()=>(he.current+=1,`msg-${he.current}`),ke=O.useCallback((E,p)=>{if(!y)return p??"Something went wrong. Please try again.";switch(E){case"TIMEOUT":return y.errorTimeout;case"NETWORK_ERROR":return y.errorConnection;case"RATE_LIMITED":return p!=null&&p.includes("minute")?y.errorRateLimitMinute:y.errorRateLimitHour;case"VALIDATION_ERROR":case"CONFIG_ERROR":case"SERVICE_ERROR":case"UNKNOWN_ERROR":default:return p??y.errorGeneric}},[y]),Be=O.useCallback(E=>!(E instanceof tt)||E.code==="TIMEOUT"||E.code==="NETWORK_ERROR"||E.code==="RATE_LIMITED"||E.code==="SERVICE_ERROR"||E.code==="UNKNOWN_ERROR"||E.status>=500||E.status===0,[]),Ae=O.useCallback(async E=>{oe(!0),me.current=!0,ne(null),ue(!1);const p=R&&typeof L.streamMessage=="function";let x=null;const X=D=>{if(x===null){x=b(),fe(x);const G=[...q.current,{id:x,role:"assistant",content:"",...D}];q.current=G,V(G)}else{const G=x,Z=q.current.map(te=>te.id===G?{...te,...D}:te);q.current=Z,V(Z)}},Y=()=>{if(x===null)return;const D=x,G=q.current.filter(Z=>Z.id!==D);q.current=G,V(G)};try{let D,G,Z,te=!1;if(p){const Ve=new AbortController;He.current=Ve,U(!0);const St=await L.streamMessage(E,{signal:Ve.signal,onChunk:(It,ze)=>X({content:ze}),onToolUse:(It,ze)=>X({toolUses:[...ze]})});D=St.reply,G=St.sources,Z=St.toolUses,te=St.aborted??!1}else{const Ve=await L.sendMessage(E);D=Ve.reply,G=Ve.sources,Z=Ve.toolUses}if(te&&!D){Y();return}let le={id:x??b(),role:"assistant",content:D,sources:G,toolUses:Z};Ce.current.length>0&&!te&&(le=await hc(Ce.current,le,{messages:E,apiUrl:a}));const Le=x!==null?q.current.map(Ve=>Ve.id===le.id?le:Ve):[...E,le];q.current=Le,V(Le),_e(Le)}catch(D){if(D instanceof Ql)return;if(x!==null){_e(q.current),D instanceof tt?ne(ke(D.code,D.message)):ne((y==null?void 0:y.errorConnection)??"Failed to connect. Please try again."),ue(!1);return}if(Ce.current.length>0){const G=D instanceof Error?D:new Error(String(D)),Z=await mc(Ce.current,G,{messages:E,apiUrl:a});if(Z){const te={id:b(),role:"assistant",content:Z.content,sources:Z.sources},le=[...E,te];q.current=le,V(le),_e(le),ne(null),ue(!1);return}}D instanceof tt?ne(ke(D.code,D.message)):ne((y==null?void 0:y.errorConnection)??"Failed to connect. Please try again."),ue(Be(D))}finally{oe(!1),me.current=!1,U(!1),fe(null),He.current=null}},[a,L,ke,Be,_e,R,y]),je=O.useCallback(()=>{var E;(E=He.current)==null||E.abort()},[]),de=O.useCallback(async E=>{const p=E.trim();if(!p||me.current)return;const x={id:b(),role:"user",content:p};let X=x;if(Ce.current.length>0){const D=await pc(Ce.current,x,{messages:q.current,apiUrl:a});if(D.type==="abort")return;if(D.type==="respond"){const G={id:b(),role:"assistant",content:D.reply.content,sources:D.reply.sources},Z=[...q.current,D.message,G];q.current=Z,V(Z),_e(Z),ne(null),ue(!1);return}X=D.message}const Y=[...q.current,X];q.current=Y,V(Y),_e(Y),await Ae(Y)},[a,_e,Ae]),M=O.useCallback(async()=>{if(me.current)return;const E=q.current[q.current.length-1];!E||E.role!=="user"||await Ae(q.current)},[Ae]),H=O.useCallback(()=>{if(q.current=[],V([]),ne(null),ue(!1),d){const E=Gl();if(!E)return;try{E.removeItem(N)}catch{}}},[d,N]);return{messages:B,isLoading:ee,isStreaming:ie,streamingMessageId:W,error:ye,canRetry:$,sendMessage:de,stop:je,retry:M,clearMessages:H}}function Sc(a){const[d,u]=O.useState(()=>typeof window>"u"?!1:window.matchMedia(a).matches);return O.useEffect(()=>{const v=window.matchMedia(a);u(v.matches);const y=w=>u(w.matches);return v.addEventListener("change",y),()=>v.removeEventListener("change",y)},[a]),d}function Mr(a,d){return a instanceof RegExp?a.test(d):d.toLowerCase().includes(a.toLowerCase())}function kc(){const a=document.documentElement,d=document.body,u=a.scrollTop||d.scrollTop||0,v=Math.max(a.scrollHeight,d.scrollHeight),y=a.clientHeight||window.innerHeight,w=v-y;return w<=0?100:u/w*100}function Ec({triggers:a,enabled:d,onOpen:u,onGreeting:v}){O.useEffect(()=>{if(!d||!a||a.length===0)return;const y=new Set,w=[],R=typeof window<"u"?window.location.href:"",L=(N,P)=>{y.has(N)||(y.add(N),P==="open"?u():v(P.greeting))};return a.forEach((N,P)=>{switch(N.on){case"url":{Mr(N.pattern,R)&&L(P,N.action);break}case"time":{if(N.matchUrl&&!Mr(N.matchUrl,R))return;const B=window.setTimeout(()=>L(P,N.action),Math.max(0,N.seconds*1e3));w.push(()=>window.clearTimeout(B));break}case"scroll":{if(N.matchUrl&&!Mr(N.matchUrl,R))return;const B=()=>{kc()>=N.percent&&L(P,N.action)};B(),window.addEventListener("scroll",B,{passive:!0}),w.push(()=>window.removeEventListener("scroll",B));break}case"exit-intent":{if(N.matchUrl&&!Mr(N.matchUrl,R))return;const B=V=>{V.clientY<=0&&L(P,N.action)};document.addEventListener("mouseleave",B),w.push(()=>document.removeEventListener("mouseleave",B));break}}}),()=>{w.forEach(N=>N())}},[a,d,u,v])}const Cc={"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","top-right":"top-6 right-6","top-left":"top-6 left-6"},_c=O.forwardRef(function({isOpen:d,onClick:u,position:v="bottom-right",translations:y},w){const R=d?(y==null?void 0:y.closeChat)??"Close chat":(y==null?void 0:y.openChat)??"Open chat";return S.jsx("button",{ref:w,onClick:u,"aria-label":R,className:`fixed ${Cc[v]} z-50 flex h-14 w-14 items-center justify-center rounded-claudius-full bg-claudius-accent text-claudius-accent-text shadow-claudius-floating transition-transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-claudius-accent focus:ring-offset-2`,children:d?S.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):S.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:S.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})})}),Rc=O.memo(function({count:d,isActive:u,onClick:v}){return S.jsxs("button",{onClick:v,"aria-label":"View sources",title:"View sources",className:`group relative flex h-7 w-7 items-center justify-center rounded-claudius-full transition-colors ${u?"bg-claudius-accent text-claudius-accent-text":"text-claudius-text-muted hover:bg-claudius-surface-muted hover:text-claudius-text"}`,children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),S.jsx("polyline",{points:"14 2 14 8 20 8"}),S.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),S.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),S.jsx("span",{className:"absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-claudius-full bg-claudius-accent px-1 text-[10px] font-bold text-claudius-accent-text",children:d})]})}),Nc=["http:","https:"];function bi(a){if(!a||typeof a!="string")return null;const d=a.trim();if(!d)return null;try{const u=new URL(d);return Nc.includes(u.protocol)?d:null}catch{return null}}function Tc(a){const d=a.lastIndexOf(` -`),u=d===-1?"":a.slice(0,d+1);let v=d===-1?a:a.slice(d+1);return v=Pc(v),v=jc(v),u+v}function Lc(a){const d=[];for(let u=0;uy(R=>!R),"aria-expanded":w?v:void 0,className:"flex items-center gap-1.5 rounded-claudius-full border border-claudius-border bg-claudius-surface px-2 py-0.5 hover:opacity-80 disabled:cursor-default disabled:hover:opacity-100",children:[S.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:S.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),S.jsxs("span",{children:[d," ",S.jsx("span",{className:"font-mono text-claudius-text",children:a.name}),a.isError&&S.jsx("span",{className:"text-claudius-error",children:" ✕"})]}),w&&S.jsxs(S.Fragment,{children:[S.jsx("span",{className:"sr-only",children:u}),S.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:v?"rotate-180":void 0,children:S.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),v&&w&&S.jsxs("div",{className:"mt-1 overflow-x-auto rounded-claudius-sm border border-claudius-border bg-claudius-field p-2 font-mono",children:[a.input!==void 0&&S.jsx("pre",{className:"whitespace-pre-wrap break-all",children:JSON.stringify(a.input,null,2)}),a.result!==void 0&&S.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all border-t border-claudius-border pt-1",children:a.result})]})]})}const eu=/(https?:\/\/[^\s)]+)/,tu=/(\*\*[^*]+\*\*)/,nu=/(\*[^*]+\*)/;function Oc(a,d){const u=a.match(/[.,;:!?'"]+$/),v=u?a.slice(0,-u[0].length):a,y=u?u[0]:"",w=bi(v);return w?S.jsxs(S.Fragment,{children:[S.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"underline font-medium hover:opacity-80 text-claudius-link",children:[w.replace(/^https?:\/\//,""),S.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]},d),y]}):a}function Dc(a,d){const u=a.split(tu),v=[];return u.forEach((y,w)=>{if(tu.test(y)){const R=y.slice(2,-2);v.push(S.jsx("strong",{children:R},`${d}-b${w}`))}else y.split(nu).forEach((L,N)=>{if(nu.test(L)){const P=L.slice(1,-1);v.push(S.jsx("em",{children:P},`${d}-b${w}-i${N}`))}else L.split(eu).forEach((B,V)=>{eu.test(B)?v.push(Oc(B,`${d}-b${w}-i${N}-u${V}`)):B&&v.push(B)})})}),v}function Ic(a){const d=a.split(` -`);return d.map((u,v)=>S.jsxs("span",{children:[Dc(u,`l${v}`),v0&&S.jsx("div",{className:"mt-1 space-y-1",children:w.map((oe,ie)=>S.jsx(zc,{toolUse:oe,usedLabel:R,detailsLabel:L},`${oe.name}-${ie}`))}),!B&&y&&y.length>0&&N&&S.jsx("div",{className:"mt-1",children:S.jsx(Rc,{count:y.length,isActive:P??!1,onClick:N})})]})}),Yl=2e3,Fc=1800;function Uc({onSend:a,isLoading:d,isStreaming:u=!1,onStop:v,placeholder:y,translations:w}){const[R,L]=O.useState(""),N=O.useRef(null),P=R.length,B=P>=Fc,V=P>=Yl,ee=y??(w==null?void 0:w.placeholder)??"Type your message...",oe=(w==null?void 0:w.sendMessage)??"Send message",ie=(w==null?void 0:w.stopGenerating)??"Stop generating",U=(w==null?void 0:w.typeYourMessage)??"Type your message",W=u&&!!v;O.useEffect(()=>{var ne;d||(ne=N.current)==null||ne.focus()},[d]);const fe=ne=>{ne.preventDefault();const $=R.trim();!$||V||(a($),L(""))},ye=ne=>{const $=ne.target.value;$.length<=Yl&&L($)};return S.jsxs("form",{onSubmit:fe,className:"border-t border-claudius-border bg-claudius-surface p-3",children:[S.jsxs("div",{className:"flex gap-2",children:[S.jsx("input",{ref:N,type:"text",value:R,onChange:ye,placeholder:ee,disabled:d,"aria-label":U,"aria-describedby":B?"char-count":void 0,className:"flex-1 rounded-claudius-sm border border-claudius-border bg-claudius-field px-3 py-2 text-sm font-body text-claudius-text placeholder:text-claudius-text-muted focus:border-claudius-accent focus:outline-none focus:ring-1 focus:ring-claudius-accent disabled:opacity-50"}),W?S.jsx("button",{type:"button",onClick:v,"aria-label":ie,className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-claudius-sm bg-claudius-accent text-claudius-accent-text transition-colors hover:opacity-90",children:S.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:S.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1.5"})})}):S.jsx("button",{type:"submit",disabled:d||V,"aria-label":oe,className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-claudius-sm bg-claudius-accent text-claudius-accent-text transition-colors hover:opacity-90 disabled:opacity-50",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),S.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),B&&S.jsxs("div",{id:"char-count",className:`mt-1 text-xs text-right ${V?"text-claudius-error":"text-claudius-text-muted"}`,"aria-live":"polite",children:[P,"/",Yl]})]})}const Hc=["blog","page","external"],Bc={blog:"Blog",page:"Page",external:"External"};function Vc(a){try{return new URL(a).hostname}catch{return a}}const Wc=O.memo(function({sources:d,onClose:u}){const v=Hc.map(w=>({type:w,label:Bc[w],items:d.filter(R=>R.type===w)})).filter(w=>w.items.length>0),y=d.length===1?"1 source found":`${d.length} sources found`;return S.jsxs("div",{className:"absolute inset-y-0 left-0 z-10 flex w-[280px] flex-col border-r-2 border-claudius-border bg-claudius-surface rounded-r-claudius-lg transition-transform duration-200 ease-out",children:[S.jsxs("div",{className:"flex items-center justify-between border-b border-claudius-border px-4 py-3",children:[S.jsxs("div",{children:[S.jsx("h3",{className:"text-sm font-heading font-semibold text-claudius-text",children:"Sources"}),S.jsx("p",{className:"text-xs text-claudius-text-muted",children:y})]}),S.jsx("button",{onClick:u,"aria-label":"Close sources",className:"flex h-7 w-7 items-center justify-center rounded-claudius-full text-claudius-text-muted transition-colors hover:bg-claudius-surface-muted hover:text-claudius-text",children:S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),S.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-4",children:v.map(w=>S.jsxs("div",{children:[S.jsx("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-claudius-text-muted",children:w.label}),S.jsx("div",{className:"space-y-2",children:w.items.map(R=>{const L=bi(R.url);return L?S.jsxs("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"block rounded-claudius-md border-2 border-claudius-border bg-claudius-surface-muted p-3 transition-colors hover:bg-claudius-border",children:[S.jsx("p",{className:"truncate text-sm font-medium text-claudius-text",children:R.title}),S.jsx("p",{className:"mt-0.5 text-xs text-claudius-text-muted",children:Vc(L)})]},L):null})})]},w.type))})]})});function $c({title:a,subtitle:d,titleId:u,closeLabel:v,onClose:y}){return S.jsxs("div",{className:"flex items-center gap-3 bg-claudius-accent px-5 py-4",children:[S.jsx("div",{"aria-hidden":"true",className:"flex h-8 w-8 items-center justify-center rounded-claudius-full bg-claudius-accent-soft text-sm font-bold text-claudius-accent-text",children:a.charAt(0).toUpperCase()}),S.jsxs("div",{className:"flex-1",children:[S.jsx("h2",{id:u,className:"text-sm font-heading font-semibold text-claudius-accent-text",children:a}),S.jsx("p",{className:"text-xs text-claudius-accent-text",children:d})]}),S.jsx("button",{onClick:y,"aria-label":v,className:"flex h-10 w-10 items-center justify-center rounded-claudius-full text-claudius-accent-text-muted transition-colors hover:bg-claudius-accent-soft hover:text-claudius-accent-text",children:S.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[S.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})}function Qc({message:a,retryLabel:d,onRetry:u}){return S.jsxs("div",{role:"alert",className:"mx-auto flex max-w-[90%] flex-col items-center gap-2 rounded-claudius-sm bg-claudius-error-surface px-3 py-2 text-center text-xs text-claudius-error",children:[S.jsx("span",{children:a}),u&&S.jsx("button",{type:"button",onClick:u,className:"rounded-claudius-md bg-claudius-error px-3 py-1 text-xs font-semibold text-claudius-error-text transition-opacity hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-claudius-error focus-visible:ring-offset-1",children:d})]})}function Kc({label:a}){return S.jsx("div",{role:"status","aria-live":"polite","aria-label":a,className:"mr-auto flex max-w-[85%]",children:S.jsxs("div",{className:"flex gap-1 rounded-claudius-bubble rounded-bl-claudius-tail bg-claudius-assistant-bubble px-4 py-3",children:[S.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:0ms]"}),S.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:150ms]"}),S.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:300ms]"})]})})}function Gc(a,d,u){const[v,y]=O.useState(0),w=O.useRef(0),R=O.useRef(0),L=O.useRef(0),N=O.useRef(!1);return O.useEffect(()=>{const P=a.current;if(!u||!P)return;const B=oe=>{if(P.scrollTop>0){N.current=!1;return}N.current=!0,R.current=oe.touches[0].clientY,L.current=Date.now()},V=oe=>{if(!N.current)return;let ie=oe.touches[0].clientY-R.current;ie<0&&(ie=ie*.3),w.current=ie,y(ie)},ee=()=>{if(!N.current)return;N.current=!1;const oe=w.current,ie=(Date.now()-L.current)/1e3,U=P.getBoundingClientRect().height,W=ie>.05&&oe>0&&oe/ie>500,fe=oe>U*.3;W||fe?d():(w.current=0,y(0))};return P.addEventListener("touchstart",B,{passive:!0}),P.addEventListener("touchmove",V,{passive:!0}),P.addEventListener("touchend",ee),()=>{P.removeEventListener("touchstart",B),P.removeEventListener("touchmove",V),P.removeEventListener("touchend",ee)}},[a,d,u]),{offsetY:v}}const Yc='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function Xc(a,d){O.useEffect(()=>{const u=a.current;if(!u)return;const v=y=>{if(y.key!=="Tab")return;const w=Array.from(u.querySelectorAll(Yc)).filter(P=>!P.hasAttribute("aria-hidden"));if(w.length===0)return;const R=w[0],L=w[w.length-1],N=document.activeElement;y.shiftKey&&N===R?(y.preventDefault(),L.focus()):!y.shiftKey&&N===L&&(y.preventDefault(),R.focus())};return u.addEventListener("keydown",v),()=>u.removeEventListener("keydown",v)},[a,d])}const Zc=/\*\*([^*]+)\*\*/g,Jc=/\*([^*]+)\*/g,qc=/https?:\/\/[^\s)]+/g;function bc(a){return a.replace(Zc,"$1").replace(Jc,"$1").replace(qc,d=>{try{return new URL(d).hostname}catch{return d}})}const ef={"bottom-right":"bottom-24 right-3 sm:right-6","bottom-left":"bottom-24 left-3 sm:left-6","top-right":"top-24 right-3 sm:right-6","top-left":"top-24 left-3 sm:left-6"};function tf({messages:a,isLoading:d,isStreaming:u=!1,streamingMessageId:v=null,error:y,canRetry:w=!1,onSend:R,onStop:L,onRetry:N,onClose:P,title:B="Chat",subtitle:V="Ask me anything",welcomeMessage:ee="Hi! How can I help you today?",placeholder:oe,position:ie="bottom-right",translations:U,isMobile:W=!1}){const fe=O.useId(),ye=O.useRef(null),ne=O.useRef(null),[$,ue]=O.useState(null);Xc(ye,!0);const{offsetY:he}=Gc(ne,P,W),me=he!==0,q=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1;O.useEffect(()=>{const b=ne.current;b&&(b.scrollTop=b.scrollHeight)},[a,d]),O.useEffect(()=>{const b=ke=>{ke.key==="Escape"&&!ke.isComposing&&P()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[P]);const He=(U==null?void 0:U.closeChat)??"Close chat",Ce=(U==null?void 0:U.chatMessages)??"Chat messages",_e=[...a].reverse().find(b=>b.role==="assistant");return S.jsxs("div",{ref:ye,role:"dialog","aria-modal":W?"true":void 0,"aria-labelledby":fe,className:W?"claudius-bottom-sheet fixed inset-x-0 bottom-0 z-50 flex h-[90vh] w-full flex-col overflow-hidden rounded-t-claudius-lg bg-claudius-surface shadow-claudius-elevated font-body":`fixed ${ef[ie]} z-50 flex h-[min(500px,calc(100vh-7rem))] w-[calc(100vw-1.5rem)] max-w-[380px] sm:max-w-[400px] md:max-w-[440px] flex-col overflow-hidden rounded-claudius-lg bg-claudius-surface shadow-claudius-elevated font-body`,style:W&&!q?{transform:`translateY(${Math.max(0,he)}px)`}:void 0,"data-dragging":me||void 0,children:[W&&S.jsx("div",{className:"flex justify-center py-2","aria-hidden":"true",children:S.jsx("div",{className:"h-1 w-8 rounded-claudius-full bg-claudius-border"})}),S.jsx($c,{title:B,subtitle:V,titleId:fe,closeLabel:He,onClose:P}),S.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[$&&S.jsx(Wc,{sources:$.sources,onClose:()=>ue(null)}),S.jsxs("div",{ref:ne,role:"log","aria-label":Ce,className:"h-full space-y-3 overflow-y-auto px-4 py-4",children:[a.length===0&&!y&&S.jsx("div",{className:"mr-auto flex max-w-[85%]",children:S.jsx("div",{className:"rounded-claudius-bubble rounded-bl-claudius-tail bg-claudius-assistant-bubble px-4 py-2.5 text-sm leading-relaxed text-claudius-assistant-bubble-text",children:ee})}),a.map(b=>S.jsx(Ac,{role:b.role,content:b.content,isStreaming:b.id===v,sources:b.sources,toolUses:b.toolUses,toolUsedLabel:U==null?void 0:U.toolUsed,toolDetailsLabel:U==null?void 0:U.toolDetails,isSourceActive:($==null?void 0:$.messageId)===b.id,onSourceClick:()=>{($==null?void 0:$.messageId)===b.id?ue(null):b.sources&&b.sources.length>0&&ue({messageId:b.id,sources:b.sources})}},b.id)),d&&!(v!==null&&a.some(b=>b.id===v&&b.content.length>0))&&S.jsx(Kc,{label:(U==null?void 0:U.typingIndicator)??"Assistant is typing"}),y&&S.jsx(Qc,{message:y,retryLabel:(U==null?void 0:U.errorRetry)??"Retry",onRetry:w&&N&&!d?N:void 0})]})]}),S.jsx("div",{"data-claudius-live":"assistant","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:_e&&_e.id!==v?bc(_e.content):""}),S.jsx(Uc,{onSend:R,isLoading:d,isStreaming:u,onStop:L,placeholder:oe,translations:U})]})}function nf({message:a,position:d,onOpen:u,onDismiss:v,dismissLabel:y}){const w=d.startsWith("bottom"),R=d.endsWith("right"),L=["claudius-greeting-bubble","fixed z-40 max-w-xs",w?"bottom-20":"top-20",R?"right-4":"left-4"].join(" ");return S.jsxs("div",{className:L,role:"status","aria-live":"polite",children:[S.jsx("button",{type:"button",onClick:u,className:"block w-full rounded-claudius-lg bg-claudius-surface p-4 pr-8 text-left text-sm font-body text-claudius-text shadow-claudius-floating ring-1 ring-claudius-border transition hover:shadow-claudius-floating-hover focus:outline-none focus:ring-2 focus:ring-claudius-accent",children:a}),S.jsx("button",{type:"button",onClick:N=>{N.stopPropagation(),v()},"aria-label":y,className:"absolute right-1 top-1 flex h-6 w-6 items-center justify-center rounded-claudius-full text-claudius-text-muted hover:bg-claudius-surface-muted focus:outline-none focus:ring-2 focus:ring-claudius-accent",children:S.jsx("span",{"aria-hidden":"true",children:"×"})})]})}const ru={en:{title:"Chat",subtitle:"Ask me anything",welcomeMessage:"Hi! How can I help you today?",closeChat:"Close chat",chatMessages:"Chat messages",typingIndicator:"Assistant is typing",placeholder:"Type your message...",sendMessage:"Send message",stopGenerating:"Stop generating",toolUsed:"Used tool:",toolDetails:"Tool details",typeYourMessage:"Type your message",openChat:"Open chat",dismissGreeting:"Dismiss greeting",errorGeneric:"Something went wrong. Please try again.",errorConnection:"Failed to connect. Please try again.",errorTimeout:"Request timed out. Please try again.",errorRateLimitMinute:"Too many requests. Please wait a minute.",errorRateLimitHour:"Hourly limit reached. Please try again later.",errorRetry:"Retry"},es:{title:"Chat",subtitle:"Pregúntame lo que quieras",welcomeMessage:"¡Hola! ¿En qué puedo ayudarte hoy?",closeChat:"Cerrar chat",chatMessages:"Mensajes del chat",typingIndicator:"El asistente está escribiendo",placeholder:"Escribe tu mensaje...",sendMessage:"Enviar mensaje",stopGenerating:"Detener la respuesta",toolUsed:"Herramienta usada:",toolDetails:"Detalles de la herramienta",typeYourMessage:"Escribe tu mensaje",openChat:"Abrir chat",dismissGreeting:"Descartar saludo",errorGeneric:"Algo salió mal. Inténtalo de nuevo.",errorConnection:"No se pudo conectar. Inténtalo de nuevo.",errorTimeout:"La solicitud tardó demasiado. Inténtalo de nuevo.",errorRateLimitMinute:"Demasiadas solicitudes. Espera un minuto.",errorRateLimitHour:"Has alcanzado el límite por hora. Inténtalo más tarde.",errorRetry:"Reintentar"},fr:{title:"Chat",subtitle:"Posez-moi vos questions",welcomeMessage:"Bonjour ! Comment puis-je vous aider aujourd'hui ?",closeChat:"Fermer le chat",chatMessages:"Messages du chat",typingIndicator:"L'assistant écrit",placeholder:"Saisissez votre message...",sendMessage:"Envoyer le message",stopGenerating:"Arrêter la génération",toolUsed:"Outil utilisé :",toolDetails:"Détails de l'outil",typeYourMessage:"Saisissez votre message",openChat:"Ouvrir le chat",dismissGreeting:"Ignorer le message d'accueil",errorGeneric:"Une erreur s'est produite. Veuillez réessayer.",errorConnection:"Échec de la connexion. Veuillez réessayer.",errorTimeout:"La requête a expiré. Veuillez réessayer.",errorRateLimitMinute:"Trop de requêtes. Veuillez patienter une minute.",errorRateLimitHour:"Limite horaire atteinte. Veuillez réessayer plus tard.",errorRetry:"Réessayer"},de:{title:"Chat",subtitle:"Fragen Sie mich alles",welcomeMessage:"Hallo! Wie kann ich Ihnen heute helfen?",closeChat:"Chat schließen",chatMessages:"Chat-Nachrichten",typingIndicator:"Der Assistent schreibt",placeholder:"Geben Sie Ihre Nachricht ein...",sendMessage:"Nachricht senden",stopGenerating:"Generierung stoppen",toolUsed:"Verwendetes Tool:",toolDetails:"Tool-Details",typeYourMessage:"Geben Sie Ihre Nachricht ein",openChat:"Chat öffnen",dismissGreeting:"Begrüßung schließen",errorGeneric:"Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",errorConnection:"Verbindung fehlgeschlagen. Bitte versuchen Sie es erneut.",errorTimeout:"Zeitüberschreitung der Anfrage. Bitte versuchen Sie es erneut.",errorRateLimitMinute:"Zu viele Anfragen. Bitte warten Sie eine Minute.",errorRateLimitHour:"Stündliches Limit erreicht. Bitte versuchen Sie es später erneut.",errorRetry:"Erneut versuchen"}};function lu(a){if(!a)return;const d=a.toLowerCase().split("-")[0];return Object.prototype.hasOwnProperty.call(ru,d)?d:void 0}function rf(){const a=typeof document<"u"?lu(document.documentElement.lang):void 0;if(a)return a;const d=typeof navigator<"u"?lu(navigator.language):void 0;return d||"en"}function lf(a={}){const{locale:d,translations:u}=a,v=ru[d??rf()];return u?{...v,...u}:{...v}}const ou=["accent","accentText","accentSoft","accentTextMuted","surface","surfaceMuted","text","textMuted","border","userBubble","userBubbleText","assistantBubble","assistantBubbleText","field","error","errorSurface","errorText","link","scrim"],of=["sm","md","lg","full","tail"],uf=["elevated","floating","floatingHover"],sf=["heading","body"],iu={default:{name:"default"},minimal:{name:"minimal",colors:{accent:"#171717",accentText:"#ffffff",surface:"#ffffff",surfaceMuted:"#f5f5f5",text:"#171717",textMuted:"#737373",border:"#e5e5e5",link:"#171717"},colorsDark:{accent:"#fafafa",accentText:"#171717",surface:"#0a0a0a",surfaceMuted:"#1c1c1c",text:"#fafafa",textMuted:"#a3a3a3",border:"#2e2e2e",field:"#1c1c1c",link:"#fafafa"},radii:{sm:"4px",md:"6px",lg:"10px"},shadows:{elevated:"0 4px 16px rgb(0 0 0 / 0.12)",floating:"0 2px 8px rgb(0 0 0 / 0.12)",floatingHover:"0 4px 12px rgb(0 0 0 / 0.16)"}},playful:{name:"playful",colors:{accent:"#8b5cf6",surfaceMuted:"#f5f3ff",assistantBubbleText:"#4c1d95",link:"#7c3aed"},colorsDark:{accent:"#a78bfa",surfaceMuted:"#2e1065",assistantBubbleText:"#ede9fe",link:"#c4b5fd"},radii:{sm:"12px",md:"16px",lg:"24px",tail:"8px"},shadows:{elevated:"0 24px 48px -12px rgb(139 92 246 / 0.35)",floating:"0 10px 20px -5px rgb(139 92 246 / 0.4)",floatingHover:"0 16px 28px -6px rgb(139 92 246 / 0.5)"},fonts:{heading:"ui-rounded, 'Hiragino Maru Gothic ProN', system-ui",body:"ui-rounded, 'Hiragino Maru Gothic ProN', system-ui"}},corporate:{name:"corporate",colors:{accent:"#1e3a5f",surfaceMuted:"#f3f4f6",text:"#1f2937",textMuted:"#6b7280",border:"#d1d5db",link:"#1d4ed8"},colorsDark:{accent:"#2c5282",link:"#93c5fd"},radii:{sm:"4px",md:"6px",lg:"8px",tail:"2px"},shadows:{elevated:"0 8px 24px rgb(15 23 42 / 0.16)",floating:"0 4px 12px rgb(15 23 42 / 0.18)",floatingHover:"0 6px 16px rgb(15 23 42 / 0.24)"},fonts:{heading:"'Segoe UI', 'Helvetica Neue', Arial, system-ui",body:"'Segoe UI', 'Helvetica Neue', Arial, system-ui"}}};function af(a){return Object.prototype.hasOwnProperty.call(iu,a)}const cf=new Set(["light","dark","auto"]);function ff(a){if(a===void 0)return{mode:"light"};if(typeof a=="string"){if(cf.has(a))return{mode:a};if(af(a)){const d=iu[a];return{mode:d.colorScheme??"light",theme:d}}return{mode:"light",url:a}}return{mode:a.colorScheme??"light",theme:a}}function df(a){return a.replace(/[A-Z]/g,d=>`-${d.toLowerCase()}`)}function pf(a,d){console.warn(`[Claudius] Ignoring unknown theme token "${d}" in "${a}"`)}function Vn(a,d,u,v,y,w=""){if(y)for(const[R,L]of Object.entries(y)){if(!v.includes(R)){pf(d,R);continue}typeof L=="string"&&(a[`${u}${df(R)}${w}`]=L)}}function hf(a){const d={};Vn(d,"colors","--cl-color-",ou,a.colors);for(const[u,v]of Object.entries({...d}))d[`${u}-dark`]=v;return Vn(d,"colorsDark","--cl-color-",ou,a.colorsDark,"-dark"),Vn(d,"radii","--cl-radius-",of,a.radii),Vn(d,"shadows","--cl-shadow-",uf,a.shadows),Vn(d,"fonts","--cl-font-",sf,a.fonts),d}function mf(a){return typeof a=="object"&&a!==null&&!Array.isArray(a)}function vf(a){const d=O.useMemo(()=>ff(a),[a]),[u,v]=O.useState(null),y=d.url;O.useEffect(()=>{if(v(null),!y)return;const N=new AbortController;return fetch(y,{signal:N.signal}).then(P=>{if(!P.ok)throw new Error(`HTTP ${P.status}`);return P.json()}).then(P=>{if(!mf(P))throw new Error("theme JSON must be an object");v(P)}).catch(P=>{N.signal.aborted||console.error(`[Claudius] Failed to load theme from ${y}:`,P)}),()=>N.abort()},[y]);const w=d.theme??u??null,R=(u==null?void 0:u.colorScheme)??d.mode,L=O.useMemo(()=>w?hf(w):{},[w]);return{mode:R,cssVars:L}}const uu="claudius:triggers:dismissed";function gf(){if(typeof window>"u")return!1;try{return window.sessionStorage.getItem(uu)==="1"}catch{return!1}}function yf(){if(!(typeof window>"u"))try{window.sessionStorage.setItem(uu,"1")}catch{}}function su({apiUrl:a,title:d,subtitle:u,welcomeMessage:v,placeholder:y,persistMessages:w,storageKeyPrefix:R,requestTimeoutMs:L,theme:N="light",accentColor:P,position:B="bottom-right",locale:V,translations:ee,triggers:oe,plugins:ie,streaming:U=!0}){const[W,fe]=O.useState(!1),[ye,ne]=O.useState(null),[$,ue]=O.useState(gf),he=O.useRef(!1),me=Sc("(max-width: 639px)"),q=O.useMemo(()=>lf({locale:V,translations:ee}),[V,ee]),{messages:He,isLoading:Ce,isStreaming:_e,streamingMessageId:b,error:ke,canRetry:Be,sendMessage:Ae,stop:je,retry:de}=xc({apiUrl:a,persistMessages:w,storageKeyPrefix:R,timeoutMs:L,translations:q,plugins:ie,streaming:U}),M=O.useRef(null),H=O.useRef(W),{mode:E,cssVars:p}=vf(N),[x,X]=O.useState(!1);O.useEffect(()=>{if(E!=="auto")return;const ze=window.matchMedia("(prefers-color-scheme: dark)");X(ze.matches);const Wn=Pr=>X(Pr.matches);return ze.addEventListener("change",Wn),()=>ze.removeEventListener("change",Wn)},[E]),O.useEffect(()=>{var ze;H.current&&!W&&((ze=M.current)==null||ze.focus()),H.current=W},[W]);const Y=O.useCallback(()=>{ue(!0),yf()},[]),D=O.useCallback(()=>{fe(!1),he.current&&(he.current=!1,Y())},[Y]),G=O.useCallback(()=>{fe(ze=>!ze)},[]),Z=O.useCallback(()=>{he.current=!0,ne(null),fe(!0)},[]),te=O.useCallback(ze=>{ne(ze)},[]),le=O.useCallback(()=>{ne(null),Z()},[Z]),Le=O.useCallback(()=>{ne(null),Y()},[Y]);Ec({triggers:oe,enabled:!$&&!W,onOpen:Z,onGreeting:te});const Ve=E==="dark"||E==="auto"&&x,St={...p,...P?{"--cl-color-accent":P,"--cl-color-accent-dark":P}:{}},It=Object.keys(St).length>0?St:void 0;return S.jsx("div",{className:"claudius-root",style:It,children:S.jsxs("div",{"data-claudius-dark":Ve?"true":"false",children:[W&&me&&S.jsx("div",{className:"claudius-scrim fixed inset-0 z-40 bg-claudius-scrim",onClick:D,"aria-hidden":"true"}),W&&S.jsx(tf,{messages:He,isLoading:Ce,isStreaming:_e,streamingMessageId:b,error:ke,canRetry:Be,onSend:Ae,onStop:je,onRetry:de,onClose:D,title:d??q.title,subtitle:u??q.subtitle,welcomeMessage:v??q.welcomeMessage,placeholder:y??q.placeholder,position:B,translations:q,isMobile:me}),!(W&&me)&&S.jsx(_c,{ref:M,isOpen:W,onClick:G,position:B,translations:q}),!W&&ye&&S.jsx(nf,{message:ye,position:B,onOpen:le,onDismiss:Le,dismissLabel:q.dismissGreeting})]})})}const wf="1.14.0";typeof window<"u"&&(window.ClaudiusWidgetVersion=wf);function au(){const a=window.ClaudiusConfig;if(!(a!=null&&a.apiUrl)){console.error("[Claudius] Missing ClaudiusConfig.apiUrl");return}const d=document.createElement("div");d.id="claudius-chat-widget",document.body.appendChild(d),Ji.createRoot(d).render(S.jsx(su,{apiUrl:a.apiUrl,title:a.title,subtitle:a.subtitle,welcomeMessage:a.welcomeMessage,placeholder:a.placeholder,persistMessages:a.persistMessages,storageKeyPrefix:a.storageKeyPrefix,requestTimeoutMs:a.requestTimeoutMs,theme:a.theme,accentColor:a.accentColor,position:a.position,locale:a.locale,translations:a.translations,triggers:a.triggers}))}class cu extends HTMLElement{constructor(){super(...arguments);nn(this,"root",null);nn(this,"container",null)}static get observedAttributes(){return["api-url","title","subtitle","welcome-message","placeholder","persist-messages","storage-key-prefix","request-timeout-ms","theme","accent-color","position"]}connectedCallback(){this.container=document.createElement("div"),this.appendChild(this.container),this.root=Ji.createRoot(this.container),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null),this.container&&(this.container.remove(),this.container=null)}attributeChangedCallback(){this.render()}render(){if(!this.root)return;const u=this.getAttribute("api-url");if(!u){console.error("[Claudius] Missing api-url attribute on ");return}const v=this.getAttribute("persist-messages"),y=v===null?void 0:v!=="false",w=this.getAttribute("request-timeout-ms"),R=w===null?void 0:Number(w);this.root.render(S.jsx(su,{apiUrl:u,title:this.getAttribute("title")??void 0,subtitle:this.getAttribute("subtitle")??void 0,welcomeMessage:this.getAttribute("welcome-message")??void 0,placeholder:this.getAttribute("placeholder")??void 0,persistMessages:y,storageKeyPrefix:this.getAttribute("storage-key-prefix")??void 0,requestTimeoutMs:R!==void 0&&Number.isFinite(R)?R:void 0,theme:this.getAttribute("theme")??void 0,accentColor:this.getAttribute("accent-color")??void 0,position:this.getAttribute("position")??void 0}))}}return typeof customElements<"u"&&!customElements.get("claudius-chat")&&customElements.define("claudius-chat",cu),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",au):au(),Nt.ClaudiusChat=cu,Object.defineProperty(Nt,Symbol.toStringTag,{value:"Module"}),Nt})({}); +`))!==-1;){const ue=k.slice(0,ae);k=k.slice(ae+2);const X=kc(ue);if(X){if(X.event==="chunk"){const b=typeof X.data.text=="string"?X.data.text:"";b&&(x+=b,(ie=u.onChunk)==null||ie.call(u,b,x))}else if(X.event==="tool"){if(typeof X.data.name=="string"){const b=X.data;E.push(b),(oe=u.onToolUse)==null||oe.call(u,b,E)}}else if(X.event==="done"){const b=Array.isArray(X.data.toolUses)?X.data.toolUses:E;T={reply:typeof X.data.reply=="string"?X.data.reply:x,sources:X.data.sources,...b.length>0?{toolUses:b}:{},...Array.isArray(X.data.attachments)?{attachments:X.data.attachments}:{}}}else if(X.event==="error")throw new qe(typeof X.data.error=="string"?X.data.error:"Something went wrong. Please try again.",0,"STREAM_ERROR")}}}}finally{(O=u.signal)==null||O.removeEventListener("abort",M),h.releaseLock()}if((Y=u.signal)!=null&&Y.aborted)return{reply:x,aborted:!0,...E.length>0?{toolUses:E}:{}};if(T)return T;throw new qe("Connection interrupted. Please try again.",0,"STREAM_ERROR")}async fetchStream(c,u){const h=new AbortController,g=()=>h.abort();u==null||u.addEventListener("abort",g,{once:!0});let k=!1;const x=this.timeoutMs>0?setTimeout(()=>{k=!0,h.abort()},this.timeoutMs):void 0,{headers:E,body:T}=this.buildRequest(c);try{return await fetch(`${this.baseUrl}/api/chat/stream`,{method:"POST",headers:E,body:T,signal:h.signal})}catch(M){throw k?new qe("Request timed out. Please try again.",0,"TIMEOUT"):M}finally{x!==void 0&&clearTimeout(x),u==null||u.removeEventListener("abort",g)}}async fetchWithTimeout(c){const{headers:u,body:h}=this.buildRequest(c);if(this.timeoutMs<=0)return fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:u,body:h});const g=new AbortController,k=setTimeout(()=>g.abort(),this.timeoutMs);try{return await fetch(`${this.baseUrl}/api/chat`,{method:"POST",headers:u,body:h,signal:g.signal})}catch(x){throw g.signal.aborted?new qe("Request timed out. Please try again.",0,"TIMEOUT"):x}finally{clearTimeout(k)}}isRetryable(c,u){return u==="TIMEOUT"||u==="NETWORK_ERROR"?!0:c===429||c===503}getRetryDelay(c,u){if(c&&c.status===429){const h=c.headers.get("Retry-After");if(h){const g=Number(h);return Math.min(g*1e3,6e4)}}return u===0?1e3:3e3}delay(c){return new Promise(u=>setTimeout(u,c))}}function kc(s){let c="message";const u=[];for(const h of s.split(` +`))h.startsWith("event:")?c=h.slice(6).trim():h.startsWith("data:")&&u.push(h.slice(5).trimStart());if(u.length===0)return null;try{const h=JSON.parse(u.join(` +`));return typeof h!="object"||h===null?null:{event:c,data:h}}catch{return null}}function ru(s){return typeof s=="string"?{content:s}:s}function Xl(s,c,u){console.error(`[claudius] plugin "${s.name}" failed in ${c}:`,u)}async function Ec(s,c,u){let h=c;for(const g of s){if(!g.onBeforeSend)continue;let k=null;const x={...u,respondWith(E){k={type:"respond",message:h,reply:ru(E)}},abort(E){k={type:"abort",reason:E}}};try{const E=await g.onBeforeSend(h,x);if(k)return k;E&&(h=E)}catch(E){Xl(g,"onBeforeSend",E)}}return{type:"send",message:h}}async function Cc(s,c,u){let h=c;for(const g of s)if(g.onAfterReceive)try{const k=await g.onAfterReceive(h,u);k&&(h=k)}catch(k){Xl(g,"onAfterReceive",k)}return h}async function Tc(s,c,u){for(const h of s){if(!h.onError)continue;let g=null;const k={...u,respondWith(x){g=ru(x)}};try{if(await h.onError(c,k),g)return g}catch(x){Xl(h,"onError",x)}}return null}const zr={maxSizeBytes:5*1024*1024,maxCount:5,allowedTypes:["image/jpeg","image/png","image/gif","image/webp","application/pdf"]};function Nc(s){return s?s===!0?zr:{maxSizeBytes:s.maxSizeBytes??zr.maxSizeBytes,maxCount:s.maxCount??zr.maxCount,allowedTypes:(s.allowedTypes??zr.allowedTypes).map(c=>c.trim().toLowerCase()).filter(Boolean)}:null}function ql(s){if(!Number.isFinite(s)||s<0)return"0 B";if(s<1024)return`${s} B`;const c=s/1024;if(c<1024)return`${Math.round(c)} KB`;const u=c/1024;return`${Number.isInteger(u)?u:u.toFixed(1)} MB`}const Rc={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",pdf:"application/pdf"};function lu(s){var h;const c=(s.type||"").trim().toLowerCase();if(c)return c;const u=((h=s.name.split(".").pop())==null?void 0:h.toLowerCase())??"";return Rc[u]??""}function _c(s){return s.startsWith("image/")}function jc(s){if(_c(s.mediaType)){if(s.url)try{const c=new URL(s.url);if(c.protocol==="http:"||c.protocol==="https:")return s.url}catch{}if(s.data)return`data:${s.mediaType};base64,${s.data}`}}function Lc(s,c,u){const h=[],g=[];let k=Math.max(0,u.maxCount-c);for(const x of s){const E=lu(x);!E||!u.allowedTypes.includes(E)?g.push({file:x,reason:"type"}):x.size>u.maxSizeBytes||x.size===0?g.push({file:x,reason:"size"}):k<=0?g.push({file:x,reason:"count"}):(h.push(x),k-=1)}return{accepted:h,rejected:g}}function Mc(s){return new Promise((c,u)=>{const h=new FileReader;h.onerror=()=>u(h.error??new Error("Failed to read file")),h.onload=()=>{const g=String(h.result??""),k=g.indexOf(",");c(k>=0?g.slice(k+1):g)},h.readAsDataURL(s)})}let iu=0;function Pc(){return iu+=1,`att-${Date.now().toString(36)}-${iu}`}async function zc(s){const c=await Mc(s);return{id:Pc(),name:s.name||"attachment",mediaType:lu(s),size:s.size,data:c}}function Dc(s){return s.map(c=>{var u;return(u=c.attachments)!=null&&u.some(h=>h.data)?{...c,attachments:c.attachments.map(h=>{if(!h.data)return h;const g={...h};return delete g.data,g})}:c})}function Oc(s,c){if(!c||c.length===0)return s;const u=new Map(c.map(h=>[h.id,h]));return s.map(h=>{var g;return(g=h.attachments)!=null&&g.some(k=>u.has(k.id))?{...h,attachments:h.attachments.map(k=>{const x=u.get(k.id);if(!x)return k;const E={...k,key:x.key,url:x.url,expiresAt:x.expiresAt};return delete E.data,E})}:h})}const Ac=200,Ic="claudius:messages";function Fc(s,c){let u;try{u=new URL(c).host}catch{u=c}return`${s}:${u}`}function Zl(){try{return typeof sessionStorage<"u"?sessionStorage:null}catch{return null}}function Uc(s){const c=Zl();if(!c)return[];try{const u=c.getItem(s);if(!u)return[];const h=JSON.parse(u);return Array.isArray(h)?h:[]}catch{return[]}}function Bc({apiUrl:s,persistMessages:c=!0,storageKeyPrefix:u=Ic,timeoutMs:h,translations:g,plugins:k,streaming:x=!0}){const E=P.useMemo(()=>new Sc(s,{debounceMs:0,timeoutMs:h}),[s,h]),T=Fc(u,s),M=c?Uc(T):[],[W,H]=P.useState(M),[te,ie]=P.useState(!1),[oe,O]=P.useState(!1),[Y,se]=P.useState(null),[ae,ue]=P.useState(null),[X,b]=P.useState(!1),he=P.useRef(M.length),ge=P.useRef(!1),ne=P.useRef(M),Le=P.useRef(null),de=P.useRef(k??[]);de.current=k??[];const Se=P.useCallback(C=>{if(!c)return;const f=Zl();if(f)try{const S=Dc(C.slice(-Ac));f.setItem(T,JSON.stringify(S))}catch{}},[c,T]),ke=()=>(he.current+=1,`msg-${he.current}`),q=P.useCallback((C,f)=>{if(!g)return f??"Something went wrong. Please try again.";switch(C){case"TIMEOUT":return g.errorTimeout;case"NETWORK_ERROR":return g.errorConnection;case"RATE_LIMITED":return f!=null&&f.includes("minute")?g.errorRateLimitMinute:g.errorRateLimitHour;case"ATTACHMENT_QUOTA_EXCEEDED":return g.errorAttachmentQuota;case"ATTACHMENTS_DISABLED":case"ATTACHMENT_INVALID":case"ATTACHMENT_TOO_LARGE":return g.errorAttachmentRejected;case"VALIDATION_ERROR":case"CONFIG_ERROR":case"SERVICE_ERROR":case"UNKNOWN_ERROR":default:return f??g.errorGeneric}},[g]),Re=P.useCallback(C=>!(C instanceof qe)||C.code==="TIMEOUT"||C.code==="NETWORK_ERROR"||C.code==="RATE_LIMITED"||C.code==="SERVICE_ERROR"||C.code==="UNKNOWN_ERROR"||C.status>=500||C.status===0,[]),ze=P.useCallback(async C=>{var re,ee;ie(!0),ge.current=!0,ue(null),b(!1);const f=x&&typeof E.streamMessage=="function";let S=null;const B=I=>{if(S===null){S=ke(),se(S);const K=[...ne.current,{id:S,role:"assistant",content:"",...I}];ne.current=K,H(K)}else{const K=S,G=ne.current.map(ye=>ye.id===K?{...ye,...I}:ye);ne.current=G,H(G)}},J=()=>{if(S===null)return;const I=S,K=ne.current.filter(G=>G.id!==I);ne.current=K,H(K)};try{let I,K,G,ye,Ze=!1;if(f){const Ke=new AbortController;Le.current=Ke,O(!0);const De=await E.streamMessage(C,{signal:Ke.signal,onChunk:(Ut,Bt)=>B({content:Bt}),onToolUse:(Ut,Bt)=>B({toolUses:[...Bt]})});I=De.reply,K=De.sources,G=De.toolUses,ye=De.attachments,Ze=De.aborted??!1}else{const Ke=await E.sendMessage(C);I=Ke.reply,K=Ke.sources,G=Ke.toolUses,ye=Ke.attachments}if(Ze&&!I){J();return}let kt={id:S??ke(),role:"assistant",content:I,sources:K,toolUses:G};de.current.length>0&&!Ze&&(kt=await Cc(de.current,kt,{messages:C,apiUrl:s}));const Ft=S!==null?ne.current.map(Ke=>Ke.id===kt.id?kt:Ke):[...C,kt],Et=Oc(Ft,ye);ne.current=Et,H(Et),Se(Et)}catch(I){if(I instanceof Yl)return;if(I instanceof qe&&((re=I.code)!=null&&re.startsWith("ATTACHMENT"))&&C.length>0){const K=C[C.length-1];if(K.role==="user"&&((ee=K.attachments)!=null&&ee.length)){const G=C.slice(0,-1);ne.current=G,H(G),Se(G)}}if(S!==null){Se(ne.current),I instanceof qe?ue(q(I.code,I.message)):ue((g==null?void 0:g.errorConnection)??"Failed to connect. Please try again."),b(!1);return}if(de.current.length>0){const K=I instanceof Error?I:new Error(String(I)),G=await Tc(de.current,K,{messages:C,apiUrl:s});if(G){const ye={id:ke(),role:"assistant",content:G.content,sources:G.sources},Ze=[...C,ye];ne.current=Ze,H(Ze),Se(Ze),ue(null),b(!1);return}}I instanceof qe?ue(q(I.code,I.message)):ue((g==null?void 0:g.errorConnection)??"Failed to connect. Please try again."),b(Re(I))}finally{ie(!1),ge.current=!1,O(!1),se(null),Le.current=null}},[s,E,q,Re,Se,x,g]),Me=P.useCallback(()=>{var C;(C=Le.current)==null||C.abort()},[]),me=P.useCallback(async(C,f)=>{const S=C.trim(),B=(f==null?void 0:f.filter(I=>I&&I.id))??[];if(!S&&B.length===0||ge.current)return;const J={id:ke(),role:"user",content:S,...B.length>0?{attachments:B}:{}};let re=J;if(de.current.length>0){const I=await Ec(de.current,J,{messages:ne.current,apiUrl:s});if(I.type==="abort")return;if(I.type==="respond"){const K={id:ke(),role:"assistant",content:I.reply.content,sources:I.reply.sources},G=[...ne.current,I.message,K];ne.current=G,H(G),Se(G),ue(null),b(!1);return}re=I.message}const ee=[...ne.current,re];ne.current=ee,H(ee),Se(ee),await ze(ee)},[s,Se,ze]),L=P.useCallback(async()=>{if(ge.current)return;const C=ne.current[ne.current.length-1];!C||C.role!=="user"||await ze(ne.current)},[ze]),V=P.useCallback(()=>{if(ne.current=[],H([]),ue(null),b(!1),c){const C=Zl();if(!C)return;try{C.removeItem(T)}catch{}}},[c,T]);return{messages:W,isLoading:te,isStreaming:oe,streamingMessageId:Y,error:ae,canRetry:X,sendMessage:me,stop:Me,retry:L,clearMessages:V}}function Hc(s){const[c,u]=P.useState(()=>typeof window>"u"?!1:window.matchMedia(s).matches);return P.useEffect(()=>{const h=window.matchMedia(s);u(h.matches);const g=k=>u(k.matches);return h.addEventListener("change",g),()=>h.removeEventListener("change",g)},[s]),c}function Dr(s,c){return s instanceof RegExp?s.test(c):c.toLowerCase().includes(s.toLowerCase())}function Vc(){const s=document.documentElement,c=document.body,u=s.scrollTop||c.scrollTop||0,h=Math.max(s.scrollHeight,c.scrollHeight),g=s.clientHeight||window.innerHeight,k=h-g;return k<=0?100:u/k*100}function Wc({triggers:s,enabled:c,onOpen:u,onGreeting:h}){P.useEffect(()=>{if(!c||!s||s.length===0)return;const g=new Set,k=[],x=typeof window<"u"?window.location.href:"",E=(T,M)=>{g.has(T)||(g.add(T),M==="open"?u():h(M.greeting))};return s.forEach((T,M)=>{switch(T.on){case"url":{Dr(T.pattern,x)&&E(M,T.action);break}case"time":{if(T.matchUrl&&!Dr(T.matchUrl,x))return;const W=window.setTimeout(()=>E(M,T.action),Math.max(0,T.seconds*1e3));k.push(()=>window.clearTimeout(W));break}case"scroll":{if(T.matchUrl&&!Dr(T.matchUrl,x))return;const W=()=>{Vc()>=T.percent&&E(M,T.action)};W(),window.addEventListener("scroll",W,{passive:!0}),k.push(()=>window.removeEventListener("scroll",W));break}case"exit-intent":{if(T.matchUrl&&!Dr(T.matchUrl,x))return;const W=H=>{H.clientY<=0&&E(M,T.action)};document.addEventListener("mouseleave",W),k.push(()=>document.removeEventListener("mouseleave",W));break}}}),()=>{k.forEach(T=>T())}},[s,c,u,h])}const $c={"bottom-right":"bottom-6 right-6","bottom-left":"bottom-6 left-6","top-right":"top-6 right-6","top-left":"top-6 left-6"},Qc=P.forwardRef(function({isOpen:c,onClick:u,position:h="bottom-right",translations:g},k){const x=c?(g==null?void 0:g.closeChat)??"Close chat":(g==null?void 0:g.openChat)??"Open chat";return y.jsx("button",{ref:k,onClick:u,"aria-label":x,className:`fixed ${$c[h]} z-50 flex h-14 w-14 items-center justify-center rounded-claudius-full bg-claudius-accent text-claudius-accent-text shadow-claudius-floating transition-transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-claudius-accent focus:ring-offset-2`,children:c?y.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):y.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:y.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})})}),Kc=P.memo(function({count:c,isActive:u,onClick:h}){return y.jsxs("button",{onClick:h,"aria-label":"View sources",title:"View sources",className:`group relative flex h-7 w-7 items-center justify-center rounded-claudius-full transition-colors ${u?"bg-claudius-accent text-claudius-accent-text":"text-claudius-text-muted hover:bg-claudius-surface-muted hover:text-claudius-text"}`,children:[y.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),y.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),y.jsx("span",{className:"absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center rounded-claudius-full bg-claudius-accent px-1 text-[10px] font-bold text-claudius-accent-text",children:c})]})}),Gc=["http:","https:"];function Jl(s){if(!s||typeof s!="string")return null;const c=s.trim();if(!c)return null;try{const u=new URL(c);return Gc.includes(u.protocol)?c:null}catch{return null}}function Yc(){return y.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function ou({label:s,onClick:c}){return y.jsx("button",{type:"button",onClick:c,"aria-label":s,className:"absolute -right-1.5 -top-1.5 flex h-5 w-5 items-center justify-center rounded-claudius-full bg-claudius-text text-claudius-surface shadow-claudius-floating hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-claudius-accent",children:y.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round","aria-hidden":"true",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}const uu=P.memo(function({attachment:c,variant:u,onRemove:h,removeLabel:g}){const k=jc(c),x=u==="composer",E=`${c.name} (${ql(c.size)})`,T=c.url?Jl(c.url):null;if(k){const W=y.jsx("img",{src:k,alt:c.name,title:E,loading:"lazy",className:x?"h-12 w-12 rounded-claudius-sm border border-claudius-border object-cover":"max-h-48 max-w-full rounded-claudius-sm object-contain"});return y.jsxs("div",{className:"relative inline-block",children:[!x&&T?y.jsxs("a",{href:T,target:"_blank",rel:"noopener noreferrer",children:[W,y.jsxs("span",{className:"sr-only",children:[E," (opens in a new tab)"]})]}):W,h&&g&&y.jsx(ou,{label:g,onClick:h})]})}const M=y.jsxs("span",{title:E,className:`inline-flex max-w-[220px] items-center gap-1.5 rounded-claudius-sm border px-2 py-1 text-xs ${x?"border-claudius-border bg-claudius-field text-claudius-text":"border-current/30 bg-transparent"}`,children:[y.jsx(Yc,{}),y.jsx("span",{className:"truncate",children:c.name}),y.jsx("span",{className:"shrink-0 opacity-70",children:ql(c.size)})]});return y.jsxs("div",{className:"relative inline-block",children:[!x&&T?y.jsxs("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"underline-offset-2 hover:underline",children:[M,y.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]}):M,h&&g&&y.jsx(ou,{label:g,onClick:h})]})});function Xc(s){const c=s.lastIndexOf(` +`),u=c===-1?"":s.slice(0,c+1);let h=c===-1?s:s.slice(c+1);return h=Jc(h),h=bc(h),u+h}function qc(s){const c=[];for(let u=0;ug(x=>!x),"aria-expanded":k?h:void 0,className:"flex items-center gap-1.5 rounded-claudius-full border border-claudius-border bg-claudius-surface px-2 py-0.5 hover:opacity-80 disabled:cursor-default disabled:hover:opacity-100",children:[y.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:y.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),y.jsxs("span",{children:[c," ",y.jsx("span",{className:"font-mono text-claudius-text",children:s.name}),s.isError&&y.jsx("span",{className:"text-claudius-error",children:" ✕"})]}),k&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"sr-only",children:u}),y.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:h?"rotate-180":void 0,children:y.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),h&&k&&y.jsxs("div",{className:"mt-1 overflow-x-auto rounded-claudius-sm border border-claudius-border bg-claudius-field p-2 font-mono",children:[s.input!==void 0&&y.jsx("pre",{className:"whitespace-pre-wrap break-all",children:JSON.stringify(s.input,null,2)}),s.result!==void 0&&y.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all border-t border-claudius-border pt-1",children:s.result})]})]})}const su=/(https?:\/\/[^\s)]+)/,au=/(\*\*[^*]+\*\*)/,cu=/(\*[^*]+\*)/;function tf(s,c){const u=s.match(/[.,;:!?'"]+$/),h=u?s.slice(0,-u[0].length):s,g=u?u[0]:"",k=Jl(h);return k?y.jsxs(y.Fragment,{children:[y.jsxs("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"underline font-medium hover:opacity-80 text-claudius-link",children:[k.replace(/^https?:\/\//,""),y.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]},c),g]}):s}function nf(s,c){const u=s.split(au),h=[];return u.forEach((g,k)=>{if(au.test(g)){const x=g.slice(2,-2);h.push(y.jsx("strong",{children:x},`${c}-b${k}`))}else g.split(cu).forEach((E,T)=>{if(cu.test(E)){const M=E.slice(1,-1);h.push(y.jsx("em",{children:M},`${c}-b${k}-i${T}`))}else E.split(su).forEach((W,H)=>{su.test(W)?h.push(tf(W,`${c}-b${k}-i${T}-u${H}`)):W&&h.push(W)})})}),h}function rf(s){const c=s.split(` +`);return c.map((u,h)=>y.jsxs("span",{children:[nf(u,`l${h}`),h0,ie=h?Xc(u):u,oe=H||u!==""||!(x!=null&&x.length);return y.jsxs("div",{className:`${H?"ml-auto":"mr-auto"} max-w-[85%]`,children:[oe&&y.jsxs("div",{className:`rounded-claudius-bubble px-4 py-2.5 text-sm leading-relaxed font-body ${H?"bg-claudius-user-bubble text-claudius-user-bubble-text rounded-br-claudius-tail":"bg-claudius-assistant-bubble text-claudius-assistant-bubble-text rounded-bl-claudius-tail"}`,children:[te&&y.jsx("ul",{className:`flex flex-wrap gap-2 ${u?"mb-2":""}`,"aria-label":"Attachments",children:k.map(O=>y.jsx("li",{children:y.jsx(uu,{attachment:O,variant:"message"})},O.id))}),(u!==""||!te)&&rf(ie)]}),!H&&x&&x.length>0&&y.jsx("div",{className:"mt-1 space-y-1",children:x.map((O,Y)=>y.jsx(ef,{toolUse:O,usedLabel:E,detailsLabel:T},`${O.name}-${Y}`))}),!H&&g&&g.length>0&&M&&y.jsx("div",{className:"mt-1",children:y.jsx(Kc,{count:g.length,isActive:W??!1,onClick:M})})]})}),fu={title:"Chat",subtitle:"Ask me anything",welcomeMessage:"Hi! How can I help you today?",closeChat:"Close chat",chatMessages:"Chat messages",typingIndicator:"Assistant is typing",placeholder:"Type your message...",sendMessage:"Send message",stopGenerating:"Stop generating",toolUsed:"Used tool:",toolDetails:"Tool details",typeYourMessage:"Type your message",openChat:"Open chat",dismissGreeting:"Dismiss greeting",attachFile:"Attach a file",removeAttachment:"Remove attachment",attachmentsLabel:"Attachments",dropFilesHint:"Drop files to attach",attachmentTooLarge:"{name} is too large. The maximum size is {max}.",attachmentTypeNotAllowed:"{name} is not a supported file type.",attachmentTooMany:"You can attach up to {max} files per message.",errorGeneric:"Something went wrong. Please try again.",errorConnection:"Failed to connect. Please try again.",errorTimeout:"Request timed out. Please try again.",errorRateLimitMinute:"Too many requests. Please wait a minute.",errorRateLimitHour:"Hourly limit reached. Please try again later.",errorAttachmentRejected:"An attachment was rejected. Please remove it and try again.",errorAttachmentQuota:"Upload limit reached. Please try again later.",errorRetry:"Retry"},of=fu;function bl(s,c){return s.replace(/\{(\w+)\}/g,(u,h)=>h in c?String(c[h]):u)}const ei=2e3,uf=1800;function du(s){var u;const c=(u=s.dataTransfer)==null?void 0:u.types;return!!c&&Array.from(c).includes("Files")}function sf({onSend:s,isLoading:c,isStreaming:u=!1,onStop:h,placeholder:g,translations:k,attachments:x=null}){const E=k??of,[T,M]=P.useState(""),[W,H]=P.useState([]),[te,ie]=P.useState(null),[oe,O]=P.useState(!1),Y=P.useRef(null),se=P.useRef(null),ae=P.useRef([]),ue=P.useRef(0),X=T.length,b=X>=uf,he=X>=ei,ge=g??E.placeholder,ne=!!x&&W.length{var f;c||(f=Y.current)==null||f.focus()},[c]);const de=P.useCallback((f,S)=>{if(!x)return"";switch(S){case"size":return bl(E.attachmentTooLarge,{name:f,max:ql(x.maxSizeBytes)});case"type":return bl(E.attachmentTypeNotAllowed,{name:f});case"count":return bl(E.attachmentTooMany,{max:x.maxCount})}},[x,E]),Se=P.useCallback(async f=>{if(!x||f.length===0)return;const{accepted:S,rejected:B}=Lc(f,ae.current.length,x);if(ie(B.length>0?de(B[0].file.name,B[0].reason):null),S.length===0)return;const J=await Promise.all(S.map(zc));ae.current=[...ae.current,...J],H(ae.current)},[x,de]),ke=P.useCallback(f=>{ae.current=ae.current.filter(S=>S.id!==f),H(ae.current),ie(null)},[]),q=f=>{f.preventDefault();const S=T.trim(),B=ae.current;!S&&B.length===0||he||(B.length>0?s(S,B):s(S),M(""),ae.current=[],H([]),ie(null))},Re=f=>{const S=f.target.value;S.length<=ei&&M(S)},ze=f=>{const S=Array.from(f.target.files??[]);f.target.value="",Se(S)},Me=f=>{var B;if(!x)return;const S=Array.from(((B=f.clipboardData)==null?void 0:B.files)??[]);S.length!==0&&(f.preventDefault(),Se(S))},me=f=>{!x||!du(f)||(f.preventDefault(),ue.current+=1,O(!0))},L=f=>{!x||!du(f)||f.preventDefault()},V=()=>{x&&(ue.current=Math.max(0,ue.current-1),ue.current===0&&O(!1))},C=f=>{var S;x&&(f.preventDefault(),ue.current=0,O(!1),Se(Array.from(((S=f.dataTransfer)==null?void 0:S.files)??[])))};return y.jsxs("form",{onSubmit:q,onDragEnter:me,onDragOver:L,onDragLeave:V,onDrop:C,"data-drag-over":oe||void 0,className:`relative border-t border-claudius-border bg-claudius-surface p-3 ${oe?"ring-2 ring-inset ring-claudius-accent":""}`,children:[oe&&y.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-claudius-surface text-sm font-medium text-claudius-accent",children:E.dropFilesHint}),x&&W.length>0&&y.jsx("ul",{"aria-label":E.attachmentsLabel,className:"mb-2 flex flex-wrap gap-3 pt-1",children:W.map(f=>y.jsx("li",{children:y.jsx(uu,{attachment:f,variant:"composer",onRemove:()=>ke(f.id),removeLabel:`${E.removeAttachment}: ${f.name}`})},f.id))}),y.jsxs("div",{className:"flex gap-2",children:[x&&y.jsxs(y.Fragment,{children:[y.jsx("input",{ref:se,type:"file",multiple:!0,hidden:!0,tabIndex:-1,accept:x.allowedTypes.join(","),onChange:ze,"aria-label":E.attachFile}),y.jsx("button",{type:"button",onClick:()=>{var f;return(f=se.current)==null?void 0:f.click()},disabled:c||!ne,"aria-label":E.attachFile,title:E.attachFile,className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-claudius-sm border border-claudius-border bg-claudius-field text-claudius-text-muted transition-colors hover:text-claudius-text focus:border-claudius-accent focus:outline-none focus:ring-1 focus:ring-claudius-accent disabled:opacity-50",children:y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:y.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})})]}),y.jsx("input",{ref:Y,type:"text",value:T,onChange:Re,onPaste:Me,placeholder:ge,disabled:c,"aria-label":E.typeYourMessage,"aria-describedby":b?"char-count":void 0,className:"min-w-0 flex-1 rounded-claudius-sm border border-claudius-border bg-claudius-field px-3 py-2 text-sm font-body text-claudius-text placeholder:text-claudius-text-muted focus:border-claudius-accent focus:outline-none focus:ring-1 focus:ring-claudius-accent disabled:opacity-50"}),Le?y.jsx("button",{type:"button",onClick:h,"aria-label":E.stopGenerating,className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-claudius-sm bg-claudius-accent text-claudius-accent-text transition-colors hover:opacity-90",children:y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:y.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1.5"})})}):y.jsx("button",{type:"submit",disabled:c||he,"aria-label":E.sendMessage,className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-claudius-sm bg-claudius-accent text-claudius-accent-text transition-colors hover:opacity-90 disabled:opacity-50",children:y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),y.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),te&&y.jsx("div",{role:"alert",className:"mt-1 text-xs text-claudius-error",children:te}),b&&y.jsxs("div",{id:"char-count",className:`mt-1 text-xs text-right ${he?"text-claudius-error":"text-claudius-text-muted"}`,"aria-live":"polite",children:[X,"/",ei]})]})}const af=["blog","page","external"],cf={blog:"Blog",page:"Page",external:"External"};function ff(s){try{return new URL(s).hostname}catch{return s}}const df=P.memo(function({sources:c,onClose:u}){const h=af.map(k=>({type:k,label:cf[k],items:c.filter(x=>x.type===k)})).filter(k=>k.items.length>0),g=c.length===1?"1 source found":`${c.length} sources found`;return y.jsxs("div",{className:"absolute inset-y-0 left-0 z-10 flex w-[280px] flex-col border-r-2 border-claudius-border bg-claudius-surface rounded-r-claudius-lg transition-transform duration-200 ease-out",children:[y.jsxs("div",{className:"flex items-center justify-between border-b border-claudius-border px-4 py-3",children:[y.jsxs("div",{children:[y.jsx("h3",{className:"text-sm font-heading font-semibold text-claudius-text",children:"Sources"}),y.jsx("p",{className:"text-xs text-claudius-text-muted",children:g})]}),y.jsx("button",{onClick:u,"aria-label":"Close sources",className:"flex h-7 w-7 items-center justify-center rounded-claudius-full text-claudius-text-muted transition-colors hover:bg-claudius-surface-muted hover:text-claudius-text",children:y.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),y.jsx("div",{className:"flex-1 overflow-y-auto px-3 py-3 space-y-4",children:h.map(k=>y.jsxs("div",{children:[y.jsx("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-claudius-text-muted",children:k.label}),y.jsx("div",{className:"space-y-2",children:k.items.map(x=>{const E=Jl(x.url);return E?y.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"block rounded-claudius-md border-2 border-claudius-border bg-claudius-surface-muted p-3 transition-colors hover:bg-claudius-border",children:[y.jsx("p",{className:"truncate text-sm font-medium text-claudius-text",children:x.title}),y.jsx("p",{className:"mt-0.5 text-xs text-claudius-text-muted",children:ff(E)})]},E):null})})]},k.type))})]})});function pf({title:s,subtitle:c,titleId:u,closeLabel:h,onClose:g}){return y.jsxs("div",{className:"flex items-center gap-3 bg-claudius-accent px-5 py-4",children:[y.jsx("div",{"aria-hidden":"true",className:"flex h-8 w-8 items-center justify-center rounded-claudius-full bg-claudius-accent-soft text-sm font-bold text-claudius-accent-text",children:s.charAt(0).toUpperCase()}),y.jsxs("div",{className:"flex-1",children:[y.jsx("h2",{id:u,className:"text-sm font-heading font-semibold text-claudius-accent-text",children:s}),y.jsx("p",{className:"text-xs text-claudius-accent-text",children:c})]}),y.jsx("button",{onClick:g,"aria-label":h,className:"flex h-10 w-10 items-center justify-center rounded-claudius-full text-claudius-accent-text-muted transition-colors hover:bg-claudius-accent-soft hover:text-claudius-accent-text",children:y.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})}function hf({message:s,retryLabel:c,onRetry:u}){return y.jsxs("div",{role:"alert",className:"mx-auto flex max-w-[90%] flex-col items-center gap-2 rounded-claudius-sm bg-claudius-error-surface px-3 py-2 text-center text-xs text-claudius-error",children:[y.jsx("span",{children:s}),u&&y.jsx("button",{type:"button",onClick:u,className:"rounded-claudius-md bg-claudius-error px-3 py-1 text-xs font-semibold text-claudius-error-text transition-opacity hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-claudius-error focus-visible:ring-offset-1",children:c})]})}function mf({label:s}){return y.jsx("div",{role:"status","aria-live":"polite","aria-label":s,className:"mr-auto flex max-w-[85%]",children:y.jsxs("div",{className:"flex gap-1 rounded-claudius-bubble rounded-bl-claudius-tail bg-claudius-assistant-bubble px-4 py-3",children:[y.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:0ms]"}),y.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:150ms]"}),y.jsx("span",{className:"h-2 w-2 motion-safe:animate-bounce rounded-claudius-full bg-claudius-text-muted [animation-delay:300ms]"})]})})}function gf(s,c,u){const[h,g]=P.useState(0),k=P.useRef(0),x=P.useRef(0),E=P.useRef(0),T=P.useRef(!1);return P.useEffect(()=>{const M=s.current;if(!u||!M)return;const W=ie=>{if(M.scrollTop>0){T.current=!1;return}T.current=!0,x.current=ie.touches[0].clientY,E.current=Date.now()},H=ie=>{if(!T.current)return;let oe=ie.touches[0].clientY-x.current;oe<0&&(oe=oe*.3),k.current=oe,g(oe)},te=()=>{if(!T.current)return;T.current=!1;const ie=k.current,oe=(Date.now()-E.current)/1e3,O=M.getBoundingClientRect().height,Y=oe>.05&&ie>0&&ie/oe>500,se=ie>O*.3;Y||se?c():(k.current=0,g(0))};return M.addEventListener("touchstart",W,{passive:!0}),M.addEventListener("touchmove",H,{passive:!0}),M.addEventListener("touchend",te),()=>{M.removeEventListener("touchstart",W),M.removeEventListener("touchmove",H),M.removeEventListener("touchend",te)}},[s,c,u]),{offsetY:h}}const vf='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function yf(s,c){P.useEffect(()=>{const u=s.current;if(!u)return;const h=g=>{if(g.key!=="Tab")return;const k=Array.from(u.querySelectorAll(vf)).filter(M=>!M.hasAttribute("aria-hidden"));if(k.length===0)return;const x=k[0],E=k[k.length-1],T=document.activeElement;g.shiftKey&&T===x?(g.preventDefault(),E.focus()):!g.shiftKey&&T===E&&(g.preventDefault(),x.focus())};return u.addEventListener("keydown",h),()=>u.removeEventListener("keydown",h)},[s,c])}const wf=/\*\*([^*]+)\*\*/g,xf=/\*([^*]+)\*/g,Sf=/https?:\/\/[^\s)]+/g;function kf(s){return s.replace(wf,"$1").replace(xf,"$1").replace(Sf,c=>{try{return new URL(c).hostname}catch{return c}})}const Ef={"bottom-right":"bottom-24 right-3 sm:right-6","bottom-left":"bottom-24 left-3 sm:left-6","top-right":"top-24 right-3 sm:right-6","top-left":"top-24 left-3 sm:left-6"};function Cf({messages:s,isLoading:c,isStreaming:u=!1,streamingMessageId:h=null,error:g,canRetry:k=!1,onSend:x,onStop:E,onRetry:T,onClose:M,title:W="Chat",subtitle:H="Ask me anything",welcomeMessage:te="Hi! How can I help you today?",placeholder:ie,position:oe="bottom-right",translations:O,isMobile:Y=!1,attachments:se=null}){const ae=P.useId(),ue=P.useRef(null),X=P.useRef(null),[b,he]=P.useState(null);yf(ue,!0);const{offsetY:ge}=gf(X,M,Y),ne=ge!==0,Le=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)").matches:!1;P.useEffect(()=>{const q=X.current;q&&(q.scrollTop=q.scrollHeight)},[s,c]),P.useEffect(()=>{const q=Re=>{Re.key==="Escape"&&!Re.isComposing&&M()};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[M]);const de=(O==null?void 0:O.closeChat)??"Close chat",Se=(O==null?void 0:O.chatMessages)??"Chat messages",ke=[...s].reverse().find(q=>q.role==="assistant");return y.jsxs("div",{ref:ue,role:"dialog","aria-modal":Y?"true":void 0,"aria-labelledby":ae,className:Y?"claudius-bottom-sheet fixed inset-x-0 bottom-0 z-50 flex h-[90vh] w-full flex-col overflow-hidden rounded-t-claudius-lg bg-claudius-surface shadow-claudius-elevated font-body":`fixed ${Ef[oe]} z-50 flex h-[min(500px,calc(100vh-7rem))] w-[calc(100vw-1.5rem)] max-w-[380px] sm:max-w-[400px] md:max-w-[440px] flex-col overflow-hidden rounded-claudius-lg bg-claudius-surface shadow-claudius-elevated font-body`,style:Y&&!Le?{transform:`translateY(${Math.max(0,ge)}px)`}:void 0,"data-dragging":ne||void 0,children:[Y&&y.jsx("div",{className:"flex justify-center py-2","aria-hidden":"true",children:y.jsx("div",{className:"h-1 w-8 rounded-claudius-full bg-claudius-border"})}),y.jsx(pf,{title:W,subtitle:H,titleId:ae,closeLabel:de,onClose:M}),y.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[b&&y.jsx(df,{sources:b.sources,onClose:()=>he(null)}),y.jsxs("div",{ref:X,role:"log","aria-label":Se,className:"h-full space-y-3 overflow-y-auto px-4 py-4",children:[s.length===0&&!g&&y.jsx("div",{className:"mr-auto flex max-w-[85%]",children:y.jsx("div",{className:"rounded-claudius-bubble rounded-bl-claudius-tail bg-claudius-assistant-bubble px-4 py-2.5 text-sm leading-relaxed text-claudius-assistant-bubble-text",children:te})}),s.map(q=>y.jsx(lf,{role:q.role,content:q.content,isStreaming:q.id===h,sources:q.sources,attachments:q.attachments,toolUses:q.toolUses,toolUsedLabel:O==null?void 0:O.toolUsed,toolDetailsLabel:O==null?void 0:O.toolDetails,isSourceActive:(b==null?void 0:b.messageId)===q.id,onSourceClick:()=>{(b==null?void 0:b.messageId)===q.id?he(null):q.sources&&q.sources.length>0&&he({messageId:q.id,sources:q.sources})}},q.id)),c&&!(h!==null&&s.some(q=>q.id===h&&q.content.length>0))&&y.jsx(mf,{label:(O==null?void 0:O.typingIndicator)??"Assistant is typing"}),g&&y.jsx(hf,{message:g,retryLabel:(O==null?void 0:O.errorRetry)??"Retry",onRetry:k&&T&&!c?T:void 0})]})]}),y.jsx("div",{"data-claudius-live":"assistant","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:ke&&ke.id!==h?kf(ke.content):""}),y.jsx(sf,{onSend:x,isLoading:c,isStreaming:u,onStop:E,placeholder:ie,translations:O,attachments:se})]})}function Tf({message:s,position:c,onOpen:u,onDismiss:h,dismissLabel:g}){const k=c.startsWith("bottom"),x=c.endsWith("right"),E=["claudius-greeting-bubble","fixed z-40 max-w-xs",k?"bottom-20":"top-20",x?"right-4":"left-4"].join(" ");return y.jsxs("div",{className:E,role:"status","aria-live":"polite",children:[y.jsx("button",{type:"button",onClick:u,className:"block w-full rounded-claudius-lg bg-claudius-surface p-4 pr-8 text-left text-sm font-body text-claudius-text shadow-claudius-floating ring-1 ring-claudius-border transition hover:shadow-claudius-floating-hover focus:outline-none focus:ring-2 focus:ring-claudius-accent",children:s}),y.jsx("button",{type:"button",onClick:T=>{T.stopPropagation(),h()},"aria-label":g,className:"absolute right-1 top-1 flex h-6 w-6 items-center justify-center rounded-claudius-full text-claudius-text-muted hover:bg-claudius-surface-muted focus:outline-none focus:ring-2 focus:ring-claudius-accent",children:y.jsx("span",{"aria-hidden":"true",children:"×"})})]})}const pu={en:fu,es:{title:"Chat",subtitle:"Pregúntame lo que quieras",welcomeMessage:"¡Hola! ¿En qué puedo ayudarte hoy?",closeChat:"Cerrar chat",chatMessages:"Mensajes del chat",typingIndicator:"El asistente está escribiendo",placeholder:"Escribe tu mensaje...",sendMessage:"Enviar mensaje",stopGenerating:"Detener la respuesta",toolUsed:"Herramienta usada:",toolDetails:"Detalles de la herramienta",typeYourMessage:"Escribe tu mensaje",openChat:"Abrir chat",dismissGreeting:"Descartar saludo",attachFile:"Adjuntar un archivo",removeAttachment:"Quitar adjunto",attachmentsLabel:"Adjuntos",dropFilesHint:"Suelta los archivos para adjuntarlos",attachmentTooLarge:"{name} es demasiado grande. El tamaño máximo es {max}.",attachmentTypeNotAllowed:"{name} no es un tipo de archivo compatible.",attachmentTooMany:"Puedes adjuntar hasta {max} archivos por mensaje.",errorGeneric:"Algo salió mal. Inténtalo de nuevo.",errorConnection:"No se pudo conectar. Inténtalo de nuevo.",errorTimeout:"La solicitud tardó demasiado. Inténtalo de nuevo.",errorRateLimitMinute:"Demasiadas solicitudes. Espera un minuto.",errorRateLimitHour:"Has alcanzado el límite por hora. Inténtalo más tarde.",errorAttachmentRejected:"Se rechazó un adjunto. Quítalo e inténtalo de nuevo.",errorAttachmentQuota:"Límite de subida alcanzado. Inténtalo más tarde.",errorRetry:"Reintentar"},fr:{title:"Chat",subtitle:"Posez-moi vos questions",welcomeMessage:"Bonjour ! Comment puis-je vous aider aujourd'hui ?",closeChat:"Fermer le chat",chatMessages:"Messages du chat",typingIndicator:"L'assistant écrit",placeholder:"Saisissez votre message...",sendMessage:"Envoyer le message",stopGenerating:"Arrêter la génération",toolUsed:"Outil utilisé :",toolDetails:"Détails de l'outil",typeYourMessage:"Saisissez votre message",openChat:"Ouvrir le chat",dismissGreeting:"Ignorer le message d'accueil",attachFile:"Joindre un fichier",removeAttachment:"Retirer la pièce jointe",attachmentsLabel:"Pièces jointes",dropFilesHint:"Déposez les fichiers pour les joindre",attachmentTooLarge:"{name} est trop volumineux. La taille maximale est de {max}.",attachmentTypeNotAllowed:"{name} n'est pas un type de fichier pris en charge.",attachmentTooMany:"Vous pouvez joindre jusqu'à {max} fichiers par message.",errorGeneric:"Une erreur s'est produite. Veuillez réessayer.",errorConnection:"Échec de la connexion. Veuillez réessayer.",errorTimeout:"La requête a expiré. Veuillez réessayer.",errorRateLimitMinute:"Trop de requêtes. Veuillez patienter une minute.",errorRateLimitHour:"Limite horaire atteinte. Veuillez réessayer plus tard.",errorAttachmentRejected:"Une pièce jointe a été refusée. Retirez-la et réessayez.",errorAttachmentQuota:"Limite d'envoi atteinte. Veuillez réessayer plus tard.",errorRetry:"Réessayer"},de:{title:"Chat",subtitle:"Fragen Sie mich alles",welcomeMessage:"Hallo! Wie kann ich Ihnen heute helfen?",closeChat:"Chat schließen",chatMessages:"Chat-Nachrichten",typingIndicator:"Der Assistent schreibt",placeholder:"Geben Sie Ihre Nachricht ein...",sendMessage:"Nachricht senden",stopGenerating:"Generierung stoppen",toolUsed:"Verwendetes Tool:",toolDetails:"Tool-Details",typeYourMessage:"Geben Sie Ihre Nachricht ein",openChat:"Chat öffnen",dismissGreeting:"Begrüßung schließen",attachFile:"Datei anhängen",removeAttachment:"Anhang entfernen",attachmentsLabel:"Anhänge",dropFilesHint:"Dateien hier ablegen, um sie anzuhängen",attachmentTooLarge:"{name} ist zu groß. Die maximale Größe beträgt {max}.",attachmentTypeNotAllowed:"{name} ist kein unterstützter Dateityp.",attachmentTooMany:"Sie können bis zu {max} Dateien pro Nachricht anhängen.",errorGeneric:"Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut.",errorConnection:"Verbindung fehlgeschlagen. Bitte versuchen Sie es erneut.",errorTimeout:"Zeitüberschreitung der Anfrage. Bitte versuchen Sie es erneut.",errorRateLimitMinute:"Zu viele Anfragen. Bitte warten Sie eine Minute.",errorRateLimitHour:"Stündliches Limit erreicht. Bitte versuchen Sie es später erneut.",errorAttachmentRejected:"Ein Anhang wurde abgelehnt. Bitte entfernen Sie ihn und versuchen Sie es erneut.",errorAttachmentQuota:"Upload-Limit erreicht. Bitte versuchen Sie es später erneut.",errorRetry:"Erneut versuchen"}};function hu(s){if(!s)return;const c=s.toLowerCase().split("-")[0];return Object.prototype.hasOwnProperty.call(pu,c)?c:void 0}function Nf(){const s=typeof document<"u"?hu(document.documentElement.lang):void 0;if(s)return s;const c=typeof navigator<"u"?hu(navigator.language):void 0;return c||"en"}function Rf(s={}){const{locale:c,translations:u}=s,h=pu[c??Nf()];return u?{...h,...u}:{...h}}const mu=["accent","accentText","accentSoft","accentTextMuted","surface","surfaceMuted","text","textMuted","border","userBubble","userBubbleText","assistantBubble","assistantBubbleText","field","error","errorSurface","errorText","link","scrim"],_f=["sm","md","lg","full","tail"],jf=["elevated","floating","floatingHover"],Lf=["heading","body"],gu={default:{name:"default"},minimal:{name:"minimal",colors:{accent:"#171717",accentText:"#ffffff",surface:"#ffffff",surfaceMuted:"#f5f5f5",text:"#171717",textMuted:"#737373",border:"#e5e5e5",link:"#171717"},colorsDark:{accent:"#fafafa",accentText:"#171717",surface:"#0a0a0a",surfaceMuted:"#1c1c1c",text:"#fafafa",textMuted:"#a3a3a3",border:"#2e2e2e",field:"#1c1c1c",link:"#fafafa"},radii:{sm:"4px",md:"6px",lg:"10px"},shadows:{elevated:"0 4px 16px rgb(0 0 0 / 0.12)",floating:"0 2px 8px rgb(0 0 0 / 0.12)",floatingHover:"0 4px 12px rgb(0 0 0 / 0.16)"}},playful:{name:"playful",colors:{accent:"#8b5cf6",surfaceMuted:"#f5f3ff",assistantBubbleText:"#4c1d95",link:"#7c3aed"},colorsDark:{accent:"#a78bfa",surfaceMuted:"#2e1065",assistantBubbleText:"#ede9fe",link:"#c4b5fd"},radii:{sm:"12px",md:"16px",lg:"24px",tail:"8px"},shadows:{elevated:"0 24px 48px -12px rgb(139 92 246 / 0.35)",floating:"0 10px 20px -5px rgb(139 92 246 / 0.4)",floatingHover:"0 16px 28px -6px rgb(139 92 246 / 0.5)"},fonts:{heading:"ui-rounded, 'Hiragino Maru Gothic ProN', system-ui",body:"ui-rounded, 'Hiragino Maru Gothic ProN', system-ui"}},corporate:{name:"corporate",colors:{accent:"#1e3a5f",surfaceMuted:"#f3f4f6",text:"#1f2937",textMuted:"#6b7280",border:"#d1d5db",link:"#1d4ed8"},colorsDark:{accent:"#2c5282",link:"#93c5fd"},radii:{sm:"4px",md:"6px",lg:"8px",tail:"2px"},shadows:{elevated:"0 8px 24px rgb(15 23 42 / 0.16)",floating:"0 4px 12px rgb(15 23 42 / 0.18)",floatingHover:"0 6px 16px rgb(15 23 42 / 0.24)"},fonts:{heading:"'Segoe UI', 'Helvetica Neue', Arial, system-ui",body:"'Segoe UI', 'Helvetica Neue', Arial, system-ui"}}};function Mf(s){return Object.prototype.hasOwnProperty.call(gu,s)}const Pf=new Set(["light","dark","auto"]);function zf(s){if(s===void 0)return{mode:"light"};if(typeof s=="string"){if(Pf.has(s))return{mode:s};if(Mf(s)){const c=gu[s];return{mode:c.colorScheme??"light",theme:c}}return{mode:"light",url:s}}return{mode:s.colorScheme??"light",theme:s}}function Df(s){return s.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`)}function Of(s,c){console.warn(`[Claudius] Ignoring unknown theme token "${c}" in "${s}"`)}function Kn(s,c,u,h,g,k=""){if(g)for(const[x,E]of Object.entries(g)){if(!h.includes(x)){Of(c,x);continue}typeof E=="string"&&(s[`${u}${Df(x)}${k}`]=E)}}function Af(s){const c={};Kn(c,"colors","--cl-color-",mu,s.colors);for(const[u,h]of Object.entries({...c}))c[`${u}-dark`]=h;return Kn(c,"colorsDark","--cl-color-",mu,s.colorsDark,"-dark"),Kn(c,"radii","--cl-radius-",_f,s.radii),Kn(c,"shadows","--cl-shadow-",jf,s.shadows),Kn(c,"fonts","--cl-font-",Lf,s.fonts),c}function If(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)}function Ff(s){const c=P.useMemo(()=>zf(s),[s]),[u,h]=P.useState(null),g=c.url;P.useEffect(()=>{if(h(null),!g)return;const T=new AbortController;return fetch(g,{signal:T.signal}).then(M=>{if(!M.ok)throw new Error(`HTTP ${M.status}`);return M.json()}).then(M=>{if(!If(M))throw new Error("theme JSON must be an object");h(M)}).catch(M=>{T.signal.aborted||console.error(`[Claudius] Failed to load theme from ${g}:`,M)}),()=>T.abort()},[g]);const k=c.theme??u??null,x=(u==null?void 0:u.colorScheme)??c.mode,E=P.useMemo(()=>k?Af(k):{},[k]);return{mode:x,cssVars:E}}const vu="claudius:triggers:dismissed";function Uf(){if(typeof window>"u")return!1;try{return window.sessionStorage.getItem(vu)==="1"}catch{return!1}}function Bf(){if(!(typeof window>"u"))try{window.sessionStorage.setItem(vu,"1")}catch{}}function yu({apiUrl:s,title:c,subtitle:u,welcomeMessage:h,placeholder:g,persistMessages:k,storageKeyPrefix:x,requestTimeoutMs:E,theme:T="light",accentColor:M,position:W="bottom-right",locale:H,translations:te,triggers:ie,plugins:oe,streaming:O=!0,attachments:Y=!1}){const[se,ae]=P.useState(!1),ue=P.useMemo(()=>Nc(Y),[Y]),[X,b]=P.useState(null),[he,ge]=P.useState(Uf),ne=P.useRef(!1),Le=Hc("(max-width: 639px)"),de=P.useMemo(()=>Rf({locale:H,translations:te}),[H,te]),{messages:Se,isLoading:ke,isStreaming:q,streamingMessageId:Re,error:ze,canRetry:Me,sendMessage:me,stop:L,retry:V}=Bc({apiUrl:s,persistMessages:k,storageKeyPrefix:x,timeoutMs:E,translations:de,plugins:oe,streaming:O}),C=P.useRef(null),f=P.useRef(se),{mode:S,cssVars:B}=Ff(T),[J,re]=P.useState(!1);P.useEffect(()=>{if(S!=="auto")return;const De=window.matchMedia("(prefers-color-scheme: dark)");re(De.matches);const Ut=Bt=>re(Bt.matches);return De.addEventListener("change",Ut),()=>De.removeEventListener("change",Ut)},[S]),P.useEffect(()=>{var De;f.current&&!se&&((De=C.current)==null||De.focus()),f.current=se},[se]);const ee=P.useCallback(()=>{ge(!0),Bf()},[]),I=P.useCallback(()=>{ae(!1),ne.current&&(ne.current=!1,ee())},[ee]),K=P.useCallback(()=>{ae(De=>!De)},[]),G=P.useCallback(()=>{ne.current=!0,b(null),ae(!0)},[]),ye=P.useCallback(De=>{b(De)},[]),Ze=P.useCallback(()=>{b(null),G()},[G]),kt=P.useCallback(()=>{b(null),ee()},[ee]);Wc({triggers:ie,enabled:!he&&!se,onOpen:G,onGreeting:ye});const Ft=S==="dark"||S==="auto"&&J,Et={...B,...M?{"--cl-color-accent":M,"--cl-color-accent-dark":M}:{}},Ke=Object.keys(Et).length>0?Et:void 0;return y.jsx("div",{className:"claudius-root",style:Ke,children:y.jsxs("div",{"data-claudius-dark":Ft?"true":"false",children:[se&&Le&&y.jsx("div",{className:"claudius-scrim fixed inset-0 z-40 bg-claudius-scrim",onClick:I,"aria-hidden":"true"}),se&&y.jsx(Cf,{messages:Se,isLoading:ke,isStreaming:q,streamingMessageId:Re,error:ze,canRetry:Me,onSend:me,onStop:L,onRetry:V,onClose:I,title:c??de.title,subtitle:u??de.subtitle,welcomeMessage:h??de.welcomeMessage,placeholder:g??de.placeholder,position:W,translations:de,isMobile:Le,attachments:ue}),!(se&&Le)&&y.jsx(Qc,{ref:C,isOpen:se,onClick:K,position:W,translations:de}),!se&&X&&y.jsx(Tf,{message:X,position:W,onOpen:Ze,onDismiss:kt,dismissLabel:de.dismissGreeting})]})})}const Hf="1.15.0";typeof window<"u"&&(window.ClaudiusWidgetVersion=Hf);function wu(){const s=window.ClaudiusConfig;if(!(s!=null&&s.apiUrl)){console.error("[Claudius] Missing ClaudiusConfig.apiUrl");return}const c=document.createElement("div");c.id="claudius-chat-widget",document.body.appendChild(c),nu.createRoot(c).render(y.jsx(yu,{apiUrl:s.apiUrl,title:s.title,subtitle:s.subtitle,welcomeMessage:s.welcomeMessage,placeholder:s.placeholder,persistMessages:s.persistMessages,storageKeyPrefix:s.storageKeyPrefix,requestTimeoutMs:s.requestTimeoutMs,theme:s.theme,accentColor:s.accentColor,position:s.position,locale:s.locale,translations:s.translations,triggers:s.triggers,attachments:s.attachments}))}class xu extends HTMLElement{constructor(){super(...arguments);un(this,"root",null);un(this,"container",null)}static get observedAttributes(){return["api-url","title","subtitle","welcome-message","placeholder","persist-messages","storage-key-prefix","request-timeout-ms","theme","accent-color","position","attachments"]}connectedCallback(){this.container=document.createElement("div"),this.appendChild(this.container),this.root=nu.createRoot(this.container),this.render()}disconnectedCallback(){this.root&&(this.root.unmount(),this.root=null),this.container&&(this.container.remove(),this.container=null)}attributeChangedCallback(){this.render()}render(){if(!this.root)return;const u=this.getAttribute("api-url");if(!u){console.error("[Claudius] Missing api-url attribute on ");return}const h=this.getAttribute("persist-messages"),g=h===null?void 0:h!=="false",k=this.getAttribute("request-timeout-ms"),x=k===null?void 0:Number(k),E=this.getAttribute("attachments"),T=E===null?void 0:E!=="false";this.root.render(y.jsx(yu,{apiUrl:u,title:this.getAttribute("title")??void 0,subtitle:this.getAttribute("subtitle")??void 0,welcomeMessage:this.getAttribute("welcome-message")??void 0,placeholder:this.getAttribute("placeholder")??void 0,persistMessages:g,storageKeyPrefix:this.getAttribute("storage-key-prefix")??void 0,requestTimeoutMs:x!==void 0&&Number.isFinite(x)?x:void 0,theme:this.getAttribute("theme")??void 0,accentColor:this.getAttribute("accent-color")??void 0,position:this.getAttribute("position")??void 0,attachments:T}))}}return typeof customElements<"u"&&!customElements.get("claudius-chat")&&customElements.define("claudius-chat",xu),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",wu):wu(),jt.ClaudiusChat=xu,Object.defineProperty(jt,Symbol.toStringTag,{value:"Module"}),jt})({}); diff --git a/create-claudius/package.json b/create-claudius/package.json index 780763d..ad508ee 100644 --- a/create-claudius/package.json +++ b/create-claudius/package.json @@ -1,6 +1,6 @@ { "name": "create-claudius", - "version": "1.14.0", + "version": "1.15.0", "description": "Scaffold a Claudius AI chat widget project in one command.", "keywords": [ "claudius", diff --git a/docs/package.json b/docs/package.json index e8b9e2d..21653fa 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "claudius-docs", - "version": "1.14.0", + "version": "1.15.0", "private": true, "type": "module", "scripts": { diff --git a/package.json b/package.json index 5ea5c76..792f3fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claudius", - "version": "1.14.0", + "version": "1.15.0", "description": "Embeddable AI chat widget for PMDS and client sites. React component + standalone script embed, powered by Cloudflare Workers and Claude.", "private": true, "type": "module", diff --git a/widget/package.json b/widget/package.json index 41a7cca..208f5a7 100644 --- a/widget/package.json +++ b/widget/package.json @@ -1,6 +1,6 @@ { "name": "claudius-chat-widget", - "version": "1.14.0", + "version": "1.15.0", "type": "module", "description": "Embeddable AI chat widget powered by Claude. Drop-in React component or standalone script embed, backed by a Cloudflare Worker.", "keywords": [ diff --git a/worker/package.json b/worker/package.json index 7509237..cfc316b 100644 --- a/worker/package.json +++ b/worker/package.json @@ -1,6 +1,6 @@ { "name": "claudius-chat-worker", - "version": "1.14.0", + "version": "1.15.0", "private": true, "type": "module", "scripts": {