@infinilabs/chat-message 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-20{top:calc(var(--spacing)*20)}.top-21{top:calc(var(--spacing)*21)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-full{right:100%}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-50{z-index:50}.z-999{z-index:999}.z-1000{z-index:1000}.-mx-6{margin-inline:calc(var(--spacing)*-6)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-2{margin-right:calc(var(--spacing)*2)}.-mb-0\\.5{margin-bottom:calc(var(--spacing)*-.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-full{height:100%}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[75\\%\\]{width:75%}.w-fit{width:fit-content}.w-full{width:100%}.w-full\\!{width:100%!important}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[730px\\]{max-width:730px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#018AE5\\]{border-color:#018ae5}.border-\\[\\#E4E5EF\\]{border-color:#e4e5ef}.border-\\[\\#E6E6E6\\]{border-color:#e6e6e6}.border-\\[\\#EEF0F3\\]{border-color:#eef0f3}.border-\\[\\#e5e5e5\\]{border-color:#e5e5e5}.border-black\\/12{border-color:#0000001f}@supports (color:color-mix(in lab,red,red)){.border-black\\/12{border-color:color-mix(in oklab,var(--color-black)12%,transparent)}}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.border-black\\/15{border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-\\[\\#00C868\\]{background-color:#00c868}.bg-\\[\\#1a1a1a\\]{background-color:#1a1a1a}.bg-\\[\\#1784FC\\]{background-color:#1784fc}.bg-\\[\\#666666\\]{background-color:#666}.bg-\\[\\#E9F0FE\\]{background-color:#e9f0fe}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F5F5F5\\]{background-color:#f5f5f5}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\!{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-\\[2px\\]{padding:2px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#8b8b8b\\]{color:#8b8b8b}.text-\\[\\#018AE5\\]{color:#018ae5}.text-\\[\\#22C55E\\]{color:#22c55e}.text-\\[\\#38C200\\]{color:#38c200}.text-\\[\\#148EFF\\]{color:#148eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#999\\]{color:#999}.text-\\[\\#1784FC\\]{color:#1784fc}.text-\\[\\#1990FF\\]{color:#1990ff}.text-\\[\\#333333\\]{color:#333}.text-\\[\\#666666\\]{color:#666}.text-\\[\\#999999\\]{color:#999}.text-\\[\\#C8C8C8\\]{color:#c8c8c8}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-0{opacity:0}.shadow-\\[0_2px_20px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:0 2px 20px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:text-\\[\\#0072FF\\]:is(:where(.group):hover *){color:#0072ff}.group-hover\\:text-\\[\\#1784FC\\]:is(:where(.group):hover *){color:#1784fc}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\\:pb-0:last-child{padding-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-\\[\\#0072ff\\]\\!:hover{border-color:#0072ff!important}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:bg-\\[\\#E0E9FD\\]:hover{background-color:#e0e9fd}.hover\\:bg-\\[\\#EDEDED\\]:hover{background-color:#ededed}.hover\\:bg-\\[\\#F7F7F7\\]:hover{background-color:#f7f7f7}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-\\[\\#0072ff\\]\\!:hover{color:#0072ff!important}.hover\\:text-\\[\\#ff4d4f\\]\\!:hover{color:#ff4d4f!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}.hover\\:opacity-80:hover{opacity:.8}}@media (min-width:48rem){.md\\:w-\\[610px\\]{width:610px}}.dark\\:border-\\[\\#1D3A6F\\]:where(.dark,.dark *){border-color:#1d3a6f}.dark\\:border-\\[\\#3A3A3A\\]:where(.dark,.dark *){border-color:#3a3a3a}.dark\\:border-\\[\\#4e4e56\\]:where(.dark,.dark *){border-color:#4e4e56}.dark\\:border-\\[\\#272626\\]:where(.dark,.dark *){border-color:#272626}.dark\\:border-black\\/15:where(.dark,.dark *){border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.dark\\:border-black\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\\:border-white\\/15:where(.dark,.dark *){border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.dark\\:border-white\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.dark\\:bg-\\[\\#1E1E1E\\]:where(.dark,.dark *){background-color:#1e1e1e}.dark\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *){background-color:#1f2937}.dark\\:bg-\\[\\#2A2A2A\\]:where(.dark,.dark *){background-color:#2a2a2a}.dark\\:bg-\\[\\#020617\\]:where(.dark,.dark *){background-color:#020617}.dark\\:bg-\\[\\#020817\\]:where(.dark,.dark *){background-color:#020817}.dark\\:bg-\\[\\#111827\\]:where(.dark,.dark *){background-color:#111827}.dark\\:bg-\\[\\#202126\\]:where(.dark,.dark *){background-color:#202126}.dark\\:bg-\\[\\#202126\\]\\!:where(.dark,.dark *){background-color:#202126!important}.dark\\:bg-\\[\\#A3A3A3\\]:where(.dark,.dark *){background-color:#a3a3a3}.dark\\:bg-black:where(.dark,.dark *){background-color:var(--color-black)}.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:#1c398e1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)10%,transparent)}}.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\\:text-\\[\\#38C200\\]:where(.dark,.dark *){color:#38c200}.dark\\:text-\\[\\#666\\]:where(.dark,.dark *){color:#666}.dark\\:text-\\[\\#1990FF\\]:where(.dark,.dark *){color:#1990ff}.dark\\:text-\\[\\#808080\\]:where(.dark,.dark *){color:gray}.dark\\:text-\\[\\#999999\\]:where(.dark,.dark *){color:#999}.dark\\:text-\\[\\#A3A3A3\\]:where(.dark,.dark *){color:#a3a3a3}.dark\\:text-\\[\\#A6A6A6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-\\[\\#D1D5DB\\]:where(.dark,.dark *){color:#d1d5db}.dark\\:text-\\[\\#D8D8D8\\]:where(.dark,.dark *){color:#d8d8d8}.dark\\:text-\\[\\#E5E7EB\\]:where(.dark,.dark *){color:#e5e7eb}.dark\\:text-\\[\\#a6a6a6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\\:shadow-\\[0_2px_20px_rgba\\(255\\,255\\,255\\,0\\.1\\)\\]:where(.dark,.dark *){--tw-shadow:0 2px 20px var(--tw-shadow-color,#ffffff1a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:drop-shadow-\\[0_0_6px_rgb\\(255\\,255\\,255\\)\\]:where(.dark,.dark *){--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#fff));--tw-drop-shadow:var(--tw-drop-shadow-size);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,)}@media (hover:hover){.dark\\:group-hover\\:text-\\[\\#0072FF\\]:where(.dark,.dark *):is(:where(.group):hover *){color:#0072ff}.dark\\:hover\\:border-blue-800:where(.dark,.dark *):hover{border-color:var(--color-blue-800)}.dark\\:hover\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *):hover{background-color:#1f2937}.dark\\:hover\\:bg-\\[\\#2C2C2C\\]:where(.dark,.dark *):hover{background-color:#2c2c2c}.dark\\:hover\\:bg-\\[\\#3A3A3A\\]:where(.dark,.dark *):hover{background-color:#3a3a3a}.dark\\:hover\\:bg-\\[\\#111827\\]:where(.dark,.dark *):hover{background-color:#111827}.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.dark\\:hover\\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.dark\\:hover\\:text-blue-400:where(.dark,.dark *):hover{color:var(--color-blue-400)}}.\\[\\&_\\.ant-btn-icon\\]\\:flex .ant-btn-icon{display:flex}}.cm-deep-research-segmented .ant-segmented-item-label{font-size:16px}.cm-deep-research-segmented .ant-segmented-group{background-color:#fff;padding:2px}.cm-deep-research-segmented .ant-segmented-item{background-color:#fff}.cm-deep-research-segmented .ant-segmented-item:not(:last-child){margin-right:2px}.cm-deep-research-segmented .ant-segmented-item-selected{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item-selected .ant-segmented-item-label{color:#1784fc}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected) .ant-segmented-item-label{color:#333}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover .ant-segmented-item-label{color:#1784fc}.cm-markdown h1,.cm-markdown h2,.cm-markdown h3,.cm-markdown h4,.cm-markdown h5,.cm-markdown h6,.cm-markdown p,.cm-markdown ul,.cm-markdown ol{all:revert}.cm-markdown h1{margin-bottom:16px;font-size:24px;font-weight:600;line-height:32px}.cm-markdown h2{margin-top:24px;margin-bottom:8px;font-size:18px;font-weight:600;line-height:26px}.cm-markdown ol{margin-left:24px;list-style:decimal}.cm-markdown p{margin:4px 0;line-height:1.7}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),ue=require("react-i18next"),dt=require("clsx"),oa=require("i18next"),Mt=require("@infinilabs/markdown"),j=require("lucide-react"),aa=require("ahooks"),la=require("@infinilabs/attachments"),Rn=require("antd"),ca=require("@infinilabs/search-results");function ua(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const _t=ua(g);var kt={exports:{}},nt={};/**
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-20{top:calc(var(--spacing)*20)}.top-21{top:calc(var(--spacing)*21)}.top-full{top:100%}.right-4{right:calc(var(--spacing)*4)}.right-5{right:calc(var(--spacing)*5)}.right-full{right:100%}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.left-full{left:100%}.z-50{z-index:50}.z-999{z-index:999}.z-1000{z-index:1000}.-mx-6{margin-inline:calc(var(--spacing)*-6)}.my-3{margin-block:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mr-2{margin-right:calc(var(--spacing)*2)}.-mb-0\\.5{margin-bottom:calc(var(--spacing)*-.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-full{height:100%}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-3{width:calc(var(--spacing)*3)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-10{width:calc(var(--spacing)*10)}.w-\\[75\\%\\]{width:75%}.w-fit{width:fit-content}.w-full{width:100%}.w-full\\!{width:100%!important}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[520px\\]{max-width:520px}.max-w-\\[730px\\]{max-width:730px}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-32{min-width:calc(var(--spacing)*32)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#018AE5\\]{border-color:#018ae5}.border-\\[\\#018AE5\\]\\/20{border-color:#018ae533}.border-\\[\\#E4E5EF\\]{border-color:#e4e5ef}.border-\\[\\#E6E6E6\\]{border-color:#e6e6e6}.border-\\[\\#EEF0F3\\]{border-color:#eef0f3}.border-\\[\\#e5e5e5\\]{border-color:#e5e5e5}.border-black\\/12{border-color:#0000001f}@supports (color:color-mix(in lab,red,red)){.border-black\\/12{border-color:color-mix(in oklab,var(--color-black)12%,transparent)}}.border-black\\/15{border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.border-black\\/15{border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.bg-\\[\\#00C868\\]{background-color:#00c868}.bg-\\[\\#1a1a1a\\]{background-color:#1a1a1a}.bg-\\[\\#1784FC\\]{background-color:#1784fc}.bg-\\[\\#666666\\]{background-color:#666}.bg-\\[\\#E9F0FE\\]{background-color:#e9f0fe}.bg-\\[\\#F3F4F6\\]{background-color:#f3f4f6}.bg-\\[\\#F5F5F5\\]{background-color:#f5f5f5}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\\/30{background-color:color-mix(in oklab,var(--color-blue-50)30%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-0\\!{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-\\[2px\\]{padding:2px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-0{padding-left:calc(var(--spacing)*0)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#8b8b8b\\]{color:#8b8b8b}.text-\\[\\#018AE5\\]{color:#018ae5}.text-\\[\\#22C55E\\]{color:#22c55e}.text-\\[\\#38C200\\]{color:#38c200}.text-\\[\\#148EFF\\]{color:#148eff}.text-\\[\\#333\\]{color:#333}.text-\\[\\#999\\]{color:#999}.text-\\[\\#1784FC\\]{color:#1784fc}.text-\\[\\#1990FF\\]{color:#1990ff}.text-\\[\\#333333\\]{color:#333}.text-\\[\\#666666\\]{color:#666}.text-\\[\\#999999\\]{color:#999}.text-\\[\\#C8C8C8\\]{color:#c8c8c8}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow-\\[0_2px_20px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:0 2px 20px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:text-\\[\\#0072FF\\]:is(:where(.group):hover *){color:#0072ff}.group-hover\\:text-\\[\\#1784FC\\]:is(:where(.group):hover *){color:#1784fc}}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\\:pb-0:last-child{padding-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\\:border-\\[\\#0072ff\\]\\!:hover{border-color:#0072ff!important}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:bg-\\[\\#E0E9FD\\]:hover{background-color:#e0e9fd}.hover\\:bg-\\[\\#EDEDED\\]:hover{background-color:#ededed}.hover\\:bg-\\[\\#F7F7F7\\]:hover{background-color:#f7f7f7}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:text-\\[\\#0072ff\\]\\!:hover{color:#0072ff!important}.hover\\:text-\\[\\#ff4d4f\\]\\!:hover{color:#ff4d4f!important}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-gray-600:hover{color:var(--color-gray-600)}}@media (min-width:48rem){.md\\:w-\\[610px\\]{width:610px}}.dark\\:border-\\[\\#1D3A6F\\]:where(.dark,.dark *){border-color:#1d3a6f}.dark\\:border-\\[\\#3A3A3A\\]:where(.dark,.dark *){border-color:#3a3a3a}.dark\\:border-\\[\\#4e4e56\\]:where(.dark,.dark *){border-color:#4e4e56}.dark\\:border-\\[\\#272626\\]:where(.dark,.dark *){border-color:#272626}.dark\\:border-black\\/15:where(.dark,.dark *){border-color:#00000026}@supports (color:color-mix(in lab,red,red)){.dark\\:border-black\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:border-blue-900\\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\\:border-gray-800:where(.dark,.dark *){border-color:var(--color-gray-800)}.dark\\:border-white\\/15:where(.dark,.dark *){border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.dark\\:border-white\\/15:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.dark\\:bg-\\[\\#1E1E1E\\]:where(.dark,.dark *){background-color:#1e1e1e}.dark\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *){background-color:#1f2937}.dark\\:bg-\\[\\#2A2A2A\\]:where(.dark,.dark *){background-color:#2a2a2a}.dark\\:bg-\\[\\#020617\\]:where(.dark,.dark *){background-color:#020617}.dark\\:bg-\\[\\#020817\\]:where(.dark,.dark *){background-color:#020817}.dark\\:bg-\\[\\#111827\\]:where(.dark,.dark *){background-color:#111827}.dark\\:bg-\\[\\#202126\\]:where(.dark,.dark *){background-color:#202126}.dark\\:bg-\\[\\#202126\\]\\!:where(.dark,.dark *){background-color:#202126!important}.dark\\:bg-\\[\\#A3A3A3\\]:where(.dark,.dark *){background-color:#a3a3a3}.dark\\:bg-black:where(.dark,.dark *){background-color:var(--color-black)}.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:#1c398e1a}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)10%,transparent)}}.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab,red,red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\\:text-\\[\\#38C200\\]:where(.dark,.dark *){color:#38c200}.dark\\:text-\\[\\#666\\]:where(.dark,.dark *){color:#666}.dark\\:text-\\[\\#1990FF\\]:where(.dark,.dark *){color:#1990ff}.dark\\:text-\\[\\#808080\\]:where(.dark,.dark *){color:gray}.dark\\:text-\\[\\#999999\\]:where(.dark,.dark *){color:#999}.dark\\:text-\\[\\#A3A3A3\\]:where(.dark,.dark *){color:#a3a3a3}.dark\\:text-\\[\\#A6A6A6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-\\[\\#D1D5DB\\]:where(.dark,.dark *){color:#d1d5db}.dark\\:text-\\[\\#D8D8D8\\]:where(.dark,.dark *){color:#d8d8d8}.dark\\:text-\\[\\#E5E7EB\\]:where(.dark,.dark *){color:#e5e7eb}.dark\\:text-\\[\\#a6a6a6\\]:where(.dark,.dark *){color:#a6a6a6}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-gray-100:where(.dark,.dark *){color:var(--color-gray-100)}.dark\\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\\:shadow-\\[0_2px_20px_rgba\\(255\\,255\\,255\\,0\\.1\\)\\]:where(.dark,.dark *){--tw-shadow:0 2px 20px var(--tw-shadow-color,#ffffff1a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\\:drop-shadow-\\[0_0_6px_rgb\\(255\\,255\\,255\\)\\]:where(.dark,.dark *){--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#fff));--tw-drop-shadow:var(--tw-drop-shadow-size);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,)}@media (hover:hover){.dark\\:group-hover\\:text-\\[\\#0072FF\\]:where(.dark,.dark *):is(:where(.group):hover *){color:#0072ff}.dark\\:hover\\:border-blue-800:where(.dark,.dark *):hover{border-color:var(--color-blue-800)}.dark\\:hover\\:bg-\\[\\#1F2937\\]:where(.dark,.dark *):hover{background-color:#1f2937}.dark\\:hover\\:bg-\\[\\#2C2C2C\\]:where(.dark,.dark *):hover{background-color:#2c2c2c}.dark\\:hover\\:bg-\\[\\#3A3A3A\\]:where(.dark,.dark *):hover{background-color:#3a3a3a}.dark\\:hover\\:bg-\\[\\#111827\\]:where(.dark,.dark *):hover{background-color:#111827}.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/20:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-blue-900\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.dark\\:hover\\:bg-gray-800:where(.dark,.dark *):hover{background-color:var(--color-gray-800)}.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.dark\\:hover\\:bg-white\\/5:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.dark\\:hover\\:text-blue-400:where(.dark,.dark *):hover{color:var(--color-blue-400)}}.\\[\\&_\\.ant-btn-icon\\]\\:flex .ant-btn-icon{display:flex}}.cm-deep-research-segmented .ant-segmented-item-label{font-size:16px}.cm-deep-research-segmented .ant-segmented-group{background-color:#fff;padding:2px}.cm-deep-research-segmented .ant-segmented-item{background-color:#fff}.cm-deep-research-segmented .ant-segmented-item:not(:last-child){margin-right:2px}.cm-deep-research-segmented .ant-segmented-item-selected{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item-selected .ant-segmented-item-label{color:#1784fc}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected) .ant-segmented-item-label{color:#333}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover{background-color:#018ae517}.cm-deep-research-segmented .ant-segmented-item:not(.ant-segmented-item-selected):hover .ant-segmented-item-label{color:#1784fc}.cm-markdown h1,.cm-markdown h2,.cm-markdown h3,.cm-markdown h4,.cm-markdown h5,.cm-markdown h6,.cm-markdown p,.cm-markdown ul,.cm-markdown ol{all:revert}.cm-markdown h1{margin-bottom:16px;font-size:24px;font-weight:600;line-height:32px}.cm-markdown h2{margin-top:24px;margin-bottom:8px;font-size:18px;font-weight:600;line-height:26px}.cm-markdown ol{margin-left:24px;list-style:decimal}.cm-markdown p{margin:4px 0;line-height:1.7}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),ue=require("react-i18next"),Ge=require("clsx"),oa=require("i18next"),Mt=require("@infinilabs/markdown"),j=require("lucide-react"),aa=require("ahooks"),la=require("@infinilabs/attachments"),Nn=require("antd"),ca=require("@infinilabs/search-results");function ua(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const _t=ua(g);var kt={exports:{}},rt={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */var Nn;function da(){if(Nn)return nt;Nn=1;var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,d){var u,h={},p=null,m=null;d!==void 0&&(p=""+d),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(h[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)h[u]===void 0&&(h[u]=c[u]);return{$$typeof:t,type:a,key:p,ref:m,props:h,_owner:r.current}}return nt.Fragment=s,nt.jsx=o,nt.jsxs=o,nt}var rt={};/**
10
+ */var Vn;function da(){if(Vn)return rt;Vn=1;var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,d){var u,h={},p=null,m=null;d!==void 0&&(p=""+d),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(h[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)h[u]===void 0&&(h[u]=c[u]);return{$$typeof:t,type:a,key:p,ref:m,props:h,_owner:r.current}}return rt.Fragment=s,rt.jsx=o,rt.jsxs=o,rt}var it={};/**
11
11
  * @license React
12
12
  * react-jsx-runtime.development.js
13
13
  *
@@ -15,22 +15,22 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var Vn;function ha(){return Vn||(Vn=1,process.env.NODE_ENV!=="production"&&(function(){var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,A="@@iterator";function C(f){if(f===null||typeof f!="object")return null;var w=b&&f[b]||f[A];return typeof w=="function"?w:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(f){{for(var w=arguments.length,k=new Array(w>1?w-1:0),N=1;N<w;N++)k[N-1]=arguments[N];x("error",f,k)}}function x(f,w,k){{var N=y.ReactDebugCurrentFrame,I=N.getStackAddendum();I!==""&&(w+="%s",k=k.concat([I]));var _=k.map(function(L){return String(L)});_.unshift("Warning: "+w),Function.prototype.apply.call(console[f],console,_)}}var R=!1,P=!1,M=!1,E=!1,S=!1,F;F=Symbol.for("react.module.reference");function U(f){return!!(typeof f=="string"||typeof f=="function"||f===n||f===i||S||f===r||f===d||f===u||E||f===m||R||P||M||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===o||f.$$typeof===a||f.$$typeof===c||f.$$typeof===F||f.getModuleId!==void 0))}function H(f,w,k){var N=f.displayName;if(N)return N;var I=w.displayName||w.name||"";return I!==""?k+"("+I+")":k}function X(f){return f.displayName||"Context"}function ae(f){if(f==null)return null;if(typeof f.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case n:return"Fragment";case s:return"Portal";case i:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case a:var w=f;return X(w)+".Consumer";case o:var k=f;return X(k._context)+".Provider";case c:return H(f,f.render,"ForwardRef");case h:var N=f.displayName||null;return N!==null?N:ae(f.type)||"Memo";case p:{var I=f,_=I._payload,L=I._init;try{return ae(L(_))}catch{return null}}}return null}var Z=Object.assign,ce=0,ee,B,O,q,G,ne,Fe;function wt(){}wt.__reactDisabledLog=!0;function Ae(){{if(ce===0){ee=console.log,B=console.info,O=console.warn,q=console.error,G=console.group,ne=console.groupCollapsed,Fe=console.groupEnd;var f={configurable:!0,enumerable:!0,value:wt,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}ce++}}function Ze(){{if(ce--,ce===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},f,{value:ee}),info:Z({},f,{value:B}),warn:Z({},f,{value:O}),error:Z({},f,{value:q}),group:Z({},f,{value:G}),groupCollapsed:Z({},f,{value:ne}),groupEnd:Z({},f,{value:Fe})})}ce<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $e=y.ReactCurrentDispatcher,et;function Le(f,w,k){{if(et===void 0)try{throw Error()}catch(I){var N=I.stack.trim().match(/\n( *(at )?)/);et=N&&N[1]||""}return`
19
- `+et+f}}var tt=!1,Be;{var V=typeof WeakMap=="function"?WeakMap:Map;Be=new V}function Ce(f,w){if(!f||tt)return"";{var k=Be.get(f);if(k!==void 0)return k}var N;tt=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _;_=$e.current,$e.current=null,Ae();try{if(w){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(le){N=le}Reflect.construct(f,[],L)}else{try{L.call()}catch(le){N=le}f.call(L.prototype)}}else{try{throw Error()}catch(le){N=le}f()}}catch(le){if(le&&N&&typeof le.stack=="string"){for(var D=le.stack.split(`
18
+ */var Mn;function ha(){return Mn||(Mn=1,process.env.NODE_ENV!=="production"&&(function(){var e=g,t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,A="@@iterator";function C(f){if(f===null||typeof f!="object")return null;var w=v&&f[v]||f[A];return typeof w=="function"?w:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(f){{for(var w=arguments.length,k=new Array(w>1?w-1:0),N=1;N<w;N++)k[N-1]=arguments[N];x("error",f,k)}}function x(f,w,k){{var N=y.ReactDebugCurrentFrame,I=N.getStackAddendum();I!==""&&(w+="%s",k=k.concat([I]));var U=k.map(function(L){return String(L)});U.unshift("Warning: "+w),Function.prototype.apply.call(console[f],console,U)}}var R=!1,P=!1,M=!1,E=!1,T=!1,D;D=Symbol.for("react.module.reference");function _(f){return!!(typeof f=="string"||typeof f=="function"||f===n||f===i||T||f===r||f===d||f===u||E||f===m||R||P||M||typeof f=="object"&&f!==null&&(f.$$typeof===p||f.$$typeof===h||f.$$typeof===o||f.$$typeof===a||f.$$typeof===c||f.$$typeof===D||f.getModuleId!==void 0))}function z(f,w,k){var N=f.displayName;if(N)return N;var I=w.displayName||w.name||"";return I!==""?k+"("+I+")":k}function X(f){return f.displayName||"Context"}function ae(f){if(f==null)return null;if(typeof f.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case n:return"Fragment";case s:return"Portal";case i:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case u:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case a:var w=f;return X(w)+".Consumer";case o:var k=f;return X(k._context)+".Provider";case c:return z(f,f.render,"ForwardRef");case h:var N=f.displayName||null;return N!==null?N:ae(f.type)||"Memo";case p:{var I=f,U=I._payload,L=I._init;try{return ae(L(U))}catch{return null}}}return null}var Z=Object.assign,ce=0,ee,B,O,q,J,se,Pe;function wt(){}wt.__reactDisabledLog=!0;function ye(){{if(ce===0){ee=console.log,B=console.info,O=console.warn,q=console.error,J=console.group,se=console.groupCollapsed,Pe=console.groupEnd;var f={configurable:!0,enumerable:!0,value:wt,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}ce++}}function et(){{if(ce--,ce===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},f,{value:ee}),info:Z({},f,{value:B}),warn:Z({},f,{value:O}),error:Z({},f,{value:q}),group:Z({},f,{value:J}),groupCollapsed:Z({},f,{value:se}),groupEnd:Z({},f,{value:Pe})})}ce<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tt=y.ReactCurrentDispatcher,je;function Be(f,w,k){{if(je===void 0)try{throw Error()}catch(I){var N=I.stack.trim().match(/\n( *(at )?)/);je=N&&N[1]||""}return`
19
+ `+je+f}}var st=!1,Oe;{var zt=typeof WeakMap=="function"?WeakMap:Map;Oe=new zt}function V(f,w){if(!f||st)return"";{var k=Oe.get(f);if(k!==void 0)return k}var N;st=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=tt.current,tt.current=null,ye();try{if(w){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(le){N=le}Reflect.construct(f,[],L)}else{try{L.call()}catch(le){N=le}f.call(L.prototype)}}else{try{throw Error()}catch(le){N=le}f()}}catch(le){if(le&&N&&typeof le.stack=="string"){for(var F=le.stack.split(`
20
20
  `),re=N.stack.split(`
21
- `),z=D.length-1,J=re.length-1;z>=1&&J>=0&&D[z]!==re[J];)J--;for(;z>=1&&J>=0;z--,J--)if(D[z]!==re[J]){if(z!==1||J!==1)do if(z--,J--,J<0||D[z]!==re[J]){var de=`
22
- `+D[z].replace(" at new "," at ");return f.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",f.displayName)),typeof f=="function"&&Be.set(f,de),de}while(z>=1&&J>=0);break}}}finally{tt=!1,$e.current=_,Ze(),Error.prepareStackTrace=I}var Ie=f?f.displayName||f.name:"",je=Ie?Le(Ie):"";return typeof f=="function"&&Be.set(f,je),je}function Lo(f,w,k){return Ce(f,!1)}function Bo(f){var w=f.prototype;return!!(w&&w.isReactComponent)}function At(f,w,k){if(f==null)return"";if(typeof f=="function")return Ce(f,Bo(f));if(typeof f=="string")return Le(f);switch(f){case d:return Le("Suspense");case u:return Le("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case c:return Lo(f.render);case h:return At(f.type,w,k);case p:{var N=f,I=N._payload,_=N._init;try{return At(_(I),w,k)}catch{}}}return""}var st=Object.prototype.hasOwnProperty,gn={},yn=y.ReactDebugCurrentFrame;function Ct(f){if(f){var w=f._owner,k=At(f.type,f._source,w?w.type:null);yn.setExtraStackFrame(k)}else yn.setExtraStackFrame(null)}function Oo(f,w,k,N,I){{var _=Function.call.bind(st);for(var L in f)if(_(f,L)){var D=void 0;try{if(typeof f[L]!="function"){var re=Error((N||"React class")+": "+k+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}D=f[L](w,L,N,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){D=z}D&&!(D instanceof Error)&&(Ct(I),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",N||"React class",k,L,typeof D),Ct(null)),D instanceof Error&&!(D.message in gn)&&(gn[D.message]=!0,Ct(I),v("Failed %s type: %s",k,D.message),Ct(null))}}}var Io=Array.isArray;function zt(f){return Io(f)}function _o(f){{var w=typeof Symbol=="function"&&Symbol.toStringTag,k=w&&f[Symbol.toStringTag]||f.constructor.name||"Object";return k}}function Uo(f){try{return xn(f),!1}catch{return!0}}function xn(f){return""+f}function vn(f){if(Uo(f))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_o(f)),xn(f)}var bn=y.ReactCurrentOwner,Wo={key:!0,ref:!0,__self:!0,__source:!0},wn,An;function qo(f){if(st.call(f,"ref")){var w=Object.getOwnPropertyDescriptor(f,"ref").get;if(w&&w.isReactWarning)return!1}return f.ref!==void 0}function Ko(f){if(st.call(f,"key")){var w=Object.getOwnPropertyDescriptor(f,"key").get;if(w&&w.isReactWarning)return!1}return f.key!==void 0}function Yo(f,w){typeof f.ref=="string"&&bn.current}function zo(f,w){{var k=function(){wn||(wn=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"key",{get:k,configurable:!0})}}function Go(f,w){{var k=function(){An||(An=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"ref",{get:k,configurable:!0})}}var Jo=function(f,w,k,N,I,_,L){var D={$$typeof:t,type:f,key:w,ref:k,props:L,_owner:_};return D._store={},Object.defineProperty(D._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(D,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(D,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(D.props),Object.freeze(D)),D};function Qo(f,w,k,N,I){{var _,L={},D=null,re=null;k!==void 0&&(vn(k),D=""+k),Ko(w)&&(vn(w.key),D=""+w.key),qo(w)&&(re=w.ref,Yo(w,I));for(_ in w)st.call(w,_)&&!Wo.hasOwnProperty(_)&&(L[_]=w[_]);if(f&&f.defaultProps){var z=f.defaultProps;for(_ in z)L[_]===void 0&&(L[_]=z[_])}if(D||re){var J=typeof f=="function"?f.displayName||f.name||"Unknown":f;D&&zo(L,J),re&&Go(L,J)}return Jo(f,D,re,I,N,bn.current,L)}}var Gt=y.ReactCurrentOwner,Cn=y.ReactDebugCurrentFrame;function Oe(f){if(f){var w=f._owner,k=At(f.type,f._source,w?w.type:null);Cn.setExtraStackFrame(k)}else Cn.setExtraStackFrame(null)}var Jt;Jt=!1;function Qt(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function kn(){{if(Gt.current){var f=ae(Gt.current.type);if(f)return`
21
+ `),G=F.length-1,Q=re.length-1;G>=1&&Q>=0&&F[G]!==re[Q];)Q--;for(;G>=1&&Q>=0;G--,Q--)if(F[G]!==re[Q]){if(G!==1||Q!==1)do if(G--,Q--,Q<0||F[G]!==re[Q]){var de=`
22
+ `+F[G].replace(" at new "," at ");return f.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",f.displayName)),typeof f=="function"&&Oe.set(f,de),de}while(G>=1&&Q>=0);break}}}finally{st=!1,tt.current=U,et(),Error.prepareStackTrace=I}var _e=f?f.displayName||f.name:"",Ne=_e?Be(_e):"";return typeof f=="function"&&Oe.set(f,Ne),Ne}function Re(f,w,k){return V(f,!1)}function Bo(f){var w=f.prototype;return!!(w&&w.isReactComponent)}function At(f,w,k){if(f==null)return"";if(typeof f=="function")return V(f,Bo(f));if(typeof f=="string")return Be(f);switch(f){case d:return Be("Suspense");case u:return Be("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case c:return Re(f.render);case h:return At(f.type,w,k);case p:{var N=f,I=N._payload,U=N._init;try{return At(U(I),w,k)}catch{}}}return""}var nt=Object.prototype.hasOwnProperty,yn={},xn=y.ReactDebugCurrentFrame;function Ct(f){if(f){var w=f._owner,k=At(f.type,f._source,w?w.type:null);xn.setExtraStackFrame(k)}else xn.setExtraStackFrame(null)}function Oo(f,w,k,N,I){{var U=Function.call.bind(nt);for(var L in f)if(U(f,L)){var F=void 0;try{if(typeof f[L]!="function"){var re=Error((N||"React class")+": "+k+" type `"+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[L]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}F=f[L](w,L,N,k,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){F=G}F&&!(F instanceof Error)&&(Ct(I),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",N||"React class",k,L,typeof F),Ct(null)),F instanceof Error&&!(F.message in yn)&&(yn[F.message]=!0,Ct(I),b("Failed %s type: %s",k,F.message),Ct(null))}}}var Io=Array.isArray;function Gt(f){return Io(f)}function _o(f){{var w=typeof Symbol=="function"&&Symbol.toStringTag,k=w&&f[Symbol.toStringTag]||f.constructor.name||"Object";return k}}function Uo(f){try{return vn(f),!1}catch{return!0}}function vn(f){return""+f}function bn(f){if(Uo(f))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",_o(f)),vn(f)}var wn=y.ReactCurrentOwner,Wo={key:!0,ref:!0,__self:!0,__source:!0},An,Cn;function qo(f){if(nt.call(f,"ref")){var w=Object.getOwnPropertyDescriptor(f,"ref").get;if(w&&w.isReactWarning)return!1}return f.ref!==void 0}function Ko(f){if(nt.call(f,"key")){var w=Object.getOwnPropertyDescriptor(f,"key").get;if(w&&w.isReactWarning)return!1}return f.key!==void 0}function Yo(f,w){typeof f.ref=="string"&&wn.current}function zo(f,w){{var k=function(){An||(An=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"key",{get:k,configurable:!0})}}function Go(f,w){{var k=function(){Cn||(Cn=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};k.isReactWarning=!0,Object.defineProperty(f,"ref",{get:k,configurable:!0})}}var Jo=function(f,w,k,N,I,U,L){var F={$$typeof:t,type:f,key:w,ref:k,props:L,_owner:U};return F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(F,"_self",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.defineProperty(F,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F};function Qo(f,w,k,N,I){{var U,L={},F=null,re=null;k!==void 0&&(bn(k),F=""+k),Ko(w)&&(bn(w.key),F=""+w.key),qo(w)&&(re=w.ref,Yo(w,I));for(U in w)nt.call(w,U)&&!Wo.hasOwnProperty(U)&&(L[U]=w[U]);if(f&&f.defaultProps){var G=f.defaultProps;for(U in G)L[U]===void 0&&(L[U]=G[U])}if(F||re){var Q=typeof f=="function"?f.displayName||f.name||"Unknown":f;F&&zo(L,Q),re&&Go(L,Q)}return Jo(f,F,re,I,N,wn.current,L)}}var Jt=y.ReactCurrentOwner,kn=y.ReactDebugCurrentFrame;function Ie(f){if(f){var w=f._owner,k=At(f.type,f._source,w?w.type:null);kn.setExtraStackFrame(k)}else kn.setExtraStackFrame(null)}var Qt;Qt=!1;function Ht(f){return typeof f=="object"&&f!==null&&f.$$typeof===t}function Tn(){{if(Jt.current){var f=ae(Jt.current.type);if(f)return`
23
23
 
24
- Check the render method of \``+f+"`."}return""}}function Ho(f){return""}var Tn={};function Xo(f){{var w=kn();if(!w){var k=typeof f=="string"?f:f.displayName||f.name;k&&(w=`
24
+ Check the render method of \``+f+"`."}return""}}function Ho(f){return""}var Sn={};function Xo(f){{var w=Tn();if(!w){var k=typeof f=="string"?f:f.displayName||f.name;k&&(w=`
25
25
 
26
- Check the top-level render call using <`+k+">.")}return w}}function Sn(f,w){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var k=Xo(w);if(Tn[k])return;Tn[k]=!0;var N="";f&&f._owner&&f._owner!==Gt.current&&(N=" It was passed a child from "+ae(f._owner.type)+"."),Oe(f),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,N),Oe(null)}}function En(f,w){{if(typeof f!="object")return;if(zt(f))for(var k=0;k<f.length;k++){var N=f[k];Qt(N)&&Sn(N,w)}else if(Qt(f))f._store&&(f._store.validated=!0);else if(f){var I=C(f);if(typeof I=="function"&&I!==f.entries)for(var _=I.call(f),L;!(L=_.next()).done;)Qt(L.value)&&Sn(L.value,w)}}}function Zo(f){{var w=f.type;if(w==null||typeof w=="string")return;var k;if(typeof w=="function")k=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===c||w.$$typeof===h))k=w.propTypes;else return;if(k){var N=ae(w);Oo(k,f.props,"prop",N,f)}else if(w.PropTypes!==void 0&&!Jt){Jt=!0;var I=ae(w);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $o(f){{for(var w=Object.keys(f.props),k=0;k<w.length;k++){var N=w[k];if(N!=="children"&&N!=="key"){Oe(f),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),Oe(null);break}}f.ref!==null&&(Oe(f),v("Invalid attribute `ref` supplied to `React.Fragment`."),Oe(null))}}var Pn={};function jn(f,w,k,N,I,_){{var L=U(f);if(!L){var D="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var re=Ho();re?D+=re:D+=kn();var z;f===null?z="null":zt(f)?z="array":f!==void 0&&f.$$typeof===t?(z="<"+(ae(f.type)||"Unknown")+" />",D=" Did you accidentally export a JSX literal instead of a component?"):z=typeof f,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,D)}var J=Qo(f,w,k,I,_);if(J==null)return J;if(L){var de=w.children;if(de!==void 0)if(N)if(zt(de)){for(var Ie=0;Ie<de.length;Ie++)En(de[Ie],f);Object.freeze&&Object.freeze(de)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else En(de,f)}if(st.call(w,"key")){var je=ae(f),le=Object.keys(w).filter(function(ia){return ia!=="key"}),Ht=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!Pn[je+Ht]){var ra=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+k+">.")}return w}}function En(f,w){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var k=Xo(w);if(Sn[k])return;Sn[k]=!0;var N="";f&&f._owner&&f._owner!==Jt.current&&(N=" It was passed a child from "+ae(f._owner.type)+"."),Ie(f),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',k,N),Ie(null)}}function Pn(f,w){{if(typeof f!="object")return;if(Gt(f))for(var k=0;k<f.length;k++){var N=f[k];Ht(N)&&En(N,w)}else if(Ht(f))f._store&&(f._store.validated=!0);else if(f){var I=C(f);if(typeof I=="function"&&I!==f.entries)for(var U=I.call(f),L;!(L=U.next()).done;)Ht(L.value)&&En(L.value,w)}}}function Zo(f){{var w=f.type;if(w==null||typeof w=="string")return;var k;if(typeof w=="function")k=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===c||w.$$typeof===h))k=w.propTypes;else return;if(k){var N=ae(w);Oo(k,f.props,"prop",N,f)}else if(w.PropTypes!==void 0&&!Qt){Qt=!0;var I=ae(w);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $o(f){{for(var w=Object.keys(f.props),k=0;k<w.length;k++){var N=w[k];if(N!=="children"&&N!=="key"){Ie(f),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",N),Ie(null);break}}f.ref!==null&&(Ie(f),b("Invalid attribute `ref` supplied to `React.Fragment`."),Ie(null))}}var jn={};function Rn(f,w,k,N,I,U){{var L=_(f);if(!L){var F="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(F+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var re=Ho();re?F+=re:F+=Tn();var G;f===null?G="null":Gt(f)?G="array":f!==void 0&&f.$$typeof===t?(G="<"+(ae(f.type)||"Unknown")+" />",F=" Did you accidentally export a JSX literal instead of a component?"):G=typeof f,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,F)}var Q=Qo(f,w,k,I,U);if(Q==null)return Q;if(L){var de=w.children;if(de!==void 0)if(N)if(Gt(de)){for(var _e=0;_e<de.length;_e++)Pn(de[_e],f);Object.freeze&&Object.freeze(de)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pn(de,f)}if(nt.call(w,"key")){var Ne=ae(f),le=Object.keys(w).filter(function(ia){return ia!=="key"}),Xt=le.length>0?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}";if(!jn[Ne+Xt]){var ra=le.length>0?"{"+le.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,Ht,je,ra,je),Pn[je+Ht]=!0}}return f===n?$o(J):Zo(J),J}}function ea(f,w,k){return jn(f,w,k,!0)}function ta(f,w,k){return jn(f,w,k,!1)}var sa=ta,na=ea;rt.Fragment=n,rt.jsx=sa,rt.jsxs=na})()),rt}var Mn;function fa(){return Mn||(Mn=1,process.env.NODE_ENV==="production"?kt.exports=da():kt.exports=ha()),kt.exports}var l=fa();const pa={en:{translation:{assistant:{message:{logo:"Coco AI Logo",aiName:"Coco AI",thinkingButton:"View thinking process",steps:{query_intent:"Understand the query",tools:"Call LLM Tools",source_zero:"Searching for relevant documents",fetch_source:"Retrieve {{count}} documents",pick_source:"Intelligent pick {{count}} results",pick_source_start:"Intelligently pre-selecting",deep_read:"Deep reading",think:"AI is thinking...",thoughtTime:"Thought for a few seconds",keywords:"Keywords",questionType:"Query Type",userIntent:"User Intent",relatedQuestions:"Query",suggestion:"Suggestion",informationSeeking:"Information Seeking"}}},deepResearch:{status:{completedWithCount:"Deep research completed · Found {{count}} related results",completed:"Deep research completed",running:"Deep research in progress",preparing:"Preparing deep research"},button:{view:"View",download:"Download",share:"Share"},tab:{report:"Research Report",steps:"Research Steps",searchResults:"Search Results"},report:{generatingTitle:"Generating research report",generatingDescription:"Running a complete research workflow based on your question and compiling a structured report. It will appear here once ready.",defaultTitle:"Research Report"},steps:{intro:"I will collect and analyze information related to this topic, including its definition, use cases, market landscape and common questions. If it refers to a specific domain, I will further study its concrete applications and impact in that domain, and then report the results to you.",planTitle:"Plan research steps",planDescription:"I am planning a research workflow around this topic.",generatedPlans:"Generated plans",executeTitle:"Execute research plans",searching:"Searching",searchTitle:"Search sources",optimizePlan:"Optimize research plan",reportTitle:"Generate research report"}},sessionFiles:{labels:{all:"All"},modal:{title:"Files in the conversation",description:"Only the selected files will participate in the current conversation."}}}},zh:{translation:{assistant:{message:{logo:"Coco AI 图标",aiName:"Coco AI",thinkingButton:"查看思考过程",steps:{query_intent:"理解查询",tools:"调用大模型工具",source_zero:"正在搜索相关文档",fetch_source:"检索 {{count}} 份文档",pick_source:"智能预选 {{count}} 个结果",pick_source_start:"正在智能预选",deep_read:"深度阅读",think:"AI 正在思考...",thoughtTime:"思考了数秒",keywords:"关键词",questionType:"查询类型",userIntent:"用户意图",relatedQuestions:"查询",suggestion:"建议",informationSeeking:"信息查询"}}},deepResearch:{status:{completedWithCount:"深度研究完成 · 找到 {{count}} 条相关结果",completed:"深度研究完成",running:"正在执行深度研究",preparing:"正在准备深度研究"},button:{view:"查看",download:"下载",share:"分享"},tab:{report:"研究报告",steps:"研究步骤",searchResults:"搜索结果"},report:{generatingTitle:"研究报告生成中",generatingDescription:"我正在根据你的问题执行完整的研究流程,整理结构化的研究报告。研究完成后,报告会自动展示在这里。",defaultTitle:"研究报告"},steps:{intro:"将为你整理与该主题相关的信息,包括其定义、用途、市场情况以及常见问题。如果是指特定领域的主题,我还会进一步深入研究其在该领域的具体应用和影响。完成后我会向你汇报结果。",planTitle:"规划研究计划",planDescription:"我正在针对该主题,进行规划研究计划",generatedPlans:"生成的计划",executeTitle:"执行研究计划",searching:"正在搜索",searchTitle:"搜索资料",optimizePlan:"优化研究计划",reportTitle:"生成研究报告"}},sessionFiles:{labels:{all:"全部"},modal:{title:"会话中的文件",description:"只有选定的文件才会参与当前会话。"}}}}},Xr=oa.createInstance();Xr.use(ue.initReactI18next).init({resources:pa,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ma="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='128px'%20height='128px'%20viewBox='0%200%20128%20128'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%203%3c/title%3e%3cdefs%3e%3crect%20id='path-1'%20x='0'%20y='0'%20width='56.7563872'%20height='56.5910836'%3e%3c/rect%3e%3c/defs%3e%3cg%20id='画板备份-3'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='编组-10'%20transform='translate(-5,%203)'%3e%3cpath%20d='M49.6992377,22.7719612%20C58.1101609,25.9729736%2065.0982993,25.8953017%2070.6636528,22.5389454%20C76.9251416,26.1589087%2083.1644474,26.6306437%2089.3815702,23.9541503%20C94.3476152,26.8551486%20100.059595,27.9853608%20106.517509,27.3447869%20C105.549313,31.0257953%20104.78819,34.4219965%20104.234139,37.5333904%20C81.4253389,37.5754718%2069.9035445,37.5822249%2069.6687554,37.5536499%20C69.4339664,37.5250748%2062.9957895,35.2408431%2050.3542249,30.7009547%20L49.6992377,22.7719612%20Z'%20id='路径-3'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(78.1084,%2030.055)%20rotate(8)%20translate(-78.1084,%20-30.055)'%3e%3c/path%3e%3cpolyline%20id='吸管'%20stroke='%2300DBFF'%20stroke-width='7.69374265'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(94.5873,%2044.3095)%20rotate(8)%20translate(-94.5873,%20-44.3095)'%20points='69.7189682%2082.7157791%2094.9436643%2013.1617143%20119.455672%205.90320063'%3e%3c/polyline%3e%3cpath%20d='M28.5919021,37.2052044%20C35.1462633,34.1433307%2041.4986116,29.0645287%2047.648947,21.9687984%20C52.2899688,28.8461867%2058.8106823,31.3991807%2067.2110875,29.6277804%20C71.408497,35.0913641%2080.5237233,36.438679%2086.7804548,32.5606249%20C94.0739201,34.0827033%2099.969508,32.0763696%20104.467218,26.5416241%20C107.701536,33.3599985%20112.68013,39.7771777%20119.403001,45.7931616%20L122.450975,53.5823748%20L114.651272,66.2383977%20L48.9468343,66.658491%20L20.2297176,54.2394236%20L28.5919021,37.2052044%20Z'%20id='路径-2'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(71.3403,%2044.3136)%20rotate(8)%20translate(-71.3403,%20-44.3136)'%3e%3c/path%3e%3cpath%20d='M113.7015,44.8147987%20C116.157193,49.6714382%20117.446928,55.630252%20117.446928,62.8127672%20C117.446928,77.2276123%20111.577947,90.2770579%20102.091381,99.7232825%20C92.5988687,109.175428%2079.4847008,115.020307%2065,115.020307%20C50.5152992,115.020307%2037.4011313,109.175428%2027.9086192,99.7232825%20C18.422053,90.2770579%2012.5530717,77.2276123%2012.5530717,62.8127672%20C12.5530717,56.4626483%2013.8289507,51.0821645%2016.1681126,46.5747014%20C17.316091,48.0863106%2018.6633413,49.4215856%2020.2147206,50.5328434%20C23.2818168,52.7298139%2027.1658894,54.0895553%2032.0119555,54.0895553%20C37.5035054,54.0895553%2042.5852688,52.6067922%2046.7606738,50.1072637%20C51.767509,52.6154402%2057.7465462,54.0895553%2064.1766873,54.0895553%20C70.5217766,54.0895553%2076.4277658,52.6542274%2081.3936205,50.2068646%20C85.4809466,52.6541473%2090.3819582,54.0895553%2095.6570631,54.0895553%20C101.044745,54.0895553%20105.465622,52.4873581%20108.935094,49.8692709%20C110.797344,48.4640036%20112.390496,46.7556533%20113.7015,44.8147987%20Z'%20id='形状结合'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%238C3201'%20transform='translate(65,%2077.9373)%20rotate(15)%20translate(-65,%20-77.9373)'%3e%3c/path%3e%3cg%20id='线'%20transform='translate(60.1411,%2097.2296)%20rotate(15)%20translate(-60.1411,%20-97.2296)translate(38.5104,%2076.2266)'%20fill='%235B1602'%3e%3cpath%20d='M41.2225105,-3.01584387%20C43.3464343,-2.96351324%2045.0257924,-1.19931046%2044.9734617,0.92461333%20C44.7662096,9.33627924%2043.0482281,16.8196882%2039.7969064,23.3391624%20C36.6036716,29.7421619%2032.6440639,35.1156647%2027.9160763,39.4350584%20C26.3475323,40.8680484%2023.9143082,40.7581602%2022.4813182,39.1896162%20C21.0483281,37.6210722%2021.1582163,35.1878481%2022.7267604,33.754858%20C26.7326835,30.0951278%2030.1283866,25.4868885%2032.9118625,19.9055277%20C35.6372515,14.4406416%2037.1015188,8.06239408%2037.2820533,0.73510735%20C37.3343839,-1.38881644%2039.0985867,-3.0681745%2041.2225105,-3.01584387%20Z'%20id='路径-5'%20fill-rule='nonzero'%20transform='translate(33.2246,%2018.7124)%20rotate(-7)%20translate(-33.2246,%20-18.7124)'%3e%3c/path%3e%3cpath%20d='M6.42487569,17.8933379%20C7.13185699,15.8898489%209.32912731,14.8388217%2011.3326163,15.545803%20C13.3361053,16.2527843%2014.3871325,18.4500547%2013.6801512,20.4535437%20C12.3896494,24.1106505%2011.1503014,26.9971555%209.93186972,29.1456361%20C8.855525,31.0435724%206.81922579,33.9549835%203.77060698,37.9798302%20C2.4878057,39.6734097%200.0749723254,40.0064113%20-1.61860721,38.72361%20C-3.31218674,37.4408088%20-3.64518832,35.0279754%20-2.36238705,33.3343959%20C0.49243929,29.5653978%202.37716504,26.8706998%203.23942508,25.3502625%20C4.20071135,23.6552106%205.27260735,21.1587099%206.42487569,17.8933379%20Z'%20id='路径-5备份'%20fill-rule='nonzero'%20transform='translate(5.3787,%2027.4149)%20scale(-1,%201)%20rotate(-5)%20translate(-5.3787,%20-27.4149)'%3e%3c/path%3e%3cpath%20d='M17.3200105,31.8134059%20C24.2042447,31.6746843%2030.788371,26.5487636%2037.0723895,16.4356439%20C43.356408,6.32252418%2040.2906703,13.3246347%2027.8751764,37.4419755%20L17.3200105,31.8134059%20Z'%20id='路径-8'%20transform='translate(28.78,%2024.6979)%20rotate(-15)%20translate(-28.78,%20-24.6979)'%3e%3c/path%3e%3cpath%20d='M2.25547257,26.2454347%20C5.78878997,32.5137001%2012.2314539,33.0051199%2021.5834643,27.7196939%20C18.6128112,31.1984141%2014.8144813,34.3358838%2010.1884745,37.1321031%20C6.83289255,33.8641134%204.51390502,31.3598101%203.23151188,29.6191934%20C1.94911874,27.8785768%201.6237723,26.7539905%202.25547257,26.2454347%20Z'%20id='路径-8'%20transform='translate(11.7631,%2031.6888)%20scale(-1,%201)%20rotate(-38)%20translate(-11.7631,%20-31.6888)'%3e%3c/path%3e%3c/g%3e%3cg%20id='花'%20transform='translate(16.0836,%200)'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cg%20id='蒙版'%3e%3c/g%3e%3cimage%20mask='url(%23mask-2)'%20x='-24.9033127'%20y='-24.2533216'%20width='105.404719'%20height='105.097727'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAtqADAAQAAAABAAAAtgAAAAD4KVXeAAA4v0lEQVR4Ae2dC9RmV1nfz3lv38zkMjNMLtwCmQQESbnItVyXAUUBQYI0IlCQVAIVhIKFhatcYqutKFJqFypBRxQKCMvWYlkgFCIWIbWphbJYQC4TApS7SSCQzMz3fe/p7/ff53wzCUkkrFJz5t175rx7n72f/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PZf8BXZsbEcCTnCj+d9z3LbmUe3tb/54bslxdP8inuoGCbT3b9e3z9onsYt4sRNDdxwFl4atpoWA4kxJtKdLcAEcvqAaNGfMCU/uTZq/ZUf+SSfe/cZt66HMI/3d92j/iEHyALTzx12ys4wMEIuyPJ1lEdbsCKYL8K+hnv/8uM81T6ig3hJTCdTfwxL46uXdbcHNO/gm4MMFlO9IaiOoNT2N5wcePdyXFwKI941GwRZTQHNg0lzMUtvjdp7Rfk8bJL4kcc1nmidQzC9Sq4dQqCuRWZ+2DoJeUON9FkC/nYH1W8ec2n7pcAtqCNlUd2MS8AXYq05Yvopz2S9CWe+IsYu0XDv2xJ52sBM6Ab3JJrmTPNI2MGXOX581L9915/83H5i58rJuJ0r54YD3VOqwE3PDl9f3U/6nj93bfuzG6l7jMuirGG5OAtd8uTtpc7N5MV9VfRJq8q6APEtuaswB7MR9ibQ/YZL328edenh38eb41rTvrwSqxr4F8uWPeJ6KprwXIN7NStsOTOkv8Hnu/be5U/MpVjTQ49VVCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJfC8S+L8Vg5EuY3PbmAAAAABJRU5ErkJggg=='%3e%3c/image%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";function Ut({size:e=18,children:t,className:s,title:n,onClick:r,action:i=!1,...o}){const a=c=>{r?.(c)};return l.jsx("i",{style:{width:e,height:e},title:n,onClick:a,className:dt("inline-flex items-center justify-center rounded-sm p-[2px] transition-all",{"cursor-pointer":i},s),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},...o,children:t})})}function ga(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"Understand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsxs("g",{id:"编组",transform:"translate(0.5, 0.5)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("path",{d:"M7.44444444,3 C9.89904333,3 11.8888889,4.95366655 11.8888889,7.36363636 C11.8888889,9.06711551 10.8946979,10.5426108 9.44492275,11.2613085 L9.44444444,12.2727273 C9.44444444,13.3772968 8.54901394,14.2727273 7.44444444,14.2727273 C6.33987494,14.2727273 5.44444444,13.3772968 5.44444444,12.2727273 L5.44396614,11.2613085 C3.99419095,10.5426108 3,9.06711551 3,7.36363636 C3,4.95366655 4.98984556,3 7.44444444,3 Z",id:"形状结合"}),l.jsx("line",{x1:"5.5",y1:"11.2156017",x2:"9.5",y2:"11.2156017",id:"路径-11"}),l.jsx("line",{x1:"7.44444444",y1:"10.6363636",x2:"7.44444444",y2:"8.45454545",id:"路径-12"}),l.jsx("line",{x1:"7.44444444",y1:"0.818181818",x2:"7.44444444",y2:"0.272727273",id:"路径-12备份"}),l.jsx("line",{x1:"12.352383",y1:"2.81770629",x2:"12.3574335",y2:"2.26720124",id:"路径-12备份",transform:"translate(12.3549, 2.5425) rotate(45) translate(-12.3549, -2.5425)"}),l.jsx("line",{x1:"14.3888889",y1:"7.64141414",x2:"14.3888889",y2:"7.08585859",id:"路径-12备份",transform:"translate(14.3889, 7.3636) rotate(90) translate(-14.3889, -7.3636)"}),l.jsx("line",{x1:"12.3574335",y1:"12.4600715",x2:"12.352383",y2:"11.9095664",id:"路径-12备份",transform:"translate(12.3549, 12.1848) rotate(135) translate(-12.3549, -12.1848)"}),l.jsx("line",{x1:"2.53145543",y1:"12.4600715",x2:"2.53650594",y2:"11.9095664",id:"路径-12备份",transform:"translate(2.534, 12.1848) rotate(225) translate(-2.534, -12.1848)"}),l.jsx("line",{x1:"0.5",y1:"7.64141414",x2:"0.5",y2:"7.08585859",id:"路径-12备份",transform:"translate(0.5, 7.3636) rotate(270) translate(-0.5, -7.3636)"}),l.jsx("line",{x1:"2.53650594",y1:"2.81770629",x2:"2.53145543",y2:"2.26720124",id:"路径-12备份",transform:"translate(2.534, 2.5425) rotate(315) translate(-2.534, -2.5425)"}),l.jsx("polyline",{id:"路径-15",transform:"translate(7.4398, 6.7308) rotate(-45) translate(-7.4398, -6.7308)",points:"6.33632897 5.60310185 6.3568375 7.83853192 8.5432888 7.85859111"})]})})})}const ya=({Detail:e,ChunkData:t,getSuggestion:s,loading:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(null);return g.useEffect(()=>{e?.payload&&(c(e?.payload),e?.payload?.suggestion&&s&&s(e?.payload?.suggestion))},[e?.payload,s]),g.useEffect(()=>{if(t?.message_chunk&&!n)try{const u=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(u){const p=u[u.length-1].replace(/<JSON>|<\/JSON>/g,""),m=JSON.parse(p);m?.suggestion&&s&&s(m?.suggestion),c(m)}}catch(d){console.error("Failed to process message chunk in QueryIntent:",d)}},[t?.message_chunk,n,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(d=>!d),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[n?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ga,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),i&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-2 text-xs",children:[a?.keyword?l.jsxs("div",{className:"flex gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.keywords"),":"]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:a?.keyword?.map((d,u)=>l.jsxs("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:[d,u<2&&"、"]},d+u))})]}):null,a?.category?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.questionType"),":"]}),l.jsx("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:a?.category})]}):null,a?.intent?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.userIntent"),":"]}),l.jsx("div",{className:"flex-1 text-[#333333] dark:text-[#D8D8D8]",children:a?.intent})]}):null,a?.query?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.relatedQuestions"),":"]}),l.jsx("div",{className:"flex-1 flex flex-col text-[#333333] dark:text-[#D8D8D8]",children:a?.query?.map((d,u)=>l.jsxs("span",{children:["- ",d]},d+u))})]}):null]})})})]})},xa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,o]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(j.Hammer,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2 cm-markdown",children:l.jsx(Mt,{content:o||""})})})]})},Zr=async e=>{navigator.clipboard?await navigator.clipboard.writeText(e):console.log("Clipboard not available",e)},va=e=>{window.open(e,"_blank")},$r=e=>{try{const t=new Date(e),s=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${s}-${n}-${r} ${i}:${o}:${a}`}catch(t){return console.error(t),String(e)}};function ba(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"Retrieve",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"10.8977456",y1:"14.5",x2:"14",y2:"10.9204757",id:"路径",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(12.4489, 12.7102) scale(-1, 1) translate(-12.4489, -12.7102)"}),l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(7.5, 7) scale(-1, 1) translate(-7.5, -7)",cx:"7.5",cy:"7",r:"5"})]})})}const wa=({Detail:e,ChunkData:t,loading:s,formatUrl:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(0),[d,u]=g.useState([]);g.useEffect(()=>{e?.payload&&(u(e?.payload),c(e?.payload.length))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const p=t.message_chunk.match(/<Payload total=(\d+)>/);p&&c(Number(p[1]));const m=t.message_chunk.match(/\[([\s\S]*)\]/);if(m){const b=JSON.parse(m[0]);u(b)}}catch(p){console.error("Failed to parse fetch source data:",p)}},[t?.message_chunk,s]);const h=p=>()=>{const m=n&&n(p)||p.url;m&&va(m)};return!t&&!e?null:l.jsxs("div",{className:`mt-2 mb-2 max-w-full w-full md:w-[610px] ${i?"rounded-lg overflow-hidden border border-[#E6E6E6] dark:border-[#272626]":""}`,children:[l.jsxs("button",{onClick:()=>o(p=>!p),className:`inline-flex justify-between items-center gap-2 px-2 py-1 rounded-xl transition-colors whitespace-nowrap ${i?"w-full":"border border-[#E6E6E6] dark:border-[#272626]"}`,children:[l.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[l.jsx(ba,{className:"w-4 h-4 text-[#38C200] shrink-0"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:Number(a)})})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999999]"})]}),i&&l.jsx(l.Fragment,{children:d?.map((p,m)=>l.jsx("div",{onClick:h(p),className:"group flex items-center p-2 hover:bg-[#F7F7F7] dark:hover:bg-[#2C2C2C] border-b border-[#E6E6E6] dark:border-[#272626] last:border-b-0 cursor-pointer transition-colors",children:l.jsxs("div",{className:"w-full flex items-center gap-2",children:[l.jsxs("div",{className:"w-[75%] mobile:w-full flex items-center gap-1",children:[l.jsx(j.Globe,{className:"w-3 h-3 shrink-0"}),l.jsx("div",{className:"text-xs text-[#333333] dark:text-[#D8D8D8] truncate font-normal group-hover:text-[#0072FF] dark:group-hover:text-[#0072FF]",children:p.title||p.category})]}),l.jsxs("div",{className:"flex-1 mobile:hidden flex items-center justify-end gap-2",children:[l.jsx("span",{className:"text-xs text-[#999999] dark:text-[#999999] truncate",children:p.source?.name||p?.category}),l.jsx(j.SquareArrowOutUpRight,{className:"w-3 h-3 text-[#999999] dark:text-[#999999] shrink-0"})]})]})},m))})]})};function Aa(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"selection",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{id:"编组",transform:"translate(1.4813, 1)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("line",{x1:"6.7986538",y1:"2.8",x2:"6.7986538",y2:"2.07241631e-17",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("circle",{id:"椭圆形",fill:"#000000",cx:"6.7986538",cy:"6.72",r:"1"}),l.jsx("line",{x1:"2.17440858e-17",y1:"13.5186538",x2:"4.62042688",y2:"8.89822692",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("line",{x1:"10.1008425",y1:"4.16781133",x2:"10.1008425",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 3.4178) rotate(45) translate(-10.1008, -3.4178)"}),l.jsx("line",{x1:"12.1186538",y1:"8.12",x2:"12.1186538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(12.1187, 6.72) rotate(90) translate(-12.1187, -6.72)"}),l.jsx("line",{x1:"10.1008425",y1:"10.7721887",x2:"10.1008425",y2:"9.27218867",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 10.0222) rotate(135) translate(-10.1008, -10.0222)"}),l.jsx("line",{x1:"6.7986538",y1:"13.44",x2:"6.7986538",y2:"10.64",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(6.7987, 12.04) rotate(180) translate(-6.7987, -12.04)"}),l.jsx("line",{x1:"1.4786538",y1:"8.12",x2:"1.4786538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(1.4787, 6.72) rotate(270) translate(-1.4787, -6.72)"}),l.jsx("line",{x1:"3.49646513",y1:"4.16781133",x2:"3.49646513",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(3.4965, 3.4178) rotate(315) translate(-3.4965, -3.4178)"})]})})})}const Ca=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]);return g.useEffect(()=>{e?.payload&&a(e?.payload)},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const d=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(d)for(let u=d.length-1;u>=0;u--)try{const h=d[u].replace(/<JSON>|<\/JSON>|<think>|<\/think>/g,""),p=JSON.parse(h.trim());if(Array.isArray(p)&&p.every(m=>m.id&&m.title&&m.explain)){a(p);break}}catch{continue}}catch(c){console.error("Failed to parse pick source data:",c)}},[t?.message_chunk,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n("assistant.message.steps.pick_source_start")})]}):l.jsxs(l.Fragment,{children:[l.jsx(Aa,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:o?.length})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsx("div",{className:"mb-4 space-y-3 text-xs",children:o?.map(c=>l.jsx("div",{className:"p-3 rounded-lg border border-[#E6E6E6] dark:border-[#272626] bg-white dark:bg-[#1E1E1E] hover:bg-gray-50 dark:hover:bg-[#2C2C2C] transition-colors",children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-[#333333] dark:text-[#D8D8D8]",children:c.title}),l.jsx("div",{className:"text-xs text-[#666666] dark:text-[#A3A3A3] line-clamp-2",children:c.explain})]})},c.id))})})})]})};function ka(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"deading",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"3",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-2",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-4",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"13",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-3",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"11",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-5",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"11",r:"1.375"}),l.jsx("path",{d:"M8.0070039,4.03345364 L8.0070039,8.50590493 L4.1923477,10.2855921",id:"路径-13",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"11.7924093",y1:"8.47550067",x2:"8",y2:"10.2754456",id:"路径-13备份",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(9.8962, 9.3755) scale(-1, 1) translate(-9.8962, -9.3755)"}),l.jsx("path",{d:"M4.17568738,4.53038288 L6.65384701,3.54050563 M9.35480875,3.53987819 L11.7283558,4.49062879",id:"形状",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"3",y1:"6.06946104",x2:"3",y2:"9.97988046",id:"路径-14",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"13",y1:"6.06946104",x2:"13",y2:"9.97988046",id:"路径-14备份",stroke:"currentColor",strokeWidth:"1.25"})]})})}const Ta=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]),[c,d]=g.useState("");return g.useEffect(()=>{e?.description&&d(e?.description)},[e?.description]),g.useEffect(()=>{if(t?.message_chunk)try{if(t.message_chunk.includes("&")){const u=t.message_chunk.split("&").filter(Boolean);a(u)}else a([t.message_chunk])}catch(u){console.error("Failed to parse query data:",u)}},[t?.message_chunk]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ka,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`,{count:Number(o.length)})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-3 text-xs",children:[o?.map(u=>l.jsx("div",{className:"flex flex-col gap-2",children:l.jsxs("div",{className:"text-xs text-[#999999] dark:text-[#808080]",children:["- ",u]})},u)),c?.split(`
31
+ <%s key={someKey} {...props} />`,Xt,Ne,ra,Ne),jn[Ne+Xt]=!0}}return f===n?$o(Q):Zo(Q),Q}}function ea(f,w,k){return Rn(f,w,k,!0)}function ta(f,w,k){return Rn(f,w,k,!1)}var sa=ta,na=ea;it.Fragment=n,it.jsx=sa,it.jsxs=na})()),it}var Dn;function fa(){return Dn||(Dn=1,process.env.NODE_ENV==="production"?kt.exports=da():kt.exports=ha()),kt.exports}var l=fa();const pa={en:{translation:{assistant:{message:{logo:"Coco AI Logo",aiName:"Coco AI",thinkingButton:"View thinking process",steps:{query_intent:"Understand the query",tools:"Call LLM Tools",source_zero:"Searching for relevant documents",fetch_source:"Retrieve {{count}} documents",pick_source:"Intelligent pick {{count}} results",pick_source_start:"Intelligently pre-selecting",deep_read:"Deep reading",think:"AI is thinking...",thoughtTime:"Thought for a few seconds",keywords:"Keywords",questionType:"Query Type",userIntent:"User Intent",relatedQuestions:"Query",suggestion:"Suggestion",informationSeeking:"Information Seeking"}}},deepResearch:{status:{completedWithCount:"Deep research completed · Found {{count}} related results",completed:"Deep research completed",running:"Deep research in progress",preparing:"Preparing deep research"},button:{view:"View",download:"Download",share:"Share"},tab:{report:"Research Report",steps:"Research Steps",searchResults:"Search Results"},report:{generatingTitle:"Generating research report",generatingDescription:"Running a complete research workflow based on your question and compiling a structured report. It will appear here once ready.",defaultTitle:"Research Report"},steps:{intro:"I will collect and analyze information related to this topic, including its definition, use cases, market landscape and common questions. If it refers to a specific domain, I will further study its concrete applications and impact in that domain, and then report the results to you.",planTitle:"Plan research steps",planDescription:"I am planning a research workflow around this topic.",generatedPlans:"Generated plans",executeTitle:"Execute research plans",searching:"Searching",searchTitle:"Search sources",optimizePlan:"Optimize research plan",reportTitle:"Generate research report"}},sessionFiles:{labels:{all:"All"},modal:{title:"Files in the conversation",description:"Only the selected files will participate in the current conversation."}}}},zh:{translation:{assistant:{message:{logo:"Coco AI 图标",aiName:"Coco AI",thinkingButton:"查看思考过程",steps:{query_intent:"理解查询",tools:"调用大模型工具",source_zero:"正在搜索相关文档",fetch_source:"检索 {{count}} 份文档",pick_source:"智能预选 {{count}} 个结果",pick_source_start:"正在智能预选",deep_read:"深度阅读",think:"AI 正在思考...",thoughtTime:"思考了数秒",keywords:"关键词",questionType:"查询类型",userIntent:"用户意图",relatedQuestions:"查询",suggestion:"建议",informationSeeking:"信息查询"}}},deepResearch:{status:{completedWithCount:"深度研究完成 · 找到 {{count}} 条相关结果",completed:"深度研究完成",running:"正在执行深度研究",preparing:"正在准备深度研究"},button:{view:"查看",download:"下载",share:"分享"},tab:{report:"研究报告",steps:"研究步骤",searchResults:"搜索结果"},report:{generatingTitle:"研究报告生成中",generatingDescription:"我正在根据你的问题执行完整的研究流程,整理结构化的研究报告。研究完成后,报告会自动展示在这里。",defaultTitle:"研究报告"},steps:{intro:"将为你整理与该主题相关的信息,包括其定义、用途、市场情况以及常见问题。如果是指特定领域的主题,我还会进一步深入研究其在该领域的具体应用和影响。完成后我会向你汇报结果。",planTitle:"规划研究计划",planDescription:"我正在针对该主题,进行规划研究计划",generatedPlans:"生成的计划",executeTitle:"执行研究计划",searching:"正在搜索",searchTitle:"搜索资料",optimizePlan:"优化研究计划",reportTitle:"生成研究报告"}},sessionFiles:{labels:{all:"全部"},modal:{title:"会话中的文件",description:"只有选定的文件才会参与当前会话。"}}}}},Zr=oa.createInstance();Zr.use(ue.initReactI18next).init({resources:pa,lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ma="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='128px'%20height='128px'%20viewBox='0%200%20128%20128'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%203%3c/title%3e%3cdefs%3e%3crect%20id='path-1'%20x='0'%20y='0'%20width='56.7563872'%20height='56.5910836'%3e%3c/rect%3e%3c/defs%3e%3cg%20id='画板备份-3'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='编组-10'%20transform='translate(-5,%203)'%3e%3cpath%20d='M49.6992377,22.7719612%20C58.1101609,25.9729736%2065.0982993,25.8953017%2070.6636528,22.5389454%20C76.9251416,26.1589087%2083.1644474,26.6306437%2089.3815702,23.9541503%20C94.3476152,26.8551486%20100.059595,27.9853608%20106.517509,27.3447869%20C105.549313,31.0257953%20104.78819,34.4219965%20104.234139,37.5333904%20C81.4253389,37.5754718%2069.9035445,37.5822249%2069.6687554,37.5536499%20C69.4339664,37.5250748%2062.9957895,35.2408431%2050.3542249,30.7009547%20L49.6992377,22.7719612%20Z'%20id='路径-3'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(78.1084,%2030.055)%20rotate(8)%20translate(-78.1084,%20-30.055)'%3e%3c/path%3e%3cpolyline%20id='吸管'%20stroke='%2300DBFF'%20stroke-width='7.69374265'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(94.5873,%2044.3095)%20rotate(8)%20translate(-94.5873,%20-44.3095)'%20points='69.7189682%2082.7157791%2094.9436643%2013.1617143%20119.455672%205.90320063'%3e%3c/polyline%3e%3cpath%20d='M28.5919021,37.2052044%20C35.1462633,34.1433307%2041.4986116,29.0645287%2047.648947,21.9687984%20C52.2899688,28.8461867%2058.8106823,31.3991807%2067.2110875,29.6277804%20C71.408497,35.0913641%2080.5237233,36.438679%2086.7804548,32.5606249%20C94.0739201,34.0827033%2099.969508,32.0763696%20104.467218,26.5416241%20C107.701536,33.3599985%20112.68013,39.7771777%20119.403001,45.7931616%20L122.450975,53.5823748%20L114.651272,66.2383977%20L48.9468343,66.658491%20L20.2297176,54.2394236%20L28.5919021,37.2052044%20Z'%20id='路径-2'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%23FFFFFF'%20stroke-linejoin='round'%20transform='translate(71.3403,%2044.3136)%20rotate(8)%20translate(-71.3403,%20-44.3136)'%3e%3c/path%3e%3cpath%20d='M113.7015,44.8147987%20C116.157193,49.6714382%20117.446928,55.630252%20117.446928,62.8127672%20C117.446928,77.2276123%20111.577947,90.2770579%20102.091381,99.7232825%20C92.5988687,109.175428%2079.4847008,115.020307%2065,115.020307%20C50.5152992,115.020307%2037.4011313,109.175428%2027.9086192,99.7232825%20C18.422053,90.2770579%2012.5530717,77.2276123%2012.5530717,62.8127672%20C12.5530717,56.4626483%2013.8289507,51.0821645%2016.1681126,46.5747014%20C17.316091,48.0863106%2018.6633413,49.4215856%2020.2147206,50.5328434%20C23.2818168,52.7298139%2027.1658894,54.0895553%2032.0119555,54.0895553%20C37.5035054,54.0895553%2042.5852688,52.6067922%2046.7606738,50.1072637%20C51.767509,52.6154402%2057.7465462,54.0895553%2064.1766873,54.0895553%20C70.5217766,54.0895553%2076.4277658,52.6542274%2081.3936205,50.2068646%20C85.4809466,52.6541473%2090.3819582,54.0895553%2095.6570631,54.0895553%20C101.044745,54.0895553%20105.465622,52.4873581%20108.935094,49.8692709%20C110.797344,48.4640036%20112.390496,46.7556533%20113.7015,44.8147987%20Z'%20id='形状结合'%20stroke='%235B1602'%20stroke-width='7.69374265'%20fill='%238C3201'%20transform='translate(65,%2077.9373)%20rotate(15)%20translate(-65,%20-77.9373)'%3e%3c/path%3e%3cg%20id='线'%20transform='translate(60.1411,%2097.2296)%20rotate(15)%20translate(-60.1411,%20-97.2296)translate(38.5104,%2076.2266)'%20fill='%235B1602'%3e%3cpath%20d='M41.2225105,-3.01584387%20C43.3464343,-2.96351324%2045.0257924,-1.19931046%2044.9734617,0.92461333%20C44.7662096,9.33627924%2043.0482281,16.8196882%2039.7969064,23.3391624%20C36.6036716,29.7421619%2032.6440639,35.1156647%2027.9160763,39.4350584%20C26.3475323,40.8680484%2023.9143082,40.7581602%2022.4813182,39.1896162%20C21.0483281,37.6210722%2021.1582163,35.1878481%2022.7267604,33.754858%20C26.7326835,30.0951278%2030.1283866,25.4868885%2032.9118625,19.9055277%20C35.6372515,14.4406416%2037.1015188,8.06239408%2037.2820533,0.73510735%20C37.3343839,-1.38881644%2039.0985867,-3.0681745%2041.2225105,-3.01584387%20Z'%20id='路径-5'%20fill-rule='nonzero'%20transform='translate(33.2246,%2018.7124)%20rotate(-7)%20translate(-33.2246,%20-18.7124)'%3e%3c/path%3e%3cpath%20d='M6.42487569,17.8933379%20C7.13185699,15.8898489%209.32912731,14.8388217%2011.3326163,15.545803%20C13.3361053,16.2527843%2014.3871325,18.4500547%2013.6801512,20.4535437%20C12.3896494,24.1106505%2011.1503014,26.9971555%209.93186972,29.1456361%20C8.855525,31.0435724%206.81922579,33.9549835%203.77060698,37.9798302%20C2.4878057,39.6734097%200.0749723254,40.0064113%20-1.61860721,38.72361%20C-3.31218674,37.4408088%20-3.64518832,35.0279754%20-2.36238705,33.3343959%20C0.49243929,29.5653978%202.37716504,26.8706998%203.23942508,25.3502625%20C4.20071135,23.6552106%205.27260735,21.1587099%206.42487569,17.8933379%20Z'%20id='路径-5备份'%20fill-rule='nonzero'%20transform='translate(5.3787,%2027.4149)%20scale(-1,%201)%20rotate(-5)%20translate(-5.3787,%20-27.4149)'%3e%3c/path%3e%3cpath%20d='M17.3200105,31.8134059%20C24.2042447,31.6746843%2030.788371,26.5487636%2037.0723895,16.4356439%20C43.356408,6.32252418%2040.2906703,13.3246347%2027.8751764,37.4419755%20L17.3200105,31.8134059%20Z'%20id='路径-8'%20transform='translate(28.78,%2024.6979)%20rotate(-15)%20translate(-28.78,%20-24.6979)'%3e%3c/path%3e%3cpath%20d='M2.25547257,26.2454347%20C5.78878997,32.5137001%2012.2314539,33.0051199%2021.5834643,27.7196939%20C18.6128112,31.1984141%2014.8144813,34.3358838%2010.1884745,37.1321031%20C6.83289255,33.8641134%204.51390502,31.3598101%203.23151188,29.6191934%20C1.94911874,27.8785768%201.6237723,26.7539905%202.25547257,26.2454347%20Z'%20id='路径-8'%20transform='translate(11.7631,%2031.6888)%20scale(-1,%201)%20rotate(-38)%20translate(-11.7631,%20-31.6888)'%3e%3c/path%3e%3c/g%3e%3cg%20id='花'%20transform='translate(16.0836,%200)'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cg%20id='蒙版'%3e%3c/g%3e%3cimage%20mask='url(%23mask-2)'%20x='-24.9033127'%20y='-24.2533216'%20width='105.404719'%20height='105.097727'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAC2CAYAAAB08HcEAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAtqADAAQAAAABAAAAtgAAAAD4KVXeAAA4v0lEQVR4Ae2dC9RmV1nfz3lv38zkMjNMLtwCmQQESbnItVyXAUUBQYI0IlCQVAIVhIKFhatcYqutKFJqFypBRxQKCMvWYlkgFCIWIbWphbJYQC4TApS7SSCQzMz3fe/p7/ff53wzCUkkrFJz5t175rx7n72f/ey9n/3fz3n25ZyvaaqrEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEqgSqBKoEq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p7Rfk8bJL4kcc1nmidQzC9Sq4dQqCuRWZ+2DoJeUON9FkC/nYH1W8ec2n7pcAtqCNlUd2MS8AXYq05Yvopz2S9CWe+IsYu0XDv2xJ52sBM6Ab3JJrmTPNI2MGXOX581L9915/83H5i58rJuJ0r54YD3VOqwE3PDl9f3U/6nj93bfuzG6l7jMuirGG5OAtd8uTtpc7N5MV9VfRJq8q6APEtuaswB7MR9ibQ/YZL328edenh38eb41rTvrwSqxr4F8uWPeJ6KprwXIN7NStsOTOkv8Hnu/be5U/MpVjTQ49VVCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJVAlUCVQJfC8S+L8Vg5EuY3PbmAAAAABJRU5ErkJggg=='%3e%3c/image%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";function Ut({size:e=18,children:t,className:s,title:n,onClick:r,action:i=!1,...o}){const a=c=>{r?.(c)};return l.jsx("i",{style:{width:e,height:e},title:n,onClick:a,className:Ge("inline-flex items-center justify-center rounded-sm p-[2px] transition-all",{"cursor-pointer":i},s),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},...o,children:t})})}function ga(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"Understand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsxs("g",{id:"编组",transform:"translate(0.5, 0.5)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("path",{d:"M7.44444444,3 C9.89904333,3 11.8888889,4.95366655 11.8888889,7.36363636 C11.8888889,9.06711551 10.8946979,10.5426108 9.44492275,11.2613085 L9.44444444,12.2727273 C9.44444444,13.3772968 8.54901394,14.2727273 7.44444444,14.2727273 C6.33987494,14.2727273 5.44444444,13.3772968 5.44444444,12.2727273 L5.44396614,11.2613085 C3.99419095,10.5426108 3,9.06711551 3,7.36363636 C3,4.95366655 4.98984556,3 7.44444444,3 Z",id:"形状结合"}),l.jsx("line",{x1:"5.5",y1:"11.2156017",x2:"9.5",y2:"11.2156017",id:"路径-11"}),l.jsx("line",{x1:"7.44444444",y1:"10.6363636",x2:"7.44444444",y2:"8.45454545",id:"路径-12"}),l.jsx("line",{x1:"7.44444444",y1:"0.818181818",x2:"7.44444444",y2:"0.272727273",id:"路径-12备份"}),l.jsx("line",{x1:"12.352383",y1:"2.81770629",x2:"12.3574335",y2:"2.26720124",id:"路径-12备份",transform:"translate(12.3549, 2.5425) rotate(45) translate(-12.3549, -2.5425)"}),l.jsx("line",{x1:"14.3888889",y1:"7.64141414",x2:"14.3888889",y2:"7.08585859",id:"路径-12备份",transform:"translate(14.3889, 7.3636) rotate(90) translate(-14.3889, -7.3636)"}),l.jsx("line",{x1:"12.3574335",y1:"12.4600715",x2:"12.352383",y2:"11.9095664",id:"路径-12备份",transform:"translate(12.3549, 12.1848) rotate(135) translate(-12.3549, -12.1848)"}),l.jsx("line",{x1:"2.53145543",y1:"12.4600715",x2:"2.53650594",y2:"11.9095664",id:"路径-12备份",transform:"translate(2.534, 12.1848) rotate(225) translate(-2.534, -12.1848)"}),l.jsx("line",{x1:"0.5",y1:"7.64141414",x2:"0.5",y2:"7.08585859",id:"路径-12备份",transform:"translate(0.5, 7.3636) rotate(270) translate(-0.5, -7.3636)"}),l.jsx("line",{x1:"2.53650594",y1:"2.81770629",x2:"2.53145543",y2:"2.26720124",id:"路径-12备份",transform:"translate(2.534, 2.5425) rotate(315) translate(-2.534, -2.5425)"}),l.jsx("polyline",{id:"路径-15",transform:"translate(7.4398, 6.7308) rotate(-45) translate(-7.4398, -6.7308)",points:"6.33632897 5.60310185 6.3568375 7.83853192 8.5432888 7.85859111"})]})})})}const ya=({Detail:e,ChunkData:t,getSuggestion:s,loading:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(null),d=g.useRef(s);return g.useEffect(()=>{d.current=s},[s]),g.useEffect(()=>{e?.payload&&(c(e?.payload),e?.payload?.suggestion&&d.current&&d.current(e?.payload?.suggestion))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!n)try{const h=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(h){const m=h[h.length-1].replace(/<JSON>|<\/JSON>/g,""),v=JSON.parse(m);v?.suggestion&&d.current&&d.current(v?.suggestion),c(v)}}catch(u){console.error("Failed to process message chunk in QueryIntent:",u)}},[t?.message_chunk,n]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>o(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[n?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ga,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`)})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),i&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-2 text-xs",children:[a?.keyword?l.jsxs("div",{className:"flex gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.keywords"),":"]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:a?.keyword?.map((u,h)=>l.jsxs("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:[u,h<2&&"、"]},u+h))})]}):null,a?.category?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.questionType"),":"]}),l.jsx("span",{className:"text-[#333333] dark:text-[#D8D8D8]",children:a?.category})]}):null,a?.intent?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.userIntent"),":"]}),l.jsx("div",{className:"flex-1 text-[#333333] dark:text-[#D8D8D8]",children:a?.intent})]}):null,a?.query?l.jsxs("div",{className:"flex items-start gap-1",children:[l.jsxs("span",{className:"text-[#999999]",children:["- ",r("assistant.message.steps.relatedQuestions"),":"]}),l.jsx("div",{className:"flex-1 flex flex-col text-[#333333] dark:text-[#D8D8D8]",children:a?.query?.map((u,h)=>l.jsxs("span",{children:["- ",u]},u+h))})]}):null]})})})]})},xa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,o]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(j.Hammer,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2 cm-markdown",children:l.jsx(Mt,{content:o||""})})})]})},$r=async e=>{navigator.clipboard?await navigator.clipboard.writeText(e):console.log("Clipboard not available",e)},va=e=>{window.open(e,"_blank")},ei=e=>{try{const t=new Date(e),s=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return`${s}-${n}-${r} ${i}:${o}:${a}`}catch(t){return console.error(t),String(e)}};function ba(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"Retrieve",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"10.8977456",y1:"14.5",x2:"14",y2:"10.9204757",id:"路径",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(12.4489, 12.7102) scale(-1, 1) translate(-12.4489, -12.7102)"}),l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(7.5, 7) scale(-1, 1) translate(-7.5, -7)",cx:"7.5",cy:"7",r:"5"})]})})}const wa=({Detail:e,ChunkData:t,loading:s,formatUrl:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(0),[d,u]=g.useState([]);g.useEffect(()=>{e?.payload&&(u(e?.payload),c(e?.payload.length))},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const p=t.message_chunk.match(/<Payload total=(\d+)>/);p&&c(Number(p[1]));const m=t.message_chunk.match(/\[([\s\S]*)\]/);if(m){const v=JSON.parse(m[0]);u(v)}}catch(p){console.error("Failed to parse fetch source data:",p)}},[t?.message_chunk,s]);const h=p=>()=>{const m=n&&n(p)||p.url;m&&va(m)};return!t&&!e?null:l.jsxs("div",{className:`mt-2 mb-2 max-w-full w-full md:w-[610px] ${i?"rounded-lg overflow-hidden border border-[#E6E6E6] dark:border-[#272626]":""}`,children:[l.jsxs("button",{onClick:()=>o(p=>!p),className:`inline-flex justify-between items-center gap-2 px-2 py-1 rounded-xl transition-colors whitespace-nowrap ${i?"w-full":"border border-[#E6E6E6] dark:border-[#272626]"}`,children:[l.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[l.jsx(ba,{className:"w-4 h-4 text-[#38C200] shrink-0"}),l.jsx("span",{className:"text-xs text-[#999999]",children:r(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:Number(a)})})]}),i?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999999]"})]}),i&&l.jsx(l.Fragment,{children:d?.map((p,m)=>l.jsx("div",{onClick:h(p),className:"group flex items-center p-2 hover:bg-[#F7F7F7] dark:hover:bg-[#2C2C2C] border-b border-[#E6E6E6] dark:border-[#272626] last:border-b-0 cursor-pointer transition-colors",children:l.jsxs("div",{className:"w-full flex items-center gap-2",children:[l.jsxs("div",{className:"w-[75%] mobile:w-full flex items-center gap-1",children:[l.jsx(j.Globe,{className:"w-3 h-3 shrink-0"}),l.jsx("div",{className:"text-xs text-[#333333] dark:text-[#D8D8D8] truncate font-normal group-hover:text-[#0072FF] dark:group-hover:text-[#0072FF]",children:p.title||p.category})]}),l.jsxs("div",{className:"flex-1 mobile:hidden flex items-center justify-end gap-2",children:[l.jsx("span",{className:"text-xs text-[#999999] dark:text-[#999999] truncate",children:p.source?.name||p?.category}),l.jsx(j.SquareArrowOutUpRight,{className:"w-3 h-3 text-[#999999] dark:text-[#999999] shrink-0"})]})]})},m))})]})};function Aa(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsx("g",{id:"selection",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:l.jsxs("g",{id:"编组",transform:"translate(1.4813, 1)",stroke:"currentColor",strokeWidth:"1.25",children:[l.jsx("line",{x1:"6.7986538",y1:"2.8",x2:"6.7986538",y2:"2.07241631e-17",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("circle",{id:"椭圆形",fill:"#000000",cx:"6.7986538",cy:"6.72",r:"1"}),l.jsx("line",{x1:"2.17440858e-17",y1:"13.5186538",x2:"4.62042688",y2:"8.89822692",id:"路径",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("line",{x1:"10.1008425",y1:"4.16781133",x2:"10.1008425",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 3.4178) rotate(45) translate(-10.1008, -3.4178)"}),l.jsx("line",{x1:"12.1186538",y1:"8.12",x2:"12.1186538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(12.1187, 6.72) rotate(90) translate(-12.1187, -6.72)"}),l.jsx("line",{x1:"10.1008425",y1:"10.7721887",x2:"10.1008425",y2:"9.27218867",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(10.1008, 10.0222) rotate(135) translate(-10.1008, -10.0222)"}),l.jsx("line",{x1:"6.7986538",y1:"13.44",x2:"6.7986538",y2:"10.64",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(6.7987, 12.04) rotate(180) translate(-6.7987, -12.04)"}),l.jsx("line",{x1:"1.4786538",y1:"8.12",x2:"1.4786538",y2:"5.32",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(1.4787, 6.72) rotate(270) translate(-1.4787, -6.72)"}),l.jsx("line",{x1:"3.49646513",y1:"4.16781133",x2:"3.49646513",y2:"2.66781133",id:"路径",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(3.4965, 3.4178) rotate(315) translate(-3.4965, -3.4178)"})]})})})}const Ca=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]);return g.useEffect(()=>{e?.payload&&a(e?.payload)},[e?.payload]),g.useEffect(()=>{if(t?.message_chunk&&!s)try{const d=t.message_chunk.replace(/^"|"$/g,"").match(/<JSON>([\s\S]*?)<\/JSON>/g);if(d)for(let u=d.length-1;u>=0;u--)try{const h=d[u].replace(/<JSON>|<\/JSON>|<think>|<\/think>/g,""),p=JSON.parse(h.trim());if(Array.isArray(p)&&p.every(m=>m.id&&m.title&&m.explain)){a(p);break}}catch{continue}}catch(c){console.error("Failed to parse pick source data:",c)}},[t?.message_chunk,s]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n("assistant.message.steps.pick_source_start")})]}):l.jsxs(l.Fragment,{children:[l.jsx(Aa,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e.type}`,{count:o?.length})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsx("div",{className:"mb-4 space-y-3 text-xs",children:o?.map(c=>l.jsx("div",{className:"p-3 rounded-lg border border-[#E6E6E6] dark:border-[#272626] bg-white dark:bg-[#1E1E1E] hover:bg-gray-50 dark:hover:bg-[#2C2C2C] transition-colors",children:l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("div",{className:"text-sm font-medium text-[#333333] dark:text-[#D8D8D8]",children:c.title}),l.jsx("div",{className:"text-xs text-[#666666] dark:text-[#A3A3A3] line-clamp-2",children:c.explain})]})},c.id))})})})]})};function ka(e){return l.jsx(Ut,{...e,viewBox:"0 0 16 16",children:l.jsxs("g",{id:"deading",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[l.jsx("circle",{id:"椭圆形",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"3",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-2",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-4",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"5",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份",stroke:"currentColor",strokeWidth:"1.25",cx:"8",cy:"13",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-3",stroke:"currentColor",strokeWidth:"1.25",cx:"3",cy:"11",r:"1.375"}),l.jsx("circle",{id:"椭圆形备份-5",stroke:"currentColor",strokeWidth:"1.25",cx:"13",cy:"11",r:"1.375"}),l.jsx("path",{d:"M8.0070039,4.03345364 L8.0070039,8.50590493 L4.1923477,10.2855921",id:"路径-13",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"11.7924093",y1:"8.47550067",x2:"8",y2:"10.2754456",id:"路径-13备份",stroke:"currentColor",strokeWidth:"1.25",transform:"translate(9.8962, 9.3755) scale(-1, 1) translate(-9.8962, -9.3755)"}),l.jsx("path",{d:"M4.17568738,4.53038288 L6.65384701,3.54050563 M9.35480875,3.53987819 L11.7283558,4.49062879",id:"形状",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"3",y1:"6.06946104",x2:"3",y2:"9.97988046",id:"路径-14",stroke:"currentColor",strokeWidth:"1.25"}),l.jsx("line",{x1:"13",y1:"6.06946104",x2:"13",y2:"9.97988046",id:"路径-14备份",stroke:"currentColor",strokeWidth:"1.25"})]})})}const Ta=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!1),[o,a]=g.useState([]),[c,d]=g.useState("");return g.useEffect(()=>{e?.description&&d(e?.description)},[e?.description]),g.useEffect(()=>{if(t?.message_chunk)try{if(t.message_chunk.includes("&")){const u=t.message_chunk.split("&").filter(Boolean);a(u)}else a([t.message_chunk])}catch(u){console.error("Failed to parse query data:",u)}},[t?.message_chunk]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(u=>!u),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(ka,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n(`assistant.message.steps.${t?.chunk_type||e?.type}`,{count:Number(o.length)})})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:l.jsxs("div",{className:"mb-4 space-y-3 text-xs",children:[o?.map((u,h)=>l.jsx("div",{className:"flex flex-col gap-2",children:l.jsxs("div",{className:"text-xs text-[#999999] dark:text-[#808080]",children:["- ",u]})},`${u}-${h}`)),c?.split(`
32
32
  `).map((u,h)=>u.trim()&&l.jsx("p",{className:"text-sm",children:u},h))]})})})]})},Sa=({Detail:e,ChunkData:t,loading:s})=>{const{t:n}=ue.useTranslation(),[r,i]=g.useState(!0),[o,a]=g.useState("");return g.useEffect(()=>{e?.description&&a(e?.description)},[e?.description]),g.useEffect(()=>{t?.message_chunk&&a(t?.message_chunk)},[t?.message_chunk,o]),!t&&!e?null:l.jsxs("div",{className:"space-y-2 mb-3 w-full",children:[l.jsxs("button",{onClick:()=>i(c=>!c),className:"inline-flex items-center gap-2 px-2 py-1 rounded-xl transition-colors border border-[#E6E6E6] dark:border-[#272626]",children:[s?l.jsxs(l.Fragment,{children:[l.jsx(j.Loader,{className:"w-4 h-4 animate-spin text-[#1990FF]"}),l.jsx("span",{className:"text-xs text-[#999999] italic",children:n(`assistant.message.steps.${t?.chunk_type}`)})]}):l.jsxs(l.Fragment,{children:[l.jsx(j.Brain,{className:"w-4 h-4 text-[#38C200]"}),l.jsx("span",{className:"text-xs text-[#999999]",children:n("assistant.message.steps.thoughtTime")})]}),r?l.jsx(j.ChevronUp,{className:"w-4 h-4"}):l.jsx(j.ChevronDown,{className:"w-4 h-4"})]}),r&&l.jsx("div",{className:"pl-2 pt-1 border-l-2 border-[#e5e5e5] dark:border-[#4e4e56]",children:l.jsx("div",{className:"text-[#8b8b8b] dark:text-[#a6a6a6] space-y-2",children:o?.split(`
33
- `).map((c,d)=>c.trim()&&l.jsx("p",{className:"text-sm",children:c},d))})})]})},Ea=["timedout","error"],Pa=({id:e,content:t,question:s,actionClassName:n,actionIconSize:r,copyButtonId:i,onResend:o})=>{const[a,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(!1),[m,b]=g.useState(!1),[A,C]=g.useState(!1),y=Ea.includes(e),v=async()=>{try{await Zr(t),c(!0);const E=setTimeout(()=>{c(!1),clearTimeout(E)},2e3)}catch(E){console.error("copy error:",E)}},x=()=>{u(!d),p(!1)},R=()=>{p(!h),u(!1)},P=async()=>{if("speechSynthesis"in window){if(m){window.speechSynthesis.cancel(),b(!1);return}const E=new SpeechSynthesisUtterance(t);E.lang="zh-CN",E.onend=()=>{b(!1)},b(!0),window.speechSynthesis.speak(E)}},M=()=>{if(o){C(!0),o();const E=setTimeout(()=>{C(!1),clearTimeout(E)},1e3)}};return l.jsxs("div",{className:dt("flex items-center gap-2 mt-2",n),children:[!y&&l.jsx("button",{id:i,onClick:v,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:a?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]",style:{width:r,height:r}}):l.jsx(j.Copy,{className:"w-4 h-4 text-[#666666] dark:text-[#A3A3A3]",style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:x,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${d?"animate-shake":""}`,children:l.jsx(j.ThumbsUp,{className:`w-4 h-4 ${d?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:R,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${h?"animate-shake":""}`,children:l.jsx(j.ThumbsDown,{className:`w-4 h-4 ${h?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx(l.Fragment,{children:l.jsx("button",{onClick:P,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:l.jsx(j.Volume2,{className:`w-4 h-4 ${m?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})}),s&&l.jsx("button",{onClick:M,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${A?"animate-spin":""}`,children:l.jsx(j.RotateCcw,{className:`w-4 h-4 ${A?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})]})};function ja({suggestions:e,onSelect:t}){return!e||e.length===0?null:l.jsx("div",{className:"mt-4 flex flex-col gap-2",children:e.map((s,n)=>l.jsxs("button",{onClick:()=>t(s),className:"text-left inline-flex items-center px-3 py-1.5 rounded-full bg-[#F5F5F5] dark:bg-[#2A2A2A] border border-[#E4E5EF] dark:border-[#3A3A3A] text-sm text-[#333333] dark:text-white hover:bg-[#EDEDED] dark:hover:bg-[#3A3A3A] transition-colors w-fit max-w-full wrap-break-word whitespace-pre-wrap",children:[l.jsx("span",{className:"break-all",children:s}),l.jsx(j.MoveRight,{className:"w-3 h-3 ml-1.5 shrink-0"})]},n))})}const Ra=({textToCopy:e})=>{const[t,s]=g.useState(!1),n=async()=>{try{await Zr(e),s(!0);const r=setTimeout(()=>{s(!1),clearTimeout(r)},2e3)}catch(r){console.error("copy error:",r)}};return l.jsx("button",{className:"p-1 bg-gray-200 dark:bg-gray-700 rounded",onClick:n,children:t?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]"}):l.jsx(j.Copy,{className:"w-4 h-4 text-gray-600 dark:text-gray-300"})})},Na=e=>{const{message:t,attachments:s}=e,[n,r]=g.useState(!1),[i,o]=g.useState([]),a=c=>{if(typeof window<"u"&&typeof document<"u"){const d=window.getSelection(),u=document.createRange();if(c.currentTarget&&d&&u)try{u.selectNodeContents(c.currentTarget),d.removeAllRanges(),d.addRange(u)}catch(h){console.error("Selection failed:",h)}}};return aa.useAsyncEffect(async()=>{try{if(s.length===0)return;o({}?.hits?.hits)}catch(c){console.error("Get attachment failed:",String(c))}},[s]),l.jsxs(l.Fragment,{children:[t&&l.jsxs("div",{className:"flex gap-1 items-center justify-end",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[l.jsx("div",{className:dt("size-6 transition",{"opacity-0":!n}),children:l.jsx(Ra,{textToCopy:t})}),l.jsx("div",{className:"max-w-[85%] overflow-auto text-left px-3 py-2 bg-white dark:bg-[#202126]! rounded-xl border border-black/12 dark:border-black/15 font-normal text-sm text-[#333333] dark:text-white cursor-pointer user-select-text whitespace-pre-wrap",onDoubleClick:a,children:t})]}),i&&i.length>0&&l.jsx("div",{className:dt("w-full",{"mt-3":t}),children:l.jsx(la.Attachments,{data:i.map(c=>({id:c._source.id,filename:c._source.name,extname:c._source.icon,size:c._source.size,status:"uploaded"})),className:"text-left"})})]})},Va=({name:e,className:t,style:s,...n})=>l.jsx("svg",{className:`icon dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${t||""}`,style:s,...n,children:l.jsx("use",{xlinkHref:`#${e}`})});function Ma(){const[e,t]=g.useState(),[s,n]=g.useState(),[r,i]=g.useState(),[o,a]=g.useState(),[c,d]=g.useState(),[u,h]=g.useState(),[p,m]=g.useState(),[b,A]=g.useState([]),C={deal_query_intent:g.useCallback(v=>{t(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_tools:g.useCallback(v=>{n(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_fetch_source:g.useCallback(v=>{i(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_pick_source:g.useCallback(v=>{a(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_deep_read:g.useCallback(v=>{d(x=>x?{...x,message_chunk:(x.message_chunk||"")+"&"+(v.message_chunk||"")}:v)},[]),deal_think:g.useCallback(v=>{h(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_response:g.useCallback(v=>{m(x=>x?{...x,message_chunk:(x.message_chunk||"")+(v.message_chunk||"")}:v)},[]),deal_deep_research:g.useCallback(v=>{A(x=>[...x,v])},[])};return{data:{query_intent:e,tools:s,fetch_source:r,pick_source:o,deep_read:c,think:u,response:p,deepResearch:b},handlers:C,clearAllChunkData:()=>new Promise(v=>{t(void 0),n(void 0),i(void 0),a(void 0),d(void 0),h(void 0),m(void 0),A([]),setTimeout(v,0)})}}const Ls=g.createContext({});function Bs(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Os=typeof window<"u",ei=Os?g.useLayoutEffect:g.useEffect,Wt=g.createContext(null);function Is(e,t){e.indexOf(t)===-1&&e.push(t)}function _s(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const ve=(e,t,s)=>s>t?t:s<e?e:s;function fs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Je=()=>{},be=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Je=(e,t,s)=>{!e&&typeof console<"u"&&console.warn(fs(t,s))},be=(e,t,s)=>{if(!e)throw new Error(fs(t,s))});const we={},ti=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function si(e){return typeof e=="object"&&e!==null}const ni=e=>/^0[^.\s]+$/u.test(e);function Us(e){let t;return()=>(t===void 0&&(t=e()),t)}const pe=e=>e,Da=(e,t)=>s=>t(e(s)),yt=(...e)=>e.reduce(Da),ht=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class Ws{constructor(){this.subscriptions=[]}add(t){return Is(this.subscriptions,t),()=>_s(this.subscriptions,t)}notify(t,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,n);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ye=e=>e*1e3,fe=e=>e/1e3;function ri(e,t){return t?e*(1e3/t):0}const Dn=new Set;function qs(e,t,s){e||Dn.has(t)||(console.warn(fs(t,s)),Dn.add(t))}const ii=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,Fa=1e-7,La=12;function Ba(e,t,s,n,r){let i,o,a=0;do o=t+(s-t)/2,i=ii(o,n,r)-e,i>0?s=o:t=o;while(Math.abs(i)>Fa&&++a<La);return o}function xt(e,t,s,n){if(e===t&&s===n)return pe;const r=i=>Ba(i,0,1,e,s);return i=>i===0||i===1?i:ii(r(i),t,n)}const oi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ai=e=>t=>1-e(1-t),li=xt(.33,1.53,.69,.99),Ks=ai(li),ci=oi(Ks),ui=e=>(e*=2)<1?.5*Ks(e):.5*(2-Math.pow(2,-10*(e-1))),Ys=e=>1-Math.sin(Math.acos(e)),di=ai(Ys),hi=oi(Ys),Oa=xt(.42,0,1,1),Ia=xt(0,0,.58,1),fi=xt(.42,0,.58,1),_a=e=>Array.isArray(e)&&typeof e[0]!="number",pi=e=>Array.isArray(e)&&typeof e[0]=="number",Fn={linear:pe,easeIn:Oa,easeInOut:fi,easeOut:Ia,circIn:Ys,circInOut:hi,circOut:di,backIn:Ks,backInOut:ci,backOut:li,anticipate:ui},Ua=e=>typeof e=="string",Ln=e=>{if(pi(e)){be(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,s,n,r]=e;return xt(t,s,n,r)}else if(Ua(e))return be(Fn[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Fn[e];return e},Tt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Wa(e,t){let s=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,h=!1,p=!1)=>{const b=p&&r?s:n;return h&&o.add(u),b.has(u)||b.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[s,n]=[n,s],s.forEach(c),s.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const qa=40;function mi(e,t){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=Tt.reduce((x,R)=>(x[R]=Wa(i),x),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:p,render:m,postRender:b}=o,A=()=>{const x=we.useManualTiming?r.timestamp:performance.now();s=!1,we.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(x-r.timestamp,qa),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),h.process(r),p.process(r),m.process(r),b.process(r),r.isProcessing=!1,s&&t&&(n=!1,e(A))},C=()=>{s=!0,n=!0,r.isProcessing||e(A)};return{schedule:Tt.reduce((x,R)=>{const P=o[R];return x[R]=(M,E=!1,S=!1)=>(s||C(),P.schedule(M,E,S)),x},{}),cancel:x=>{for(let R=0;R<Tt.length;R++)o[Tt[R]].cancel(x)},state:r,steps:o}}const{schedule:W,cancel:Se,state:te,steps:Xt}=mi(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0);let jt;function Ka(){jt=void 0}const ie={now:()=>(jt===void 0&&ie.set(te.isProcessing||we.useManualTiming?te.timestamp:performance.now()),jt),set:e=>{jt=e,queueMicrotask(Ka)}},gi=e=>t=>typeof t=="string"&&t.startsWith(e),yi=gi("--"),Ya=gi("var(--"),zs=e=>Ya(e)?za.test(e.split("/*")[0].trim()):!1,za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Bn(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Qe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ft={...Qe,transform:e=>ve(0,1,e)},St={...Qe,default:1},lt=e=>Math.round(e*1e5)/1e5,Gs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(e){return e==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Js=(e,t)=>s=>!!(typeof s=="string"&&Ja.test(s)&&s.startsWith(e)||t&&!Ga(s)&&Object.prototype.hasOwnProperty.call(s,t)),xi=(e,t,s)=>n=>{if(typeof n!="string")return n;const[r,i,o,a]=n.match(Gs);return{[e]:parseFloat(r),[t]:parseFloat(i),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Qa=e=>ve(0,255,e),Zt={...Qe,transform:e=>Math.round(Qa(e))},Ve={test:Js("rgb","red"),parse:xi("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+Zt.transform(e)+", "+Zt.transform(t)+", "+Zt.transform(s)+", "+lt(ft.transform(n))+")"};function Ha(e){let t="",s="",n="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const ps={test:Js("#"),parse:Ha,transform:Ve.transform},vt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ke=vt("deg"),xe=vt("%"),T=vt("px"),Xa=vt("vh"),Za=vt("vw"),On={...xe,parse:e=>xe.parse(e)/100,transform:e=>xe.transform(e*100)},_e={test:Js("hsl","hue"),parse:xi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+xe.transform(lt(t))+", "+xe.transform(lt(s))+", "+lt(ft.transform(n))+")"},Q={test:e=>Ve.test(e)||ps.test(e)||_e.test(e),parse:e=>Ve.test(e)?Ve.parse(e):_e.test(e)?_e.parse(e):ps.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ve.transform(e):_e.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},$a=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function el(e){return isNaN(e)&&typeof e=="string"&&(e.match(Gs)?.length||0)+(e.match($a)?.length||0)>0}const vi="number",bi="color",tl="var",sl="var(",In="${}",nl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pt(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(nl,c=>(Q.test(c)?(n.color.push(i),r.push(bi),s.push(Q.parse(c))):c.startsWith(sl)?(n.var.push(i),r.push(tl),s.push(c)):(n.number.push(i),r.push(vi),s.push(parseFloat(c))),++i,In)).split(In);return{values:s,split:a,indexes:n,types:r}}function wi(e){return pt(e).values}function Ai(e){const{split:t,types:s}=pt(e),n=t.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],r[o]!==void 0){const a=s[o];a===vi?i+=lt(r[o]):a===bi?i+=Q.transform(r[o]):i+=r[o]}return i}}const rl=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function il(e){const t=wi(e);return Ai(e)(t.map(rl))}const Ee={test:el,parse:wi,createTransformer:Ai,getAnimatableNone:il};function $t(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function ol({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let r=0,i=0,o=0;if(!t)r=i=o=s;else{const a=s<.5?s*(1+t):s+t-s*t,c=2*s-a;r=$t(c,a,e+1/3),i=$t(c,a,e),o=$t(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}function Dt(e,t){return s=>s>0?t:e}const Y=(e,t,s)=>e+(t-e)*s,es=(e,t,s)=>{const n=e*e,r=s*(t*t-n)+n;return r<0?0:Math.sqrt(r)},al=[ps,Ve,_e],ll=e=>al.find(t=>t.test(e));function _n(e){const t=ll(e);if(Je(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===_e&&(s=ol(s)),s}const Un=(e,t)=>{const s=_n(e),n=_n(t);if(!s||!n)return Dt(e,t);const r={...s};return i=>(r.red=es(s.red,n.red,i),r.green=es(s.green,n.green,i),r.blue=es(s.blue,n.blue,i),r.alpha=Y(s.alpha,n.alpha,i),Ve.transform(r))},ms=new Set(["none","hidden"]);function cl(e,t){return ms.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function ul(e,t){return s=>Y(e,t,s)}function Qs(e){return typeof e=="number"?ul:typeof e=="string"?zs(e)?Dt:Q.test(e)?Un:fl:Array.isArray(e)?Ci:typeof e=="object"?Q.test(e)?Un:dl:Dt}function Ci(e,t){const s=[...e],n=s.length,r=e.map((i,o)=>Qs(i)(i,t[o]));return i=>{for(let o=0;o<n;o++)s[o]=r[o](i);return s}}function dl(e,t){const s={...e,...t},n={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(n[r]=Qs(e[r])(e[r],t[r]));return r=>{for(const i in n)s[i]=n[i](r);return s}}function hl(e,t){const s=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][n[i]],a=e.values[o]??0;s[r]=a,n[i]++}return s}const fl=(e,t)=>{const s=Ee.createTransformer(t),n=pt(e),r=pt(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?ms.has(e)&&!r.values.length||ms.has(t)&&!n.values.length?cl(e,t):yt(Ci(hl(n,r),r.values),s):(Je(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Dt(e,t))};function ki(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?Y(e,t,s):Qs(e)(e,t)}const pl=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>W.update(t,s),stop:()=>Se(t),now:()=>te.isProcessing?te.timestamp:ie.now()}},Ti=(e,t,s=10)=>{let n="";const r=Math.max(Math.round(t/s),2);for(let i=0;i<r;i++)n+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Ft=2e4;function Hs(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<Ft;)t+=s,n=e.next(t);return t>=Ft?1/0:t}function ml(e,t=100,s){const n=s({...e,keyframes:[0,t]}),r=Math.min(Hs(n),Ft);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:fe(r)}}const gl=5;function Si(e,t,s){const n=Math.max(t-gl,0);return ri(s-e(n),t-n)}const K={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ts=.001;function yl({duration:e=K.duration,bounce:t=K.bounce,velocity:s=K.velocity,mass:n=K.mass}){let r,i;Je(e<=ye(K.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=ve(K.minDamping,K.maxDamping,o),e=ve(K.minDuration,K.maxDuration,fe(e)),o<1?(r=d=>{const u=d*o,h=u*e,p=u-s,m=gs(d,o),b=Math.exp(-h);return ts-p/m*b},i=d=>{const h=d*o*e,p=h*s+s,m=Math.pow(o,2)*Math.pow(d,2)*e,b=Math.exp(-h),A=gs(Math.pow(d,2),o);return(-r(d)+ts>0?-1:1)*((p-m)*b)/A}):(r=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-ts+u*h},i=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const a=5/e,c=vl(r,i,a);if(e=ye(e),isNaN(c))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:e}}}const xl=12;function vl(e,t,s){let n=s;for(let r=1;r<xl;r++)n=n-e(n)/t(n);return n}function gs(e,t){return e*Math.sqrt(1-t*t)}const bl=["duration","bounce"],wl=["stiffness","damping","mass"];function Wn(e,t){return t.some(s=>e[s]!==void 0)}function Al(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!Wn(e,wl)&&Wn(e,bl))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,i=2*ve(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:K.mass,stiffness:r,damping:i}}else{const s=yl(e);t={...t,...s,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Lt(e=K.visualDuration,t=K.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:r}=s;const i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:d,mass:u,duration:h,velocity:p,isResolvedFromDuration:m}=Al({...s,velocity:-fe(s.velocity||0)}),b=p||0,A=d/(2*Math.sqrt(c*u)),C=o-i,y=fe(Math.sqrt(c/u)),v=Math.abs(C)<5;n||(n=v?K.restSpeed.granular:K.restSpeed.default),r||(r=v?K.restDelta.granular:K.restDelta.default);let x;if(A<1){const P=gs(y,A);x=M=>{const E=Math.exp(-A*y*M);return o-E*((b+A*y*C)/P*Math.sin(P*M)+C*Math.cos(P*M))}}else if(A===1)x=P=>o-Math.exp(-y*P)*(C+(b+y*C)*P);else{const P=y*Math.sqrt(A*A-1);x=M=>{const E=Math.exp(-A*y*M),S=Math.min(P*M,300);return o-E*((b+A*y*C)*Math.sinh(S)+P*C*Math.cosh(S))/P}}const R={calculatedDuration:m&&h||null,next:P=>{const M=x(P);if(m)a.done=P>=h;else{let E=P===0?b:0;A<1&&(E=P===0?ye(b):Si(x,P,M));const S=Math.abs(E)<=n,F=Math.abs(o-M)<=r;a.done=S&&F}return a.value=a.done?o:M,a},toString:()=>{const P=Math.min(Hs(R),Ft),M=Ti(E=>R.next(P*E).value,P,30);return P+"ms "+M},toTransition:()=>{}};return R}Lt.applyToOptions=e=>{const t=ml(e,100,Lt);return e.ease=t.ease,e.duration=ye(t.duration),e.type="keyframes",e};function ys({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},m=S=>a!==void 0&&S<a||c!==void 0&&S>c,b=S=>a===void 0?c:c===void 0||Math.abs(a-S)<Math.abs(c-S)?a:c;let A=s*t;const C=h+A,y=o===void 0?C:o(C);y!==C&&(A=y-h);const v=S=>-A*Math.exp(-S/n),x=S=>y+v(S),R=S=>{const F=v(S),U=x(S);p.done=Math.abs(F)<=d,p.value=p.done?y:U};let P,M;const E=S=>{m(p.value)&&(P=S,M=Lt({keyframes:[p.value,b(p.value)],velocity:Si(x,S,p.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return E(0),{calculatedDuration:null,next:S=>{let F=!1;return!M&&P===void 0&&(F=!0,R(S),E(S)),P!==void 0&&S>=P?M.next(S-P):(!F&&R(S),p)}}}function Cl(e,t,s){const n=[],r=s||we.mix||ki,i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||pe:t;a=yt(c,a)}n.push(a)}return n}function kl(e,t,{clamp:s=!0,ease:n,mixer:r}={}){const i=e.length;if(be(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Cl(t,n,r),c=a.length,d=u=>{if(o&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=ht(e[h],e[h+1],u);return a[h](p)};return s?u=>d(ve(e[0],e[i-1],u)):d}function Tl(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const r=ht(0,t,n);e.push(Y(s,1,r))}}function Sl(e){const t=[0];return Tl(t,e.length-1),t}function El(e,t){return e.map(s=>s*t)}function Pl(e,t){return e.map(()=>t||fi).splice(0,e.length-1)}function Ue({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const r=_a(n)?n.map(Ln):Ln(n),i={done:!1,value:t[0]},o=El(s&&s.length===t.length?s:Sl(t),e),a=kl(o,t,{ease:Array.isArray(r)?r:Pl(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const jl=e=>e!==null;function Xs(e,{repeat:t,repeatType:s="loop"},n,r=1){const i=e.filter(jl),a=r<0||t&&s!=="loop"&&t%2===1?0:i.length-1;return!a||n===void 0?i[a]:n}const Rl={decay:ys,inertia:ys,tween:Ue,keyframes:Ue,spring:Lt};function Ei(e){typeof e.type=="string"&&(e.type=Rl[e.type])}class Zs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const Nl=e=>e/100;class $s extends Zs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==ie.now()&&this.tick(ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ei(t);const{type:s=Ue,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=s||Ue;process.env.NODE_ENV!=="production"&&c!==Ue&&be(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==Ue&&typeof a[0]!="number"&&(this.mixKeyframes=yt(Nl,ki(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Hs(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:m,type:b,onUpdate:A,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,R=n;if(h){const S=Math.min(this.currentTime,r)/a;let F=Math.floor(S),U=S%1;!U&&S>=1&&(U=1),U===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(U=1-U,m&&(U-=m/a)):p==="mirror"&&(R=o)),x=ve(0,1,U)*a}const P=v?{done:!1,value:u[0]}:R.next(x);i&&(P.value=i(P.value));let{done:M}=P;!v&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return E&&b!==ys&&(P.value=Xs(u,this.options,C,this.speed)),A&&A(P.value),E&&this.finish(),P}then(t,s){return this.finished.then(t,s)}get duration(){return fe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fe(t)}get time(){return fe(this.currentTime)}set time(t){t=ye(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ie.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=fe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=pl,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Vl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Me=e=>e*180/Math.PI,xs=e=>{const t=Me(Math.atan2(e[1],e[0]));return vs(t)},Ml={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:xs,rotateZ:xs,skewX:e=>Me(Math.atan(e[1])),skewY:e=>Me(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vs=e=>(e=e%360,e<0&&(e+=360),e),qn=xs,Kn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Dl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kn,scaleY:Yn,scale:e=>(Kn(e)+Yn(e))/2,rotateX:e=>vs(Me(Math.atan2(e[6],e[5]))),rotateY:e=>vs(Me(Math.atan2(-e[2],e[0]))),rotateZ:qn,rotate:qn,skewX:e=>Me(Math.atan(e[4])),skewY:e=>Me(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function bs(e){return e.includes("scale")?1:0}function ws(e,t){if(!e||e==="none")return bs(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=Dl,r=s;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ml,r=a}if(!r)return bs(t);const i=n[t],o=r[1].split(",").map(Ll);return typeof i=="function"?i(o):o[i]}const Fl=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return ws(s,t)};function Ll(e){return parseFloat(e.trim())}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xe=new Set(He),zn=e=>e===Qe||e===T,Bl=new Set(["x","y","z"]),Ol=He.filter(e=>!Bl.has(e));function Il(e){const t=[];return Ol.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const Te={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ws(t,"x"),y:(e,{transform:t})=>ws(t,"y")};Te.translateX=Te.x;Te.translateY=Te.y;const De=new Set;let As=!1,Cs=!1,ks=!1;function Pi(){if(Cs){const e=Array.from(De).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const r=Il(n);r.length&&(s.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([i,o])=>{n.getValue(i)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Cs=!1,As=!1,De.forEach(e=>e.complete(ks)),De.clear()}function ji(){De.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cs=!0)})}function _l(){ks=!0,ji(),Pi(),ks=!1}class en{constructor(t,s,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(De.add(this),As||(As=!0,W.read(ji),W.resolveKeyframes(Pi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:r}=this;if(t[0]===null){const i=r?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&s){const a=n.readValue(s,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}Vl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),De.delete(this)}cancel(){this.state==="scheduled"&&(De.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ul=e=>e.startsWith("--");function Wl(e,t,s){Ul(t)?e.style.setProperty(t,s):e.style[t]=s}const ql=Us(()=>window.ScrollTimeline!==void 0),Kl={};function Yl(e,t){const s=Us(e);return()=>Kl[t]??s()}const Ri=Yl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ot=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,Gn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ot([0,.65,.55,1]),circOut:ot([.55,0,1,.45]),backIn:ot([.31,.01,.66,-.59]),backOut:ot([.33,1.53,.69,.99])};function Ni(e,t){if(e)return typeof e=="function"?Ri()?Ti(e,t):"ease-out":pi(e)?ot(e):Array.isArray(e)?e.map(s=>Ni(s,t)||Gn.easeOut):Gn[e]}function zl(e,t,s,{delay:n=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=Ni(a,r);Array.isArray(h)&&(u.easing=h);const p={delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function Vi(e){return typeof e=="function"&&"applyToOptions"in e}function Gl({type:e,...t}){return Vi(e)&&Ri()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Jl extends Zs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,be(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Gl(t);this.animation=zl(s,n,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Xs(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Wl(s,n,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return fe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fe(t)}get time(){return fe(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ye(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ql()?(this.animation.timeline=t,pe):s(this)}}const Mi={anticipate:ui,backInOut:ci,circInOut:hi};function Ql(e){return e in Mi}function Hl(e){typeof e.ease=="string"&&Ql(e.ease)&&(e.ease=Mi[e.ease])}const ss=10;class Xl extends Jl{constructor(t){Hl(t),Ei(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const a=new $s({...o,autoplay:!1}),c=Math.max(ss,ie.now()-this.startTime),d=ve(0,ss,c-ss);s.setWithVelocity(a.sample(Math.max(0,c-d)).value,a.sample(c).value,d),a.stop()}}const Jn=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ee.test(e)||e==="0")&&!e.startsWith("url("));function Zl(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function $l(e,t,s,n){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Jn(r,t),a=Jn(i,t);return Je(o===a,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Zl(e)||(s==="spring"||Vi(s))&&n}function Ts(e){e.duration=0,e.type="keyframes"}const ec=new Set(["opacity","clipPath","filter","transform"]),tc=Us(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sc(e){const{motionValue:t,name:s,repeatDelay:n,repeatType:r,damping:i,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return tc()&&s&&ec.has(s)&&(s!=="transform"||!d)&&!c&&!n&&r!=="mirror"&&i!==0&&o!=="inertia"}const nc=40;class rc extends Zs{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:d,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ie.now();const p={autoplay:t,delay:s,type:n,repeat:r,repeatDelay:i,repeatType:o,name:c,motionValue:d,element:u,...h},m=u?.KeyframeResolver||en;this.keyframeResolver=new m(a,(b,A,C)=>this.onKeyframesResolved(b,A,p,!C),c,d,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=ie.now(),$l(t,i,o,a)||((we.instantAnimations||!c)&&u?.(Xs(t,n,s)),t[0]=t[t.length-1],Ts(n),n.repeat=0);const p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>nc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},m=!d&&sc(p)?new Xl({...p,element:p.motionValue.owner.current}):new $s(p);m.finished.then(()=>this.notifyFinished()).catch(pe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),_l()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ic=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oc(e){const t=ic.exec(e);if(!t)return[,];const[,s,n,r]=t;return[`--${s??n}`,r]}const ac=4;function Di(e,t,s=1){be(s<=ac,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,r]=oc(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const o=i.trim();return ti(o)?parseFloat(o):o}return zs(r)?Di(r,t,s+1):r}function tn(e,t){return e?.[t]??e?.default??e}const Fi=new Set(["width","height","top","left","right","bottom",...He]),lc={test:e=>e==="auto",parse:e=>e},Li=e=>t=>t.test(e),Bi=[Qe,T,xe,ke,Za,Xa,lc],Qn=e=>Bi.find(Li(e));function cc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ni(e):!0}const uc=new Set(["brightness","contrast","saturate","opacity"]);function dc(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(Gs)||[];if(!n)return e;const r=s.replace(n,"");let i=uc.has(t)?1:0;return n!==s&&(i*=100),t+"("+i+r+")"}const hc=/\b([a-z-]*)\(.*?\)/gu,Ss={...Ee,getAnimatableNone:e=>{const t=e.match(hc);return t?t.map(dc).join(" "):e}},Hn={...Qe,transform:Math.round},fc={rotate:ke,rotateX:ke,rotateY:ke,rotateZ:ke,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:ke,skewX:ke,skewY:ke,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:ft,originX:On,originY:On,originZ:T},sn={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,backgroundPositionX:T,backgroundPositionY:T,...fc,zIndex:Hn,fillOpacity:ft,strokeOpacity:ft,numOctaves:Hn},pc={...sn,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:Ss,WebkitFilter:Ss},Oi=e=>pc[e];function Ii(e,t){let s=Oi(e);return s!==Ss&&(s=Ee),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const mc=new Set(["auto","none","0"]);function gc(e,t,s){let n=0,r;for(;n<e.length&&!r;){const i=e[n];typeof i=="string"&&!mc.has(i)&&pt(i).values.length&&(r=e[n]),n++}if(r&&s)for(const i of t)e[i]=Ii(s,r)}class yc extends en{constructor(t,s,n,r,i){super(t,s,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),zs(h))){const p=Di(h,s.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Fi.has(n)||t.length!==2)return;const[r,i]=t,o=Qn(r),a=Qn(i),c=Bn(r),d=Bn(i);if(c!==d&&Te[n]){this.needsMeasurement=!0;return}if(o!==a)if(zn(o)&&zn(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else Te[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||cc(t[r]))&&n.push(r);n.length&&gc(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Te[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,o=n[i];n[i]=Te[s](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function xc(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const r=s?.[e]??n.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const _i=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ui(e){return si(e)&&"offsetHeight"in e}const Xn=30,vc=e=>!isNaN(parseFloat(e));class bc{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const r=ie.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=ie.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qs(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Ws);const n=this.events[t].add(s);return t==="change"?()=>{n(),W.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xn)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Xn);return ri(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ze(e,t){return new bc(e,t)}const{schedule:nn}=mi(queueMicrotask,!1),ge={x:!1,y:!1};function Wi(){return ge.x||ge.y}function wc(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function qi(e,t){const s=xc(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[s,r,()=>n.abort()]}function Zn(e){return!(e.pointerType==="touch"||Wi())}function Ac(e,t,s={}){const[n,r,i]=qi(e,s),o=a=>{if(!Zn(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=h=>{Zn(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return n.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const Ki=(e,t)=>t?e===t?!0:Ki(e,t.parentElement):!1,rn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Cc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Yi(e){return Cc.has(e.tagName)||e.isContentEditable===!0}const Rt=new WeakSet;function $n(e){return t=>{t.key==="Enter"&&e(t)}}function ns(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const kc=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=$n(()=>{if(Rt.has(s))return;ns(s,"down");const r=$n(()=>{ns(s,"up")}),i=()=>ns(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",i,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function er(e){return rn(e)&&!Wi()}function Tc(e,t,s={}){const[n,r,i]=qi(e,s),o=a=>{const c=a.currentTarget;if(!er(a))return;Rt.add(c);const d=t(c,a),u=(m,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),Rt.has(c)&&Rt.delete(c),er(m)&&typeof d=="function"&&d(m,{success:b})},h=m=>{u(m,c===window||c===document||s.useGlobalTarget||Ki(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",p,r)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Ui(a)&&(a.addEventListener("focus",d=>kc(d,r)),!Yi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function zi(e){return si(e)&&"ownerSVGElement"in e}function Sc(e){return zi(e)&&e.tagName==="svg"}const se=e=>!!(e&&e.getVelocity),Ec=[...Bi,Q,Ee],Pc=e=>Ec.find(Li(e)),on=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function tr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jc(...e){return t=>{let s=!1;const n=e.map(r=>{const i=tr(r,t);return!s&&typeof i=="function"&&(s=!0),i});if(s)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():tr(e[r],null)}}}}function Rc(...e){return _t.useCallback(jc(...e),e)}class Nc extends _t.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,r=Ui(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=s.offsetHeight||0,i.width=s.offsetWidth||0,i.top=s.offsetTop,i.left=s.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Vc({children:e,isPresent:t,anchorX:s,root:n}){const r=g.useId(),i=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(on),c=e.props?.ref??e?.ref,d=Rc(i,c);return g.useInsertionEffect(()=>{const{width:u,height:h,top:p,left:m,right:b}=o.current;if(t||!i.current||!u||!h)return;const A=s==="left"?`left: ${m}`:`right: ${b}`;i.current.dataset.motionPopId=r;const C=document.createElement("style");a&&(C.nonce=a);const y=n??document.head;return y.appendChild(C),C.sheet&&C.sheet.insertRule(`
33
+ `).map((c,d)=>c.trim()&&l.jsx("p",{className:"text-sm",children:c},d))})})]})},Ea=["timedout","error"],Pa=({id:e,content:t,question:s,actionClassName:n,actionIconSize:r,copyButtonId:i,onResend:o})=>{const[a,c]=g.useState(!1),[d,u]=g.useState(!1),[h,p]=g.useState(!1),[m,v]=g.useState(!1),[A,C]=g.useState(!1),y=Ea.includes(e),b=async()=>{try{await $r(t),c(!0);const E=setTimeout(()=>{c(!1),clearTimeout(E)},2e3)}catch(E){console.error("copy error:",E)}},x=()=>{u(!d),p(!1)},R=()=>{p(!h),u(!1)},P=async()=>{if("speechSynthesis"in window){if(m){window.speechSynthesis.cancel(),v(!1);return}const E=new SpeechSynthesisUtterance(t);E.lang="zh-CN",E.onend=()=>{v(!1)},v(!0),window.speechSynthesis.speak(E)}},M=()=>{if(o){C(!0),o();const E=setTimeout(()=>{C(!1),clearTimeout(E)},1e3)}};return l.jsxs("div",{className:Ge("flex items-center gap-2 mt-2",n),children:[!y&&l.jsx("button",{id:i,onClick:b,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:a?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]",style:{width:r,height:r}}):l.jsx(j.Copy,{className:"w-4 h-4 text-[#666666] dark:text-[#A3A3A3]",style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:x,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${d?"animate-shake":""}`,children:l.jsx(j.ThumbsUp,{className:`w-4 h-4 ${d?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx("button",{onClick:R,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${h?"animate-shake":""}`,children:l.jsx(j.ThumbsDown,{className:`w-4 h-4 ${h?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})}),!y&&l.jsx(l.Fragment,{children:l.jsx("button",{onClick:P,className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors",children:l.jsx(j.Volume2,{className:`w-4 h-4 ${m?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})}),s&&l.jsx("button",{onClick:M,className:`p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors ${A?"animate-spin":""}`,children:l.jsx(j.RotateCcw,{className:`w-4 h-4 ${A?"text-[#1990FF] dark:text-[#1990FF]":"text-[#666666] dark:text-[#A3A3A3]"}`,style:{width:r,height:r}})})]})};function ja({suggestions:e,onSelect:t}){return!e||e.length===0?null:l.jsx("div",{className:"mt-4 flex flex-col gap-2",children:e.map((s,n)=>l.jsxs("button",{onClick:()=>t(s),className:"text-left inline-flex items-center px-3 py-1.5 rounded-full bg-[#F5F5F5] dark:bg-[#2A2A2A] border border-[#E4E5EF] dark:border-[#3A3A3A] text-sm text-[#333333] dark:text-white hover:bg-[#EDEDED] dark:hover:bg-[#3A3A3A] transition-colors w-fit max-w-full wrap-break-word whitespace-pre-wrap",children:[l.jsx("span",{className:"break-all",children:s}),l.jsx(j.MoveRight,{className:"w-3 h-3 ml-1.5 shrink-0"})]},n))})}const Ra=({textToCopy:e})=>{const[t,s]=g.useState(!1),n=async()=>{try{await $r(e),s(!0);const r=setTimeout(()=>{s(!1),clearTimeout(r)},2e3)}catch(r){console.error("copy error:",r)}};return l.jsx("button",{className:"p-1 bg-gray-200 dark:bg-gray-700 rounded",onClick:n,children:t?l.jsx(j.Check,{className:"w-4 h-4 text-[#38C200] dark:text-[#38C200]"}):l.jsx(j.Copy,{className:"w-4 h-4 text-gray-600 dark:text-gray-300"})})},Na=e=>{const{message:t,attachments:s}=e,[n,r]=g.useState(!1),[i,o]=g.useState([]),a=c=>{if(typeof window<"u"&&typeof document<"u"){const d=window.getSelection(),u=document.createRange();if(c.currentTarget&&d&&u)try{u.selectNodeContents(c.currentTarget),d.removeAllRanges(),d.addRange(u)}catch(h){console.error("Selection failed:",h)}}};return aa.useAsyncEffect(async()=>{try{if(s.length===0)return;o({}?.hits?.hits)}catch(c){console.error("Get attachment failed:",String(c))}},[s]),l.jsxs(l.Fragment,{children:[t&&l.jsxs("div",{className:"flex gap-1 items-center justify-end",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[l.jsx("div",{className:Ge("size-6 transition",{"opacity-0":!n}),children:l.jsx(Ra,{textToCopy:t})}),l.jsx("div",{className:"max-w-[85%] overflow-auto text-left px-3 py-2 bg-white dark:bg-[#202126]! rounded-xl border border-black/12 dark:border-black/15 font-normal text-sm text-[#333333] dark:text-white cursor-pointer user-select-text whitespace-pre-wrap",onDoubleClick:a,children:t})]}),i&&i.length>0&&l.jsx("div",{className:Ge("w-full",{"mt-3":t}),children:l.jsx(la.Attachments,{data:i.map(c=>({id:c._source.id,filename:c._source.name,extname:c._source.icon,size:c._source.size,status:"uploaded"})),className:"text-left"})})]})},Va=({name:e,className:t,style:s,...n})=>l.jsx("svg",{className:`icon dark:drop-shadow-[0_0_6px_rgb(255,255,255)] ${t||""}`,style:s,...n,children:l.jsx("use",{xlinkHref:`#${e}`})});function Ma(){const[e,t]=g.useState(),[s,n]=g.useState(),[r,i]=g.useState(),[o,a]=g.useState(),[c,d]=g.useState(),[u,h]=g.useState(),[p,m]=g.useState(),[v,A]=g.useState([]),C={deal_query_intent:g.useCallback(b=>{t(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_tools:g.useCallback(b=>{n(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_fetch_source:g.useCallback(b=>{i(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_pick_source:g.useCallback(b=>{a(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_deep_read:g.useCallback(b=>{d(x=>x?{...x,message_chunk:(x.message_chunk||"")+"&"+(b.message_chunk||"")}:b)},[]),deal_think:g.useCallback(b=>{h(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_response:g.useCallback(b=>{m(x=>x?{...x,message_chunk:(x.message_chunk||"")+(b.message_chunk||"")}:b)},[]),deal_deep_research:g.useCallback(b=>{A(x=>[...x,b])},[])};return{data:{query_intent:e,tools:s,fetch_source:r,pick_source:o,deep_read:c,think:u,response:p,deepResearch:v},handlers:C,clearAllChunkData:()=>new Promise(b=>{t(void 0),n(void 0),i(void 0),a(void 0),d(void 0),h(void 0),m(void 0),A([]),setTimeout(b,0)})}}const Bs=g.createContext({});function Os(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Is=typeof window<"u",ti=Is?g.useLayoutEffect:g.useEffect,Wt=g.createContext(null);function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function Us(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const be=(e,t,s)=>s>t?t:s<e?e:s;function ps(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let He=()=>{},we=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(He=(e,t,s)=>{!e&&typeof console<"u"&&console.warn(ps(t,s))},we=(e,t,s)=>{if(!e)throw new Error(ps(t,s))});const Ae={},si=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ni(e){return typeof e=="object"&&e!==null}const ri=e=>/^0[^.\s]+$/u.test(e);function Ws(e){let t;return()=>(t===void 0&&(t=e()),t)}const pe=e=>e,Da=(e,t)=>s=>t(e(s)),yt=(...e)=>e.reduce(Da),ht=(e,t,s)=>{const n=t-e;return n===0?1:(s-e)/n};class qs{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>Us(this.subscriptions,t)}notify(t,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,s,n);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,fe=e=>e/1e3;function ii(e,t){return t?e*(1e3/t):0}const Fn=new Set;function Ks(e,t,s){e||Fn.has(t)||(console.warn(ps(t,s)),Fn.add(t))}const oi=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,Fa=1e-7,La=12;function Ba(e,t,s,n,r){let i,o,a=0;do o=t+(s-t)/2,i=oi(o,n,r)-e,i>0?s=o:t=o;while(Math.abs(i)>Fa&&++a<La);return o}function xt(e,t,s,n){if(e===t&&s===n)return pe;const r=i=>Ba(i,0,1,e,s);return i=>i===0||i===1?i:oi(r(i),t,n)}const ai=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,li=e=>t=>1-e(1-t),ci=xt(.33,1.53,.69,.99),Ys=li(ci),ui=ai(Ys),di=e=>(e*=2)<1?.5*Ys(e):.5*(2-Math.pow(2,-10*(e-1))),zs=e=>1-Math.sin(Math.acos(e)),hi=li(zs),fi=ai(zs),Oa=xt(.42,0,1,1),Ia=xt(0,0,.58,1),pi=xt(.42,0,.58,1),_a=e=>Array.isArray(e)&&typeof e[0]!="number",mi=e=>Array.isArray(e)&&typeof e[0]=="number",Ln={linear:pe,easeIn:Oa,easeInOut:pi,easeOut:Ia,circIn:zs,circInOut:fi,circOut:hi,backIn:Ys,backInOut:ui,backOut:ci,anticipate:di},Ua=e=>typeof e=="string",Bn=e=>{if(mi(e)){we(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,s,n,r]=e;return xt(t,s,n,r)}else if(Ua(e))return we(Ln[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ln[e];return e},Tt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Wa(e,t){let s=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,h=!1,p=!1)=>{const v=p&&r?s:n;return h&&o.add(u),v.has(u)||v.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[s,n]=[n,s],s.forEach(c),s.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const qa=40;function gi(e,t){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=Tt.reduce((x,R)=>(x[R]=Wa(i),x),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:p,render:m,postRender:v}=o,A=()=>{const x=Ae.useManualTiming?r.timestamp:performance.now();s=!1,Ae.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(x-r.timestamp,qa),1)),r.timestamp=x,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),h.process(r),p.process(r),m.process(r),v.process(r),r.isProcessing=!1,s&&t&&(n=!1,e(A))},C=()=>{s=!0,n=!0,r.isProcessing||e(A)};return{schedule:Tt.reduce((x,R)=>{const P=o[R];return x[R]=(M,E=!1,T=!1)=>(s||C(),P.schedule(M,E,T)),x},{}),cancel:x=>{for(let R=0;R<Tt.length;R++)o[Tt[R]].cancel(x)},state:r,steps:o}}const{schedule:W,cancel:Te,state:te,steps:Zt}=gi(typeof requestAnimationFrame<"u"?requestAnimationFrame:pe,!0);let jt;function Ka(){jt=void 0}const ie={now:()=>(jt===void 0&&ie.set(te.isProcessing||Ae.useManualTiming?te.timestamp:performance.now()),jt),set:e=>{jt=e,queueMicrotask(Ka)}},yi=e=>t=>typeof t=="string"&&t.startsWith(e),xi=yi("--"),Ya=yi("var(--"),Gs=e=>Ya(e)?za.test(e.split("/*")[0].trim()):!1,za=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function On(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Xe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ft={...Xe,transform:e=>be(0,1,e)},St={...Xe,default:1},ct=e=>Math.round(e*1e5)/1e5,Js=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(e){return e==null}const Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qs=(e,t)=>s=>!!(typeof s=="string"&&Ja.test(s)&&s.startsWith(e)||t&&!Ga(s)&&Object.prototype.hasOwnProperty.call(s,t)),vi=(e,t,s)=>n=>{if(typeof n!="string")return n;const[r,i,o,a]=n.match(Js);return{[e]:parseFloat(r),[t]:parseFloat(i),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Qa=e=>be(0,255,e),$t={...Xe,transform:e=>Math.round(Qa(e))},De={test:Qs("rgb","red"),parse:vi("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:n=1})=>"rgba("+$t.transform(e)+", "+$t.transform(t)+", "+$t.transform(s)+", "+ct(ft.transform(n))+")"};function Ha(e){let t="",s="",n="",r="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),n=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),n=e.substring(3,4),r=e.substring(4,5),t+=t,s+=s,n+=n,r+=r),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const ms={test:Qs("#"),parse:Ha,transform:De.transform},vt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ce=vt("deg"),ve=vt("%"),S=vt("px"),Xa=vt("vh"),Za=vt("vw"),In={...ve,parse:e=>ve.parse(e)/100,transform:e=>ve.transform(e*100)},Ue={test:Qs("hsl","hue"),parse:vi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:n=1})=>"hsla("+Math.round(e)+", "+ve.transform(ct(t))+", "+ve.transform(ct(s))+", "+ct(ft.transform(n))+")"},H={test:e=>De.test(e)||ms.test(e)||Ue.test(e),parse:e=>De.test(e)?De.parse(e):Ue.test(e)?Ue.parse(e):ms.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?De.transform(e):Ue.transform(e),getAnimatableNone:e=>{const t=H.parse(e);return t.alpha=0,H.transform(t)}},$a=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function el(e){return isNaN(e)&&typeof e=="string"&&(e.match(Js)?.length||0)+(e.match($a)?.length||0)>0}const bi="number",wi="color",tl="var",sl="var(",_n="${}",nl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pt(e){const t=e.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(nl,c=>(H.test(c)?(n.color.push(i),r.push(wi),s.push(H.parse(c))):c.startsWith(sl)?(n.var.push(i),r.push(tl),s.push(c)):(n.number.push(i),r.push(bi),s.push(parseFloat(c))),++i,_n)).split(_n);return{values:s,split:a,indexes:n,types:r}}function Ai(e){return pt(e).values}function Ci(e){const{split:t,types:s}=pt(e),n=t.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],r[o]!==void 0){const a=s[o];a===bi?i+=ct(r[o]):a===wi?i+=H.transform(r[o]):i+=r[o]}return i}}const rl=e=>typeof e=="number"?0:H.test(e)?H.getAnimatableNone(e):e;function il(e){const t=Ai(e);return Ci(e)(t.map(rl))}const Se={test:el,parse:Ai,createTransformer:Ci,getAnimatableNone:il};function es(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function ol({hue:e,saturation:t,lightness:s,alpha:n}){e/=360,t/=100,s/=100;let r=0,i=0,o=0;if(!t)r=i=o=s;else{const a=s<.5?s*(1+t):s+t-s*t,c=2*s-a;r=es(c,a,e+1/3),i=es(c,a,e),o=es(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}function Dt(e,t){return s=>s>0?t:e}const Y=(e,t,s)=>e+(t-e)*s,ts=(e,t,s)=>{const n=e*e,r=s*(t*t-n)+n;return r<0?0:Math.sqrt(r)},al=[ms,De,Ue],ll=e=>al.find(t=>t.test(e));function Un(e){const t=ll(e);if(He(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===Ue&&(s=ol(s)),s}const Wn=(e,t)=>{const s=Un(e),n=Un(t);if(!s||!n)return Dt(e,t);const r={...s};return i=>(r.red=ts(s.red,n.red,i),r.green=ts(s.green,n.green,i),r.blue=ts(s.blue,n.blue,i),r.alpha=Y(s.alpha,n.alpha,i),De.transform(r))},gs=new Set(["none","hidden"]);function cl(e,t){return gs.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function ul(e,t){return s=>Y(e,t,s)}function Hs(e){return typeof e=="number"?ul:typeof e=="string"?Gs(e)?Dt:H.test(e)?Wn:fl:Array.isArray(e)?ki:typeof e=="object"?H.test(e)?Wn:dl:Dt}function ki(e,t){const s=[...e],n=s.length,r=e.map((i,o)=>Hs(i)(i,t[o]));return i=>{for(let o=0;o<n;o++)s[o]=r[o](i);return s}}function dl(e,t){const s={...e,...t},n={};for(const r in s)e[r]!==void 0&&t[r]!==void 0&&(n[r]=Hs(e[r])(e[r],t[r]));return r=>{for(const i in n)s[i]=n[i](r);return s}}function hl(e,t){const s=[],n={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][n[i]],a=e.values[o]??0;s[r]=a,n[i]++}return s}const fl=(e,t)=>{const s=Se.createTransformer(t),n=pt(e),r=pt(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?gs.has(e)&&!r.values.length||gs.has(t)&&!n.values.length?cl(e,t):yt(ki(hl(n,r),r.values),s):(He(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Dt(e,t))};function Ti(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?Y(e,t,s):Hs(e)(e,t)}const pl=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>W.update(t,s),stop:()=>Te(t),now:()=>te.isProcessing?te.timestamp:ie.now()}},Si=(e,t,s=10)=>{let n="";const r=Math.max(Math.round(t/s),2);for(let i=0;i<r;i++)n+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Ft=2e4;function Xs(e){let t=0;const s=50;let n=e.next(t);for(;!n.done&&t<Ft;)t+=s,n=e.next(t);return t>=Ft?1/0:t}function ml(e,t=100,s){const n=s({...e,keyframes:[0,t]}),r=Math.min(Xs(n),Ft);return{type:"keyframes",ease:i=>n.next(r*i).value/t,duration:fe(r)}}const gl=5;function Ei(e,t,s){const n=Math.max(t-gl,0);return ii(s-e(n),t-n)}const K={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ss=.001;function yl({duration:e=K.duration,bounce:t=K.bounce,velocity:s=K.velocity,mass:n=K.mass}){let r,i;He(e<=xe(K.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=be(K.minDamping,K.maxDamping,o),e=be(K.minDuration,K.maxDuration,fe(e)),o<1?(r=d=>{const u=d*o,h=u*e,p=u-s,m=ys(d,o),v=Math.exp(-h);return ss-p/m*v},i=d=>{const h=d*o*e,p=h*s+s,m=Math.pow(o,2)*Math.pow(d,2)*e,v=Math.exp(-h),A=ys(Math.pow(d,2),o);return(-r(d)+ss>0?-1:1)*((p-m)*v)/A}):(r=d=>{const u=Math.exp(-d*e),h=(d-s)*e+1;return-ss+u*h},i=d=>{const u=Math.exp(-d*e),h=(s-d)*(e*e);return u*h});const a=5/e,c=vl(r,i,a);if(e=xe(e),isNaN(c))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const d=Math.pow(c,2)*n;return{stiffness:d,damping:o*2*Math.sqrt(n*d),duration:e}}}const xl=12;function vl(e,t,s){let n=s;for(let r=1;r<xl;r++)n=n-e(n)/t(n);return n}function ys(e,t){return e*Math.sqrt(1-t*t)}const bl=["duration","bounce"],wl=["stiffness","damping","mass"];function qn(e,t){return t.some(s=>e[s]!==void 0)}function Al(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!qn(e,wl)&&qn(e,bl))if(e.visualDuration){const s=e.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,i=2*be(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:K.mass,stiffness:r,damping:i}}else{const s=yl(e);t={...t,...s,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Lt(e=K.visualDuration,t=K.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:r}=s;const i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:d,mass:u,duration:h,velocity:p,isResolvedFromDuration:m}=Al({...s,velocity:-fe(s.velocity||0)}),v=p||0,A=d/(2*Math.sqrt(c*u)),C=o-i,y=fe(Math.sqrt(c/u)),b=Math.abs(C)<5;n||(n=b?K.restSpeed.granular:K.restSpeed.default),r||(r=b?K.restDelta.granular:K.restDelta.default);let x;if(A<1){const P=ys(y,A);x=M=>{const E=Math.exp(-A*y*M);return o-E*((v+A*y*C)/P*Math.sin(P*M)+C*Math.cos(P*M))}}else if(A===1)x=P=>o-Math.exp(-y*P)*(C+(v+y*C)*P);else{const P=y*Math.sqrt(A*A-1);x=M=>{const E=Math.exp(-A*y*M),T=Math.min(P*M,300);return o-E*((v+A*y*C)*Math.sinh(T)+P*C*Math.cosh(T))/P}}const R={calculatedDuration:m&&h||null,next:P=>{const M=x(P);if(m)a.done=P>=h;else{let E=P===0?v:0;A<1&&(E=P===0?xe(v):Ei(x,P,M));const T=Math.abs(E)<=n,D=Math.abs(o-M)<=r;a.done=T&&D}return a.value=a.done?o:M,a},toString:()=>{const P=Math.min(Xs(R),Ft),M=Si(E=>R.next(P*E).value,P,30);return P+"ms "+M},toTransition:()=>{}};return R}Lt.applyToOptions=e=>{const t=ml(e,100,Lt);return e.ease=t.ease,e.duration=xe(t.duration),e.type="keyframes",e};function xs({keyframes:e,velocity:t=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},m=T=>a!==void 0&&T<a||c!==void 0&&T>c,v=T=>a===void 0?c:c===void 0||Math.abs(a-T)<Math.abs(c-T)?a:c;let A=s*t;const C=h+A,y=o===void 0?C:o(C);y!==C&&(A=y-h);const b=T=>-A*Math.exp(-T/n),x=T=>y+b(T),R=T=>{const D=b(T),_=x(T);p.done=Math.abs(D)<=d,p.value=p.done?y:_};let P,M;const E=T=>{m(p.value)&&(P=T,M=Lt({keyframes:[p.value,v(p.value)],velocity:Ei(x,T,p.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return E(0),{calculatedDuration:null,next:T=>{let D=!1;return!M&&P===void 0&&(D=!0,R(T),E(T)),P!==void 0&&T>=P?M.next(T-P):(!D&&R(T),p)}}}function Cl(e,t,s){const n=[],r=s||Ae.mix||Ti,i=e.length-1;for(let o=0;o<i;o++){let a=r(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||pe:t;a=yt(c,a)}n.push(a)}return n}function kl(e,t,{clamp:s=!0,ease:n,mixer:r}={}){const i=e.length;if(we(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Cl(t,n,r),c=a.length,d=u=>{if(o&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=ht(e[h],e[h+1],u);return a[h](p)};return s?u=>d(be(e[0],e[i-1],u)):d}function Tl(e,t){const s=e[e.length-1];for(let n=1;n<=t;n++){const r=ht(0,t,n);e.push(Y(s,1,r))}}function Sl(e){const t=[0];return Tl(t,e.length-1),t}function El(e,t){return e.map(s=>s*t)}function Pl(e,t){return e.map(()=>t||pi).splice(0,e.length-1)}function We({duration:e=300,keyframes:t,times:s,ease:n="easeInOut"}){const r=_a(n)?n.map(Bn):Bn(n),i={done:!1,value:t[0]},o=El(s&&s.length===t.length?s:Sl(t),e),a=kl(o,t,{ease:Array.isArray(r)?r:Pl(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const jl=e=>e!==null;function Zs(e,{repeat:t,repeatType:s="loop"},n,r=1){const i=e.filter(jl),a=r<0||t&&s!=="loop"&&t%2===1?0:i.length-1;return!a||n===void 0?i[a]:n}const Rl={decay:xs,inertia:xs,tween:We,keyframes:We,spring:Lt};function Pi(e){typeof e.type=="string"&&(e.type=Rl[e.type])}class $s{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const Nl=e=>e/100;class en extends $s{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==ie.now()&&this.tick(ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Pi(t);const{type:s=We,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=s||We;process.env.NODE_ENV!=="production"&&c!==We&&we(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==We&&typeof a[0]!="number"&&(this.mixKeyframes=yt(Nl,Ti(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Xs(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=d}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:m,type:v,onUpdate:A,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?y<0:y>r;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,R=n;if(h){const T=Math.min(this.currentTime,r)/a;let D=Math.floor(T),_=T%1;!_&&T>=1&&(_=1),_===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(_=1-_,m&&(_-=m/a)):p==="mirror"&&(R=o)),x=be(0,1,_)*a}const P=b?{done:!1,value:u[0]}:R.next(x);i&&(P.value=i(P.value));let{done:M}=P;!b&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return E&&v!==xs&&(P.value=Zs(u,this.options,C,this.speed)),A&&A(P.value),E&&this.finish(),P}then(t,s){return this.finished.then(t,s)}get duration(){return fe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fe(t)}get time(){return fe(this.currentTime)}set time(t){t=xe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ie.now());const s=this.playbackSpeed!==t;this.playbackSpeed=t,s&&(this.time=fe(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=pl,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Vl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Fe=e=>e*180/Math.PI,vs=e=>{const t=Fe(Math.atan2(e[1],e[0]));return bs(t)},Ml={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vs,rotateZ:vs,skewX:e=>Fe(Math.atan(e[1])),skewY:e=>Fe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bs=e=>(e=e%360,e<0&&(e+=360),e),Kn=vs,Yn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Dl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Yn,scaleY:zn,scale:e=>(Yn(e)+zn(e))/2,rotateX:e=>bs(Fe(Math.atan2(e[6],e[5]))),rotateY:e=>bs(Fe(Math.atan2(-e[2],e[0]))),rotateZ:Kn,rotate:Kn,skewX:e=>Fe(Math.atan(e[4])),skewY:e=>Fe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ws(e){return e.includes("scale")?1:0}function As(e,t){if(!e||e==="none")return ws(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=Dl,r=s;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ml,r=a}if(!r)return ws(t);const i=n[t],o=r[1].split(",").map(Ll);return typeof i=="function"?i(o):o[i]}const Fl=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return As(s,t)};function Ll(e){return parseFloat(e.trim())}const Ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$e=new Set(Ze),Gn=e=>e===Xe||e===S,Bl=new Set(["x","y","z"]),Ol=Ze.filter(e=>!Bl.has(e));function Il(e){const t=[];return Ol.forEach(s=>{const n=e.getValue(s);n!==void 0&&(t.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),t}const ke={width:({x:e},{paddingLeft:t="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),height:({y:e},{paddingTop:t="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(t)-parseFloat(s),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>As(t,"x"),y:(e,{transform:t})=>As(t,"y")};ke.translateX=ke.x;ke.translateY=ke.y;const Le=new Set;let Cs=!1,ks=!1,Ts=!1;function ji(){if(ks){const e=Array.from(Le).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),s=new Map;t.forEach(n=>{const r=Il(n);r.length&&(s.set(n,r),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([i,o])=>{n.getValue(i)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ks=!1,Cs=!1,Le.forEach(e=>e.complete(Ts)),Le.clear()}function Ri(){Le.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ks=!0)})}function _l(){Ts=!0,Ri(),ji(),Ts=!1}class tn{constructor(t,s,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Le.add(this),Cs||(Cs=!0,W.read(Ri),W.resolveKeyframes(ji))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:n,motionValue:r}=this;if(t[0]===null){const i=r?.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&s){const a=n.readValue(s,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}Vl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Le.delete(this)}cancel(){this.state==="scheduled"&&(Le.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ul=e=>e.startsWith("--");function Wl(e,t,s){Ul(t)?e.style.setProperty(t,s):e.style[t]=s}const ql=Ws(()=>window.ScrollTimeline!==void 0),Kl={};function Yl(e,t){const s=Ws(e);return()=>Kl[t]??s()}const Ni=Yl(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),at=([e,t,s,n])=>`cubic-bezier(${e}, ${t}, ${s}, ${n})`,Jn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:at([0,.65,.55,1]),circOut:at([.55,0,1,.45]),backIn:at([.31,.01,.66,-.59]),backOut:at([.33,1.53,.69,.99])};function Vi(e,t){if(e)return typeof e=="function"?Ni()?Si(e,t):"ease-out":mi(e)?at(e):Array.isArray(e)?e.map(s=>Vi(s,t)||Jn.easeOut):Jn[e]}function zl(e,t,s,{delay:n=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:s};c&&(u.offset=c);const h=Vi(a,r);Array.isArray(h)&&(u.easing=h);const p={delay:n,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function Mi(e){return typeof e=="function"&&"applyToOptions"in e}function Gl({type:e,...t}){return Mi(e)&&Ni()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Jl extends $s{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,we(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Gl(t);this.animation=zl(s,n,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Zs(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):Wl(s,n,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return fe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+fe(t)}get time(){return fe(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ql()?(this.animation.timeline=t,pe):s(this)}}const Di={anticipate:di,backInOut:ui,circInOut:fi};function Ql(e){return e in Di}function Hl(e){typeof e.ease=="string"&&Ql(e.ease)&&(e.ease=Di[e.ease])}const ns=10;class Xl extends Jl{constructor(t){Hl(t),Pi(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:n,onComplete:r,element:i,...o}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const a=new en({...o,autoplay:!1}),c=Math.max(ns,ie.now()-this.startTime),d=be(0,ns,c-ns);s.setWithVelocity(a.sample(Math.max(0,c-d)).value,a.sample(c).value,d),a.stop()}}const Qn=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Se.test(e)||e==="0")&&!e.startsWith("url("));function Zl(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function $l(e,t,s,n){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Qn(r,t),a=Qn(i,t);return He(o===a,`You are trying to animate ${t} from "${r}" to "${i}". "${o?i:r}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Zl(e)||(s==="spring"||Mi(s))&&n}function Ss(e){e.duration=0,e.type="keyframes"}const ec=new Set(["opacity","clipPath","filter","transform"]),tc=Ws(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sc(e){const{motionValue:t,name:s,repeatDelay:n,repeatType:r,damping:i,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return tc()&&s&&ec.has(s)&&(s!=="transform"||!d)&&!c&&!n&&r!=="mirror"&&i!==0&&o!=="inertia"}const nc=40;class rc extends $s{constructor({autoplay:t=!0,delay:s=0,type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:d,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ie.now();const p={autoplay:t,delay:s,type:n,repeat:r,repeatDelay:i,repeatType:o,name:c,motionValue:d,element:u,...h},m=u?.KeyframeResolver||tn;this.keyframeResolver=new m(a,(v,A,C)=>this.onKeyframesResolved(v,A,p,!C),c,d,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:d,onUpdate:u}=n;this.resolvedAt=ie.now(),$l(t,i,o,a)||((Ae.instantAnimations||!c)&&u?.(Zs(t,n,s)),t[0]=t[t.length-1],Ss(n),n.repeat=0);const p={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>nc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:t},m=!d&&sc(p)?new Xl({...p,element:p.motionValue.owner.current}):new en(p);m.finished.then(()=>this.notifyFinished()).catch(pe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),_l()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ic=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oc(e){const t=ic.exec(e);if(!t)return[,];const[,s,n,r]=t;return[`--${s??n}`,r]}const ac=4;function Fi(e,t,s=1){we(s<=ac,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,r]=oc(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const o=i.trim();return si(o)?parseFloat(o):o}return Gs(r)?Fi(r,t,s+1):r}function sn(e,t){return e?.[t]??e?.default??e}const Li=new Set(["width","height","top","left","right","bottom",...Ze]),lc={test:e=>e==="auto",parse:e=>e},Bi=e=>t=>t.test(e),Oi=[Xe,S,ve,Ce,Za,Xa,lc],Hn=e=>Oi.find(Bi(e));function cc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ri(e):!0}const uc=new Set(["brightness","contrast","saturate","opacity"]);function dc(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=s.match(Js)||[];if(!n)return e;const r=s.replace(n,"");let i=uc.has(t)?1:0;return n!==s&&(i*=100),t+"("+i+r+")"}const hc=/\b([a-z-]*)\(.*?\)/gu,Es={...Se,getAnimatableNone:e=>{const t=e.match(hc);return t?t.map(dc).join(" "):e}},Xn={...Xe,transform:Math.round},fc={rotate:Ce,rotateX:Ce,rotateY:Ce,rotateZ:Ce,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:Ce,skewX:Ce,skewY:Ce,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:ft,originX:In,originY:In,originZ:S},nn={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,backgroundPositionX:S,backgroundPositionY:S,...fc,zIndex:Xn,fillOpacity:ft,strokeOpacity:ft,numOctaves:Xn},pc={...nn,color:H,backgroundColor:H,outlineColor:H,fill:H,stroke:H,borderColor:H,borderTopColor:H,borderRightColor:H,borderBottomColor:H,borderLeftColor:H,filter:Es,WebkitFilter:Es},Ii=e=>pc[e];function _i(e,t){let s=Ii(e);return s!==Es&&(s=Se),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const mc=new Set(["auto","none","0"]);function gc(e,t,s){let n=0,r;for(;n<e.length&&!r;){const i=e[n];typeof i=="string"&&!mc.has(i)&&pt(i).values.length&&(r=e[n]),n++}if(r&&s)for(const i of t)e[i]=_i(s,r)}class yc extends tn{constructor(t,s,n,r,i){super(t,s,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),Gs(h))){const p=Fi(h,s.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Li.has(n)||t.length!==2)return;const[r,i]=t,o=Hn(r),a=Hn(i),c=On(r),d=On(i);if(c!==d&&ke[n]){this.needsMeasurement=!0;return}if(o!==a)if(Gn(o)&&Gn(a))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else ke[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,n=[];for(let r=0;r<t.length;r++)(t[r]===null||cc(t[r]))&&n.push(r);n.length&&gc(t,n,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ke[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const r=s[s.length-1];r!==void 0&&t.getValue(n,r).jump(r,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const r=t.getValue(s);r&&r.jump(this.measuredOrigin,!1);const i=n.length-1,o=n[i];n[i]=ke[s](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function xc(e,t,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const r=s?.[e]??n.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Ui=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Wi(e){return ni(e)&&"offsetHeight"in e}const Zn=30,vc=e=>!isNaN(parseFloat(e));class bc{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const r=ie.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=ie.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ks(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new qs);const n=this.events[t].add(s);return t==="change"?()=>{n(),W.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zn)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Zn);return ii(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(e,t){return new bc(e,t)}const{schedule:rn}=gi(queueMicrotask,!1),ge={x:!1,y:!1};function qi(){return ge.x||ge.y}function wc(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function Ki(e,t){const s=xc(e),n=new AbortController,r={passive:!0,...t,signal:n.signal};return[s,r,()=>n.abort()]}function $n(e){return!(e.pointerType==="touch"||qi())}function Ac(e,t,s={}){const[n,r,i]=Ki(e,s),o=a=>{if(!$n(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=h=>{$n(h)&&(d(h),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return n.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const Yi=(e,t)=>t?e===t?!0:Yi(e,t.parentElement):!1,on=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Cc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zi(e){return Cc.has(e.tagName)||e.isContentEditable===!0}const Rt=new WeakSet;function er(e){return t=>{t.key==="Enter"&&e(t)}}function rs(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const kc=(e,t)=>{const s=e.currentTarget;if(!s)return;const n=er(()=>{if(Rt.has(s))return;rs(s,"down");const r=er(()=>{rs(s,"up")}),i=()=>rs(s,"cancel");s.addEventListener("keyup",r,t),s.addEventListener("blur",i,t)});s.addEventListener("keydown",n,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),t)};function tr(e){return on(e)&&!qi()}function Tc(e,t,s={}){const[n,r,i]=Ki(e,s),o=a=>{const c=a.currentTarget;if(!tr(a))return;Rt.add(c);const d=t(c,a),u=(m,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),Rt.has(c)&&Rt.delete(c),tr(m)&&typeof d=="function"&&d(m,{success:v})},h=m=>{u(m,c===window||c===document||s.useGlobalTarget||Yi(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",h,r),window.addEventListener("pointercancel",p,r)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Wi(a)&&(a.addEventListener("focus",d=>kc(d,r)),!zi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Gi(e){return ni(e)&&"ownerSVGElement"in e}function Sc(e){return Gi(e)&&e.tagName==="svg"}const ne=e=>!!(e&&e.getVelocity),Ec=[...Oi,H,Se],Pc=e=>Ec.find(Bi(e)),an=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jc(...e){return t=>{let s=!1;const n=e.map(r=>{const i=sr(r,t);return!s&&typeof i=="function"&&(s=!0),i});if(s)return()=>{for(let r=0;r<n.length;r++){const i=n[r];typeof i=="function"?i():sr(e[r],null)}}}}function Rc(...e){return _t.useCallback(jc(...e),e)}class Nc extends _t.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(s&&t.isPresent&&!this.props.isPresent){const n=s.offsetParent,r=Wi(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=s.offsetHeight||0,i.width=s.offsetWidth||0,i.top=s.offsetTop,i.left=s.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Vc({children:e,isPresent:t,anchorX:s,root:n}){const r=g.useId(),i=g.useRef(null),o=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=g.useContext(an),c=e.props?.ref??e?.ref,d=Rc(i,c);return g.useInsertionEffect(()=>{const{width:u,height:h,top:p,left:m,right:v}=o.current;if(t||!i.current||!u||!h)return;const A=s==="left"?`left: ${m}`:`right: ${v}`;i.current.dataset.motionPopId=r;const C=document.createElement("style");a&&(C.nonce=a);const y=n??document.head;return y.appendChild(C),C.sheet&&C.sheet.insertRule(`
34
34
  [data-motion-pop-id="${r}"] {
35
35
  position: absolute !important;
36
36
  width: ${u}px !important;
@@ -38,4 +38,4 @@ React keys must be passed directly to JSX without using spread:
38
38
  ${A}px !important;
39
39
  top: ${p}px !important;
40
40
  }
41
- `),()=>{y.contains(C)&&y.removeChild(C)}},[t]),l.jsx(Nc,{isPresent:t,childRef:i,sizeRef:o,children:_t.cloneElement(e,{ref:d})})}const Mc=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const d=Bs(Dc),u=g.useId();let h=!0,p=g.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:s,custom:r,onExitComplete:m=>{d.set(m,!0);for(const b of d.values())if(!b)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[s,d,n]);return i&&h&&(p={...p}),g.useMemo(()=>{d.forEach((m,b)=>d.set(b,!1))},[s]),_t.useEffect(()=>{!s&&!d.size&&n&&n()},[s]),o==="popLayout"&&(e=l.jsx(Vc,{isPresent:s,anchorX:a,root:c,children:e})),l.jsx(Wt.Provider,{value:p,children:e})};function Dc(){return new Map}function Gi(e=!0){const t=g.useContext(Wt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:r}=t,i=g.useId();g.useEffect(()=>{if(e)return r(i)},[e]);const o=g.useCallback(()=>e&&n&&n(i),[i,n,e]);return!s&&n?[!1,o]:[!0]}const Et=e=>e.key||"";function sr(e){const t=[];return g.Children.forEach(e,s=>{g.isValidElement(s)&&t.push(s)}),t}const Fc=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[d,u]=Gi(o),h=g.useMemo(()=>sr(e),[e]),p=o&&!d?[]:h.map(Et),m=g.useRef(!0),b=g.useRef(h),A=Bs(()=>new Map),C=g.useRef(new Set),[y,v]=g.useState(h),[x,R]=g.useState(h);ei(()=>{m.current=!1,b.current=h;for(let E=0;E<x.length;E++){const S=Et(x[E]);p.includes(S)?(A.delete(S),C.current.delete(S)):A.get(S)!==!0&&A.set(S,!1)}},[x,p.length,p.join("-")]);const P=[];if(h!==y){let E=[...h];for(let S=0;S<x.length;S++){const F=x[S],U=Et(F);p.includes(U)||(E.splice(S,0,F),P.push(F))}return i==="wait"&&P.length&&(E=P),R(sr(E)),v(h),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:M}=g.useContext(Ls);return l.jsx(l.Fragment,{children:x.map(E=>{const S=Et(E),F=o&&!d?!1:h===x||p.includes(S),U=()=>{if(C.current.has(S))return;if(C.current.add(S),A.has(S))A.set(S,!0);else return;let H=!0;A.forEach(X=>{X||(H=!1)}),H&&(M?.(),R(b.current),o&&u?.(),n&&n())};return l.jsx(Mc,{isPresent:F,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:c,onExitComplete:F?void 0:U,anchorX:a,children:E},S)})})},Ji=g.createContext({strict:!1}),nr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ge={};for(const e in nr)Ge[e]={isEnabled:t=>nr[e].some(s=>!!t[s])};function Lc(e){for(const t in e)Ge[t]={...Ge[t],...e[t]}}const Bc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Bt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Bc.has(e)}let Qi=e=>!Bt(e);function Oc(e){typeof e=="function"&&(Qi=t=>t.startsWith("on")?!Bt(t):e(t))}try{Oc(require("@emotion/is-prop-valid").default)}catch{}function Ic(e,t,s){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||(Qi(r)||s===!0&&Bt(r)||!t&&!Bt(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const qt=g.createContext({});function Kt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function mt(e){return typeof e=="string"||Array.isArray(e)}const an=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ln=["initial",...an];function Yt(e){return Kt(e.animate)||ln.some(t=>mt(e[t]))}function Hi(e){return!!(Yt(e)||e.variants)}function _c(e,t){if(Yt(e)){const{initial:s,animate:n}=e;return{initial:s===!1||mt(s)?s:void 0,animate:mt(n)?n:void 0}}return e.inherit!==!1?t:{}}function Uc(e){const{initial:t,animate:s}=_c(e,g.useContext(qt));return g.useMemo(()=>({initial:t,animate:s}),[rr(t),rr(s)])}function rr(e){return Array.isArray(e)?e.join(" "):e}function ir(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const it={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(T.test(e))e=parseFloat(e);else return e;const s=ir(e,t.target.x),n=ir(e,t.target.y);return`${s}% ${n}%`}},Wc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,r=Ee.parse(e);if(r.length>5)return n;const i=Ee.createTransformer(e),o=typeof r[0]!="number"?1:0,a=s.x.scale*t.x,c=s.y.scale*t.y;r[0+o]/=a,r[1+o]/=c;const d=Y(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}},Es={borderRadius:{...it,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomLeftRadius:it,borderBottomRightRadius:it,boxShadow:Wc};function Xi(e,{layout:t,layoutId:s}){return Xe.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!Es[e]||e==="opacity")}const qc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kc=He.length;function Yc(e,t,s){let n="",r=!0;for(let i=0;i<Kc;i++){const o=He[i],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||s){const d=_i(a,sn[o]);if(!c){r=!1;const u=qc[o]||o;n+=`${u}(${d}) `}s&&(t[o]=d)}}return n=n.trim(),s?n=s(t,r?"":n):r&&(n="none"),n}function cn(e,t,s){const{style:n,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const d=t[c];if(Xe.has(c)){o=!0;continue}else if(yi(c)){r[c]=d;continue}else{const u=_i(d,sn[c]);c.startsWith("origin")?(a=!0,i[c]=u):n[c]=u}}if(t.transform||(o||s?n.transform=Yc(t,e.transform,s):n.transform&&(n.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=i;n.transformOrigin=`${c} ${d} ${u}`}}const un=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zi(e,t,s){for(const n in t)!se(t[n])&&!Xi(n,s)&&(e[n]=t[n])}function zc({transformTemplate:e},t){return g.useMemo(()=>{const s=un();return cn(s,t,e),Object.assign({},s.vars,s.style)},[t])}function Gc(e,t){const s=e.style||{},n={};return Zi(n,s,e),Object.assign(n,zc(e,t)),n}function Jc(e,t){const s={},n=Gc(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const Qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hc={offset:"strokeDashoffset",array:"strokeDasharray"};function Xc(e,t,s=1,n=0,r=!0){e.pathLength=1;const i=r?Qc:Hc;e[i.offset]=T.transform(-n);const o=T.transform(t),a=T.transform(s);e[i.array]=`${o} ${a}`}const Zc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function $i(e,{attrX:t,attrY:s,attrScale:n,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},c,d,u){if(cn(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const m of Zc)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),r!==void 0&&Xc(h,r,i,o,!1)}const eo=()=>({...un(),attrs:{}}),to=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $c(e,t,s,n){const r=g.useMemo(()=>{const i=eo();return $i(i,t,to(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Zi(i,e.style,e),r.style={...i,...r.style}}return r}const eu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dn(e){return typeof e!="string"||e.includes("-")?!1:!!(eu.indexOf(e)>-1||/[A-Z]/u.test(e))}function tu(e,t,s,{latestValues:n},r,i=!1,o){const c=(o??dn(e)?$c:Jc)(t,n,r,e),d=Ic(t,typeof e=="string",i),u=e!==g.Fragment?{...d,...c,ref:s}:{},{children:h}=t,p=g.useMemo(()=>se(h)?h.get():h,[h]);return g.createElement(e,{...u,children:p})}function or(e){const t=[{},{}];return e?.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function hn(e,t,s,n){if(typeof t=="function"){const[r,i]=or(n);t=t(s!==void 0?s:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=or(n);t=t(s!==void 0?s:e.custom,r,i)}return t}function Nt(e){return se(e)?e.get():e}function su({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,r){return{latestValues:nu(s,n,r,e),renderState:t()}}function nu(e,t,s,n){const r={},i=n(e,{});for(const p in i)r[p]=Nt(i[p]);let{initial:o,animate:a}=e;const c=Yt(e),d=Hi(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=s?s.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Kt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const b=hn(e,p[m]);if(b){const{transitionEnd:A,transition:C,...y}=b;for(const v in y){let x=y[v];if(Array.isArray(x)){const R=u?x.length-1:0;x=x[R]}x!==null&&(r[v]=x)}for(const v in A)r[v]=A[v]}}}return r}const so=e=>(t,s)=>{const n=g.useContext(qt),r=g.useContext(Wt),i=()=>su(e,t,n,r);return s?i():Bs(i)};function fn(e,t,s){const{style:n}=e,r={};for(const i in n)(se(n[i])||t.style&&se(t.style[i])||Xi(i,e)||s?.getValue(i)?.liveStyle!==void 0)&&(r[i]=n[i]);return r}const ru=so({scrapeMotionValuesFromProps:fn,createRenderState:un});function no(e,t,s){const n=fn(e,t,s);for(const r in e)if(se(e[r])||se(t[r])){const i=He.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}const iu=so({scrapeMotionValuesFromProps:no,createRenderState:eo}),ou=Symbol.for("motionComponentSymbol");function au(e,t,s){const n=g.useRef(s);g.useInsertionEffect(()=>{n.current=s});const r=g.useRef(null);return g.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const o=n.current;if(typeof o=="function")if(i){const a=o(i);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):o(i);else o&&(o.current=i)},[t])}const pn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lu="framerAppearId",ro="data-"+pn(lu),io=g.createContext({});function at(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cu(e,t,s,n,r,i){const{visualElement:o}=g.useContext(qt),a=g.useContext(Ji),c=g.useContext(Wt),d=g.useContext(on).reducedMotion,u=g.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:o,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:i}));const h=u.current,p=g.useContext(io);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&uu(u.current,s,r,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{h&&m.current&&h.update(s,c)});const b=s[ro],A=g.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return ei(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),A.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!A.current&&h.animationState&&h.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),A.current=!1),h.enteringChildren=void 0)}),h}function uu(e,t,s,n){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:oo(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&at(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function oo(e){if(e)return e.options.allowProjection!==!1?e.projection:oo(e.parent)}function rs(e,{forwardMotionProps:t=!1,type:s}={},n,r){n&&Lc(n);const i=s?s==="svg":dn(e),o=i?iu:ru;function a(d,u){let h;const p={...g.useContext(on),...d,layoutId:du(d)},{isStatic:m}=p,b=Uc(d),A=o(d,m);if(!m&&Os){hu(p,n);const C=fu(p);h=C.MeasureLayout,b.visualElement=cu(e,A,p,r,C.ProjectionNode,i)}return l.jsxs(qt.Provider,{value:b,children:[h&&b.visualElement?l.jsx(h,{visualElement:b.visualElement,...p}):null,tu(e,d,au(A,b.visualElement,u),A,m,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=g.forwardRef(a);return c[ou]=e,c}function du({layoutId:e}){const t=g.useContext(Ls).id;return t&&e!==void 0?t+"-"+e:e}function hu(e,t){const s=g.useContext(Ji).strict;if(process.env.NODE_ENV!=="production"&&t&&s){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Je(!1,n,"lazy-strict-mode"):be(!1,n,"lazy-strict-mode")}}function fu(e){const{drag:t,layout:s}=Ge;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function pu(e,t){if(typeof Proxy>"u")return rs;const s=new Map,n=(i,o)=>rs(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&qs(!1,"motion() is deprecated. Use motion.create() instead."),n(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?n:(s.has(o)||s.set(o,rs(o,void 0,e,t)),s.get(o))})}function ao({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function mu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gu(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function is(e){return e===void 0||e===1}function Ps({scale:e,scaleX:t,scaleY:s}){return!is(e)||!is(t)||!is(s)}function Ne(e){return Ps(e)||lo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function lo(e){return ar(e.x)||ar(e.y)}function ar(e){return e&&e!=="0%"}function Ot(e,t,s){const n=e-s,r=t*n;return s+r}function lr(e,t,s,n,r){return r!==void 0&&(e=Ot(e,r,n)),Ot(e,s,n)+t}function js(e,t=0,s=1,n,r){e.min=lr(e.min,t,s,n,r),e.max=lr(e.max,t,s,n,r)}function co(e,{x:t,y:s}){js(e.x,t.translate,t.scale,t.originPoint),js(e.y,s.translate,s.scale,s.originPoint)}const cr=.999999999999,ur=1.0000000000001;function yu(e,t,s,n=!1){const r=s.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=s[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&qe(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,co(e,o)),n&&Ne(i.latestValues)&&qe(e,i.latestValues))}t.x<ur&&t.x>cr&&(t.x=1),t.y<ur&&t.y>cr&&(t.y=1)}function We(e,t){e.min=e.min+t,e.max=e.max+t}function dr(e,t,s,n,r=.5){const i=Y(e.min,e.max,r);js(e,t,s,i,n)}function qe(e,t){dr(e.x,t.x,t.scaleX,t.scale,t.originX),dr(e.y,t.y,t.scaleY,t.scale,t.originY)}function uo(e,t){return ao(gu(e.getBoundingClientRect(),t))}function xu(e,t,s){const n=uo(e,s),{scroll:r}=t;return r&&(We(n.x,r.offset.x),We(n.y,r.offset.y)),n}const hr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ke=()=>({x:hr(),y:hr()}),fr=()=>({min:0,max:0}),$=()=>({x:fr(),y:fr()}),Rs={current:null},ho={current:!1};function vu(){if(ho.current=!0,!!Os)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Rs.current=e.matches;e.addEventListener("change",t),t()}else Rs.current=!1}const bu=new WeakMap;function wu(e,t,s){for(const n in t){const r=t[n],i=s[n];if(se(r))e.addValue(n,r);else if(se(i))e.addValue(n,ze(r,{owner:e}));else if(i!==r)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(n);e.addValue(n,ze(o!==void 0?o:r,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const pr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Au{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=en,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ie.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Yt(s),this.isVariantNode=Hi(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&se(m)&&m.set(c[p])}}mount(t){this.current=t,bu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ho.current||vu(),this.shouldReduceMotion=Rs.current),process.env.NODE_ENV!=="production"&&qs(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Se(this.notifyUpdate),Se(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Xe.has(t);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ge){const s=Ge[t];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<pr.length;n++){const r=pr[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=wu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=ze(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(ti(n)||ni(n))?n=parseFloat(n):!Pc(n)&&Ee.test(s)&&(n=Ii(t,s)),this.setBaseTarget(t,se(n)?n.get():n)),se(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const i=hn(this.props,s,this.presenceContext?.custom);i&&(n=i[t])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!se(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Ws),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){nn.render(this.render)}}class fo extends Au{constructor(){super(...arguments),this.KeyframeResolver=yc}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;se(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function po(e,{style:t,vars:s},n,r){const i=e.style;let o;for(o in t)i[o]=t[o];r?.applyProjectionStyles(i,n);for(o in s)i.setProperty(o,s[o])}function Cu(e){return window.getComputedStyle(e)}class ku extends fo{constructor(){super(...arguments),this.type="html",this.renderInstance=po}readValueFromInstance(t,s){if(Xe.has(s))return this.projection?.isProjecting?bs(s):Fl(t,s);{const n=Cu(t),r=(yi(s)?n.getPropertyValue(s):n[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return uo(t,s)}build(t,s,n){cn(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return fn(t,s,n)}}const mo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Tu(e,t,s,n){po(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(mo.has(r)?r:pn(r),t.attrs[r])}class Su extends fo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(Xe.has(s)){const n=Oi(s);return n&&n.default||0}return s=mo.has(s)?s:pn(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return no(t,s,n)}build(t,s,n){$i(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,r){Tu(t,s,n,r)}mount(t){this.isSVGTag=to(t.tagName),super.mount(t)}}const Eu=(e,t)=>t.isSVG??dn(e)?new Su(t):new ku(t,{allowProjection:e!==g.Fragment});function Ye(e,t,s){const n=e.getProps();return hn(n,t,s!==void 0?s:n.custom,e)}const Ns=e=>Array.isArray(e);function Pu(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,ze(s))}function ju(e){return Ns(e)?e[e.length-1]||0:e}function Ru(e,t){const s=Ye(e,t);let{transitionEnd:n={},transition:r={},...i}=s||{};i={...i,...n};for(const o in i){const a=ju(i[o]);Pu(e,o,a)}}function Nu(e){return!!(se(e)&&e.add)}function Vs(e,t){const s=e.getValue("willChange");if(Nu(s))return s.add(t);if(!s&&we.WillChange){const n=new we.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function go(e){return e.props[ro]}const Vu=e=>e!==null;function Mu(e,{repeat:t,repeatType:s="loop"},n){const r=e.filter(Vu),i=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[i]}const Du={type:"spring",stiffness:500,damping:25,restSpeed:10},Fu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Lu={type:"keyframes",duration:.8},Bu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ou=(e,{keyframes:t})=>t.length>2?Lu:Xe.has(e)?e.startsWith("scale")?Fu(t[1]):Du:Bu;function Iu({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const mn=(e,t,s,n={},r,i)=>o=>{const a=tn(n,e)||{},c=a.delay||n.delay||0;let{elapsed:d=0}=n;d=d-ye(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};Iu(a)||Object.assign(u,Ou(e,u)),u.duration&&(u.duration=ye(u.duration)),u.repeatDelay&&(u.repeatDelay=ye(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ts(u),u.delay===0&&(h=!0)),(we.instantAnimations||we.skipAnimations)&&(h=!0,Ts(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const p=Mu(u.keyframes,a);if(p!==void 0){W.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new $s(u):new rc(u)};function _u({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function yo(e,t,{delay:s=0,transitionOverride:n,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;n&&(i=n);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||d&&_u(d,u))continue;const m={delay:s,...tn(i||{},u)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===b&&!m.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const y=go(e);if(y){const v=window.MotionHandoffAnimation(y,u,W);v!==null&&(m.startTime=v,A=!0)}}Vs(e,u),h.start(mn(u,h,p,e.shouldReduceMotion&&Fi.has(u)?{type:!1}:m,e,A));const C=h.animation;C&&c.push(C)}return o&&Promise.all(c).then(()=>{W.update(()=>{o&&Ru(e,o)})}),c}function xo(e,t,s,n=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*n;return typeof s=="function"?s(i,o):r===1?i*n:a-i*n}function Ms(e,t,s={}){const n=Ye(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);const i=n?()=>Promise.all(yo(e,n,s)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:h}=r;return Uu(e,t,c,d,u,h,s)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,d]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(s.delay)])}function Uu(e,t,s=0,n=0,r=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Ms(c,t,{...o,delay:s+(typeof n=="function"?0:n)+xo(e.variantChildren,c,n,r,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Wu(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const r=t.map(i=>Ms(e,i,s));n=Promise.all(r)}else if(typeof t=="string")n=Ms(e,t,s);else{const r=typeof t=="function"?Ye(e,t,s.custom):t;n=Promise.all(yo(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function vo(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const qu=ln.length;function bo(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?bo(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<qu;s++){const n=ln[s],r=e.props[n];(mt(r)||r===!1)&&(t[n]=r)}return t}const Ku=[...an].reverse(),Yu=an.length;function zu(e){return t=>Promise.all(t.map(({animation:s,options:n})=>Wu(e,s,n)))}function Gu(e){let t=zu(e),s=mr(),n=!0;const r=c=>(d,u)=>{const h=Ye(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:m,...b}=h;d={...d,...b,...m}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,u=bo(e.parent)||{},h=[],p=new Set;let m={},b=1/0;for(let C=0;C<Yu;C++){const y=Ku[C],v=s[y],x=d[y]!==void 0?d[y]:u[y],R=mt(x),P=y===c?v.isActive:null;P===!1&&(b=C);let M=x===u[y]&&x!==d[y]&&R;if(M&&n&&e.manuallyAnimateOnMount&&(M=!1),v.protectedKeys={...m},!v.isActive&&P===null||!x&&!v.prevProp||Kt(x)||typeof x=="boolean")continue;const E=Ju(v.prevProp,x);let S=E||y===c&&v.isActive&&!M&&R||C>b&&R,F=!1;const U=Array.isArray(x)?x:[x];let H=U.reduce(r(y),{});P===!1&&(H={});const{prevResolvedValues:X={}}=v,ae={...X,...H},Z=B=>{S=!0,p.has(B)&&(F=!0,p.delete(B)),v.needsAnimating[B]=!0;const O=e.getValue(B);O&&(O.liveStyle=!1)};for(const B in ae){const O=H[B],q=X[B];if(m.hasOwnProperty(B))continue;let G=!1;Ns(O)&&Ns(q)?G=!vo(O,q):G=O!==q,G?O!=null?Z(B):p.add(B):O!==void 0&&p.has(B)?Z(B):v.protectedKeys[B]=!0}v.prevProp=x,v.prevResolvedValues=H,v.isActive&&(m={...m,...H}),n&&e.blockInitialAnimation&&(S=!1);const ce=M&&E;S&&(!ce||F)&&h.push(...U.map(B=>{const O={type:y};if(typeof B=="string"&&n&&!ce&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,G=Ye(q,B);if(q.enteringChildren&&G){const{delayChildren:ne}=G.transition||{};O.delay=xo(q.enteringChildren,e,ne)}}return{animation:B,options:O}}))}if(p.size){const C={};if(typeof d.initial!="boolean"){const y=Ye(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(C.transition=y.transition)}p.forEach(y=>{const v=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),C[y]=v??null}),h.push({animation:C})}let A=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(A=!1),n=!1,A?t(h):Promise.resolve()}function a(c,d){if(s[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),s[c].isActive=d;const u=o(c);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>s,reset:()=>{s=mr()}}}function Ju(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vo(t,e):!1}function Re(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function mr(){return{animate:Re(!0),whileInView:Re(),whileHover:Re(),whileTap:Re(),whileDrag:Re(),whileFocus:Re(),exit:Re()}}class Pe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Qu extends Pe{constructor(t){super(t),t.animationState||(t.animationState=Gu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Hu=0;class Xu extends Pe{constructor(){super(...arguments),this.id=Hu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Zu={animation:{Feature:Qu},exit:{Feature:Xu}};function gt(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function bt(e){return{point:{x:e.pageX,y:e.pageY}}}const $u=e=>t=>rn(t)&&e(t,bt(t));function ct(e,t,s,n){return gt(e,t,$u(s),n)}const wo=1e-4,ed=1-wo,td=1+wo,Ao=.01,sd=0-Ao,nd=0+Ao;function oe(e){return e.max-e.min}function rd(e,t,s){return Math.abs(e-t)<=s}function gr(e,t,s,n=.5){e.origin=n,e.originPoint=Y(t.min,t.max,e.origin),e.scale=oe(s)/oe(t),e.translate=Y(s.min,s.max,e.origin)-e.originPoint,(e.scale>=ed&&e.scale<=td||isNaN(e.scale))&&(e.scale=1),(e.translate>=sd&&e.translate<=nd||isNaN(e.translate))&&(e.translate=0)}function ut(e,t,s,n){gr(e.x,t.x,s.x,n?n.originX:void 0),gr(e.y,t.y,s.y,n?n.originY:void 0)}function yr(e,t,s){e.min=s.min+t.min,e.max=e.min+oe(t)}function id(e,t,s){yr(e.x,t.x,s.x),yr(e.y,t.y,s.y)}function xr(e,t,s){e.min=t.min-s.min,e.max=e.min+oe(t)}function It(e,t,s){xr(e.x,t.x,s.x),xr(e.y,t.y,s.y)}function he(e){return[e("x"),e("y")]}const Co=({current:e})=>e?e.ownerDocument.defaultView:null,vr=(e,t)=>Math.abs(e-t);function od(e,t){const s=vr(e.x,t.x),n=vr(e.y,t.y);return Math.sqrt(s**2+n**2)}const br=new Set(["auto","scroll"]);class ko{constructor(t,s,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=as(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,A=od(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!A)return;const{point:C}=m,{timestamp:y}=te;this.history.push({...C,timestamp:y});const{onStart:v,onMove:x}=this.handlers;b||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,b)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=os(b,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(m,b)=>{this.end();const{onEnd:A,onSessionEnd:C,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=as(m.type==="pointercancel"?this.lastMoveEventInfo:os(b,this.transformPagePoint),this.history);this.startEvent&&A&&A(m,v),C&&C(m,v)},!rn(t))return;this.dragSnapToOrigin=i,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const c=bt(t),d=os(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=te;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=s;p&&p(t,as(d,this.history)),this.removeListeners=yt(ct(this.contextWindow,"pointermove",this.handlePointerMove),ct(this.contextWindow,"pointerup",this.handlePointerUp),ct(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let s=t.parentElement;for(;s;){const n=getComputedStyle(s);(br.has(n.overflowX)||br.has(n.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-s.x,y:r.y-s.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),W.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Se(this.updatePoint)}}function os(e,t){return t?{point:t(e.point)}:e}function wr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function as({point:e},t){return{point:e,delta:wr(e,To(t)),offset:wr(e,ad(t)),velocity:ld(t,.1)}}function ad(e){return e[0]}function To(e){return e[e.length-1]}function ld(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const r=To(e);for(;s>=0&&(n=e[s],!(r.timestamp-n.timestamp>ye(t)));)s--;if(!n)return{x:0,y:0};const i=fe(r.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function cd(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?Y(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?Y(s,e,n.max):Math.min(e,s)),e}function Ar(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function ud(e,{top:t,left:s,bottom:n,right:r}){return{x:Ar(e.x,s,r),y:Ar(e.y,t,n)}}function Cr(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function dd(e,t){return{x:Cr(e.x,t.x),y:Cr(e.y,t.y)}}function hd(e,t){let s=.5;const n=oe(e),r=oe(t);return r>n?s=ht(t.min,t.max-n,e.min):n>r&&(s=ht(e.min,e.max-r,t.min)),ve(0,1,s)}function fd(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Ds=.35;function pd(e=Ds){return e===!1?e=0:e===!0&&(e=Ds),{x:kr(e,"left","right"),y:kr(e,"top","bottom")}}function kr(e,t,s){return{min:Tr(e,t),max:Tr(e,s)}}function Tr(e,t){return typeof e=="number"?e:e[t]||0}const md=new WeakMap;class gd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{s?(this.stopAnimation(),this.snapToCursor(bt(h).point)):this.pauseAnimation()},o=(h,p)=>{this.stopAnimation();const{drag:m,dragPropagation:b,onDragStart:A}=this.getProps();if(m&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wc(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),he(y=>{let v=this.getAxisMotionValue(y).get()||0;if(xe.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const R=x.layout.layoutBox[y];R&&(v=oe(R)*(parseFloat(v)/100))}}this.originPoint[y]=v}),A&&W.postRender(()=>A(h,p)),Vs(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:b,onDirectionLock:A,onDrag:C}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(b&&this.currentDirection===null){this.currentDirection=yd(y),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),C&&C(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>he(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ko(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:Co(this.visualElement),element:this.visualElement.current})}stop(t,s){const n=t||this.latestPointerEvent,r=s||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&W.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:r}=this.getProps();if(!n||!Pt(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=cd(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&at(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=ud(n.layoutBox,t):this.constraints=!1,this.elastic=pd(s),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&he(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=fd(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!at(t))return!1;const n=t.current;be(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=xu(n,r.root,this.visualElement.getTransformPagePoint());let o=dd(r.layout.layoutBox,i);if(s){const a=s(mu(o));this.hasMutatedConstraints=!!a,a&&(o=ao(a))}return o}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=he(u=>{if(!Pt(u,s,this.currentDirection))return;let h=c&&c[u]||{};o&&(h={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,b={type:"inertia",velocity:n?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,b)});return Promise.all(d).then(a)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return Vs(this.visualElement,t),n.start(mn(t,n,0,s,this.visualElement,!1))}stopAnimation(){he(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){he(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[s];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){he(s=>{const{drag:n}=this.getProps();if(!Pt(s,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(s);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[s],c=i.get()||0;i.set(t[s]-Y(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!at(s)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};he(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();r[o]=hd({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),he(o=>{if(!Pt(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];a.set(Y(c,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;md.set(this.visualElement,this);const t=this.visualElement.current,s=ct(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&!Yi(c.target)&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();at(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),W.read(n);const o=gt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(he(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),s(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Ds,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Pt(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function yd(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class xd extends Pe{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new gd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Sr=e=>(t,s)=>{e&&W.postRender(()=>e(t,s))};class vd extends Pe{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new ko(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Co(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Sr(t),onStart:Sr(s),onMove:n,onEnd:(i,o)=>{delete this.session,r&&W.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=ct(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let ls=!1;class bd extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;i&&(s.group&&s.group.add(i),n&&n.register&&r&&n.register(i),ls&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Vt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,ls=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||W.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),nn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:r}=t;ls=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function So(e){const[t,s]=Gi(),n=g.useContext(Ls);return l.jsx(bd,{...e,layoutGroup:n,switchLayoutGroup:g.useContext(io),isPresent:t,safeToRemove:s})}function wd(e,t,s){const n=se(e)?e:ze(e);return n.start(mn("",n,t,s)),n.animation}const Ad=(e,t)=>e.depth-t.depth;class Cd{constructor(){this.children=[],this.isDirty=!1}add(t){Is(this.children,t),this.isDirty=!0}remove(t){_s(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ad),this.isDirty=!1,this.children.forEach(t)}}function kd(e,t){const s=ie.now(),n=({timestamp:r})=>{const i=r-s;i>=t&&(Se(n),e(i-t))};return W.setup(n,!0),()=>Se(n)}const Eo=["TopLeft","TopRight","BottomLeft","BottomRight"],Td=Eo.length,Er=e=>typeof e=="string"?parseFloat(e):e,Pr=e=>typeof e=="number"||T.test(e);function Sd(e,t,s,n,r,i){r?(e.opacity=Y(0,s.opacity??1,Ed(n)),e.opacityExit=Y(t.opacity??1,0,Pd(n))):i&&(e.opacity=Y(t.opacity??1,s.opacity??1,n));for(let o=0;o<Td;o++){const a=`border${Eo[o]}Radius`;let c=jr(t,a),d=jr(s,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Pr(c)===Pr(d)?(e[a]=Math.max(Y(Er(c),Er(d),n),0),(xe.test(d)||xe.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||s.rotate)&&(e.rotate=Y(t.rotate||0,s.rotate||0,n))}function jr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ed=Po(0,.5,di),Pd=Po(.5,.95,pe);function Po(e,t,s){return n=>n<e?0:n>t?1:s(ht(e,t,n))}function Rr(e,t){e.min=t.min,e.max=t.max}function me(e,t){Rr(e.x,t.x),Rr(e.y,t.y)}function Nr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Vr(e,t,s,n,r){return e-=t,e=Ot(e,1/s,n),r!==void 0&&(e=Ot(e,1/r,n)),e}function jd(e,t=0,s=1,n=.5,r,i=e,o=e){if(xe.test(t)&&(t=parseFloat(t),t=Y(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Y(i.min,i.max,n);e===i&&(a-=t),e.min=Vr(e.min,t,s,a,r),e.max=Vr(e.max,t,s,a,r)}function Mr(e,t,[s,n,r],i,o){jd(e,t[s],t[n],t[r],t.scale,i,o)}const Rd=["x","scaleX","originX"],Nd=["y","scaleY","originY"];function Dr(e,t,s,n){Mr(e.x,t,Rd,s?s.x:void 0,n?n.x:void 0),Mr(e.y,t,Nd,s?s.y:void 0,n?n.y:void 0)}function Fr(e){return e.translate===0&&e.scale===1}function jo(e){return Fr(e.x)&&Fr(e.y)}function Lr(e,t){return e.min===t.min&&e.max===t.max}function Vd(e,t){return Lr(e.x,t.x)&&Lr(e.y,t.y)}function Br(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ro(e,t){return Br(e.x,t.x)&&Br(e.y,t.y)}function Or(e){return oe(e.x)/oe(e.y)}function Ir(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Md{constructor(){this.members=[]}add(t){Is(this.members,t),t.scheduleRender()}remove(t){if(_s(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let n;for(let r=s;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Dd(e,t,s){let n="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=s?.z||0;if((r||i||o)&&(n=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:p,skewX:m,skewY:b}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),p&&(n+=`rotateY(${p}deg) `),m&&(n+=`skewX(${m}deg) `),b&&(n+=`skewY(${b}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}const cs=["","X","Y","Z"],Fd=1e3;let Ld=0;function us(e,t,s,n){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function No(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=go(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",W,!(r||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&No(n)}function Vo({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(o={},a=t?.()){this.id=Ld++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Id),this.nodes.forEach(qd),this.nodes.forEach(Kd),this.nodes.forEach(_d)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cd)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ws),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=zi(o)&&!Sc(o),this.instance=o;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;W.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=kd(p,250),Vt.hasAnimatedSinceResize&&(Vt.hasAnimatedSinceResize=!1,this.nodes.forEach(Wr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||d.getDefaultTransition()||Qd,{onLayoutAnimationStart:A,onLayoutAnimationComplete:C}=d.getProps(),y=!this.targetLayout||!Ro(this.targetLayout,m),v=!h&&p;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...tn(b,"layout"),onPlay:A,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,v)}else h||Wr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Se(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&No(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(_r);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ur);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wd),this.nodes.forEach(Bd),this.nodes.forEach(Od)):this.nodes.forEach(Ur),this.clearAllSnapshots();const a=ie.now();te.delta=ve(0,1e3/60,a-te.timestamp),te.timestamp=a,te.isProcessing=!0,Xt.update.process(te),Xt.preRender.process(te),Xt.render.process(te),te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ud),this.sharedNodes.forEach(zd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oe(this.snapshot.measuredBox.x)&&!oe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!jo(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||Ne(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Hd(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return $();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Xd))){const{scroll:d}=this.root;d&&(We(a.x,d.offset.x),We(a.y,d.offset.y))}return a}removeElementScroll(o){const a=$();if(me(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:h}=d;d!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&me(a,o),We(a.x,u.offset.x),We(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=$();me(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&qe(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ne(u.latestValues)&&qe(c,u.latestValues)}return Ne(this.latestValues)&&qe(c,this.latestValues),c}removeTransform(o){const a=$();me(a,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Ne(d.latestValues))continue;Ps(d.latestValues)&&d.updateSnapshot();const u=$(),h=d.measurePageBox();me(u,h),Dr(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return Ne(this.latestValues)&&Dr(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=te.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),id(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),co(this.target,this.targetDelta)):me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ps(this.parent.latestValues)||lo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),It(this.relativeTargetOrigin,a,c),me(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===te.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;me(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;yu(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=$());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Nr(this.prevProjectionDelta.x,this.projectionDelta.x),Nr(this.prevProjectionDelta.y,this.projectionDelta.y)),ut(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!Ir(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ir(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ke(),this.projectionDelta=Ke(),this.projectionDeltaWithTransform=Ke()}setAnimationOrigin(o,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Ke();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=$(),m=c?c.source:void 0,b=this.layout?this.layout.source:void 0,A=m!==b,C=this.getStack(),y=!C||C.members.length<=1,v=!!(A&&!y&&this.options.crossfade===!0&&!this.path.some(Jd));this.animationProgress=0;let x;this.mixTargetDelta=R=>{const P=R/1e3;qr(h.x,o.x,P),qr(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(It(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gd(this.relativeTarget,this.relativeTargetOrigin,p,P),x&&Vd(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=$()),me(x,this.relativeTarget)),A&&(this.animationValues=u,Sd(u,d,this.latestValues,P,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Se(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Vt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ze(0)),this.currentAnimation=wd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=o;if(!(!a||!c||!d)){if(this!==o&&this.layout&&d&&Mo(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||$();const h=oe(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const p=oe(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}me(a,c),qe(a,u),ut(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Md),this.sharedNodes.get(o).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&us("z",o,d,this.animationValues);for(let u=0;u<cs.length;u++)us(`rotate${cs[u]}`,o,d,this.animationValues),us(`skew${cs[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Nt(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Nt(a?.pointerEvents)||""),this.hasProjected&&!Ne(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Dd(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:p,y:m}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const b in Es){if(u[b]===void 0)continue;const{correct:A,applyTo:C,isCSSVariable:y}=Es[b],v=h==="none"?u[b]:A(u[b],d);if(C){const x=C.length;for(let R=0;R<x;R++)o[C[R]]=v}else y?this.options.visualElement.renderState.vars[b]=v:o[b]=v}this.options.layoutId&&(o.pointerEvents=d===this?Nt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(_r),this.root.sharedNodes.clear()}}}function Bd(e){e.updateLayout()}function Od(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:n}=e.layout,{animationType:r}=e.options,i=t.source!==e.layout.source;r==="size"?he(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=oe(h);h.min=s[u].min,h.max=h.min+p}):Mo(r,t.layoutBox,s)&&he(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=oe(s[u]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const o=Ke();ut(o,s,t.layoutBox);const a=Ke();i?ut(a,e.applyTransform(n,!0),t.measuredBox):ut(a,s,t.layoutBox);const c=!jo(o);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:p}=u;if(h&&p){const m=$();It(m,t.layoutBox,h.layoutBox);const b=$();It(b,s,p.layoutBox),Ro(m,b)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Id(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _d(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ud(e){e.clearSnapshot()}function _r(e){e.clearMeasurements()}function Ur(e){e.isLayoutDirty=!1}function Wd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qd(e){e.resolveTargetDelta()}function Kd(e){e.calcProjection()}function Yd(e){e.resetSkewAndRotation()}function zd(e){e.removeLeadSnapshot()}function qr(e,t,s){e.translate=Y(t.translate,0,s),e.scale=Y(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Kr(e,t,s,n){e.min=Y(t.min,s.min,n),e.max=Y(t.max,s.max,n)}function Gd(e,t,s,n){Kr(e.x,t.x,s.x,n),Kr(e.y,t.y,s.y,n)}function Jd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Qd={duration:.45,ease:[.4,0,.1,1]},Yr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zr=Yr("applewebkit/")&&!Yr("chrome/")?Math.round:pe;function Gr(e){e.min=zr(e.min),e.max=zr(e.max)}function Hd(e){Gr(e.x),Gr(e.y)}function Mo(e,t,s){return e==="position"||e==="preserve-aspect"&&!rd(Or(t),Or(s),.2)}function Xd(e){return e!==e.root&&e.scroll?.wasRoot}const Zd=Vo({attachResizeListener:(e,t)=>gt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ds={current:void 0},Do=Vo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ds.current){const e=new Zd({});e.mount(window),e.setOptions({layoutScroll:!0}),ds.current=e}return ds.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$d={pan:{Feature:vd},drag:{Feature:xd,ProjectionNode:Do,MeasureLayout:So}};function Jr(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,i=n[r];i&&W.postRender(()=>i(t,bt(t)))}class eh extends Pe{mount(){const{current:t}=this.node;t&&(this.unmount=Ac(t,(s,n)=>(Jr(this.node,n,"Start"),r=>Jr(this.node,r,"End"))))}unmount(){}}class th extends Pe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=yt(gt(this.node.current,"focus",()=>this.onFocus()),gt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Qr(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),i=n[r];i&&W.postRender(()=>i(t,bt(t)))}class sh extends Pe{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(s,n)=>(Qr(this.node,n,"Start"),(r,{success:i})=>Qr(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Fs=new WeakMap,hs=new WeakMap,nh=e=>{const t=Fs.get(e.target);t&&t(e)},rh=e=>{e.forEach(nh)};function ih({root:e,...t}){const s=e||document;hs.has(s)||hs.set(s,{});const n=hs.get(s),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(rh,{root:e,...t})),n[r]}function oh(e,t,s){const n=ih(t);return Fs.set(e,s),n.observe(e),()=>{Fs.delete(e),n.unobserve(e)}}const ah={some:0,all:1};class lh extends Pe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:i}=t,o={root:s?s.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:ah[r]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=d?u:h;p&&p(c)};return oh(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(ch(t,s))&&this.startObserver()}unmount(){}}function ch({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const uh={inView:{Feature:lh},tap:{Feature:sh},focus:{Feature:th},hover:{Feature:eh}},dh={layout:{ProjectionNode:Do,MeasureLayout:So}},hh={...Zu,...uh,...$d,...dh},Hr=pu(hh,Eu),fh=({steps:e,plannerStatus:t,executionStatus:s,reportStatus:n})=>{const{t:r}=ue.useTranslation(),i=e??[],[o,a]=g.useState(new Set),[c,d]=g.useState(!1),u=y=>{a(v=>{const x=new Set(v);return x.has(y)?x.delete(y):x.add(y),x})},h=i.findIndex(y=>y.status!=="pending"),p=i.reduce((y,v,x)=>v.status!=="pending"?x:y,-1),m=i.length?i.some(y=>y.status==="in_progress")?"in_progress":i.every(y=>y.status==="done")?"done":i.some(y=>y.status==="done")?"in_progress":"pending":"pending",b=t??(i.length?"done":"pending"),A=s??m,C=n??"pending";return l.jsxs("div",{className:"space-y-6 pr-6",children:[l.jsx("div",{className:"text-sm text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.intro")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium ${b==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[b==="in_progress"?l.jsx("div",{className:"w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(j.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}):l.jsx(j.PencilLine,{className:`w-4 h-4 ${b==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.planTitle")]}),l.jsx("div",{className:" text-[#999] dark:text-[#A6A6A6] text-sm mb-2",children:r("deepResearch.steps.planDescription")}),l.jsxs("div",{className:"border border-[#EEF0F3] dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",onClick:()=>d(y=>!y),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-[#333] dark:text-[#E5E7EB]",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.generatedPlans")]}),c?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-gray-400"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-gray-400"})]}),c&&i.length>0&&l.jsx("div",{className:"mt-2 space-y-1 rounded-lg bg-white dark:bg-[#020817] border border-[#EEF0F3] dark:border-[#1D3A6F] p-3",children:i.map((y,v)=>l.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6]",children:[v+1,"."]}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:y.title})]},y.id))})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${A==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.executeTitle")]}),i.map((y,v)=>{const x=y.status!=="pending",R=v===h,P=v===p,M=y.status==="pending"&&!y.searches;return l.jsxs("div",{className:`relative ${M?"pl-0 pb-4":"pl-6 pb-8 last:pb-0"}`,children:[x&&h!==-1&&p!==-1&&l.jsx("div",{className:"absolute left-2.5 border-l border-dashed border-gray-200 dark:border-gray-700",style:{top:R?10:0,bottom:P?10:0}}),y.status==="done"&&l.jsx("div",{className:"absolute left-0 top-0 w-5 h-5 bg-blue-500 rounded-full flex items-center justify-center",children:l.jsx(j.CheckCircle,{className:"w-3 h-3 text-white"})}),y.status==="in_progress"&&l.jsx("div",{className:"absolute left-0 top-0 w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(j.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}),M?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#C8C8C8]"}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#666]",children:y.title})]}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:`text-sm font-bold mb-1 ${y.status==="pending"?"text-[#999999] dark:text-[#666]":"text-[#333333] dark:text-[#E5E7EB]"}`,children:y.title}),y.description&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4",children:y.description}),y.searches&&l.jsxs("div",{className:"mt-2 space-y-3",children:[y.searches.map(E=>E.status==="searching"?l.jsx("div",{className:"flex items-center justify-between border border-blue-100 dark:border-blue-900/30 bg-blue-50/30 dark:bg-blue-900/10 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] animate-pulse shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searching")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]})},E.id):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-gray-50 dark:bg-[#111827] cursor-pointer hover:bg-gray-100 dark:hover:bg-[#1F2937] transition-colors",onClick:()=>u(E.id),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searchTitle")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]}),typeof E.resultCount=="number"&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 text-[#1784FC] px-2 py-0.5 rounded-full text-xs font-medium",children:E.resultCount}),o.has(E.id)?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]}),o.has(E.id)&&E.hits&&l.jsx("div",{className:"mt-2 space-y-2 pl-4",children:E.hits.map((S,F)=>l.jsx("div",{className:"p-3 bg-white dark:bg-[#020817] border border-gray-100 dark:border-[#1D3A6F] rounded-lg hover:border-blue-200 dark:hover:border-blue-800 transition-colors cursor-pointer group",onClick:()=>S.url&&window.open(S.url,"_blank"),children:l.jsx("div",{className:"flex items-start gap-2",children:l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] group-hover:text-[#1784FC] transition-colors line-clamp-1",children:S.title}),S.content&&l.jsx("div",{className:"text-xs text-[#999] dark:text-[#A6A6A6] mt-1 line-clamp-2",children:S.content})]})})},F))}),E.note&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4 mb-2",children:E.note})]},E.id)),y.showOptimizePlan&&l.jsxs("div",{className:"border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(j.FileText,{className:"w-4 h-4 text-[#1784FC]"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.optimizePlan")})]}),l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]})]})]},y.id)}),l.jsx("div",{className:"pt-2",children:l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${C==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[C==="in_progress"?l.jsx("div",{className:"w-5 h-5 bg-white dark:bg-[#020817] border-2 border-blue-500 rounded-full flex items-center justify-center",children:l.jsx(j.Loader,{className:"w-3 h-3 text-blue-500 animate-spin"})}):l.jsx(j.BookOpenText,{className:`w-4 h-4 ${C==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.reportTitle")]})})]})]})},ph=({content:e,data:t,formatUrl:s})=>{const{t:n}=ue.useTranslation();return!e&&!t?l.jsxs("div",{className:"px-6 pb-8 max-w-[730px] h-full flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"mb-2 text-base font-medium text-[#333333] dark:text-[#E5E7EB]",children:n("deepResearch.report.generatingTitle")}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#A6A6A6] max-w-[520px] leading-relaxed",children:n("deepResearch.report.generatingDescription")})]}):l.jsxs("div",{className:"px-2 pb-8 max-w-[730px]",children:[t&&l.jsxs("div",{className:"mb-6 p-4 border border-gray-200 dark:border-gray-800 rounded-xl bg-gray-50 dark:bg-gray-900 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400",children:l.jsx(j.FileText,{className:"w-6 h-6"})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:t.title||n("deepResearch.report.defaultTitle")}),l.jsx("div",{className:"text-xs text-gray-500",children:t.created?$r(t.created):""})]})]}),t.url&&l.jsx("a",{href:s?s({url:t.url}):t.url,target:"_blank",rel:"noopener noreferrer",className:"p-2 text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer",title:n("deepResearch.button.view"),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]}),e&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{content:e})}),t?.url&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{url:s?s({url:t.url}):t.url})})]})},mh=({hits:e,theme:t})=>{const s=g.useMemo(()=>{if(!e||!Array.isArray(e))return[];const n=new Map;for(const i of e){if(!i||typeof i!="object")continue;const o=typeof i.title=="string"?i.title:"";o&&(n.has(o)||n.set(o,i))}const r=[];return n.forEach(i=>{const o=typeof i.title=="string"?i.title:"",a=typeof i.url=="string"?i.url:void 0,c=typeof i.content=="string"?i.content:void 0,d={title:o,summary:c,url:a,source:typeof i.source=="string"?{name:i.source}:void 0,metadata:typeof i.score=="number"?{score:i.score}:void 0};r.push(d)}),r},[e]);return l.jsx("div",{className:"pb-8 max-w-[730px]",children:l.jsx(ca,{section:s,theme:t||"light",hideHeader:!0,onRecordClick:n=>{typeof n.url=="string"&&window.open(n.url)}})})},Fo=({open:e,onClose:t,defaultActiveTab:s,steps:n,plannerStatus:r,executionStatus:i,reportStatus:o,reportData:a,reportContent:c,searchHits:d,formatUrl:u,theme:h,showReportOnly:p=!1})=>{const{t:m}=ue.useTranslation(),[b,A]=g.useState(s||m("deepResearch.tab.steps"));return g.useEffect(()=>{p?A(m("deepResearch.tab.report")):s&&A(s)},[s,p,m]),l.jsx(Fc,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(Hr.div,{className:"fixed inset-0 z-999 bg-black/20",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t}),l.jsxs(Hr.div,{className:"fixed z-1000 top-20 bottom-20 right-4 flex flex-col rounded-xl overflow-hidden bg-white dark:bg-black shadow-[0_2px_20px_rgba(0,0,0,0.1)] dark:shadow-[0_2px_20px_rgba(255,255,255,0.1)]",initial:{width:0,height:0,opacity:0,padding:0},animate:{width:800,height:"auto",opacity:1,padding:24},exit:{width:0,height:0,opacity:0,padding:0},children:[l.jsxs("div",{className:"flex items-center justify-between",children:[p?l.jsx("div",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:m("deepResearch.tab.report")}):l.jsx(Rn.Segmented,{className:"cm-deep-research-segmented",value:b,style:{marginBottom:8},onChange:C=>A(C),options:[m("deepResearch.tab.report"),m("deepResearch.tab.steps"),m("deepResearch.tab.searchResults")]}),l.jsxs("div",{className:"flex items-center gap-2",children:[b===m("deepResearch.tab.report")&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",onClick:()=>a?.url&&window.open(u?.({url:a.url})||a.url,"_blank"),children:[l.jsx(j.Download,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.download")})]}),l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",children:[l.jsx(j.Share2,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.share")})]})]}),l.jsx(Rn.Button,{type:"text",onClick:t,className:"text-[#999] hover:text-gray-600 flex items-center justify-center",children:l.jsx(j.X,{className:"w-5 h-5"})})]})]}),l.jsxs("div",{className:"pt-6 flex-1 overflow-y-auto bg-white dark:bg-black",children:[b===m("deepResearch.tab.report")&&l.jsx(ph,{content:c,data:a,formatUrl:u}),b===m("deepResearch.tab.steps")&&l.jsx(fh,{steps:n,plannerStatus:r,executionStatus:i,reportStatus:o}),b===m("deepResearch.tab.searchResults")&&l.jsx(mh,{hits:d,theme:h})]})]})]})})},gh=e=>{const t={deepResearchPlans:[],deepResearchCurrentStepIndex:-1,deepResearchCurrentStepFinished:!1,deepResearchQuery:"",deepResearchResultCount:void 0,deepResearchPlannerStarted:!1,deepResearchResearcherStarted:!1,deepResearchReporterStarted:!1,deepResearchReporterFinished:!1,deepResearchReportData:void 0,deepResearchSearchMap:{}};return e.forEach(s=>{if(s.chunk_type==="research_planner_start"){t.deepResearchPlans=[],t.deepResearchCurrentStepIndex=-1,t.deepResearchCurrentStepFinished=!1,t.deepResearchQuery="",t.deepResearchResultCount=void 0,t.deepResearchPlannerStarted=!0,t.deepResearchResearcherStarted=!1,t.deepResearchReporterStarted=!1,t.deepResearchReporterFinished=!1,t.deepResearchReportData=void 0,t.deepResearchSearchMap={};return}if(s.chunk_type==="research_planner_end"){if(typeof s.message_chunk=="string")try{const n=JSON.parse(s.message_chunk);if(Array.isArray(n)){const r=n.map(i=>String(i));t.deepResearchPlans=r,t.deepResearchCurrentStepIndex=r.length>0?0:-1}t.deepResearchPlannerStarted=!1}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"";if(r){t.deepResearchResearcherStarted=!0,t.deepResearchCurrentStepFinished=!1;let i=t.deepResearchPlans.findIndex(o=>o===r);i===-1&&(t.deepResearchPlans.push(r),i=t.deepResearchPlans.length-1),t.deepResearchCurrentStepIndex=i}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.query;if(r&&!t.deepResearchPlans.includes(r)&&(t.deepResearchPlans.push(r),t.deepResearchCurrentStepIndex===-1&&(t.deepResearchCurrentStepIndex=t.deepResearchPlans.length-1)),typeof i=="string"&&(t.deepResearchQuery=i),t.deepResearchResultCount=void 0,r&&typeof i=="string"){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,query:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_end"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.hits;if(Array.isArray(i)&&(t.deepResearchResultCount=i.length,r)){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,resultCount:i.length,hits:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_end"){t.deepResearchQuery="",t.deepResearchCurrentStepFinished=!0;return}if(s.chunk_type==="research_reporter_start"){t.deepResearchReporterStarted=!0;return}if(s.chunk_type==="research_reporter_end"&&(t.deepResearchReporterStarted=!0,t.deepResearchReporterFinished=!0,typeof s.message_chunk=="string"&&s.message_chunk))try{const n=JSON.parse(s.message_chunk);t.deepResearchReportData=n}catch(n){console.error(n)}}),t},yh=({ChunkData:e=[],question:t,formatUrl:s,theme:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!1),[a,c]=g.useState(r("deepResearch.tab.steps"));console.log(111111111,e);const{deepResearchPlans:d,deepResearchCurrentStepIndex:u,deepResearchCurrentStepFinished:h,deepResearchQuery:p,deepResearchResultCount:m,deepResearchPlannerStarted:b,deepResearchResearcherStarted:A,deepResearchReporterStarted:C,deepResearchReporterFinished:y,deepResearchReportData:v,deepResearchSearchMap:x}=g.useMemo(()=>gh(e),[e]),R=d.length>0&&u>=0&&u<d.length,P=R?d[u]:"",M=d.length>0?1:0,E=R?(u+1)/d.length:0,S=y?1:C?.5:0,F=(M+E+S)/3,U=g.useMemo(()=>{if(y)return typeof m=="number"?`深度研究完成 · 找到 ${m} 条相关结果`:"深度研究完成";if(C)return"正在编写研究报告";if(A)return"正在执行研究计划";if(d.length>0)return"正在规划研究计划"},[y,m,C,A,d.length]),H=g.useMemo(()=>d.length?d.map((O,q)=>{let G="pending";y||C?G="done":A&&(q<u?G="done":q===u&&(G=h?"done":"in_progress"));const ne=x[O],Fe=ne?.query?[{id:`step-${q+1}-search-1`,query:ne.query,resultCount:ne.resultCount,status:typeof ne.resultCount=="number"?"done":"searching",hits:ne.hits}]:void 0;return{id:`step-${q+1}`,title:O,status:G,searches:Fe,showOptimizePlan:!1}}):[],[d,y,C,A,x,u,h]),X=g.useMemo(()=>{const O=[];return Object.values(x).forEach(q=>{q.hits&&Array.isArray(q.hits)&&O.push(...q.hits)}),O},[x]),ae=d.length?"done":b?"in_progress":"pending",Z=g.useMemo(()=>H.length?H.some(O=>O.status==="in_progress")?"in_progress":H.some(O=>O.status==="done")?"done":"pending":"pending",[H]),ce=y?"done":C?"in_progress":"pending",ee=g.useMemo(()=>typeof F!="number"||Number.isNaN(F)||F<0?0:F>1?1:F,[F]),B=g.useMemo(()=>U||(ee>=1?typeof m=="number"?r("deepResearch.status.completedWithCount",{count:m}):r("deepResearch.status.completed"):ee>0?r("deepResearch.status.running"):r("deepResearch.status.preparing")),[U,ee,m,r]);return e.length?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"w-full my-3 cursor-pointer",onClick:()=>{c(r("deepResearch.tab.steps")),o(!0)},children:l.jsxs("div",{className:"w-full rounded-xl border border-[#EEF0F3] bg-[#F3F4F6] dark:border-[#1D3A6F] dark:bg-[#020817] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(j.Hourglass,{className:"h-4 w-4 text-[#148EFF] cm-hourglass-rotate"}),l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] truncate",children:P||"-"})]}),l.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-full bg-white px-3 py-2 text-sm text-[#333] dark:bg-[#111827] dark:text-[#D1D5DB]",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2 flex-1",children:[ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E] shrink-0"}):l.jsx(j.Loader,{className:"h-4 w-4 animate-spin text-[#148EFF] shrink-0"}),l.jsxs("div",{className:"flex min-w-0 items-center flex-1",children:[l.jsx("span",{className:"whitespace-nowrap shrink-0",children:B}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate ml-1",children:["| ",p||t]})]})]}),l.jsxs("div",{className:"ml-2 flex items-center gap-2 shrink-0",children:[ee<1&&typeof m=="number"?l.jsx("div",{className:"flex py-0.5 px-1 items-center justify-center rounded-full border border-[#018AE5] bg-white text-xs font-medium text-[#018AE5] dark:bg-[#020617]",children:m}):null,ee>=1&&l.jsx("button",{type:"button",className:"px-3 py-1 text-xs font-medium rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 cursor-pointer",onClick:O=>{O.stopPropagation(),c(r("deepResearch.tab.report")),o(!0)},children:r("deepResearch.button.view")})]})]}),l.jsxs("div",{className:"mt-5 w-full flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-2 rounded-full flex-1 items-center bg-white dark:bg-[#1F2937]",children:l.jsx("div",{className:`h-full rounded-full transition-all ${ee>=1?"bg-[#00C868]":"bg-[#1784FC]"}`,style:{width:`${ee*100}%`}})}),l.jsx("div",{className:"flex items-center justify-center cursor-pointer hover:opacity-80 transition-opacity",children:ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E]"}):l.jsx(j.CirclePause,{className:"h-4 w-4 text-[#1784FC]"})})]})]})}),l.jsx(Fo,{open:i,onClose:()=>o(!1),defaultActiveTab:a,steps:H,plannerStatus:ae,executionStatus:Z,reportStatus:ce,reportData:v,searchHits:X,formatUrl:s,theme:n})]}):null},xh=({payload:e,formatUrl:t})=>{const[s,n]=g.useState(!1);return!e?.title||!e?.url?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-3",children:l.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-[#202126] rounded-lg border border-gray-200 dark:border-gray-800 max-w-sm cursor-pointer transition-colors hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>n(!0),children:[l.jsx("div",{className:"shrink-0",children:l.jsx(j.FileText,{className:"w-6 h-6 text-blue-500"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",title:e.title,children:e.title}),e.created&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:$r(e.created)})]}),e.url&&l.jsx("a",{href:t?t({url:e.url}):e.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-md transition-colors cursor-pointer",title:"Open Link",onClick:r=>r.stopPropagation(),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]})}),l.jsx(Fo,{open:s,onClose:()=>n(!1),reportContent:e.content,reportData:e,formatUrl:t,showReportOnly:!0})]})},vh=["research_planner_start","research_planner_progress","research_planner_end","research_researcher_start","research_researcher_step_start","research_researcher_step_end","research_researcher_end","research_reporter_start","research_reporter_end"];function bh(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const wh=g.memo(g.forwardRef(function({message:t,isTyping:s,onResend:n,hide_assistant:r=!1,rootClassName:i,actionClassName:o,actionIconSize:a,copyButtonId:c,formatUrl:d,theme:u,locale:h,assistantList:p,currentAssistant:m},b){const{t:A,i18n:C}=ue.useTranslation(),y=bh(u),[v,x]=g.useState({}),{data:{query_intent:R,tools:P,fetch_source:M,pick_source:E,deep_read:S,think:F,response:U,deepResearch:H},handlers:X,clearAllChunkData:ae}=Ma(),[Z,ce]=g.useState({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee=g.useRef(!1);g.useImperativeHandle(b,()=>({addChunk:V=>{if(ce(()=>({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1,[V.chunk_type||""]:!0})),V.chunk_type!=="reply_start")if(V.chunk_type==="query_intent")X.deal_query_intent(V);else if(V.chunk_type==="tools")X.deal_tools(V);else if(V.chunk_type==="fetch_source")X.deal_fetch_source(V);else if(V.chunk_type==="pick_source")X.deal_pick_source(V);else if(V.chunk_type==="deep_read")X.deal_deep_read(V);else if(V.chunk_type==="think")X.deal_think(V);else if(V.chunk_type==="response"){const Ce=V.message_chunk;if(typeof Ce=="string"){if(Ce.includes("<think>")||Ce.includes("<think>")){ee.current=!0;return}else if(Ce.includes("</think>")||Ce.includes("</think>")){ee.current=!1;return}ee.current?X.deal_think({...V,chunk_type:"think"}):X.deal_response(V)}}else vh.includes(V.chunk_type||"")?X.deal_deep_research(V):V.chunk_type},reset:()=>{ae(),ce({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee.current=!1}}));const B=t?._source?.type==="assistant",O=t?._source?.assistant_id,q=t?._source?.assistant_item;g.useEffect(()=>{h&&C.language!==h&&C.changeLanguage(h)},[h,C]),g.useEffect(()=>{if(q){x(q);return}if(B&&O&&Array.isArray(p)){x(p.find(V=>V._id===O)??{});return}x(m)},[B,q,O,p,m]);const G=t?._source,ne=G?.message||"",Fe=G?.payload,wt=G?.attachments??[],Ae=G?.details||[],Ze=G?.question||"",$e=s===!1&&(ne||U?.message_chunk),[et,Le]=g.useState([]),tt=V=>{Le(V)},Be=()=>B?l.jsxs(l.Fragment,{children:[l.jsx(ya,{Detail:Ae.find(V=>V.type==="query_intent"),ChunkData:R,getSuggestion:tt,loading:Z?.query_intent}),l.jsx(xa,{Detail:Ae.find(V=>V.type==="tools"),ChunkData:P,loading:Z?.tools}),l.jsx(wa,{Detail:Ae.find(V=>V.type==="fetch_source"),ChunkData:M,loading:Z?.fetch_source,formatUrl:d}),l.jsx(Ca,{Detail:Ae.find(V=>V.type==="pick_source"),ChunkData:E,loading:Z?.pick_source}),l.jsx(Ta,{Detail:Ae.find(V=>V.type==="deep_read"),ChunkData:S,loading:Z?.deep_read}),l.jsx(Sa,{Detail:Ae.find(V=>V.type==="think"),ChunkData:F,loading:Z?.think}),l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{content:ne||U?.message_chunk||""})}),l.jsx(xh,{payload:Fe,formatUrl:d}),l.jsx(yh,{ChunkData:H,question:Ze,formatUrl:d,theme:y}),s&&l.jsx("div",{className:"inline-block w-1.5 h-5 ml-0.5 -mb-0.5 bg-[#666666] dark:bg-[#A3A3A3] rounded-sm animate-typing"}),$e&&l.jsx(Pa,{id:t._id??"",content:ne||U?.message_chunk||"",question:Ze,actionClassName:o,actionIconSize:a,copyButtonId:c,onResend:()=>{n&&n(Ze)}}),!s&&l.jsx(ja,{suggestions:et,onSelect:V=>n&&n(V)})]}):l.jsx(Na,{message:ne,attachments:wt});return l.jsx("div",{className:dt("w-full py-8 flex",[B?"justify-start":"justify-end"],y==="dark"&&"dark",i),children:l.jsx("div",{className:`w-full px-4 flex gap-4 ${B?"w-full":"flex-row-reverse"}`,children:l.jsxs("div",{className:`w-full space-y-2 ${B?"text-left":"text-right"}`,children:[!r&&l.jsxs("div",{className:"w-full flex items-center gap-1 font-semibold text-sm text-[#333] dark:text-white",children:[B?l.jsx("div",{className:"w-6 h-6 flex justify-center items-center rounded-full bg-white dark:bg-[#2A2A2A] border border-[#E6E6E6] dark:border-[#3A3A3A]",children:v?._source?.icon?.startsWith("font_")?l.jsx(Va,{name:v._source.icon,className:"w-4 h-4"}):l.jsx("img",{src:ma,className:"w-4 h-4",alt:A("assistant.message.logo")})}):null,B?v?._source?.name||"Coco AI":""]}),l.jsx("div",{className:"w-full prose dark:prose-invert prose-sm max-w-none",children:l.jsx("div",{className:"w-full pl-7 text-[#333] dark:text-white leading-relaxed",children:Be()})})]})})})})),Ah=g.memo(g.forwardRef((e,t)=>l.jsx(ue.I18nextProvider,{i18n:Xr,children:l.jsx(wh,{...e,ref:t})})));exports.ChatMessage=Ah;
41
+ `),()=>{y.contains(C)&&y.removeChild(C)}},[t]),l.jsx(Nc,{isPresent:t,childRef:i,sizeRef:o,children:_t.cloneElement(e,{ref:d})})}const Mc=({children:e,initial:t,isPresent:s,onExitComplete:n,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const d=Os(Dc),u=g.useId();let h=!0,p=g.useMemo(()=>(h=!1,{id:u,initial:t,isPresent:s,custom:r,onExitComplete:m=>{d.set(m,!0);for(const v of d.values())if(!v)return;n&&n()},register:m=>(d.set(m,!1),()=>d.delete(m))}),[s,d,n]);return i&&h&&(p={...p}),g.useMemo(()=>{d.forEach((m,v)=>d.set(v,!1))},[s]),_t.useEffect(()=>{!s&&!d.size&&n&&n()},[s]),o==="popLayout"&&(e=l.jsx(Vc,{isPresent:s,anchorX:a,root:c,children:e})),l.jsx(Wt.Provider,{value:p,children:e})};function Dc(){return new Map}function Ji(e=!0){const t=g.useContext(Wt);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:n,register:r}=t,i=g.useId();g.useEffect(()=>{if(e)return r(i)},[e]);const o=g.useCallback(()=>e&&n&&n(i),[i,n,e]);return!s&&n?[!1,o]:[!0]}const Et=e=>e.key||"";function nr(e){const t=[];return g.Children.forEach(e,s=>{g.isValidElement(s)&&t.push(s)}),t}const Fc=({children:e,custom:t,initial:s=!0,onExitComplete:n,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[d,u]=Ji(o),h=g.useMemo(()=>nr(e),[e]),p=o&&!d?[]:h.map(Et),m=g.useRef(!0),v=g.useRef(h),A=Os(()=>new Map),C=g.useRef(new Set),[y,b]=g.useState(h),[x,R]=g.useState(h);ti(()=>{m.current=!1,v.current=h;for(let E=0;E<x.length;E++){const T=Et(x[E]);p.includes(T)?(A.delete(T),C.current.delete(T)):A.get(T)!==!0&&A.set(T,!1)}},[x,p.length,p.join("-")]);const P=[];if(h!==y){let E=[...h];for(let T=0;T<x.length;T++){const D=x[T],_=Et(D);p.includes(_)||(E.splice(T,0,D),P.push(D))}return i==="wait"&&P.length&&(E=P),R(nr(E)),b(h),null}process.env.NODE_ENV!=="production"&&i==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:M}=g.useContext(Bs);return l.jsx(l.Fragment,{children:x.map(E=>{const T=Et(E),D=o&&!d?!1:h===x||p.includes(T),_=()=>{if(C.current.has(T))return;if(C.current.add(T),A.has(T))A.set(T,!0);else return;let z=!0;A.forEach(X=>{X||(z=!1)}),z&&(M?.(),R(v.current),o&&u?.(),n&&n())};return l.jsx(Mc,{isPresent:D,initial:!m.current||s?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:c,onExitComplete:D?void 0:_,anchorX:a,children:E},T)})})},Qi=g.createContext({strict:!1}),rr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Qe={};for(const e in rr)Qe[e]={isEnabled:t=>rr[e].some(s=>!!t[s])};function Lc(e){for(const t in e)Qe[t]={...Qe[t],...e[t]}}const Bc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Bt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Bc.has(e)}let Hi=e=>!Bt(e);function Oc(e){typeof e=="function"&&(Hi=t=>t.startsWith("on")?!Bt(t):e(t))}try{Oc(require("@emotion/is-prop-valid").default)}catch{}function Ic(e,t,s){const n={};for(const r in e)r==="values"&&typeof e.values=="object"||(Hi(r)||s===!0&&Bt(r)||!t&&!Bt(r)||e.draggable&&r.startsWith("onDrag"))&&(n[r]=e[r]);return n}const qt=g.createContext({});function Kt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function mt(e){return typeof e=="string"||Array.isArray(e)}const ln=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cn=["initial",...ln];function Yt(e){return Kt(e.animate)||cn.some(t=>mt(e[t]))}function Xi(e){return!!(Yt(e)||e.variants)}function _c(e,t){if(Yt(e)){const{initial:s,animate:n}=e;return{initial:s===!1||mt(s)?s:void 0,animate:mt(n)?n:void 0}}return e.inherit!==!1?t:{}}function Uc(e){const{initial:t,animate:s}=_c(e,g.useContext(qt));return g.useMemo(()=>({initial:t,animate:s}),[ir(t),ir(s)])}function ir(e){return Array.isArray(e)?e.join(" "):e}function or(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ot={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(S.test(e))e=parseFloat(e);else return e;const s=or(e,t.target.x),n=or(e,t.target.y);return`${s}% ${n}%`}},Wc={correct:(e,{treeScale:t,projectionDelta:s})=>{const n=e,r=Se.parse(e);if(r.length>5)return n;const i=Se.createTransformer(e),o=typeof r[0]!="number"?1:0,a=s.x.scale*t.x,c=s.y.scale*t.y;r[0+o]/=a,r[1+o]/=c;const d=Y(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}},Ps={borderRadius:{...ot,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomLeftRadius:ot,borderBottomRightRadius:ot,boxShadow:Wc};function Zi(e,{layout:t,layoutId:s}){return $e.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!Ps[e]||e==="opacity")}const qc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Kc=Ze.length;function Yc(e,t,s){let n="",r=!0;for(let i=0;i<Kc;i++){const o=Ze[i],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||s){const d=Ui(a,nn[o]);if(!c){r=!1;const u=qc[o]||o;n+=`${u}(${d}) `}s&&(t[o]=d)}}return n=n.trim(),s?n=s(t,r?"":n):r&&(n="none"),n}function un(e,t,s){const{style:n,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const d=t[c];if($e.has(c)){o=!0;continue}else if(xi(c)){r[c]=d;continue}else{const u=Ui(d,nn[c]);c.startsWith("origin")?(a=!0,i[c]=u):n[c]=u}}if(t.transform||(o||s?n.transform=Yc(t,e.transform,s):n.transform&&(n.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=i;n.transformOrigin=`${c} ${d} ${u}`}}const dn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $i(e,t,s){for(const n in t)!ne(t[n])&&!Zi(n,s)&&(e[n]=t[n])}function zc({transformTemplate:e},t){return g.useMemo(()=>{const s=dn();return un(s,t,e),Object.assign({},s.vars,s.style)},[t])}function Gc(e,t){const s=e.style||{},n={};return $i(n,s,e),Object.assign(n,zc(e,t)),n}function Jc(e,t){const s={},n=Gc(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s}const Qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hc={offset:"strokeDashoffset",array:"strokeDasharray"};function Xc(e,t,s=1,n=0,r=!0){e.pathLength=1;const i=r?Qc:Hc;e[i.offset]=S.transform(-n);const o=S.transform(t),a=S.transform(s);e[i.array]=`${o} ${a}`}const Zc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function eo(e,{attrX:t,attrY:s,attrScale:n,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},c,d,u){if(un(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const m of Zc)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),r!==void 0&&Xc(h,r,i,o,!1)}const to=()=>({...dn(),attrs:{}}),so=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $c(e,t,s,n){const r=g.useMemo(()=>{const i=to();return eo(i,t,so(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};$i(i,e.style,e),r.style={...i,...r.style}}return r}const eu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function hn(e){return typeof e!="string"||e.includes("-")?!1:!!(eu.indexOf(e)>-1||/[A-Z]/u.test(e))}function tu(e,t,s,{latestValues:n},r,i=!1,o){const c=(o??hn(e)?$c:Jc)(t,n,r,e),d=Ic(t,typeof e=="string",i),u=e!==g.Fragment?{...d,...c,ref:s}:{},{children:h}=t,p=g.useMemo(()=>ne(h)?h.get():h,[h]);return g.createElement(e,{...u,children:p})}function ar(e){const t=[{},{}];return e?.values.forEach((s,n)=>{t[0][n]=s.get(),t[1][n]=s.getVelocity()}),t}function fn(e,t,s,n){if(typeof t=="function"){const[r,i]=ar(n);t=t(s!==void 0?s:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=ar(n);t=t(s!==void 0?s:e.custom,r,i)}return t}function Nt(e){return ne(e)?e.get():e}function su({scrapeMotionValuesFromProps:e,createRenderState:t},s,n,r){return{latestValues:nu(s,n,r,e),renderState:t()}}function nu(e,t,s,n){const r={},i=n(e,{});for(const p in i)r[p]=Nt(i[p]);let{initial:o,animate:a}=e;const c=Yt(e),d=Xi(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=s?s.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Kt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const v=fn(e,p[m]);if(v){const{transitionEnd:A,transition:C,...y}=v;for(const b in y){let x=y[b];if(Array.isArray(x)){const R=u?x.length-1:0;x=x[R]}x!==null&&(r[b]=x)}for(const b in A)r[b]=A[b]}}}return r}const no=e=>(t,s)=>{const n=g.useContext(qt),r=g.useContext(Wt),i=()=>su(e,t,n,r);return s?i():Os(i)};function pn(e,t,s){const{style:n}=e,r={};for(const i in n)(ne(n[i])||t.style&&ne(t.style[i])||Zi(i,e)||s?.getValue(i)?.liveStyle!==void 0)&&(r[i]=n[i]);return r}const ru=no({scrapeMotionValuesFromProps:pn,createRenderState:dn});function ro(e,t,s){const n=pn(e,t,s);for(const r in e)if(ne(e[r])||ne(t[r])){const i=Ze.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}const iu=no({scrapeMotionValuesFromProps:ro,createRenderState:to}),ou=Symbol.for("motionComponentSymbol");function au(e,t,s){const n=g.useRef(s);g.useInsertionEffect(()=>{n.current=s});const r=g.useRef(null);return g.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const o=n.current;if(typeof o=="function")if(i){const a=o(i);typeof a=="function"&&(r.current=a)}else r.current?(r.current(),r.current=null):o(i);else o&&(o.current=i)},[t])}const mn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lu="framerAppearId",io="data-"+mn(lu),oo=g.createContext({});function lt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cu(e,t,s,n,r,i){const{visualElement:o}=g.useContext(qt),a=g.useContext(Qi),c=g.useContext(Wt),d=g.useContext(an).reducedMotion,u=g.useRef(null);n=n||a.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:o,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,isSVG:i}));const h=u.current,p=g.useContext(oo);h&&!h.projection&&r&&(h.type==="html"||h.type==="svg")&&uu(u.current,s,r,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{h&&m.current&&h.update(s,c)});const v=s[io],A=g.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ti(()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),A.current&&h.animationState&&h.animationState.animateChanges())}),g.useEffect(()=>{h&&(!A.current&&h.animationState&&h.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),A.current=!1),h.enteringChildren=void 0)}),h}function uu(e,t,s,n){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:ao(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&lt(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:c,layoutRoot:d})}function ao(e){if(e)return e.options.allowProjection!==!1?e.projection:ao(e.parent)}function is(e,{forwardMotionProps:t=!1,type:s}={},n,r){n&&Lc(n);const i=s?s==="svg":hn(e),o=i?iu:ru;function a(d,u){let h;const p={...g.useContext(an),...d,layoutId:du(d)},{isStatic:m}=p,v=Uc(d),A=o(d,m);if(!m&&Is){hu(p,n);const C=fu(p);h=C.MeasureLayout,v.visualElement=cu(e,A,p,r,C.ProjectionNode,i)}return l.jsxs(qt.Provider,{value:v,children:[h&&v.visualElement?l.jsx(h,{visualElement:v.visualElement,...p}):null,tu(e,d,au(A,v.visualElement,u),A,m,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=g.forwardRef(a);return c[ou]=e,c}function du({layoutId:e}){const t=g.useContext(Bs).id;return t&&e!==void 0?t+"-"+e:e}function hu(e,t){const s=g.useContext(Qi).strict;if(process.env.NODE_ENV!=="production"&&t&&s){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?He(!1,n,"lazy-strict-mode"):we(!1,n,"lazy-strict-mode")}}function fu(e){const{drag:t,layout:s}=Qe;if(!t&&!s)return{};const n={...t,...s};return{MeasureLayout:t?.isEnabled(e)||s?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function pu(e,t){if(typeof Proxy>"u")return is;const s=new Map,n=(i,o)=>is(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&Ks(!1,"motion() is deprecated. Use motion.create() instead."),n(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?n:(s.has(o)||s.set(o,is(o,void 0,e,t)),s.get(o))})}function lo({top:e,left:t,right:s,bottom:n}){return{x:{min:t,max:s},y:{min:e,max:n}}}function mu({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gu(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function os(e){return e===void 0||e===1}function js({scale:e,scaleX:t,scaleY:s}){return!os(e)||!os(t)||!os(s)}function Me(e){return js(e)||co(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function co(e){return lr(e.x)||lr(e.y)}function lr(e){return e&&e!=="0%"}function Ot(e,t,s){const n=e-s,r=t*n;return s+r}function cr(e,t,s,n,r){return r!==void 0&&(e=Ot(e,r,n)),Ot(e,s,n)+t}function Rs(e,t=0,s=1,n,r){e.min=cr(e.min,t,s,n,r),e.max=cr(e.max,t,s,n,r)}function uo(e,{x:t,y:s}){Rs(e.x,t.translate,t.scale,t.originPoint),Rs(e.y,s.translate,s.scale,s.originPoint)}const ur=.999999999999,dr=1.0000000000001;function yu(e,t,s,n=!1){const r=s.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=s[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ke(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,uo(e,o)),n&&Me(i.latestValues)&&Ke(e,i.latestValues))}t.x<dr&&t.x>ur&&(t.x=1),t.y<dr&&t.y>ur&&(t.y=1)}function qe(e,t){e.min=e.min+t,e.max=e.max+t}function hr(e,t,s,n,r=.5){const i=Y(e.min,e.max,r);Rs(e,t,s,i,n)}function Ke(e,t){hr(e.x,t.x,t.scaleX,t.scale,t.originX),hr(e.y,t.y,t.scaleY,t.scale,t.originY)}function ho(e,t){return lo(gu(e.getBoundingClientRect(),t))}function xu(e,t,s){const n=ho(e,s),{scroll:r}=t;return r&&(qe(n.x,r.offset.x),qe(n.y,r.offset.y)),n}const fr=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ye=()=>({x:fr(),y:fr()}),pr=()=>({min:0,max:0}),$=()=>({x:pr(),y:pr()}),Ns={current:null},fo={current:!1};function vu(){if(fo.current=!0,!!Is)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ns.current=e.matches;e.addEventListener("change",t),t()}else Ns.current=!1}const bu=new WeakMap;function wu(e,t,s){for(const n in t){const r=t[n],i=s[n];if(ne(r))e.addValue(n,r);else if(ne(i))e.addValue(n,Je(r,{owner:e}));else if(i!==r)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(n);e.addValue(n,Je(o!==void 0?o:r,{owner:e}))}}for(const n in s)t[n]===void 0&&e.removeValue(n);return t}const mr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Au{scrapeMotionValuesFromProps(t,s,n){return{}}constructor({parent:t,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ie.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=s.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=s,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Yt(s),this.isVariantNode=Xi(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const p in h){const m=h[p];c[p]!==void 0&&ne(m)&&m.set(c[p])}}mount(t){this.current=t,bu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(fo.current||vu(),this.shouldReduceMotion=Ns.current),process.env.NODE_ENV!=="production"&&Ks(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Te(this.notifyUpdate),Te(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=$e.has(t);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&W.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Qe){const s=Qe[t];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[t]&&r&&n(this.props)&&(this.features[t]=new r(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;n<mr.length;n++){const r=mr[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i="on"+r,o=t[i];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=wu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const n=this.values.get(t);s!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&s!==void 0&&(n=Je(s===null?void 0:s,{owner:this}),this.addValue(t,n)),n}readValue(t,s){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(si(n)||ri(n))?n=parseFloat(n):!Pc(n)&&Se.test(s)&&(n=_i(t,s)),this.setBaseTarget(t,ne(n)?n.get():n)),ne(n)?n.get():n}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const i=fn(this.props,s,this.presenceContext?.custom);i&&(n=i[t])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!ne(r)?r:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new qs),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){rn.render(this.render)}}class po extends Au{constructor(){super(...arguments),this.KeyframeResolver=yc}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){return t.style?t.style[s]:void 0}removeValueFromRenderState(t,{vars:s,style:n}){delete s[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ne(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function mo(e,{style:t,vars:s},n,r){const i=e.style;let o;for(o in t)i[o]=t[o];r?.applyProjectionStyles(i,n);for(o in s)i.setProperty(o,s[o])}function Cu(e){return window.getComputedStyle(e)}class ku extends po{constructor(){super(...arguments),this.type="html",this.renderInstance=mo}readValueFromInstance(t,s){if($e.has(s))return this.projection?.isProjecting?ws(s):Fl(t,s);{const n=Cu(t),r=(xi(s)?n.getPropertyValue(s):n[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:s}){return ho(t,s)}build(t,s,n){un(t,s,n.transformTemplate)}scrapeMotionValuesFromProps(t,s,n){return pn(t,s,n)}}const go=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Tu(e,t,s,n){mo(e,t,void 0,n);for(const r in t.attrs)e.setAttribute(go.has(r)?r:mn(r),t.attrs[r])}class Su extends po{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if($e.has(s)){const n=Ii(s);return n&&n.default||0}return s=go.has(s)?s:mn(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,n){return ro(t,s,n)}build(t,s,n){eo(t,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,s,n,r){Tu(t,s,n,r)}mount(t){this.isSVGTag=so(t.tagName),super.mount(t)}}const Eu=(e,t)=>t.isSVG??hn(e)?new Su(t):new ku(t,{allowProjection:e!==g.Fragment});function ze(e,t,s){const n=e.getProps();return fn(n,t,s!==void 0?s:n.custom,e)}const Vs=e=>Array.isArray(e);function Pu(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Je(s))}function ju(e){return Vs(e)?e[e.length-1]||0:e}function Ru(e,t){const s=ze(e,t);let{transitionEnd:n={},transition:r={},...i}=s||{};i={...i,...n};for(const o in i){const a=ju(i[o]);Pu(e,o,a)}}function Nu(e){return!!(ne(e)&&e.add)}function Ms(e,t){const s=e.getValue("willChange");if(Nu(s))return s.add(t);if(!s&&Ae.WillChange){const n=new Ae.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function yo(e){return e.props[io]}const Vu=e=>e!==null;function Mu(e,{repeat:t,repeatType:s="loop"},n){const r=e.filter(Vu),i=t&&s!=="loop"&&t%2===1?0:r.length-1;return r[i]}const Du={type:"spring",stiffness:500,damping:25,restSpeed:10},Fu=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Lu={type:"keyframes",duration:.8},Bu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ou=(e,{keyframes:t})=>t.length>2?Lu:$e.has(e)?e.startsWith("scale")?Fu(t[1]):Du:Bu;function Iu({when:e,delay:t,delayChildren:s,staggerChildren:n,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const gn=(e,t,s,n={},r,i)=>o=>{const a=sn(n,e)||{},c=a.delay||n.delay||0;let{elapsed:d=0}=n;d=d-xe(c);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};Iu(a)||Object.assign(u,Ou(e,u)),u.duration&&(u.duration=xe(u.duration)),u.repeatDelay&&(u.repeatDelay=xe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ss(u),u.delay===0&&(h=!0)),(Ae.instantAnimations||Ae.skipAnimations)&&(h=!0,Ss(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!i&&t.get()!==void 0){const p=Mu(u.keyframes,a);if(p!==void 0){W.update(()=>{u.onUpdate(p),u.onComplete()});return}}return a.isSync?new en(u):new rc(u)};function _u({protectedKeys:e,needsAnimating:t},s){const n=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,n}function xo(e,t,{delay:s=0,transitionOverride:n,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;n&&(i=n);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const h=e.getValue(u,e.latestValues[u]??null),p=a[u];if(p===void 0||d&&_u(d,u))continue;const m={delay:s,...sn(i||{},u)},v=h.get();if(v!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===v&&!m.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const y=yo(e);if(y){const b=window.MotionHandoffAnimation(y,u,W);b!==null&&(m.startTime=b,A=!0)}}Ms(e,u),h.start(gn(u,h,p,e.shouldReduceMotion&&Li.has(u)?{type:!1}:m,e,A));const C=h.animation;C&&c.push(C)}return o&&Promise.all(c).then(()=>{W.update(()=>{o&&Ru(e,o)})}),c}function vo(e,t,s,n=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*n;return typeof s=="function"?s(i,o):r===1?i*n:a-i*n}function Ds(e,t,s={}){const n=ze(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);const i=n?()=>Promise.all(xo(e,n,s)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:h}=r;return Uu(e,t,c,d,u,h,s)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,d]=a==="beforeChildren"?[i,o]:[o,i];return c().then(()=>d())}else return Promise.all([i(),o(s.delay)])}function Uu(e,t,s=0,n=0,r=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Ds(c,t,{...o,delay:s+(typeof n=="function"?0:n)+vo(e.variantChildren,c,n,r,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Wu(e,t,s={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const r=t.map(i=>Ds(e,i,s));n=Promise.all(r)}else if(typeof t=="string")n=Ds(e,t,s);else{const r=typeof t=="function"?ze(e,t,s.custom):t;n=Promise.all(xo(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",t)})}function bo(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let n=0;n<s;n++)if(t[n]!==e[n])return!1;return!0}const qu=cn.length;function wo(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?wo(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<qu;s++){const n=cn[s],r=e.props[n];(mt(r)||r===!1)&&(t[n]=r)}return t}const Ku=[...ln].reverse(),Yu=ln.length;function zu(e){return t=>Promise.all(t.map(({animation:s,options:n})=>Wu(e,s,n)))}function Gu(e){let t=zu(e),s=gr(),n=!0;const r=c=>(d,u)=>{const h=ze(e,u,c==="exit"?e.presenceContext?.custom:void 0);if(h){const{transition:p,transitionEnd:m,...v}=h;d={...d,...v,...m}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,u=wo(e.parent)||{},h=[],p=new Set;let m={},v=1/0;for(let C=0;C<Yu;C++){const y=Ku[C],b=s[y],x=d[y]!==void 0?d[y]:u[y],R=mt(x),P=y===c?b.isActive:null;P===!1&&(v=C);let M=x===u[y]&&x!==d[y]&&R;if(M&&n&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...m},!b.isActive&&P===null||!x&&!b.prevProp||Kt(x)||typeof x=="boolean")continue;const E=Ju(b.prevProp,x);let T=E||y===c&&b.isActive&&!M&&R||C>v&&R,D=!1;const _=Array.isArray(x)?x:[x];let z=_.reduce(r(y),{});P===!1&&(z={});const{prevResolvedValues:X={}}=b,ae={...X,...z},Z=B=>{T=!0,p.has(B)&&(D=!0,p.delete(B)),b.needsAnimating[B]=!0;const O=e.getValue(B);O&&(O.liveStyle=!1)};for(const B in ae){const O=z[B],q=X[B];if(m.hasOwnProperty(B))continue;let J=!1;Vs(O)&&Vs(q)?J=!bo(O,q):J=O!==q,J?O!=null?Z(B):p.add(B):O!==void 0&&p.has(B)?Z(B):b.protectedKeys[B]=!0}b.prevProp=x,b.prevResolvedValues=z,b.isActive&&(m={...m,...z}),n&&e.blockInitialAnimation&&(T=!1);const ce=M&&E;T&&(!ce||D)&&h.push(..._.map(B=>{const O={type:y};if(typeof B=="string"&&n&&!ce&&e.manuallyAnimateOnMount&&e.parent){const{parent:q}=e,J=ze(q,B);if(q.enteringChildren&&J){const{delayChildren:se}=J.transition||{};O.delay=vo(q.enteringChildren,e,se)}}return{animation:B,options:O}}))}if(p.size){const C={};if(typeof d.initial!="boolean"){const y=ze(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(C.transition=y.transition)}p.forEach(y=>{const b=e.getBaseTarget(y),x=e.getValue(y);x&&(x.liveStyle=!0),C[y]=b??null}),h.push({animation:C})}let A=!!h.length;return n&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(A=!1),n=!1,A?t(h):Promise.resolve()}function a(c,d){if(s[c].isActive===d)return Promise.resolve();e.variantChildren?.forEach(h=>h.animationState?.setActive(c,d)),s[c].isActive=d;const u=o(c);for(const h in s)s[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>s,reset:()=>{s=gr()}}}function Ju(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bo(t,e):!1}function Ve(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function gr(){return{animate:Ve(!0),whileInView:Ve(),whileHover:Ve(),whileTap:Ve(),whileDrag:Ve(),whileFocus:Ve(),exit:Ve()}}class Ee{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Qu extends Ee{constructor(t){super(t),t.animationState||(t.animationState=Gu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Hu=0;class Xu extends Ee{constructor(){super(...arguments),this.id=Hu++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const r=this.node.animationState.setActive("exit",!t);s&&!t&&r.then(()=>{s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Zu={animation:{Feature:Qu},exit:{Feature:Xu}};function gt(e,t,s,n={passive:!0}){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s)}function bt(e){return{point:{x:e.pageX,y:e.pageY}}}const $u=e=>t=>on(t)&&e(t,bt(t));function ut(e,t,s,n){return gt(e,t,$u(s),n)}const Ao=1e-4,ed=1-Ao,td=1+Ao,Co=.01,sd=0-Co,nd=0+Co;function oe(e){return e.max-e.min}function rd(e,t,s){return Math.abs(e-t)<=s}function yr(e,t,s,n=.5){e.origin=n,e.originPoint=Y(t.min,t.max,e.origin),e.scale=oe(s)/oe(t),e.translate=Y(s.min,s.max,e.origin)-e.originPoint,(e.scale>=ed&&e.scale<=td||isNaN(e.scale))&&(e.scale=1),(e.translate>=sd&&e.translate<=nd||isNaN(e.translate))&&(e.translate=0)}function dt(e,t,s,n){yr(e.x,t.x,s.x,n?n.originX:void 0),yr(e.y,t.y,s.y,n?n.originY:void 0)}function xr(e,t,s){e.min=s.min+t.min,e.max=e.min+oe(t)}function id(e,t,s){xr(e.x,t.x,s.x),xr(e.y,t.y,s.y)}function vr(e,t,s){e.min=t.min-s.min,e.max=e.min+oe(t)}function It(e,t,s){vr(e.x,t.x,s.x),vr(e.y,t.y,s.y)}function he(e){return[e("x"),e("y")]}const ko=({current:e})=>e?e.ownerDocument.defaultView:null,br=(e,t)=>Math.abs(e-t);function od(e,t){const s=br(e.x,t.x),n=br(e.y,t.y);return Math.sqrt(s**2+n**2)}const wr=new Set(["auto","scroll"]);class To{constructor(t,s,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=ls(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,A=od(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!A)return;const{point:C}=m,{timestamp:y}=te;this.history.push({...C,timestamp:y});const{onStart:b,onMove:x}=this.handlers;v||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,m)},this.handlePointerMove=(m,v)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=as(v,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(m,v)=>{this.end();const{onEnd:A,onSessionEnd:C,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ls(m.type==="pointercancel"?this.lastMoveEventInfo:as(v,this.transformPagePoint),this.history);this.startEvent&&A&&A(m,b),C&&C(m,b)},!on(t))return;this.dragSnapToOrigin=i,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const c=bt(t),d=as(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=te;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=s;p&&p(t,ls(d,this.history)),this.removeListeners=yt(ut(this.contextWindow,"pointermove",this.handlePointerMove),ut(this.contextWindow,"pointerup",this.handlePointerUp),ut(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let s=t.parentElement;for(;s;){const n=getComputedStyle(s);(wr.has(n.overflowX)||wr.has(n.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const n=t===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:r.x-s.x,y:r.y-s.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,r),W.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Te(this.updatePoint)}}function as(e,t){return t?{point:t(e.point)}:e}function Ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ls({point:e},t){return{point:e,delta:Ar(e,So(t)),offset:Ar(e,ad(t)),velocity:ld(t,.1)}}function ad(e){return e[0]}function So(e){return e[e.length-1]}function ld(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,n=null;const r=So(e);for(;s>=0&&(n=e[s],!(r.timestamp-n.timestamp>xe(t)));)s--;if(!n)return{x:0,y:0};const i=fe(r.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-n.x)/i,y:(r.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function cd(e,{min:t,max:s},n){return t!==void 0&&e<t?e=n?Y(t,e,n.min):Math.max(e,t):s!==void 0&&e>s&&(e=n?Y(s,e,n.max):Math.min(e,s)),e}function Cr(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function ud(e,{top:t,left:s,bottom:n,right:r}){return{x:Cr(e.x,s,r),y:Cr(e.y,t,n)}}function kr(e,t){let s=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,n]=[n,s]),{min:s,max:n}}function dd(e,t){return{x:kr(e.x,t.x),y:kr(e.y,t.y)}}function hd(e,t){let s=.5;const n=oe(e),r=oe(t);return r>n?s=ht(t.min,t.max-n,e.min):n>r&&(s=ht(e.min,e.max-r,t.min)),be(0,1,s)}function fd(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Fs=.35;function pd(e=Fs){return e===!1?e=0:e===!0&&(e=Fs),{x:Tr(e,"left","right"),y:Tr(e,"top","bottom")}}function Tr(e,t,s){return{min:Sr(e,t),max:Sr(e,s)}}function Sr(e,t){return typeof e=="number"?e:e[t]||0}const md=new WeakMap;class gd{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{s?(this.stopAnimation(),this.snapToCursor(bt(h).point)):this.pauseAnimation()},o=(h,p)=>{this.stopAnimation();const{drag:m,dragPropagation:v,onDragStart:A}=this.getProps();if(m&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=wc(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),he(y=>{let b=this.getAxisMotionValue(y).get()||0;if(ve.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const R=x.layout.layoutBox[y];R&&(b=oe(R)*(parseFloat(b)/100))}}this.originPoint[y]=b}),A&&W.postRender(()=>A(h,p)),Ms(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},a=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:v,onDirectionLock:A,onDrag:C}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(v&&this.currentDirection===null){this.currentDirection=yd(y),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),C&&C(h,p)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>he(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new To(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:ko(this.visualElement),element:this.visualElement.current})}stop(t,s){const n=t||this.latestPointerEvent,r=s||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&W.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(t,s,n){const{drag:r}=this.getProps();if(!n||!Pt(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=cd(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&lt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=ud(n.layoutBox,t):this.constraints=!1,this.elastic=pd(s),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&he(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=fd(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!lt(t))return!1;const n=t.current;we(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=xu(n,r.root,this.visualElement.getTransformPagePoint());let o=dd(r.layout.layoutBox,i);if(s){const a=s(mu(o));this.hasMutatedConstraints=!!a,a&&(o=lo(a))}return o}startAnimation(t){const{drag:s,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=he(u=>{if(!Pt(u,s,this.currentDirection))return;let h=c&&c[u]||{};o&&(h={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,v={type:"inertia",velocity:n?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(u,v)});return Promise.all(d).then(a)}startAxisValueAnimation(t,s){const n=this.getAxisMotionValue(t);return Ms(this.visualElement,t),n.start(gn(t,n,0,s,this.visualElement,!1))}stopAnimation(){he(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){he(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),r=n[s];return r||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){he(s=>{const{drag:n}=this.getProps();if(!Pt(s,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(s);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[s],c=i.get()||0;i.set(t[s]-Y(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!lt(s)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};he(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();r[o]=hd({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),he(o=>{if(!Pt(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];a.set(Y(c,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;md.set(this.visualElement,this);const t=this.visualElement.current,s=ut(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&!zi(c.target)&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();lt(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),W.read(n);const o=gt(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(he(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=c[u].translate,h.set(h.get()+c[u].translate))}),this.visualElement.render())}));return()=>{o(),s(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Fs,dragMomentum:a=!0}=t;return{...t,drag:s,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Pt(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function yd(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class xd extends Ee{constructor(t){super(t),this.removeGroupControls=pe,this.removeListeners=pe,this.controls=new gd(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pe}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners()}}const Er=e=>(t,s)=>{e&&W.postRender(()=>e(t,s))};class vd extends Ee{constructor(){super(...arguments),this.removePointerDownListener=pe}onPointerDown(t){this.session=new To(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ko(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Er(t),onStart:Er(s),onMove:n,onEnd:(i,o)=>{delete this.session,r&&W.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=ut(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let cs=!1;class bd extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=t;i&&(s.group&&s.group.add(i),n&&n.register&&r&&n.register(i),cs&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Vt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o&&(o.isPresent=i,cs=!0,r||t.layoutDependency!==s||s===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||W.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:n}=this.props,{projection:r}=t;cs=!0,r&&(r.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Eo(e){const[t,s]=Ji(),n=g.useContext(Bs);return l.jsx(bd,{...e,layoutGroup:n,switchLayoutGroup:g.useContext(oo),isPresent:t,safeToRemove:s})}function wd(e,t,s){const n=ne(e)?e:Je(e);return n.start(gn("",n,t,s)),n.animation}const Ad=(e,t)=>e.depth-t.depth;class Cd{constructor(){this.children=[],this.isDirty=!1}add(t){_s(this.children,t),this.isDirty=!0}remove(t){Us(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ad),this.isDirty=!1,this.children.forEach(t)}}function kd(e,t){const s=ie.now(),n=({timestamp:r})=>{const i=r-s;i>=t&&(Te(n),e(i-t))};return W.setup(n,!0),()=>Te(n)}const Po=["TopLeft","TopRight","BottomLeft","BottomRight"],Td=Po.length,Pr=e=>typeof e=="string"?parseFloat(e):e,jr=e=>typeof e=="number"||S.test(e);function Sd(e,t,s,n,r,i){r?(e.opacity=Y(0,s.opacity??1,Ed(n)),e.opacityExit=Y(t.opacity??1,0,Pd(n))):i&&(e.opacity=Y(t.opacity??1,s.opacity??1,n));for(let o=0;o<Td;o++){const a=`border${Po[o]}Radius`;let c=Rr(t,a),d=Rr(s,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||jr(c)===jr(d)?(e[a]=Math.max(Y(Pr(c),Pr(d),n),0),(ve.test(d)||ve.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||s.rotate)&&(e.rotate=Y(t.rotate||0,s.rotate||0,n))}function Rr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ed=jo(0,.5,hi),Pd=jo(.5,.95,pe);function jo(e,t,s){return n=>n<e?0:n>t?1:s(ht(e,t,n))}function Nr(e,t){e.min=t.min,e.max=t.max}function me(e,t){Nr(e.x,t.x),Nr(e.y,t.y)}function Vr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Mr(e,t,s,n,r){return e-=t,e=Ot(e,1/s,n),r!==void 0&&(e=Ot(e,1/r,n)),e}function jd(e,t=0,s=1,n=.5,r,i=e,o=e){if(ve.test(t)&&(t=parseFloat(t),t=Y(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Y(i.min,i.max,n);e===i&&(a-=t),e.min=Mr(e.min,t,s,a,r),e.max=Mr(e.max,t,s,a,r)}function Dr(e,t,[s,n,r],i,o){jd(e,t[s],t[n],t[r],t.scale,i,o)}const Rd=["x","scaleX","originX"],Nd=["y","scaleY","originY"];function Fr(e,t,s,n){Dr(e.x,t,Rd,s?s.x:void 0,n?n.x:void 0),Dr(e.y,t,Nd,s?s.y:void 0,n?n.y:void 0)}function Lr(e){return e.translate===0&&e.scale===1}function Ro(e){return Lr(e.x)&&Lr(e.y)}function Br(e,t){return e.min===t.min&&e.max===t.max}function Vd(e,t){return Br(e.x,t.x)&&Br(e.y,t.y)}function Or(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function No(e,t){return Or(e.x,t.x)&&Or(e.y,t.y)}function Ir(e){return oe(e.x)/oe(e.y)}function _r(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Md{constructor(){this.members=[]}add(t){_s(this.members,t),t.scheduleRender()}remove(t){if(Us(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){const s=this.members.findIndex(r=>t===r);if(s===0)return!1;let n;for(let r=s;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,s){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,s&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:s,resumingFrom:n}=t;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Dd(e,t,s){let n="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=s?.z||0;if((r||i||o)&&(n=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:p,skewX:m,skewY:v}=s;d&&(n=`perspective(${d}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),p&&(n+=`rotateY(${p}deg) `),m&&(n+=`skewX(${m}deg) `),v&&(n+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(n+=`scale(${a}, ${c})`),n||"none"}const us=["","X","Y","Z"],Fd=1e3;let Ld=0;function ds(e,t,s,n){const{latestValues:r}=t;r[e]&&(s[e]=r[e],t.setStaticValue(e,0),n&&(n[e]=0))}function Vo(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=yo(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",W,!(r||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&Vo(n)}function Mo({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:n,resetTransform:r}){return class{constructor(o={},a=t?.()){this.id=Ld++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Id),this.nodes.forEach(qd),this.nodes.forEach(Kd),this.nodes.forEach(_d)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cd)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new qs),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Gi(o)&&!Sc(o),this.instance=o;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;W.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=kd(p,250),Vt.hasAnimatedSinceResize&&(Vt.hasAnimatedSinceResize=!1,this.nodes.forEach(qr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||Qd,{onLayoutAnimationStart:A,onLayoutAnimationComplete:C}=d.getProps(),y=!this.targetLayout||!No(this.targetLayout,m),b=!h&&p;if(this.options.layoutRoot||this.resumeFrom||b||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...sn(v,"layout"),onPlay:A,onComplete:C};(d.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else h||qr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Te(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ur);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Wr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wd),this.nodes.forEach(Bd),this.nodes.forEach(Od)):this.nodes.forEach(Wr),this.clearAllSnapshots();const a=ie.now();te.delta=be(0,1e3/60,a-te.timestamp),te.timestamp=a,te.isProcessing=!0,Zt.update.process(te),Zt.preRender.process(te),Zt.render.process(te),te.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ud),this.sharedNodes.forEach(zd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!oe(this.snapshot.measuredBox.x)&&!oe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ro(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||Me(this.latestValues)||u)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),Hd(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return $();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Xd))){const{scroll:d}=this.root;d&&(qe(a.x,d.offset.x),qe(a.y,d.offset.y))}return a}removeElementScroll(o){const a=$();if(me(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:h}=d;d!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&me(a,o),qe(a.x,u.offset.x),qe(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=$();me(c,o);for(let d=0;d<this.path.length;d++){const u=this.path[d];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Ke(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Me(u.latestValues)&&Ke(c,u.latestValues)}return Me(this.latestValues)&&Ke(c,this.latestValues),c}removeTransform(o){const a=$();me(a,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!Me(d.latestValues))continue;js(d.latestValues)&&d.updateSnapshot();const u=$(),h=d.measurePageBox();me(u,h),Fr(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return Me(this.latestValues)&&Fr(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==te.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=te.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),id(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),uo(this.target,this.targetDelta)):me(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||js(this.parent.latestValues)||co(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),It(this.relativeTargetOrigin,a,c),me(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===te.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;me(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;yu(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=$());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vr(this.prevProjectionDelta.x,this.projectionDelta.x),Vr(this.prevProjectionDelta.y,this.projectionDelta.y)),dt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!_r(this.projectionDelta.x,this.prevProjectionDelta.x)||!_r(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ye(),this.projectionDelta=Ye(),this.projectionDeltaWithTransform=Ye()}setAnimationOrigin(o,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Ye();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=$(),m=c?c.source:void 0,v=this.layout?this.layout.source:void 0,A=m!==v,C=this.getStack(),y=!C||C.members.length<=1,b=!!(A&&!y&&this.options.crossfade===!0&&!this.path.some(Jd));this.animationProgress=0;let x;this.mixTargetDelta=R=>{const P=R/1e3;Kr(h.x,o.x,P),Kr(h.y,o.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(It(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gd(this.relativeTarget,this.relativeTargetOrigin,p,P),x&&Vd(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=$()),me(x,this.relativeTarget)),A&&(this.animationValues=u,Sd(u,d,this.latestValues,P,b,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Te(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{Vt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Je(0)),this.currentAnimation=wd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Fd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=o;if(!(!a||!c||!d)){if(this!==o&&this.layout&&d&&Do(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||$();const h=oe(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const p=oe(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}me(a,c),Ke(a,u),dt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Md),this.sharedNodes.get(o).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&ds("z",o,d,this.animationValues);for(let u=0;u<us.length;u++)ds(`rotate${us[u]}`,o,d,this.animationValues),ds(`skew${us[u]}`,o,d,this.animationValues);o.render();for(const u in d)o.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Nt(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Nt(a?.pointerEvents)||""),this.hasProjected&&!Me(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Dd(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:p,y:m}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?o.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in Ps){if(u[v]===void 0)continue;const{correct:A,applyTo:C,isCSSVariable:y}=Ps[v],b=h==="none"?u[v]:A(u[v],d);if(C){const x=C.length;for(let R=0;R<x;R++)o[C[R]]=b}else y?this.options.visualElement.renderState.vars[v]=b:o[v]=b}this.options.layoutId&&(o.pointerEvents=d===this?Nt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ur),this.root.sharedNodes.clear()}}}function Bd(e){e.updateLayout()}function Od(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:n}=e.layout,{animationType:r}=e.options,i=t.source!==e.layout.source;r==="size"?he(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=oe(h);h.min=s[u].min,h.max=h.min+p}):Do(r,t.layoutBox,s)&&he(u=>{const h=i?t.measuredBox[u]:t.layoutBox[u],p=oe(s[u]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+p)});const o=Ye();dt(o,s,t.layoutBox);const a=Ye();i?dt(a,e.applyTransform(n,!0),t.measuredBox):dt(a,s,t.layoutBox);const c=!Ro(o);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:p}=u;if(h&&p){const m=$();It(m,t.layoutBox,h.layoutBox);const v=$();It(v,s,p.layoutBox),No(m,v)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Id(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _d(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ud(e){e.clearSnapshot()}function Ur(e){e.clearMeasurements()}function Wr(e){e.isLayoutDirty=!1}function Wd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function qr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qd(e){e.resolveTargetDelta()}function Kd(e){e.calcProjection()}function Yd(e){e.resetSkewAndRotation()}function zd(e){e.removeLeadSnapshot()}function Kr(e,t,s){e.translate=Y(t.translate,0,s),e.scale=Y(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Yr(e,t,s,n){e.min=Y(t.min,s.min,n),e.max=Y(t.max,s.max,n)}function Gd(e,t,s,n){Yr(e.x,t.x,s.x,n),Yr(e.y,t.y,s.y,n)}function Jd(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Qd={duration:.45,ease:[.4,0,.1,1]},zr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Gr=zr("applewebkit/")&&!zr("chrome/")?Math.round:pe;function Jr(e){e.min=Gr(e.min),e.max=Gr(e.max)}function Hd(e){Jr(e.x),Jr(e.y)}function Do(e,t,s){return e==="position"||e==="preserve-aspect"&&!rd(Ir(t),Ir(s),.2)}function Xd(e){return e!==e.root&&e.scroll?.wasRoot}const Zd=Mo({attachResizeListener:(e,t)=>gt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hs={current:void 0},Fo=Mo({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hs.current){const e=new Zd({});e.mount(window),e.setOptions({layoutScroll:!0}),hs.current=e}return hs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$d={pan:{Feature:vd},drag:{Feature:xd,ProjectionNode:Fo,MeasureLayout:Eo}};function Qr(e,t,s){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",s==="Start");const r="onHover"+s,i=n[r];i&&W.postRender(()=>i(t,bt(t)))}class eh extends Ee{mount(){const{current:t}=this.node;t&&(this.unmount=Ac(t,(s,n)=>(Qr(this.node,n,"Start"),r=>Qr(this.node,r,"End"))))}unmount(){}}class th extends Ee{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=yt(gt(this.node.current,"focus",()=>this.onFocus()),gt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hr(e,t,s){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",s==="Start");const r="onTap"+(s==="End"?"":s),i=n[r];i&&W.postRender(()=>i(t,bt(t)))}class sh extends Ee{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(s,n)=>(Hr(this.node,n,"Start"),(r,{success:i})=>Hr(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ls=new WeakMap,fs=new WeakMap,nh=e=>{const t=Ls.get(e.target);t&&t(e)},rh=e=>{e.forEach(nh)};function ih({root:e,...t}){const s=e||document;fs.has(s)||fs.set(s,{});const n=fs.get(s),r=JSON.stringify(t);return n[r]||(n[r]=new IntersectionObserver(rh,{root:e,...t})),n[r]}function oh(e,t,s){const n=ih(t);return Ls.set(e,s),n.observe(e),()=>{Ls.delete(e),n.unobserve(e)}}const ah={some:0,all:1};class lh extends Ee{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:i}=t,o={root:s?s.current:void 0,rootMargin:n,threshold:typeof r=="number"?r:ah[r]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),p=d?u:h;p&&p(c)};return oh(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(ch(t,s))&&this.startObserver()}unmount(){}}function ch({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const uh={inView:{Feature:lh},tap:{Feature:sh},focus:{Feature:th},hover:{Feature:eh}},dh={layout:{ProjectionNode:Fo,MeasureLayout:Eo}},hh={...Zu,...uh,...$d,...dh},Xr=pu(hh,Eu),fh=({steps:e,plannerStatus:t,executionStatus:s,reportStatus:n})=>{const{t:r}=ue.useTranslation(),i=e??[],[o,a]=g.useState(new Set),[c,d]=g.useState(!1),u=y=>{a(b=>{const x=new Set(b);return x.has(y)?x.delete(y):x.add(y),x})},h=i.findIndex(y=>y.status!=="pending"),p=i.reduce((y,b,x)=>b.status!=="pending"?x:y,-1),m=i.length?i.some(y=>y.status==="in_progress")?"in_progress":i.every(y=>y.status==="done")?"done":i.some(y=>y.status==="done")?"in_progress":"pending":"pending",v=t??(i.length?"done":"pending"),A=s??m,C=n??"pending";return l.jsxs("div",{className:"space-y-6 pr-6",children:[l.jsx("div",{className:"text-sm text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.intro")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium ${v==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[v==="in_progress"?l.jsx(j.Loader,{className:"w-5 h-5 text-[#1784FC] animate-spin"}):l.jsx(j.PencilLine,{className:`w-4 h-4 ${v==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.planTitle")]}),l.jsx("div",{className:" text-[#999] dark:text-[#A6A6A6] text-sm mb-2",children:r("deepResearch.steps.planDescription")}),l.jsxs("div",{className:"border border-[#EEF0F3] dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",onClick:()=>d(y=>!y),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm text-[#333] dark:text-[#E5E7EB]",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.generatedPlans")]}),c?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-gray-400"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-gray-400"})]}),c&&i.length>0&&l.jsx("div",{className:"mt-2 space-y-1 rounded-lg bg-white dark:bg-[#020817] border border-[#EEF0F3] dark:border-[#1D3A6F] p-3",children:i.map((y,b)=>l.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6]",children:[b+1,"."]}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:y.title})]},y.id))})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${A==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[l.jsx(j.List,{className:"w-4 h-4 text-[#1784FC]"}),r("deepResearch.steps.executeTitle")]}),i.map((y,b)=>{const x=y.status!=="pending",R=b===h,P=b===p,M=y.status==="pending"&&!y.searches;return l.jsxs("div",{className:`relative ${M?"pl-0 pb-4":"pl-6 pb-8 last:pb-0"}`,children:[x&&h!==-1&&p!==-1&&l.jsx("div",{className:"absolute left-2 border-l border-dashed border-[#018AE5]/20 dark:border-gray-700",style:{top:R?10:16,bottom:P?10:-12}}),y.status==="done"&&l.jsx(j.CheckCircle,{className:"absolute left-0 top-0 w-4 h-4 text-[#1784FC]"}),y.status==="in_progress"&&l.jsx(j.Loader,{className:"absolute left-0 top-0 w-4 h-4 text-[#1784FC] animate-spin"}),M?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(j.List,{className:"w-4 h-4 text-[#C8C8C8]"}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#666]",children:y.title})]}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:`text-sm font-bold mb-1 ${y.status==="pending"?"text-[#999999] dark:text-[#666]":"text-[#333333] dark:text-[#E5E7EB]"}`,children:y.title}),y.description&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4",children:y.description}),y.searches&&l.jsxs("div",{className:"mt-2 space-y-3",children:[y.searches.map(E=>E.status==="searching"?l.jsx("div",{className:"flex items-center justify-between border border-blue-100 dark:border-blue-900/30 bg-blue-50/30 dark:bg-blue-900/10 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] animate-pulse shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searching")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]})},E.id):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-gray-50 dark:bg-[#111827] cursor-pointer hover:bg-gray-100 dark:hover:bg-[#1F2937] transition-colors",onClick:()=>u(E.id),children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm overflow-hidden",children:[l.jsx(j.Search,{className:"w-4 h-4 text-[#1784FC] shrink-0"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB] shrink-0",children:r("deepResearch.steps.searchTitle")}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate",children:["| ",E.query]})]}),typeof E.resultCount=="number"&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 text-[#1784FC] px-2 py-0.5 rounded-full text-xs font-medium",children:E.resultCount}),o.has(E.id)?l.jsx(j.ChevronUp,{className:"w-4 h-4 text-[#999]"}):l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]}),o.has(E.id)&&E.hits&&l.jsx("div",{className:"mt-2 space-y-2 pl-4",children:E.hits.map((T,D)=>l.jsx("div",{className:"p-3 bg-white dark:bg-[#020817] border border-gray-100 dark:border-[#1D3A6F] rounded-lg hover:border-blue-200 dark:hover:border-blue-800 transition-colors cursor-pointer group",onClick:()=>T.url&&window.open(T.url,"_blank"),children:l.jsx("div",{className:"flex items-start gap-2",children:l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] group-hover:text-[#1784FC] transition-colors line-clamp-1",children:T.title}),T.content&&l.jsx("div",{className:"text-xs text-[#999] dark:text-[#A6A6A6] mt-1 line-clamp-2",children:T.content})]})})},D))}),E.note&&l.jsx("p",{className:"text-[#999] dark:text-[#A6A6A6] text-sm mt-4 mb-2",children:E.note})]},E.id)),y.showOptimizePlan&&l.jsxs("div",{className:"border border-gray-200 dark:border-[#1D3A6F] rounded-lg p-3 bg-white dark:bg-[#020817] flex justify-between items-center cursor-pointer hover:bg-gray-50 dark:hover:bg-[#111827] transition-colors",children:[l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[l.jsx(j.FileText,{className:"w-4 h-4 text-[#1784FC]"}),l.jsx("span",{className:"text-[#333] dark:text-[#E5E7EB]",children:r("deepResearch.steps.optimizePlan")})]}),l.jsx(j.ChevronDown,{className:"w-4 h-4 text-[#999]"})]})]})]})]},y.id)}),l.jsx("div",{className:"pt-2",children:l.jsxs("div",{className:`flex items-center gap-2 text-base font-medium mb-4 ${C==="pending"?"text-[#999] dark:text-[#666]":"text-[#333] dark:text-[#E5E7EB]"}`,children:[C==="in_progress"?l.jsx(j.Loader,{className:"w-5 h-5 text-blue-500 animate-spin"}):l.jsx(j.BookOpenText,{className:`w-4 h-4 ${C==="pending"?"text-[#999]":"text-[#1784FC]"}`}),r("deepResearch.steps.reportTitle")]})})]})]})},ph=({content:e,data:t,formatUrl:s})=>{const{t:n}=ue.useTranslation();return!e&&!t?l.jsxs("div",{className:"px-6 pb-8 max-w-[730px] h-full flex flex-col items-center justify-center text-center",children:[l.jsx("div",{className:"mb-2 text-base font-medium text-[#333333] dark:text-[#E5E7EB]",children:n("deepResearch.report.generatingTitle")}),l.jsx("div",{className:"text-sm text-[#999999] dark:text-[#A6A6A6] max-w-[520px] leading-relaxed",children:n("deepResearch.report.generatingDescription")})]}):l.jsxs("div",{className:"px-2 pb-8 max-w-[730px]",children:[t&&l.jsxs("div",{className:"mb-6 p-4 border border-gray-200 dark:border-gray-800 rounded-xl bg-gray-50 dark:bg-gray-900 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400",children:l.jsx(j.FileText,{className:"w-6 h-6"})}),l.jsxs("div",{children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-gray-100",children:t.title||n("deepResearch.report.defaultTitle")}),l.jsx("div",{className:"text-xs text-gray-500",children:t.created?ei(t.created):""})]})]}),t.url&&l.jsx("a",{href:s?s({url:t.url}):t.url,target:"_blank",rel:"noopener noreferrer",className:"p-2 text-gray-500 hover:text-blue-600 dark:hover:text-blue-400 transition-colors cursor-pointer",title:n("deepResearch.button.view"),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]}),e&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{content:e})}),t?.url&&l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{url:s?s({url:t.url}):t.url})})]})},mh=({hits:e,theme:t})=>{const s=g.useMemo(()=>{if(!e||!Array.isArray(e))return[];const n=new Map;for(const i of e){if(!i||typeof i!="object")continue;const o=typeof i.title=="string"?i.title:"";o&&(n.has(o)||n.set(o,i))}const r=[];return n.forEach(i=>{const o=typeof i.title=="string"?i.title:"",a=typeof i.url=="string"?i.url:void 0,c=typeof i.content=="string"?i.content:void 0,d={title:o,summary:c,url:a,source:typeof i.source=="string"?{name:i.source}:void 0,metadata:typeof i.score=="number"?{score:i.score}:void 0};r.push(d)}),r},[e]);return l.jsx("div",{className:"pb-8 max-w-[730px]",children:l.jsx(ca,{section:s,theme:t||"light",hideHeader:!0,onRecordClick:n=>{typeof n.url=="string"&&window.open(n.url)}})})},Lo=({open:e,onClose:t,defaultActiveTab:s,steps:n,plannerStatus:r,executionStatus:i,reportStatus:o,reportData:a,reportContent:c,searchHits:d,formatUrl:u,theme:h,showReportOnly:p=!1})=>{const{t:m}=ue.useTranslation(),[v,A]=g.useState(s||m("deepResearch.tab.steps"));return g.useEffect(()=>{p?A(m("deepResearch.tab.report")):s&&A(s)},[s,p,m]),l.jsx(Fc,{children:e&&l.jsxs(l.Fragment,{children:[l.jsx(Xr.div,{className:"fixed inset-0 z-999 bg-black/20",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t}),l.jsxs(Xr.div,{className:"fixed z-1000 top-20 bottom-20 right-4 flex flex-col rounded-xl overflow-hidden bg-white dark:bg-black shadow-[0_2px_20px_rgba(0,0,0,0.1)] dark:shadow-[0_2px_20px_rgba(255,255,255,0.1)]",initial:{width:0,height:0,opacity:0,padding:0},animate:{width:800,height:"auto",opacity:1,padding:24},exit:{width:0,height:0,opacity:0,padding:0},children:[l.jsxs("div",{className:"flex items-center justify-between",children:[p?l.jsx("div",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:m("deepResearch.tab.report")}):l.jsx(Nn.Segmented,{className:"cm-deep-research-segmented",value:v,style:{marginBottom:8},onChange:C=>A(C),options:[m("deepResearch.tab.report"),m("deepResearch.tab.steps"),m("deepResearch.tab.searchResults")]}),l.jsxs("div",{className:"flex items-center gap-2",children:[v===m("deepResearch.tab.report")&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",onClick:()=>a?.url&&window.open(u?.({url:a.url})||a.url,"_blank"),children:[l.jsx(j.Download,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.download")})]}),l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-2 py-1 rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-sm text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 border-none outline-none cursor-pointer",children:[l.jsx(j.Share2,{className:"w-4 h-4"}),l.jsx("span",{children:m("deepResearch.button.share")})]})]}),l.jsx(Nn.Button,{type:"text",onClick:t,className:"text-[#999] hover:text-gray-600 flex items-center justify-center",children:l.jsx(j.X,{className:"w-5 h-5"})})]})]}),l.jsxs("div",{className:"pt-6 flex-1 overflow-y-auto bg-white dark:bg-black",children:[v===m("deepResearch.tab.report")&&l.jsx(ph,{content:c,data:a,formatUrl:u}),v===m("deepResearch.tab.steps")&&l.jsx(fh,{steps:n,plannerStatus:r,executionStatus:i,reportStatus:o}),v===m("deepResearch.tab.searchResults")&&l.jsx(mh,{hits:d,theme:h})]})]})]})})},gh=e=>{const t={deepResearchPlans:[],deepResearchCurrentStepIndex:-1,deepResearchCurrentStepFinished:!1,deepResearchQuery:"",deepResearchResultCount:void 0,deepResearchPlannerStarted:!1,deepResearchResearcherStarted:!1,deepResearchReporterStarted:!1,deepResearchReporterFinished:!1,deepResearchReportData:void 0,deepResearchSearchMap:{}};return e.forEach(s=>{if(s.chunk_type==="research_planner_start"){t.deepResearchPlans=[],t.deepResearchCurrentStepIndex=-1,t.deepResearchCurrentStepFinished=!1,t.deepResearchQuery="",t.deepResearchResultCount=void 0,t.deepResearchPlannerStarted=!0,t.deepResearchResearcherStarted=!1,t.deepResearchReporterStarted=!1,t.deepResearchReporterFinished=!1,t.deepResearchReportData=void 0,t.deepResearchSearchMap={};return}if(s.chunk_type==="research_planner_end"){if(typeof s.message_chunk=="string")try{const n=JSON.parse(s.message_chunk);if(Array.isArray(n)){const r=n.map(i=>String(i));t.deepResearchPlans=r,t.deepResearchCurrentStepIndex=r.length>0?0:-1}t.deepResearchPlannerStarted=!1}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"";if(r){t.deepResearchResearcherStarted=!0,t.deepResearchCurrentStepFinished=!1;let i=t.deepResearchPlans.findIndex(o=>o===r);i===-1&&(t.deepResearchPlans.push(r),i=t.deepResearchPlans.length-1),t.deepResearchCurrentStepIndex=i}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_start"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.query;if(r&&!t.deepResearchPlans.includes(r)&&(t.deepResearchPlans.push(r),t.deepResearchCurrentStepIndex===-1&&(t.deepResearchCurrentStepIndex=t.deepResearchPlans.length-1)),typeof i=="string"&&(t.deepResearchQuery=i),t.deepResearchResultCount=void 0,r&&typeof i=="string"){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,query:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_step_end"){if(typeof s.message_chunk=="string"&&s.message_chunk)try{const n=JSON.parse(s.message_chunk),r=typeof n?.plan=="string"?n.plan:"",i=n?.step?.payload?.hits;if(Array.isArray(i)&&(t.deepResearchResultCount=i.length,r)){const o=t.deepResearchSearchMap[r]??{};t.deepResearchSearchMap[r]={...o,resultCount:i.length,hits:i}}}catch(n){console.error(n)}return}if(s.chunk_type==="research_researcher_end"){t.deepResearchQuery="",t.deepResearchCurrentStepFinished=!0;return}if(s.chunk_type==="research_reporter_start"){t.deepResearchReporterStarted=!0;return}if(s.chunk_type==="research_reporter_end"&&(t.deepResearchReporterStarted=!0,t.deepResearchReporterFinished=!0,typeof s.message_chunk=="string"&&s.message_chunk))try{const n=JSON.parse(s.message_chunk);t.deepResearchReportData=n}catch(n){console.error(n)}}),t},yh=({ChunkData:e=[],question:t,formatUrl:s,theme:n})=>{const{t:r}=ue.useTranslation(),[i,o]=g.useState(!0),[a,c]=g.useState(r("deepResearch.tab.steps")),{deepResearchPlans:d,deepResearchCurrentStepIndex:u,deepResearchCurrentStepFinished:h,deepResearchQuery:p,deepResearchResultCount:m,deepResearchPlannerStarted:v,deepResearchResearcherStarted:A,deepResearchReporterStarted:C,deepResearchReporterFinished:y,deepResearchReportData:b,deepResearchSearchMap:x}=g.useMemo(()=>gh(e),[e]),R=d.length>0&&u>=0&&u<d.length,P=R?d[u]:"",M=d.length>0?1:0,E=R?(u+1)/d.length:0,T=y?1:C?.5:0,D=(M+E+T)/3,_=g.useMemo(()=>{if(y)return typeof m=="number"?`深度研究完成 · 找到 ${m} 条相关结果`:"深度研究完成";if(C)return"正在编写研究报告";if(A)return"正在执行研究计划";if(d.length>0)return"正在规划研究计划"},[y,m,C,A,d.length]),z=g.useMemo(()=>d.length?d.map((O,q)=>{let J="pending";y||C?J="done":A&&(q<u?J="done":q===u&&(J=h?"done":"in_progress"));const se=x[O],Pe=se?.query?[{id:`step-${q+1}-search-1`,query:se.query,resultCount:se.resultCount,status:typeof se.resultCount=="number"?"done":"searching",hits:se.hits}]:void 0;return{id:`step-${q+1}`,title:O,status:J,searches:Pe,showOptimizePlan:!1}}):[],[d,y,C,A,x,u,h]),X=g.useMemo(()=>{const O=[];return Object.values(x).forEach(q=>{q.hits&&Array.isArray(q.hits)&&O.push(...q.hits)}),O},[x]),ae=d.length?"done":v?"in_progress":"pending",Z=g.useMemo(()=>z.length?z.some(O=>O.status==="in_progress")?"in_progress":z.some(O=>O.status==="done")?"done":"pending":"pending",[z]),ce=y?"done":C?"in_progress":"pending",ee=g.useMemo(()=>typeof D!="number"||Number.isNaN(D)||D<0?0:D>1?1:D,[D]),B=g.useMemo(()=>_||(ee>=1?typeof m=="number"?r("deepResearch.status.completedWithCount",{count:m}):r("deepResearch.status.completed"):ee>0?r("deepResearch.status.running"):r("deepResearch.status.preparing")),[_,ee,m,r]);return e.length?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"w-full my-3 cursor-pointer",onClick:()=>{c(r("deepResearch.tab.steps")),o(!0)},children:l.jsxs("div",{className:"w-full rounded-xl border border-[#EEF0F3] bg-[#F3F4F6] dark:border-[#1D3A6F] dark:bg-[#020817] p-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(j.Hourglass,{className:"h-4 w-4 text-[#148EFF] cm-hourglass-rotate"}),l.jsx("div",{className:"text-sm font-medium text-[#333] dark:text-[#E5E7EB] truncate",children:P||"——"})]}),l.jsxs("div",{className:"mt-2 flex items-center justify-between rounded-full bg-white px-3 py-2 text-sm text-[#333] dark:bg-[#111827] dark:text-[#D1D5DB]",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2 flex-1",children:[ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E] shrink-0"}):l.jsx(j.Loader,{className:"h-4 w-4 animate-spin text-[#148EFF] shrink-0"}),l.jsxs("div",{className:"flex min-w-0 items-center flex-1",children:[l.jsx("span",{className:"whitespace-nowrap shrink-0",children:B}),l.jsxs("span",{className:"text-[#999] dark:text-[#A6A6A6] truncate ml-1",children:["| ",p||t]})]})]}),l.jsxs("div",{className:"ml-2 flex items-center gap-2 shrink-0",children:[ee<1&&typeof m=="number"?l.jsx("div",{className:"flex py-0.5 px-1 items-center justify-center rounded-full border border-[#018AE5] bg-white text-xs font-medium text-[#018AE5] dark:bg-[#020617]",children:m}):null,ee>=1&&l.jsx("button",{type:"button",className:"px-3 py-1 text-xs font-medium rounded-full bg-[#E9F0FE] dark:bg-blue-900/30 text-[#1784FC] dark:text-blue-400 hover:bg-[#E0E9FD] dark:hover:bg-blue-900/50 cursor-pointer",onClick:O=>{O.stopPropagation(),c(r("deepResearch.tab.report")),o(!0)},children:r("deepResearch.button.view")})]})]}),l.jsxs("div",{className:"mt-5 w-full flex items-center gap-2 overflow-hidden",children:[l.jsx("div",{className:"h-2 rounded-full flex-1 items-center bg-white dark:bg-[#1F2937]",children:l.jsx("div",{className:`h-full rounded-full transition-all ${ee>=1?"bg-[#00C868]":"bg-[#1784FC]"}`,style:{width:`${ee*100}%`}})}),l.jsx("div",{className:"flex items-center justify-center cursor-not-allowed opacity-50",children:ee>=1?l.jsx(j.Check,{className:"h-4 w-4 text-[#22C55E]"}):l.jsx(j.CirclePause,{className:"h-4 w-4 text-[#1784FC]"})})]})]})}),l.jsx(Lo,{open:i,onClose:()=>o(!1),defaultActiveTab:a,steps:z,plannerStatus:ae,executionStatus:Z,reportStatus:ce,reportData:b,searchHits:X,formatUrl:s,theme:n})]}):null},xh=({payload:e,formatUrl:t})=>{const[s,n]=g.useState(!1);return!e?.title||!e?.url?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mt-3",children:l.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gray-50 dark:bg-[#202126] rounded-lg border border-gray-200 dark:border-gray-800 max-w-sm cursor-pointer transition-colors hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>n(!0),children:[l.jsx("div",{className:"shrink-0",children:l.jsx(j.FileText,{className:"w-6 h-6 text-blue-500"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 truncate",title:e.title,children:e.title}),e.created&&l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:ei(e.created)})]}),e.url&&l.jsx("a",{href:t?t({url:e.url}):e.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 p-2 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-md transition-colors cursor-pointer",title:"Open Link",onClick:r=>r.stopPropagation(),children:l.jsx(j.ExternalLink,{className:"w-5 h-5"})})]})}),l.jsx(Lo,{open:s,onClose:()=>n(!1),reportContent:e.content,reportData:e,formatUrl:t,showReportOnly:!0})]})},vh=["research_planner_start","research_planner_progress","research_planner_end","research_researcher_start","research_researcher_step_start","research_researcher_step_end","research_researcher_end","research_reporter_start","research_reporter_end"];function bh(e){if(e)return e==="light"?"light":e==="dark"||typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}const wh=g.memo(g.forwardRef(function({message:t,isTyping:s,onResend:n,hide_assistant:r=!1,rootClassName:i,actionClassName:o,actionIconSize:a,copyButtonId:c,formatUrl:d,theme:u,locale:h,assistantList:p,currentAssistant:m},v){const{t:A,i18n:C}=ue.useTranslation(),y=bh(u),[b,x]=g.useState({}),{data:{query_intent:R,tools:P,fetch_source:M,pick_source:E,deep_read:T,think:D,response:_,deepResearch:z},handlers:X,clearAllChunkData:ae}=Ma(),[Z,ce]=g.useState({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee=g.useRef(!1);g.useImperativeHandle(v,()=>({addChunk:V=>{if(ce(()=>({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1,[V.chunk_type||""]:!0})),V.chunk_type!=="reply_start")if(V.chunk_type==="query_intent")X.deal_query_intent(V);else if(V.chunk_type==="tools")X.deal_tools(V);else if(V.chunk_type==="fetch_source")X.deal_fetch_source(V);else if(V.chunk_type==="pick_source")X.deal_pick_source(V);else if(V.chunk_type==="deep_read")X.deal_deep_read(V);else if(V.chunk_type==="think")X.deal_think(V);else if(V.chunk_type==="response"){const Re=V.message_chunk;if(typeof Re=="string"){if(Re.includes("<think>")||Re.includes("<think>")){ee.current=!0;return}else if(Re.includes("</think>")||Re.includes("</think>")){ee.current=!1;return}ee.current?X.deal_think({...V,chunk_type:"think"}):X.deal_response(V)}}else vh.includes(V.chunk_type||"")?X.deal_deep_research(V):V.chunk_type},reset:()=>{ae(),ce({query_intent:!1,tools:!1,fetch_source:!1,pick_source:!1,deep_read:!1,think:!1,response:!1,deepResearch:!1}),ee.current=!1}}));const B=t?._source?.type==="assistant",O=t?._source?.assistant_id,q=t?._source?.assistant_item;g.useEffect(()=>{h&&C.language!==h&&C.changeLanguage(h)},[h,C]),g.useEffect(()=>{if(q){x(q);return}if(B&&O&&Array.isArray(p)){x(p.find(V=>V._id===O)??{});return}x(m)},[B,q,O,p,m]);const J=t?._source,se=J?.message||"",Pe=J?.payload,wt=J?.attachments??[],ye=J?.details||[],et=J?.question||"",tt=s===!1&&(se||_?.message_chunk),[je,Be]=g.useState([]),st=V=>{Be(V)},Oe=!B||ye&&ye.length>0||!!R||!!P||!!M||!!E||!!T||!!D||z&&z.length>0||!!se||!!_?.message_chunk||!!Pe||s||je&&je.length>0,zt=()=>B?l.jsxs(l.Fragment,{children:[l.jsx(ya,{Detail:ye.find(V=>V.type==="query_intent"),ChunkData:R,getSuggestion:st,loading:Z?.query_intent}),l.jsx(xa,{Detail:ye.find(V=>V.type==="tools"),ChunkData:P,loading:Z?.tools}),l.jsx(wa,{Detail:ye.find(V=>V.type==="fetch_source"),ChunkData:M,loading:Z?.fetch_source,formatUrl:d}),l.jsx(Ca,{Detail:ye.find(V=>V.type==="pick_source"),ChunkData:E,loading:Z?.pick_source}),l.jsx(Ta,{Detail:ye.find(V=>V.type==="deep_read"),ChunkData:T,loading:Z?.deep_read}),l.jsx(Sa,{Detail:ye.find(V=>V.type==="think"),ChunkData:D,loading:Z?.think}),l.jsx("div",{className:"cm-markdown",children:l.jsx(Mt,{content:se||_?.message_chunk||""})}),l.jsx(xh,{payload:Pe,formatUrl:d}),l.jsx(yh,{ChunkData:z,question:et,formatUrl:d,theme:y}),s&&l.jsx("div",{className:"inline-block w-1.5 h-5 ml-0.5 -mb-0.5 bg-[#666666] dark:bg-[#A3A3A3] rounded-sm animate-typing"}),tt&&l.jsx(Pa,{id:t._id??"",content:se||_?.message_chunk||"",question:et,actionClassName:o,actionIconSize:a,copyButtonId:c,onResend:()=>{n&&n(et)}}),!s&&l.jsx(ja,{suggestions:je,onSelect:V=>n&&n(V)})]}):l.jsx(Na,{message:se,attachments:wt});return l.jsx("div",{className:Ge("w-full py-8 flex",[B?"justify-start":"justify-end"],y==="dark"&&"dark",i),children:l.jsx("div",{className:`w-full px-4 flex gap-4 ${B?"w-full":"flex-row-reverse"}`,children:l.jsxs("div",{className:`w-full space-y-2 ${B?"text-left":"text-right"}`,children:[!r&&Oe&&l.jsxs("div",{className:"w-full flex items-center gap-1 font-semibold text-sm text-[#333] dark:text-white",children:[B?l.jsx("div",{className:"w-6 h-6 flex justify-center items-center rounded-full bg-white dark:bg-[#2A2A2A] border border-[#E6E6E6] dark:border-[#3A3A3A]",children:b?._source?.icon?.startsWith("font_")?l.jsx(Va,{name:b._source.icon,className:"w-4 h-4"}):l.jsx("img",{src:ma,className:"w-4 h-4",alt:A("assistant.message.logo")})}):null,B?b?._source?.name||"Coco AI":""]}),l.jsx("div",{className:"w-full prose dark:prose-invert prose-sm max-w-none",children:l.jsx("div",{className:Ge("w-full text-[#333] dark:text-white leading-relaxed",B&&"pl-7"),children:zt()})})]})})})})),Ah=g.memo(g.forwardRef((e,t)=>l.jsx(ue.I18nextProvider,{i18n:Zr,children:l.jsx(wh,{...e,ref:t})})));exports.ChatMessage=Ah;