@voxket-ai/voxket-live 1.0.122 → 1.0.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -8,13 +8,7 @@
8
8
  const style = document.createElement('style');
9
9
  style.type = 'text/css';
10
10
  style.setAttribute('data-voxket-widget-styles', 'true');
11
-
12
- // Add scoped CSS with higher specificity
13
- const scopedCSS = "/*! tailwindcss v4.1.11 | 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)))){*,.voxket-widget-root :before,.voxket-widget-root :after,.voxket-widget-root ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-outline-style:solid;--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;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.voxket-widget-root .pointer-events-auto{pointer-events:auto}.voxket-widget-root .pointer-events-none{pointer-events:none}.voxket-widget-root .visible{visibility:visible}.voxket-widget-root .absolute{position:absolute}.voxket-widget-root .fixed{position:fixed}.voxket-widget-root .relative{position:relative}.voxket-widget-root .static{position:static}.voxket-widget-root .sticky{position:sticky}.voxket-widget-root .inset-0{inset:calc(var(--spacing)*0)}.voxket-widget-root .inset-4{inset:calc(var(--spacing)*4)}.voxket-widget-root .-top-2{top:calc(var(--spacing)*-2)}.voxket-widget-root .top-0{top:calc(var(--spacing)*0)}.voxket-widget-root .top-1{top:calc(var(--spacing)*1)}.voxket-widget-root .top-2{top:calc(var(--spacing)*2)}.voxket-widget-root .top-4{top:calc(var(--spacing)*4)}.voxket-widget-root .-right-2{right:calc(var(--spacing)*-2)}.voxket-widget-root .right-0{right:calc(var(--spacing)*0)}.voxket-widget-root .right-2{right:calc(var(--spacing)*2)}.voxket-widget-root .right-4{right:calc(var(--spacing)*4)}.voxket-widget-root .right-6{right:calc(var(--spacing)*6)}.voxket-widget-root .-bottom-2{bottom:calc(var(--spacing)*-2)}.voxket-widget-root .bottom-0{bottom:calc(var(--spacing)*0)}.voxket-widget-root .bottom-2{bottom:calc(var(--spacing)*2)}.voxket-widget-root .bottom-4{bottom:calc(var(--spacing)*4)}.voxket-widget-root .bottom-20{bottom:calc(var(--spacing)*20)}.voxket-widget-root .-left-2{left:calc(var(--spacing)*-2)}.voxket-widget-root .left-0{left:calc(var(--spacing)*0)}.voxket-widget-root .left-2{left:calc(var(--spacing)*2)}.voxket-widget-root .left-4{left:calc(var(--spacing)*4)}.voxket-widget-root .z-10{z-index:10}.voxket-widget-root .z-20{z-index:20}.voxket-widget-root .z-50{z-index:50}.voxket-widget-root .z-\\[9999\\]{z-index:9999}.voxket-widget-root .z-\\[10000\\]{z-index:10000}.voxket-widget-root .order-1{order:1}.voxket-widget-root .order-2{order:2}.voxket-widget-root .col-span-2{grid-column:span 2/span 2}.voxket-widget-root .col-start-1{grid-column-start:1}.voxket-widget-root .col-start-2{grid-column-start:2}.voxket-widget-root .row-span-3{grid-row:span 3/span 3}.voxket-widget-root .row-start-1{grid-row-start:1}.voxket-widget-root .row-start-3{grid-row-start:3}.voxket-widget-root .container{width:100%}@media (min-width:40rem){.voxket-widget-root .container{max-width:40rem}}@media (min-width:48rem){.voxket-widget-root .container{max-width:48rem}}@media (min-width:64rem){.voxket-widget-root .container{max-width:64rem}}@media (min-width:80rem){.voxket-widget-root .container{max-width:80rem}}@media (min-width:96rem){.voxket-widget-root .container{max-width:96rem}}.voxket-widget-root .m-4{margin:calc(var(--spacing)*4)}.voxket-widget-root .-mx-1{margin-inline:calc(var(--spacing)*-1)}.voxket-widget-root .mx-0{margin-inline:calc(var(--spacing)*0)}.voxket-widget-root .mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.voxket-widget-root .mx-3{margin-inline:calc(var(--spacing)*3)}.voxket-widget-root .mx-4{margin-inline:calc(var(--spacing)*4)}.voxket-widget-root .mx-8{margin-inline:calc(var(--spacing)*8)}.voxket-widget-root .mx-auto{margin-inline:auto}.voxket-widget-root .my-1{margin-block:calc(var(--spacing)*1)}.voxket-widget-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.voxket-widget-root .mt-1{margin-top:calc(var(--spacing)*1)}.voxket-widget-root .mt-2{margin-top:calc(var(--spacing)*2)}.voxket-widget-root .mt-4{margin-top:calc(var(--spacing)*4)}.voxket-widget-root .mt-6{margin-top:calc(var(--spacing)*6)}.voxket-widget-root .mt-8{margin-top:calc(var(--spacing)*8)}.voxket-widget-root .mr-1{margin-right:calc(var(--spacing)*1)}.voxket-widget-root .mr-2{margin-right:calc(var(--spacing)*2)}.voxket-widget-root .mr-3{margin-right:calc(var(--spacing)*3)}.voxket-widget-root .mb-1{margin-bottom:calc(var(--spacing)*1)}.voxket-widget-root .mb-2{margin-bottom:calc(var(--spacing)*2)}.voxket-widget-root .mb-3{margin-bottom:calc(var(--spacing)*3)}.voxket-widget-root .mb-4{margin-bottom:calc(var(--spacing)*4)}.voxket-widget-root .mb-6{margin-bottom:calc(var(--spacing)*6)}.voxket-widget-root .mb-8{margin-bottom:calc(var(--spacing)*8)}.voxket-widget-root .ml-1{margin-left:calc(var(--spacing)*1)}.voxket-widget-root .ml-2{margin-left:calc(var(--spacing)*2)}.voxket-widget-root .ml-auto{margin-left:auto}.voxket-widget-root .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root .block{display:block}.voxket-widget-root .flex{display:flex}.voxket-widget-root .grid{display:grid}.voxket-widget-root .hidden{display:none}.voxket-widget-root .inline{display:inline}.voxket-widget-root .inline-block{display:inline-block}.voxket-widget-root .inline-flex{display:inline-flex}.voxket-widget-root .aspect-square{aspect-ratio:1}.voxket-widget-root .aspect-video{aspect-ratio:var(--aspect-video)}.voxket-widget-root .size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.voxket-widget-root .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.voxket-widget-root .h-0{height:calc(var(--spacing)*0)}.voxket-widget-root .h-1{height:calc(var(--spacing)*1)}.voxket-widget-root .h-1\\.5{height:calc(var(--spacing)*1.5)}.voxket-widget-root .h-2{height:calc(var(--spacing)*2)}.voxket-widget-root .h-3{height:calc(var(--spacing)*3)}.voxket-widget-root .h-4{height:calc(var(--spacing)*4)}.voxket-widget-root .h-5{height:calc(var(--spacing)*5)}.voxket-widget-root .h-6{height:calc(var(--spacing)*6)}.voxket-widget-root .h-8{height:calc(var(--spacing)*8)}.voxket-widget-root .h-9{height:calc(var(--spacing)*9)}.voxket-widget-root .h-10{height:calc(var(--spacing)*10)}.voxket-widget-root .h-12{height:calc(var(--spacing)*12)}.voxket-widget-root .h-16{height:calc(var(--spacing)*16)}.voxket-widget-root .h-20{height:calc(var(--spacing)*20)}.voxket-widget-root .h-24{height:calc(var(--spacing)*24)}.voxket-widget-root .h-28{height:calc(var(--spacing)*28)}.voxket-widget-root .h-32{height:calc(var(--spacing)*32)}.voxket-widget-root .h-96{height:calc(var(--spacing)*96)}.voxket-widget-root .h-\\[25rem\\]{height:25rem}.voxket-widget-root .h-\\[30rem\\]{height:30rem}.voxket-widget-root .h-\\[56px\\]{height:56px}.voxket-widget-root .h-\\[60px\\]{height:60px}.voxket-widget-root .h-\\[70px\\]{height:70px}.voxket-widget-root .h-\\[90px\\]{height:90px}.voxket-widget-root .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.voxket-widget-root .h-auto{height:auto}.voxket-widget-root .h-fit{height:-moz-fit-content;height:fit-content}.voxket-widget-root .h-full{height:100%}.voxket-widget-root .h-px{height:1px}.voxket-widget-root .h-screen{height:100vh}.voxket-widget-root .max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.voxket-widget-root .max-h-20{max-height:calc(var(--spacing)*20)}.voxket-widget-root .max-h-48{max-height:calc(var(--spacing)*48)}.voxket-widget-root .max-h-\\[80vh\\]{max-height:80vh}.voxket-widget-root .max-h-\\[85vh\\]{max-height:85vh}.voxket-widget-root .max-h-\\[95vh\\]{max-height:95vh}.voxket-widget-root .max-h-full{max-height:100%}.voxket-widget-root .min-h-0{min-height:calc(var(--spacing)*0)}.voxket-widget-root .min-h-2{min-height:calc(var(--spacing)*2)}.voxket-widget-root .min-h-4{min-height:calc(var(--spacing)*4)}.voxket-widget-root .min-h-\\[3rem\\]{min-height:3rem}.voxket-widget-root .min-h-\\[32px\\]{min-height:32px}.voxket-widget-root .min-h-\\[180px\\]{min-height:180px}.voxket-widget-root .min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.voxket-widget-root .min-h-screen{min-height:100vh}.voxket-widget-root .\\!w-full{width:100%!important}.voxket-widget-root .w-0\\.5{width:calc(var(--spacing)*.5)}.voxket-widget-root .w-1\\.5{width:calc(var(--spacing)*1.5)}.voxket-widget-root .w-2{width:calc(var(--spacing)*2)}.voxket-widget-root .w-3{width:calc(var(--spacing)*3)}.voxket-widget-root .w-4{width:calc(var(--spacing)*4)}.voxket-widget-root .w-5{width:calc(var(--spacing)*5)}.voxket-widget-root .w-6{width:calc(var(--spacing)*6)}.voxket-widget-root .w-8{width:calc(var(--spacing)*8)}.voxket-widget-root .w-10{width:calc(var(--spacing)*10)}.voxket-widget-root .w-12{width:calc(var(--spacing)*12)}.voxket-widget-root .w-16{width:calc(var(--spacing)*16)}.voxket-widget-root .w-20{width:calc(var(--spacing)*20)}.voxket-widget-root .w-24{width:calc(var(--spacing)*24)}.voxket-widget-root .w-28{width:calc(var(--spacing)*28)}.voxket-widget-root .w-32{width:calc(var(--spacing)*32)}.voxket-widget-root .w-40{width:calc(var(--spacing)*40)}.voxket-widget-root .w-80{width:calc(var(--spacing)*80)}.voxket-widget-root .w-96{width:calc(var(--spacing)*96)}.voxket-widget-root .w-\\[32rem\\]{width:32rem}.voxket-widget-root .w-\\[180px\\]{width:180px}.voxket-widget-root .w-auto{width:auto}.voxket-widget-root .w-fit{width:-moz-fit-content;width:fit-content}.voxket-widget-root .w-full{width:100%}.voxket-widget-root .w-screen{width:100vw}.voxket-widget-root .max-w-2xl{max-width:var(--container-2xl)}.voxket-widget-root .max-w-3xl{max-width:var(--container-3xl)}.voxket-widget-root .max-w-4xl{max-width:var(--container-4xl)}.voxket-widget-root .max-w-5xl{max-width:var(--container-5xl)}.voxket-widget-root .max-w-6xl{max-width:var(--container-6xl)}.voxket-widget-root .max-w-7xl{max-width:var(--container-7xl)}.voxket-widget-root .max-w-\\[85\\%\\]{max-width:85%}.voxket-widget-root .max-w-full{max-width:100%}.voxket-widget-root .max-w-lg{max-width:var(--container-lg)}.voxket-widget-root .max-w-md{max-width:var(--container-md)}.voxket-widget-root .max-w-none{max-width:none}.voxket-widget-root .max-w-sm{max-width:var(--container-sm)}.voxket-widget-root .max-w-xs{max-width:var(--container-xs)}.voxket-widget-root .min-w-0{min-width:calc(var(--spacing)*0)}.voxket-widget-root .min-w-8{min-width:calc(var(--spacing)*8)}.voxket-widget-root .min-w-9{min-width:calc(var(--spacing)*9)}.voxket-widget-root .min-w-10{min-width:calc(var(--spacing)*10)}.voxket-widget-root .min-w-\\[2\\.5rem\\]{min-width:2.5rem}.voxket-widget-root .min-w-\\[8rem\\]{min-width:8rem}.voxket-widget-root .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.voxket-widget-root .flex-1{flex:1}.voxket-widget-root .flex-shrink-0,.voxket-widget-root .shrink-0{flex-shrink:0}.voxket-widget-root .origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.voxket-widget-root .origin-center{transform-origin:50%}.voxket-widget-root .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .translate-y-10{--tw-translate-y:calc(var(--spacing)*10);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.voxket-widget-root .animate-bounce{animation:var(--animate-bounce)}.voxket-widget-root .animate-pulse{animation:var(--animate-pulse)}.voxket-widget-root .cursor-default{cursor:default}.voxket-widget-root .cursor-not-allowed{cursor:not-allowed}.voxket-widget-root .cursor-pointer{cursor:pointer}.voxket-widget-root .resize{resize:both}.voxket-widget-root .resize-none{resize:none}.voxket-widget-root .scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.voxket-widget-root .list-inside{list-style-position:inside}.voxket-widget-root .list-decimal{list-style-type:decimal}.voxket-widget-root .list-disc{list-style-type:disc}.voxket-widget-root .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.voxket-widget-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.voxket-widget-root .grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.voxket-widget-root .grid-cols-\\[1fr_1fr\\]{grid-template-columns:1fr 1fr}.voxket-widget-root .grid-rows-\\[90px_1fr_90px\\]{grid-template-rows:90px 1fr 90px}.voxket-widget-root .flex-col{flex-direction:column}.voxket-widget-root .flex-row{flex-direction:row}.voxket-widget-root .flex-row-reverse{flex-direction:row-reverse}.voxket-widget-root .flex-wrap{flex-wrap:wrap}.voxket-widget-root .place-content-center{place-content:center}.voxket-widget-root .place-content-end{place-content:end}.voxket-widget-root .items-center{align-items:center}.voxket-widget-root .items-end{align-items:flex-end}.voxket-widget-root .items-start{align-items:flex-start}.voxket-widget-root .justify-between{justify-content:space-between}.voxket-widget-root .justify-center{justify-content:center}.voxket-widget-root .justify-end{justify-content:flex-end}.voxket-widget-root .justify-start{justify-content:flex-start}.voxket-widget-root .justify-items-start{justify-items:start}.voxket-widget-root .gap-1{gap:calc(var(--spacing)*1)}.voxket-widget-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.voxket-widget-root .gap-2{gap:calc(var(--spacing)*2)}.voxket-widget-root .gap-3{gap:calc(var(--spacing)*3)}.voxket-widget-root .gap-4{gap:calc(var(--spacing)*4)}.voxket-widget-root .gap-6{gap:calc(var(--spacing)*6)}.voxket-widget-root .gap-8{gap:calc(var(--spacing)*8)}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root .gap-x-0\\.5{-moz-column-gap:calc(var(--spacing)*.5);column-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-x-2{-moz-column-gap:calc(var(--spacing)*2);column-gap:calc(var(--spacing)*2)}.voxket-widget-root :where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root .gap-y-0\\.5{row-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-y-2{row-gap:calc(var(--spacing)*2)}.voxket-widget-root .self-center{align-self:center}.voxket-widget-root .justify-self-end{justify-self:flex-end}.voxket-widget-root .justify-self-start{justify-self:flex-start}.voxket-widget-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.voxket-widget-root .overflow-auto{overflow:auto}.voxket-widget-root .overflow-hidden{overflow:hidden}.voxket-widget-root .overflow-x-auto{overflow-x:auto}.voxket-widget-root .overflow-x-hidden{overflow-x:hidden}.voxket-widget-root .overflow-y-auto{overflow-y:auto}.voxket-widget-root .rounded{border-radius:.25rem}.voxket-widget-root .rounded-2xl{border-radius:var(--radius-2xl)}.voxket-widget-root .rounded-3xl{border-radius:var(--radius-3xl)}.voxket-widget-root .rounded-full{border-radius:3.40282e38px}.voxket-widget-root .rounded-lg{border-radius:var(--radius-lg)}.voxket-widget-root .rounded-md{border-radius:var(--radius-md)}.voxket-widget-root .rounded-none{border-radius:0}.voxket-widget-root .rounded-sm{border-radius:var(--radius-sm)}.voxket-widget-root .rounded-xl{border-radius:var(--radius-xl)}.voxket-widget-root .rounded-t-4xl{border-top-left-radius:var(--radius-4xl);border-top-right-radius:var(--radius-4xl)}.voxket-widget-root .rounded-br-md{border-bottom-right-radius:var(--radius-md)}.voxket-widget-root .rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.voxket-widget-root .border{border-style:var(--tw-border-style);border-width:1px}.voxket-widget-root .border-0{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .border-2{border-style:var(--tw-border-style);border-width:2px}.voxket-widget-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.voxket-widget-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.voxket-widget-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.voxket-widget-root .\\!border-none{--tw-border-style:none!important;border-style:none!important}.voxket-widget-root .border-none{--tw-border-style:none;border-style:none}.voxket-widget-root .border-\\[\\#3B82F6\\]\\/40{border-color:#3b82f666}.voxket-widget-root .border-\\[\\#8B5CF6\\]\\/30{border-color:#8b5cf64d}.voxket-widget-root .border-\\[\\#813aa7\\]\\/30{border-color:#813aa74d}.voxket-widget-root .border-\\[\\#5078F2\\]\\/30{border-color:#5078f24d}.voxket-widget-root .border-\\[\\#23233a\\]{border-color:#23233a}.voxket-widget-root .border-\\[\\#232336\\]{border-color:#232336}.voxket-widget-root .border-\\[\\#EC4899\\]\\/20{border-color:#ec489933}.voxket-widget-root .border-blue-100{border-color:var(--color-blue-100)}.voxket-widget-root .border-blue-200{border-color:var(--color-blue-200)}.voxket-widget-root .border-blue-400{border-color:var(--color-blue-400)}.voxket-widget-root .border-blue-500{border-color:var(--color-blue-500)}.voxket-widget-root .border-blue-500\\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-blue-500\\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.voxket-widget-root .border-blue-600{border-color:var(--color-blue-600)}.voxket-widget-root .border-current{border-color:currentColor}.voxket-widget-root .border-gray-200{border-color:var(--color-gray-200)}.voxket-widget-root .border-gray-300{border-color:var(--color-gray-300)}.voxket-widget-root .border-gray-400\\/15{border-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-400\\/15{border-color:color-mix(in oklab,var(--color-gray-400)15%,transparent)}}.voxket-widget-root .border-gray-500\\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-500\\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.voxket-widget-root .border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .border-gray-600\\/30{border-color:#4a55654d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-600\\/30{border-color:color-mix(in oklab,var(--color-gray-600)30%,transparent)}}.voxket-widget-root .border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .border-gray-800{border-color:var(--color-gray-800)}.voxket-widget-root .border-gray-900{border-color:var(--color-gray-900)}.voxket-widget-root .border-green-200{border-color:var(--color-green-200)}.voxket-widget-root .border-pink-500\\/10{border-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-pink-500\\/10{border-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.voxket-widget-root .border-purple-500\\/15{border-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-purple-500\\/15{border-color:color-mix(in oklab,var(--color-purple-500)15%,transparent)}}.voxket-widget-root .border-red-200{border-color:var(--color-red-200)}.voxket-widget-root .border-red-800{border-color:var(--color-red-800)}.voxket-widget-root .border-white{border-color:var(--color-white)}.voxket-widget-root .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .border-yellow-200{border-color:var(--color-yellow-200)}.voxket-widget-root .border-t-transparent{border-top-color:#0000}.voxket-widget-root .bg-\\[\\#1E1E2E\\]{background-color:#1e1e2e}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/80{background-color:#1e1e2ecc}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/90{background-color:#1e1e2ee6}.voxket-widget-root .bg-\\[\\#3B82F6\\]{background-color:#3b82f6}.voxket-widget-root .bg-\\[\\#5c64f6\\]{background-color:#5c64f6}.voxket-widget-root .bg-\\[\\#10B981\\]{background-color:#10b981}.voxket-widget-root .bg-\\[\\#221f3f\\]{background-color:#221f3f}.voxket-widget-root .bg-\\[\\#813aa7\\]{background-color:#813aa7}.voxket-widget-root .bg-\\[\\#5078F2\\]{background-color:#5078f2}.voxket-widget-root .bg-\\[\\#6721a4\\]{background-color:#6721a4}.voxket-widget-root .bg-\\[\\#18182a\\]\\/80{background-color:#18182acc}.voxket-widget-root .bg-\\[\\#18182a\\]\\/90{background-color:#18182ae6}.voxket-widget-root .bg-black{background-color:var(--color-black)}.voxket-widget-root .bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.voxket-widget-root .bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.voxket-widget-root .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.voxket-widget-root .bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.voxket-widget-root .bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.voxket-widget-root .bg-blue-50{background-color:var(--color-blue-50)}.voxket-widget-root .bg-blue-100{background-color:var(--color-blue-100)}.voxket-widget-root .bg-blue-200{background-color:var(--color-blue-200)}.voxket-widget-root .bg-blue-400{background-color:var(--color-blue-400)}.voxket-widget-root .bg-blue-500{background-color:var(--color-blue-500)}.voxket-widget-root .bg-blue-600{background-color:var(--color-blue-600)}.voxket-widget-root .bg-blue-900\\/50{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-blue-900\\/50{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.voxket-widget-root .bg-current{background-color:currentColor}.voxket-widget-root .bg-gray-50{background-color:var(--color-gray-50)}.voxket-widget-root .bg-gray-100{background-color:var(--color-gray-100)}.voxket-widget-root .bg-gray-200{background-color:var(--color-gray-200)}.voxket-widget-root .bg-gray-400{background-color:var(--color-gray-400)}.voxket-widget-root .bg-gray-600{background-color:var(--color-gray-600)}.voxket-widget-root .bg-gray-600\\/50{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-600\\/50{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .bg-gray-700{background-color:var(--color-gray-700)}.voxket-widget-root .bg-gray-700\\/50{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-700\\/50{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .bg-gray-800\\/50{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/50{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.voxket-widget-root .bg-gray-800\\/90{background-color:#1e2939e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/90{background-color:color-mix(in oklab,var(--color-gray-800)90%,transparent)}}.voxket-widget-root .bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .bg-gray-900\\/50{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.voxket-widget-root .bg-gray-900\\/80{background-color:#101828cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/80{background-color:color-mix(in oklab,var(--color-gray-900)80%,transparent)}}.voxket-widget-root .bg-gray-900\\/95{background-color:#101828f2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/95{background-color:color-mix(in oklab,var(--color-gray-900)95%,transparent)}}.voxket-widget-root .bg-green-50{background-color:var(--color-green-50)}.voxket-widget-root .bg-green-500{background-color:var(--color-green-500)}.voxket-widget-root .bg-green-600{background-color:var(--color-green-600)}.voxket-widget-root .bg-indigo-600{background-color:var(--color-indigo-600)}.voxket-widget-root .bg-purple-500{background-color:var(--color-purple-500)}.voxket-widget-root .bg-purple-600{background-color:var(--color-purple-600)}.voxket-widget-root .bg-red-50{background-color:var(--color-red-50)}.voxket-widget-root .bg-red-500{background-color:var(--color-red-500)}.voxket-widget-root .bg-red-600{background-color:var(--color-red-600)}.voxket-widget-root .bg-red-600\\/80{background-color:#e40014cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-600\\/80{background-color:color-mix(in oklab,var(--color-red-600)80%,transparent)}}.voxket-widget-root .bg-red-900\\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-900\\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.voxket-widget-root .bg-transparent{background-color:#0000}.voxket-widget-root .bg-white{background-color:var(--color-white)}.voxket-widget-root .bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.voxket-widget-root .bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.voxket-widget-root .bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.voxket-widget-root .bg-yellow-50{background-color:var(--color-yellow-50)}.voxket-widget-root .bg-yellow-500{background-color:var(--color-yellow-500)}.voxket-widget-root .bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-\\[radial-gradient\\(ellipse_at_center\\, .voxket-widget-root _var\\(--tw-gradient-stops\\)\\)\\]{background-image:radial-gradient(ellipse at center,var(--tw-gradient-stops))}.voxket-widget-root .from-\\[\\#3B82F6\\]{--tw-gradient-from:#3b82f6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#3B82F6\\]\\/15{--tw-gradient-from:oklab(62.3083% -.0332476 -.185052/.15);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]{--tw-gradient-from:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]\\/25{--tw-gradient-from:oklab(60.5631% .0845415 -.201932/.25);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#10B981\\]{--tw-gradient-from:#10b981;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]{--tw-gradient-from:#171727;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]\\/90{--tw-gradient-from:oklab(21.3014% .00727232 -.0304822/.9);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#181825\\]{--tw-gradient-from:#181825;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]{--tw-gradient-from:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]\\/20{--tw-gradient-from:oklab(65.592% .210729 -.0210022/.2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black{--tw-gradient-from:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black\\/90{--tw-gradient-from:#000000e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-black\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-black)90%,transparent)}}.voxket-widget-root .from-black\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-400{--tw-gradient-from:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:#6a728214}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)8%,transparent)}}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600{--tw-gradient-from:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:#4a55651a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-600)10%,transparent)}}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:#1e293933}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:color-mix(in oklab,var(--color-gray-800)20%,transparent)}}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:#f6339a14}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-pink-500)8%,transparent)}}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white\\/90{--tw-gradient-from:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-white\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .from-white\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .via-\\[\\#8B5CF6\\]{--tw-gradient-via:#8b5cf6;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-gray-200{--tw-gradient-via:var(--color-gray-200);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .to-\\[\\#8B5CF6\\]{--tw-gradient-to:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#12121F\\]{--tw-gradient-to:#12121f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#059669\\]{--tw-gradient-to:#059669;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#232336\\]{--tw-gradient-to:#232336;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#EC4899\\]{--tw-gradient-to:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-300{--tw-gradient-to:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-500{--tw-gradient-to:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-700{--tw-gradient-to:var(--color-gray-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-900{--tw-gradient-to:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .bg-clip-text{-webkit-background-clip:text;background-clip:text}.voxket-widget-root .object-cover{-o-object-fit:cover;object-fit:cover}.voxket-widget-root .p-0{padding:calc(var(--spacing)*0)}.voxket-widget-root .p-1{padding:calc(var(--spacing)*1)}.voxket-widget-root .p-2{padding:calc(var(--spacing)*2)}.voxket-widget-root .p-3{padding:calc(var(--spacing)*3)}.voxket-widget-root .p-4{padding:calc(var(--spacing)*4)}.voxket-widget-root .p-6{padding:calc(var(--spacing)*6)}.voxket-widget-root .p-8{padding:calc(var(--spacing)*8)}.voxket-widget-root .px-0{padding-inline:calc(var(--spacing)*0)}.voxket-widget-root .px-1{padding-inline:calc(var(--spacing)*1)}.voxket-widget-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.voxket-widget-root .px-2{padding-inline:calc(var(--spacing)*2)}.voxket-widget-root .px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .px-3{padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .px-4{padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .px-5{padding-inline:calc(var(--spacing)*5)}.voxket-widget-root .px-6{padding-inline:calc(var(--spacing)*6)}.voxket-widget-root .px-8{padding-inline:calc(var(--spacing)*8)}.voxket-widget-root .px-10{padding-inline:calc(var(--spacing)*10)}.voxket-widget-root .py-0{padding-block:calc(var(--spacing)*0)}.voxket-widget-root .py-1{padding-block:calc(var(--spacing)*1)}.voxket-widget-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.voxket-widget-root .py-2{padding-block:calc(var(--spacing)*2)}.voxket-widget-root .py-3{padding-block:calc(var(--spacing)*3)}.voxket-widget-root .py-4{padding-block:calc(var(--spacing)*4)}.voxket-widget-root .py-8{padding-block:calc(var(--spacing)*8)}.voxket-widget-root .py-12{padding-block:calc(var(--spacing)*12)}.voxket-widget-root .pt-3{padding-top:calc(var(--spacing)*3)}.voxket-widget-root .pt-5{padding-top:calc(var(--spacing)*5)}.voxket-widget-root .pr-8{padding-right:calc(var(--spacing)*8)}.voxket-widget-root .pb-2{padding-bottom:calc(var(--spacing)*2)}.voxket-widget-root .pb-3{padding-bottom:calc(var(--spacing)*3)}.voxket-widget-root .pb-4{padding-bottom:calc(var(--spacing)*4)}.voxket-widget-root .pl-1{padding-left:calc(var(--spacing)*1)}.voxket-widget-root .pl-2{padding-left:calc(var(--spacing)*2)}.voxket-widget-root .text-center{text-align:center}.voxket-widget-root .text-end{text-align:end}.voxket-widget-root .text-left{text-align:left}.voxket-widget-root .text-right{text-align:right}.voxket-widget-root .font-mono{font-family:var(--font-mono)}.voxket-widget-root .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.voxket-widget-root .text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.voxket-widget-root .text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.voxket-widget-root .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.voxket-widget-root .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.voxket-widget-root .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.voxket-widget-root .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.voxket-widget-root .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.voxket-widget-root .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.voxket-widget-root .leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.voxket-widget-root .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.voxket-widget-root .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.voxket-widget-root .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.voxket-widget-root .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.voxket-widget-root .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.voxket-widget-root .break-words{overflow-wrap:break-word}.voxket-widget-root .whitespace-nowrap{white-space:nowrap}.voxket-widget-root .whitespace-pre-line{white-space:pre-line}.voxket-widget-root .whitespace-pre-wrap{white-space:pre-wrap}.voxket-widget-root .text-black{color:var(--color-black)}.voxket-widget-root .text-blue-300{color:var(--color-blue-300)}.voxket-widget-root .text-blue-400{color:var(--color-blue-400)}.voxket-widget-root .text-blue-500{color:var(--color-blue-500)}.voxket-widget-root .text-blue-600{color:var(--color-blue-600)}.voxket-widget-root .text-blue-700{color:var(--color-blue-700)}.voxket-widget-root .text-blue-800{color:var(--color-blue-800)}.voxket-widget-root .text-gray-200{color:var(--color-gray-200)}.voxket-widget-root .text-gray-300{color:var(--color-gray-300)}.voxket-widget-root .text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .text-gray-500{color:var(--color-gray-500)}.voxket-widget-root .text-gray-600{color:var(--color-gray-600)}.voxket-widget-root .text-gray-700{color:var(--color-gray-700)}.voxket-widget-root .text-gray-800{color:var(--color-gray-800)}.voxket-widget-root .text-gray-900{color:var(--color-gray-900)}.voxket-widget-root .text-green-700{color:var(--color-green-700)}.voxket-widget-root .text-inherit{color:inherit}.voxket-widget-root .text-red-400{color:var(--color-red-400)}.voxket-widget-root .text-red-500{color:var(--color-red-500)}.voxket-widget-root .text-red-600{color:var(--color-red-600)}.voxket-widget-root .text-red-700{color:var(--color-red-700)}.voxket-widget-root .text-transparent{color:#0000}.voxket-widget-root .text-white{color:var(--color-white)}.voxket-widget-root .text-yellow-400{color:var(--color-yellow-400)}.voxket-widget-root .text-yellow-700{color:var(--color-yellow-700)}.voxket-widget-root .uppercase{text-transform:uppercase}.voxket-widget-root .italic{font-style:italic}.voxket-widget-root .underline-offset-4{text-underline-offset:4px}.voxket-widget-root .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.voxket-widget-root .placeholder-gray-400::-moz-placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-400::placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-500::-moz-placeholder{color:var(--color-gray-500)}.voxket-widget-root .placeholder-gray-500::placeholder{color:var(--color-gray-500)}.voxket-widget-root .opacity-0{opacity:0}.voxket-widget-root .opacity-15{opacity:.15}.voxket-widget-root .opacity-20{opacity:.2}.voxket-widget-root .opacity-30{opacity:.3}.voxket-widget-root .opacity-40{opacity:.4}.voxket-widget-root .opacity-50{opacity:.5}.voxket-widget-root .opacity-60{opacity:.6}.voxket-widget-root .opacity-70{opacity:.7}.voxket-widget-root .opacity-80{opacity:.8}.voxket-widget-root .opacity-100{opacity:1}.voxket-widget-root .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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)}.voxket-widget-root .\\!ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)40%,transparent)var(--tw-shadow-alpha),transparent)}}.voxket-widget-root .outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.voxket-widget-root .outline-hidden{outline-offset:2px;outline:2px solid #0000}}.voxket-widget-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}.voxket-widget-root .blur{--tw-blur:blur(8px);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,)}.voxket-widget-root .blur-2xl{--tw-blur:blur(var(--blur-2xl));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,)}.voxket-widget-root .blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.voxket-widget-root .blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.voxket-widget-root .grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.voxket-widget-root .\\!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,)!important}.voxket-widget-root .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,)}.voxket-widget-root .backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .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,visibility,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))}.voxket-widget-root .transition-\\[color\\, .voxket-widget-root border\\, .voxket-widget-root background-color\\]{transition-property:color,border,background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[opacity\\, .voxket-widget-root translate\\]{transition-property:opacity,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .delay-200{transition-delay:.2s}.voxket-widget-root .duration-150{--tw-duration:.15s;transition-duration:.15s}.voxket-widget-root .duration-200{--tw-duration:.2s;transition-duration:.2s}.voxket-widget-root .duration-250{--tw-duration:.25s;transition-duration:.25s}.voxket-widget-root .duration-300{--tw-duration:.3s;transition-duration:.3s}.voxket-widget-root .duration-700{--tw-duration:.7s;transition-duration:.7s}.voxket-widget-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.voxket-widget-root .ease-linear{--tw-ease:linear;transition-timing-function:linear}.voxket-widget-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.voxket-widget-root .contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.voxket-widget-root .\\!outline-none{--tw-outline-style:none!important;outline-style:none!important}.voxket-widget-root .outline-none{--tw-outline-style:none;outline-style:none}.voxket-widget-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.voxket-widget-root .group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.voxket-widget-root .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.voxket-widget-root .group-data-\\[state\\=off\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=off] *),.voxket-widget-root .group-data-\\[state\\=on\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=on] *){background-color:var(--color-white)}.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.voxket-widget-root .focus-within\\:shadow-lg:focus-within{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}@media (hover:hover){.voxket-widget-root .hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-\\[\\#2563EB\\]:hover{background-color:#2563eb}.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.voxket-widget-root .hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.voxket-widget-root .hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.voxket-widget-root .hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.voxket-widget-root .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.voxket-widget-root .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.voxket-widget-root .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.voxket-widget-root .hover\\:bg-gray-300:hover{background-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-700:hover{background-color:var(--color-gray-700)}.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.voxket-widget-root .hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.voxket-widget-root .hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.voxket-widget-root .hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.voxket-widget-root .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.voxket-widget-root .hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.voxket-widget-root .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:#9f07124d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:color-mix(in oklab,var(--color-red-800)30%,transparent)}}.voxket-widget-root .hover\\:bg-white:hover{background-color:var(--color-white)}.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.voxket-widget-root .hover\\:from-\\[\\#2563EB\\]:hover{--tw-gradient-from:#2563eb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-\\[\\#7C3AED\\]:hover{--tw-gradient-to:#7c3aed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-purple-700:hover{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:text-blue-900:hover{color:var(--color-blue-900)}.voxket-widget-root .hover\\:text-gray-200:hover{color:var(--color-gray-200)}.voxket-widget-root .hover\\:text-gray-300:hover{color:var(--color-gray-300)}.voxket-widget-root .hover\\:text-gray-700:hover{color:var(--color-gray-700)}.voxket-widget-root .hover\\:text-gray-800:hover{color:var(--color-gray-800)}.voxket-widget-root .hover\\:text-white:hover{color:var(--color-white)}.voxket-widget-root .hover\\:underline:hover{text-decoration-line:underline}.voxket-widget-root .hover\\:shadow-md:hover{--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)}.voxket-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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)}}.voxket-widget-root .focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)40%,transparent)}}.voxket-widget-root .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.voxket-widget-root .focus\\:ring-offset-gray-900:focus{--tw-ring-offset-color:var(--color-gray-900)}.voxket-widget-root .focus\\:ring-offset-white:focus{--tw-ring-offset-color:var(--color-white)}.voxket-widget-root .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.voxket-widget-root .focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .disabled\\:pointer-events-none:disabled{pointer-events:none}.voxket-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.voxket-widget-root .disabled\\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.voxket-widget-root .disabled\\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.voxket-widget-root .disabled\\:opacity-50:disabled{opacity:.5}.voxket-widget-root .disabled\\:opacity-70:disabled{opacity:.7}.voxket-widget-root .has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing)*4)1fr}.voxket-widget-root .has-\\[\\>svg\\]\\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing)*3);column-gap:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .aria-invalid\\:border-0[aria-invalid=true]{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.voxket-widget-root .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.voxket-widget-root .data-\\[lk-highlighted\\=true\\]\\:bg-\\[\\#5c64f6\\][data-lk-highlighted=true]{background-color:#5c64f6}.voxket-widget-root .data-\\[lk-muted\\=true\\]\\:bg-\\[\\#222222\\][data-lk-muted=true]{background-color:#222}.voxket-widget-root .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.voxket-widget-root .data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:48rem){.voxket-widget-root .md\\:px-0{padding-inline:calc(var(--spacing)*0)}}@media (min-width:64rem){.voxket-widget-root .lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.voxket-widget-root .dark\\:border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .dark\\:border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .dark\\:bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .dark\\:bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .dark\\:bg-white{background-color:var(--color-white)}.voxket-widget-root .dark\\:text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .dark\\:text-white{color:var(--color-white)}@media (hover:hover){.voxket-widget-root .dark\\:hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}}.voxket-widget-root .dark\\:aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.voxket-widget-root .\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.voxket-widget-root .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.voxket-widget-root .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.voxket-widget-root .\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}.voxket-widget-root .\\[\\&\\>video\\]\\:h-\\[90px\\]>video{height:90px}.voxket-widget-root .\\[\\&\\>video\\]\\:w-auto>video{width:auto}@layer theme{:root,.voxket-widget-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-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--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-300:oklch(80.9% .105 251.813);--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-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-600:oklch(51.1% .262 276.966);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--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-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--aspect-video:16/9;--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{*,.voxket-widget-root :after,.voxket-widget-root :before,.voxket-widget-root ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.voxket-widget-root ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,.voxket-widget-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;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}.voxket-widget-root hr{height:0;color:inherit;border-top-width:1px}.voxket-widget-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.voxket-widget-root h1,.voxket-widget-root h2,.voxket-widget-root h3,.voxket-widget-root h4,.voxket-widget-root h5,.voxket-widget-root h6{font-size:inherit;font-weight:inherit}.voxket-widget-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.voxket-widget-root b,.voxket-widget-root strong{font-weight:bolder}.voxket-widget-root code,.voxket-widget-root kbd,.voxket-widget-root samp,.voxket-widget-root 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}.voxket-widget-root small{font-size:80%}.voxket-widget-root sub,.voxket-widget-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.voxket-widget-root sub{bottom:-.25em}.voxket-widget-root sup{top:-.5em}.voxket-widget-root table{text-indent:0;border-color:inherit;border-collapse:collapse}.voxket-widget-root :-moz-focusring{outline:auto}.voxket-widget-root progress{vertical-align:baseline}.voxket-widget-root summary{display:list-item}.voxket-widget-root ol,.voxket-widget-root ul,.voxket-widget-root menu{list-style:none}.voxket-widget-root img,.voxket-widget-root svg,.voxket-widget-root video,.voxket-widget-root canvas,.voxket-widget-root audio,.voxket-widget-root iframe,.voxket-widget-root embed,.voxket-widget-root object{vertical-align:middle;display:block}.voxket-widget-root img,.voxket-widget-root video{max-width:100%;height:auto}.voxket-widget-root button,.voxket-widget-root input,.voxket-widget-root select,.voxket-widget-root optgroup,.voxket-widget-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.voxket-widget-root ::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}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup{font-weight:bolder}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup option{padding-inline-start:20px}.voxket-widget-root ::file-selector-button{margin-inline-end:4px}.voxket-widget-root ::-moz-placeholder{opacity:1}.voxket-widget-root ::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){.voxket-widget-root ::-moz-placeholder{color:currentColor}.voxket-widget-root ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root ::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}.voxket-widget-root ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.voxket-widget-root textarea{resize:vertical}.voxket-widget-root ::-webkit-search-decoration{-webkit-appearance:none}.voxket-widget-root ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.voxket-widget-root ::-webkit-datetime-edit{display:inline-flex}.voxket-widget-root ::-webkit-datetime-edit-fields-wrapper{padding:0}.voxket-widget-root ::-webkit-datetime-edit{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-year-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-month-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-day-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-hour-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-minute-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-second-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-millisecond-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-meridiem-field{padding-block:0}.voxket-widget-root :-moz-ui-invalid{box-shadow:none}.voxket-widget-root button,.voxket-widget-root input:where([type=button],.voxket-widget-root [type=reset],.voxket-widget-root [type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::-webkit-inner-spin-button{height:auto}.voxket-widget-root ::-webkit-outer-spin-button{height:auto}.voxket-widget-root [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities;.voxket-widget-root ::-webkit-scrollbar{display:none}.voxket-widget-root .scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.voxket-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}.voxket-widget-root .chat-scrollable{scrollbar-width:thin;scrollbar-color:#9b9b9b4d transparent;flex-direction:column;display:flex}.voxket-widget-root .chat-scrollable::-webkit-scrollbar{width:6px;display:block}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-track{background:0 0}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb{background-color:#9b9b9b4d;border-radius:3px}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb:hover{background-color:#9b9b9b80}.voxket-widget-root .chat-messages-container{flex-direction:column;justify-content:flex-end;width:100%;max-width:none;min-height:100%;display:flex}@keyframes pulse-ring{0%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}to{opacity:0;transform:scale(1.4)}}@keyframes glow{0%,to{box-shadow:0 0 20px #3b82f680}50%{box-shadow:0 0 30px #3b82f6cc}}.voxket-widget-root .pulse-ring{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse-ring}.voxket-widget-root .mic-glow{animation:2s ease-in-out infinite glow}.voxket-widget-root{color-scheme:light dark;color:#ffffffde;border-radius:\"2xl\";font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#0000;border-radius:1rem;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.voxket-widget-root.theme-light{color:#000000de}.voxket-widget-root.theme-dark,.voxket-widget-root.theme-vox{color:#ffffffde}.voxket-widget-root .animate-spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.voxket-widget-root button{cursor:pointer}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{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-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@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}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-contain-size{syntax:\"*\";inherits:false}@property --tw-contain-layout{syntax:\"*\";inherits:false}@property --tw-contain-paint{syntax:\"*\";inherits:false}@property --tw-contain-style{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}\n"
14
- .replace(/\.voxket-widget-root/g, '.voxket-widget-root')
15
- .replace(/(@keyframes [^{]+)/g, '$1');
16
-
17
- style.textContent = scopedCSS;
11
+ style.textContent = "/*! tailwindcss v4.1.11 | 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)))){*,.voxket-widget-root :before,.voxket-widget-root :after,.voxket-widget-root ::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking: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-outline-style:solid;--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;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.voxket-widget-root .pointer-events-auto{pointer-events:auto}.voxket-widget-root .pointer-events-none{pointer-events:none}.voxket-widget-root .visible{visibility:visible}.voxket-widget-root .absolute{position:absolute}.voxket-widget-root .fixed{position:fixed}.voxket-widget-root .relative{position:relative}.voxket-widget-root .static{position:static}.voxket-widget-root .sticky{position:sticky}.voxket-widget-root .inset-0{inset:calc(var(--spacing)*0)}.voxket-widget-root .-top-2{top:calc(var(--spacing)*-2)}.voxket-widget-root .top-0{top:calc(var(--spacing)*0)}.voxket-widget-root .top-1{top:calc(var(--spacing)*1)}.voxket-widget-root .top-2{top:calc(var(--spacing)*2)}.voxket-widget-root .top-4{top:calc(var(--spacing)*4)}.voxket-widget-root .-right-2{right:calc(var(--spacing)*-2)}.voxket-widget-root .right-0{right:calc(var(--spacing)*0)}.voxket-widget-root .right-2{right:calc(var(--spacing)*2)}.voxket-widget-root .right-4{right:calc(var(--spacing)*4)}.voxket-widget-root .right-6{right:calc(var(--spacing)*6)}.voxket-widget-root .-bottom-2{bottom:calc(var(--spacing)*-2)}.voxket-widget-root .bottom-0{bottom:calc(var(--spacing)*0)}.voxket-widget-root .bottom-2{bottom:calc(var(--spacing)*2)}.voxket-widget-root .bottom-4{bottom:calc(var(--spacing)*4)}.voxket-widget-root .bottom-20{bottom:calc(var(--spacing)*20)}.voxket-widget-root .-left-2{left:calc(var(--spacing)*-2)}.voxket-widget-root .left-0{left:calc(var(--spacing)*0)}.voxket-widget-root .left-1{left:calc(var(--spacing)*1)}.voxket-widget-root .left-2{left:calc(var(--spacing)*2)}.voxket-widget-root .left-4{left:calc(var(--spacing)*4)}.voxket-widget-root .z-10{z-index:10}.voxket-widget-root .z-20{z-index:20}.voxket-widget-root .z-30{z-index:30}.voxket-widget-root .z-50{z-index:50}.voxket-widget-root .z-\\[9999\\]{z-index:9999}.voxket-widget-root .z-\\[10000\\]{z-index:10000}.voxket-widget-root .order-1{order:1}.voxket-widget-root .order-2{order:2}.voxket-widget-root .col-span-2{grid-column:span 2/span 2}.voxket-widget-root .col-start-1{grid-column-start:1}.voxket-widget-root .col-start-2{grid-column-start:2}.voxket-widget-root .row-span-3{grid-row:span 3/span 3}.voxket-widget-root .row-start-1{grid-row-start:1}.voxket-widget-root .row-start-3{grid-row-start:3}.voxket-widget-root .container{width:100%}@media (min-width:40rem){.voxket-widget-root .container{max-width:40rem}}@media (min-width:48rem){.voxket-widget-root .container{max-width:48rem}}@media (min-width:64rem){.voxket-widget-root .container{max-width:64rem}}@media (min-width:80rem){.voxket-widget-root .container{max-width:80rem}}@media (min-width:96rem){.voxket-widget-root .container{max-width:96rem}}.voxket-widget-root .m-4{margin:calc(var(--spacing)*4)}.voxket-widget-root .-mx-1{margin-inline:calc(var(--spacing)*-1)}.voxket-widget-root .mx-0{margin-inline:calc(var(--spacing)*0)}.voxket-widget-root .mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.voxket-widget-root .mx-3{margin-inline:calc(var(--spacing)*3)}.voxket-widget-root .mx-4{margin-inline:calc(var(--spacing)*4)}.voxket-widget-root .mx-8{margin-inline:calc(var(--spacing)*8)}.voxket-widget-root .mx-auto{margin-inline:auto}.voxket-widget-root .my-1{margin-block:calc(var(--spacing)*1)}.voxket-widget-root .my-2{margin-block:calc(var(--spacing)*2)}.voxket-widget-root .mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.voxket-widget-root .mt-1{margin-top:calc(var(--spacing)*1)}.voxket-widget-root .mt-2{margin-top:calc(var(--spacing)*2)}.voxket-widget-root .mt-4{margin-top:calc(var(--spacing)*4)}.voxket-widget-root .mt-6{margin-top:calc(var(--spacing)*6)}.voxket-widget-root .mt-8{margin-top:calc(var(--spacing)*8)}.voxket-widget-root .mt-auto{margin-top:auto}.voxket-widget-root .mr-1{margin-right:calc(var(--spacing)*1)}.voxket-widget-root .mr-2{margin-right:calc(var(--spacing)*2)}.voxket-widget-root .mr-3{margin-right:calc(var(--spacing)*3)}.voxket-widget-root .mb-1{margin-bottom:calc(var(--spacing)*1)}.voxket-widget-root .mb-2{margin-bottom:calc(var(--spacing)*2)}.voxket-widget-root .mb-3{margin-bottom:calc(var(--spacing)*3)}.voxket-widget-root .mb-4{margin-bottom:calc(var(--spacing)*4)}.voxket-widget-root .mb-6{margin-bottom:calc(var(--spacing)*6)}.voxket-widget-root .mb-8{margin-bottom:calc(var(--spacing)*8)}.voxket-widget-root .ml-1{margin-left:calc(var(--spacing)*1)}.voxket-widget-root .ml-2{margin-left:calc(var(--spacing)*2)}.voxket-widget-root .ml-auto{margin-left:auto}.voxket-widget-root .line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root .block{display:block}.voxket-widget-root .flex{display:flex}.voxket-widget-root .grid{display:grid}.voxket-widget-root .hidden{display:none}.voxket-widget-root .inline{display:inline}.voxket-widget-root .inline-block{display:inline-block}.voxket-widget-root .inline-flex{display:inline-flex}.voxket-widget-root .table{display:table}.voxket-widget-root .aspect-square{aspect-ratio:1}.voxket-widget-root .aspect-video{aspect-ratio:var(--aspect-video)}.voxket-widget-root .size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.voxket-widget-root .size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.voxket-widget-root .h-0{height:calc(var(--spacing)*0)}.voxket-widget-root .h-1{height:calc(var(--spacing)*1)}.voxket-widget-root .h-1\\.5{height:calc(var(--spacing)*1.5)}.voxket-widget-root .h-2{height:calc(var(--spacing)*2)}.voxket-widget-root .h-3{height:calc(var(--spacing)*3)}.voxket-widget-root .h-4{height:calc(var(--spacing)*4)}.voxket-widget-root .h-5{height:calc(var(--spacing)*5)}.voxket-widget-root .h-6{height:calc(var(--spacing)*6)}.voxket-widget-root .h-8{height:calc(var(--spacing)*8)}.voxket-widget-root .h-9{height:calc(var(--spacing)*9)}.voxket-widget-root .h-10{height:calc(var(--spacing)*10)}.voxket-widget-root .h-12{height:calc(var(--spacing)*12)}.voxket-widget-root .h-16{height:calc(var(--spacing)*16)}.voxket-widget-root .h-20{height:calc(var(--spacing)*20)}.voxket-widget-root .h-24{height:calc(var(--spacing)*24)}.voxket-widget-root .h-28{height:calc(var(--spacing)*28)}.voxket-widget-root .h-32{height:calc(var(--spacing)*32)}.voxket-widget-root .h-96{height:calc(var(--spacing)*96)}.voxket-widget-root .h-\\[25rem\\]{height:25rem}.voxket-widget-root .h-\\[30rem\\]{height:30rem}.voxket-widget-root .h-\\[56px\\]{height:56px}.voxket-widget-root .h-\\[60px\\]{height:60px}.voxket-widget-root .h-\\[70px\\]{height:70px}.voxket-widget-root .h-\\[90px\\]{height:90px}.voxket-widget-root .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.voxket-widget-root .h-auto{height:auto}.voxket-widget-root .h-fit{height:-moz-fit-content;height:fit-content}.voxket-widget-root .h-full{height:100%}.voxket-widget-root .h-px{height:1px}.voxket-widget-root .h-screen{height:100vh}.voxket-widget-root .max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.voxket-widget-root .max-h-20{max-height:calc(var(--spacing)*20)}.voxket-widget-root .max-h-48{max-height:calc(var(--spacing)*48)}.voxket-widget-root .max-h-\\[80vh\\]{max-height:80vh}.voxket-widget-root .max-h-\\[85vh\\]{max-height:85vh}.voxket-widget-root .max-h-\\[95vh\\]{max-height:95vh}.voxket-widget-root .max-h-full{max-height:100%}.voxket-widget-root .min-h-0{min-height:calc(var(--spacing)*0)}.voxket-widget-root .min-h-2{min-height:calc(var(--spacing)*2)}.voxket-widget-root .min-h-4{min-height:calc(var(--spacing)*4)}.voxket-widget-root .min-h-\\[3rem\\]{min-height:3rem}.voxket-widget-root .min-h-\\[32px\\]{min-height:32px}.voxket-widget-root .min-h-\\[180px\\]{min-height:180px}.voxket-widget-root .min-h-fit{min-height:-moz-fit-content;min-height:fit-content}.voxket-widget-root .min-h-screen{min-height:100vh}.voxket-widget-root .\\!w-full{width:100%!important}.voxket-widget-root .w-0\\.5{width:calc(var(--spacing)*.5)}.voxket-widget-root .w-1\\.5{width:calc(var(--spacing)*1.5)}.voxket-widget-root .w-2{width:calc(var(--spacing)*2)}.voxket-widget-root .w-3{width:calc(var(--spacing)*3)}.voxket-widget-root .w-4{width:calc(var(--spacing)*4)}.voxket-widget-root .w-5{width:calc(var(--spacing)*5)}.voxket-widget-root .w-6{width:calc(var(--spacing)*6)}.voxket-widget-root .w-8{width:calc(var(--spacing)*8)}.voxket-widget-root .w-10{width:calc(var(--spacing)*10)}.voxket-widget-root .w-12{width:calc(var(--spacing)*12)}.voxket-widget-root .w-16{width:calc(var(--spacing)*16)}.voxket-widget-root .w-20{width:calc(var(--spacing)*20)}.voxket-widget-root .w-24{width:calc(var(--spacing)*24)}.voxket-widget-root .w-28{width:calc(var(--spacing)*28)}.voxket-widget-root .w-32{width:calc(var(--spacing)*32)}.voxket-widget-root .w-40{width:calc(var(--spacing)*40)}.voxket-widget-root .w-80{width:calc(var(--spacing)*80)}.voxket-widget-root .w-96{width:calc(var(--spacing)*96)}.voxket-widget-root .w-\\[32rem\\]{width:32rem}.voxket-widget-root .w-\\[180px\\]{width:180px}.voxket-widget-root .w-auto{width:auto}.voxket-widget-root .w-fit{width:-moz-fit-content;width:fit-content}.voxket-widget-root .w-full{width:100%}.voxket-widget-root .w-screen{width:100vw}.voxket-widget-root .max-w-2xl{max-width:var(--container-2xl)}.voxket-widget-root .max-w-3xl{max-width:var(--container-3xl)}.voxket-widget-root .max-w-4xl{max-width:var(--container-4xl)}.voxket-widget-root .max-w-5xl{max-width:var(--container-5xl)}.voxket-widget-root .max-w-6xl{max-width:var(--container-6xl)}.voxket-widget-root .max-w-7xl{max-width:var(--container-7xl)}.voxket-widget-root .max-w-\\[85\\%\\]{max-width:85%}.voxket-widget-root .max-w-full{max-width:100%}.voxket-widget-root .max-w-lg{max-width:var(--container-lg)}.voxket-widget-root .max-w-md{max-width:var(--container-md)}.voxket-widget-root .max-w-none{max-width:none}.voxket-widget-root .max-w-sm{max-width:var(--container-sm)}.voxket-widget-root .max-w-xs{max-width:var(--container-xs)}.voxket-widget-root .min-w-0{min-width:calc(var(--spacing)*0)}.voxket-widget-root .min-w-8{min-width:calc(var(--spacing)*8)}.voxket-widget-root .min-w-9{min-width:calc(var(--spacing)*9)}.voxket-widget-root .min-w-10{min-width:calc(var(--spacing)*10)}.voxket-widget-root .min-w-\\[2\\.5rem\\]{min-width:2.5rem}.voxket-widget-root .min-w-\\[8rem\\]{min-width:8rem}.voxket-widget-root .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.voxket-widget-root .min-w-full{min-width:100%}.voxket-widget-root .flex-1{flex:1}.voxket-widget-root .flex-shrink-0,.voxket-widget-root .shrink-0{flex-shrink:0}.voxket-widget-root .origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.voxket-widget-root .origin-center{transform-origin:50%}.voxket-widget-root .translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .translate-y-10{--tw-translate-y:calc(var(--spacing)*10);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .animate-bounce{animation:var(--animate-bounce)}.voxket-widget-root .animate-pulse{animation:var(--animate-pulse)}.voxket-widget-root .cursor-default{cursor:default}.voxket-widget-root .cursor-not-allowed{cursor:not-allowed}.voxket-widget-root .cursor-pointer{cursor:pointer}.voxket-widget-root .resize{resize:both}.voxket-widget-root .resize-none{resize:none}.voxket-widget-root .scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.voxket-widget-root .list-inside{list-style-position:inside}.voxket-widget-root .list-decimal{list-style-type:decimal}.voxket-widget-root .list-disc{list-style-type:disc}.voxket-widget-root .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.voxket-widget-root .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.voxket-widget-root .grid-cols-\\[0_1fr\\]{grid-template-columns:0 1fr}.voxket-widget-root .grid-cols-\\[1fr_1fr\\]{grid-template-columns:1fr 1fr}.voxket-widget-root .grid-rows-\\[90px_1fr_90px\\]{grid-template-rows:90px 1fr 90px}.voxket-widget-root .flex-col{flex-direction:column}.voxket-widget-root .flex-row{flex-direction:row}.voxket-widget-root .flex-row-reverse{flex-direction:row-reverse}.voxket-widget-root .flex-wrap{flex-wrap:wrap}.voxket-widget-root .place-content-center{place-content:center}.voxket-widget-root .place-content-end{place-content:end}.voxket-widget-root .items-center{align-items:center}.voxket-widget-root .items-end{align-items:flex-end}.voxket-widget-root .items-start{align-items:flex-start}.voxket-widget-root .justify-between{justify-content:space-between}.voxket-widget-root .justify-center{justify-content:center}.voxket-widget-root .justify-end{justify-content:flex-end}.voxket-widget-root .justify-start{justify-content:flex-start}.voxket-widget-root .justify-items-start{justify-items:start}.voxket-widget-root .gap-1{gap:calc(var(--spacing)*1)}.voxket-widget-root .gap-1\\.5{gap:calc(var(--spacing)*1.5)}.voxket-widget-root .gap-2{gap:calc(var(--spacing)*2)}.voxket-widget-root .gap-3{gap:calc(var(--spacing)*3)}.voxket-widget-root .gap-4{gap:calc(var(--spacing)*4)}.voxket-widget-root .gap-6{gap:calc(var(--spacing)*6)}.voxket-widget-root .gap-8{gap:calc(var(--spacing)*8)}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :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)))}.voxket-widget-root :where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.voxket-widget-root .gap-x-0\\.5{-moz-column-gap:calc(var(--spacing)*.5);column-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-x-2{-moz-column-gap:calc(var(--spacing)*2);column-gap:calc(var(--spacing)*2)}.voxket-widget-root :where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root :where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.voxket-widget-root .gap-y-0\\.5{row-gap:calc(var(--spacing)*.5)}.voxket-widget-root .gap-y-2{row-gap:calc(var(--spacing)*2)}.voxket-widget-root .self-center{align-self:center}.voxket-widget-root .justify-self-end{justify-self:flex-end}.voxket-widget-root .justify-self-start{justify-self:flex-start}.voxket-widget-root .truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.voxket-widget-root .overflow-auto{overflow:auto}.voxket-widget-root .overflow-hidden{overflow:hidden}.voxket-widget-root .overflow-x-auto{overflow-x:auto}.voxket-widget-root .overflow-x-hidden{overflow-x:hidden}.voxket-widget-root .overflow-y-auto{overflow-y:auto}.voxket-widget-root .rounded{border-radius:.25rem}.voxket-widget-root .rounded-2xl{border-radius:var(--radius-2xl)}.voxket-widget-root .rounded-3xl{border-radius:var(--radius-3xl)}.voxket-widget-root .rounded-full{border-radius:3.40282e38px}.voxket-widget-root .rounded-lg{border-radius:var(--radius-lg)}.voxket-widget-root .rounded-md{border-radius:var(--radius-md)}.voxket-widget-root .rounded-none{border-radius:0}.voxket-widget-root .rounded-sm{border-radius:var(--radius-sm)}.voxket-widget-root .rounded-xl{border-radius:var(--radius-xl)}.voxket-widget-root .rounded-t-4xl{border-top-left-radius:var(--radius-4xl);border-top-right-radius:var(--radius-4xl)}.voxket-widget-root .rounded-br-md{border-bottom-right-radius:var(--radius-md)}.voxket-widget-root .rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.voxket-widget-root .border{border-style:var(--tw-border-style);border-width:1px}.voxket-widget-root .border-0{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .border-2{border-style:var(--tw-border-style);border-width:2px}.voxket-widget-root .border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.voxket-widget-root .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.voxket-widget-root .border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.voxket-widget-root .border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.voxket-widget-root .\\!border-none{--tw-border-style:none!important;border-style:none!important}.voxket-widget-root .border-none{--tw-border-style:none;border-style:none}.voxket-widget-root .border-\\[\\#3B82F6\\]\\/40{border-color:#3b82f666}.voxket-widget-root .border-\\[\\#8B5CF6\\]\\/30{border-color:#8b5cf64d}.voxket-widget-root .border-\\[\\#813aa7\\]\\/30{border-color:#813aa74d}.voxket-widget-root .border-\\[\\#5078F2\\]\\/30{border-color:#5078f24d}.voxket-widget-root .border-\\[\\#23233a\\]{border-color:#23233a}.voxket-widget-root .border-\\[\\#232336\\]{border-color:#232336}.voxket-widget-root .border-\\[\\#EC4899\\]\\/20{border-color:#ec489933}.voxket-widget-root .border-blue-100{border-color:var(--color-blue-100)}.voxket-widget-root .border-blue-200{border-color:var(--color-blue-200)}.voxket-widget-root .border-blue-400{border-color:var(--color-blue-400)}.voxket-widget-root .border-blue-500{border-color:var(--color-blue-500)}.voxket-widget-root .border-blue-500\\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-blue-500\\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.voxket-widget-root .border-blue-600{border-color:var(--color-blue-600)}.voxket-widget-root .border-current{border-color:currentColor}.voxket-widget-root .border-gray-200{border-color:var(--color-gray-200)}.voxket-widget-root .border-gray-300{border-color:var(--color-gray-300)}.voxket-widget-root .border-gray-400\\/15{border-color:#99a1af26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-400\\/15{border-color:color-mix(in oklab,var(--color-gray-400)15%,transparent)}}.voxket-widget-root .border-gray-500\\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-500\\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.voxket-widget-root .border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .border-gray-600\\/30{border-color:#4a55654d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-gray-600\\/30{border-color:color-mix(in oklab,var(--color-gray-600)30%,transparent)}}.voxket-widget-root .border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .border-gray-800{border-color:var(--color-gray-800)}.voxket-widget-root .border-gray-900{border-color:var(--color-gray-900)}.voxket-widget-root .border-green-200{border-color:var(--color-green-200)}.voxket-widget-root .border-pink-500\\/10{border-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-pink-500\\/10{border-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.voxket-widget-root .border-purple-500\\/15{border-color:#ac4bff26}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-purple-500\\/15{border-color:color-mix(in oklab,var(--color-purple-500)15%,transparent)}}.voxket-widget-root .border-red-200{border-color:var(--color-red-200)}.voxket-widget-root .border-red-800{border-color:var(--color-red-800)}.voxket-widget-root .border-white{border-color:var(--color-white)}.voxket-widget-root .border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .border-yellow-200{border-color:var(--color-yellow-200)}.voxket-widget-root .border-t-transparent{border-top-color:#0000}.voxket-widget-root .bg-\\[\\#1E1E2E\\]{background-color:#1e1e2e}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/80{background-color:#1e1e2ecc}.voxket-widget-root .bg-\\[\\#1E1E2E\\]\\/90{background-color:#1e1e2ee6}.voxket-widget-root .bg-\\[\\#3B82F6\\]{background-color:#3b82f6}.voxket-widget-root .bg-\\[\\#5c64f6\\]{background-color:#5c64f6}.voxket-widget-root .bg-\\[\\#10B981\\]{background-color:#10b981}.voxket-widget-root .bg-\\[\\#221f3f\\]{background-color:#221f3f}.voxket-widget-root .bg-\\[\\#813aa7\\]{background-color:#813aa7}.voxket-widget-root .bg-\\[\\#5078F2\\]{background-color:#5078f2}.voxket-widget-root .bg-\\[\\#6721a4\\]{background-color:#6721a4}.voxket-widget-root .bg-\\[\\#18182a\\]\\/80{background-color:#18182acc}.voxket-widget-root .bg-\\[\\#18182a\\]\\/90{background-color:#18182ae6}.voxket-widget-root .bg-black{background-color:var(--color-black)}.voxket-widget-root .bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.voxket-widget-root .bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.voxket-widget-root .bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.voxket-widget-root .bg-black\\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.voxket-widget-root .bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.voxket-widget-root .bg-blue-50{background-color:var(--color-blue-50)}.voxket-widget-root .bg-blue-100{background-color:var(--color-blue-100)}.voxket-widget-root .bg-blue-200{background-color:var(--color-blue-200)}.voxket-widget-root .bg-blue-400{background-color:var(--color-blue-400)}.voxket-widget-root .bg-blue-500{background-color:var(--color-blue-500)}.voxket-widget-root .bg-blue-600{background-color:var(--color-blue-600)}.voxket-widget-root .bg-blue-900\\/50{background-color:#1c398e80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-blue-900\\/50{background-color:color-mix(in oklab,var(--color-blue-900)50%,transparent)}}.voxket-widget-root .bg-current{background-color:currentColor}.voxket-widget-root .bg-gray-50{background-color:var(--color-gray-50)}.voxket-widget-root .bg-gray-100{background-color:var(--color-gray-100)}.voxket-widget-root .bg-gray-200{background-color:var(--color-gray-200)}.voxket-widget-root .bg-gray-400{background-color:var(--color-gray-400)}.voxket-widget-root .bg-gray-600{background-color:var(--color-gray-600)}.voxket-widget-root .bg-gray-600\\/50{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-600\\/50{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .bg-gray-700{background-color:var(--color-gray-700)}.voxket-widget-root .bg-gray-700\\/50{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-700\\/50{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .bg-gray-800\\/50{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/50{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.voxket-widget-root .bg-gray-800\\/90{background-color:#1e2939e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/90{background-color:color-mix(in oklab,var(--color-gray-800)90%,transparent)}}.voxket-widget-root .bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .bg-gray-900\\/50{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/50{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.voxket-widget-root .bg-gray-900\\/80{background-color:#101828cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/80{background-color:color-mix(in oklab,var(--color-gray-900)80%,transparent)}}.voxket-widget-root .bg-gray-900\\/90{background-color:#101828e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/90{background-color:color-mix(in oklab,var(--color-gray-900)90%,transparent)}}.voxket-widget-root .bg-gray-900\\/95{background-color:#101828f2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-900\\/95{background-color:color-mix(in oklab,var(--color-gray-900)95%,transparent)}}.voxket-widget-root .bg-green-50{background-color:var(--color-green-50)}.voxket-widget-root .bg-green-500{background-color:var(--color-green-500)}.voxket-widget-root .bg-green-600{background-color:var(--color-green-600)}.voxket-widget-root .bg-indigo-600{background-color:var(--color-indigo-600)}.voxket-widget-root .bg-purple-500{background-color:var(--color-purple-500)}.voxket-widget-root .bg-purple-600{background-color:var(--color-purple-600)}.voxket-widget-root .bg-red-50{background-color:var(--color-red-50)}.voxket-widget-root .bg-red-500{background-color:var(--color-red-500)}.voxket-widget-root .bg-red-600{background-color:var(--color-red-600)}.voxket-widget-root .bg-red-600\\/80{background-color:#e40014cc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-600\\/80{background-color:color-mix(in oklab,var(--color-red-600)80%,transparent)}}.voxket-widget-root .bg-red-900\\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-red-900\\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.voxket-widget-root .bg-transparent{background-color:#0000}.voxket-widget-root .bg-white{background-color:var(--color-white)}.voxket-widget-root .bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.voxket-widget-root .bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.voxket-widget-root .bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.voxket-widget-root .bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-white\\/95{background-color:color-mix(in oklab,var(--color-white)95%,transparent)}}.voxket-widget-root .bg-yellow-50{background-color:var(--color-yellow-50)}.voxket-widget-root .bg-yellow-500{background-color:var(--color-yellow-500)}.voxket-widget-root .bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-gradient-to-tr{--tw-gradient-position:to top right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.voxket-widget-root .bg-\\[radial-gradient\\(ellipse_at_center\\, .voxket-widget-root _var\\(--tw-gradient-stops\\)\\)\\]{background-image:radial-gradient(ellipse at center,var(--tw-gradient-stops))}.voxket-widget-root .from-\\[\\#3B82F6\\]{--tw-gradient-from:#3b82f6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#3B82F6\\]\\/15{--tw-gradient-from:oklab(62.3083% -.0332476 -.185052/.15);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]{--tw-gradient-from:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#8B5CF6\\]\\/25{--tw-gradient-from:oklab(60.5631% .0845415 -.201932/.25);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#10B981\\]{--tw-gradient-from:#10b981;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]{--tw-gradient-from:#171727;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#171727\\]\\/90{--tw-gradient-from:oklab(21.3014% .00727232 -.0304822/.9);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#181825\\]{--tw-gradient-from:#181825;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]{--tw-gradient-from:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-\\[\\#EC4899\\]\\/20{--tw-gradient-from:oklab(65.592% .210729 -.0210022/.2);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black{--tw-gradient-from:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-black\\/90{--tw-gradient-from:#000000e6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-black\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-black)90%,transparent)}}.voxket-widget-root .from-black\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-blue-500\\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.voxket-widget-root .from-blue-500\\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-blue-600{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-400{--tw-gradient-from:var(--color-gray-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500{--tw-gradient-from:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:#6a728214}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)8%,transparent)}}.voxket-widget-root .from-gray-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600{--tw-gradient-from:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:#4a55651a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-600\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-600)10%,transparent)}}.voxket-widget-root .from-gray-600\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:#1e293933}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-gray-800\\/20{--tw-gradient-from:color-mix(in oklab,var(--color-gray-800)20%,transparent)}}.voxket-widget-root .from-gray-800\\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:#f6339a14}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-pink-500\\/8{--tw-gradient-from:color-mix(in oklab,var(--color-pink-500)8%,transparent)}}.voxket-widget-root .from-pink-500\\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-purple-500\\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.voxket-widget-root .from-purple-500\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .from-white\\/90{--tw-gradient-from:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .from-white\\/90{--tw-gradient-from:color-mix(in oklab,var(--color-white)90%,transparent)}}.voxket-widget-root .from-white\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .via-\\[\\#8B5CF6\\]{--tw-gradient-via:#8b5cf6;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-gray-200{--tw-gradient-via:var(--color-gray-200);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.voxket-widget-root .to-\\[\\#8B5CF6\\]{--tw-gradient-to:#8b5cf6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#12121F\\]{--tw-gradient-to:#12121f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#059669\\]{--tw-gradient-to:#059669;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#232336\\]{--tw-gradient-to:#232336;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-\\[\\#EC4899\\]{--tw-gradient-to:#ec4899;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-50{--tw-gradient-to:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-300{--tw-gradient-to:var(--color-gray-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-500{--tw-gradient-to:var(--color-gray-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-600{--tw-gradient-to:var(--color-gray-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-700{--tw-gradient-to:var(--color-gray-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-gray-900{--tw-gradient-to:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .bg-clip-text{-webkit-background-clip:text;background-clip:text}.voxket-widget-root .object-contain{-o-object-fit:contain;object-fit:contain}.voxket-widget-root .object-cover{-o-object-fit:cover;object-fit:cover}.voxket-widget-root .p-0{padding:calc(var(--spacing)*0)}.voxket-widget-root .p-1{padding:calc(var(--spacing)*1)}.voxket-widget-root .p-2{padding:calc(var(--spacing)*2)}.voxket-widget-root .p-3{padding:calc(var(--spacing)*3)}.voxket-widget-root .p-4{padding:calc(var(--spacing)*4)}.voxket-widget-root .p-6{padding:calc(var(--spacing)*6)}.voxket-widget-root .p-8{padding:calc(var(--spacing)*8)}.voxket-widget-root .px-0{padding-inline:calc(var(--spacing)*0)}.voxket-widget-root .px-1{padding-inline:calc(var(--spacing)*1)}.voxket-widget-root .px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.voxket-widget-root .px-2{padding-inline:calc(var(--spacing)*2)}.voxket-widget-root .px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .px-3{padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .px-4{padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .px-5{padding-inline:calc(var(--spacing)*5)}.voxket-widget-root .px-6{padding-inline:calc(var(--spacing)*6)}.voxket-widget-root .px-8{padding-inline:calc(var(--spacing)*8)}.voxket-widget-root .px-10{padding-inline:calc(var(--spacing)*10)}.voxket-widget-root .py-0{padding-block:calc(var(--spacing)*0)}.voxket-widget-root .py-0\\.5{padding-block:calc(var(--spacing)*.5)}.voxket-widget-root .py-1{padding-block:calc(var(--spacing)*1)}.voxket-widget-root .py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.voxket-widget-root .py-2{padding-block:calc(var(--spacing)*2)}.voxket-widget-root .py-3{padding-block:calc(var(--spacing)*3)}.voxket-widget-root .py-4{padding-block:calc(var(--spacing)*4)}.voxket-widget-root .py-8{padding-block:calc(var(--spacing)*8)}.voxket-widget-root .py-12{padding-block:calc(var(--spacing)*12)}.voxket-widget-root .pt-3{padding-top:calc(var(--spacing)*3)}.voxket-widget-root .pt-5{padding-top:calc(var(--spacing)*5)}.voxket-widget-root .pr-8{padding-right:calc(var(--spacing)*8)}.voxket-widget-root .pb-2{padding-bottom:calc(var(--spacing)*2)}.voxket-widget-root .pb-3{padding-bottom:calc(var(--spacing)*3)}.voxket-widget-root .pb-4{padding-bottom:calc(var(--spacing)*4)}.voxket-widget-root .pl-1{padding-left:calc(var(--spacing)*1)}.voxket-widget-root .pl-2{padding-left:calc(var(--spacing)*2)}.voxket-widget-root .pl-3{padding-left:calc(var(--spacing)*3)}.voxket-widget-root .pl-5{padding-left:calc(var(--spacing)*5)}.voxket-widget-root .text-center{text-align:center}.voxket-widget-root .text-end{text-align:end}.voxket-widget-root .text-left{text-align:left}.voxket-widget-root .text-right{text-align:right}.voxket-widget-root .align-top{vertical-align:top}.voxket-widget-root .font-mono{font-family:var(--font-mono)}.voxket-widget-root .text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.voxket-widget-root .text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.voxket-widget-root .text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.voxket-widget-root .text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.voxket-widget-root .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.voxket-widget-root .text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.voxket-widget-root .text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.voxket-widget-root .text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.voxket-widget-root .text-\\[0\\.85em\\]{font-size:.85em}.voxket-widget-root .leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.voxket-widget-root .leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.voxket-widget-root .font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.voxket-widget-root .font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.voxket-widget-root .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.voxket-widget-root .tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.voxket-widget-root .tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.voxket-widget-root .break-words{overflow-wrap:break-word}.voxket-widget-root .whitespace-nowrap{white-space:nowrap}.voxket-widget-root .whitespace-pre-line{white-space:pre-line}.voxket-widget-root .whitespace-pre-wrap{white-space:pre-wrap}.voxket-widget-root .text-black{color:var(--color-black)}.voxket-widget-root .text-blue-300{color:var(--color-blue-300)}.voxket-widget-root .text-blue-400{color:var(--color-blue-400)}.voxket-widget-root .text-blue-500{color:var(--color-blue-500)}.voxket-widget-root .text-blue-600{color:var(--color-blue-600)}.voxket-widget-root .text-blue-700{color:var(--color-blue-700)}.voxket-widget-root .text-blue-800{color:var(--color-blue-800)}.voxket-widget-root .text-gray-200{color:var(--color-gray-200)}.voxket-widget-root .text-gray-300{color:var(--color-gray-300)}.voxket-widget-root .text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .text-gray-500{color:var(--color-gray-500)}.voxket-widget-root .text-gray-600{color:var(--color-gray-600)}.voxket-widget-root .text-gray-700{color:var(--color-gray-700)}.voxket-widget-root .text-gray-800{color:var(--color-gray-800)}.voxket-widget-root .text-gray-900{color:var(--color-gray-900)}.voxket-widget-root .text-green-700{color:var(--color-green-700)}.voxket-widget-root .text-inherit{color:inherit}.voxket-widget-root .text-red-400{color:var(--color-red-400)}.voxket-widget-root .text-red-500{color:var(--color-red-500)}.voxket-widget-root .text-red-600{color:var(--color-red-600)}.voxket-widget-root .text-red-700{color:var(--color-red-700)}.voxket-widget-root .text-transparent{color:#0000}.voxket-widget-root .text-white{color:var(--color-white)}.voxket-widget-root .text-yellow-400{color:var(--color-yellow-400)}.voxket-widget-root .text-yellow-700{color:var(--color-yellow-700)}.voxket-widget-root .uppercase{text-transform:uppercase}.voxket-widget-root .italic{font-style:italic}.voxket-widget-root .underline{text-decoration-line:underline}.voxket-widget-root .underline-offset-4{text-underline-offset:4px}.voxket-widget-root .placeholder-gray-400::-moz-placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-400::placeholder{color:var(--color-gray-400)}.voxket-widget-root .placeholder-gray-500::-moz-placeholder{color:var(--color-gray-500)}.voxket-widget-root .placeholder-gray-500::placeholder{color:var(--color-gray-500)}.voxket-widget-root .opacity-0{opacity:0}.voxket-widget-root .opacity-15{opacity:.15}.voxket-widget-root .opacity-20{opacity:.2}.voxket-widget-root .opacity-30{opacity:.3}.voxket-widget-root .opacity-40{opacity:.4}.voxket-widget-root .opacity-50{opacity:.5}.voxket-widget-root .opacity-60{opacity:.6}.voxket-widget-root .opacity-70{opacity:.7}.voxket-widget-root .opacity-80{opacity:.8}.voxket-widget-root .opacity-100{opacity:1}.voxket-widget-root .shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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)}.voxket-widget-root .\\!ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .shadow-black\\/40{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)40%,transparent)var(--tw-shadow-alpha),transparent)}}.voxket-widget-root .outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.voxket-widget-root .outline-hidden{outline-offset:2px;outline:2px solid #0000}}.voxket-widget-root .outline{outline-style:var(--tw-outline-style);outline-width:1px}.voxket-widget-root .blur{--tw-blur:blur(8px);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,)}.voxket-widget-root .blur-2xl{--tw-blur:blur(var(--blur-2xl));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,)}.voxket-widget-root .blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.voxket-widget-root .blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.voxket-widget-root .\\!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,)!important}.voxket-widget-root .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,)}.voxket-widget-root .backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.voxket-widget-root .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,visibility,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))}.voxket-widget-root .transition-\\[color\\, .voxket-widget-root border\\, .voxket-widget-root background-color\\]{transition-property:color,border,background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .transition-\\[opacity\\, .voxket-widget-root translate\\]{transition-property:opacity,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .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))}.voxket-widget-root .delay-200{transition-delay:.2s}.voxket-widget-root .duration-150{--tw-duration:.15s;transition-duration:.15s}.voxket-widget-root .duration-200{--tw-duration:.2s;transition-duration:.2s}.voxket-widget-root .duration-250{--tw-duration:.25s;transition-duration:.25s}.voxket-widget-root .duration-300{--tw-duration:.3s;transition-duration:.3s}.voxket-widget-root .duration-700{--tw-duration:.7s;transition-duration:.7s}.voxket-widget-root .ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.voxket-widget-root .ease-linear{--tw-ease:linear;transition-timing-function:linear}.voxket-widget-root .ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.voxket-widget-root .contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.voxket-widget-root .\\!outline-none{--tw-outline-style:none!important;outline-style:none!important}.voxket-widget-root .outline-none{--tw-outline-style:none;outline-style:none}.voxket-widget-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (hover:hover){.voxket-widget-root .group-hover\\:scale-\\[1\\.02\\]:is(:where(.group):hover *){scale:1.02}.voxket-widget-root .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.voxket-widget-root .group-data-\\[state\\=off\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=off] *),.voxket-widget-root .group-data-\\[state\\=on\\]\\/track\\:bg-white:is(:where(.group\\/track)[data-state=on] *){background-color:var(--color-white)}.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:border-blue-500\\/50:focus-within{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.voxket-widget-root .focus-within\\:shadow-lg:focus-within{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus-within\\:ring-blue-500\\/30:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}@media (hover:hover){.voxket-widget-root .hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .hover\\:border-gray-300:hover{border-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-\\[\\#2563EB\\]:hover{background-color:#2563eb}.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.voxket-widget-root .hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.voxket-widget-root .hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.voxket-widget-root .hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.voxket-widget-root .hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.voxket-widget-root .hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.voxket-widget-root .hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.voxket-widget-root .hover\\:bg-gray-300:hover{background-color:var(--color-gray-300)}.voxket-widget-root .hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:#4a556580}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-600\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-600)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-700:hover{background-color:var(--color-gray-700)}.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab,var(--color-gray-700)50%,transparent)}}.voxket-widget-root .hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}.voxket-widget-root .hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.voxket-widget-root .hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.voxket-widget-root .hover\\:bg-purple-600:hover{background-color:var(--color-purple-600)}.voxket-widget-root .hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.voxket-widget-root .hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.voxket-widget-root .hover\\:bg-red-700:hover{background-color:var(--color-red-700)}.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:#9f07124d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-red-800\\/30:hover{background-color:color-mix(in oklab,var(--color-red-800)30%,transparent)}}.voxket-widget-root .hover\\:bg-white:hover{background-color:var(--color-white)}.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.voxket-widget-root .hover\\:from-\\[\\#2563EB\\]:hover{--tw-gradient-from:#2563eb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:from-blue-600:hover{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-\\[\\#7C3AED\\]:hover{--tw-gradient-to:#7c3aed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:to-purple-700:hover{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.voxket-widget-root .hover\\:text-blue-900:hover{color:var(--color-blue-900)}.voxket-widget-root .hover\\:text-gray-200:hover{color:var(--color-gray-200)}.voxket-widget-root .hover\\:text-gray-300:hover{color:var(--color-gray-300)}.voxket-widget-root .hover\\:text-gray-700:hover{color:var(--color-gray-700)}.voxket-widget-root .hover\\:text-gray-800:hover{color:var(--color-gray-800)}.voxket-widget-root .hover\\:text-white:hover{color:var(--color-white)}.voxket-widget-root .hover\\:underline:hover{text-decoration-line:underline}.voxket-widget-root .hover\\:opacity-80:hover{opacity:.8}.voxket-widget-root .hover\\:shadow-md:hover{--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)}.voxket-widget-root .hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px 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)}}.voxket-widget-root .focus\\:border-blue-500:focus{border-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .focus\\:ring-blue-400\\/40:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)40%,transparent)}}.voxket-widget-root .focus\\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.voxket-widget-root .focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.voxket-widget-root .focus\\:ring-offset-gray-900:focus{--tw-ring-offset-color:var(--color-gray-900)}.voxket-widget-root .focus\\:ring-offset-white:focus{--tw-ring-offset-color:var(--color-white)}.voxket-widget-root .focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.voxket-widget-root .focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.voxket-widget-root .disabled\\:pointer-events-none:disabled{pointer-events:none}.voxket-widget-root .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.voxket-widget-root .disabled\\:bg-gray-300:disabled{background-color:var(--color-gray-300)}.voxket-widget-root .disabled\\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.voxket-widget-root .disabled\\:opacity-50:disabled{opacity:.5}.voxket-widget-root .disabled\\:opacity-70:disabled{opacity:.7}.voxket-widget-root .has-\\[\\>svg\\]\\:grid-cols-\\[calc\\(var\\(--spacing\\)\\*4\\)_1fr\\]:has(>svg){grid-template-columns:calc(var(--spacing)*4)1fr}.voxket-widget-root .has-\\[\\>svg\\]\\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing)*3);column-gap:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.voxket-widget-root .has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.voxket-widget-root .aria-invalid\\:border-0[aria-invalid=true]{border-style:var(--tw-border-style);border-width:0}.voxket-widget-root .aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.voxket-widget-root .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.voxket-widget-root .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.voxket-widget-root .data-\\[lk-highlighted\\=true\\]\\:bg-\\[\\#5c64f6\\][data-lk-highlighted=true]{background-color:#5c64f6}.voxket-widget-root .data-\\[lk-muted\\=true\\]\\:bg-\\[\\#222222\\][data-lk-muted=true]{background-color:#222}.voxket-widget-root .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.voxket-widget-root .data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}.voxket-widget-root :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}@media (min-width:40rem){.voxket-widget-root .sm\\:left-0{left:calc(var(--spacing)*0)}.voxket-widget-root .sm\\:h-24{height:calc(var(--spacing)*24)}.voxket-widget-root .sm\\:w-36{width:calc(var(--spacing)*36)}.voxket-widget-root .sm\\:max-w-sm{max-width:var(--container-sm)}}@media (min-width:48rem){.voxket-widget-root .md\\:px-0{padding-inline:calc(var(--spacing)*0)}}@media (min-width:64rem){.voxket-widget-root .lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.voxket-widget-root .dark\\:border-gray-600{border-color:var(--color-gray-600)}.voxket-widget-root .dark\\:border-gray-700{border-color:var(--color-gray-700)}.voxket-widget-root .dark\\:bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .dark\\:bg-gray-900{background-color:var(--color-gray-900)}.voxket-widget-root .dark\\:bg-white{background-color:var(--color-white)}.voxket-widget-root .dark\\:text-blue-400{color:var(--color-blue-400)}.voxket-widget-root .dark\\:text-gray-400{color:var(--color-gray-400)}.voxket-widget-root .dark\\:text-white{color:var(--color-white)}@media (hover:hover){.voxket-widget-root .dark\\:hover\\:bg-gray-800:hover{background-color:var(--color-gray-800)}}.voxket-widget-root .dark\\:aria-invalid\\:ring-0[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.voxket-widget-root .\\[\\&_p\\]\\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.voxket-widget-root .\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.voxket-widget-root .\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.voxket-widget-root .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}.voxket-widget-root :is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}.voxket-widget-root .\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.voxket-widget-root .\\[\\&\\>svg\\]\\:translate-y-0\\.5>svg{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.voxket-widget-root .\\[\\&\\>svg\\]\\:text-current>svg{color:currentColor}.voxket-widget-root .\\[\\&\\>video\\]\\:h-\\[90px\\]>video{height:90px}.voxket-widget-root .\\[\\&\\>video\\]\\:w-auto>video{width:auto}@layer theme{:root,.voxket-widget-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-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--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-300:oklch(80.9% .105 251.813);--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-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-600:oklch(51.1% .262 276.966);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--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-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--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);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--aspect-video:16/9;--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{*,.voxket-widget-root :after,.voxket-widget-root :before,.voxket-widget-root ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.voxket-widget-root ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,.voxket-widget-root :host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;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}.voxket-widget-root hr{height:0;color:inherit;border-top-width:1px}.voxket-widget-root abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.voxket-widget-root h1,.voxket-widget-root h2,.voxket-widget-root h3,.voxket-widget-root h4,.voxket-widget-root h5,.voxket-widget-root h6{font-size:inherit;font-weight:inherit}.voxket-widget-root a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.voxket-widget-root b,.voxket-widget-root strong{font-weight:bolder}.voxket-widget-root code,.voxket-widget-root kbd,.voxket-widget-root samp,.voxket-widget-root 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}.voxket-widget-root small{font-size:80%}.voxket-widget-root sub,.voxket-widget-root sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.voxket-widget-root sub{bottom:-.25em}.voxket-widget-root sup{top:-.5em}.voxket-widget-root table{text-indent:0;border-color:inherit;border-collapse:collapse}.voxket-widget-root :-moz-focusring{outline:auto}.voxket-widget-root progress{vertical-align:baseline}.voxket-widget-root summary{display:list-item}.voxket-widget-root ol,.voxket-widget-root ul,.voxket-widget-root menu{list-style:none}.voxket-widget-root img,.voxket-widget-root svg,.voxket-widget-root video,.voxket-widget-root canvas,.voxket-widget-root audio,.voxket-widget-root iframe,.voxket-widget-root embed,.voxket-widget-root object{vertical-align:middle;display:block}.voxket-widget-root img,.voxket-widget-root video{max-width:100%;height:auto}.voxket-widget-root button,.voxket-widget-root input,.voxket-widget-root select,.voxket-widget-root optgroup,.voxket-widget-root textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.voxket-widget-root ::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}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup{font-weight:bolder}.voxket-widget-root :where(select:is([multiple],.voxket-widget-root [size])) optgroup option{padding-inline-start:20px}.voxket-widget-root ::file-selector-button{margin-inline-end:4px}.voxket-widget-root ::-moz-placeholder{opacity:1}.voxket-widget-root ::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){.voxket-widget-root ::-moz-placeholder{color:currentColor}.voxket-widget-root ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root ::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}.voxket-widget-root ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.voxket-widget-root textarea{resize:vertical}.voxket-widget-root ::-webkit-search-decoration{-webkit-appearance:none}.voxket-widget-root ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.voxket-widget-root ::-webkit-datetime-edit{display:inline-flex}.voxket-widget-root ::-webkit-datetime-edit-fields-wrapper{padding:0}.voxket-widget-root ::-webkit-datetime-edit{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-year-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-month-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-day-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-hour-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-minute-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-second-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-millisecond-field{padding-block:0}.voxket-widget-root ::-webkit-datetime-edit-meridiem-field{padding-block:0}.voxket-widget-root :-moz-ui-invalid{box-shadow:none}.voxket-widget-root button,.voxket-widget-root input:where([type=button],.voxket-widget-root [type=reset],.voxket-widget-root [type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}.voxket-widget-root ::-webkit-inner-spin-button{height:auto}.voxket-widget-root ::-webkit-outer-spin-button{height:auto}.voxket-widget-root [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components,utilities;.voxket-widget-root ::-webkit-scrollbar{display:none}.voxket-widget-root .scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.voxket-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}.voxket-widget-root .chat-scrollable{scrollbar-width:thin;scrollbar-color:#9b9b9b4d transparent;flex-direction:column;display:flex}.voxket-widget-root .chat-scrollable::-webkit-scrollbar{width:6px;display:block}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-track{background:0 0}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb{background-color:#9b9b9b4d;border-radius:3px}.voxket-widget-root .chat-scrollable::-webkit-scrollbar-thumb:hover{background-color:#9b9b9b80}.voxket-widget-root .chat-messages-container{flex-direction:column;justify-content:flex-end;width:100%;max-width:none;min-height:100%;display:flex}@keyframes pulse-ring{0%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(1.2)}to{opacity:0;transform:scale(1.4)}}@keyframes glow{0%,to{box-shadow:0 0 20px #3b82f680}50%{box-shadow:0 0 30px #3b82f6cc}}.voxket-widget-root .pulse-ring{animation:2s cubic-bezier(.4,0,.6,1) infinite pulse-ring}.voxket-widget-root .mic-glow{animation:2s ease-in-out infinite glow}.voxket-widget-root{color-scheme:light dark;color:#ffffffde;border-radius:\"2xl\";font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#0000;border-radius:1rem;font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;font-weight:400;line-height:1.5}.voxket-widget-root.theme-light{color:#000000de}.voxket-widget-root.theme-dark,.voxket-widget-root.theme-vox{color:#ffffffde}.voxket-widget-root .animate-spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.voxket-widget-root button{cursor:pointer}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{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-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@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}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-contain-size{syntax:\"*\";inherits:false}@property --tw-contain-layout{syntax:\"*\";inherits:false}@property --tw-contain-paint{syntax:\"*\";inherits:false}@property --tw-contain-style{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}\n";
18
12
 
19
13
  const head = document.head || document.getElementsByTagName('head')[0];
20
14
  if (head.firstChild) {
@@ -22,89 +16,36 @@
22
16
  } else {
23
17
  head.appendChild(style);
24
18
  }
25
-
26
- // Ensure popup trigger styles are available globally
27
- if (!document.querySelector('style[data-voxket-popup-trigger]')) {
28
- const popupStyle = document.createElement('style');
29
- popupStyle.type = 'text/css';
30
- popupStyle.setAttribute('data-voxket-popup-trigger', 'true');
31
- popupStyle.textContent = `
32
- .voxket-popup-trigger {
33
- position: fixed !important;
34
- z-index: 9999 !important;
35
- background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
36
- color: #ffffff !important;
37
- border: none !important;
38
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
39
- display: inline-flex !important;
40
- align-items: center !important;
41
- justify-content: center !important;
42
- border-radius: 9999px !important;
43
- padding: 0.5rem 1rem !important;
44
- font-weight: 500 !important;
45
- transition: all 0.15s ease-in-out !important;
46
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
47
- font-size: 14px !important;
48
- cursor: pointer !important;
49
- }
50
-
51
- .voxket-popup-trigger:hover {
52
- background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
53
- transform: scale(1.05) !important;
54
- }
55
-
56
- .voxket-popup-trigger[data-position="bottom-right"] {
57
- bottom: 1rem !important;
58
- right: 1rem !important;
59
- }
60
-
61
- .voxket-popup-trigger[data-position="bottom-left"] {
62
- bottom: 1rem !important;
63
- left: 1rem !important;
64
- }
65
-
66
- .voxket-popup-trigger[data-position="top-right"] {
67
- top: 1rem !important;
68
- right: 1rem !important;
69
- }
70
-
71
- .voxket-popup-trigger[data-position="top-left"] {
72
- top: 1rem !important;
73
- left: 1rem !important;
74
- }
75
- `;
76
- head.appendChild(popupStyle);
77
- }
78
19
  })();
79
20
 
80
- "use strict";var Yd=Object.defineProperty;var qd=(e,t,n)=>t in e?Yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>qd(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("react"),l=require("react/jsx-runtime"),K=require("livekit-client"),Ke=require("@livekit/components-react"),qr=require("class-variance-authority"),Xr=require("clsx"),Xd=require("@radix-ui/react-toggle"),Jd=require("@radix-ui/react-select"),$e=require("lucide-react"),Qd=require("@emotion/styled");require("@emotion/react");const eu=require("react-dom/client");function Jr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=Jr(w),tu=Jr(Xd),tt=Jr(Jd),Qr=w.createContext({});function eo(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const to=typeof window<"u",ll=to?w.useLayoutEffect:w.useEffect,Es=w.createContext(null);function no(e,t){e.indexOf(t)===-1&&e.push(t)}function so(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const yt=(e,t,n)=>n>t?t:n<e?e:n;function vr(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let hn=()=>{},xt=()=>{};process.env.NODE_ENV!=="production"&&(hn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(vr(t,n))},xt=(e,t,n)=>{if(!e)throw new Error(vr(t,n))});const bt={},cl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function dl(e){return typeof e=="object"&&e!==null}const ul=e=>/^0[^.\s]+$/u.test(e);function ro(e){let t;return()=>(t===void 0&&(t=e()),t)}const nt=e=>e,nu=(e,t)=>n=>t(e(n)),Ln=(...e)=>e.reduce(nu),Pn=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class oo{constructor(){this.subscriptions=[]}add(t){return no(this.subscriptions,t),()=>so(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let i=0;i<r;i++){const o=this.subscriptions[i];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const at=e=>e*1e3,dt=e=>e/1e3;function fl(e,t){return t?e*(1e3/t):0}const Qo=new Set;function io(e,t,n){e||Qo.has(t)||(console.warn(vr(t,n)),Qo.add(t))}const hl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,su=1e-7,ru=12;function ou(e,t,n,s,r){let i,o,a=0;do o=t+(n-t)/2,i=hl(o,s,r)-e,i>0?n=o:t=o;while(Math.abs(i)>su&&++a<ru);return o}function _n(e,t,n,s){if(e===t&&n===s)return nt;const r=i=>ou(i,0,1,e,n);return i=>i===0||i===1?i:hl(r(i),t,s)}const ml=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gl=e=>t=>1-e(1-t),pl=_n(.33,1.53,.69,.99),ao=gl(pl),yl=ml(ao),xl=e=>(e*=2)<1?.5*ao(e):.5*(2-Math.pow(2,-10*(e-1))),lo=e=>1-Math.sin(Math.acos(e)),bl=gl(lo),vl=ml(lo),iu=_n(.42,0,1,1),au=_n(0,0,.58,1),wl=_n(.42,0,.58,1),lu=e=>Array.isArray(e)&&typeof e[0]!="number",Sl=e=>Array.isArray(e)&&typeof e[0]=="number",ei={linear:nt,easeIn:iu,easeInOut:wl,easeOut:au,circIn:lo,circInOut:vl,circOut:bl,backIn:ao,backInOut:yl,backOut:pl,anticipate:xl},cu=e=>typeof e=="string",ti=e=>{if(Sl(e)){xt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return _n(t,n,s,r)}else if(cu(e))return xt(ei[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ei[e];return e},qn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function du(e,t){let n=new Set,s=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,f=!1,h=!1)=>{const x=h&&r?n:s;return f&&o.add(u),x.has(u)||x.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[n,s]=[s,n],n.forEach(c),n.clear(),r=!1,i&&(i=!1,d.process(u))}};return d}const uu=40;function Cl(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=qn.reduce((T,k)=>(T[k]=du(i),T),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:p,postRender:x}=o,m=()=>{const T=bt.useManualTiming?r.timestamp:performance.now();n=!1,bt.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,uu),1)),r.timestamp=T,r.isProcessing=!0,a.process(r),c.process(r),d.process(r),u.process(r),f.process(r),h.process(r),p.process(r),x.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(m))},b=()=>{n=!0,s=!0,r.isProcessing||e(m)};return{schedule:qn.reduce((T,k)=>{const v=o[k];return T[k]=(j,V=!1,E=!1)=>(n||b(),v.schedule(j,V,E)),T},{}),cancel:T=>{for(let k=0;k<qn.length;k++)o[qn[k]].cancel(T)},state:r,steps:o}}const{schedule:je,cancel:At,state:He,steps:Hs}=Cl(typeof requestAnimationFrame<"u"?requestAnimationFrame:nt,!0);let ls;function fu(){ls=void 0}const Ge={now:()=>(ls===void 0&&Ge.set(He.isProcessing||bt.useManualTiming?He.timestamp:performance.now()),ls),set:e=>{ls=e,queueMicrotask(fu)}},kl=e=>t=>typeof t=="string"&&t.startsWith(e),co=kl("--"),hu=kl("var(--"),uo=e=>hu(e)?mu.test(e.split("/*")[0].trim()):!1,mu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Rn={...mn,transform:e=>yt(0,1,e)},Xn={...mn,default:1},En=e=>Math.round(e*1e5)/1e5,fo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gu(e){return e==null}const pu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ho=(e,t)=>n=>!!(typeof n=="string"&&pu.test(n)&&n.startsWith(e)||t&&!gu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Tl=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,i,o,a]=s.match(fo);return{[e]:parseFloat(r),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},yu=e=>yt(0,255,e),zs={...mn,transform:e=>Math.round(yu(e))},Ft={test:ho("rgb","red"),parse:Tl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+zs.transform(e)+", "+zs.transform(t)+", "+zs.transform(n)+", "+En(Rn.transform(s))+")"};function xu(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const wr={test:ho("#"),parse:xu,transform:Ft.transform},Bn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kt=Bn("deg"),ut=Bn("%"),ce=Bn("px"),bu=Bn("vh"),vu=Bn("vw"),ni={...ut,parse:e=>ut.parse(e)/100,transform:e=>ut.transform(e*100)},en={test:ho("hsl","hue"),parse:Tl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ut.transform(En(t))+", "+ut.transform(En(n))+", "+En(Rn.transform(s))+")"},Le={test:e=>Ft.test(e)||wr.test(e)||en.test(e),parse:e=>Ft.test(e)?Ft.parse(e):en.test(e)?en.parse(e):wr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ft.transform(e):en.transform(e),getAnimatableNone:e=>{const t=Le.parse(e);return t.alpha=0,Le.transform(t)}},wu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Su(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(fo))==null?void 0:t.length)||0)+(((n=e.match(wu))==null?void 0:n.length)||0)>0}const El="number",Al="color",Cu="var",ku="var(",si="${}",Tu=/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 In(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let i=0;const a=t.replace(Tu,c=>(Le.test(c)?(s.color.push(i),r.push(Al),n.push(Le.parse(c))):c.startsWith(ku)?(s.var.push(i),r.push(Cu),n.push(c)):(s.number.push(i),r.push(El),n.push(parseFloat(c))),++i,si)).split(si);return{values:n,split:a,indexes:s,types:r}}function jl(e){return In(e).values}function Nl(e){const{split:t,types:n}=In(e),s=t.length;return r=>{let i="";for(let o=0;o<s;o++)if(i+=t[o],r[o]!==void 0){const a=n[o];a===El?i+=En(r[o]):a===Al?i+=Le.transform(r[o]):i+=r[o]}return i}}const Eu=e=>typeof e=="number"?0:Le.test(e)?Le.getAnimatableNone(e):e;function Au(e){const t=jl(e);return Nl(e)(t.map(Eu))}const jt={test:Su,parse:jl,createTransformer:Nl,getAnimatableNone:Au};function Ws(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ju({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,i=0,o=0;if(!t)r=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Ws(c,a,e+1/3),i=Ws(c,a,e),o=Ws(c,a,e-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:s}}function ys(e,t){return n=>n>0?t:e}const Ve=(e,t,n)=>e+(t-e)*n,Zs=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Nu=[wr,Ft,en],Mu=e=>Nu.find(t=>t.test(e));function ri(e){const t=Mu(e);if(hn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===en&&(n=ju(n)),n}const oi=(e,t)=>{const n=ri(e),s=ri(t);if(!n||!s)return ys(e,t);const r={...n};return i=>(r.red=Zs(n.red,s.red,i),r.green=Zs(n.green,s.green,i),r.blue=Zs(n.blue,s.blue,i),r.alpha=Ve(n.alpha,s.alpha,i),Ft.transform(r))},Sr=new Set(["none","hidden"]);function Vu(e,t){return Sr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Pu(e,t){return n=>Ve(e,t,n)}function mo(e){return typeof e=="number"?Pu:typeof e=="string"?uo(e)?ys:Le.test(e)?oi:Du:Array.isArray(e)?Ml:typeof e=="object"?Le.test(e)?oi:Ru:ys}function Ml(e,t){const n=[...e],s=n.length,r=e.map((i,o)=>mo(i)(i,t[o]));return i=>{for(let o=0;o<s;o++)n[o]=r[o](i);return n}}function Ru(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=mo(e[r])(e[r],t[r]));return r=>{for(const i in s)n[i]=s[i](r);return n}}function Iu(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const i=t.types[r],o=e.indexes[i][s[i]],a=e.values[o]??0;n[r]=a,s[i]++}return n}const Du=(e,t)=>{const n=jt.createTransformer(t),s=In(e),r=In(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?Sr.has(e)&&!r.values.length||Sr.has(t)&&!s.values.length?Vu(e,t):Ln(Ml(Iu(s,r),r.values),n):(hn(!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"),ys(e,t))};function Vl(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ve(e,t,n):mo(e)(e,t)}const $u=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>je.update(t,n),stop:()=>At(t),now:()=>He.isProcessing?He.timestamp:Ge.now()}},Pl=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let i=0;i<r;i++)s+=Math.round(e(i/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},xs=2e4;function go(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<xs;)t+=n,s=e.next(t);return t>=xs?1/0:t}function Fu(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(go(s),xs);return{type:"keyframes",ease:i=>s.next(r*i).value/t,duration:dt(r)}}const Ou=5;function Rl(e,t,n){const s=Math.max(t-Ou,0);return fl(n-e(s),t-s)}const Me={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},Gs=.001;function Lu({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:s=Me.mass}){let r,i;hn(e<=at(Me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=yt(Me.minDamping,Me.maxDamping,o),e=yt(Me.minDuration,Me.maxDuration,dt(e)),o<1?(r=d=>{const u=d*o,f=u*e,h=u-n,p=Cr(d,o),x=Math.exp(-f);return Gs-h/p*x},i=d=>{const f=d*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(d,2)*e,x=Math.exp(-f),m=Cr(Math.pow(d,2),o);return(-r(d)+Gs>0?-1:1)*((h-p)*x)/m}):(r=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-Gs+u*f},i=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=Bu(r,i,a);if(e=at(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const d=Math.pow(c,2)*s;return{stiffness:d,damping:o*2*Math.sqrt(s*d),duration:e}}}const _u=12;function Bu(e,t,n){let s=n;for(let r=1;r<_u;r++)s=s-e(s)/t(s);return s}function Cr(e,t){return e*Math.sqrt(1-t*t)}const Uu=["duration","bounce"],Hu=["stiffness","damping","mass"];function ii(e,t){return t.some(n=>e[n]!==void 0)}function zu(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!ii(e,Hu)&&ii(e,Uu))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Me.mass,stiffness:r,damping:i}}else{const n=Lu(e);t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function bs(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:c,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:p}=zu({...n,velocity:-dt(n.velocity||0)}),x=h||0,m=d/(2*Math.sqrt(c*u)),b=o-i,S=dt(Math.sqrt(c/u)),C=Math.abs(b)<5;s||(s=C?Me.restSpeed.granular:Me.restSpeed.default),r||(r=C?Me.restDelta.granular:Me.restDelta.default);let T;if(m<1){const v=Cr(S,m);T=j=>{const V=Math.exp(-m*S*j);return o-V*((x+m*S*b)/v*Math.sin(v*j)+b*Math.cos(v*j))}}else if(m===1)T=v=>o-Math.exp(-S*v)*(b+(x+S*b)*v);else{const v=S*Math.sqrt(m*m-1);T=j=>{const V=Math.exp(-m*S*j),E=Math.min(v*j,300);return o-V*((x+m*S*b)*Math.sinh(E)+v*b*Math.cosh(E))/v}}const k={calculatedDuration:p&&f||null,next:v=>{const j=T(v);if(p)a.done=v>=f;else{let V=v===0?x:0;m<1&&(V=v===0?at(x):Rl(T,v,j));const E=Math.abs(V)<=s,_=Math.abs(o-j)<=r;a.done=E&&_}return a.value=a.done?o:j,a},toString:()=>{const v=Math.min(go(k),xs),j=Pl(V=>k.next(v*V).value,v,30);return v+"ms "+j},toTransition:()=>{}};return k}bs.applyToOptions=e=>{const t=Fu(e,100,bs);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function kr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},p=E=>a!==void 0&&E<a||c!==void 0&&E>c,x=E=>a===void 0?c:c===void 0||Math.abs(a-E)<Math.abs(c-E)?a:c;let m=n*t;const b=f+m,S=o===void 0?b:o(b);S!==b&&(m=S-f);const C=E=>-m*Math.exp(-E/s),T=E=>S+C(E),k=E=>{const _=C(E),y=T(E);h.done=Math.abs(_)<=d,h.value=h.done?S:y};let v,j;const V=E=>{p(h.value)&&(v=E,j=bs({keyframes:[h.value,x(h.value)],velocity:Rl(T,E,h.value),damping:r,stiffness:i,restDelta:d,restSpeed:u}))};return V(0),{calculatedDuration:null,next:E=>{let _=!1;return!j&&v===void 0&&(_=!0,k(E),V(E)),v!==void 0&&E>=v?j.next(E-v):(!_&&k(E),h)}}}function Wu(e,t,n){const s=[],r=n||bt.mix||Vl,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]||nt:t;a=Ln(c,a)}s.push(a)}return s}function Zu(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const i=e.length;if(xt(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=Wu(t,s,r),c=a.length,d=u=>{if(o&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Pn(e[f],e[f+1],u);return a[f](h)};return n?u=>d(yt(e[0],e[i-1],u)):d}function Gu(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=Pn(0,t,s);e.push(Ve(n,1,r))}}function Ku(e){const t=[0];return Gu(t,e.length-1),t}function Yu(e,t){return e.map(n=>n*t)}function qu(e,t){return e.map(()=>t||wl).splice(0,e.length-1)}function tn({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=lu(s)?s.map(ti):ti(s),i={done:!1,value:t[0]},o=Yu(n&&n.length===t.length?n:Ku(t),e),a=Zu(o,t,{ease:Array.isArray(r)?r:qu(t,r)});return{calculatedDuration:e,next:c=>(i.value=a(c),i.done=c>=e,i)}}const Xu=e=>e!==null;function po(e,{repeat:t,repeatType:n="loop"},s,r=1){const i=e.filter(Xu),a=r<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||s===void 0?i[a]:s}const Ju={decay:kr,inertia:kr,tween:tn,keyframes:tn,spring:bs};function Il(e){typeof e.type=="string"&&(e.type=Ju[e.type])}class yo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Qu=e=>e/100;class xo extends yo{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Ge.now()&&this.tick(Ge.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Il(t);const{type:n=tn,repeat:s=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=t;let{keyframes:a}=t;const c=n||tn;process.env.NODE_ENV!=="production"&&c!==tn&&xt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==tn&&typeof a[0]!="number"&&(this.mixKeyframes=Ln(Qu,Vl(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=go(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:p,type:x,onUpdate:m,finalKeyframe:b}=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)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?S<0:S>r;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,k=s;if(f){const E=Math.min(this.currentTime,r)/a;let _=Math.floor(E),y=E%1;!y&&E>=1&&(y=1),y===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(h==="reverse"?(y=1-y,p&&(y-=p/a)):h==="mirror"&&(k=o)),T=yt(0,1,y)*a}const v=C?{done:!1,value:u[0]}:k.next(T);i&&(v.value=i(v.value));let{done:j}=v;!C&&c!==null&&(j=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return V&&x!==kr&&(v.value=po(u,this.options,b,this.speed)),m&&m(v.value),V&&this.finish(),v}then(t,n){return this.finished.then(t,n)}get duration(){return dt(this.calculatedDuration)}get time(){return dt(this.currentTime)}set time(t){var n;t=at(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ge.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=dt(this.currentTime))}play(){var r,i;if(this.isStopped)return;const{driver:t=$u,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(r=this.options).onPlay)==null||i.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),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(Ge.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function ef(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ot=e=>e*180/Math.PI,Tr=e=>{const t=Ot(Math.atan2(e[1],e[0]));return Er(t)},tf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tr,rotateZ:Tr,skewX:e=>Ot(Math.atan(e[1])),skewY:e=>Ot(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Er=e=>(e=e%360,e<0&&(e+=360),e),ai=Tr,li=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ci=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:li,scaleY:ci,scale:e=>(li(e)+ci(e))/2,rotateX:e=>Er(Ot(Math.atan2(e[6],e[5]))),rotateY:e=>Er(Ot(Math.atan2(-e[2],e[0]))),rotateZ:ai,rotate:ai,skewX:e=>Ot(Math.atan(e[4])),skewY:e=>Ot(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ar(e){return e.includes("scale")?1:0}function jr(e,t){if(!e||e==="none")return Ar(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=nf,r=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=tf,r=a}if(!r)return Ar(t);const i=s[t],o=r[1].split(",").map(rf);return typeof i=="function"?i(o):o[i]}const sf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jr(n,t)};function rf(e){return parseFloat(e.trim())}const gn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pn=new Set(gn),di=e=>e===mn||e===ce,of=new Set(["x","y","z"]),af=gn.filter(e=>!of.has(e));function lf(e){const t=[];return af.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const _t={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>jr(t,"x"),y:(e,{transform:t})=>jr(t,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const Bt=new Set;let Nr=!1,Mr=!1,Vr=!1;function Dl(){if(Mr){const e=Array.from(Bt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=lf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([i,o])=>{var a;(a=s.getValue(i))==null||a.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Mr=!1,Nr=!1,Bt.forEach(e=>e.complete(Vr)),Bt.clear()}function $l(){Bt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mr=!0)})}function cf(){Vr=!0,$l(),Dl(),Vr=!1}class bo{constructor(t,n,s,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Bt.add(this),Nr||(Nr=!0,je.read($l),je.resolveKeyframes(Dl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const i=r==null?void 0:r.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(s&&n){const a=s.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),r&&i===void 0&&r.set(t[0])}ef(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bt.delete(this)}cancel(){this.state==="scheduled"&&(Bt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const df=e=>e.startsWith("--");function uf(e,t,n){df(t)?e.style.setProperty(t,n):e.style[t]=n}const ff=ro(()=>window.ScrollTimeline!==void 0),hf={};function mf(e,t){const n=ro(e);return()=>hf[t]??n()}const Fl=mf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cn=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,ui={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cn([0,.65,.55,1]),circOut:Cn([.55,0,1,.45]),backIn:Cn([.31,.01,.66,-.59]),backOut:Cn([.33,1.53,.69,.99])};function Ol(e,t){if(e)return typeof e=="function"?Fl()?Pl(e,t):"ease-out":Sl(e)?Cn(e):Array.isArray(e)?e.map(n=>Ol(n,t)||ui.easeOut):ui[e]}function gf(e,t,n,{delay:s=0,duration:r=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=Ol(a,r);Array.isArray(f)&&(u.easing=f);const h={delay:s,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function Ll(e){return typeof e=="function"&&"applyToOptions"in e}function pf({type:e,...t}){return Ll(e)&&Fl()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yf extends yo{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,xt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=pf(t);this.animation=gf(n,s,r,d,i),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=po(r,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):uf(n,s,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}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(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return dt(Number(t))}get time(){return dt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ff()?(this.animation.timeline=t,nt):n(this)}}const _l={anticipate:xl,backInOut:yl,circInOut:vl};function xf(e){return e in _l}function bf(e){typeof e.ease=="string"&&xf(e.ease)&&(e.ease=_l[e.ease])}const fi=10;class vf extends yf{constructor(t){bf(t),Il(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new xo({...o,autoplay:!1}),c=at(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-fi).value,a.sample(c).value,fi),a.stop()}}const hi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(jt.test(e)||e==="0")&&!e.startsWith("url("));function wf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sf(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=hi(r,t),a=hi(i,t);return hn(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:wf(e)||(n==="spring"||Ll(n))&&s}function Pr(e){e.duration=0,e.type}const Cf=new Set(["opacity","clipPath","filter","transform"]),kf=ro(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tf(e){var u;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:i,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return kf()&&n&&Cf.has(n)&&(n!=="transform"||!d)&&!c&&!s&&r!=="mirror"&&i!==0&&o!=="inertia"}const Ef=40;class Af extends yo{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o="loop",keyframes:a,name:c,motionValue:d,element:u,...f}){var x;super(),this.stop=()=>{var m,b;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Ge.now();const h={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:i,repeatType:o,name:c,motionValue:d,element:u,...f},p=(u==null?void 0:u.KeyframeResolver)||bo;this.keyframeResolver=new p(a,(m,b,S)=>this.onKeyframesResolved(m,b,h,!S),c,d,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,s,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:c,isHandoff:d,onUpdate:u}=s;this.resolvedAt=Ge.now(),Sf(t,i,o,a)||((bt.instantAnimations||!c)&&(u==null||u(po(t,s,n))),t[0]=t[t.length-1],Pr(s),s.repeat=0);const h={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Ef?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},p=!d&&Tf(h)?new vf({...h,element:h.motionValue.owner.current}):new xo(h);p.finished.then(()=>this.notifyFinished()).catch(nt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),cf()),this._animation}get duration(){return this.animation.duration}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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const jf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nf(e){const t=jf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Mf=4;function Bl(e,t,n=1){xt(n<=Mf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=Nf(e);if(!s)return;const i=window.getComputedStyle(t).getPropertyValue(s);if(i){const o=i.trim();return cl(o)?parseFloat(o):o}return uo(r)?Bl(r,t,n+1):r}function vo(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ul=new Set(["width","height","top","left","right","bottom",...gn]),Vf={test:e=>e==="auto",parse:e=>e},Hl=e=>t=>t.test(e),zl=[mn,ce,ut,kt,vu,bu,Vf],mi=e=>zl.find(Hl(e));function Pf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ul(e):!0}const Rf=new Set(["brightness","contrast","saturate","opacity"]);function If(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(fo)||[];if(!s)return e;const r=n.replace(s,"");let i=Rf.has(t)?1:0;return s!==n&&(i*=100),t+"("+i+r+")"}const Df=/\b([a-z-]*)\(.*?\)/gu,Rr={...jt,getAnimatableNone:e=>{const t=e.match(Df);return t?t.map(If).join(" "):e}},gi={...mn,transform:Math.round},$f={rotate:kt,rotateX:kt,rotateY:kt,rotateZ:kt,scale:Xn,scaleX:Xn,scaleY:Xn,scaleZ:Xn,skew:kt,skewX:kt,skewY:kt,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Rn,originX:ni,originY:ni,originZ:ce},wo={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce,...$f,zIndex:gi,fillOpacity:Rn,strokeOpacity:Rn,numOctaves:gi},Ff={...wo,color:Le,backgroundColor:Le,outlineColor:Le,fill:Le,stroke:Le,borderColor:Le,borderTopColor:Le,borderRightColor:Le,borderBottomColor:Le,borderLeftColor:Le,filter:Rr,WebkitFilter:Rr},Wl=e=>Ff[e];function Zl(e,t){let n=Wl(e);return n!==Rr&&(n=jt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Of=new Set(["auto","none","0"]);function Lf(e,t,n){let s=0,r;for(;s<e.length&&!r;){const i=e[s];typeof i=="string"&&!Of.has(i)&&In(i).values.length&&(r=e[s]),s++}if(r&&n)for(const i of t)e[i]=Zl(n,r)}class _f extends bo{constructor(t,n,s,r,i){super(t,n,s,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),uo(d))){const u=Bl(d,n.current);u!==void 0&&(t[c]=u),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ul.has(s)||t.length!==2)return;const[r,i]=t,o=mi(r),a=mi(i);if(o!==a)if(di(o)&&di(a))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else _t[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||Pf(t[r]))&&s.push(r);s.length&&Lf(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=_t[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Bf(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const Gl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Kl(e){return dl(e)&&"offsetHeight"in e}const pi=30,Uf=e=>!isNaN(parseFloat(e));class Hf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var i;const r=Ge.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ge.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Uf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&io(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new oo);const s=this.events[t].add(n);return t==="change"?()=>{s(),je.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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=Ge.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pi);return fl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function cn(e,t){return new Hf(e,t)}const{schedule:So}=Cl(queueMicrotask,!1),it={x:!1,y:!1};function Yl(){return it.x||it.y}function zf(e){return e==="x"||e==="y"?it[e]?null:(it[e]=!0,()=>{it[e]=!1}):it.x||it.y?null:(it.x=it.y=!0,()=>{it.x=it.y=!1})}function ql(e,t){const n=Bf(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function yi(e){return!(e.pointerType==="touch"||Yl())}function Wf(e,t,n={}){const[s,r,i]=ql(e,n),o=a=>{if(!yi(a))return;const{target:c}=a,d=t(c,a);if(typeof d!="function"||!c)return;const u=f=>{yi(f)&&(d(f),c.removeEventListener("pointerleave",u))};c.addEventListener("pointerleave",u,r)};return s.forEach(a=>{a.addEventListener("pointerenter",o,r)}),i}const Xl=(e,t)=>t?e===t?!0:Xl(e,t.parentElement):!1,Co=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gf(e){return Zf.has(e.tagName)||e.tabIndex!==-1}const cs=new WeakSet;function xi(e){return t=>{t.key==="Enter"&&e(t)}}function Ks(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Kf=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=xi(()=>{if(cs.has(n))return;Ks(n,"down");const r=xi(()=>{Ks(n,"up")}),i=()=>Ks(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function bi(e){return Co(e)&&!Yl()}function Yf(e,t,n={}){const[s,r,i]=ql(e,n),o=a=>{const c=a.currentTarget;if(!bi(a))return;cs.add(c);const d=t(c,a),u=(p,x)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),cs.has(c)&&cs.delete(c),bi(p)&&typeof d=="function"&&d(p,{success:x})},f=p=>{u(p,c===window||c===document||n.useGlobalTarget||Xl(c,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",h,r)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,r),Kl(a)&&(a.addEventListener("focus",d=>Kf(d,r)),!Gf(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Jl(e){return dl(e)&&"ownerSVGElement"in e}function qf(e){return Jl(e)&&e.tagName==="svg"}const We=e=>!!(e&&e.getVelocity),Xf=[...zl,Le,jt],Jf=e=>Xf.find(Hl(e)),ko=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Qf extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const s=n.offsetParent,r=Kl(s)&&s.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function eh({children:e,isPresent:t,anchorX:n,root:s}){const r=w.useId(),i=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=w.useContext(ko);return w.useInsertionEffect(()=>{const{width:c,height:d,top:u,left:f,right:h}=o.current;if(t||!i.current||!c||!d)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;i.current.dataset.motionPopId=r;const x=document.createElement("style");a&&(x.nonce=a);const m=s??document.head;return m.appendChild(x),x.sheet&&x.sheet.insertRule(`
81
- [data-motion-pop-id="${r}"] {
21
+ "use strict";var ep=Object.defineProperty;var tp=(e,t,n)=>t in e?ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ue=(e,t,n)=>tp(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("react"),f=require("react/jsx-runtime"),te=require("livekit-client"),dt=require("@livekit/components-react"),Vs=require("class-variance-authority"),Ds=require("clsx"),np=require("@radix-ui/react-toggle"),rp=require("@radix-ui/react-select"),Ze=require("lucide-react"),ip=require("@emotion/styled");require("@emotion/react");const op=require("react-dom/client");function Fs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const x=Fs(j),sp=Fs(np),St=Fs(rp),Ls=j.createContext({});function Os(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const $s=typeof window<"u",rd=$s?j.useLayoutEffect:j.useEffect,Mi=j.createContext(null);function _s(e,t){e.indexOf(t)===-1&&e.push(t)}function Bs(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ht=(e,t,n)=>n>t?t:n<e?e:n;function qo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yn=()=>{},Ut=()=>{};process.env.NODE_ENV!=="production"&&(Yn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qo(t,n))},Ut=(e,t,n)=>{if(!e)throw new Error(qo(t,n))});const Wt={},id=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function od(e){return typeof e=="object"&&e!==null}const sd=e=>/^0[^.\s]+$/u.test(e);function zs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ct=e=>e,ap=(e,t)=>n=>t(e(n)),Rr=(...e)=>e.reduce(ap),Sr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Hs{constructor(){this.subscriptions=[]}add(t){return _s(this.subscriptions,t),()=>Bs(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const jt=e=>e*1e3,Rt=e=>e/1e3;function ad(e,t){return t?e*(1e3/t):0}const il=new Set;function Us(e,t,n){e||il.has(t)||(console.warn(qo(t,n)),il.add(t))}const ld=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,lp=1e-7,cp=12;function up(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=ld(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>lp&&++a<cp);return o}function Vr(e,t,n,r){if(e===t&&n===r)return Ct;const i=s=>up(s,0,1,e,n);return s=>s===0||s===1?s:ld(i(s),t,r)}const cd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ud=e=>t=>1-e(1-t),dd=Vr(.33,1.53,.69,.99),Ws=ud(dd),fd=cd(Ws),hd=e=>(e*=2)<1?.5*Ws(e):.5*(2-Math.pow(2,-10*(e-1))),Zs=e=>1-Math.sin(Math.acos(e)),md=ud(Zs),pd=cd(Zs),dp=Vr(.42,0,1,1),fp=Vr(0,0,.58,1),gd=Vr(.42,0,.58,1),hp=e=>Array.isArray(e)&&typeof e[0]!="number",yd=e=>Array.isArray(e)&&typeof e[0]=="number",ol={linear:Ct,easeIn:dp,easeInOut:gd,easeOut:fp,circIn:Zs,circInOut:pd,circOut:md,backIn:Ws,backInOut:fd,backOut:dd,anticipate:hd},mp=e=>typeof e=="string",sl=e=>{if(yd(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Vr(t,n,r,i)}else if(mp(e))return Ut(ol[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ol[e];return e},Ur=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function pp(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const g=h&&i?n:r;return d&&o.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),o.delete(u)},process:u=>{if(a=u,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,c.process(u))}};return c}const gp=40;function xd(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Ur.reduce((S,A)=>(S[A]=pp(s),S),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:m,postRender:g}=o,p=()=>{const S=Wt.useManualTiming?i.timestamp:performance.now();n=!1,Wt.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,gp),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),m.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},b=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Ur.reduce((S,A)=>{const T=o[A];return S[A]=(C,N=!1,P=!1)=>(n||b(),T.schedule(C,N,P)),S},{}),cancel:S=>{for(let A=0;A<Ur.length;A++)o[Ur[A]].cancel(S)},state:i,steps:o}}const{schedule:Be,cancel:tn,state:it,steps:Qi}=xd(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ct,!0);let si;function yp(){si=void 0}const ft={now:()=>(si===void 0&&ft.set(it.isProcessing||Wt.useManualTiming?it.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(yp)}},bd=e=>t=>typeof t=="string"&&t.startsWith(e),qs=bd("--"),xp=bd("var(--"),Gs=e=>xp(e)?bp.test(e.split("/*")[0].trim()):!1,bp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Cr={...Xn,transform:e=>Ht(0,1,e)},Wr={...Xn,default:1},pr=e=>Math.round(e*1e5)/1e5,Ks=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vp(e){return e==null}const wp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ys=(e,t)=>n=>!!(typeof n=="string"&&wp.test(n)&&n.startsWith(e)||t&&!vp(n)&&Object.prototype.hasOwnProperty.call(n,t)),vd=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Ks);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},kp=e=>Ht(0,255,e),Ji={...Xn,transform:e=>Math.round(kp(e))},mn={test:Ys("rgb","red"),parse:vd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ji.transform(e)+", "+Ji.transform(t)+", "+Ji.transform(n)+", "+pr(Cr.transform(r))+")"};function Sp(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Go={test:Ys("#"),parse:Sp,transform:mn.transform},Dr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qt=Dr("deg"),Vt=Dr("%"),ye=Dr("px"),Cp=Dr("vh"),Ep=Dr("vw"),al={...Vt,parse:e=>Vt.parse(e)/100,transform:e=>Vt.transform(e*100)},Dn={test:Ys("hsl","hue"),parse:vd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Vt.transform(pr(t))+", "+Vt.transform(pr(n))+", "+pr(Cr.transform(r))+")"},et={test:e=>mn.test(e)||Go.test(e)||Dn.test(e),parse:e=>mn.test(e)?mn.parse(e):Dn.test(e)?Dn.parse(e):Go.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mn.transform(e):Dn.transform(e),getAnimatableNone:e=>{const t=et.parse(e);return t.alpha=0,et.transform(t)}},Tp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ap(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ks))==null?void 0:t.length)||0)+(((n=e.match(Tp))==null?void 0:n.length)||0)>0}const wd="number",kd="color",jp="var",Pp="var(",ll="${}",Mp=/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 Er(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(Mp,l=>(et.test(l)?(r.color.push(s),i.push(kd),n.push(et.parse(l))):l.startsWith(Pp)?(r.var.push(s),i.push(jp),n.push(l)):(r.number.push(s),i.push(wd),n.push(parseFloat(l))),++s,ll)).split(ll);return{values:n,split:a,indexes:r,types:i}}function Sd(e){return Er(e).values}function Cd(e){const{split:t,types:n}=Er(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===wd?s+=pr(i[o]):a===kd?s+=et.transform(i[o]):s+=i[o]}return s}}const Np=e=>typeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e;function Ip(e){const t=Sd(e);return Cd(e)(t.map(Np))}const nn={test:Ap,parse:Sd,createTransformer:Cd,getAnimatableNone:Ip};function eo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=eo(l,a,e+1/3),s=eo(l,a,e),o=eo(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function gi(e,t){return n=>n>0?t:e}const qe=(e,t,n)=>e+(t-e)*n,to=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Vp=[Go,mn,Dn],Dp=e=>Vp.find(t=>t.test(e));function cl(e){const t=Dp(e);if(Yn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Dn&&(n=Rp(n)),n}const ul=(e,t)=>{const n=cl(e),r=cl(t);if(!n||!r)return gi(e,t);const i={...n};return s=>(i.red=to(n.red,r.red,s),i.green=to(n.green,r.green,s),i.blue=to(n.blue,r.blue,s),i.alpha=qe(n.alpha,r.alpha,s),mn.transform(i))},Ko=new Set(["none","hidden"]);function Fp(e,t){return Ko.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Lp(e,t){return n=>qe(e,t,n)}function Xs(e){return typeof e=="number"?Lp:typeof e=="string"?Gs(e)?gi:et.test(e)?ul:_p:Array.isArray(e)?Ed:typeof e=="object"?et.test(e)?ul:Op:gi}function Ed(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Xs(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function Op(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Xs(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function $p(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const _p=(e,t)=>{const n=nn.createTransformer(t),r=Er(e),i=Er(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ko.has(e)&&!i.values.length||Ko.has(t)&&!r.values.length?Fp(e,t):Rr(Ed($p(r,i),i.values),n):(Yn(!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"),gi(e,t))};function Td(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?qe(e,t,n):Xs(e)(e,t)}const Bp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Be.update(t,n),stop:()=>tn(t),now:()=>it.isProcessing?it.timestamp:ft.now()}},Ad=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},yi=2e4;function Qs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<yi;)t+=n,r=e.next(t);return t>=yi?1/0:t}function zp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Qs(r),yi);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Rt(i)}}const Hp=5;function jd(e,t,n){const r=Math.max(t-Hp,0);return ad(n-e(r),t-r)}const We={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},no=.001;function Up({duration:e=We.duration,bounce:t=We.bounce,velocity:n=We.velocity,mass:r=We.mass}){let i,s;Yn(e<=jt(We.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Ht(We.minDamping,We.maxDamping,o),e=Ht(We.minDuration,We.maxDuration,Rt(e)),o<1?(i=c=>{const u=c*o,d=u*e,h=u-n,m=Yo(c,o),g=Math.exp(-d);return no-h/m*g},s=c=>{const d=c*o*e,h=d*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-d),p=Yo(Math.pow(c,2),o);return(-i(c)+no>0?-1:1)*((h-m)*g)/p}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-no+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Zp(i,s,a);if(e=jt(e),isNaN(l))return{stiffness:We.stiffness,damping:We.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const Wp=12;function Zp(e,t,n){let r=n;for(let i=1;i<Wp;i++)r=r-e(r)/t(r);return r}function Yo(e,t){return e*Math.sqrt(1-t*t)}const qp=["duration","bounce"],Gp=["stiffness","damping","mass"];function dl(e,t){return t.some(n=>e[n]!==void 0)}function Kp(e){let t={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...e};if(!dl(e,Gp)&&dl(e,qp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Ht(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:We.mass,stiffness:i,damping:s}}else{const n=Up(e);t={...t,...n,mass:We.mass},t.isResolvedFromDuration=!0}return t}function xi(e=We.visualDuration,t=We.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:m}=Kp({...n,velocity:-Rt(n.velocity||0)}),g=h||0,p=c/(2*Math.sqrt(l*u)),b=o-s,v=Rt(Math.sqrt(l/u)),k=Math.abs(b)<5;r||(r=k?We.restSpeed.granular:We.restSpeed.default),i||(i=k?We.restDelta.granular:We.restDelta.default);let S;if(p<1){const T=Yo(v,p);S=C=>{const N=Math.exp(-p*v*C);return o-N*((g+p*v*b)/T*Math.sin(T*C)+b*Math.cos(T*C))}}else if(p===1)S=T=>o-Math.exp(-v*T)*(b+(g+v*b)*T);else{const T=v*Math.sqrt(p*p-1);S=C=>{const N=Math.exp(-p*v*C),P=Math.min(T*C,300);return o-N*((g+p*v*b)*Math.sinh(P)+T*b*Math.cosh(P))/T}}const A={calculatedDuration:m&&d||null,next:T=>{const C=S(T);if(m)a.done=T>=d;else{let N=T===0?g:0;p<1&&(N=T===0?jt(g):jd(S,T,C));const P=Math.abs(N)<=r,L=Math.abs(o-C)<=i;a.done=P&&L}return a.value=a.done?o:C,a},toString:()=>{const T=Math.min(Qs(A),yi),C=Ad(N=>A.next(T*N).value,T,30);return T+"ms "+C},toTransition:()=>{}};return A}xi.applyToOptions=e=>{const t=zp(e,100,xi);return e.ease=t.ease,e.duration=jt(t.duration),e.type="keyframes",e};function Xo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},m=P=>a!==void 0&&P<a||l!==void 0&&P>l,g=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let p=n*t;const b=d+p,v=o===void 0?b:o(b);v!==b&&(p=v-d);const k=P=>-p*Math.exp(-P/r),S=P=>v+k(P),A=P=>{const L=k(P),y=S(P);h.done=Math.abs(L)<=c,h.value=h.done?v:y};let T,C;const N=P=>{m(h.value)&&(T=P,C=xi({keyframes:[h.value,g(h.value)],velocity:jd(S,P,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:P=>{let L=!1;return!C&&T===void 0&&(L=!0,A(P),N(P)),T!==void 0&&P>=T?C.next(P-T):(!L&&A(P),h)}}}function Yp(e,t,n){const r=[],i=n||Wt.mix||Td,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ct:t;a=Rr(l,a)}r.push(a)}return r}function Xp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Ut(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Yp(t,r,i),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const h=Sr(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Ht(e[0],e[s-1],u)):c}function Qp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Sr(0,t,r);e.push(qe(n,1,i))}}function Jp(e){const t=[0];return Qp(t,e.length-1),t}function eg(e,t){return e.map(n=>n*t)}function tg(e,t){return e.map(()=>t||gd).splice(0,e.length-1)}function Fn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=hp(r)?r.map(sl):sl(r),s={done:!1,value:t[0]},o=eg(n&&n.length===t.length?n:Jp(t),e),a=Xp(o,t,{ease:Array.isArray(i)?i:tg(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const ng=e=>e!==null;function Js(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(ng),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const rg={decay:Xo,inertia:Xo,tween:Fn,keyframes:Fn,spring:xi};function Pd(e){typeof e.type=="string"&&(e.type=rg[e.type])}class ea{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ig=e=>e/100;class ta extends ea{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ft.now()&&this.tick(ft.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Pd(t);const{type:n=Fn,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Fn;process.env.NODE_ENV!=="production"&&l!==Fn&&Ut(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Fn&&typeof a[0]!="number"&&(this.mixKeyframes=Rr(ig,Td(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Qs(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:h,repeatDelay:m,type:g,onUpdate:p,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,A=r;if(d){const P=Math.min(this.currentTime,i)/a;let L=Math.floor(P),y=P%1;!y&&P>=1&&(y=1),y===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(h==="reverse"?(y=1-y,m&&(y-=m/a)):h==="mirror"&&(A=o)),S=Ht(0,1,y)*a}const T=k?{done:!1,value:u[0]}:A.next(S);s&&(T.value=s(T.value));let{done:C}=T;!k&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return N&&g!==Xo&&(T.value=Js(u,this.options,b,this.speed)),p&&p(T.value),N&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return Rt(this.calculatedDuration)}get time(){return Rt(this.currentTime)}set time(t){var n;t=jt(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ft.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Rt(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=Bp,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(ft.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}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){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function og(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pn=e=>e*180/Math.PI,Qo=e=>{const t=pn(Math.atan2(e[1],e[0]));return Jo(t)},sg={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Qo,rotateZ:Qo,skewX:e=>pn(Math.atan(e[1])),skewY:e=>pn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Jo=e=>(e=e%360,e<0&&(e+=360),e),fl=Qo,hl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ml=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ag={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hl,scaleY:ml,scale:e=>(hl(e)+ml(e))/2,rotateX:e=>Jo(pn(Math.atan2(e[6],e[5]))),rotateY:e=>Jo(pn(Math.atan2(-e[2],e[0]))),rotateZ:fl,rotate:fl,skewX:e=>pn(Math.atan(e[4])),skewY:e=>pn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function es(e){return e.includes("scale")?1:0}function ts(e,t){if(!e||e==="none")return es(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=ag,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=sg,i=a}if(!i)return es(t);const s=r[t],o=i[1].split(",").map(cg);return typeof s=="function"?s(o):o[s]}const lg=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ts(n,t)};function cg(e){return parseFloat(e.trim())}const Qn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jn=new Set(Qn),pl=e=>e===Xn||e===ye,ug=new Set(["x","y","z"]),dg=Qn.filter(e=>!ug.has(e));function fg(e){const t=[];return dg.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const yn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),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})=>ts(t,"x"),y:(e,{transform:t})=>ts(t,"y")};yn.translateX=yn.x;yn.translateY=yn.y;const xn=new Set;let ns=!1,rs=!1,is=!1;function Md(){if(rs){const e=Array.from(xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=fg(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rs=!1,ns=!1,xn.forEach(e=>e.complete(is)),xn.clear()}function Nd(){xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rs=!0)})}function hg(){is=!0,Nd(),Md(),is=!1}class na{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(xn.add(this),ns||(ns=!0,Be.read(Nd),Be.resolveKeyframes(Md))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}og(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),xn.delete(this)}cancel(){this.state==="scheduled"&&(xn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const mg=e=>e.startsWith("--");function pg(e,t,n){mg(t)?e.style.setProperty(t,n):e.style[t]=n}const gg=zs(()=>window.ScrollTimeline!==void 0),yg={};function xg(e,t){const n=zs(e);return()=>yg[t]??n()}const Id=xg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fr([0,.65,.55,1]),circOut:fr([.55,0,1,.45]),backIn:fr([.31,.01,.66,-.59]),backOut:fr([.33,1.53,.69,.99])};function Rd(e,t){if(e)return typeof e=="function"?Id()?Ad(e,t):"ease-out":yd(e)?fr(e):Array.isArray(e)?e.map(n=>Rd(n,t)||gl.easeOut):gl[e]}function bg(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Rd(a,i);Array.isArray(d)&&(u.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(u,h)}function Vd(e){return typeof e=="function"&&"applyToOptions"in e}function vg({type:e,...t}){return Vd(e)&&Id()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wg extends ea{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Ut(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=vg(t);this.animation=bg(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Js(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):pg(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}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(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Rt(Number(t))}get time(){return Rt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=jt(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&gg()?(this.animation.timeline=t,Ct):n(this)}}const Dd={anticipate:hd,backInOut:fd,circInOut:pd};function kg(e){return e in Dd}function Sg(e){typeof e.ease=="string"&&kg(e.ease)&&(e.ease=Dd[e.ease])}const yl=10;class Cg extends wg{constructor(t){Sg(t),Pd(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ta({...o,autoplay:!1}),l=jt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-yl).value,a.sample(l).value,yl),a.stop()}}const xl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nn.test(e)||e==="0")&&!e.startsWith("url("));function Eg(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Tg(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=xl(i,t),a=xl(s,t);return Yn(o===a,`You are trying to animate ${t} from "${i}" to "${s}". "${o?s:i}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Eg(e)||(n==="spring"||Vd(n))&&r}function os(e){e.duration=0,e.type}const Ag=new Set(["opacity","clipPath","filter","transform"]),jg=zs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Pg(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return jg()&&n&&Ag.has(n)&&(n!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const Mg=40;class Ng extends ea{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var g;super(),this.stop=()=>{var p,b;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=ft.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:u,...d},m=(u==null?void 0:u.KeyframeResolver)||na;this.keyframeResolver=new m(a,(p,b,v)=>this.onKeyframesResolved(p,b,h,!v),l,c,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=ft.now(),Tg(t,s,o,a)||((Wt.instantAnimations||!l)&&(u==null||u(Js(t,r,n))),t[0]=t[t.length-1],os(r),r.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Mg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!c&&Pg(h)?new Cg({...h,element:h.motionValue.owner.current}):new ta(h);m.finished.then(()=>this.notifyFinished()).catch(Ct),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,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),hg()),this._animation}get duration(){return this.animation.duration}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(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Ig=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Rg(e){const t=Ig.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const Vg=4;function Fd(e,t,n=1){Ut(n<=Vg,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=Rg(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return id(o)?parseFloat(o):o}return Gs(i)?Fd(i,t,n+1):i}function ra(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Ld=new Set(["width","height","top","left","right","bottom",...Qn]),Dg={test:e=>e==="auto",parse:e=>e},Od=e=>t=>t.test(e),$d=[Xn,ye,Vt,Qt,Ep,Cp,Dg],bl=e=>$d.find(Od(e));function Fg(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sd(e):!0}const Lg=new Set(["brightness","contrast","saturate","opacity"]);function Og(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ks)||[];if(!r)return e;const i=n.replace(r,"");let s=Lg.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const $g=/\b([a-z-]*)\(.*?\)/gu,ss={...nn,getAnimatableNone:e=>{const t=e.match($g);return t?t.map(Og).join(" "):e}},vl={...Xn,transform:Math.round},_g={rotate:Qt,rotateX:Qt,rotateY:Qt,rotateZ:Qt,scale:Wr,scaleX:Wr,scaleY:Wr,scaleZ:Wr,skew:Qt,skewX:Qt,skewY:Qt,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Cr,originX:al,originY:al,originZ:ye},ia={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye,..._g,zIndex:vl,fillOpacity:Cr,strokeOpacity:Cr,numOctaves:vl},Bg={...ia,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:ss,WebkitFilter:ss},_d=e=>Bg[e];function Bd(e,t){let n=_d(e);return n!==ss&&(n=nn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zg=new Set(["auto","none","0"]);function Hg(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!zg.has(s)&&Er(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Bd(n,i)}class Ug extends na{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Gs(c))){const u=Fd(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ld.has(r)||t.length!==2)return;const[i,s]=t,o=bl(i),a=bl(s);if(o!==a)if(pl(o)&&pl(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else yn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Fg(t[i]))&&r.push(i);r.length&&Hg(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=yn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=yn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Wg(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const zd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Hd(e){return od(e)&&"offsetHeight"in e}const wl=30,Zg=e=>!isNaN(parseFloat(e));class qg{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=ft.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ft.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zg(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Us(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Hs);const r=this.events[t].add(n);return t==="change"?()=>{r(),Be.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.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=ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wl)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wl);return ad(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new qg(e,t)}const{schedule:oa}=xd(queueMicrotask,!1),At={x:!1,y:!1};function Ud(){return At.x||At.y}function Gg(e){return e==="x"||e==="y"?At[e]?null:(At[e]=!0,()=>{At[e]=!1}):At.x||At.y?null:(At.x=At.y=!0,()=>{At.x=At.y=!1})}function Wd(e,t){const n=Wg(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function kl(e){return!(e.pointerType==="touch"||Ud())}function Kg(e,t,n={}){const[r,i,s]=Wd(e,n),o=a=>{if(!kl(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{kl(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Zd=(e,t)=>t?e===t?!0:Zd(e,t.parentElement):!1,sa=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Yg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Xg(e){return Yg.has(e.tagName)||e.tabIndex!==-1}const ai=new WeakSet;function Sl(e){return t=>{t.key==="Enter"&&e(t)}}function ro(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Qg=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Sl(()=>{if(ai.has(n))return;ro(n,"down");const i=Sl(()=>{ro(n,"up")}),s=()=>ro(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Cl(e){return sa(e)&&!Ud()}function Jg(e,t,n={}){const[r,i,s]=Wd(e,n),o=a=>{const l=a.currentTarget;if(!Cl(a))return;ai.add(l);const c=t(l,a),u=(m,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),ai.has(l)&&ai.delete(l),Cl(m)&&typeof c=="function"&&c(m,{success:g})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||Zd(l,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Hd(a)&&(a.addEventListener("focus",c=>Qg(c,i)),!Xg(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function qd(e){return od(e)&&"ownerSVGElement"in e}function e0(e){return qd(e)&&e.tagName==="svg"}const ot=e=>!!(e&&e.getVelocity),t0=[...$d,et,nn],n0=e=>t0.find(Od(e)),aa=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class r0 extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Hd(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function i0({children:e,isPresent:t,anchorX:n,root:r}){const i=j.useId(),s=j.useRef(null),o=j.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=j.useContext(aa);return j.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:h}=o.current;if(t||!s.current||!l||!c)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;s.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const p=r??document.head;return p.appendChild(g),g.sheet&&g.sheet.insertRule(`
22
+ [data-motion-pop-id="${i}"] {
82
23
  position: absolute !important;
83
- width: ${c}px !important;
84
- height: ${d}px !important;
85
- ${p}px !important;
24
+ width: ${l}px !important;
25
+ height: ${c}px !important;
26
+ ${m}px !important;
86
27
  top: ${u}px !important;
87
28
  }
88
- `),()=>{m.contains(x)&&m.removeChild(x)}},[t]),l.jsx(Qf,{isPresent:t,childRef:i,sizeRef:o,children:g.cloneElement(e,{ref:i})})}const th=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:i,mode:o,anchorX:a,root:c})=>{const d=eo(nh),u=w.useId();let f=!0,h=w.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:r,onExitComplete:p=>{d.set(p,!0);for(const x of d.values())if(!x)return;s&&s()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[n,d,s]);return i&&f&&(h={...h}),w.useMemo(()=>{d.forEach((p,x)=>d.set(x,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),o==="popLayout"&&(e=l.jsx(eh,{isPresent:n,anchorX:a,root:c,children:e})),l.jsx(Es.Provider,{value:h,children:e})};function nh(){return new Map}function Ql(e=!0){const t=w.useContext(Es);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,i=w.useId();w.useEffect(()=>{if(e)return r(i)},[e]);const o=w.useCallback(()=>e&&s&&s(i),[i,s,e]);return!n&&s?[!1,o]:[!0]}const Jn=e=>e.key||"";function vi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const Et=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:i="sync",propagate:o=!1,anchorX:a="left",root:c})=>{const[d,u]=Ql(o),f=w.useMemo(()=>vi(e),[e]),h=o&&!d?[]:f.map(Jn),p=w.useRef(!0),x=w.useRef(f),m=eo(()=>new Map),[b,S]=w.useState(f),[C,T]=w.useState(f);ll(()=>{p.current=!1,x.current=f;for(let j=0;j<C.length;j++){const V=Jn(C[j]);h.includes(V)?m.delete(V):m.get(V)!==!0&&m.set(V,!1)}},[C,h.length,h.join("-")]);const k=[];if(f!==b){let j=[...f];for(let V=0;V<C.length;V++){const E=C[V],_=Jn(E);h.includes(_)||(j.splice(V,0,E),k.push(E))}return i==="wait"&&k.length&&(j=k),T(vi(j)),S(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&C.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:v}=w.useContext(Qr);return l.jsx(l.Fragment,{children:C.map(j=>{const V=Jn(j),E=o&&!d?!1:f===C||h.includes(V),_=()=>{if(m.has(V))m.set(V,!0);else return;let y=!0;m.forEach(D=>{D||(y=!1)}),y&&(v==null||v(),T(x.current),o&&(u==null||u()),s&&s())};return l.jsx(th,{isPresent:E,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:i,root:c,onExitComplete:E?void 0:_,anchorX:a,children:j},V)})})},ec=w.createContext({strict:!1}),wi={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"]},dn={};for(const e in wi)dn[e]={isEnabled:t=>wi[e].some(n=>!!t[n])};function sh(e){for(const t in e)dn[t]={...dn[t],...e[t]}}const rh=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 vs(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rh.has(e)}let tc=e=>!vs(e);function oh(e){typeof e=="function"&&(tc=t=>t.startsWith("on")?!vs(t):e(t))}try{oh(require("@emotion/is-prop-valid").default)}catch{}function ih(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(tc(r)||n===!0&&vs(r)||!t&&!vs(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const As=w.createContext({});function js(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dn(e){return typeof e=="string"||Array.isArray(e)}const To=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Eo=["initial",...To];function Ns(e){return js(e.animate)||Eo.some(t=>Dn(e[t]))}function nc(e){return!!(Ns(e)||e.variants)}function ah(e,t){if(Ns(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Dn(n)?n:void 0,animate:Dn(s)?s:void 0}}return e.inherit!==!1?t:{}}function lh(e){const{initial:t,animate:n}=ah(e,w.useContext(As));return w.useMemo(()=>({initial:t,animate:n}),[Si(t),Si(n)])}function Si(e){return Array.isArray(e)?e.join(" "):e}const $n={};function ch(e){for(const t in e)$n[t]=e[t],co(t)&&($n[t].isCSSVariable=!0)}function sc(e,{layout:t,layoutId:n}){return pn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$n[e]||e==="opacity")}const dh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uh=gn.length;function fh(e,t,n){let s="",r=!0;for(let i=0;i<uh;i++){const o=gn[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||n){const d=Gl(a,wo[o]);if(!c){r=!1;const u=dh[o]||o;s+=`${u}(${d}) `}n&&(t[o]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function Ao(e,t,n){const{style:s,vars:r,transformOrigin:i}=e;let o=!1,a=!1;for(const c in t){const d=t[c];if(pn.has(c)){o=!0;continue}else if(co(c)){r[c]=d;continue}else{const u=Gl(d,wo[c]);c.startsWith("origin")?(a=!0,i[c]=u):s[c]=u}}if(t.transform||(o||n?s.transform=fh(t,e.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=i;s.transformOrigin=`${c} ${d} ${u}`}}const jo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rc(e,t,n){for(const s in t)!We(t[s])&&!sc(s,n)&&(e[s]=t[s])}function hh({transformTemplate:e},t){return w.useMemo(()=>{const n=jo();return Ao(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mh(e,t){const n=e.style||{},s={};return rc(s,n,e),Object.assign(s,hh(e,t)),s}function gh(e,t){const n={},s=mh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const ph={offset:"stroke-dashoffset",array:"stroke-dasharray"},yh={offset:"strokeDashoffset",array:"strokeDasharray"};function xh(e,t,n=1,s=0,r=!0){e.pathLength=1;const i=r?ph:yh;e[i.offset]=ce.transform(-s);const o=ce.transform(t),a=ce.transform(n);e[i.array]=`${o} ${a}`}function oc(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...a},c,d,u){if(Ao(e,a,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&xh(f,r,i,o,!1)}const ic=()=>({...jo(),attrs:{}}),ac=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bh(e,t,n,s){const r=w.useMemo(()=>{const i=ic();return oc(i,t,ac(s),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};rc(i,e.style,e),r.style={...i,...r.style}}return r}const vh=["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 No(e){return typeof e!="string"||e.includes("-")?!1:!!(vh.indexOf(e)>-1||/[A-Z]/u.test(e))}function wh(e,t,n,{latestValues:s},r,i=!1){const a=(No(e)?bh:gh)(t,s,r,e),c=ih(t,typeof e=="string",i),d=e!==w.Fragment?{...c,...a,ref:n}:{},{children:u}=t,f=w.useMemo(()=>We(u)?u.get():u,[u]);return w.createElement(e,{...d,children:f})}function Ci(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Mo(e,t,n,s){if(typeof t=="function"){const[r,i]=Ci(s);t=t(n!==void 0?n:e.custom,r,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,i]=Ci(s);t=t(n!==void 0?n:e.custom,r,i)}return t}function ds(e){return We(e)?e.get():e}function Sh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ch(n,s,r,e),renderState:t()}}function Ch(e,t,n,s){const r={},i=s(e,{});for(const h in i)r[h]=ds(i[h]);let{initial:o,animate:a}=e;const c=Ns(e),d=nc(e);t&&d&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!js(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const x=Mo(e,h[p]);if(x){const{transitionEnd:m,transition:b,...S}=x;for(const C in S){let T=S[C];if(Array.isArray(T)){const k=u?T.length-1:0;T=T[k]}T!==null&&(r[C]=T)}for(const C in m)r[C]=m[C]}}}return r}const lc=e=>(t,n)=>{const s=w.useContext(As),r=w.useContext(Es),i=()=>Sh(e,t,s,r);return n?i():eo(i)};function Vo(e,t,n){var i;const{style:s}=e,r={};for(const o in s)(We(s[o])||t.style&&We(t.style[o])||sc(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(r[o]=s[o]);return r}const kh=lc({scrapeMotionValuesFromProps:Vo,createRenderState:jo});function cc(e,t,n){const s=Vo(e,t,n);for(const r in e)if(We(e[r])||We(t[r])){const i=gn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[i]=e[r]}return s}const Th=lc({scrapeMotionValuesFromProps:cc,createRenderState:ic}),Eh=Symbol.for("motionComponentSymbol");function nn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ah(e,t,n){return w.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):nn(n)&&(n.current=s))},[t])}const Po=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jh="framerAppearId",dc="data-"+Po(jh),uc=w.createContext({});function Nh(e,t,n,s,r){var m,b;const{visualElement:i}=w.useContext(As),o=w.useContext(ec),a=w.useContext(Es),c=w.useContext(ko).reducedMotion,d=w.useRef(null);s=s||o.renderer,!d.current&&s&&(d.current=s(e,{visualState:t,parent:i,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const u=d.current,f=w.useContext(uc);u&&!u.projection&&r&&(u.type==="html"||u.type==="svg")&&Mh(d.current,n,r,f);const h=w.useRef(!1);w.useInsertionEffect(()=>{u&&h.current&&u.update(n,a)});const p=n[dc],x=w.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return ll(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),x.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(!x.current&&u.animationState&&u.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,p)}),x.current=!1),u.enteringChildren=void 0)}),u}function Mh(e,t,n,s){const{layoutId:r,layout:i,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fc(e.parent)),e.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||a&&nn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:c,layoutRoot:d})}function fc(e){if(e)return e.options.allowProjection!==!1?e.projection:fc(e.parent)}function Ys(e,{forwardMotionProps:t=!1}={},n,s){n&&sh(n);const r=No(e)?Th:kh;function i(a,c){let d;const u={...w.useContext(ko),...a,layoutId:Vh(a)},{isStatic:f}=u,h=lh(a),p=r(a,f);if(!f&&to){Ph(u,n);const x=Rh(u);d=x.MeasureLayout,h.visualElement=Nh(e,p,u,s,x.ProjectionNode)}return l.jsxs(As.Provider,{value:h,children:[d&&h.visualElement?l.jsx(d,{visualElement:h.visualElement,...u}):null,wh(e,a,Ah(p,h.visualElement,c),p,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=w.forwardRef(i);return o[Eh]=e,o}function Vh({layoutId:e}){const t=w.useContext(Qr).id;return t&&e!==void 0?t+"-"+e:e}function Ph(e,t){const n=w.useContext(ec).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?hn(!1,s,"lazy-strict-mode"):xt(!1,s,"lazy-strict-mode")}}function Rh(e){const{drag:t,layout:n}=dn;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Ih(e,t){if(typeof Proxy>"u")return Ys;const n=new Map,s=(i,o)=>Ys(i,o,e,t),r=(i,o)=>(process.env.NODE_ENV!=="production"&&io(!1,"motion() is deprecated. Use motion.create() instead."),s(i,o));return new Proxy(r,{get:(i,o)=>o==="create"?s:(n.has(o)||n.set(o,Ys(o,void 0,e,t)),n.get(o))})}function hc({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Dh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $h(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function qs(e){return e===void 0||e===1}function Ir({scale:e,scaleX:t,scaleY:n}){return!qs(e)||!qs(t)||!qs(n)}function $t(e){return Ir(e)||mc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mc(e){return ki(e.x)||ki(e.y)}function ki(e){return e&&e!=="0%"}function ws(e,t,n){const s=e-n,r=t*s;return n+r}function Ti(e,t,n,s,r){return r!==void 0&&(e=ws(e,r,s)),ws(e,n,s)+t}function Dr(e,t=0,n=1,s,r){e.min=Ti(e.min,t,n,s,r),e.max=Ti(e.max,t,n,s,r)}function gc(e,{x:t,y:n}){Dr(e.x,t.translate,t.scale,t.originPoint),Dr(e.y,n.translate,n.scale,n.originPoint)}const Ei=.999999999999,Ai=1.0000000000001;function Fh(e,t,n,s=!1){const r=n.length;if(!r)return;t.x=t.y=1;let i,o;for(let a=0;a<r;a++){i=n[a],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&rn(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,gc(e,o)),s&&$t(i.latestValues)&&rn(e,i.latestValues))}t.x<Ai&&t.x>Ei&&(t.x=1),t.y<Ai&&t.y>Ei&&(t.y=1)}function sn(e,t){e.min=e.min+t,e.max=e.max+t}function ji(e,t,n,s,r=.5){const i=Ve(e.min,e.max,r);Dr(e,t,n,i,s)}function rn(e,t){ji(e.x,t.x,t.scaleX,t.scale,t.originX),ji(e.y,t.y,t.scaleY,t.scale,t.originY)}function pc(e,t){return hc($h(e.getBoundingClientRect(),t))}function Oh(e,t,n){const s=pc(e,n),{scroll:r}=t;return r&&(sn(s.x,r.offset.x),sn(s.y,r.offset.y)),s}const Ni=()=>({translate:0,scale:1,origin:0,originPoint:0}),on=()=>({x:Ni(),y:Ni()}),Mi=()=>({min:0,max:0}),De=()=>({x:Mi(),y:Mi()}),$r={current:null},yc={current:!1};function Lh(){if(yc.current=!0,!!to)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$r.current=e.matches;e.addEventListener("change",t),t()}else $r.current=!1}const _h=new WeakMap;function Bh(e,t,n){for(const s in t){const r=t[s],i=n[s];if(We(r))e.addValue(s,r);else if(We(i))e.addValue(s,cn(r,{owner:e}));else if(i!==r)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(s);e.addValue(s,cn(o!==void 0?o:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Vi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uh{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,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=bo,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 h=Ge.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,je.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=Ns(n),this.isVariantNode=nc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];c[h]!==void 0&&We(p)&&p.set(c[h])}}mount(t){var n;this.current=t,_h.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,r)=>this.bindToMotionValue(r,s)),yc.current||Lh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$r.current,process.env.NODE_ENV!=="production"&&io(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),At(this.notifyUpdate),At(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];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,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=pn.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&je.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),i&&i(),n.owner&&n.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 dn){const n=dn[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(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):De()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Vi.length;s++){const r=Vi[s];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=Bh(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=cn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(cl(s)||ul(s))?s=parseFloat(s):!Jf(s)&&jt.test(n)&&(s=Zl(t,n)),this.setBaseTarget(t,We(s)?s.get():s)),We(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Mo(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(s=o[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!We(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new oo),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){So.render(this.render)}}class xc extends Uh{constructor(){super(...arguments),this.KeyframeResolver=_f}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;We(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function bc(e,{style:t,vars:n},s,r){const i=e.style;let o;for(o in t)i[o]=t[o];r==null||r.applyProjectionStyles(i,s);for(o in n)i.setProperty(o,n[o])}function Hh(e){return window.getComputedStyle(e)}class zh extends xc{constructor(){super(...arguments),this.type="html",this.renderInstance=bc}readValueFromInstance(t,n){var s;if(pn.has(n))return(s=this.projection)!=null&&s.isProjecting?Ar(n):sf(t,n);{const r=Hh(t),i=(co(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pc(t,n)}build(t,n,s){Ao(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Vo(t,n,s)}}const vc=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 Wh(e,t,n,s){bc(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(vc.has(r)?r:Po(r),t.attrs[r])}class Zh extends xc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=De}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(pn.has(n)){const s=Wl(n);return s&&s.default||0}return n=vc.has(n)?n:Po(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return cc(t,n,s)}build(t,n,s){oc(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Wh(t,n,s,r)}mount(t){this.isSVGTag=ac(t.tagName),super.mount(t)}}const Gh=(e,t)=>No(e)?new Zh(t):new zh(t,{allowProjection:e!==w.Fragment});function an(e,t,n){const s=e.getProps();return Mo(s,t,n!==void 0?n:s.custom,e)}const Fr=e=>Array.isArray(e);function Kh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cn(n))}function Yh(e){return Fr(e)?e[e.length-1]||0:e}function qh(e,t){const n=an(e,t);let{transitionEnd:s={},transition:r={},...i}=n||{};i={...i,...s};for(const o in i){const a=Yh(i[o]);Kh(e,o,a)}}function Xh(e){return!!(We(e)&&e.add)}function Or(e,t){const n=e.getValue("willChange");if(Xh(n))return n.add(t);if(!n&&bt.WillChange){const s=new bt.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function wc(e){return e.props[dc]}const Jh=e=>e!==null;function Qh(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Jh),i=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[i]}const em={type:"spring",stiffness:500,damping:25,restSpeed:10},tm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),nm={type:"keyframes",duration:.8},sm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rm=(e,{keyframes:t})=>t.length>2?nm:pn.has(e)?e.startsWith("scale")?tm(t[1]):em:sm;function om({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:d,...u}){return!!Object.keys(u).length}const Ro=(e,t,n,s={},r,i)=>o=>{const a=vo(s,e)||{},c=a.delay||s.delay||0;let{elapsed:d=0}=s;d=d-at(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:r};om(a)||Object.assign(u,rm(e,u)),u.duration&&(u.duration=at(u.duration)),u.repeatDelay&&(u.repeatDelay=at(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Pr(u),u.delay===0&&(f=!0)),(bt.instantAnimations||bt.skipAnimations)&&(f=!0,Pr(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!i&&t.get()!==void 0){const h=Qh(u.keyframes,a);if(h!==void 0){je.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new xo(u):new Af(u)};function im({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Sc(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=t;s&&(i=s);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in a){const f=e.getValue(u,e.latestValues[u]??null),h=a[u];if(h===void 0||d&&im(d,u))continue;const p={delay:n,...vo(i||{},u)},x=f.get();if(x!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===x&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const S=wc(e);if(S){const C=window.MotionHandoffAnimation(S,u,je);C!==null&&(p.startTime=C,m=!0)}}Or(e,u),f.start(Ro(u,f,h,e.shouldReduceMotion&&Ul.has(u)?{type:!1}:p,e,m));const b=f.animation;b&&c.push(b)}return o&&Promise.all(c).then(()=>{je.update(()=>{o&&qh(e,o)})}),c}function Cc(e,t,n,s=0,r=1){const i=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*s;return typeof n=="function"?n(i,o):r===1?i*s:a-i*s}function Lr(e,t,n={}){var c;const s=an(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const i=s?()=>Promise.all(Sc(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=r;return am(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=r;if(a){const[d,u]=a==="beforeChildren"?[i,o]:[o,i];return d().then(()=>u())}else return Promise.all([i(),o(n.delay)])}function am(e,t,n=0,s=0,r=0,i=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(Lr(c,t,{...o,delay:n+(typeof s=="function"?0:s)+Cc(e.variantChildren,c,s,r,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function lm(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(i=>Lr(e,i,n));s=Promise.all(r)}else if(typeof t=="string")s=Lr(e,t,n);else{const r=typeof t=="function"?an(e,t,n.custom):t;s=Promise.all(Sc(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}function kc(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const cm=Eo.length;function Tc(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Tc(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cm;n++){const s=Eo[n],r=e.props[s];(Dn(r)||r===!1)&&(t[s]=r)}return t}const dm=[...To].reverse(),um=To.length;function fm(e){return t=>Promise.all(t.map(({animation:n,options:s})=>lm(e,n,s)))}function hm(e){let t=fm(e),n=Pi(),s=!0;const r=c=>(d,u)=>{var h;const f=an(e,u,c==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:x,...m}=f;d={...d,...m,...x}}return d};function i(c){t=c(e)}function o(c){const{props:d}=e,u=Tc(e.parent)||{},f=[],h=new Set;let p={},x=1/0;for(let b=0;b<um;b++){const S=dm[b],C=n[S],T=d[S]!==void 0?d[S]:u[S],k=Dn(T),v=S===c?C.isActive:null;v===!1&&(x=b);let j=T===u[S]&&T!==d[S]&&k;if(j&&s&&e.manuallyAnimateOnMount&&(j=!1),C.protectedKeys={...p},!C.isActive&&v===null||!T&&!C.prevProp||js(T)||typeof T=="boolean")continue;const V=mm(C.prevProp,T);let E=V||S===c&&C.isActive&&!j&&k||b>x&&k,_=!1;const y=Array.isArray(T)?T:[T];let D=y.reduce(r(S),{});v===!1&&(D={});const{prevResolvedValues:W={}}=C,te={...W,...D},ue=ne=>{E=!0,h.has(ne)&&(_=!0,h.delete(ne)),C.needsAnimating[ne]=!0;const R=e.getValue(ne);R&&(R.liveStyle=!1)};for(const ne in te){const R=D[ne],B=W[ne];if(p.hasOwnProperty(ne))continue;let M=!1;Fr(R)&&Fr(B)?M=!kc(R,B):M=R!==B,M?R!=null?ue(ne):h.add(ne):R!==void 0&&h.has(ne)?ue(ne):C.protectedKeys[ne]=!0}C.prevProp=T,C.prevResolvedValues=D,C.isActive&&(p={...p,...D}),s&&e.blockInitialAnimation&&(E=!1);const ie=j&&V;E&&(!ie||_)&&f.push(...y.map(ne=>{const R={type:S};if(typeof ne=="string"&&s&&!ie&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,M=an(B,ne);if(B.enteringChildren&&M){const{delayChildren:O}=M.transition||{};R.delay=Cc(B.enteringChildren,e,O)}}return{animation:ne,options:R}}))}if(h.size){const b={};if(typeof d.initial!="boolean"){const S=an(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(b.transition=S.transition)}h.forEach(S=>{const C=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),b[S]=C??null}),f.push({animation:b})}let m=!!f.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(m=!1),s=!1,m?t(f):Promise.resolve()}function a(c,d){var f;if(n[c].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(c,d)}),n[c].isActive=d;const u=o(c);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Pi(),s=!0}}}function mm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kc(t,e):!1}function It(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pi(){return{animate:It(!0),whileInView:It(),whileHover:It(),whileTap:It(),whileDrag:It(),whileFocus:It(),exit:It()}}class Vt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class gm extends Vt{constructor(t){super(t),t.animationState||(t.animationState=hm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();js(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let pm=0;class ym extends Vt{constructor(){super(...arguments),this.id=pm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const xm={animation:{Feature:gm},exit:{Feature:ym}};function Fn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function Un(e){return{point:{x:e.pageX,y:e.pageY}}}const bm=e=>t=>Co(t)&&e(t,Un(t));function An(e,t,n,s){return Fn(e,t,bm(n),s)}const Ec=1e-4,vm=1-Ec,wm=1+Ec,Ac=.01,Sm=0-Ac,Cm=0+Ac;function Ze(e){return e.max-e.min}function km(e,t,n){return Math.abs(e-t)<=n}function Ri(e,t,n,s=.5){e.origin=s,e.originPoint=Ve(t.min,t.max,e.origin),e.scale=Ze(n)/Ze(t),e.translate=Ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vm&&e.scale<=wm||isNaN(e.scale))&&(e.scale=1),(e.translate>=Sm&&e.translate<=Cm||isNaN(e.translate))&&(e.translate=0)}function jn(e,t,n,s){Ri(e.x,t.x,n.x,s?s.originX:void 0),Ri(e.y,t.y,n.y,s?s.originY:void 0)}function Ii(e,t,n){e.min=n.min+t.min,e.max=e.min+Ze(t)}function Tm(e,t,n){Ii(e.x,t.x,n.x),Ii(e.y,t.y,n.y)}function Di(e,t,n){e.min=t.min-n.min,e.max=e.min+Ze(t)}function Nn(e,t,n){Di(e.x,t.x,n.x),Di(e.y,t.y,n.y)}function Qe(e){return[e("x"),e("y")]}const jc=({current:e})=>e?e.ownerDocument.defaultView:null,$i=(e,t)=>Math.abs(e-t);function Em(e,t){const n=$i(e.x,t.x),s=$i(e.y,t.y);return Math.sqrt(n**2+s**2)}class Nc{constructor(t,n,{transformPagePoint:s,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Js(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,x=Em(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!x)return;const{point:m}=h,{timestamp:b}=He;this.history.push({...m,timestamp:b});const{onStart:S,onMove:C}=this.handlers;p||(S&&S(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Xs(p,this.transformPagePoint),je.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:x,onSessionEnd:m,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Js(h.type==="pointercancel"?this.lastMoveEventInfo:Xs(p,this.transformPagePoint),this.history);this.startEvent&&x&&x(h,S),m&&m(h,S)},!Co(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=r||window;const a=Un(t),c=Xs(a,this.transformPagePoint),{point:d}=c,{timestamp:u}=He;this.history=[{...d,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Js(c,this.history)),this.removeListeners=Ln(An(this.contextWindow,"pointermove",this.handlePointerMove),An(this.contextWindow,"pointerup",this.handlePointerUp),An(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),At(this.updatePoint)}}function Xs(e,t){return t?{point:t(e.point)}:e}function Fi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Js({point:e},t){return{point:e,delta:Fi(e,Mc(t)),offset:Fi(e,Am(t)),velocity:jm(t,.1)}}function Am(e){return e[0]}function Mc(e){return e[e.length-1]}function jm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const r=Mc(e);for(;n>=0&&(s=e[n],!(r.timestamp-s.timestamp>at(t)));)n--;if(!s)return{x:0,y:0};const i=dt(r.timestamp-s.timestamp);if(i===0)return{x:0,y:0};const o={x:(r.x-s.x)/i,y:(r.y-s.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Nm(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?Ve(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?Ve(n,e,s.max):Math.min(e,n)),e}function Oi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Mm(e,{top:t,left:n,bottom:s,right:r}){return{x:Oi(e.x,n,r),y:Oi(e.y,t,s)}}function Li(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Vm(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function Pm(e,t){let n=.5;const s=Ze(e),r=Ze(t);return r>s?n=Pn(t.min,t.max-s,e.min):s>r&&(n=Pn(e.min,e.max-r,t.min)),yt(0,1,n)}function Rm(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _r=.35;function Im(e=_r){return e===!1?e=0:e===!0&&(e=_r),{x:_i(e,"left","right"),y:_i(e,"top","bottom")}}function _i(e,t,n){return{min:Bi(e,t),max:Bi(e,n)}}function Bi(e,t){return typeof e=="number"?e:e[t]||0}const Dm=new WeakMap;class $m{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=De(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Un(f).point)},o=(f,h)=>{const{drag:p,dragPropagation:x,onDragStart:m}=this.getProps();if(p&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zf(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qe(S=>{let C=this.getAxisMotionValue(S).get()||0;if(ut.test(C)){const{projection:T}=this.visualElement;if(T&&T.layout){const k=T.layout.layoutBox[S];k&&(C=Ze(k)*(parseFloat(C)/100))}}this.originPoint[S]=C}),m&&je.postRender(()=>m(f,h)),Or(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:x,onDirectionLock:m,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:S}=h;if(x&&this.currentDirection===null){this.currentDirection=Fm(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,S),this.updateAxis("y",h.point,S),this.visualElement.render(),b&&b(f,h)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Qe(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Nc(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:jc(this.visualElement)})}stop(t,n){const s=t||this.latestPointerEvent,r=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!s)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&je.postRender(()=>a(s,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:r}=this.getProps();if(!s||!Qn(t,r,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=Nm(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,r=this.constraints;t&&nn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=Mm(s.layoutBox,t):this.constraints=!1,this.elastic=Im(n),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Qe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rm(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nn(t))return!1;const s=t.current;xt(s!==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=Oh(s,r.root,this.visualElement.getTransformPagePoint());let o=Vm(r.layout.layoutBox,i);if(n){const a=n(Dh(o));this.hasMutatedConstraints=!!a,a&&(o=hc(a))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=Qe(u=>{if(!Qn(u,n,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const h=r?200:1e6,p=r?40:1e7,x={type:"inertia",velocity:s?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,x)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Or(this.visualElement,t),s.start(Ro(t,s,0,n,this.visualElement,!1))}stopAnimation(){Qe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),r=s[n];return r||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Qe(n=>{const{drag:s}=this.getProps();if(!Qn(n,s,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(n);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[n];i.set(t[n]-Ve(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!nn(n)||!s||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Qe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();r[o]=Pm({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Qe(o=>{if(!Qn(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:d}=this.constraints[o];a.set(Ve(c,d,r[o]))})}addListeners(){if(!this.visualElement.current)return;Dm.set(this.visualElement,this);const t=this.visualElement.current,n=An(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps();d&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();nn(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),je.read(s);const o=Fn(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Qe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=_r,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Qn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fm(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Om extends Vt{constructor(t){super(t),this.removeGroupControls=nt,this.removeListeners=nt,this.controls=new $m(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ui=e=>(t,n)=>{e&&je.postRender(()=>e(t,n))};class Lm extends Vt{constructor(){super(...arguments),this.removePointerDownListener=nt}onPointerDown(t){this.session=new Nc(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ui(t),onStart:Ui(n),onMove:s,onEnd:(i,o)=>{delete this.session,r&&je.postRender(()=>r(i,o))}}}mount(){this.removePointerDownListener=An(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 us={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ce.test(e))e=parseFloat(e);else return e;const n=Hi(e,t.target.x),s=Hi(e,t.target.y);return`${n}% ${s}%`}},_m={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=jt.parse(e);if(r.length>5)return s;const i=jt.createTransformer(e),o=typeof r[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;r[0+o]/=a,r[1+o]/=c;const d=Ve(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=d),typeof r[3+o]=="number"&&(r[3+o]/=d),i(r)}};let Qs=!1;class Bm extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:r}=this.props,{projection:i}=t;ch(Um),i&&(n.group&&n.group.add(i),s&&s.register&&r&&s.register(i),Qs&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),us.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:r,isPresent:i}=this.props,{projection:o}=s;return o&&(o.isPresent=i,Qs=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||je.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),So.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:r}=t;Qs=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),s&&s.deregister&&s.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vc(e){const[t,n]=Ql(),s=w.useContext(Qr);return l.jsx(Bm,{...e,layoutGroup:s,switchLayoutGroup:w.useContext(uc),isPresent:t,safeToRemove:n})}const Um={borderRadius:{...vn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vn,borderTopRightRadius:vn,borderBottomLeftRadius:vn,borderBottomRightRadius:vn,boxShadow:_m};function Hm(e,t,n){const s=We(e)?e:cn(e);return s.start(Ro("",s,t,n)),s.animation}const zm=(e,t)=>e.depth-t.depth;class Wm{constructor(){this.children=[],this.isDirty=!1}add(t){no(this.children,t),this.isDirty=!0}remove(t){so(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(zm),this.isDirty=!1,this.children.forEach(t)}}function Zm(e,t){const n=Ge.now(),s=({timestamp:r})=>{const i=r-n;i>=t&&(At(s),e(i-t))};return je.setup(s,!0),()=>At(s)}const Pc=["TopLeft","TopRight","BottomLeft","BottomRight"],Gm=Pc.length,zi=e=>typeof e=="string"?parseFloat(e):e,Wi=e=>typeof e=="number"||ce.test(e);function Km(e,t,n,s,r,i){r?(e.opacity=Ve(0,n.opacity??1,Ym(s)),e.opacityExit=Ve(t.opacity??1,0,qm(s))):i&&(e.opacity=Ve(t.opacity??1,n.opacity??1,s));for(let o=0;o<Gm;o++){const a=`border${Pc[o]}Radius`;let c=Zi(t,a),d=Zi(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Wi(c)===Wi(d)?(e[a]=Math.max(Ve(zi(c),zi(d),s),0),(ut.test(d)||ut.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=Ve(t.rotate||0,n.rotate||0,s))}function Zi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ym=Rc(0,.5,bl),qm=Rc(.5,.95,nt);function Rc(e,t,n){return s=>s<e?0:s>t?1:n(Pn(e,t,s))}function Gi(e,t){e.min=t.min,e.max=t.max}function Je(e,t){Gi(e.x,t.x),Gi(e.y,t.y)}function Ki(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Yi(e,t,n,s,r){return e-=t,e=ws(e,1/n,s),r!==void 0&&(e=ws(e,1/r,s)),e}function Xm(e,t=0,n=1,s=.5,r,i=e,o=e){if(ut.test(t)&&(t=parseFloat(t),t=Ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Ve(i.min,i.max,s);e===i&&(a-=t),e.min=Yi(e.min,t,n,a,r),e.max=Yi(e.max,t,n,a,r)}function qi(e,t,[n,s,r],i,o){Xm(e,t[n],t[s],t[r],t.scale,i,o)}const Jm=["x","scaleX","originX"],Qm=["y","scaleY","originY"];function Xi(e,t,n,s){qi(e.x,t,Jm,n?n.x:void 0,s?s.x:void 0),qi(e.y,t,Qm,n?n.y:void 0,s?s.y:void 0)}function Ji(e){return e.translate===0&&e.scale===1}function Ic(e){return Ji(e.x)&&Ji(e.y)}function Qi(e,t){return e.min===t.min&&e.max===t.max}function eg(e,t){return Qi(e.x,t.x)&&Qi(e.y,t.y)}function ea(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dc(e,t){return ea(e.x,t.x)&&ea(e.y,t.y)}function ta(e){return Ze(e.x)/Ze(e.y)}function na(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class tg{constructor(){this.members=[]}add(t){no(this.members,t),t.scheduleRender()}remove(t){if(so(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let s;for(let r=n;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1){s=i;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ng(e,t,n){let s="";const r=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((r||i||o)&&(s=`translate3d(${r}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:p,skewY:x}=n;d&&(s=`perspective(${d}px) ${s}`),u&&(s+=`rotate(${u}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),p&&(s+=`skewX(${p}deg) `),x&&(s+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const er=["","X","Y","Z"],sg=1e3;let rg=0;function tr(e,t,n,s){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),s&&(s[e]=0))}function $c(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",je,!(r||i))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&$c(s)}function Fc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:r}){return class{constructor(o={},a=t==null?void 0:t()){this.id=rg++,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.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(ag),this.nodes.forEach(ug),this.nodes.forEach(fg),this.nodes.forEach(lg)},this.resolvedRelativeTargetAt=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 Wm)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new oo),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=Jl(o)&&!qf(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,f=0;const h=()=>this.root.updateBlockedByResize=!1;je.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,u&&u(),u=Zm(h,250),us.hasAnimatedSinceResize&&(us.hasAnimatedSinceResize=!1,this.nodes.forEach(oa)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||yg,{onLayoutAnimationStart:m,onLayoutAnimationComplete:b}=d.getProps(),S=!this.targetLayout||!Dc(this.targetLayout,p),C=!f&&h;if(this.options.layoutRoot||this.resumeFrom||C||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...vo(x,"layout"),onPlay:m,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(u,C)}else f||oa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),At(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(hg),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&&$c(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.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(sa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ra);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dg),this.nodes.forEach(og),this.nodes.forEach(ig)):this.nodes.forEach(ra),this.clearAllSnapshots();const a=Ge.now();He.delta=yt(0,1e3/60,a-He.timestamp),He.timestamp=a,He.isProcessing=!0,Hs.update.process(He),Hs.preRender.process(He),Hs.render.process(He),He.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,So.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cg),this.sharedNodes.forEach(mg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(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.layoutCorrected=De(),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=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(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&&!Ic(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;o&&this.instance&&(a||$t(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)),xg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:o}=this.options;if(!o)return De();const a=o.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(bg))){const{scroll:u}=this.root;u&&(sn(a.x,u.offset.x),sn(a.y,u.offset.y))}return a}removeElementScroll(o){var c;const a=De();if(Je(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&Je(a,o),sn(a.x,f.offset.x),sn(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const c=De();Je(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&&rn(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),$t(u.latestValues)&&rn(c,u.latestValues)}return $t(this.latestValues)&&rn(c,this.latestValues),c}removeTransform(o){const a=De();Je(a,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!$t(d.latestValues))continue;Ir(d.latestValues)&&d.updateSnapshot();const u=De(),f=d.measurePageBox();Je(u,f),Xi(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,u)}return $t(this.latestValues)&&Xi(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!==He.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;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||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=He.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Nn(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=De(),this.targetWithTransforms=De()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tm(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Je(this.target,this.layout.layoutBox),gc(this.target,this.targetDelta)):Je(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=De(),this.relativeTargetOrigin=De(),Nn(this.relativeTargetOrigin,this.target,p.target),Je(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ir(this.parent.latestValues)||mc(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var x;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===He.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;Je(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Fh(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=De());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ki(this.prevProjectionDelta.x,this.projectionDelta.x),Ki(this.prevProjectionDelta.y,this.projectionDelta.y)),jn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!na(this.projectionDelta.x,this.prevProjectionDelta.x)||!na(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=on(),this.projectionDelta=on(),this.projectionDeltaWithTransform=on()}setAnimationOrigin(o,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=on();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=De(),p=c?c.source:void 0,x=this.layout?this.layout.source:void 0,m=p!==x,b=this.getStack(),S=!b||b.members.length<=1,C=!!(m&&!S&&this.options.crossfade===!0&&!this.path.some(pg));this.animationProgress=0;let T;this.mixTargetDelta=k=>{const v=k/1e3;ia(f.x,o.x,v),ia(f.y,o.y,v),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Nn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),gg(this.relativeTarget,this.relativeTargetOrigin,h,v),T&&eg(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=De()),Je(T,this.relativeTarget)),m&&(this.animationValues=u,Km(u,d,this.latestValues,v,C,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=v},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(At(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=je.update(()=>{us.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=cn(0)),this.currentAnimation=Hm(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},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(sg),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&&Oc(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||De();const f=Ze(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=Ze(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Je(a,c),rn(a,u),jn(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new tg),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(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.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&&tr("z",o,d,this.animationValues);for(let u=0;u<er.length;u++)tr(`rotate${er[u]}`,o,d,this.animationValues),tr(`skew${er[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=ds(a==null?void 0: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=ds(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!$t(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=ng(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:h,y:p}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${p.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 x in $n){if(u[x]===void 0)continue;const{correct:m,applyTo:b,isCSSVariable:S}=$n[x],C=f==="none"?u[x]:m(u[x],d);if(b){const T=b.length;for(let k=0;k<T;k++)o[b[k]]=C}else S?this.options.visualElement.renderState.vars[x]=C:o[x]=C}this.options.layoutId&&(o.pointerEvents=d===this?ds(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(sa),this.root.sharedNodes.clear()}}}function og(e){e.updateLayout()}function ig(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Qe(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=Ze(h);h.min=s[f].min,h.max=h.min+p}):Oc(i,t.layoutBox,s)&&Qe(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],p=Ze(s[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=on();jn(a,s,t.layoutBox);const c=on();o?jn(c,e.applyTransform(r,!0),t.measuredBox):jn(c,s,t.layoutBox);const d=!Ic(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const x=De();Nn(x,t.layoutBox,h.layoutBox);const m=De();Nn(m,s,p.layoutBox),Dc(x,m)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function ag(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 lg(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cg(e){e.clearSnapshot()}function sa(e){e.clearMeasurements()}function ra(e){e.isLayoutDirty=!1}function dg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ug(e){e.resolveTargetDelta()}function fg(e){e.calcProjection()}function hg(e){e.resetSkewAndRotation()}function mg(e){e.removeLeadSnapshot()}function ia(e,t,n){e.translate=Ve(t.translate,0,n),e.scale=Ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function aa(e,t,n,s){e.min=Ve(t.min,n.min,s),e.max=Ve(t.max,n.max,s)}function gg(e,t,n,s){aa(e.x,t.x,n.x,s),aa(e.y,t.y,n.y,s)}function pg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yg={duration:.45,ease:[.4,0,.1,1]},la=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ca=la("applewebkit/")&&!la("chrome/")?Math.round:nt;function da(e){e.min=ca(e.min),e.max=ca(e.max)}function xg(e){da(e.x),da(e.y)}function Oc(e,t,n){return e==="position"||e==="preserve-aspect"&&!km(ta(t),ta(n),.2)}function bg(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const vg=Fc({attachResizeListener:(e,t)=>Fn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nr={current:void 0},Lc=Fc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nr.current){const e=new vg({});e.mount(window),e.setOptions({layoutScroll:!0}),nr.current=e}return nr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wg={pan:{Feature:Lm},drag:{Feature:Om,ProjectionNode:Lc,MeasureLayout:Vc}};function ua(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,i=s[r];i&&je.postRender(()=>i(t,Un(t)))}class Sg extends Vt{mount(){const{current:t}=this.node;t&&(this.unmount=Wf(t,(n,s)=>(ua(this.node,s,"Start"),r=>ua(this.node,r,"End"))))}unmount(){}}class Cg extends Vt{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=Ln(Fn(this.node.current,"focus",()=>this.onFocus()),Fn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),i=s[r];i&&je.postRender(()=>i(t,Un(t)))}class kg extends Vt{mount(){const{current:t}=this.node;t&&(this.unmount=Yf(t,(n,s)=>(fa(this.node,s,"Start"),(r,{success:i})=>fa(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Br=new WeakMap,sr=new WeakMap,Tg=e=>{const t=Br.get(e.target);t&&t(e)},Eg=e=>{e.forEach(Tg)};function Ag({root:e,...t}){const n=e||document;sr.has(n)||sr.set(n,{});const s=sr.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Eg,{root:e,...t})),s[r]}function jg(e,t,n){const s=Ag(t);return Br.set(e,n),s.observe(e),()=>{Br.delete(e),s.unobserve(e)}}const Ng={some:0,all:1};class Mg extends Vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Ng[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:f}=this.node.getProps(),h=d?u:f;h&&h(c)};return jg(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Vg(t,n))&&this.startObserver()}unmount(){}}function Vg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Pg={inView:{Feature:Mg},tap:{Feature:kg},focus:{Feature:Cg},hover:{Feature:Sg}},Rg={layout:{ProjectionNode:Lc,MeasureLayout:Vc}},Ig={...xm,...Pg,...wg,...Rg},le=Ih(Ig,Gh),lt=g.forwardRef((e,t)=>{const{alt:n,color:s="currentColor",size:r="1em",weight:i="regular",mirrored:o=!1,children:a,weights:c,...d}=e;return g.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:s,viewBox:"0 0 256 256",transform:o?"scale(-1, 1)":void 0,...d},!!n&&g.createElement("title",null,n),a,c.get(i))});lt.displayName="SSRBase";const Dg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),g.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),Io=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Dg}));Io.displayName="CaretDownIcon";const $g=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),g.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),_c=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:$g}));_c.displayName="CaretUpIcon";const Fg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Bc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Fg}));Bc.displayName="ChatTextIcon";const Og=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),g.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Uc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Og}));Uc.displayName="CheckIcon";const Lg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),g.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),Hc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Lg}));Hc.displayName="MicrophoneIcon";const _g=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),g.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),zc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:_g}));zc.displayName="MicrophoneSlashIcon";const Bg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),g.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),Wc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Bg}));Wc.displayName="MonitorArrowUpIcon";const Ug=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),g.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Do=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Ug}));Do.displayName="SpinnerIcon";const Hg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),Zc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:Hg}));Zc.displayName="VideoCameraIcon";const zg=new Map([["bold",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",g.createElement(g.Fragment,null,g.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",g.createElement(g.Fragment,null,g.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",g.createElement(g.Fragment,null,g.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",g.createElement(g.Fragment,null,g.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",g.createElement(g.Fragment,null,g.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Gc=g.forwardRef((e,t)=>g.createElement(lt,{ref:t,...e,weights:zg}));Gc.displayName="VideoCameraSlashIcon";function ha(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Wg(...e){return t=>{let n=!1;const s=e.map(r=>{const i=ha(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():ha(e[r],null)}}}}function Zg(e){const t=Kg(e),n=g.forwardRef((s,r)=>{const{children:i,...o}=s,a=g.Children.toArray(i),c=a.find(qg);if(c){const d=c.props.children,u=a.map(f=>f===c?g.Children.count(d)>1?g.Children.only(null):g.isValidElement(d)?d.props.children:null:f);return l.jsx(t,{...o,ref:r,children:g.isValidElement(d)?g.cloneElement(d,void 0,u):null})}return l.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var Gg=Zg("Slot");function Kg(e){const t=g.forwardRef((n,s)=>{const{children:r,...i}=n;if(g.isValidElement(r)){const o=Jg(r),a=Xg(i,r.props);return r.type!==g.Fragment&&(a.ref=s?Wg(s,o):o),g.cloneElement(r,a)}return g.Children.count(r)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yg=Symbol("radix.slottable");function qg(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yg}function Xg(e,t){const n={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?n[s]=(...a)=>{const c=i(...a);return r(...a),c}:r&&(n[s]=r):s==="style"?n[s]={...r,...i}:s==="className"&&(n[s]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Jg(e){var s,r;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $o="-",Qg=e=>{const t=tp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const a=o.split($o);return a[0]===""&&a.length!==1&&a.shift(),Kc(a,t)||ep(o)},getConflictingClassGroupIds:(o,a)=>{const c=n[o]||[];return a&&s[o]?[...c,...s[o]]:c}}},Kc=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),r=s?Kc(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join($o);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},ma=/^\[(.+)\]$/,ep=e=>{if(ma.test(e)){const t=ma.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},tp=e=>{const{theme:t,classGroups:n}=e,s={nextPart:new Map,validators:[]};for(const r in n)Ur(n[r],s,r,t);return s},Ur=(e,t,n,s)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:ga(t,r);i.classGroupId=n;return}if(typeof r=="function"){if(np(r)){Ur(r(s),t,n,s);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([i,o])=>{Ur(o,ga(t,i),n,s)})})},ga=(e,t)=>{let n=e;return t.split($o).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},np=e=>e.isThemeGetter,sp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const r=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,s=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return r(i,o),o},set(i,o){n.has(i)?n.set(i,o):r(i,o)}}},Hr="!",zr=":",rp=zr.length,op=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=r=>{const i=[];let o=0,a=0,c=0,d;for(let x=0;x<r.length;x++){let m=r[x];if(o===0&&a===0){if(m===zr){i.push(r.slice(c,x)),c=x+rp;continue}if(m==="/"){d=x;continue}}m==="["?o++:m==="]"?o--:m==="("?a++:m===")"&&a--}const u=i.length===0?r:r.substring(c),f=ip(u),h=f!==u,p=d&&d>c?d-c:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}};if(t){const r=t+zr,i=s;s=o=>o.startsWith(r)?i(o.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const r=s;s=i=>n({className:i,parseClassName:r})}return s},ip=e=>e.endsWith(Hr)?e.substring(0,e.length-1):e.startsWith(Hr)?e.substring(1):e,ap=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let i=[];return s.forEach(o=>{o[0]==="["||t[o]?(r.push(...i.sort(),o),i=[]):i.push(o)}),r.push(...i.sort()),r}},lp=e=>({cache:sp(e.cacheSize),parseClassName:op(e),sortModifiers:ap(e),...Qg(e)}),cp=/\s+/,dp=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:i}=t,o=[],a=e.trim().split(cp);let c="";for(let d=a.length-1;d>=0;d-=1){const u=a[d],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:m}=n(u);if(f){c=u+(c.length>0?" "+c:c);continue}let b=!!m,S=s(b?x.substring(0,m):x);if(!S){if(!b){c=u+(c.length>0?" "+c:c);continue}if(S=s(x),!S){c=u+(c.length>0?" "+c:c);continue}b=!1}const C=i(h).join(":"),T=p?C+Hr:C,k=T+S;if(o.includes(k))continue;o.push(k);const v=r(S,b);for(let j=0;j<v.length;++j){const V=v[j];o.push(T+V)}c=u+(c.length>0?" "+c:c)}return c};function up(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yc(t))&&(s&&(s+=" "),s+=n);return s}const Yc=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Yc(e[s]))&&(n&&(n+=" "),n+=t);return n};function fp(e,...t){let n,s,r,i=o;function o(c){const d=t.reduce((u,f)=>f(u),e());return n=lp(d),s=n.cache.get,r=n.cache.set,i=a,a(c)}function a(c){const d=s(c);if(d)return d;const u=dp(c,n);return r(c,u),u}return function(){return i(up.apply(null,arguments))}}const Ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hp=/^\d+\/\d+$/,mp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gt=e=>hp.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),St=e=>!!e&&Number.isInteger(Number(e)),rr=e=>e.endsWith("%")&&he(e.slice(0,-1)),ht=e=>mp.test(e),bp=()=>!0,vp=e=>gp.test(e)&&!pp.test(e),Jc=()=>!1,wp=e=>yp.test(e),Sp=e=>xp.test(e),Cp=e=>!X(e)&&!J(e),kp=e=>yn(e,td,Jc),X=e=>qc.test(e),Dt=e=>yn(e,nd,vp),or=e=>yn(e,Np,he),pa=e=>yn(e,Qc,Jc),Tp=e=>yn(e,ed,Sp),es=e=>yn(e,sd,wp),J=e=>Xc.test(e),wn=e=>xn(e,nd),Ep=e=>xn(e,Mp),ya=e=>xn(e,Qc),Ap=e=>xn(e,td),jp=e=>xn(e,ed),ts=e=>xn(e,sd,!0),yn=(e,t,n)=>{const s=qc.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},xn=(e,t,n=!1)=>{const s=Xc.exec(e);return s?s[1]?t(s[1]):n:!1},Qc=e=>e==="position"||e==="percentage",ed=e=>e==="image"||e==="url",td=e=>e==="length"||e==="size"||e==="bg-size",nd=e=>e==="length",Np=e=>e==="number",Mp=e=>e==="family-name",sd=e=>e==="shadow",Vp=()=>{const e=Ue("color"),t=Ue("font"),n=Ue("text"),s=Ue("font-weight"),r=Ue("tracking"),i=Ue("leading"),o=Ue("breakpoint"),a=Ue("container"),c=Ue("spacing"),d=Ue("radius"),u=Ue("shadow"),f=Ue("inset-shadow"),h=Ue("text-shadow"),p=Ue("drop-shadow"),x=Ue("blur"),m=Ue("perspective"),b=Ue("aspect"),S=Ue("ease"),C=Ue("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...k(),J,X],j=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],E=()=>[J,X,c],_=()=>[Gt,"full","auto",...E()],y=()=>[St,"none","subgrid",J,X],D=()=>["auto",{span:["full",St,J,X]},St,J,X],W=()=>[St,"auto",J,X],te=()=>["auto","min","max","fr",J,X],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],fe=()=>["auto",...E()],ne=()=>[Gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],R=()=>[e,J,X],B=()=>[...k(),ya,pa,{position:[J,X]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",Ap,kp,{size:[J,X]}],q=()=>[rr,wn,Dt],Y=()=>["","none","full",d,J,X],U=()=>["",he,wn,Dt],re=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[he,rr,ya,pa],L=()=>["","none",x,J,X],N=()=>["none",he,J,X],F=()=>["none",he,J,X],se=()=>[he,J,X],A=()=>[Gt,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ht],breakpoint:[ht],color:[bp],container:[ht],"drop-shadow":[ht],ease:["in","out","in-out"],font:[Cp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ht],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ht],shadow:[ht],spacing:["px",he],text:[ht],"text-shadow":[ht],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gt,X,J,b]}],container:["container"],columns:[{columns:[he,X,J,a]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[St,"auto",J,X]}],basis:[{basis:[Gt,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,Gt,"auto","initial","none",X]}],grow:[{grow:["",he,J,X]}],shrink:[{shrink:["",he,J,X]}],order:[{order:[St,"first","last","none",J,X]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:fe()}],mx:[{mx:fe()}],my:[{my:fe()}],ms:[{ms:fe()}],me:[{me:fe()}],mt:[{mt:fe()}],mr:[{mr:fe()}],mb:[{mb:fe()}],ml:[{ml:fe()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[a,"screen",...ne()]}],"min-w":[{"min-w":[a,"screen","none",...ne()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,wn,Dt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,J,or]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rr,X]}],"font-family":[{font:[Ep,X,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,J,X]}],"line-clamp":[{"line-clamp":[he,"none",J,or]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",J,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",J,Dt]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[he,"auto",J,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},St,J,X],radial:["",J,X],conic:[St,J,X]},jp,Tp]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,J,X]}],"outline-w":[{outline:["",he,wn,Dt]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",u,ts,es]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",f,ts,es]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[he,Dt]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,ts,es]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[he,J,X]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[J,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,X]}],filter:[{filter:["","none",J,X]}],blur:[{blur:L()}],brightness:[{brightness:[he,J,X]}],contrast:[{contrast:[he,J,X]}],"drop-shadow":[{"drop-shadow":["","none",p,ts,es]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",he,J,X]}],"hue-rotate":[{"hue-rotate":[he,J,X]}],invert:[{invert:["",he,J,X]}],saturate:[{saturate:[he,J,X]}],sepia:[{sepia:["",he,J,X]}],"backdrop-filter":[{"backdrop-filter":["","none",J,X]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[he,J,X]}],"backdrop-contrast":[{"backdrop-contrast":[he,J,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,J,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,J,X]}],"backdrop-invert":[{"backdrop-invert":["",he,J,X]}],"backdrop-opacity":[{"backdrop-opacity":[he,J,X]}],"backdrop-saturate":[{"backdrop-saturate":[he,J,X]}],"backdrop-sepia":[{"backdrop-sepia":["",he,J,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",J,X]}],ease:[{ease:["linear","initial",S,J,X]}],delay:[{delay:[he,J,X]}],animate:[{animate:["none",C,J,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,J,X]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:N()}],"rotate-x":[{"rotate-x":N()}],"rotate-y":[{"rotate-y":N()}],"rotate-z":[{"rotate-z":N()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[J,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:A()}],"translate-x":[{"translate-x":A()}],"translate-y":[{"translate-y":A()}],"translate-z":[{"translate-z":A()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J,X]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J,X]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[he,wn,Dt,or]}],stroke:[{stroke:["none",...R()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pp=fp(Vp);function Q(...e){return Pp(Xr.clsx(e))}const Rp=qr.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ip({className:e,variant:t,size:n,asChild:s=!1,...r}){const i=s?Gg:"button";return l.jsx(i,{"data-slot":"button",className:Q(Rp({variant:t,size:n,className:e})),...r})}const Dp=qr.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function rd({className:e,variant:t,size:n,...s}){return l.jsx(tu.Root,{"data-slot":"toggle",className:Q(Dp({variant:t,size:n,className:e})),...s})}function $p(e){const[t,n]=w.useState(()=>e.getPublishPermissions());return w.useEffect(()=>{const s=()=>{n(e.getPublishPermissions())},r=()=>{s()};return e.on("connection.connected",r),e.on("connection.disconnected",r),()=>{e.off("connection.connected",r),e.off("connection.disconnected",r)}},[e]),t}function od(e){const[t,n]=w.useState(()=>e.getLocalParticipant()),[s,r]=w.useState(()=>e.getMicrophoneTrack());return w.useEffect(()=>{const i=()=>{const a=e.getLocalParticipant(),c=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!c,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),r(c)};i(),e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("track.muted",i),e.on("track.unmuted",i);const o=e.getRoom();if(o){const a=()=>{console.log("🎤 Track published, updating participant state"),i()},c=()=>{console.log("🎤 Track unpublished, updating participant state"),i()};return o.on("localTrackPublished",a),o.on("localTrackUnpublished",c),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i),o.off("localTrackPublished",a),o.off("localTrackUnpublished",c)}}else return()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("track.muted",i),e.off("track.unmuted",i)}},[e]),{localParticipant:t,microphoneTrack:s}}function Mn(e,t,n){const[s,r]=w.useState(!1),[i,o]=w.useState(!1);return w.useEffect(()=>{const c=()=>{let d=!1;switch(t){case"microphone":d=e.isMicrophoneEnabled;break;case"camera":d=e.isCameraEnabled;break;case"screenShare":d=e.isScreenShareEnabled;break}console.log(`useVoxketTrackToggle: ${t} enabled state updated to:`,d),r(d)};return c(),e.on("track.muted",c),e.on("track.unmuted",c),e.on("connection.connected",c),()=>{e.off("track.muted",c),e.off("track.unmuted",c),e.off("connection.connected",c)}},[e,t]),{enabled:s,pending:i,toggle:async c=>{var d;try{o(!0);const u=c!==void 0?c:!s;switch(t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?await e.startScreenShare():await e.stopScreenShare();break}}catch(u){(d=n==null?void 0:n.onDeviceError)==null||d.call(n,u)}finally{o(!1)}}}}function id(e){const[t,n]=w.useState(()=>e.getRoom()),[s,r]=w.useState(()=>e.getConnectionState());return w.useEffect(()=>{const i=()=>{n(e.getRoom()),r(e.getConnectionState())};return e.on("connection.connected",i),e.on("connection.disconnected",i),e.on("connection.connecting",i),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i),e.off("connection.connecting",i)}},[e]),t}function Fp(e,t){const[n,s]=w.useState([]),[r,i]=w.useState("");return w.useEffect(()=>{var d;const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();s(u)}catch(u){console.error("Failed to load devices:",u)}};a();const c=()=>{a()};return(d=navigator.mediaDevices)==null||d.addEventListener("devicechange",c),()=>{var u;(u=navigator.mediaDevices)==null||u.removeEventListener("devicechange",c)}},[e,t]),{devices:n,activeDeviceId:r,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),i(a)}catch(c){console.error("Failed to set device:",c)}}}}function Op(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:o=>{t||localStorage.setItem("voxket-audio-input-enabled",o.toString())},saveAudioInputDeviceId:o=>{t||localStorage.setItem("voxket-audio-input-device-id",o)},saveVideoInputEnabled:o=>{t||localStorage.setItem("voxket-video-input-enabled",o.toString())},saveVideoInputDeviceId:o=>{t||localStorage.setItem("voxket-video-input-device-id",o)}}}function ad(e){const[t,n]=w.useState(()=>e.getIsAgentConnected()),[s,r]=w.useState(()=>e.getCurrentSession()),[i,o]=w.useState(()=>e.getCurrentAgentInfo()),[a,c]=w.useState(()=>e.getAgentState()),[d,u]=w.useState(()=>e.getAgentAudioTrack()),[f,h]=w.useState(()=>e.getAgentVideoTrack());return w.useEffect(()=>{const p=()=>{const T=e.getIsAgentConnected(),k=e.getCurrentSession(),v=e.getCurrentAgentInfo(),j=e.getAgentState(),V=e.getAgentAudioTrack(),E=e.getAgentVideoTrack();console.log("🤖 useVoxketVoiceAssistant: Updating state:",{isAgentConnected:T,hasSession:!!k,sessionId:k==null?void 0:k.id,hasAgentInfo:!!v,agentState:j,hasAudioTrack:!!V,hasVideoTrack:!!E}),n(T),r(k),o(v),c(j),u(V),h(E)};p();const x=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent connected event"),p()},m=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent disconnected event"),p()},b=()=>{console.log("🤖 useVoxketVoiceAssistant: Session changed event"),p()},S=()=>{console.log("🤖 useVoxketVoiceAssistant: Connection changed event"),p()},C=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent state changed event"),p()};return e.on("agent.connected",x),e.on("agent.speaking",x),e.on("agent.thinking",x),e.on("agent.state.changed",C),e.on("connection.disconnected",m),e.on("session.created",b),e.on("session.ended",b),e.on("session.state.changed",b),e.on("connection.connected",S),()=>{e.off("agent.connected",x),e.off("agent.speaking",x),e.off("agent.thinking",x),e.off("agent.state.changed",C),e.off("connection.disconnected",m),e.off("session.created",b),e.off("session.ended",b),e.off("session.state.changed",b),e.off("connection.connected",S)}},[e]),{agent:{isActive:t,info:i},session:s,state:a,audioTrack:d,videoTrack:f}}function Lp(e){const[t,n]=w.useState(()=>e.getVideoTrackRefs()),[s,r]=w.useState(()=>e.getCameraTrackRefs()),[i,o]=w.useState(()=>e.getScreenShareTrackRefs());return w.useEffect(()=>{const a=()=>{const d=e.getVideoTrackRefs(),u=e.getCameraTrackRefs(),f=e.getScreenShareTrackRefs();console.log("📹 useVoxketVideoTracks: Updating tracks:",{videoCount:d.length,cameraCount:u.length,screenShareCount:f.length}),n(d),r(u),o(f)};a(),e.on("connection.connected",a),e.on("connection.disconnected",a),e.on("track.muted",a),e.on("track.unmuted",a),e.on("participant.joined",a),e.on("participant.left",a);const c=e.getRoom();if(c){const d=()=>{console.log("📹 Track event, updating video tracks"),a()};return c.on("localTrackPublished",d),c.on("localTrackUnpublished",d),c.on("trackPublished",d),c.on("trackUnpublished",d),c.on("trackSubscribed",d),c.on("trackUnsubscribed",d),()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a),c.off("localTrackPublished",d),c.off("localTrackUnpublished",d),c.off("trackPublished",d),c.off("trackUnpublished",d),c.off("trackSubscribed",d),c.off("trackUnsubscribed",d)}}else return()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a)}},[e]),{videoTrackRefs:t,cameraTrackRefs:s,screenShareTrackRefs:i}}function xa({...e}){return l.jsx(tt.Root,{"data-slot":"select",...e})}function ba({...e}){return l.jsx(tt.Value,{"data-slot":"select-value",...e})}function va({className:e,size:t="default",children:n,...s}){return l.jsxs(tt.Trigger,{"data-slot":"select-trigger","data-size":t,className:Q(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","data-[placeholder]:text-muted-foreground","data-[size=default]:h-9 data-[size=sm]:h-8","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...s,children:[n,l.jsx(tt.Icon,{asChild:!0,children:l.jsx(Io,{weight:"bold",className:"size-4 transition-colors"})})]})}function wa({className:e,children:t,position:n="popper",...s}){return l.jsx(tt.Portal,{children:l.jsxs(tt.Content,{"data-slot":"select-content",className:Q(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[l.jsx(_p,{}),l.jsx(tt.Viewport,{className:Q("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),l.jsx(Bp,{})]})})}function Sa({className:e,children:t,...n}){return l.jsxs(tt.Item,{"data-slot":"select-item",className:Q(["relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[l.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:l.jsx(tt.ItemIndicator,{children:l.jsx(Uc,{className:"size-4",weight:"bold"})})}),l.jsx(tt.ItemText,{children:t})]})}function _p({className:e,...t}){return l.jsx(tt.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(_c,{className:"size-4",weight:"bold"})})}function Bp({className:e,...t}){return l.jsx(tt.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:Q("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Io,{className:"size-4",weight:"bold"})})}const Ca=qr.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function ka({kind:e,track:t,requestPermissions:n,onError:s,client:r,...i}){const o=i.size||"default";if(!r)return l.jsxs(xa,{disabled:!0,children:[l.jsx(va,{className:Q(Ca({size:o}),i.className),children:l.jsx(ba,{placeholder:`Select a ${e}`})}),l.jsx(wa,{children:l.jsx(Sa,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:c,setActiveMediaDevice:d}=Fp(r,e==="audioinput"?"audioinput":"videoinput");return l.jsxs(xa,{value:c,onValueChange:d,children:[l.jsx(va,{className:Q(Ca({size:o}),i.className,"hover:bg"),children:o!=="sm"&&l.jsx(ba,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),l.jsx(wa,{children:a.map(u=>l.jsx(Sa,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Up(e,t,n=!1){if(n)return Do;switch(e){case K.Track.Source.Microphone:return t?Hc:zc;case K.Track.Source.Camera:return t?Zc:Gc;case K.Track.Source.ScreenShare:return Wc;default:return g.Fragment}}function ir({source:e,pressed:t,pending:n,className:s,...r}){const i=Up(e,t??!1,n),o=e===K.Track.Source.Microphone&&!(t??!1)&&!n,a=e===K.Track.Source.Camera&&!(t??!1)&&!n;return g.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),l.jsxs(rd,{pressed:t,"aria-label":`Toggle ${e}`,className:Q(s),...r,children:[l.jsx(i,{weight:"bold",className:Q(n&&"animate-spin",o||a?"text-red-500":void 0)}),r.children]})}function Hp(e){return e?$p(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function zp(e={}){const{controls:t,saveUserChoices:n=!0,client:s}=e,r={leave:!0,...t};if(!s)return{micTrackRef:{participant:void 0,source:K.Track.Source.Microphone,publication:void 0},visibleControls:r,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:i,localParticipant:o}=od(s),a=Hp(s);id(s);const c=Mn(s,"microphone",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.Microphone,error:j})}}),d=Mn(s,"camera",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.Camera,error:j})}}),u=Mn(s,"screenShare",{onDeviceError:j=>{var V;return(V=e.onDeviceError)==null?void 0:V.call(e,{source:K.Track.Source.ScreenShare,error:j})}}),f=g.useMemo(()=>{let j;if(o){for(const[,V]of o.trackPublications)if(V.source===K.Track.Source.Microphone){j=V;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!o,hasPublication:!!j,isTrackSubscribed:j==null?void 0:j.isSubscribed,isMuted:j==null?void 0:j.isMuted,trackSid:j==null?void 0:j.trackSid}),{participant:o??void 0,source:K.Track.Source.Microphone,publication:j}},[o,i]);r.microphone??(r.microphone=a.microphone),r.screenShare??(r.screenShare=a.screenShare),r.camera??(r.camera=a.camera),r.chat??(r.chat=a.data);const{saveAudioInputEnabled:h,saveAudioInputDeviceId:p,saveVideoInputEnabled:x,saveVideoInputDeviceId:m}=Op({preventSave:!n}),b=g.useCallback(()=>{s&&s.disconnect()},[s]),S=g.useCallback(j=>{p(j??"default"),s&&s.setAudioInputDevice(j)},[p,s]),C=g.useCallback(j=>{m(j??"default"),s&&s.setVideoInputDevice(j)},[m,s]),T=g.useCallback(async j=>{u.enabled&&await u.toggle(!1),await d.toggle(j),x(!d.enabled)},[d,x,u]),k=g.useCallback(async j=>{await c.toggle(j),h(!c.enabled)},[c,h]),v=g.useCallback(async j=>{d.enabled&&await d.toggle(!1),await u.toggle(j)},[d,u]);return{micTrackRef:f,visibleControls:r,cameraToggle:{...d,toggle:T},microphoneToggle:{...c,toggle:k},screenShareToggle:{...u,toggle:v},handleDisconnect:b,handleAudioDeviceChange:S,handleVideoDeviceChange:C}}const Wp={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden relative rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Zp={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden relative shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Gp={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden relative",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Ta={dark:Wp,light:Zp,vox:Gp};function _e(e){return Ta[e]||Ta.vox}function Kp({onSend:e,disabled:t=!1,className:n,placeholder:s="Type a message..."}){const[r,i]=g.useState(""),[o,a]=g.useState(!1),c=async u=>{if(u.preventDefault(),r.trim()&&!t&&!o){a(!0);try{await e(r.trim()),i("")}catch(f){console.error("Failed to send message:",f)}finally{a(!1)}}},d=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),c(u))};return l.jsxs("form",{onSubmit:c,className:Q("flex w-full",n),children:[l.jsx("input",{type:"text",value:r,onChange:u=>i(u.target.value),onKeyDown:d,disabled:t||o,placeholder:s,className:"flex-1 px-2 py-1 text-sm bg-transparent border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50"}),l.jsx(Ip,{type:"submit",size:"sm",disabled:!r.trim()||t||o,className:"ml-2 px-2 py-1 text-xs",children:o?"...":"Send"})]})}function Yp({controls:e,saveUserChoices:t=!0,capabilities:n,className:s,onSendMessage:r,onChatOpenChange:i,onDisconnect:o,onDeviceError:a,theme:c="vox",client:d,...u}){const[f,h]=g.useState(!1),[p,x]=g.useState(!1),m=_e(c),{micTrackRef:b,visibleControls:S,cameraToggle:C,microphoneToggle:T,screenShareToggle:k,handleAudioDeviceChange:v,handleVideoDeviceChange:j,handleDisconnect:V}=zp({controls:e,saveUserChoices:t,client:d}),E=async _=>{x(!0);try{await(r==null?void 0:r(_))}finally{x(!1)}};return g.useEffect(()=>{i==null||i(f)},[f,i]),g.useEffect(()=>{var _,y,D,W;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!b.participant,hasPublication:!!b.publication,source:b.source,isSubscribed:(_=b.publication)==null?void 0:_.isSubscribed,isMuted:(y=b.publication)==null?void 0:y.isMuted,trackSid:(D=b.publication)==null?void 0:D.trackSid,hasTrack:!!((W=b.publication)!=null&&W.track)})},[b]),l.jsxs("div",{"aria-label":"Voice assistant controls",className:Q(m.controlBar,s),...u,children:[n.suportsChatInput&&l.jsxs("div",{"data-inert":f?void 0:"true",className:Q("overflow-hidden transition-[height] relative duration-300 ease-in-out",f?"h-[56px] mb-2":"h-0"),children:[l.jsx("div",{className:"flex h-8 px-3 w-full",children:l.jsx(Kp,{onSend:E,disabled:p,className:Q("w-full",m.chatInput),placeholder:"Type a message..."})}),l.jsx("hr",{className:"border-border my-1 mx-3"})]}),l.jsxs("div",{className:Q("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-1",c==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[l.jsxs("div",{className:"flex gap-y-2 justify-start",children:[S.microphone&&l.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[l.jsx(ir,{variant:"primary",source:K.Track.Source.Microphone,pressed:T.enabled,disabled:T.pending,onPressedChange:T.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),l.jsx(Ke.BarVisualizer,{barCount:3,trackRef:b,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:l.jsx("span",{className:Q(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),l.jsx(ka,{size:"sm",kind:"audioinput",client:d,onError:a?_=>_ instanceof Error?a({source:K.Track.Source.Microphone,error:_}):void 0:void 0,onActiveDeviceChange:v,className:Q(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&S.camera&&l.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[l.jsx(ir,{variant:"primary",source:K.Track.Source.Camera,pressed:C.enabled,pending:C.pending,disabled:C.pending,onPressedChange:C.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),l.jsx(ka,{size:"sm",kind:"videoinput",client:d,onError:a?_=>_ instanceof Error?a({source:K.Track.Source.Camera,error:_}):void 0:void 0,onActiveDeviceChange:j,className:Q(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&S.screenShare&&l.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:l.jsx(ir,{variant:"secondary",source:K.Track.Source.ScreenShare,pressed:k.enabled,disabled:k.pending,onPressedChange:k.toggle,className:"w-auto py-1 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),S.chat&&l.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:l.jsx(rd,{variant:"secondary","aria-label":"Toggle chat",pressed:f,onPressedChange:_=>{h(_)},className:"aspect-square h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:l.jsx(Bc,{weight:"bold",className:"h-4 w-4"})})})]})]})}const ld=w.forwardRef(({state:e,audioTrack:t,className:n},s)=>l.jsx("div",{ref:s,className:Q("",n),children:t?l.jsx(Ke.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:Q("flex aspect-video w-40 items-center justify-center gap-1"),children:l.jsx("span",{className:Q(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})}):l.jsx("div",{className:Q("flex aspect-video w-40 items-center justify-center"),children:l.jsx("div",{className:"flex flex-col items-center justify-center",children:l.jsx("div",{className:"flex gap-1",children:Array.from({length:5}).map((r,i)=>l.jsx("span",{className:Q(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear",e==="speaking"&&"animate-pulse bg-[#5c64f6]",e==="thinking"&&"animate-pulse bg-yellow-500"])},i))})})})}));ld.displayName="AgentTile";const qp=({videoTrack:e,className:t,ref:n})=>{var s,r;return!e||!e.publication||!e.participant?l.jsx("div",{ref:n,className:Q(t),children:l.jsx("div",{className:"w-full h-full bg-gray-200 rounded-md flex items-center justify-center",children:l.jsx("span",{className:"text-gray-500",children:"No video available"})})}):l.jsx("div",{ref:n,className:Q(t),children:l.jsx(Ke.VideoTrack,{trackRef:e,width:((s=e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e.publication.dimensions)==null?void 0:r.height)??0,className:"rounded-md"})})},Xp=le.create(Ke.VideoTrack),Jp=({trackRef:e,className:t,ref:n})=>{var s,r;return l.jsx("div",{className:Q("bg-muted overflow-hidden rounded-md",t),children:l.jsx(Xp,{ref:n,trackRef:e,width:((s=e==null?void 0:e.publication.dimensions)==null?void 0:s.width)??0,height:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.height)??0,className:Q("h-full w-auto")})})},Ea=le.create(Jp),Qp=le.create(ld),e0=le.create(qp),mt={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},Kt={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function t0(e,t){const{localParticipant:n}=od(t),s=n==null?void 0:n.getTrackPublication(e);return w.useMemo(()=>s&&n?{source:e,participant:n,publication:s}:void 0,[e,s,n])}function n0({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:s,state:r="idle",audioTrack:i,videoTrack:o}=t?ad(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=Ke.useTracks([K.Track.Source.ScreenShare]),c=t0(K.Track.Source.Camera,t),d=c&&!c.publication.isMuted,u=a&&!a.publication.isMuted,f=d||u,h=n||s&&s.state==="active",p={...mt.transition,delay:e?0:.15},x={...mt.animate,scale:e?1:3,transition:p},m={...mt.animate,transition:p},b=p,S=p,C=o&&o.publication&&o.participant;return l.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:l.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:l.jsxs("div",{className:Q(Kt.grid),children:[h&&l.jsx("div",{className:Q(["grid",!e&&Kt.agentChatClosed,e&&f&&Kt.agentChatOpenWithSecondTile,e&&!f&&Kt.agentChatOpenWithoutSecondTile]),children:l.jsxs("div",{className:"h-full flex items-center justify-center",children:[!C&&l.jsx(Qp,{layoutId:"agent",...mt,animate:x,transition:b,state:r,audioTrack:i||void 0,className:Q(e?"h-[90px]":"h-auto w-full")},"agent"),C&&o&&l.jsx(e0,{layoutId:"avatar",...mt,animate:m,transition:S,videoTrack:o,className:Q(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),l.jsx("div",{className:Q(["grid",e&&Kt.secondTileChatOpen,!e&&Kt.secondTileChatClosed]),children:l.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[c&&d&&l.jsx(Ea,{layout:"position",layoutId:"camera",...mt,trackRef:c,transition:{...mt.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&l.jsx(Ea,{layout:"position",layoutId:"screen",...mt,trackRef:a,transition:{...mt.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}function Aa({timeout:e}){const[t,n]=w.useState(100),s=w.useRef(null),r=w.useRef(null);return w.useEffect(()=>{if(!e||e<=0)return;n(100),r.current=Date.now();const i=()=>{if(!e||r.current===null)return;const o=Date.now()-r.current,a=Math.max(0,100-o/e*100);n(a),a>0&&(s.current=requestAnimationFrame(i))};return s.current=requestAnimationFrame(i),()=>{s.current&&cancelAnimationFrame(s.current)}},[e]),!e||e<=0?null:l.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:l.jsx(le.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function un({interaction:e,theme:t,onDismiss:n,client:s,addLocalMessage:r}){var a;if(!e||!e.isVisible||!e.component)return null;const[i]=g.useState(()=>Date.now()),o=()=>e.component?g.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async d=>{console.log("InteractiveComponent: Loading data:",d)},presentationMode:e.presentationMode,data:e.data,client:s,addLocalMessage:r}):l.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return l.jsx(Et,{children:l.jsxs(le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx(Aa,{timeout:e.timeout}),l.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[l.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase())}),l.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:l.jsx($e.X,{className:"w-5 h-5"})})]})]}),l.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o()})]})});case"embedded":default:return l.jsx(Et,{children:l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:l.jsxs("div",{children:[l.jsx(Aa,{timeout:e.timeout}),o()]})})})}}const s0=({logLevel:e}={})=>{const t=Ke.useRoomContext();g.useEffect(()=>(K.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},ja=e=>e,r0=()=>{let e=ja;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ja}}},o0=r0();function Nt(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Minified MUI error #${e}; visit ${n} for the full message.`}function zt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Nt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function i0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ns={exports:{}},ss={exports:{}},pe={};/** @license React v16.13.1
29
+ `),()=>{p.contains(g)&&p.removeChild(g)}},[t]),f.jsx(r0,{isPresent:t,childRef:s,sizeRef:o,children:x.cloneElement(e,{ref:s})})}const o0=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,root:l})=>{const c=Os(s0),u=j.useId();let d=!0,h=j.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:m=>{c.set(m,!0);for(const g of c.values())if(!g)return;r&&r()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[n,c,r]);return s&&d&&(h={...h}),j.useMemo(()=>{c.forEach((m,g)=>c.set(g,!1))},[n]),x.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),o==="popLayout"&&(e=f.jsx(i0,{isPresent:n,anchorX:a,root:l,children:e})),f.jsx(Mi.Provider,{value:h,children:e})};function s0(){return new Map}function Gd(e=!0){const t=j.useContext(Mi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=j.useId();j.useEffect(()=>{if(e)return i(s)},[e]);const o=j.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const Zr=e=>e.key||"";function El(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const en=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left",root:l})=>{const[c,u]=Gd(o),d=j.useMemo(()=>El(e),[e]),h=o&&!c?[]:d.map(Zr),m=j.useRef(!0),g=j.useRef(d),p=Os(()=>new Map),[b,v]=j.useState(d),[k,S]=j.useState(d);rd(()=>{m.current=!1,g.current=d;for(let C=0;C<k.length;C++){const N=Zr(k[C]);h.includes(N)?p.delete(N):p.get(N)!==!0&&p.set(N,!1)}},[k,h.length,h.join("-")]);const A=[];if(d!==b){let C=[...d];for(let N=0;N<k.length;N++){const P=k[N],L=Zr(P);h.includes(L)||(C.splice(N,0,P),A.push(P))}return s==="wait"&&A.length&&(C=A),S(El(C)),v(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&k.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:T}=j.useContext(Ls);return f.jsx(f.Fragment,{children:k.map(C=>{const N=Zr(C),P=o&&!c?!1:d===k||h.includes(N),L=()=>{if(p.has(N))p.set(N,!0);else return;let y=!0;p.forEach(M=>{M||(y=!1)}),y&&(T==null||T(),S(g.current),o&&(u==null||u()),r&&r())};return f.jsx(o0,{isPresent:P,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:P?void 0:L,anchorX:a,children:C},N)})})},Kd=j.createContext({strict:!1}),Tl={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"]},qn={};for(const e in Tl)qn[e]={isEnabled:t=>Tl[e].some(n=>!!t[n])};function a0(e){for(const t in e)qn[t]={...qn[t],...e[t]}}const l0=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 bi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||l0.has(e)}let Yd=e=>!bi(e);function c0(e){typeof e=="function"&&(Yd=t=>t.startsWith("on")?!bi(t):e(t))}try{c0(require("@emotion/is-prop-valid").default)}catch{}function u0(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Yd(i)||n===!0&&bi(i)||!t&&!bi(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Ni=j.createContext({});function Ii(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Tr(e){return typeof e=="string"||Array.isArray(e)}const la=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ca=["initial",...la];function Ri(e){return Ii(e.animate)||ca.some(t=>Tr(e[t]))}function Xd(e){return!!(Ri(e)||e.variants)}function d0(e,t){if(Ri(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Tr(n)?n:void 0,animate:Tr(r)?r:void 0}}return e.inherit!==!1?t:{}}function f0(e){const{initial:t,animate:n}=d0(e,j.useContext(Ni));return j.useMemo(()=>({initial:t,animate:n}),[Al(t),Al(n)])}function Al(e){return Array.isArray(e)?e.join(" "):e}const Ar={};function h0(e){for(const t in e)Ar[t]=e[t],qs(t)&&(Ar[t].isCSSVariable=!0)}function Qd(e,{layout:t,layoutId:n}){return Jn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ar[e]||e==="opacity")}const m0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},p0=Qn.length;function g0(e,t,n){let r="",i=!0;for(let s=0;s<p0;s++){const o=Qn[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=zd(a,ia[o]);if(!l){i=!1;const u=m0[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ua(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Jn.has(l)){o=!0;continue}else if(qs(l)){i[l]=c;continue}else{const u=zd(c,ia[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=g0(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const da=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jd(e,t,n){for(const r in t)!ot(t[r])&&!Qd(r,n)&&(e[r]=t[r])}function y0({transformTemplate:e},t){return j.useMemo(()=>{const n=da();return ua(n,t,e),Object.assign({},n.vars,n.style)},[t])}function x0(e,t){const n=e.style||{},r={};return Jd(r,n,e),Object.assign(r,y0(e,t)),r}function b0(e,t){const n={},r=x0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const v0={offset:"stroke-dashoffset",array:"stroke-dasharray"},w0={offset:"strokeDashoffset",array:"strokeDasharray"};function k0(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?v0:w0;e[s.offset]=ye.transform(-r);const o=ye.transform(t),a=ye.transform(n);e[s.array]=`${o} ${a}`}function ef(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(ua(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&k0(d,i,s,o,!1)}const tf=()=>({...da(),attrs:{}}),nf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function S0(e,t,n,r){const i=j.useMemo(()=>{const s=tf();return ef(s,t,nf(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Jd(s,e.style,e),i.style={...s,...i.style}}return i}const C0=["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 fa(e){return typeof e!="string"||e.includes("-")?!1:!!(C0.indexOf(e)>-1||/[A-Z]/u.test(e))}function E0(e,t,n,{latestValues:r},i,s=!1){const a=(fa(e)?S0:b0)(t,r,i,e),l=u0(t,typeof e=="string",s),c=e!==j.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=j.useMemo(()=>ot(u)?u.get():u,[u]);return j.createElement(e,{...c,children:d})}function jl(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ha(e,t,n,r){if(typeof t=="function"){const[i,s]=jl(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=jl(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function li(e){return ot(e)?e.get():e}function T0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:A0(n,r,i,e),renderState:t()}}function A0(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=li(s[h]);let{initial:o,animate:a}=e;const l=Ri(e),c=Xd(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!Ii(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const g=ha(e,h[m]);if(g){const{transitionEnd:p,transition:b,...v}=g;for(const k in v){let S=v[k];if(Array.isArray(S)){const A=u?S.length-1:0;S=S[A]}S!==null&&(i[k]=S)}for(const k in p)i[k]=p[k]}}}return i}const rf=e=>(t,n)=>{const r=j.useContext(Ni),i=j.useContext(Mi),s=()=>T0(e,t,r,i);return n?s():Os(s)};function ma(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(ot(r[o])||t.style&&ot(t.style[o])||Qd(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const j0=rf({scrapeMotionValuesFromProps:ma,createRenderState:da});function of(e,t,n){const r=ma(e,t,n);for(const i in e)if(ot(e[i])||ot(t[i])){const s=Qn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const P0=rf({scrapeMotionValuesFromProps:of,createRenderState:tf}),M0=Symbol.for("motionComponentSymbol");function Ln(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function N0(e,t,n){return j.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Ln(n)&&(n.current=r))},[t])}const pa=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),I0="framerAppearId",sf="data-"+pa(I0),af=j.createContext({});function R0(e,t,n,r,i){var p,b;const{visualElement:s}=j.useContext(Ni),o=j.useContext(Kd),a=j.useContext(Mi),l=j.useContext(aa).reducedMotion,c=j.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=j.useContext(af);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&V0(c.current,n,i,d);const h=j.useRef(!1);j.useInsertionEffect(()=>{u&&h.current&&u.update(n,a)});const m=n[sf],g=j.useRef(!!m&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return rd(()=>{u&&(h.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),j.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,m)}),g.current=!1),u.enteringChildren=void 0)}),u}function V0(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lf(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ln(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function lf(e){if(e)return e.options.allowProjection!==!1?e.projection:lf(e.parent)}function io(e,{forwardMotionProps:t=!1}={},n,r){n&&a0(n);const i=fa(e)?P0:j0;function s(a,l){let c;const u={...j.useContext(aa),...a,layoutId:D0(a)},{isStatic:d}=u,h=f0(a),m=i(a,d);if(!d&&$s){F0(u,n);const g=L0(u);c=g.MeasureLayout,h.visualElement=R0(e,m,u,r,g.ProjectionNode)}return f.jsxs(Ni.Provider,{value:h,children:[c&&h.visualElement?f.jsx(c,{visualElement:h.visualElement,...u}):null,E0(e,a,N0(m,h.visualElement,l),m,d,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=j.forwardRef(s);return o[M0]=e,o}function D0({layoutId:e}){const t=j.useContext(Ls).id;return t&&e!==void 0?t+"-"+e:e}function F0(e,t){const n=j.useContext(Kd).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yn(!1,r,"lazy-strict-mode"):Ut(!1,r,"lazy-strict-mode")}}function L0(e){const{drag:t,layout:n}=qn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function O0(e,t){if(typeof Proxy>"u")return io;const n=new Map,r=(s,o)=>io(s,o,e,t),i=(s,o)=>(process.env.NODE_ENV!=="production"&&Us(!1,"motion() is deprecated. Use motion.create() instead."),r(s,o));return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,io(o,void 0,e,t)),n.get(o))})}function cf({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $0({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _0(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function oo(e){return e===void 0||e===1}function as({scale:e,scaleX:t,scaleY:n}){return!oo(e)||!oo(t)||!oo(n)}function hn(e){return as(e)||uf(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function uf(e){return Pl(e.x)||Pl(e.y)}function Pl(e){return e&&e!=="0%"}function vi(e,t,n){const r=e-n,i=t*r;return n+i}function Ml(e,t,n,r,i){return i!==void 0&&(e=vi(e,i,r)),vi(e,n,r)+t}function ls(e,t=0,n=1,r,i){e.min=Ml(e.min,t,n,r,i),e.max=Ml(e.max,t,n,r,i)}function df(e,{x:t,y:n}){ls(e.x,t.translate,t.scale,t.originPoint),ls(e.y,n.translate,n.scale,n.originPoint)}const Nl=.999999999999,Il=1.0000000000001;function B0(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$n(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,df(e,o)),r&&hn(s.latestValues)&&$n(e,s.latestValues))}t.x<Il&&t.x>Nl&&(t.x=1),t.y<Il&&t.y>Nl&&(t.y=1)}function On(e,t){e.min=e.min+t,e.max=e.max+t}function Rl(e,t,n,r,i=.5){const s=qe(e.min,e.max,i);ls(e,t,n,s,r)}function $n(e,t){Rl(e.x,t.x,t.scaleX,t.scale,t.originX),Rl(e.y,t.y,t.scaleY,t.scale,t.originY)}function ff(e,t){return cf(_0(e.getBoundingClientRect(),t))}function z0(e,t,n){const r=ff(e,n),{scroll:i}=t;return i&&(On(r.x,i.offset.x),On(r.y,i.offset.y)),r}const Vl=()=>({translate:0,scale:1,origin:0,originPoint:0}),_n=()=>({x:Vl(),y:Vl()}),Dl=()=>({min:0,max:0}),Ye=()=>({x:Dl(),y:Dl()}),cs={current:null},hf={current:!1};function H0(){if(hf.current=!0,!!$s)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cs.current=e.matches;e.addEventListener("change",t),t()}else cs.current=!1}const U0=new WeakMap;function W0(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ot(i))e.addValue(r,i);else if(ot(s))e.addValue(r,Zn(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Zn(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Fl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Z0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,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=na,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 h=ft.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Be.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Ri(n),this.isVariantNode=Xd(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const m=d[h];l[h]!==void 0&&ot(m)&&m.set(l[h])}}mount(t){var n;this.current=t,U0.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((r,i)=>this.bindToMotionValue(i,r)),hf.current||H0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cs.current,process.env.NODE_ENV!=="production"&&Us(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),tn(this.notifyUpdate),tn(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Jn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Be.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),n.owner&&n.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 qn){const n=qn[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ye()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Fl.length;r++){const i=Fl[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=W0(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(id(r)||sd(r))?r=parseFloat(r):!n0(r)&&nn.test(n)&&(r=Bd(t,n)),this.setBaseTarget(t,ot(r)?r.get():r)),ot(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=ha(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ot(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Hs),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){oa.render(this.render)}}class mf extends Z0{constructor(){super(...arguments),this.KeyframeResolver=Ug}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ot(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function pf(e,{style:t,vars:n},r,i){const s=e.style;let o;for(o in t)s[o]=t[o];i==null||i.applyProjectionStyles(s,r);for(o in n)s.setProperty(o,n[o])}function q0(e){return window.getComputedStyle(e)}class G0 extends mf{constructor(){super(...arguments),this.type="html",this.renderInstance=pf}readValueFromInstance(t,n){var r;if(Jn.has(n))return(r=this.projection)!=null&&r.isProjecting?es(n):lg(t,n);{const i=q0(t),s=(qs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ff(t,n)}build(t,n,r){ua(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ma(t,n,r)}}const gf=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 K0(e,t,n,r){pf(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gf.has(i)?i:pa(i),t.attrs[i])}class Y0 extends mf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Jn.has(n)){const r=_d(n);return r&&r.default||0}return n=gf.has(n)?n:pa(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return of(t,n,r)}build(t,n,r){ef(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){K0(t,n,r,i)}mount(t){this.isSVGTag=nf(t.tagName),super.mount(t)}}const X0=(e,t)=>fa(e)?new Y0(t):new G0(t,{allowProjection:e!==j.Fragment});function Bn(e,t,n){const r=e.getProps();return ha(r,t,n!==void 0?n:r.custom,e)}const us=e=>Array.isArray(e);function Q0(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function J0(e){return us(e)?e[e.length-1]||0:e}function ey(e,t){const n=Bn(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=J0(s[o]);Q0(e,o,a)}}function ty(e){return!!(ot(e)&&e.add)}function ds(e,t){const n=e.getValue("willChange");if(ty(n))return n.add(t);if(!n&&Wt.WillChange){const r=new Wt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function yf(e){return e.props[sf]}const ny=e=>e!==null;function ry(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(ny),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const iy={type:"spring",stiffness:500,damping:25,restSpeed:10},oy=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sy={type:"keyframes",duration:.8},ay={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ly=(e,{keyframes:t})=>t.length>2?sy:Jn.has(e)?e.startsWith("scale")?oy(t[1]):iy:ay;function cy({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const ga=(e,t,n,r={},i,s)=>o=>{const a=ra(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-jt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};cy(a)||Object.assign(u,ly(e,u)),u.duration&&(u.duration=jt(u.duration)),u.repeatDelay&&(u.repeatDelay=jt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(os(u),u.delay===0&&(d=!0)),(Wt.instantAnimations||Wt.skipAnimations)&&(d=!0,os(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=ry(u.keyframes,a);if(h!==void 0){Be.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new ta(u):new Ng(u)};function uy({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function xf(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],c=i&&e.animationState&&e.animationState.getState()[i];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),h=a[u];if(h===void 0||c&&uy(c,u))continue;const m={delay:n,...ra(s||{},u)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(h)&&h===g&&!m.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const v=yf(e);if(v){const k=window.MotionHandoffAnimation(v,u,Be);k!==null&&(m.startTime=k,p=!0)}}ds(e,u),d.start(ga(u,d,h,e.shouldReduceMotion&&Ld.has(u)?{type:!1}:m,e,p));const b=d.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{Be.update(()=>{o&&ey(e,o)})}),l}function bf(e,t,n,r=0,i=1){const s=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),o=e.size,a=(o-1)*r;return typeof n=="function"?n(s,o):i===1?s*r:a-s*r}function fs(e,t,n={}){var l;const r=Bn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(xf(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return dy(e,t,c,u,d,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>u())}else return Promise.all([s(),o(n.delay)])}function dy(e,t,n=0,r=0,i=0,s=1,o){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(fs(l,t,{...o,delay:n+(typeof r=="function"?0:r)+bf(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function fy(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>fs(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=fs(e,t,n);else{const i=typeof t=="function"?Bn(e,t,n.custom):t;r=Promise.all(xf(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function vf(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hy=ca.length;function wf(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wf(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hy;n++){const r=ca[n],i=e.props[r];(Tr(i)||i===!1)&&(t[r]=i)}return t}const my=[...la].reverse(),py=la.length;function gy(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fy(e,n,r)))}function yy(e){let t=gy(e),n=Ll(),r=!0;const i=l=>(c,u)=>{var h;const d=Bn(e,u,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(d){const{transition:m,transitionEnd:g,...p}=d;c={...c,...p,...g}}return c};function s(l){t=l(e)}function o(l){const{props:c}=e,u=wf(e.parent)||{},d=[],h=new Set;let m={},g=1/0;for(let b=0;b<py;b++){const v=my[b],k=n[v],S=c[v]!==void 0?c[v]:u[v],A=Tr(S),T=v===l?k.isActive:null;T===!1&&(g=b);let C=S===u[v]&&S!==c[v]&&A;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),k.protectedKeys={...m},!k.isActive&&T===null||!S&&!k.prevProp||Ii(S)||typeof S=="boolean")continue;const N=xy(k.prevProp,S);let P=N||v===l&&k.isActive&&!C&&A||b>g&&A,L=!1;const y=Array.isArray(S)?S:[S];let M=y.reduce(i(v),{});T===!1&&(M={});const{prevResolvedValues:D={}}=k,B={...D,...M},H=ie=>{P=!0,h.has(ie)&&(L=!0,h.delete(ie)),k.needsAnimating[ie]=!0;const F=e.getValue(ie);F&&(F.liveStyle=!1)};for(const ie in B){const F=M[ie],W=D[ie];if(m.hasOwnProperty(ie))continue;let w=!1;us(F)&&us(W)?w=!vf(F,W):w=F!==W,w?F!=null?H(ie):h.add(ie):F!==void 0&&h.has(ie)?H(ie):k.protectedKeys[ie]=!0}k.prevProp=S,k.prevResolvedValues=M,k.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(P=!1);const Y=C&&N;P&&(!Y||L)&&d.push(...y.map(ie=>{const F={type:v};if(typeof ie=="string"&&r&&!Y&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,w=Bn(W,ie);if(W.enteringChildren&&w){const{delayChildren:z}=w.transition||{};F.delay=bf(W.enteringChildren,e,z)}}return{animation:ie,options:F}}))}if(h.size){const b={};if(typeof c.initial!="boolean"){const v=Bn(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const k=e.getBaseTarget(v),S=e.getValue(v);S&&(S.liveStyle=!0),b[v]=k??null}),d.push({animation:b})}let p=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(h=>{var m;return(m=h.animationState)==null?void 0:m.setActive(l,c)}),n[l].isActive=c;const u=o(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Ll(),r=!0}}}function xy(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vf(t,e):!1}function un(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ll(){return{animate:un(!0),whileInView:un(),whileHover:un(),whileTap:un(),whileDrag:un(),whileFocus:un(),exit:un()}}class sn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class by extends sn{constructor(t){super(t),t.animationState||(t.animationState=yy(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ii(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let vy=0;class wy extends sn{constructor(){super(...arguments),this.id=vy++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const ky={animation:{Feature:by},exit:{Feature:wy}};function jr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Fr(e){return{point:{x:e.pageX,y:e.pageY}}}const Sy=e=>t=>sa(t)&&e(t,Fr(t));function gr(e,t,n,r){return jr(e,t,Sy(n),r)}const kf=1e-4,Cy=1-kf,Ey=1+kf,Sf=.01,Ty=0-Sf,Ay=0+Sf;function ct(e){return e.max-e.min}function jy(e,t,n){return Math.abs(e-t)<=n}function Ol(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Cy&&e.scale<=Ey||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ty&&e.translate<=Ay||isNaN(e.translate))&&(e.translate=0)}function yr(e,t,n,r){Ol(e.x,t.x,n.x,r?r.originX:void 0),Ol(e.y,t.y,n.y,r?r.originY:void 0)}function $l(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function Py(e,t,n){$l(e.x,t.x,n.x),$l(e.y,t.y,n.y)}function _l(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function xr(e,t,n){_l(e.x,t.x,n.x),_l(e.y,t.y,n.y)}function vt(e){return[e("x"),e("y")]}const Cf=({current:e})=>e?e.ownerDocument.defaultView:null,Bl=(e,t)=>Math.abs(e-t);function My(e,t){const n=Bl(e.x,t.x),r=Bl(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ef{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ao(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=My(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:p}=h,{timestamp:b}=it;this.history.push({...p,timestamp:b});const{onStart:v,onMove:k}=this.handlers;m||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=so(m,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:g,onSessionEnd:p,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ao(h.type==="pointercancel"?this.lastMoveEventInfo:so(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,v),p&&p(h,v)},!sa(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=Fr(t),l=so(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=it;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,ao(l,this.history)),this.removeListeners=Rr(gr(this.contextWindow,"pointermove",this.handlePointerMove),gr(this.contextWindow,"pointerup",this.handlePointerUp),gr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),tn(this.updatePoint)}}function so(e,t){return t?{point:t(e.point)}:e}function zl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ao({point:e},t){return{point:e,delta:zl(e,Tf(t)),offset:zl(e,Ny(t)),velocity:Iy(t,.1)}}function Ny(e){return e[0]}function Tf(e){return e[e.length-1]}function Iy(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Tf(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>jt(t)));)n--;if(!r)return{x:0,y:0};const s=Rt(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ry(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qe(n,e,r.max):Math.min(e,n)),e}function Hl(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Vy(e,{top:t,left:n,bottom:r,right:i}){return{x:Hl(e.x,n,i),y:Hl(e.y,t,r)}}function Ul(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Dy(e,t){return{x:Ul(e.x,t.x),y:Ul(e.y,t.y)}}function Fy(e,t){let n=.5;const r=ct(e),i=ct(t);return i>r?n=Sr(t.min,t.max-r,e.min):r>i&&(n=Sr(e.min,e.max-i,t.min)),Ht(0,1,n)}function Ly(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const hs=.35;function Oy(e=hs){return e===!1?e=0:e===!0&&(e=hs),{x:Wl(e,"left","right"),y:Wl(e,"top","bottom")}}function Wl(e,t,n){return{min:Zl(e,t),max:Zl(e,n)}}function Zl(e,t){return typeof e=="number"?e:e[t]||0}const $y=new WeakMap;class _y{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=Ye(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fr(d).point)},o=(d,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gg(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vt(v=>{let k=this.getAxisMotionValue(v).get()||0;if(Vt.test(k)){const{projection:S}=this.visualElement;if(S&&S.layout){const A=S.layout.layoutBox[v];A&&(k=ct(A)*(parseFloat(k)/100))}}this.originPoint[v]=k}),p&&Be.postRender(()=>p(d,h)),ds(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:p,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=h;if(g&&this.currentDirection===null){this.currentDirection=By(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),b&&b(d,h)},l=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>vt(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ef(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Cf(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&Be.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!qr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Ry(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Ln(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Vy(r.layoutBox,t):this.constraints=!1,this.elastic=Oy(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&vt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ly(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ln(t))return!1;const r=t.current;Ut(r!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const s=z0(r,i.root,this.visualElement.getTransformPagePoint());let o=Dy(i.layout.layoutBox,s);if(n){const a=n($0(o));this.hasMutatedConstraints=!!a,a&&(o=cf(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=vt(u=>{if(!qr(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ds(this.visualElement,t),r.start(ga(t,r,0,n,this.visualElement,!1))}stopAnimation(){vt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){vt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){vt(n=>{const{drag:r}=this.getProps();if(!qr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-qe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ln(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};vt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Fy({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),vt(o=>{if(!qr(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(qe(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;$y.set(this.visualElement,this);const t=this.visualElement.current,n=gr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ln(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Be.read(r);const o=jr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(vt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=hs,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function qr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function By(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class zy extends sn{constructor(t){super(t),this.removeGroupControls=Ct,this.removeListeners=Ct,this.controls=new _y(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ct}unmount(){this.removeGroupControls(),this.removeListeners()}}const ql=e=>(t,n)=>{e&&Be.postRender(()=>e(t,n))};class Hy extends sn{constructor(){super(...arguments),this.removePointerDownListener=Ct}onPointerDown(t){this.session=new Ef(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cf(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ql(t),onStart:ql(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Be.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=gr(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 ci={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const or={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=Gl(e,t.target.x),r=Gl(e,t.target.y);return`${n}% ${r}%`}},Uy={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=nn.parse(e);if(i.length>5)return r;const s=nn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const c=qe(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};let lo=!1;class Wy extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;h0(Zy),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),lo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ci.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,lo=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Be.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),oa.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;lo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Af(e){const[t,n]=Gd(),r=j.useContext(Ls);return f.jsx(Wy,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(af),isPresent:t,safeToRemove:n})}const Zy={borderRadius:{...or,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:or,borderTopRightRadius:or,borderBottomLeftRadius:or,borderBottomRightRadius:or,boxShadow:Uy};function qy(e,t,n){const r=ot(e)?e:Zn(e);return r.start(ga("",r,t,n)),r.animation}const Gy=(e,t)=>e.depth-t.depth;class Ky{constructor(){this.children=[],this.isDirty=!1}add(t){_s(this.children,t),this.isDirty=!0}remove(t){Bs(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gy),this.isDirty=!1,this.children.forEach(t)}}function Yy(e,t){const n=ft.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(tn(r),e(s-t))};return Be.setup(r,!0),()=>tn(r)}const jf=["TopLeft","TopRight","BottomLeft","BottomRight"],Xy=jf.length,Kl=e=>typeof e=="string"?parseFloat(e):e,Yl=e=>typeof e=="number"||ye.test(e);function Qy(e,t,n,r,i,s){i?(e.opacity=qe(0,n.opacity??1,Jy(r)),e.opacityExit=qe(t.opacity??1,0,ex(r))):s&&(e.opacity=qe(t.opacity??1,n.opacity??1,r));for(let o=0;o<Xy;o++){const a=`border${jf[o]}Radius`;let l=Xl(t,a),c=Xl(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Yl(l)===Yl(c)?(e[a]=Math.max(qe(Kl(l),Kl(c),r),0),(Vt.test(c)||Vt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function Xl(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Jy=Pf(0,.5,md),ex=Pf(.5,.95,Ct);function Pf(e,t,n){return r=>r<e?0:r>t?1:n(Sr(e,t,r))}function Ql(e,t){e.min=t.min,e.max=t.max}function bt(e,t){Ql(e.x,t.x),Ql(e.y,t.y)}function Jl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ec(e,t,n,r,i){return e-=t,e=vi(e,1/n,r),i!==void 0&&(e=vi(e,1/i,r)),e}function tx(e,t=0,n=1,r=.5,i,s=e,o=e){if(Vt.test(t)&&(t=parseFloat(t),t=qe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=qe(s.min,s.max,r);e===s&&(a-=t),e.min=ec(e.min,t,n,a,i),e.max=ec(e.max,t,n,a,i)}function tc(e,t,[n,r,i],s,o){tx(e,t[n],t[r],t[i],t.scale,s,o)}const nx=["x","scaleX","originX"],rx=["y","scaleY","originY"];function nc(e,t,n,r){tc(e.x,t,nx,n?n.x:void 0,r?r.x:void 0),tc(e.y,t,rx,n?n.y:void 0,r?r.y:void 0)}function rc(e){return e.translate===0&&e.scale===1}function Mf(e){return rc(e.x)&&rc(e.y)}function ic(e,t){return e.min===t.min&&e.max===t.max}function ix(e,t){return ic(e.x,t.x)&&ic(e.y,t.y)}function oc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nf(e,t){return oc(e.x,t.x)&&oc(e.y,t.y)}function sc(e){return ct(e.x)/ct(e.y)}function ac(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ox{constructor(){this.members=[]}add(t){_s(this.members,t),t.scheduleRender()}remove(t){if(Bs(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sx(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:m,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const co=["","X","Y","Z"],ax=1e3;let lx=0;function uo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function If(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=yf(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Be,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&If(r)}function Rf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=lx++,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.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(dx),this.nodes.forEach(px),this.nodes.forEach(gx),this.nodes.forEach(fx)},this.resolvedRelativeTargetAt=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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ky)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Hs),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=qd(o)&&!e0(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const h=()=>this.root.updateBlockedByResize=!1;Be.read(()=>{d=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=Yy(h,250),ci.hasAnimatedSinceResize&&(ci.hasAnimatedSinceResize=!1,this.nodes.forEach(uc)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||wx,{onLayoutAnimationStart:p,onLayoutAnimationComplete:b}=c.getProps(),v=!this.targetLayout||!Nf(this.targetLayout,m),k=!d&&h;if(this.options.layoutRoot||this.resumeFrom||k||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...ra(g,"layout"),onPlay:p,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,k)}else d||uc(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(),tn(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(yx),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&&If(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(lc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(cc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(mx),this.nodes.forEach(cx),this.nodes.forEach(ux)):this.nodes.forEach(cc),this.clearAllSnapshots();const a=ft.now();it.delta=Ht(0,1e3/60,a-it.timestamp),it.timestamp=a,it.isProcessing=!0,Qi.update.process(it),Qi.preRender.process(it),Qi.render.process(it),it.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hx),this.sharedNodes.forEach(xx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Be.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Be.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ye(),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 l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mf(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||hn(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),kx(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return Ye();const a=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Sx))){const{scroll:u}=this.root;u&&(On(a.x,u.offset.x),On(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ye();if(bt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&bt(a,o),On(a.x,d.offset.x),On(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Ye();bt(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&$n(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),hn(u.latestValues)&&$n(l,u.latestValues)}return hn(this.latestValues)&&$n(l,this.latestValues),l}removeTransform(o){const a=Ye();bt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!hn(c.latestValues))continue;as(c.latestValues)&&c.updateSnapshot();const u=Ye(),d=c.measurePageBox();bt(u,d),nc(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return hn(this.latestValues)&&nc(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!==it.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=it.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ye(),this.relativeTargetOrigin=Ye(),xr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),bt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ye(),this.targetWithTransforms=Ye()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Py(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):bt(this.target,this.layout.layoutBox),df(this.target,this.targetDelta)):bt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ye(),this.relativeTargetOrigin=Ye(),xr(this.relativeTargetOrigin,this.target,m.target),bt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||as(this.parent.latestValues)||uf(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===it.timestamp&&(l=!1),l)return;const{layout:c,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||!(c||u))return;bt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;B0(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=Ye());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jl(this.prevProjectionDelta.x,this.projectionDelta.x),Jl(this.prevProjectionDelta.y,this.projectionDelta.y)),yr(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!ac(this.projectionDelta.x,this.prevProjectionDelta.x)||!ac(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){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_n(),this.projectionDelta=_n(),this.projectionDeltaWithTransform=_n()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=_n();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ye(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,p=m!==g,b=this.getStack(),v=!b||b.members.length<=1,k=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(vx));this.animationProgress=0;let S;this.mixTargetDelta=A=>{const T=A/1e3;dc(d.x,o.x,T),dc(d.y,o.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),bx(this.relativeTarget,this.relativeTargetOrigin,h,T),S&&ix(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ye()),bt(S,this.relativeTarget)),p&&(this.animationValues=u,Qy(u,c,this.latestValues,T,k,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(tn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{ci.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zn(0)),this.currentAnimation=qy(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},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(ax),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Vf(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ye();const d=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}bt(a,l),$n(a,u),yr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ox),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&uo("z",o,c,this.animationValues);for(let u=0;u<co.length;u++)uo(`rotate${co[u]}`,o,c,this.animationValues),uo(`skew${co[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=li(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=li(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!hn(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=sx(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),o.transform=d;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in Ar){if(u[g]===void 0)continue;const{correct:p,applyTo:b,isCSSVariable:v}=Ar[g],k=d==="none"?u[g]:p(u[g],c);if(b){const S=b.length;for(let A=0;A<S;A++)o[b[A]]=k}else v?this.options.visualElement.renderState.vars[g]=k:o[g]=k}this.options.layoutId&&(o.pointerEvents=c===this?li(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(lc),this.root.sharedNodes.clear()}}}function cx(e){e.updateLayout()}function ux(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?vt(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=ct(h);h.min=r[d].min,h.max=h.min+m}):Vf(s,t.layoutBox,r)&&vt(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=ct(r[d]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=_n();yr(a,r,t.layoutBox);const l=_n();o?yr(l,e.applyTransform(i,!0),t.measuredBox):yr(l,r,t.layoutBox);const c=!Mf(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:m}=d;if(h&&m){const g=Ye();xr(g,t.layoutBox,h.layoutBox);const p=Ye();xr(p,r,m.layoutBox),Nf(g,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function dx(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 fx(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function hx(e){e.clearSnapshot()}function lc(e){e.clearMeasurements()}function cc(e){e.isLayoutDirty=!1}function mx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function uc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function px(e){e.resolveTargetDelta()}function gx(e){e.calcProjection()}function yx(e){e.resetSkewAndRotation()}function xx(e){e.removeLeadSnapshot()}function dc(e,t,n){e.translate=qe(t.translate,0,n),e.scale=qe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function fc(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function bx(e,t,n,r){fc(e.x,t.x,n.x,r),fc(e.y,t.y,n.y,r)}function vx(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wx={duration:.45,ease:[.4,0,.1,1]},hc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mc=hc("applewebkit/")&&!hc("chrome/")?Math.round:Ct;function pc(e){e.min=mc(e.min),e.max=mc(e.max)}function kx(e){pc(e.x),pc(e.y)}function Vf(e,t,n){return e==="position"||e==="preserve-aspect"&&!jy(sc(t),sc(n),.2)}function Sx(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Cx=Rf({attachResizeListener:(e,t)=>jr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fo={current:void 0},Df=Rf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fo.current){const e=new Cx({});e.mount(window),e.setOptions({layoutScroll:!0}),fo.current=e}return fo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ex={pan:{Feature:Hy},drag:{Feature:zy,ProjectionNode:Df,MeasureLayout:Af}};function gc(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Be.postRender(()=>s(t,Fr(t)))}class Tx extends sn{mount(){const{current:t}=this.node;t&&(this.unmount=Kg(t,(n,r)=>(gc(this.node,r,"Start"),i=>gc(this.node,i,"End"))))}unmount(){}}class Ax extends sn{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=Rr(jr(this.node.current,"focus",()=>this.onFocus()),jr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function yc(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Be.postRender(()=>s(t,Fr(t)))}class jx extends sn{mount(){const{current:t}=this.node;t&&(this.unmount=Jg(t,(n,r)=>(yc(this.node,r,"Start"),(i,{success:s})=>yc(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ms=new WeakMap,ho=new WeakMap,Px=e=>{const t=ms.get(e.target);t&&t(e)},Mx=e=>{e.forEach(Px)};function Nx({root:e,...t}){const n=e||document;ho.has(n)||ho.set(n,{});const r=ho.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Mx,{root:e,...t})),r[i]}function Ix(e,t,n){const r=Nx(t);return ms.set(e,n),r.observe(e),()=>{ms.delete(e),r.unobserve(e)}}const Rx={some:0,all:1};class Vx extends sn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Rx[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return Ix(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dx(t,n))&&this.startObserver()}unmount(){}}function Dx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Fx={inView:{Feature:Vx},tap:{Feature:jx},focus:{Feature:Ax},hover:{Feature:Tx}},Lx={layout:{ProjectionNode:Df,MeasureLayout:Af}},Ox={...ky,...Fx,...Ex,...Lx},ge=O0(Ox,X0),Mt=x.forwardRef((e,t)=>{const{alt:n,color:r="currentColor",size:i="1em",weight:s="regular",mirrored:o=!1,children:a,weights:l,...c}=e;return x.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:r,viewBox:"0 0 256 256",transform:o?"scale(-1, 1)":void 0,...c},!!n&&x.createElement("title",null,n),a,l.get(s))});Mt.displayName="SSRBase";const $x=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),x.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),ya=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:$x}));ya.displayName="CaretDownIcon";const _x=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,160H48l80-80Z",opacity:"0.2"}),x.createElement("path",{d:"M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z"}))]]),Ff=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:_x}));Ff.displayName="CaretUpIcon";const Bx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),x.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Lf=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Bx}));Lf.displayName="ChatTextIcon";const zx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),x.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),Of=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:zx}));Of.displayName="CheckIcon";const Hx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),x.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,6,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),$f=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Hx}));$f.displayName="MicrophoneIcon";const Ux=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M56.88,39.93A12,12,0,1,0,39.12,56.07L76,96.64V128a52,52,0,0,0,72.11,48l11.26,12.39A67.34,67.34,0,0,1,128,196a68.07,68.07,0,0,1-68-68,12,12,0,0,0-24,0,92.14,92.14,0,0,0,80,91.22V240a12,12,0,0,0,24,0V219.23a90.39,90.39,0,0,0,35.92-12.68l23.2,25.52a12,12,0,0,0,17.76-16.14ZM128,156a28,28,0,0,1-28-28v-5l29.9,32.89C129.27,156,128.64,156,128,156Zm63-2.42A67.63,67.63,0,0,0,196,128a12,12,0,0,1,24,0,91.48,91.48,0,0,1-6.74,34.61,12,12,0,0,1-22.23-9ZM85.7,33.75A52,52,0,0,1,180,64v56.54a12,12,0,0,1-24,0V64a28,28,0,0,0-50.79-16.28,12,12,0,0,1-19.51-14Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),x.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.38,229.92a8,8,0,0,1-11.3-.54l-30.92-34A78.83,78.83,0,0,1,136,207.59V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64.07,64.07,0,0,0,64,64,63.41,63.41,0,0,0,32.21-8.68l-11.1-12.2A48,48,0,0,1,80,128V95.09L42.08,53.38A8,8,0,0,1,53.92,42.62l160,176A8,8,0,0,1,213.38,229.92Zm-24.19-63.13a7.88,7.88,0,0,0,3.51.82,8,8,0,0,0,7.19-4.49A79.16,79.16,0,0,0,208,128a8,8,0,0,0-16,0,63.32,63.32,0,0,1-6.48,28.09A8,8,0,0,0,189.19,166.79Zm-27.33-29.22A8,8,0,0,0,175.74,133a49.49,49.49,0,0,0,.26-5V64A48,48,0,0,0,84,44.87a8,8,0,0,0,1.41,8.57Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M212.44,220,52.44,44A6,6,0,0,0,43.56,52L82,94.32V128a46,46,0,0,0,67.56,40.64l13.75,15.12A65.26,65.26,0,0,1,128,194a66.08,66.08,0,0,1-66-66,6,6,0,0,0-12,0,78.09,78.09,0,0,0,72,77.75V240a6,6,0,0,0,12,0V205.77a76.93,76.93,0,0,0,37.48-13L203.56,228a6,6,0,0,0,8.88-8.08ZM128,162a34,34,0,0,1-34-34V107.52l47.12,51.84A33.82,33.82,0,0,1,128,162Zm59.32-5A65.38,65.38,0,0,0,194,128a6,6,0,0,1,12,0,77.33,77.33,0,0,1-7.9,34.25A6,6,0,1,1,187.32,157ZM85.8,45.67A46,46,0,0,1,174,64v64a45.17,45.17,0,0,1-.25,4.81,6,6,0,0,1-6,5.38q-.31,0-.63,0a6,6,0,0,1-5.34-6.59A35.41,35.41,0,0,0,162,128V64A34,34,0,0,0,96.8,50.45a6,6,0,0,1-11-4.78Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M211,221.31,51,45.31A4,4,0,0,0,45,50.69L84,93.55V128a44,44,0,0,0,66,38.12l16.38,18A67.21,67.21,0,0,1,128,196a68.07,68.07,0,0,1-68-68,4,4,0,0,0-8,0,76.09,76.09,0,0,0,72,75.89V240a4,4,0,0,0,8,0V203.89a75.1,75.1,0,0,0,39.79-13.77L205,226.69a4,4,0,1,0,5.92-5.38ZM128,164a36,36,0,0,1-36-36V102.35L144.43,160A35.83,35.83,0,0,1,128,164Zm61.12-6.15A67.44,67.44,0,0,0,196,128a4,4,0,0,1,8,0,75.28,75.28,0,0,1-7.7,33.37,4,4,0,0,1-7.18-3.52ZM87.63,46.46A44,44,0,0,1,172,64v64a44.2,44.2,0,0,1-.24,4.61,4,4,0,0,1-4,3.58l-.42,0a4,4,0,0,1-3.57-4.39A36.67,36.67,0,0,0,164,128V64A36,36,0,0,0,95,49.66a4,4,0,0,1-7.34-3.2Z"}))]]),_f=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Ux}));_f.displayName="MicrophoneSlashIcon";const Wx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228ZM160.49,103.51a12,12,0,0,1-17,17L140,117v35a12,12,0,0,1-24,0V117l-3.51,3.52a12,12,0,0,1-17-17l24-24a12,12,0,0,1,17,0Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z",opacity:"0.2"}),x.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M168,224a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64Zm-74.34,42.34-24-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,11.32,11.32L120,107.31V152a8,8,0,0,0,16,0V107.31l10.34,10.35a8,8,0,0,0,11.32-11.32Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Zm-9.76-116.24a6,6,0,1,1-8.48,8.48L134,102.49V152a6,6,0,0,1-12,0V102.49l-13.76,13.75a6,6,0,0,1-8.48-8.48l24-24a6,6,0,0,1,8.48,0Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224ZM157.66,106.34a8,8,0,0,1-11.32,11.32L136,107.31V152a8,8,0,0,1-16,0V107.31l-10.34,10.35a8,8,0,0,1-11.32-11.32l24-24a8,8,0,0,1,11.32,0Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Zm-9.17-114.83a4,4,0,0,1-5.66,5.66L132,97.66V152a4,4,0,0,1-8,0V97.66l-17.17,17.17a4,4,0,0,1-5.66-5.66l24-24a4,4,0,0,1,5.66,0Z"}))]]),Bf=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Wx}));Bf.displayName="MonitorArrowUpIcon";const Zx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),x.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),xa=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Zx}));xa.displayName="SpinnerIcon";const qx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V167.57l24.94,18.14A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM188,180H36V76H188Zm44-27.57-20-14.54V118.11l20-14.54Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),x.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M192,72V184a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V72A16,16,0,0,1,32,56H176A16,16,0,0,1,192,72Zm58,.25a8.23,8.23,0,0,0-6.63,1.22L209.78,95.86A4,4,0,0,0,208,99.19v57.62a4,4,0,0,0,1.78,3.33l33.78,22.52a8,8,0,0,0,8.58.19,8.33,8.33,0,0,0,3.86-7.17V80A8,8,0,0,0,250,72.25Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V155.21L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM194,184a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2Zm48-19.21-36-24V115.21l36-24Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM192,184H32V72H192V184Zm48-22.95-32-21.33V116.28L240,95Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V151.47l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM196,184a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4Zm48-15.47-40-26.67V114.14l40-26.67Z"}))]]),zf=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:qx}));zf.displayName="VideoCameraIcon";const Gx=new Map([["bold",x.createElement(x.Fragment,null,x.createElement("path",{d:"M249.45,69.31a12,12,0,0,0-12.51,1L212,88.43V72a20,20,0,0,0-20-20H123.88a12,12,0,0,0,0,24H188v68a12,12,0,0,0,4.46,9.33c.15.13.31.25.48.38l44,32A12,12,0,0,0,256,176V80A12,12,0,0,0,249.45,69.31ZM232,152.43l-20-14.54V118.11l20-14.54ZM56.88,31.93A12,12,0,1,0,39.12,48.07L42.69,52H32A20,20,0,0,0,12,72V184a20,20,0,0,0,20,20H180.87l18.25,20.07a12,12,0,0,0,17.76-16.14ZM36,180V76H64.51l94.55,104Z"}))],["duotone",x.createElement(x.Fragment,null,x.createElement("path",{d:"M200,72V184a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8H192A8,8,0,0,1,200,72Z",opacity:"0.2"}),x.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["fill",x.createElement(x.Fragment,null,x.createElement("path",{d:"M256,80.23v95.45a8.33,8.33,0,0,1-3.86,7.17,8,8,0,0,1-8.58-.19l-33.78-22.52a4,4,0,0,1-1.78-3.33V99.19a4,4,0,0,1,1.78-3.32l33.78-22.53a8,8,0,0,1,9.73.66A8.23,8.23,0,0,1,256,80.23ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM185,155.07a4,4,0,0,0,7-2.7V72a16,16,0,0,0-16-16H104a4,4,0,0,0-3,6.69Z"}))],["light",x.createElement(x.Fragment,null,x.createElement("path",{d:"M250.83,74.71a6,6,0,0,0-6.16.3L206,100.79V72a14,14,0,0,0-14-14H113.06a6,6,0,0,0,0,12H192a2,2,0,0,1,2,2v87.63a6,6,0,0,0,12,0v-4.42L244.67,181a6,6,0,0,0,9.33-5V80A6,6,0,0,0,250.83,74.71ZM242,164.79l-36-24V115.21l36-24ZM52.44,36A6,6,0,0,0,43.56,44L56.25,58H32A14,14,0,0,0,18,72V184a14,14,0,0,0,14,14H183.53l20,22a6,6,0,0,0,8.88-8.08ZM32,186a2,2,0,0,1-2-2V72a2,2,0,0,1,2-2H67.16L172.62,186Z"}))],["regular",x.createElement(x.Fragment,null,x.createElement("path",{d:"M251.77,73a8,8,0,0,0-8.21.39L208,97.05V72a16,16,0,0,0-16-16H113.06a8,8,0,0,0,0,16H192v87.63a8,8,0,0,0,16,0V159l35.56,23.71A8,8,0,0,0,248,184a8,8,0,0,0,8-8V80A8,8,0,0,0,251.77,73ZM240,161.05l-32-21.33V116.28L240,95ZM53.92,34.62A8,8,0,1,0,42.08,45.38L51.73,56H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H182.64l19.44,21.38a8,8,0,1,0,11.84-10.76ZM32,184V72H66.28L168.1,184Z"}))],["thin",x.createElement(x.Fragment,null,x.createElement("path",{d:"M249.89,76.47a4,4,0,0,0-4.11.2L204,104.53V72a12,12,0,0,0-12-12H113.06a4,4,0,0,0,0,8H192a4,4,0,0,1,4,4v87.63a4,4,0,0,0,8,0v-8.16l41.78,27.86A4,4,0,0,0,252,176V80A4,4,0,0,0,249.89,76.47ZM244,168.53l-40-26.67V114.14l40-26.67ZM51,37.31A4,4,0,0,0,45,42.69L60.78,60H32A12,12,0,0,0,20,72V184a12,12,0,0,0,12,12H184.41L205,218.69a4,4,0,1,0,5.92-5.38ZM32,188a4,4,0,0,1-4-4V72a4,4,0,0,1,4-4H68.05L177.14,188Z"}))]]),Hf=x.forwardRef((e,t)=>x.createElement(Mt,{ref:t,...e,weights:Gx}));Hf.displayName="VideoCameraSlashIcon";function xc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kx(...e){return t=>{let n=!1;const r=e.map(i=>{const s=xc(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():xc(e[i],null)}}}}function Yx(e){const t=Qx(e),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(e1);if(l){const c=l.props.children,u=a.map(d=>d===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:d);return f.jsx(t,{...o,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,u):null})}return f.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var Xx=Yx("Slot");function Qx(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=n1(i),a=t1(s,i.props);return i.type!==x.Fragment&&(a.ref=r?Kx(r,o):o),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jx=Symbol("radix.slottable");function e1(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jx}function t1(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function n1(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const ba="-",r1=e=>{const t=o1(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(ba);return a[0]===""&&a.length!==1&&a.shift(),Uf(a,t)||i1(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Uf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Uf(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(ba);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},bc=/^\[(.+)\]$/,i1=e=>{if(bc.test(e)){const t=bc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},o1=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)ps(n[i],r,i,t);return r},ps=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:vc(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(s1(i)){ps(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{ps(o,vc(t,s),n,r)})})},vc=(e,t)=>{let n=e;return t.split(ba).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},s1=e=>e.isThemeGetter,a1=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},gs="!",ys=":",l1=ys.length,c1=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let o=0,a=0,l=0,c;for(let g=0;g<i.length;g++){let p=i[g];if(o===0&&a===0){if(p===ys){s.push(i.slice(l,g)),l=g+l1;continue}if(p==="/"){c=g;continue}}p==="["?o++:p==="]"?o--:p==="("?a++:p===")"&&a--}const u=s.length===0?i:i.substring(l),d=u1(u),h=d!==u,m=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:d,maybePostfixModifierPosition:m}};if(t){const i=t+ys,s=r;r=o=>o.startsWith(i)?s(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},u1=e=>e.endsWith(gs)?e.substring(0,e.length-1):e.startsWith(gs)?e.substring(1):e,d1=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(o=>{o[0]==="["||t[o]?(i.push(...s.sort(),o),s=[]):s.push(o)}),i.push(...s.sort()),i}},f1=e=>({cache:a1(e.cacheSize),parseClassName:c1(e),sortModifiers:d1(e),...r1(e)}),h1=/\s+/,m1=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],a=e.trim().split(h1);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:p}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!p,v=r(b?g.substring(0,p):g);if(!v){if(!b){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}b=!1}const k=s(h).join(":"),S=m?k+gs:k,A=S+v;if(o.includes(A))continue;o.push(A);const T=i(v,b);for(let C=0;C<T.length;++C){const N=T[C];o.push(S+N)}l=u+(l.length>0?" "+l:l)}return l};function p1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Wf(t))&&(r&&(r+=" "),r+=n);return r}const Wf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Wf(e[r]))&&(n&&(n+=" "),n+=t);return n};function g1(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=f1(c),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=m1(l,n);return i(l,u),u}return function(){return s(p1.apply(null,arguments))}}const nt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,y1=/^\d+\/\d+$/,x1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,v1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,En=e=>y1.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>!!e&&Number.isInteger(Number(e)),mo=e=>e.endsWith("%")&&we(e.slice(0,-1)),Ot=e=>x1.test(e),S1=()=>!0,C1=e=>b1.test(e)&&!v1.test(e),Gf=()=>!1,E1=e=>w1.test(e),T1=e=>k1.test(e),A1=e=>!ae(e)&&!le(e),j1=e=>er(e,Xf,Gf),ae=e=>Zf.test(e),dn=e=>er(e,Qf,C1),po=e=>er(e,R1,we),wc=e=>er(e,Kf,Gf),P1=e=>er(e,Yf,T1),Gr=e=>er(e,Jf,E1),le=e=>qf.test(e),sr=e=>tr(e,Qf),M1=e=>tr(e,V1),kc=e=>tr(e,Kf),N1=e=>tr(e,Xf),I1=e=>tr(e,Yf),Kr=e=>tr(e,Jf,!0),er=(e,t,n)=>{const r=Zf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tr=(e,t,n=!1)=>{const r=qf.exec(e);return r?r[1]?t(r[1]):n:!1},Kf=e=>e==="position"||e==="percentage",Yf=e=>e==="image"||e==="url",Xf=e=>e==="length"||e==="size"||e==="bg-size",Qf=e=>e==="length",R1=e=>e==="number",V1=e=>e==="family-name",Jf=e=>e==="shadow",D1=()=>{const e=nt("color"),t=nt("font"),n=nt("text"),r=nt("font-weight"),i=nt("tracking"),s=nt("leading"),o=nt("breakpoint"),a=nt("container"),l=nt("spacing"),c=nt("radius"),u=nt("shadow"),d=nt("inset-shadow"),h=nt("text-shadow"),m=nt("drop-shadow"),g=nt("blur"),p=nt("perspective"),b=nt("aspect"),v=nt("ease"),k=nt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...A(),le,ae],C=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[le,ae,l],L=()=>[En,"full","auto",...P()],y=()=>[Kt,"none","subgrid",le,ae],M=()=>["auto",{span:["full",Kt,le,ae]},Kt,le,ae],D=()=>[Kt,"auto",le,ae],B=()=>["auto","min","max","fr",le,ae],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],de=()=>["auto",...P()],ie=()=>[En,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[e,le,ae],W=()=>[...A(),kc,wc,{position:[le,ae]}],w=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",N1,j1,{size:[le,ae]}],oe=()=>[mo,sr,dn],E=()=>["","none","full",c,le,ae],U=()=>["",we,sr,dn],se=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[we,mo,kc,wc],Q=()=>["","none",g,le,ae],V=()=>["none",we,le,ae],G=()=>["none",we,le,ae],fe=()=>[we,le,ae],R=()=>[En,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ot],breakpoint:[Ot],color:[S1],container:[Ot],"drop-shadow":[Ot],ease:["in","out","in-out"],font:[A1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ot],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ot],shadow:[Ot],spacing:["px",we],text:[Ot],"text-shadow":[Ot],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",En,ae,le,b]}],container:["container"],columns:[{columns:[we,ae,le,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Kt,"auto",le,ae]}],basis:[{basis:[En,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,En,"auto","initial","none",ae]}],grow:[{grow:["",we,le,ae]}],shrink:[{shrink:["",we,le,ae]}],order:[{order:[Kt,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":y()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":y()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:de()}],mx:[{mx:de()}],my:[{my:de()}],ms:[{ms:de()}],me:[{me:de()}],mt:[{mt:de()}],mr:[{mr:de()}],mb:[{mb:de()}],ml:[{ml:de()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:ie()}],w:[{w:[a,"screen",...ie()]}],"min-w":[{"min-w":[a,"screen","none",...ie()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...ie()]}],h:[{h:["screen","lh",...ie()]}],"min-h":[{"min-h":["screen","lh","none",...ie()]}],"max-h":[{"max-h":["screen","lh",...ie()]}],"font-size":[{text:["base",n,sr,dn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mo,ae]}],"font-family":[{font:[M1,ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,le,ae]}],"line-clamp":[{"line-clamp":[we,"none",le,po]}],leading:[{leading:[s,...P()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",le,dn]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[we,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:w()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kt,le,ae],radial:["",le,ae],conic:[Kt,le,ae]},I1,P1]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:E()}],"rounded-s":[{"rounded-s":E()}],"rounded-e":[{"rounded-e":E()}],"rounded-t":[{"rounded-t":E()}],"rounded-r":[{"rounded-r":E()}],"rounded-b":[{"rounded-b":E()}],"rounded-l":[{"rounded-l":E()}],"rounded-ss":[{"rounded-ss":E()}],"rounded-se":[{"rounded-se":E()}],"rounded-ee":[{"rounded-ee":E()}],"rounded-es":[{"rounded-es":E()}],"rounded-tl":[{"rounded-tl":E()}],"rounded-tr":[{"rounded-tr":E()}],"rounded-br":[{"rounded-br":E()}],"rounded-bl":[{"rounded-bl":E()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[we,le,ae]}],"outline-w":[{outline:["",we,sr,dn]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",u,Kr,Gr]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",d,Kr,Gr]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[we,dn]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",h,Kr,Gr]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[we,le,ae]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:w()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:Q()}],brightness:[{brightness:[we,le,ae]}],contrast:[{contrast:[we,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",m,Kr,Gr]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",we,le,ae]}],"hue-rotate":[{"hue-rotate":[we,le,ae]}],invert:[{invert:["",we,le,ae]}],saturate:[{saturate:[we,le,ae]}],sepia:[{sepia:["",we,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[we,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[we,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",we,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[we,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[we,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",we,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",le,ae]}],ease:[{ease:["linear","initial",v,le,ae]}],delay:[{delay:[we,le,ae]}],animate:[{animate:["none",k,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,le,ae]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[we,sr,dn,po]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},F1=g1(D1);function ce(...e){return F1(Ds.clsx(e))}const L1=Vs.cva(["text-xs font-bold tracking-wider uppercase whitespace-nowrap","inline-flex items-center justify-center gap-2 shrink-0 rounded-full cursor-pointer outline-none transition-colors duration-300","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","aria-invalid:ring-destructive/20 aria-invalid:border-destructive dark:aria-invalid:ring-destructive/40 ","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button text-button-foreground hover:bg-muted focus:bg-muted",destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive-hover focus:bg-destructive-hover focus-visible:ring-destructive-foreground/20","dark:focus-visible:ring-destructive-foreground/40"],outline:["border bg-background","hover:bg-accent hover:text-accent-foreground","dark:bg-input/30 dark:border-input dark:hover:bg-input/50"],primary:"",secondary:"bg-secondary text-secondary-foregroun hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function O1({className:e,variant:t,size:n,asChild:r=!1,...i}){const s=r?Xx:"button";return f.jsx(s,{"data-slot":"button",className:ce(L1({variant:t,size:n,className:e})),...i})}const $1=Vs.cva(["inline-flex items-center justify-center gap-2 rounded-full","text-sm font-medium whitespace-nowrap","cursor-pointer outline-none transition-[color,border,background-color]","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0 aria-invalid:border-0","disabled:pointer-events-none disabled:opacity-50 disabled:not-allowed","data-[state=on]:bg-button-selected data-[state=on]:border-button-border-selected","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0"],{variants:{variant:{default:"bg-button hover:bg-muted focus:bg-muted hover:text-muted-foreground focus:text-muted-foreground",primary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=off]:bg-button-primary hover:data-[state=off]:bg-button-hover data-[state=off]:text-button-primary-foreground",secondary:"text-fg1 bg-button hover:bg-button-hover focus:bg-button-hover data-[state=on]:bg-button-secondary hover:data-[state=on]:bg-button-secondary data-[state=on]:text-button-secondary-foreground",outline:["border border-button-border bg-button text-button-foreground","hover:bg-background focus:bg-background"]},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function eh({className:e,variant:t,size:n,...r}){return f.jsx(sp.Root,{"data-slot":"toggle",className:ce($1({variant:t,size:n,className:e})),...r})}const va=typeof window<"u",wi=typeof document<"u",_1=typeof navigator<"u",Xe=wi?document:null,zt=va?window:null,zn=_1?navigator:null,Vi=(e,t)=>va?e():t,B1=e=>(Xe==null?void 0:Xe.getElementById(e))||null,th=e=>(Xe==null?void 0:Xe.querySelector(e))||null,nh=e=>(Xe==null?void 0:Xe.createElement(e))||null,wa=(e,t,n,r)=>{e&&"addEventListener"in e&&e.addEventListener(t,n,r)},ka=(e,t,n,r)=>{e&&"removeEventListener"in e&&e.removeEventListener(t,n,r)},rh=()=>(zn==null?void 0:zn.userAgent)||"",ih=()=>Vi(()=>"ontouchstart"in window||((navigator==null?void 0:navigator.maxTouchPoints)||0)>0,!1)||!1,oh=()=>Vi(()=>({width:window.innerWidth,height:window.innerHeight}),{width:0,height:0})||{width:0,height:0},z1=e=>{const t=Xe==null?void 0:Xe.documentElement;return t&&"requestFullscreen"in t?t.requestFullscreen():null},H1=()=>Xe&&"exitFullscreen"in Xe?Xe.exitFullscreen():null,U1=()=>Vi(()=>!!document.fullscreenElement,!1)||!1,Sc=e=>{Vi(()=>{document.body&&Object.assign(document.body.style,e)})},W1=()=>(zn==null?void 0:zn.mediaDevices)||null;function Z1(e){const[t,n]=j.useState(()=>e.getPublishPermissions());return j.useEffect(()=>{const r=()=>{n(e.getPublishPermissions())},i=()=>{r()};return e.on("connection.connected",i),e.on("connection.disconnected",i),()=>{e.off("connection.connected",i),e.off("connection.disconnected",i)}},[e]),t}function sh(e){const[t,n]=j.useState(()=>e.getLocalParticipant()),[r,i]=j.useState(()=>e.getMicrophoneTrack());return j.useEffect(()=>{const s=()=>{const a=e.getLocalParticipant(),l=e.getMicrophoneTrack();console.log("🎤 useVoxketLocalParticipant: Updating state:",{hasParticipant:!!a,hasMicTrack:!!l,isMicEnabled:e.isMicrophoneEnabled,trackPublications:a?a.trackPublications.size:0}),n(a),i(l)};s(),e.on("connection.connected",s),e.on("connection.disconnected",s),e.on("track.muted",s),e.on("track.unmuted",s);const o=e.getRoom();if(o){const a=()=>{console.log("🎤 Track published, updating participant state"),s()},l=()=>{console.log("🎤 Track unpublished, updating participant state"),s()};return o.on("localTrackPublished",a),o.on("localTrackUnpublished",l),()=>{e.off("connection.connected",s),e.off("connection.disconnected",s),e.off("track.muted",s),e.off("track.unmuted",s),o.off("localTrackPublished",a),o.off("localTrackUnpublished",l)}}else return()=>{e.off("connection.connected",s),e.off("connection.disconnected",s),e.off("track.muted",s),e.off("track.unmuted",s)}},[e]),{localParticipant:t,microphoneTrack:r}}function Hn(e,t,n){const[r,i]=j.useState(!1),[s,o]=j.useState(!1);return j.useEffect(()=>{const l=()=>{let c=!1;switch(t){case"microphone":c=e.isMicrophoneEnabled;break;case"camera":c=e.isCameraEnabled;break;case"screenShare":c=e.isScreenShareEnabled;break}console.log(`🎬 useVoxketTrackToggle: ${t} enabled state updated:`,{oldEnabled:r,newEnabled:c,changed:r!==c}),i(c)};return l(),e.on("track.muted",l),e.on("track.unmuted",l),e.on("connection.connected",l),()=>{e.off("track.muted",l),e.off("track.unmuted",l),e.off("connection.connected",l)}},[e,t]),{enabled:r,pending:s,toggle:async l=>{var c;try{o(!0);const u=l!==void 0?l:!r;switch(console.log(`🎬 useVoxketTrackToggle: ${t} toggle called`,{currentEnabled:r,targetEnabled:u,forceEnabled:l}),t){case"microphone":await e.toggleMicrophone(u);break;case"camera":await e.toggleCamera(u);break;case"screenShare":u?(console.log("🎬 useVoxketTrackToggle: Starting screen share"),await e.startScreenShare()):(console.log("🎬 useVoxketTrackToggle: Stopping screen share"),await e.stopScreenShare());break}console.log(`🎬 useVoxketTrackToggle: ${t} toggle completed`)}catch(u){console.error(`🎬 useVoxketTrackToggle: ${t} toggle failed:`,u),(c=n==null?void 0:n.onDeviceError)==null||c.call(n,u)}finally{o(!1)}}}}function ah(e){const[t,n]=j.useState(()=>e.getRoom()),[r,i]=j.useState(()=>e.getConnectionState());return j.useEffect(()=>{const s=()=>{n(e.getRoom()),i(e.getConnectionState())};return e.on("connection.connected",s),e.on("connection.disconnected",s),e.on("connection.connecting",s),()=>{e.off("connection.connected",s),e.off("connection.disconnected",s),e.off("connection.connecting",s)}},[e]),t}function q1(e,t){const[n,r]=j.useState([]),[i,s]=j.useState("");return j.useEffect(()=>{const a=async()=>{try{const u=t==="audioinput"?await e.getAudioInputDevices():await e.getVideoInputDevices();r(u)}catch(u){console.error("Failed to load devices:",u)}};a();const l=()=>{a()},c=W1();return c&&c.addEventListener("devicechange",l),()=>{c&&c.removeEventListener("devicechange",l)}},[e,t]),{devices:n,activeDeviceId:i,setActiveMediaDevice:async a=>{try{t==="audioinput"?await e.setAudioInputDevice(a):await e.setVideoInputDevice(a),s(a)}catch(l){console.error("Failed to set device:",l)}}}}function G1(e){const{preventSave:t=!1}=e||{};return{saveAudioInputEnabled:o=>{t||localStorage.setItem("voxket-audio-input-enabled",o.toString())},saveAudioInputDeviceId:o=>{t||localStorage.setItem("voxket-audio-input-device-id",o)},saveVideoInputEnabled:o=>{t||localStorage.setItem("voxket-video-input-enabled",o.toString())},saveVideoInputDeviceId:o=>{t||localStorage.setItem("voxket-video-input-device-id",o)}}}function lh(e){const[t,n]=j.useState(()=>e.getIsAgentConnected()),[r,i]=j.useState(()=>e.getCurrentSession()),[s,o]=j.useState(()=>e.getCurrentAgentInfo()),[a,l]=j.useState(()=>e.getAgentState()),[c,u]=j.useState(()=>e.getAgentAudioTrack()),[d,h]=j.useState(()=>e.getAgentVideoTrack());return j.useEffect(()=>{const m=()=>{const S=e.getIsAgentConnected(),A=e.getCurrentSession(),T=e.getCurrentAgentInfo(),C=e.getAgentState(),N=e.getAgentAudioTrack(),P=e.getAgentVideoTrack();console.log("🤖 useVoxketVoiceAssistant: Updating state:",{isAgentConnected:S,hasSession:!!A,sessionId:A==null?void 0:A.id,hasAgentInfo:!!T,agentState:C,hasAudioTrack:!!N,hasVideoTrack:!!P}),n(S),i(A),o(T),l(C),u(N),h(P)};m();const g=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent connected event"),m()},p=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent disconnected event"),m()},b=()=>{console.log("🤖 useVoxketVoiceAssistant: Session changed event"),m()},v=()=>{console.log("🤖 useVoxketVoiceAssistant: Connection changed event"),m()},k=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent state changed event"),m()};return e.on("agent.connected",g),e.on("agent.speaking",g),e.on("agent.thinking",g),e.on("agent.state.changed",k),e.on("connection.disconnected",p),e.on("session.created",b),e.on("session.ended",b),e.on("session.state.changed",b),e.on("connection.connected",v),()=>{e.off("agent.connected",g),e.off("agent.speaking",g),e.off("agent.thinking",g),e.off("agent.state.changed",k),e.off("connection.disconnected",p),e.off("session.created",b),e.off("session.ended",b),e.off("session.state.changed",b),e.off("connection.connected",v)}},[e]),{agent:{isActive:t,info:s},session:r,state:a,audioTrack:c,videoTrack:d}}function K1(e){const[t,n]=j.useState(()=>e.getVideoTrackRefs()),[r,i]=j.useState(()=>e.getCameraTrackRefs()),[s,o]=j.useState(()=>e.getScreenShareTrackRefs());return j.useEffect(()=>{const a=()=>{const c=e.getVideoTrackRefs(),u=e.getCameraTrackRefs(),d=e.getScreenShareTrackRefs();console.log("📹 useVoxketVideoTracks: Updating tracks:",{videoCount:c.length,cameraCount:u.length,screenShareCount:d.length}),n(c),i(u),o(d)};a(),e.on("connection.connected",a),e.on("connection.disconnected",a),e.on("track.muted",a),e.on("track.unmuted",a),e.on("participant.joined",a),e.on("participant.left",a);const l=e.getRoom();if(l){const c=()=>{console.log("📹 Track event, updating video tracks"),a()};return l.on("localTrackPublished",c),l.on("localTrackUnpublished",c),l.on("trackPublished",c),l.on("trackUnpublished",c),l.on("trackSubscribed",c),l.on("trackUnsubscribed",c),()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a),l.off("localTrackPublished",c),l.off("localTrackUnpublished",c),l.off("trackPublished",c),l.off("trackUnpublished",c),l.off("trackSubscribed",c),l.off("trackUnsubscribed",c)}}else return()=>{e.off("connection.connected",a),e.off("connection.disconnected",a),e.off("track.muted",a),e.off("track.unmuted",a),e.off("participant.joined",a),e.off("participant.left",a)}},[e]),{videoTrackRefs:t,cameraTrackRefs:r,screenShareTrackRefs:s}}function Cc({...e}){return f.jsx(St.Root,{"data-slot":"select",...e})}function Ec({...e}){return f.jsx(St.Value,{"data-slot":"select-value",...e})}function Tc({className:e,size:t="default",children:n,...r}){return f.jsxs(St.Trigger,{"data-slot":"select-trigger","data-size":t,className:ce(["flex w-fit cursor-pointer items-center justify-between gap-2","rounded-full px-3 py-2 text-sm whitespace-nowrap","bg-button transition-[color,border,background-color]","disabled:cursor-not-allowed disabled:opacity-50","hover:bg-muted hover:text-muted-foreground","!focus:ring-0 !focus-visible:ring-0 !focus:border-none !focus-visible:border-none !ring-0 !border-none !outline-none","aria-invalid:ring-0 dark:aria-invalid:ring-0","data-[placeholder]:text-muted-foreground","data-[size=default]:h-9 data-[size=sm]:h-8","*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2","[&:not([class*='text-'])_svg:not([class*='text-'])]:text-muted-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...r,children:[n,f.jsx(St.Icon,{asChild:!0,children:f.jsx(ya,{weight:"bold",className:"size-4 transition-colors"})})]})}function Ac({className:e,children:t,position:n="popper",...r}){return f.jsx(St.Portal,{children:f.jsxs(St.Content,{"data-slot":"select-content",className:ce(["bg-[#18182a]/90 backdrop-blur-md text-white border border-[#23233a] shadow-2xl","relative z-50 overflow-x-hidden overflow-y-auto rounded-xl","max-h-(--radix-select-content-available-height) min-w-[8rem]","origin-(--radix-select-content-transform-origin)","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2","data-[side=right]:slide-in-from-left-2","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2"],n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[f.jsx(Y1,{}),f.jsx(St.Viewport,{className:ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),f.jsx(X1,{})]})})}function jc({className:e,children:t,...n}){return f.jsxs(St.Item,{"data-slot":"select-item",className:ce(["relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none","cursor-pointer disabled:cursor-not-allowed","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2","[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"],e),...n,children:[f.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:f.jsx(St.ItemIndicator,{children:f.jsx(Of,{className:"size-4",weight:"bold"})})}),f.jsx(St.ItemText,{children:t})]})}function Y1({className:e,...t}){return f.jsx(St.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Ff,{className:"size-4",weight:"bold"})})}function X1({className:e,...t}){return f.jsx(St.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(ya,{className:"size-4",weight:"bold"})})}const Pc=Vs.cva(["w-full rounded-full px-3 py-2 text-sm cursor-pointer","disabled:not-allowed hover:bg-button-hover focus:bg-button-hover"],{variants:{size:{default:"w-[180px]",sm:"w-auto"}},defaultVariants:{size:"default"}});function Mc({kind:e,track:t,requestPermissions:n,onError:r,client:i,...s}){const o=s.size||"default";if(!i)return f.jsxs(Cc,{disabled:!0,children:[f.jsx(Tc,{className:ce(Pc({size:o}),s.className),children:f.jsx(Ec,{placeholder:`Select a ${e}`})}),f.jsx(Ac,{children:f.jsx(jc,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:l,setActiveMediaDevice:c}=q1(i,e==="audioinput"?"audioinput":"videoinput");return f.jsxs(Cc,{value:l,onValueChange:c,children:[f.jsx(Tc,{className:ce(Pc({size:o}),s.className,"hover:bg"),children:o!=="sm"&&f.jsx(Ec,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),f.jsx(Ac,{children:a.map(u=>f.jsx(jc,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function Q1(e,t,n=!1){if(n)return xa;switch(e){case te.Track.Source.Microphone:return t?$f:_f;case te.Track.Source.Camera:return t?zf:Hf;case te.Track.Source.ScreenShare:return Bf;default:return x.Fragment}}function go({source:e,pressed:t,pending:n,className:r,...i}){const s=Q1(e,t??!1,n),o=e===te.Track.Source.Microphone&&!(t??!1)&&!n,a=e===te.Track.Source.Camera&&!(t??!1)&&!n;return x.useEffect(()=>{console.log(`TrackToggle for ${e} changed: pressed=${t}, pending=${n}, actualState=${t?"enabled":"disabled"}`)},[e,t,n]),f.jsxs(eh,{pressed:t,"aria-label":`Toggle ${e}`,className:ce(r),...i,children:[f.jsx(s,{weight:"bold",className:ce(n&&"animate-spin",o||a?"text-red-500":void 0)}),i.children]})}function J1(e){return e?Z1(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function eb(e={}){const{controls:t,saveUserChoices:n=!0,client:r}=e,i={leave:!0,...t};if(!r)return{micTrackRef:{participant:void 0,source:te.Track.Source.Microphone,publication:void 0},visibleControls:i,microphoneToggle:{enabled:!1,pending:!1,toggle:async()=>{}},cameraToggle:{enabled:!1,pending:!1,toggle:async()=>{}},screenShareToggle:{enabled:!1,pending:!1,toggle:async()=>{}},handleDisconnect:()=>{},handleAudioDeviceChange:()=>{},handleVideoDeviceChange:()=>{}};const{microphoneTrack:s,localParticipant:o}=sh(r),a=J1(r);ah(r);const l=Hn(r,"microphone",{onDeviceError:C=>{var N;return(N=e.onDeviceError)==null?void 0:N.call(e,{source:te.Track.Source.Microphone,error:C})}}),c=Hn(r,"camera",{onDeviceError:C=>{var N;return(N=e.onDeviceError)==null?void 0:N.call(e,{source:te.Track.Source.Camera,error:C})}}),u=Hn(r,"screenShare",{onDeviceError:C=>{var N;return(N=e.onDeviceError)==null?void 0:N.call(e,{source:te.Track.Source.ScreenShare,error:C})}}),d=x.useMemo(()=>{let C;if(o){for(const[,N]of o.trackPublications)if(N.source===te.Track.Source.Microphone){C=N;break}}return console.log("🎤 Creating micTrackRef:",{hasParticipant:!!o,hasPublication:!!C,isTrackSubscribed:C==null?void 0:C.isSubscribed,isMuted:C==null?void 0:C.isMuted,trackSid:C==null?void 0:C.trackSid}),{participant:o??void 0,source:te.Track.Source.Microphone,publication:C}},[o,s]);i.microphone??(i.microphone=a.microphone),i.screenShare??(i.screenShare=a.screenShare),i.camera??(i.camera=a.camera),i.chat??(i.chat=a.data);const{saveAudioInputEnabled:h,saveAudioInputDeviceId:m,saveVideoInputEnabled:g,saveVideoInputDeviceId:p}=G1({preventSave:!n}),b=x.useCallback(()=>{r&&r.disconnect()},[r]),v=x.useCallback(C=>{m(C??"default"),r&&r.setAudioInputDevice(C)},[m,r]),k=x.useCallback(C=>{p(C??"default"),r&&r.setVideoInputDevice(C)},[p,r]),S=x.useCallback(async C=>{u.enabled&&await u.toggle(!1),await c.toggle(C),g(!c.enabled)},[c,g,u]),A=x.useCallback(async C=>{await l.toggle(C),h(!l.enabled)},[l,h]),T=x.useCallback(async C=>{c.enabled&&await c.toggle(!1),await u.toggle(C)},[c,u]);return{micTrackRef:d,visibleControls:i,cameraToggle:{...c,toggle:S},microphoneToggle:{...l,toggle:A},screenShareToggle:{...u,toggle:T},handleDisconnect:b,handleAudioDeviceChange:v,handleVideoDeviceChange:k}}const tb={card:" bg-gradient-to-br from-black to-gray-900 border border-gray-900 w-full h-full flex flex-col justify-between overflow-hidden relative rounded-2xl shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-black/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-gray-800/20 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-gray-600/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-gray-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-gray-400 to-gray-500 rounded-full blur-sm opacity-20 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-gray-500 to-gray-600 rounded-full blur-sm opacity-15 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-black to-gray-900 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-white via-gray-200 to-gray-300"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900",promptSlider:"absolute w-full py-3 px-2 bg-gray-900 rounded-xl text-center text-white text-sm transition-opacity duration-700 ease-in-out border border-gray-600",statusIndicator:"w-2 h-2 bg-gray-400 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-gray-600/30 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-gray-500/20 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-gray-400/15 pulse-ring"},controlBar:"border border-gray-600 rounded-3xl py-4 flex flex-col justify-end h-full bg-gray-900/50 backdrop-blur-sm",chatInput:{container:"bg-gray-900 w-full border-gray-600",textarea:"bg-gray-800 border-none text-white placeholder-gray-400",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-gray-600 text-white",other:"bg-gray-700 text-white"},chatHeader:{container:"bg-gray-900 border-gray-600",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-gray-400 mb-2",suggestedResponse:{container:"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white"},video:{container:"bg-gradient-to-br from-black to-gray-900 text-white",header:"border-gray-700 bg-gray-900/50",headerButton:"bg-gray-800 hover:bg-gray-700 text-gray-300",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-gray-900/80 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-gray-800 border border-gray-700 shadow-lg",placeholder:"bg-gray-800 text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},nb={card:" bg-gradient-to-br from-white to-gray-50 border border-gray-200 w-full h-full flex flex-col justify-between overflow-hidden relative shadow-lg",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-white/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-blue-500/5 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-purple-500/10 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-pink-500/8 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-blue-500 to-purple-500 rounded-full blur-sm opacity-30 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-pink-500 to-purple-500 rounded-full blur-sm opacity-20 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-white to-gray-50 rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-gray-900",secondary:"text-gray-700",muted:"text-gray-500",accent:"bg-clip-text text-transparent bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600"},micButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute text-white w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-white",promptSlider:"absolute w-full py-3 px-2 bg-gray-100 rounded-xl text-center text-gray-700 text-sm transition-opacity duration-700 ease-in-out border border-gray-200",statusIndicator:"w-2 h-2 bg-green-500 rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-blue-500/20 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-purple-500/15 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-pink-500/10 pulse-ring"},controlBar:"border border-gray-200 rounded-3xl py-4 flex flex-col justify-end h-full bg-white/80 backdrop-blur-sm",chatInput:{container:"bg-white/90 border-gray-200 shadow-sm",textarea:"bg-white border-none text-gray-900 placeholder-gray-500 ",sendButton:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:opacity-50 text-white",attachButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100 bg-blue-50",endButton:"bg-red-50 hover:bg-red-100 text-red-600 border-red-200"},chatMessage:{own:"bg-blue-50 text-gray-900 border border-blue-100",other:"bg-gray-50 text-gray-900 border border-gray-200"},chatHeader:{container:"bg-white border-gray-200",backButton:"text-gray-500 hover:text-gray-700 hover:bg-gray-100"},spinner:"w-10 h-10 animate-spin text-blue-500 mb-2",suggestedResponse:{container:"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900"},video:{container:"bg-gradient-to-br from-white to-gray-50 text-gray-900",header:"border-gray-200 bg-white/80",headerButton:"bg-gray-100 hover:bg-gray-200 text-gray-600",statusDot:"bg-green-500 animate-pulse",controlsBackground:"bg-white/90 backdrop-blur-sm border-t border-gray-200",controlEnabled:"bg-blue-600 hover:bg-blue-700 text-white",controlDisabled:"bg-gray-200 hover:bg-gray-300 text-gray-600",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-white border border-gray-200 shadow-sm",placeholder:"bg-gray-50 text-gray-600",avatar:"bg-gray-200 text-gray-600",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},rb={card:" text-white bg-gradient-to-br from-[#171727] to-[#12121F] border border-gray-800 w-full h-full flex flex-col justify-between overflow-hidden relative",cardTopGradient:"pointer-events-none absolute top-0 left-0 w-full h-10 z-10 bg-gradient-to-b from-[#171727]/90 to-transparent",cardRadial:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-[#3B82F6]/15 via-transparent to-transparent",cardPurpleBlur:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-[#8B5CF6]/25 to-transparent rounded-full blur-2xl",cardPinkBlur:"absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-[#EC4899]/20 to-transparent rounded-full blur-xl",cardPulse1:"absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full blur-sm opacity-50 animate-pulse",cardPulse2:"absolute -bottom-2 -right-2 w-4 h-4 bg-gradient-to-br from-[#EC4899] to-[#8B5CF6] rounded-full blur-sm opacity-40 animate-pulse",main:"w-full flex flex-col items-center justify-center max-w-md mx-auto bg-gradient-to-br from-[#171727] to-[#12121F] rounded-2xl shadow-xl p-0 overflow-hidden h-full",text:{primary:"text-white",secondary:"text-gray-300",muted:"text-gray-400",accent:"bg-clip-text text-transparent bg-gradient-to-r from-[#3B82F6] via-[#8B5CF6] to-[#EC4899]"},micButton:"absolute w-20 h-20 bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 mic-glow shadow-2xl group",chatButton:"absolute w-20 h-20 bg-gradient-to-br from-[#10B981] to-[#059669] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",videoButton:"absolute w-20 h-20 bg-gradient-to-br from-[#8B5CF6] to-[#EC4899] rounded-full flex items-center justify-center hover:scale-105 transition-all duration-300 shadow-2xl group",popupTrigger:"bg-gradient-to-br from-[#3B82F6] to-[#8B5CF6] text-white font-medium hover:from-[#2563EB] hover:to-[#7C3AED] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-900 shadow-xl",promptSlider:"absolute w-full py-3 px-2 bg-[#1E1E2E] rounded-xl text-center text-gray-200 text-sm transition-opacity duration-700 ease-in-out border border-gray-700",statusIndicator:"w-2 h-2 bg-[#10B981] rounded-full animate-pulse",pulseRings:{ring1:"w-32 h-32 rounded-full border-2 border-[#3B82F6]/40 pulse-ring",ring2:"absolute w-28 h-28 rounded-full border-2 border-[#8B5CF6]/30 pulse-ring",ring3:"absolute w-24 h-24 rounded-full border-2 border-[#EC4899]/20 pulse-ring"},controlBar:"border border-border rounded-3xl py-4 flex flex-col justify-end h-full",chatInput:{container:"bg-[#1E1E2E] border-gray-700",textarea:"bg-[#1E1E2E] border-none text-white placeholder-gray-400",sendButton:"bg-[#3B82F6] hover:bg-[#2563EB] disabled:bg-gray-600 disabled:opacity-50 text-white",attachButton:"text-gray-400 hover:text-gray-300 hover:bg-gray-700",endButton:"bg-red-900/20 hover:bg-red-800/30 text-red-400 border-red-800"},chatMessage:{own:"bg-[#1E1E2E]/80 text-white",other:"bg-[#1E1E2E] text-white border border-gray-700"},chatHeader:{container:"bg-[#1E1E2E] border-gray-700",backButton:"text-gray-400 hover:text-white hover:bg-gray-700"},spinner:"w-10 h-10 animate-spin text-blue-400 mb-2",suggestedResponse:{container:"bg-[#221f3f] text-white border-none"},video:{container:"bg-gradient-to-br from-[#171727] to-[#12121F] text-white",header:"border-gray-700 bg-[#1E1E2E]/80",headerButton:"bg-[#1E1E2E] hover:bg-gray-700 text-gray-300",statusDot:"bg-[#10B981] animate-pulse",controlsBackground:"bg-[#1E1E2E]/90 backdrop-blur-sm border-t border-gray-700",controlEnabled:"bg-[#3B82F6] hover:bg-[#2563EB] text-white",controlDisabled:"bg-gray-700 hover:bg-gray-600 text-gray-300",endCall:"bg-red-600 hover:bg-red-700 text-white",tile:"bg-[#1E1E2E] border border-gray-700 shadow-xl",placeholder:"bg-[#1E1E2E] text-gray-300",avatar:"bg-gray-700 text-gray-300",nameOverlay:"bg-black/70 text-white",mutedIndicator:"bg-red-600/80 text-white"}},Nc={dark:tb,light:nb,vox:rb};function tt(e){return Nc[e]||Nc.vox}function ib({onSend:e,disabled:t=!1,className:n,placeholder:r="Type a message..."}){const[i,s]=x.useState(""),[o,a]=x.useState(!1),l=async u=>{if(u.preventDefault(),i.trim()&&!t&&!o){a(!0);try{await e(i.trim()),s("")}catch(d){console.error("Failed to send message:",d)}finally{a(!1)}}},c=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),l(u))};return f.jsxs("form",{onSubmit:l,className:ce("flex w-full",n),children:[f.jsx("input",{type:"text",value:i,onChange:u=>s(u.target.value),onKeyDown:c,disabled:t||o,placeholder:r,className:"flex-1 px-2 py-1 text-sm bg-transparent border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 disabled:opacity-50"}),f.jsx(O1,{type:"submit",size:"sm",disabled:!i.trim()||t||o,className:"ml-2 px-2 py-1 text-xs",children:o?"...":"Send"})]})}function ob({controls:e,saveUserChoices:t=!0,capabilities:n,className:r,onSendMessage:i,onChatOpenChange:s,onDisconnect:o,onDeviceError:a,theme:l="vox",client:c,...u}){const[d,h]=x.useState(!1),[m,g]=x.useState(!1),p=tt(l),{micTrackRef:b,visibleControls:v,cameraToggle:k,microphoneToggle:S,screenShareToggle:A,handleAudioDeviceChange:T,handleVideoDeviceChange:C,handleDisconnect:N}=eb({controls:e,saveUserChoices:t,client:c}),P=async L=>{g(!0);try{await(i==null?void 0:i(L))}finally{g(!1)}};return x.useEffect(()=>{s==null||s(d)},[d,s]),x.useEffect(()=>{var L,y,M,D;console.log("🎤 AgentControlBar: micTrackRef changed:",{hasParticipant:!!b.participant,hasPublication:!!b.publication,source:b.source,isSubscribed:(L=b.publication)==null?void 0:L.isSubscribed,isMuted:(y=b.publication)==null?void 0:y.isMuted,trackSid:(M=b.publication)==null?void 0:M.trackSid,hasTrack:!!((D=b.publication)!=null&&D.track)})},[b]),f.jsxs("div",{"aria-label":"Voice assistant controls",className:ce(p.controlBar,r),...u,children:[n.suportsChatInput&&f.jsxs("div",{"data-inert":d?void 0:"true",className:ce("overflow-hidden transition-[height] relative duration-300 ease-in-out",d?"h-[56px] mb-2":"h-0"),children:[f.jsx("div",{className:"flex h-8 px-3 w-full",children:f.jsx(ib,{onSend:P,disabled:m,className:ce("w-full",p.chatInput),placeholder:"Type a message..."})}),f.jsx("hr",{className:"border-border my-1 mx-3"})]}),f.jsxs("div",{className:ce("flex flex-row items-center gap-2 rounded-2xl mx-auto border-none backdrop-blur-lg px-2 py-1",l==="light"?"bg-white/80":"bg-[#18182a]/80"),children:[f.jsxs("div",{className:"flex gap-y-2 justify-start",children:[v.microphone&&f.jsxs("div",{className:"flex gap-y-2 items-center rounded-full overflow-hidden border-none ",children:[f.jsx(go,{variant:"primary",source:te.Track.Source.Microphone,pressed:S.enabled,disabled:S.pending,onPressedChange:S.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),f.jsx(dt.BarVisualizer,{barCount:3,trackRef:b,options:{minHeight:5},className:"flex h-full w-auto items-center justify-center gap-x-0.5",children:f.jsx("span",{className:ce(["h-full w-0.5 origin-center rounded-2xl","bg-white","group-data-[state=on]/track:bg-white group-data-[state=off]/track:bg-white","data-lk-muted:bg-muted"])})}),f.jsx(Mc,{size:"sm",kind:"audioinput",client:c,onError:a?L=>L instanceof Error?a({source:te.Track.Source.Microphone,error:L}):void 0:void 0,onActiveDeviceChange:T,className:ce(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/30 transition-colors","min-w-[2.5rem]"])})]}),n.suportsVideoInput&&v.camera&&f.jsxs("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:[f.jsx(go,{variant:"primary",source:te.Track.Source.Camera,pressed:k.enabled,pending:k.pending,disabled:k.pending,onPressedChange:k.toggle,className:"w-auto py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"}),f.jsx(Mc,{size:"sm",kind:"videoinput",client:c,onError:a?L=>L instanceof Error?a({source:te.Track.Source.Camera,error:L}):void 0:void 0,onActiveDeviceChange:C,className:ce(["h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors","min-w-[2.5rem]"])})]}),n.suportsScreenShare&&v.screenShare&&f.jsx("div",{className:"flex items-center rounded-full overflow-hidden border-none ",children:f.jsx(go,{variant:"secondary",source:te.Track.Source.ScreenShare,pressed:A.enabled,disabled:A.pending,onPressedChange:A.toggle,className:"w-auto py-1 disabled:opacity-70 rounded-none border-none bg-transparent text-inherit focus:bg-primary/80 hover:bg-primary/80 transition-colors"})})]}),v.chat&&f.jsx("div",{className:"flex items-center rounded-full overflow-hidden bg-secondary text-secondary-foreground border-none ",children:f.jsx(eh,{variant:"secondary","aria-label":"Toggle chat",pressed:d,onPressedChange:L=>{h(L)},className:"aspect-square h-full py-1 rounded-none border-none bg-transparent text-inherit focus:bg-secondary/80 hover:bg-secondary/80 transition-colors flex items-center",children:f.jsx(Lf,{weight:"bold",className:"h-4 w-4"})})})]})]})}const ch=j.forwardRef(({state:e,audioTrack:t,className:n},r)=>f.jsx("div",{ref:r,className:ce("",n),children:t?f.jsx(dt.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:ce("flex aspect-video w-40 items-center justify-center gap-1"),children:f.jsx("span",{className:ce(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear","data-[lk-highlighted=true]:bg-[#5c64f6]","data-[lk-muted=true]:bg-[#222222]"])})}):f.jsx("div",{className:ce("flex aspect-video w-40 items-center justify-center"),children:f.jsx("div",{className:"flex flex-col items-center justify-center",children:f.jsx("div",{className:"flex gap-1",children:Array.from({length:5}).map((i,s)=>f.jsx("span",{className:ce(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear",e==="speaking"&&"animate-pulse bg-[#5c64f6]",e==="thinking"&&"animate-pulse bg-yellow-500"])},s))})})})}));ch.displayName="AgentTile";const sb=({videoTrack:e,className:t,ref:n})=>{var r,i;return!e||!e.publication||!e.participant?f.jsx("div",{ref:n,className:ce(t),children:f.jsx("div",{className:"w-full h-full bg-gray-200 rounded-md flex items-center justify-center",children:f.jsx("span",{className:"text-gray-500",children:"No video available"})})}):f.jsx("div",{ref:n,className:ce(t),children:f.jsx(dt.VideoTrack,{trackRef:e,width:((r=e.publication.dimensions)==null?void 0:r.width)??0,height:((i=e.publication.dimensions)==null?void 0:i.height)??0,className:"rounded-md"})})},ab=ge.create(dt.VideoTrack),lb=({trackRef:e,className:t,ref:n})=>{var r,i;return f.jsx("div",{className:ce("bg-muted overflow-hidden rounded-md",t),children:f.jsx(ab,{ref:n,trackRef:e,width:((r=e==null?void 0:e.publication.dimensions)==null?void 0:r.width)??0,height:((i=e==null?void 0:e.publication.dimensions)==null?void 0:i.height)??0,className:ce("h-full w-auto")})})},Ic=ge.create(lb),cb=ge.create(ch),ub=ge.create(sb),$t={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},Tn={grid:["h-full w-full","grid gap-x-2 place-content-center","grid-cols-[1fr_1fr] grid-rows-[90px_1fr_90px]"],agentChatOpenWithSecondTile:["col-start-1 row-start-1","self-center justify-self-end"],agentChatOpenWithoutSecondTile:["col-start-1 row-start-1","col-span-2","place-content-center"],agentChatClosed:["col-start-1 row-start-1","col-span-2 row-span-3","place-content-center"],secondTileChatOpen:["col-start-2 row-start-1","self-center justify-self-start"],secondTileChatClosed:["col-start-2 row-start-3","place-content-end"]};function db(e,t){const{localParticipant:n}=sh(t),r=n==null?void 0:n.getTrackPublication(e);return j.useMemo(()=>r&&n?{source:e,participant:n,publication:r}:void 0,[e,r,n])}function fb({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:r,state:i="idle",audioTrack:s,videoTrack:o}=t?lh(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=dt.useTracks([te.Track.Source.ScreenShare]),l=db(te.Track.Source.Camera,t),c=l&&!l.publication.isMuted,u=a&&!a.publication.isMuted,d=c||u,h=n||r&&r.state==="active",m={...$t.transition,delay:e?0:.15},g={...$t.animate,scale:e?1:3,transition:m},p={...$t.animate,transition:m},b=m,v=m,k=o&&o.publication&&o.participant;return f.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:f.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:f.jsxs("div",{className:ce(Tn.grid),children:[h&&f.jsx("div",{className:ce(["grid",!e&&Tn.agentChatClosed,e&&d&&Tn.agentChatOpenWithSecondTile,e&&!d&&Tn.agentChatOpenWithoutSecondTile]),children:f.jsxs("div",{className:"h-full flex items-center justify-center",children:[!k&&f.jsx(cb,{layoutId:"agent",...$t,animate:g,transition:b,state:i,audioTrack:s||void 0,className:ce(e?"h-[90px]":"h-auto w-full")},"agent"),k&&o&&f.jsx(ub,{layoutId:"avatar",...$t,animate:p,transition:v,videoTrack:o,className:ce(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),f.jsx("div",{className:ce(["grid",e&&Tn.secondTileChatOpen,!e&&Tn.secondTileChatClosed]),children:f.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[l&&c&&f.jsx(Ic,{layout:"position",layoutId:"camera",...$t,trackRef:l,transition:{...$t.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&f.jsx(Ic,{layout:"position",layoutId:"screen",...$t,trackRef:a,transition:{...$t.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}function Rc({timeout:e}){const[t,n]=j.useState(100),r=j.useRef(null),i=j.useRef(null);return j.useEffect(()=>{if(!e||e<=0)return;n(100),i.current=Date.now();const s=()=>{if(!e||i.current===null)return;const o=Date.now()-i.current,a=Math.max(0,100-o/e*100);n(a),a>0&&(r.current=requestAnimationFrame(s))};return r.current=requestAnimationFrame(s),()=>{r.current&&cancelAnimationFrame(r.current)}},[e]),!e||e<=0?null:f.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:f.jsx(ge.div,{className:"h-1 rounded-t-4xl dark:bg-white bg-blue-200 ",initial:{width:"100%"},animate:{width:`${Math.max(t,2)}%`},transition:{duration:.1,ease:"linear"},style:{minWidth:"2%"}})})}function Pr({interaction:e,theme:t,onDismiss:n,client:r,addLocalMessage:i}){var a;if(!e||!e.isVisible||!e.component)return null;const[s]=x.useState(()=>Date.now()),o=()=>e.component?x.createElement(e.component,{handler:e.handler||void 0,timeout:e.timeout,loadData:async c=>{console.log("InteractiveComponent: Loading data:",c)},presentationMode:e.presentationMode,data:e.data,client:r,addLocalMessage:i}):f.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return f.jsx(en,{children:f.jsxs(ge.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[f.jsxs("div",{className:"flex flex-col",children:[f.jsx(Rc,{timeout:e.timeout}),f.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[f.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase())}),f.jsx("button",{onClick:n||((a=e.handler)==null?void 0:a.dismissView),className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors",children:f.jsx(Ze.X,{className:"w-5 h-5"})})]})]}),f.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:o()})]})});case"embedded":default:return f.jsx(en,{children:f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:f.jsxs("div",{children:[f.jsx(Rc,{timeout:e.timeout}),o()]})})})}}const hb=({logLevel:e}={})=>{const t=dt.useRoomContext();x.useEffect(()=>(te.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},Vc=e=>e,mb=()=>{let e=Vc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Vc}}},pb=mb();function rn(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function wn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":rn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yr={exports:{}},Xr={exports:{}},Pe={};/** @license React v16.13.1
89
30
  * react-is.production.min.js
90
31
  *
91
32
  * Copyright (c) Facebook, Inc. and its affiliates.
92
33
  *
93
34
  * This source code is licensed under the MIT license found in the
94
35
  * LICENSE file in the root directory of this source tree.
95
- */var Na;function a0(){if(Na)return pe;Na=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function T(v){if(typeof v=="object"&&v!==null){var j=v.$$typeof;switch(j){case t:switch(v=v.type,v){case c:case d:case s:case i:case r:case f:return v;default:switch(v=v&&v.$$typeof,v){case a:case u:case x:case p:case o:return v;default:return j}}case n:return j}}}function k(v){return T(v)===d}return pe.AsyncMode=c,pe.ConcurrentMode=d,pe.ContextConsumer=a,pe.ContextProvider=o,pe.Element=t,pe.ForwardRef=u,pe.Fragment=s,pe.Lazy=x,pe.Memo=p,pe.Portal=n,pe.Profiler=i,pe.StrictMode=r,pe.Suspense=f,pe.isAsyncMode=function(v){return k(v)||T(v)===c},pe.isConcurrentMode=k,pe.isContextConsumer=function(v){return T(v)===a},pe.isContextProvider=function(v){return T(v)===o},pe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},pe.isForwardRef=function(v){return T(v)===u},pe.isFragment=function(v){return T(v)===s},pe.isLazy=function(v){return T(v)===x},pe.isMemo=function(v){return T(v)===p},pe.isPortal=function(v){return T(v)===n},pe.isProfiler=function(v){return T(v)===i},pe.isStrictMode=function(v){return T(v)===r},pe.isSuspense=function(v){return T(v)===f},pe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===s||v===d||v===i||v===r||v===f||v===h||typeof v=="object"&&v!==null&&(v.$$typeof===x||v.$$typeof===p||v.$$typeof===o||v.$$typeof===a||v.$$typeof===u||v.$$typeof===b||v.$$typeof===S||v.$$typeof===C||v.$$typeof===m)},pe.typeOf=T,pe}var ye={};/** @license React v16.13.1
36
+ */var Dc;function gb(){if(Dc)return Pe;Dc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function S(T){if(typeof T=="object"&&T!==null){var C=T.$$typeof;switch(C){case t:switch(T=T.type,T){case l:case c:case r:case s:case i:case d:return T;default:switch(T=T&&T.$$typeof,T){case a:case u:case g:case m:case o:return T;default:return C}}case n:return C}}}function A(T){return S(T)===c}return Pe.AsyncMode=l,Pe.ConcurrentMode=c,Pe.ContextConsumer=a,Pe.ContextProvider=o,Pe.Element=t,Pe.ForwardRef=u,Pe.Fragment=r,Pe.Lazy=g,Pe.Memo=m,Pe.Portal=n,Pe.Profiler=s,Pe.StrictMode=i,Pe.Suspense=d,Pe.isAsyncMode=function(T){return A(T)||S(T)===l},Pe.isConcurrentMode=A,Pe.isContextConsumer=function(T){return S(T)===a},Pe.isContextProvider=function(T){return S(T)===o},Pe.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Pe.isForwardRef=function(T){return S(T)===u},Pe.isFragment=function(T){return S(T)===r},Pe.isLazy=function(T){return S(T)===g},Pe.isMemo=function(T){return S(T)===m},Pe.isPortal=function(T){return S(T)===n},Pe.isProfiler=function(T){return S(T)===s},Pe.isStrictMode=function(T){return S(T)===i},Pe.isSuspense=function(T){return S(T)===d},Pe.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===s||T===i||T===d||T===h||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===m||T.$$typeof===o||T.$$typeof===a||T.$$typeof===u||T.$$typeof===b||T.$$typeof===v||T.$$typeof===k||T.$$typeof===p)},Pe.typeOf=S,Pe}var Me={};/** @license React v16.13.1
96
37
  * react-is.development.js
97
38
  *
98
39
  * Copyright (c) Facebook, Inc. and its affiliates.
99
40
  *
100
41
  * This source code is licensed under the MIT license found in the
101
42
  * LICENSE file in the root directory of this source tree.
102
- */var Ma;function l0(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,r=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function T(A){return typeof A=="string"||typeof A=="function"||A===s||A===d||A===i||A===r||A===f||A===h||typeof A=="object"&&A!==null&&(A.$$typeof===x||A.$$typeof===p||A.$$typeof===o||A.$$typeof===a||A.$$typeof===u||A.$$typeof===b||A.$$typeof===S||A.$$typeof===C||A.$$typeof===m)}function k(A){if(typeof A=="object"&&A!==null){var Z=A.$$typeof;switch(Z){case t:var G=A.type;switch(G){case c:case d:case s:case i:case r:case f:return G;default:var de=G&&G.$$typeof;switch(de){case a:case u:case x:case p:case o:return de;default:return Z}}case n:return Z}}}var v=c,j=d,V=a,E=o,_=t,y=u,D=s,W=x,te=p,ue=n,ie=i,fe=r,ne=f,R=!1;function B(A){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(A)||k(A)===c}function M(A){return k(A)===d}function O(A){return k(A)===a}function q(A){return k(A)===o}function Y(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function U(A){return k(A)===u}function re(A){return k(A)===s}function $(A){return k(A)===x}function I(A){return k(A)===p}function L(A){return k(A)===n}function N(A){return k(A)===i}function F(A){return k(A)===r}function se(A){return k(A)===f}ye.AsyncMode=v,ye.ConcurrentMode=j,ye.ContextConsumer=V,ye.ContextProvider=E,ye.Element=_,ye.ForwardRef=y,ye.Fragment=D,ye.Lazy=W,ye.Memo=te,ye.Portal=ue,ye.Profiler=ie,ye.StrictMode=fe,ye.Suspense=ne,ye.isAsyncMode=B,ye.isConcurrentMode=M,ye.isContextConsumer=O,ye.isContextProvider=q,ye.isElement=Y,ye.isForwardRef=U,ye.isFragment=re,ye.isLazy=$,ye.isMemo=I,ye.isPortal=L,ye.isProfiler=N,ye.isStrictMode=F,ye.isSuspense=se,ye.isValidElementType=T,ye.typeOf=k}()),ye}var Va;function cd(){return Va||(Va=1,process.env.NODE_ENV==="production"?ss.exports=a0():ss.exports=l0()),ss.exports}/*
43
+ */var Fc;function yb(){return Fc||(Fc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function S(R){return typeof R=="string"||typeof R=="function"||R===r||R===c||R===s||R===i||R===d||R===h||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===m||R.$$typeof===o||R.$$typeof===a||R.$$typeof===u||R.$$typeof===b||R.$$typeof===v||R.$$typeof===k||R.$$typeof===p)}function A(R){if(typeof R=="object"&&R!==null){var re=R.$$typeof;switch(re){case t:var ne=R.type;switch(ne){case l:case c:case r:case s:case i:case d:return ne;default:var me=ne&&ne.$$typeof;switch(me){case a:case u:case g:case m:case o:return me;default:return re}}case n:return re}}}var T=l,C=c,N=a,P=o,L=t,y=u,M=r,D=g,B=m,H=n,Y=s,de=i,ie=d,F=!1;function W(R){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),w(R)||A(R)===l}function w(R){return A(R)===c}function z(R){return A(R)===a}function oe(R){return A(R)===o}function E(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function U(R){return A(R)===u}function se(R){return A(R)===r}function $(R){return A(R)===g}function ee(R){return A(R)===m}function Q(R){return A(R)===n}function V(R){return A(R)===s}function G(R){return A(R)===i}function fe(R){return A(R)===d}Me.AsyncMode=T,Me.ConcurrentMode=C,Me.ContextConsumer=N,Me.ContextProvider=P,Me.Element=L,Me.ForwardRef=y,Me.Fragment=M,Me.Lazy=D,Me.Memo=B,Me.Portal=H,Me.Profiler=Y,Me.StrictMode=de,Me.Suspense=ie,Me.isAsyncMode=W,Me.isConcurrentMode=w,Me.isContextConsumer=z,Me.isContextProvider=oe,Me.isElement=E,Me.isForwardRef=U,Me.isFragment=se,Me.isLazy=$,Me.isMemo=ee,Me.isPortal=Q,Me.isProfiler=V,Me.isStrictMode=G,Me.isSuspense=fe,Me.isValidElementType=S,Me.typeOf=A}()),Me}var Lc;function uh(){return Lc||(Lc=1,process.env.NODE_ENV==="production"?Xr.exports=gb():Xr.exports=yb()),Xr.exports}/*
103
44
  object-assign
104
45
  (c) Sindre Sorhus
105
46
  @license MIT
106
- */var ar,Pa;function c0(){if(Pa)return ar;Pa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ar=r()?Object.assign:function(i,o){for(var a,c=s(i),d,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(c[f]=a[f]);if(e){d=e(a);for(var h=0;h<d.length;h++)n.call(a,d[h])&&(c[d[h]]=a[d[h]])}}return c},ar}var lr,Ra;function Fo(){if(Ra)return lr;Ra=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lr=e,lr}var cr,Ia;function dd(){return Ia||(Ia=1,cr=Function.call.bind(Object.prototype.hasOwnProperty)),cr}var dr,Da;function d0(){if(Da)return dr;Da=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fo(),n={},s=dd();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function r(i,o,a,c,d){if(process.env.NODE_ENV!=="production"){for(var u in i)if(s(i,u)){var f;try{if(typeof i[u]!="function"){var h=Error((c||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[u](o,u,c,a,null,t)}catch(x){f=x}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=d?d():"";e("Failed "+a+" type: "+f.message+(p??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},dr=r,dr}var ur,$a;function u0(){if($a)return ur;$a=1;var e=cd(),t=c0(),n=Fo(),s=dd(),r=d0(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return ur=function(a,c){var d=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(M){var O=M&&(d&&M[d]||M[u]);if(typeof O=="function")return O}var h="<<anonymous>>",p={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:C(),arrayOf:T,element:k(),elementType:v(),instanceOf:j,node:y(),objectOf:E,oneOf:V,oneOfType:_,shape:W,exact:te};function x(M,O){return M===O?M!==0||1/M===1/O:M!==M&&O!==O}function m(M,O){this.message=M,this.data=O&&typeof O=="object"?O:{},this.stack=""}m.prototype=Error.prototype;function b(M){if(process.env.NODE_ENV!=="production")var O={},q=0;function Y(re,$,I,L,N,F,se){if(L=L||h,F=F||I,se!==n){if(c){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=L+":"+I;!O[Z]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+F+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),O[Z]=!0,q++)}}return $[I]==null?re?$[I]===null?new m("The "+N+" `"+F+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new m("The "+N+" `"+F+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:M($,I,L,N,F)}var U=Y.bind(null,!1);return U.isRequired=Y.bind(null,!0),U}function S(M){function O(q,Y,U,re,$,I){var L=q[Y],N=fe(L);if(N!==M){var F=ne(L);return new m("Invalid "+re+" `"+$+"` of type "+("`"+F+"` supplied to `"+U+"`, expected ")+("`"+M+"`."),{expectedType:M})}return null}return b(O)}function C(){return b(o)}function T(M){function O(q,Y,U,re,$){if(typeof M!="function")return new m("Property `"+$+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var I=q[Y];if(!Array.isArray(I)){var L=fe(I);return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+U+"`, expected an array."))}for(var N=0;N<I.length;N++){var F=M(I,N,U,re,$+"["+N+"]",n);if(F instanceof Error)return F}return null}return b(O)}function k(){function M(O,q,Y,U,re){var $=O[q];if(!a($)){var I=fe($);return new m("Invalid "+U+" `"+re+"` of type "+("`"+I+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return b(M)}function v(){function M(O,q,Y,U,re){var $=O[q];if(!e.isValidElementType($)){var I=fe($);return new m("Invalid "+U+" `"+re+"` of type "+("`"+I+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return b(M)}function j(M){function O(q,Y,U,re,$){if(!(q[Y]instanceof M)){var I=M.name||h,L=B(q[Y]);return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+U+"`, expected ")+("instance of `"+I+"`."))}return null}return b(O)}function V(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function O(q,Y,U,re,$){for(var I=q[Y],L=0;L<M.length;L++)if(x(I,M[L]))return null;var N=JSON.stringify(M,function(se,A){var Z=ne(A);return Z==="symbol"?String(A):A});return new m("Invalid "+re+" `"+$+"` of value `"+String(I)+"` "+("supplied to `"+U+"`, expected one of "+N+"."))}return b(O)}function E(M){function O(q,Y,U,re,$){if(typeof M!="function")return new m("Property `"+$+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type "+("`"+L+"` supplied to `"+U+"`, expected an object."));for(var N in I)if(s(I,N)){var F=M(I,N,U,re,$+"."+N,n);if(F instanceof Error)return F}return null}return b(O)}function _(M){if(!Array.isArray(M))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var O=0;O<M.length;O++){var q=M[O];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+R(q)+" at index "+O+"."),o}function Y(U,re,$,I,L){for(var N=[],F=0;F<M.length;F++){var se=M[F],A=se(U,re,$,I,L,n);if(A==null)return null;A.data&&s(A.data,"expectedType")&&N.push(A.data.expectedType)}var Z=N.length>0?", expected one of type ["+N.join(", ")+"]":"";return new m("Invalid "+I+" `"+L+"` supplied to "+("`"+$+"`"+Z+"."))}return b(Y)}function y(){function M(O,q,Y,U,re){return ue(O[q])?null:new m("Invalid "+U+" `"+re+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return b(M)}function D(M,O,q,Y,U){return new m((M||"React class")+": "+O+" type `"+q+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function W(M){function O(q,Y,U,re,$){var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type `"+L+"` "+("supplied to `"+U+"`, expected `object`."));for(var N in M){var F=M[N];if(typeof F!="function")return D(U,re,$,N,ne(F));var se=F(I,N,U,re,$+"."+N,n);if(se)return se}return null}return b(O)}function te(M){function O(q,Y,U,re,$){var I=q[Y],L=fe(I);if(L!=="object")return new m("Invalid "+re+" `"+$+"` of type `"+L+"` "+("supplied to `"+U+"`, expected `object`."));var N=t({},q[Y],M);for(var F in N){var se=M[F];if(s(M,F)&&typeof se!="function")return D(U,re,$,F,ne(se));if(!se)return new m("Invalid "+re+" `"+$+"` key `"+F+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(q[Y],null," ")+`
107
- Valid keys: `+JSON.stringify(Object.keys(M),null," "));var A=se(I,F,U,re,$+"."+F,n);if(A)return A}return null}return b(O)}function ue(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(ue);if(M===null||a(M))return!0;var O=f(M);if(O){var q=O.call(M),Y;if(O!==M.entries){for(;!(Y=q.next()).done;)if(!ue(Y.value))return!1}else for(;!(Y=q.next()).done;){var U=Y.value;if(U&&!ue(U[1]))return!1}}else return!1;return!0;default:return!1}}function ie(M,O){return M==="symbol"?!0:O?O["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&O instanceof Symbol:!1}function fe(M){var O=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":ie(O,M)?"symbol":O}function ne(M){if(typeof M>"u"||M===null)return""+M;var O=fe(M);if(O==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return O}function R(M){var O=ne(M);switch(O){case"array":case"object":return"an "+O;case"boolean":case"date":case"regexp":return"a "+O;default:return O}}function B(M){return!M.constructor||!M.constructor.name?h:M.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},ur}var fr,Fa;function f0(){if(Fa)return fr;Fa=1;var e=Fo();function t(){}function n(){}return n.resetWarningCache=t,fr=function(){function s(o,a,c,d,u,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}s.isRequired=s;function r(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:r,element:s,elementType:s,instanceOf:r,node:s,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},fr}var Oa;function h0(){if(Oa)return ns.exports;if(Oa=1,process.env.NODE_ENV!=="production"){var e=cd(),t=!0;ns.exports=u0()(e.isElement,t)}else ns.exports=f0()();return ns.exports}var m0=h0();const ge=i0(m0);function g0(e,t,n=void 0){const s={};for(const r in e){const i=e[r];let o="",a=!0;for(let c=0;c<i.length;c+=1){const d=i[c];d&&(o+=(a===!0?"":" ")+t(d),a=!1,n&&n[d]&&(o+=" "+n[d]))}s[r]=o}return s}var rs={exports:{}},be={};/**
47
+ */var yo,Oc;function xb(){if(Oc)return yo;Oc=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return yo=i()?Object.assign:function(s,o){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var h=0;h<c.length;h++)n.call(a,c[h])&&(l[c[h]]=a[c[h]])}}return l},yo}var xo,$c;function Ca(){if($c)return xo;$c=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return xo=e,xo}var bo,_c;function dh(){return _c||(_c=1,bo=Function.call.bind(Object.prototype.hasOwnProperty)),bo}var vo,Bc;function bb(){if(Bc)return vo;Bc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ca(),n={},r=dh();e=function(s){var o="Warning: "+s;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(s,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var h=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}d=s[u](o,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=c?c():"";e("Failed "+a+" type: "+d.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},vo=i,vo}var wo,zc;function vb(){if(zc)return wo;zc=1;var e=uh(),t=xb(),n=Ca(),r=dh(),i=bb(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return wo=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(w){var z=w&&(c&&w[c]||w[u]);if(typeof z=="function")return z}var h="<<anonymous>>",m={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:k(),arrayOf:S,element:A(),elementType:T(),instanceOf:C,node:y(),objectOf:P,oneOf:N,oneOfType:L,shape:D,exact:B};function g(w,z){return w===z?w!==0||1/w===1/z:w!==w&&z!==z}function p(w,z){this.message=w,this.data=z&&typeof z=="object"?z:{},this.stack=""}p.prototype=Error.prototype;function b(w){if(process.env.NODE_ENV!=="production")var z={},oe=0;function E(se,$,ee,Q,V,G,fe){if(Q=Q||h,G=G||ee,fe!==n){if(l){var R=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var re=Q+":"+ee;!z[re]&&oe<3&&(s("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[re]=!0,oe++)}}return $[ee]==null?se?$[ee]===null?new p("The "+V+" `"+G+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new p("The "+V+" `"+G+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:w($,ee,Q,V,G)}var U=E.bind(null,!1);return U.isRequired=E.bind(null,!0),U}function v(w){function z(oe,E,U,se,$,ee){var Q=oe[E],V=de(Q);if(V!==w){var G=ie(Q);return new p("Invalid "+se+" `"+$+"` of type "+("`"+G+"` supplied to `"+U+"`, expected ")+("`"+w+"`."),{expectedType:w})}return null}return b(z)}function k(){return b(o)}function S(w){function z(oe,E,U,se,$){if(typeof w!="function")return new p("Property `"+$+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var ee=oe[E];if(!Array.isArray(ee)){var Q=de(ee);return new p("Invalid "+se+" `"+$+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an array."))}for(var V=0;V<ee.length;V++){var G=w(ee,V,U,se,$+"["+V+"]",n);if(G instanceof Error)return G}return null}return b(z)}function A(){function w(z,oe,E,U,se){var $=z[oe];if(!a($)){var ee=de($);return new p("Invalid "+U+" `"+se+"` of type "+("`"+ee+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return b(w)}function T(){function w(z,oe,E,U,se){var $=z[oe];if(!e.isValidElementType($)){var ee=de($);return new p("Invalid "+U+" `"+se+"` of type "+("`"+ee+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return b(w)}function C(w){function z(oe,E,U,se,$){if(!(oe[E]instanceof w)){var ee=w.name||h,Q=W(oe[E]);return new p("Invalid "+se+" `"+$+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected ")+("instance of `"+ee+"`."))}return null}return b(z)}function N(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),o;function z(oe,E,U,se,$){for(var ee=oe[E],Q=0;Q<w.length;Q++)if(g(ee,w[Q]))return null;var V=JSON.stringify(w,function(fe,R){var re=ie(R);return re==="symbol"?String(R):R});return new p("Invalid "+se+" `"+$+"` of value `"+String(ee)+"` "+("supplied to `"+U+"`, expected one of "+V+"."))}return b(z)}function P(w){function z(oe,E,U,se,$){if(typeof w!="function")return new p("Property `"+$+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var ee=oe[E],Q=de(ee);if(Q!=="object")return new p("Invalid "+se+" `"+$+"` of type "+("`"+Q+"` supplied to `"+U+"`, expected an object."));for(var V in ee)if(r(ee,V)){var G=w(ee,V,U,se,$+"."+V,n);if(G instanceof Error)return G}return null}return b(z)}function L(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var z=0;z<w.length;z++){var oe=w[z];if(typeof oe!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+F(oe)+" at index "+z+"."),o}function E(U,se,$,ee,Q){for(var V=[],G=0;G<w.length;G++){var fe=w[G],R=fe(U,se,$,ee,Q,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&V.push(R.data.expectedType)}var re=V.length>0?", expected one of type ["+V.join(", ")+"]":"";return new p("Invalid "+ee+" `"+Q+"` supplied to "+("`"+$+"`"+re+"."))}return b(E)}function y(){function w(z,oe,E,U,se){return H(z[oe])?null:new p("Invalid "+U+" `"+se+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return b(w)}function M(w,z,oe,E,U){return new p((w||"React class")+": "+z+" type `"+oe+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function D(w){function z(oe,E,U,se,$){var ee=oe[E],Q=de(ee);if(Q!=="object")return new p("Invalid "+se+" `"+$+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));for(var V in w){var G=w[V];if(typeof G!="function")return M(U,se,$,V,ie(G));var fe=G(ee,V,U,se,$+"."+V,n);if(fe)return fe}return null}return b(z)}function B(w){function z(oe,E,U,se,$){var ee=oe[E],Q=de(ee);if(Q!=="object")return new p("Invalid "+se+" `"+$+"` of type `"+Q+"` "+("supplied to `"+U+"`, expected `object`."));var V=t({},oe[E],w);for(var G in V){var fe=w[G];if(r(w,G)&&typeof fe!="function")return M(U,se,$,G,ie(fe));if(!fe)return new p("Invalid "+se+" `"+$+"` key `"+G+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(oe[E],null," ")+`
48
+ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var R=fe(ee,G,U,se,$+"."+G,n);if(R)return R}return null}return b(z)}function H(w){switch(typeof w){case"number":case"string":case"undefined":return!0;case"boolean":return!w;case"object":if(Array.isArray(w))return w.every(H);if(w===null||a(w))return!0;var z=d(w);if(z){var oe=z.call(w),E;if(z!==w.entries){for(;!(E=oe.next()).done;)if(!H(E.value))return!1}else for(;!(E=oe.next()).done;){var U=E.value;if(U&&!H(U[1]))return!1}}else return!1;return!0;default:return!1}}function Y(w,z){return w==="symbol"?!0:z?z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&z instanceof Symbol:!1}function de(w){var z=typeof w;return Array.isArray(w)?"array":w instanceof RegExp?"object":Y(z,w)?"symbol":z}function ie(w){if(typeof w>"u"||w===null)return""+w;var z=de(w);if(z==="object"){if(w instanceof Date)return"date";if(w instanceof RegExp)return"regexp"}return z}function F(w){var z=ie(w);switch(z){case"array":case"object":return"an "+z;case"boolean":case"date":case"regexp":return"a "+z;default:return z}}function W(w){return!w.constructor||!w.constructor.name?h:w.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},wo}var ko,Hc;function wb(){if(Hc)return ko;Hc=1;var e=Ca();function t(){}function n(){}return n.resetWarningCache=t,ko=function(){function r(o,a,l,c,u,d){if(d!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ko}var Uc;function kb(){if(Uc)return Yr.exports;if(Uc=1,process.env.NODE_ENV!=="production"){var e=uh(),t=!0;Yr.exports=vb()(e.isElement,t)}else Yr.exports=wb()();return Yr.exports}var Sb=kb();const Te=Sa(Sb);function Cb(e,t,n=void 0){const r={};for(const i in e){const s=e[i];let o="",a=!0;for(let l=0;l<s.length;l+=1){const c=s[l];c&&(o+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(o+=" "+n[c]))}r[i]=o}return r}var Qr={exports:{}},Ie={};/**
108
49
  * @license React
109
50
  * react-is.production.js
110
51
  *
@@ -112,7 +53,7 @@ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var A=se(I,F,U,re,$+"."+
112
53
  *
113
54
  * This source code is licensed under the MIT license found in the
114
55
  * LICENSE file in the root directory of this source tree.
115
- */var La;function p0(){if(La)return be;La=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function x(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case n:case r:case s:case c:case d:case h:return m;default:switch(m=m&&m.$$typeof,m){case o:case a:case f:case u:return m;case i:return m;default:return b}}case t:return b}}}return be.ContextConsumer=i,be.ContextProvider=o,be.Element=e,be.ForwardRef=a,be.Fragment=n,be.Lazy=f,be.Memo=u,be.Portal=t,be.Profiler=r,be.StrictMode=s,be.Suspense=c,be.SuspenseList=d,be.isContextConsumer=function(m){return x(m)===i},be.isContextProvider=function(m){return x(m)===o},be.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},be.isForwardRef=function(m){return x(m)===a},be.isFragment=function(m){return x(m)===n},be.isLazy=function(m){return x(m)===f},be.isMemo=function(m){return x(m)===u},be.isPortal=function(m){return x(m)===t},be.isProfiler=function(m){return x(m)===r},be.isStrictMode=function(m){return x(m)===s},be.isSuspense=function(m){return x(m)===c},be.isSuspenseList=function(m){return x(m)===d},be.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===r||m===s||m===c||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===u||m.$$typeof===o||m.$$typeof===i||m.$$typeof===a||m.$$typeof===p||m.getModuleId!==void 0)},be.typeOf=x,be}var ve={};/**
56
+ */var Wc;function Eb(){if(Wc)return Ie;Wc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");function g(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case i:case r:case l:case c:case h:return p;default:switch(p=p&&p.$$typeof,p){case o:case a:case d:case u:return p;case s:return p;default:return b}}case t:return b}}}return Ie.ContextConsumer=s,Ie.ContextProvider=o,Ie.Element=e,Ie.ForwardRef=a,Ie.Fragment=n,Ie.Lazy=d,Ie.Memo=u,Ie.Portal=t,Ie.Profiler=i,Ie.StrictMode=r,Ie.Suspense=l,Ie.SuspenseList=c,Ie.isContextConsumer=function(p){return g(p)===s},Ie.isContextProvider=function(p){return g(p)===o},Ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},Ie.isForwardRef=function(p){return g(p)===a},Ie.isFragment=function(p){return g(p)===n},Ie.isLazy=function(p){return g(p)===d},Ie.isMemo=function(p){return g(p)===u},Ie.isPortal=function(p){return g(p)===t},Ie.isProfiler=function(p){return g(p)===i},Ie.isStrictMode=function(p){return g(p)===r},Ie.isSuspense=function(p){return g(p)===l},Ie.isSuspenseList=function(p){return g(p)===c},Ie.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===i||p===r||p===l||p===c||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===u||p.$$typeof===o||p.$$typeof===s||p.$$typeof===a||p.$$typeof===m||p.getModuleId!==void 0)},Ie.typeOf=g,Ie}var Re={};/**
116
57
  * @license React
117
58
  * react-is.development.js
118
59
  *
@@ -120,23 +61,23 @@ Valid keys: `+JSON.stringify(Object.keys(M),null," "));var A=se(I,F,U,re,$+"."+
120
61
  *
121
62
  * This source code is licensed under the MIT license found in the
122
63
  * LICENSE file in the root directory of this source tree.
123
- */var _a;function y0(){return _a||(_a=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case s:case i:case r:case d:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case c:case h:case f:return m;case o:return m;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");ve.ContextConsumer=o,ve.ContextProvider=a,ve.Element=t,ve.ForwardRef=c,ve.Fragment=s,ve.Lazy=h,ve.Memo=f,ve.Portal=n,ve.Profiler=i,ve.StrictMode=r,ve.Suspense=d,ve.SuspenseList=u,ve.isContextConsumer=function(m){return e(m)===o},ve.isContextProvider=function(m){return e(m)===a},ve.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},ve.isForwardRef=function(m){return e(m)===c},ve.isFragment=function(m){return e(m)===s},ve.isLazy=function(m){return e(m)===h},ve.isMemo=function(m){return e(m)===f},ve.isPortal=function(m){return e(m)===n},ve.isProfiler=function(m){return e(m)===i},ve.isStrictMode=function(m){return e(m)===r},ve.isSuspense=function(m){return e(m)===d},ve.isSuspenseList=function(m){return e(m)===u},ve.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===s||m===i||m===r||m===d||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===a||m.$$typeof===o||m.$$typeof===c||m.$$typeof===x||m.getModuleId!==void 0)},ve.typeOf=e}()),ve}var Ba;function x0(){return Ba||(Ba=1,process.env.NODE_ENV==="production"?rs.exports=p0():rs.exports=y0()),rs.exports}var Ss=x0();function pt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ud(e){if(g.isValidElement(e)||Ss.isValidElementType(e)||!pt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ud(e[n])}),t}function qe(e,t,n={clone:!0}){const s=n.clone?{...e}:e;return pt(e)&&pt(t)&&Object.keys(t).forEach(r=>{g.isValidElement(t[r])||Ss.isValidElementType(t[r])?s[r]=t[r]:pt(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&pt(e[r])?s[r]=qe(e[r],t[r],n):n.clone?s[r]=pt(t[r])?ud(t[r]):t[r]:s[r]=t[r]}),s}function Vn(e,t){return t?qe(e,t,{clone:!1}):e}const Pt=process.env.NODE_ENV!=="production"?ge.oneOfType([ge.number,ge.string,ge.object,ge.array]):{};function Ua(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(s=>s.startsWith("@container")).sort((s,r)=>{var o,a;const i=/min-width:\s*([0-9.]+)/;return+(((o=s.match(i))==null?void 0:o[1])||0)-+(((a=r.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((s,r)=>{const i=t[r];return delete s[r],s[r]=i,s},{...t}):t}function b0(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function v0(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
124
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Nt(18,`(${t})`));return null}const[,s,r]=n,i=Number.isNaN(+s)?s||0:+s;return e.containerQueries(r).up(i)}function w0(e){const t=(i,o)=>i.replace("@media",o?`@container ${o}`:"@container");function n(i,o){i.up=(...a)=>t(e.breakpoints.up(...a),o),i.down=(...a)=>t(e.breakpoints.down(...a),o),i.between=(...a)=>t(e.breakpoints.between(...a),o),i.only=(...a)=>t(e.breakpoints.only(...a),o),i.not=(...a)=>{const c=t(e.breakpoints.not(...a),o);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const s={},r=i=>(n(s,i),s);return n(r),{...e,containerQueries:r}}const Ms={xs:0,sm:600,md:900,lg:1200,xl:1536},Ha={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Ms[e]}px)`},S0={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Ms[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function vt(e,t,n){const s=e.theme||{};if(Array.isArray(t)){const i=s.breakpoints||Ha;return t.reduce((o,a,c)=>(o[i.up(i.keys[c])]=n(t[c]),o),{})}if(typeof t=="object"){const i=s.breakpoints||Ha;return Object.keys(t).reduce((o,a)=>{if(b0(i.keys,a)){const c=v0(s.containerQueries?s:S0,a);c&&(o[c]=n(t[a],a))}else if(Object.keys(i.values||Ms).includes(a)){const c=i.up(a);o[c]=n(t[a],a)}else{const c=a;o[c]=t[c]}return o},{})}return n(t)}function C0(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((s,r)=>{const i=e.up(r);return s[i]={},s},{}))||{}}function za(e,t){return e.reduce((n,s)=>{const r=n[s];return(!r||Object.keys(r).length===0)&&delete n[s],n},t)}function Vs(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const s=`vars.${t}`.split(".").reduce((r,i)=>r&&r[i]?r[i]:null,e);if(s!=null)return s}return t.split(".").reduce((s,r)=>s&&s[r]!=null?s[r]:null,e)}function Cs(e,t,n,s=n){let r;return typeof e=="function"?r=e(n):Array.isArray(e)?r=e[n]||s:r=Vs(e,n)||s,t&&(r=t(r,s,e)),r}function Fe(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:r}=e,i=o=>{if(o[t]==null)return null;const a=o[t],c=o.theme,d=Vs(c,s)||{};return vt(o,a,f=>{let h=Cs(d,r,f);return f===h&&typeof f=="string"&&(h=Cs(d,r,`${t}${f==="default"?"":zt(f)}`,f)),n===!1?h:{[n]:h}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:Pt}:{},i.filterProps=[t],i}function k0(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const T0={m:"margin",p:"padding"},E0={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Wa={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},A0=k0(e=>{if(e.length>2)if(Wa[e])e=Wa[e];else return[e];const[t,n]=e.split(""),s=T0[t],r=E0[n]||"";return Array.isArray(r)?r.map(i=>s+i):[s+r]}),Ps=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],j0=[...Ps,...Rs];function Hn(e,t,n,s){const r=Vs(e,t,!0)??n;return typeof r=="number"||typeof r=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${s} argument to be a number or a string, got ${i}.`),typeof r=="string"?r.startsWith("var(")&&i===0?0:r.startsWith("var(")&&i===1?r:`calc(${i} * ${r})`:r*i):Array.isArray(r)?i=>{if(typeof i=="string")return i;const o=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>r.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(r)}.`,`${o} > ${r.length-1}, you need to add the missing values.`].join(`
64
+ */var Zc;function Tb(){return Zc||(Zc=1,process.env.NODE_ENV!=="production"&&function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case r:case s:case i:case c:case u:case m:return p;default:switch(p=p&&p.$$typeof,p){case a:case l:case h:case d:return p;case o:return p;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");Re.ContextConsumer=o,Re.ContextProvider=a,Re.Element=t,Re.ForwardRef=l,Re.Fragment=r,Re.Lazy=h,Re.Memo=d,Re.Portal=n,Re.Profiler=s,Re.StrictMode=i,Re.Suspense=c,Re.SuspenseList=u,Re.isContextConsumer=function(p){return e(p)===o},Re.isContextProvider=function(p){return e(p)===a},Re.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},Re.isForwardRef=function(p){return e(p)===l},Re.isFragment=function(p){return e(p)===r},Re.isLazy=function(p){return e(p)===h},Re.isMemo=function(p){return e(p)===d},Re.isPortal=function(p){return e(p)===n},Re.isProfiler=function(p){return e(p)===s},Re.isStrictMode=function(p){return e(p)===i},Re.isSuspense=function(p){return e(p)===c},Re.isSuspenseList=function(p){return e(p)===u},Re.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===s||p===i||p===c||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===h||p.$$typeof===d||p.$$typeof===a||p.$$typeof===o||p.$$typeof===l||p.$$typeof===g||p.getModuleId!==void 0)},Re.typeOf=e}()),Re}var qc;function Ab(){return qc||(qc=1,process.env.NODE_ENV==="production"?Qr.exports=Eb():Qr.exports=Tb()),Qr.exports}var ki=Ab();function Bt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function fh(e){if(x.isValidElement(e)||ki.isValidElementType(e)||!Bt(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=fh(e[n])}),t}function yt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Bt(e)&&Bt(t)&&Object.keys(t).forEach(i=>{x.isValidElement(t[i])||ki.isValidElementType(t[i])?r[i]=t[i]:Bt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Bt(e[i])?r[i]=yt(e[i],t[i],n):n.clone?r[i]=Bt(t[i])?fh(t[i]):t[i]:r[i]=t[i]}),r}function br(e,t){return t?yt(e,t,{clone:!1}):e}const an=process.env.NODE_ENV!=="production"?Te.oneOfType([Te.number,Te.string,Te.object,Te.array]):{};function Gc(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var o,a;const s=/min-width:\s*([0-9.]+)/;return+(((o=r.match(s))==null?void 0:o[1])||0)-+(((a=i.match(s))==null?void 0:a[1])||0)});return n.length?n.reduce((r,i)=>{const s=t[i];return delete r[i],r[i]=s,r},{...t}):t}function jb(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Pb(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
65
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:rn(18,`(${t})`));return null}const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function Mb(e){const t=(s,o)=>s.replace("@media",o?`@container ${o}`:"@container");function n(s,o){s.up=(...a)=>t(e.breakpoints.up(...a),o),s.down=(...a)=>t(e.breakpoints.down(...a),o),s.between=(...a)=>t(e.breakpoints.between(...a),o),s.only=(...a)=>t(e.breakpoints.only(...a),o),s.not=(...a)=>{const l=t(e.breakpoints.not(...a),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=s=>(n(r,s),r);return n(i),{...e,containerQueries:i}}const Di={xs:0,sm:600,md:900,lg:1200,xl:1536},Kc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Di[e]}px)`},Nb={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Di[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Zt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Kc;return t.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(t[l]),o),{})}if(typeof t=="object"){const s=r.breakpoints||Kc;return Object.keys(t).reduce((o,a)=>{if(jb(s.keys,a)){const l=Pb(r.containerQueries?r:Nb,a);l&&(o[l]=n(t[a],a))}else if(Object.keys(s.values||Di).includes(a)){const l=s.up(a);o[l]=n(t[a],a)}else{const l=a;o[l]=t[l]}return o},{})}return n(t)}function Ib(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const s=e.up(i);return r[s]={},r},{}))||{}}function Yc(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Fi(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Si(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Fi(e,n)||r,t&&(i=t(i,r,e)),i}function Qe(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=o=>{if(o[t]==null)return null;const a=o[t],l=o.theme,c=Fi(l,r)||{};return Zt(o,a,d=>{let h=Si(c,i,d);return d===h&&typeof d=="string"&&(h=Si(c,i,`${t}${d==="default"?"":wn(d)}`,d)),n===!1?h:{[n]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:an}:{},s.filterProps=[t],s}function Rb(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Vb={m:"margin",p:"padding"},Db={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Xc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Fb=Rb(e=>{if(e.length>2)if(Xc[e])e=Xc[e];else return[e];const[t,n]=e.split(""),r=Vb[t],i=Db[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),Li=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Oi=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Lb=[...Li,...Oi];function Lr(e,t,n,r){const i=Fi(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${s}.`),typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const o=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
125
66
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
126
- `)));const a=r[o];return i>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof r=="function"?r:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${r}) is invalid.`,"It should be a number, an array or a function."].join(`
127
- `)),()=>{})}function Oo(e){return Hn(e,"spacing",8,"spacing")}function zn(e,t){return typeof t=="string"||t==null?t:e(t)}function N0(e,t){return n=>e.reduce((s,r)=>(s[r]=zn(t,n),s),{})}function M0(e,t,n,s){if(!t.includes(n))return null;const r=A0(n),i=N0(r,s),o=e[n];return vt(e,o,i)}function fd(e,t){const n=Oo(e.theme);return Object.keys(e).map(s=>M0(e,t,s,n)).reduce(Vn,{})}function Re(e){return fd(e,Ps)}Re.propTypes=process.env.NODE_ENV!=="production"?Ps.reduce((e,t)=>(e[t]=Pt,e),{}):{};Re.filterProps=Ps;function Ie(e){return fd(e,Rs)}Ie.propTypes=process.env.NODE_ENV!=="production"?Rs.reduce((e,t)=>(e[t]=Pt,e),{}):{};Ie.filterProps=Rs;process.env.NODE_ENV!=="production"&&j0.reduce((e,t)=>(e[t]=Pt,e),{});function Is(...e){const t=e.reduce((s,r)=>(r.filterProps.forEach(i=>{s[i]=r}),s),{}),n=s=>Object.keys(s).reduce((r,i)=>t[i]?Vn(r,t[i](s)):r,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((s,r)=>Object.assign(s,r.propTypes),{}):{},n.filterProps=e.reduce((s,r)=>s.concat(r.filterProps),[]),n}function et(e){return typeof e!="number"?e:`${e}px solid`}function st(e,t){return Fe({prop:e,themeKey:"borders",transform:t})}const V0=st("border",et),P0=st("borderTop",et),R0=st("borderRight",et),I0=st("borderBottom",et),D0=st("borderLeft",et),$0=st("borderColor"),F0=st("borderTopColor"),O0=st("borderRightColor"),L0=st("borderBottomColor"),_0=st("borderLeftColor"),B0=st("outline",et),U0=st("outlineColor"),Ds=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Hn(e.theme,"shape.borderRadius",4,"borderRadius"),n=s=>({borderRadius:zn(t,s)});return vt(e,e.borderRadius,n)}return null};Ds.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Pt}:{};Ds.filterProps=["borderRadius"];Is(V0,P0,R0,I0,D0,$0,F0,O0,L0,_0,Ds,B0,U0);const $s=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Hn(e.theme,"spacing",8,"gap"),n=s=>({gap:zn(t,s)});return vt(e,e.gap,n)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{gap:Pt}:{};$s.filterProps=["gap"];const Fs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Hn(e.theme,"spacing",8,"columnGap"),n=s=>({columnGap:zn(t,s)});return vt(e,e.columnGap,n)}return null};Fs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Pt}:{};Fs.filterProps=["columnGap"];const Os=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Hn(e.theme,"spacing",8,"rowGap"),n=s=>({rowGap:zn(t,s)});return vt(e,e.rowGap,n)}return null};Os.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Pt}:{};Os.filterProps=["rowGap"];const H0=Fe({prop:"gridColumn"}),z0=Fe({prop:"gridRow"}),W0=Fe({prop:"gridAutoFlow"}),Z0=Fe({prop:"gridAutoColumns"}),G0=Fe({prop:"gridAutoRows"}),K0=Fe({prop:"gridTemplateColumns"}),Y0=Fe({prop:"gridTemplateRows"}),q0=Fe({prop:"gridTemplateAreas"}),X0=Fe({prop:"gridArea"});Is($s,Fs,Os,H0,z0,W0,Z0,G0,K0,Y0,q0,X0);function ln(e,t){return t==="grey"?t:e}const J0=Fe({prop:"color",themeKey:"palette",transform:ln}),Q0=Fe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ln}),ey=Fe({prop:"backgroundColor",themeKey:"palette",transform:ln});Is(J0,Q0,ey);function Ye(e){return e<=1&&e!==0?`${e*100}%`:e}const ty=Fe({prop:"width",transform:Ye}),Lo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i,o,a,c;const s=((o=(i=(r=e.theme)==null?void 0:r.breakpoints)==null?void 0:i.values)==null?void 0:o[n])||Ms[n];return s?((c=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Ye(n)}};return vt(e,e.maxWidth,t)}return null};Lo.filterProps=["maxWidth"];const ny=Fe({prop:"minWidth",transform:Ye}),sy=Fe({prop:"height",transform:Ye}),ry=Fe({prop:"maxHeight",transform:Ye}),oy=Fe({prop:"minHeight",transform:Ye});Fe({prop:"size",cssProperty:"width",transform:Ye});Fe({prop:"size",cssProperty:"height",transform:Ye});const iy=Fe({prop:"boxSizing"});Is(ty,Lo,ny,sy,ry,oy,iy);const Ls={border:{themeKey:"borders",transform:et},borderTop:{themeKey:"borders",transform:et},borderRight:{themeKey:"borders",transform:et},borderBottom:{themeKey:"borders",transform:et},borderLeft:{themeKey:"borders",transform:et},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:et},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ds},color:{themeKey:"palette",transform:ln},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ln},backgroundColor:{themeKey:"palette",transform:ln},p:{style:Ie},pt:{style:Ie},pr:{style:Ie},pb:{style:Ie},pl:{style:Ie},px:{style:Ie},py:{style:Ie},padding:{style:Ie},paddingTop:{style:Ie},paddingRight:{style:Ie},paddingBottom:{style:Ie},paddingLeft:{style:Ie},paddingX:{style:Ie},paddingY:{style:Ie},paddingInline:{style:Ie},paddingInlineStart:{style:Ie},paddingInlineEnd:{style:Ie},paddingBlock:{style:Ie},paddingBlockStart:{style:Ie},paddingBlockEnd:{style:Ie},m:{style:Re},mt:{style:Re},mr:{style:Re},mb:{style:Re},ml:{style:Re},mx:{style:Re},my:{style:Re},margin:{style:Re},marginTop:{style:Re},marginRight:{style:Re},marginBottom:{style:Re},marginLeft:{style:Re},marginX:{style:Re},marginY:{style:Re},marginInline:{style:Re},marginInlineStart:{style:Re},marginInlineEnd:{style:Re},marginBlock:{style:Re},marginBlockStart:{style:Re},marginBlockEnd:{style:Re},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$s},rowGap:{style:Os},columnGap:{style:Fs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ye},maxWidth:{style:Lo},minWidth:{transform:Ye},height:{transform:Ye},maxHeight:{transform:Ye},minHeight:{transform:Ye},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function ay(...e){const t=e.reduce((s,r)=>s.concat(Object.keys(r)),[]),n=new Set(t);return e.every(s=>n.size===Object.keys(s).length)}function ly(e,t){return typeof e=="function"?e(t):e}function cy(){function e(n,s,r,i){const o={[n]:s,theme:r},a=i[n];if(!a)return{[n]:s};const{cssProperty:c=n,themeKey:d,transform:u,style:f}=a;if(s==null)return null;if(d==="typography"&&s==="inherit")return{[n]:s};const h=Vs(r,d)||{};return f?f(o):vt(o,s,x=>{let m=Cs(h,u,x);return x===m&&typeof x=="string"&&(m=Cs(h,u,`${n}${x==="default"?"":zt(x)}`,x)),c===!1?m:{[c]:m}})}function t(n){const{sx:s,theme:r={},nested:i}=n||{};if(!s)return null;const o=r.unstable_sxConfig??Ls;function a(c){let d=c;if(typeof c=="function")d=c(r);else if(typeof c!="object")return c;if(!d)return null;const u=C0(r.breakpoints),f=Object.keys(u);let h=u;return Object.keys(d).forEach(p=>{const x=ly(d[p],r);if(x!=null)if(typeof x=="object")if(o[p])h=Vn(h,e(p,x,r,o));else{const m=vt({theme:r},x,b=>({[p]:b}));ay(m,x)?h[p]=t({sx:x,theme:r,nested:!0}):h=Vn(h,m)}else h=Vn(h,e(p,x,r,o))}),!i&&r.modularCssLayers?{"@layer sx":Ua(r,za(f,h))}:Ua(r,za(f,h))}return Array.isArray(s)?s.map(a):a(s)}return t}const fn=cy();fn.filterProps=["sx"];function dy(e){for(var t=0,n,s=0,r=e.length;r>=4;++s,r-=4)n=e.charCodeAt(s)&255|(e.charCodeAt(++s)&255)<<8|(e.charCodeAt(++s)&255)<<16|(e.charCodeAt(++s)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(r){case 3:t^=(e.charCodeAt(s+2)&255)<<16;case 2:t^=(e.charCodeAt(s+1)&255)<<8;case 1:t^=e.charCodeAt(s)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var uy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function fy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var hy=/[A-Z]|^ms/g,my=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hd=function(t){return t.charCodeAt(1)===45},Za=function(t){return t!=null&&typeof t!="boolean"},hr=fy(function(e){return hd(e)?e:e.replace(hy,"-$&").toLowerCase()}),Ga=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(my,function(s,r,i){return Tt={name:r,styles:i,next:Tt},r})}return uy[t]!==1&&!hd(t)&&typeof n=="number"&&n!==0?n+"px":n};function ks(e,t,n){if(n==null)return"";var s=n;if(s.__emotion_styles!==void 0)return s;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Tt={name:r.name,styles:r.styles,next:Tt},r.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Tt={name:o.name,styles:o.styles,next:Tt},o=o.next;var a=i.styles+";";return a}return gy(e,t,n)}}var c=n;return c}function gy(e,t,n){var s="";if(Array.isArray(n))for(var r=0;r<n.length;r++)s+=ks(e,t,n[r])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var a=o;Za(a)&&(s+=hr(i)+":"+Ga(i,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var c=0;c<o.length;c++)Za(o[c])&&(s+=hr(i)+":"+Ga(i,o[c])+";");else{var d=ks(e,t,o);switch(i){case"animation":case"animationName":{s+=hr(i)+":"+d+";";break}default:s+=i+"{"+d+"}"}}}return s}var Ka=/label:\s*([^\s;{]+)\s*(;|$)/g,Tt;function py(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,r="";Tt=void 0;var i=e[0];if(i==null||i.raw===void 0)s=!1,r+=ks(n,t,i);else{var o=i;r+=o[0]}for(var a=1;a<e.length;a++)if(r+=ks(n,t,e[a]),s){var c=i;r+=c[a]}Ka.lastIndex=0;for(var d="",u;(u=Ka.exec(r))!==null;)d+="-"+u[1];var f=dy(r)+d;return{name:f,styles:r,next:Tt}}/**
67
+ `)));const a=i[o];return s>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
68
+ `)),()=>{})}function Ea(e){return Lr(e,"spacing",8,"spacing")}function Or(e,t){return typeof t=="string"||t==null?t:e(t)}function Ob(e,t){return n=>e.reduce((r,i)=>(r[i]=Or(t,n),r),{})}function $b(e,t,n,r){if(!t.includes(n))return null;const i=Fb(n),s=Ob(i,r),o=e[n];return Zt(e,o,s)}function hh(e,t){const n=Ea(e.theme);return Object.keys(e).map(r=>$b(e,t,r,n)).reduce(br,{})}function Ge(e){return hh(e,Li)}Ge.propTypes=process.env.NODE_ENV!=="production"?Li.reduce((e,t)=>(e[t]=an,e),{}):{};Ge.filterProps=Li;function Ke(e){return hh(e,Oi)}Ke.propTypes=process.env.NODE_ENV!=="production"?Oi.reduce((e,t)=>(e[t]=an,e),{}):{};Ke.filterProps=Oi;process.env.NODE_ENV!=="production"&&Lb.reduce((e,t)=>(e[t]=an,e),{});function $i(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?br(i,t[s](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function wt(e){return typeof e!="number"?e:`${e}px solid`}function Et(e,t){return Qe({prop:e,themeKey:"borders",transform:t})}const _b=Et("border",wt),Bb=Et("borderTop",wt),zb=Et("borderRight",wt),Hb=Et("borderBottom",wt),Ub=Et("borderLeft",wt),Wb=Et("borderColor"),Zb=Et("borderTopColor"),qb=Et("borderRightColor"),Gb=Et("borderBottomColor"),Kb=Et("borderLeftColor"),Yb=Et("outline",wt),Xb=Et("outlineColor"),_i=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Lr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Or(t,r)});return Zt(e,e.borderRadius,n)}return null};_i.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:an}:{};_i.filterProps=["borderRadius"];$i(_b,Bb,zb,Hb,Ub,Wb,Zb,qb,Gb,Kb,_i,Yb,Xb);const Bi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Lr(e.theme,"spacing",8,"gap"),n=r=>({gap:Or(t,r)});return Zt(e,e.gap,n)}return null};Bi.propTypes=process.env.NODE_ENV!=="production"?{gap:an}:{};Bi.filterProps=["gap"];const zi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Lr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Or(t,r)});return Zt(e,e.columnGap,n)}return null};zi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:an}:{};zi.filterProps=["columnGap"];const Hi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Lr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Or(t,r)});return Zt(e,e.rowGap,n)}return null};Hi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:an}:{};Hi.filterProps=["rowGap"];const Qb=Qe({prop:"gridColumn"}),Jb=Qe({prop:"gridRow"}),ev=Qe({prop:"gridAutoFlow"}),tv=Qe({prop:"gridAutoColumns"}),nv=Qe({prop:"gridAutoRows"}),rv=Qe({prop:"gridTemplateColumns"}),iv=Qe({prop:"gridTemplateRows"}),ov=Qe({prop:"gridTemplateAreas"}),sv=Qe({prop:"gridArea"});$i(Bi,zi,Hi,Qb,Jb,ev,tv,nv,rv,iv,ov,sv);function Un(e,t){return t==="grey"?t:e}const av=Qe({prop:"color",themeKey:"palette",transform:Un}),lv=Qe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Un}),cv=Qe({prop:"backgroundColor",themeKey:"palette",transform:Un});$i(av,lv,cv);function gt(e){return e<=1&&e!==0?`${e*100}%`:e}const uv=Qe({prop:"width",transform:gt}),Ta=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,s,o,a,l;const r=((o=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:o[n])||Di[n];return r?((l=(a=e.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:gt(n)}};return Zt(e,e.maxWidth,t)}return null};Ta.filterProps=["maxWidth"];const dv=Qe({prop:"minWidth",transform:gt}),fv=Qe({prop:"height",transform:gt}),hv=Qe({prop:"maxHeight",transform:gt}),mv=Qe({prop:"minHeight",transform:gt});Qe({prop:"size",cssProperty:"width",transform:gt});Qe({prop:"size",cssProperty:"height",transform:gt});const pv=Qe({prop:"boxSizing"});$i(uv,Ta,dv,fv,hv,mv,pv);const Ui={border:{themeKey:"borders",transform:wt},borderTop:{themeKey:"borders",transform:wt},borderRight:{themeKey:"borders",transform:wt},borderBottom:{themeKey:"borders",transform:wt},borderLeft:{themeKey:"borders",transform:wt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:_i},color:{themeKey:"palette",transform:Un},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Un},backgroundColor:{themeKey:"palette",transform:Un},p:{style:Ke},pt:{style:Ke},pr:{style:Ke},pb:{style:Ke},pl:{style:Ke},px:{style:Ke},py:{style:Ke},padding:{style:Ke},paddingTop:{style:Ke},paddingRight:{style:Ke},paddingBottom:{style:Ke},paddingLeft:{style:Ke},paddingX:{style:Ke},paddingY:{style:Ke},paddingInline:{style:Ke},paddingInlineStart:{style:Ke},paddingInlineEnd:{style:Ke},paddingBlock:{style:Ke},paddingBlockStart:{style:Ke},paddingBlockEnd:{style:Ke},m:{style:Ge},mt:{style:Ge},mr:{style:Ge},mb:{style:Ge},ml:{style:Ge},mx:{style:Ge},my:{style:Ge},margin:{style:Ge},marginTop:{style:Ge},marginRight:{style:Ge},marginBottom:{style:Ge},marginLeft:{style:Ge},marginX:{style:Ge},marginY:{style:Ge},marginInline:{style:Ge},marginInlineStart:{style:Ge},marginInlineEnd:{style:Ge},marginBlock:{style:Ge},marginBlockStart:{style:Ge},marginBlockEnd:{style:Ge},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Bi},rowGap:{style:Hi},columnGap:{style:zi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:gt},maxWidth:{style:Ta},minWidth:{transform:gt},height:{transform:gt},maxHeight:{transform:gt},minHeight:{transform:gt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function gv(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function yv(e,t){return typeof e=="function"?e(t):e}function xv(){function e(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const h=Fi(i,c)||{};return d?d(o):Zt(o,r,g=>{let p=Si(h,u,g);return g===p&&typeof g=="string"&&(p=Si(h,u,`${n}${g==="default"?"":wn(g)}`,g)),l===!1?p:{[l]:p}})}function t(n){const{sx:r,theme:i={},nested:s}=n||{};if(!r)return null;const o=i.unstable_sxConfig??Ui;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=Ib(i.breakpoints),d=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const g=yv(c[m],i);if(g!=null)if(typeof g=="object")if(o[m])h=br(h,e(m,g,i,o));else{const p=Zt({theme:i},g,b=>({[m]:b}));gv(p,g)?h[m]=t({sx:g,theme:i,nested:!0}):h=br(h,p)}else h=br(h,e(m,g,i,o))}),!s&&i.modularCssLayers?{"@layer sx":Gc(i,Yc(d,h))}:Gc(i,Yc(d,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Gn=xv();Gn.filterProps=["sx"];function bv(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var vv={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function wv(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var kv=/[A-Z]|^ms/g,Sv=/_EMO_([^_]+?)_([^]*?)_EMO_/g,mh=function(t){return t.charCodeAt(1)===45},Qc=function(t){return t!=null&&typeof t!="boolean"},So=wv(function(e){return mh(e)?e:e.replace(kv,"-$&").toLowerCase()}),Jc=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Sv,function(r,i,s){return Jt={name:i,styles:s,next:Jt},i})}return vv[t]!==1&&!mh(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ci(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Jt={name:i.name,styles:i.styles,next:Jt},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Jt={name:o.name,styles:o.styles,next:Jt},o=o.next;var a=s.styles+";";return a}return Cv(e,t,n)}}var l=n;return l}function Cv(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Ci(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;Qc(a)&&(r+=So(s)+":"+Jc(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)Qc(o[l])&&(r+=So(s)+":"+Jc(s,o[l])+";");else{var c=Ci(e,t,o);switch(s){case"animation":case"animationName":{r+=So(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var eu=/label:\s*([^\s;{]+)\s*(;|$)/g,Jt;function Ev(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Jt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=Ci(n,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=Ci(n,t,e[a]),r){var l=s;i+=l[a]}eu.lastIndex=0;for(var c="",u;(u=eu.exec(i))!==null;)c+="-"+u[1];var d=bv(i)+c;return{name:d,styles:i,next:Jt}}/**
128
69
  * @mui/styled-engine v7.2.0
129
70
  *
130
71
  * @license MIT
131
72
  * This source code is licensed under the MIT license found in the
132
73
  * LICENSE file in the root directory of this source tree.
133
- */function yy(e,t){const n=Qd(e,t);return process.env.NODE_ENV!=="production"?(...s)=>{const r=typeof e=="string"?`"${e}"`:"component";return s.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
134
- `)):s.some(i=>i===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...s)}:n}function xy(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ya=[];function Ut(e){return Ya[0]=e,py(Ya)}const by=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,s)=>n.val-s.val),t.reduce((n,s)=>({...n,[s.key]:s.val}),{})};function vy(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5,...r}=e,i=by(t),o=Object.keys(i);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function c(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-s/100}${n})`}function d(h,p){const x=o.indexOf(p);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(x!==-1&&typeof t[o[x]]=="number"?t[o[x]]:p)-s/100}${n})`}function u(h){return o.indexOf(h)+1<o.length?d(h,o[o.indexOf(h)+1]):a(h)}function f(h){const p=o.indexOf(h);return p===0?a(o[1]):p===o.length-1?c(o[p]):d(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:i,up:a,down:c,between:d,only:u,not:f,unit:n,...r}}const wy={borderRadius:4};function md(e=8,t=Oo({spacing:e})){if(e.mui)return e;const n=(...s)=>(process.env.NODE_ENV!=="production"&&(s.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${s.length}`)),(s.length===0?[1]:s).map(i=>{const o=t(i);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Sy(e,t){var s;const n=this;if(n.vars){if(!((s=n.colorSchemes)!=null&&s[e])||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function gd(e={},...t){const{breakpoints:n={},palette:s={},spacing:r,shape:i={},...o}=e,a=vy(n),c=md(r);let d=qe({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...s},spacing:c,shape:{...wy,...i}},o);return d=w0(d),d.applyStyles=Sy,d=t.reduce((u,f)=>qe(u,f),d),d.unstable_sxConfig={...Ls,...o==null?void 0:o.unstable_sxConfig},d.unstable_sx=function(f){return fn({sx:f,theme:this})},d}const Cy={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function _o(e,t,n="Mui"){const s=Cy[t];return s?`${n}-${s}`:`${o0.generate(e)}-${t}`}function ky(e,t,n="Mui"){const s={};return t.forEach(r=>{s[r]=_o(e,r,n)}),s}function pd(e,t=""){return e.displayName||e.name||t}function qa(e,t,n){const s=pd(t);return e.displayName||(s!==""?`${n}(${s})`:n)}function Ty(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return pd(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ss.ForwardRef:return qa(e,e.render,"ForwardRef");case Ss.Memo:return qa(e,e.type,"memo");default:return}}}function yd(e){const{variants:t,...n}=e,s={variants:t,style:Ut(n),isProcessed:!0};return s.style===n||t&&t.forEach(r=>{typeof r.style!="function"&&(r.style=Ut(r.style))}),s}const Ey=gd();function mr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Lt(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Ay(e){return e?(t,n)=>n[e]:null}function jy(e,t,n){e.theme=Py(e.theme)?n:e.theme[t]||e.theme}function fs(e,t,n){const s=typeof t=="function"?t(e):t;if(Array.isArray(s))return s.flatMap(r=>fs(e,r,n));if(Array.isArray(s==null?void 0:s.variants)){let r;if(s.isProcessed)r=n?Lt(s.style,n):s.style;else{const{variants:i,...o}=s;r=n?Lt(Ut(o),n):o}return xd(e,s.variants,[r],n)}return s!=null&&s.isProcessed?n?Lt(Ut(s.style),n):s.style:n?Lt(Ut(s),n):s}function xd(e,t,n=[],s=void 0){var i;let r;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(r))continue}else for(const c in a.props)if(e[c]!==a.props[c]&&((i=e.ownerState)==null?void 0:i[c])!==a.props[c])continue e;typeof a.style=="function"?(r??(r={...e,...e.ownerState,ownerState:e.ownerState}),n.push(s?Lt(Ut(a.style(r)),s):a.style(r))):n.push(s?Lt(Ut(a.style),s):a.style)}return n}function Ny(e={}){const{themeId:t,defaultTheme:n=Ey,rootShouldForwardProp:s=mr,slotShouldForwardProp:r=mr}=e;function i(a){jy(a,t,n)}return(a,c={})=>{xy(a,j=>j.filter(V=>V!==fn));const{name:d,slot:u,skipVariantsResolver:f,skipSx:h,overridesResolver:p=Ay(bd(u)),...x}=c,m=d&&d.startsWith("Mui")||u?"components":"custom",b=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,S=h||!1;let C=mr;u==="Root"||u==="root"?C=s:u?C=r:Ry(a)&&(C=void 0);const T=yy(a,{shouldForwardProp:C,label:Vy(d,u),...x}),k=j=>{if(j.__emotion_real===j)return j;if(typeof j=="function")return function(E){return fs(E,j,E.theme.modularCssLayers?m:void 0)};if(pt(j)){const V=yd(j);return function(_){return V.variants?fs(_,V,_.theme.modularCssLayers?m:void 0):_.theme.modularCssLayers?Lt(V.style,m):V.style}}return j},v=(...j)=>{const V=[],E=j.map(k),_=[];if(V.push(i),d&&p&&_.push(function(te){var ne,R;const ie=(R=(ne=te.theme.components)==null?void 0:ne[d])==null?void 0:R.styleOverrides;if(!ie)return null;const fe={};for(const B in ie)fe[B]=fs(te,ie[B],te.theme.modularCssLayers?"theme":void 0);return p(te,fe)}),d&&!b&&_.push(function(te){var fe,ne;const ue=te.theme,ie=(ne=(fe=ue==null?void 0:ue.components)==null?void 0:fe[d])==null?void 0:ne.variants;return ie?xd(te,ie,[],te.theme.modularCssLayers?"theme":void 0):null}),S||_.push(fn),Array.isArray(E[0])){const W=E.shift(),te=new Array(V.length).fill(""),ue=new Array(_.length).fill("");let ie;ie=[...te,...W,...ue],ie.raw=[...te,...W.raw,...ue],V.unshift(ie)}const y=[...V,...E,..._],D=T(...y);return a.muiName&&(D.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(D.displayName=My(d,u,a)),D};return T.withConfig&&(v.withConfig=T.withConfig),v}}function My(e,t,n){return e?`${e}${zt(t||"")}`:`Styled(${Ty(n)})`}function Vy(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${bd(t||"Root")}`),n}function Py(e){for(const t in e)return!1;return!0}function Ry(e){return typeof e=="string"&&e.charCodeAt(0)>96}function bd(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Wr(e,t,n=!1){const s={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=r;if(i==="components"||i==="slots")s[i]={...e[i],...s[i]};else if(i==="componentsProps"||i==="slotProps"){const o=e[i],a=t[i];if(!a)s[i]=o||{};else if(!o)s[i]=a;else{s[i]={...a};for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)){const d=c;s[i][d]=Wr(o[d],a[d],n)}}}else i==="className"&&n&&t.className?s.className=Xr(e==null?void 0:e.className,t==null?void 0:t.className):i==="style"&&n&&t.style?s.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:s[i]===void 0&&(s[i]=e[i])}return s}function Iy(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Bo(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Iy(e,t,n)}function Dy(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(s=>s+s)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((s,r)=>r<3?parseInt(s,16):Math.round(parseInt(s,16)/255*1e3)/1e3).join(", ")})`:""}function Mt(e){if(e.type)return e;if(e.charAt(0)==="#")return Mt(Dy(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
135
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Nt(9,e));let s=e.substring(t+1,e.length-1),r;if(n==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${r}\` color space.
136
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Nt(10,r))}else s=s.split(",");return s=s.map(i=>parseFloat(i)),{type:n,values:s,colorSpace:r}}const $y=e=>{const t=Mt(e);return t.values.slice(0,3).map((n,s)=>t.type.includes("hsl")&&s!==0?`${n}%`:n).join(" ")},kn=(e,t)=>{try{return $y(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _s(e){const{type:t,colorSpace:n}=e;let{values:s}=e;return t.includes("rgb")?s=s.map((r,i)=>i<3?parseInt(r,10):r):t.includes("hsl")&&(s[1]=`${s[1]}%`,s[2]=`${s[2]}%`),t.includes("color")?s=`${n} ${s.join(" ")}`:s=`${s.join(", ")}`,`${t}(${s})`}function vd(e){e=Mt(e);const{values:t}=e,n=t[0],s=t[1]/100,r=t[2]/100,i=s*Math.min(r,1-r),o=(d,u=(d+n/30)%12)=>r-i*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",c.push(t[3])),_s({type:a,values:c})}function Zr(e){e=Mt(e);let t=e.type==="hsl"||e.type==="hsla"?Mt(vd(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Xa(e,t){const n=Zr(e),s=Zr(t);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}function Fy(e,t){return e=Mt(e),t=Bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_s(e)}function os(e,t,n){try{return Fy(e,t)}catch{return e}}function Uo(e,t){if(e=Mt(e),t=Bo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return _s(e)}function Se(e,t,n){try{return Uo(e,t)}catch{return e}}function Ho(e,t){if(e=Mt(e),t=Bo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return _s(e)}function Ce(e,t,n){try{return Ho(e,t)}catch{return e}}function Oy(e,t=.15){return Zr(e)>.5?Uo(e,t):Ho(e,t)}function is(e,t,n){try{return Oy(e,t)}catch{return e}}const Ly=g.createContext(void 0);process.env.NODE_ENV!=="production"&&(ge.node,ge.object);function _y(e){const{theme:t,name:n,props:s}=e;if(!t||!t.components||!t.components[n])return s;const r=t.components[n];return r.defaultProps?Wr(r.defaultProps,s,t.components.mergeClassNameAndStyle):!r.styleOverrides&&!r.variants?Wr(r,s,t.components.mergeClassNameAndStyle):s}function By({props:e,name:t}){const n=g.useContext(Ly);return _y({props:e,name:t,theme:{components:n}})}const Ja={theme:void 0};function Uy(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Ja.theme=r.theme,i=yd(e(Ja)),t=i,n=r.theme),i}}function Hy(e=""){function t(...s){if(!s.length)return"";const r=s[0];return typeof r=="string"&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${r}${t(...s.slice(1))})`:`, ${r}`}return(s,...r)=>`var(--${e?`${e}-`:""}${s}${t(...r)})`}const Qa=(e,t,n,s=[])=>{let r=e;t.forEach((i,o)=>{o===t.length-1?Array.isArray(r)?r[Number(i)]=n:r&&typeof r=="object"&&(r[i]=n):r&&typeof r=="object"&&(r[i]||(r[i]=s.includes(i)?[]:{}),r=r[i])})},zy=(e,t,n)=>{function s(r,i=[],o=[]){Object.entries(r).forEach(([a,c])=>{(!n||n&&!n([...i,a]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?s(c,[...i,a],Array.isArray(c)?[...o,a]:o):t([...i,a],c,o))})}s(e)},Wy=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(s=>e.includes(s))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function gr(e,t){const{prefix:n,shouldSkipGeneratingVar:s}=t||{},r={},i={},o={};return zy(e,(a,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!s||!s(a,c))){const u=`--${n?`${n}-`:""}${a.join("-")}`,f=Wy(a,c);Object.assign(r,{[u]:f}),Qa(i,a,`var(${u})`,d),Qa(o,a,`var(${u}, ${f})`,d)}},a=>a[0]==="vars"),{css:r,vars:i,varsWithDefaults:o}}function Zy(e,t={}){const{getSelector:n=b,disableCssColorScheme:s,colorSchemeSelector:r}=t,{colorSchemes:i={},components:o,defaultColorScheme:a="light",...c}=e,{vars:d,css:u,varsWithDefaults:f}=gr(c,t);let h=f;const p={},{[a]:x,...m}=i;if(Object.entries(m||{}).forEach(([T,k])=>{const{vars:v,css:j,varsWithDefaults:V}=gr(k,t);h=qe(h,V),p[T]={css:j,vars:v}}),x){const{css:T,vars:k,varsWithDefaults:v}=gr(x,t);h=qe(h,v),p[a]={css:T,vars:k}}function b(T,k){var j,V;let v=r;if(r==="class"&&(v=".%s"),r==="data"&&(v="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(v=`[${r}="%s"]`),T){if(v==="media")return e.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((V=(j=i[T])==null?void 0:j.palette)==null?void 0:V.mode)||T})`]:{":root":k}};if(v)return e.defaultColorScheme===T?`:root, ${v.replace("%s",String(T))}`:v.replace("%s",String(T))}return":root"}return{vars:h,generateThemeVars:()=>{let T={...d};return Object.entries(p).forEach(([,{vars:k}])=>{T=qe(T,k)}),T},generateStyleSheets:()=>{var E,_;const T=[],k=e.defaultColorScheme||"light";function v(y,D){Object.keys(D).length&&T.push(typeof y=="string"?{[y]:{...D}}:y)}v(n(void 0,{...u}),u);const{[k]:j,...V}=p;if(j){const{css:y}=j,D=(_=(E=i[k])==null?void 0:E.palette)==null?void 0:_.mode,W=!s&&D?{colorScheme:D,...y}:{...y};v(n(k,{...W}),W)}return Object.entries(V).forEach(([y,{css:D}])=>{var ue,ie;const W=(ie=(ue=i[y])==null?void 0:ue.palette)==null?void 0:ie.mode,te=!s&&W?{colorScheme:W,...D}:{...D};v(n(y,{...te}),te)}),T}}}function Gy(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const On={black:"#000",white:"#fff"},Ky={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Yt={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},qt={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Sn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Xt={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Jt={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Qt={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function wd(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:On.white,default:On.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Yy=wd();function Sd(){return{text:{primary:On.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:On.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const el=Sd();function tl(e,t,n,s){const r=s.light||s,i=s.dark||s*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Ho(e.main,r):t==="dark"&&(e.dark=Uo(e.main,i)))}function qy(e="light"){return e==="dark"?{main:Xt[200],light:Xt[50],dark:Xt[400]}:{main:Xt[700],light:Xt[400],dark:Xt[800]}}function Xy(e="light"){return e==="dark"?{main:Yt[200],light:Yt[50],dark:Yt[400]}:{main:Yt[500],light:Yt[300],dark:Yt[700]}}function Jy(e="light"){return e==="dark"?{main:qt[500],light:qt[300],dark:qt[700]}:{main:qt[700],light:qt[400],dark:qt[800]}}function Qy(e="light"){return e==="dark"?{main:Jt[400],light:Jt[300],dark:Jt[700]}:{main:Jt[700],light:Jt[500],dark:Jt[900]}}function e1(e="light"){return e==="dark"?{main:Qt[400],light:Qt[300],dark:Qt[700]}:{main:Qt[800],light:Qt[500],dark:Qt[900]}}function t1(e="light"){return e==="dark"?{main:Sn[400],light:Sn[300],dark:Sn[700]}:{main:"#ed6c02",light:Sn[500],dark:Sn[900]}}function zo(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2,...r}=e,i=e.primary||qy(t),o=e.secondary||Xy(t),a=e.error||Jy(t),c=e.info||Qy(t),d=e.success||e1(t),u=e.warning||t1(t);function f(m){const b=Xa(m,el.text.primary)>=n?el.text.primary:Yy.text.primary;if(process.env.NODE_ENV!=="production"){const S=Xa(m,b);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
137
- `))}return b}const h=({color:m,name:b,mainShade:S=500,lightShade:C=300,darkShade:T=700})=>{if(m={...m},!m.main&&m[S]&&(m.main=m[S]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
138
- The color object needs to have a \`main\` property or a \`${S}\` property.`:Nt(11,b?` (${b})`:"",S));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
139
- \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
74
+ */function Tv(e,t){const n=ip(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
75
+ `)):r.some(s=>s===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function Av(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const tu=[];function bn(e){return tu[0]=e,Ev(tu)}const jv=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function Pv(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=jv(t),o=Object.keys(s);function a(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n})`}function l(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-r/100}${n})`}function c(h,m){const g=o.indexOf(m);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${n}) and (max-width:${(g!==-1&&typeof t[o[g]]=="number"?t[o[g]]:m)-r/100}${n})`}function u(h){return o.indexOf(h)+1<o.length?c(h,o[o.indexOf(h)+1]):a(h)}function d(h){const m=o.indexOf(h);return m===0?a(o[1]):m===o.length-1?l(o[m]):c(h,o[o.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:o,values:s,up:a,down:l,between:c,only:u,not:d,unit:n,...i}}const Mv={borderRadius:4};function ph(e=8,t=Ea({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(s=>{const o=t(s);return typeof o=="number"?`${o}px`:o}).join(" "));return n.mui=!0,n}function Nv(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let i=n.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return n.palette.mode===e?t:{}}function gh(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...o}=e,a=Pv(n),l=ph(i);let c=yt({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Mv,...s}},o);return c=Mb(c),c.applyStyles=Nv,c=t.reduce((u,d)=>yt(u,d),c),c.unstable_sxConfig={...Ui,...o==null?void 0:o.unstable_sxConfig},c.unstable_sx=function(d){return Gn({sx:d,theme:this})},c}const Iv={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Aa(e,t,n="Mui"){const r=Iv[t];return r?`${n}-${r}`:`${pb.generate(e)}-${t}`}function Rv(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Aa(e,i,n)}),r}function yh(e,t=""){return e.displayName||e.name||t}function nu(e,t,n){const r=yh(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Vv(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return yh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ki.ForwardRef:return nu(e,e.render,"ForwardRef");case ki.Memo:return nu(e,e.type,"memo");default:return}}}function xh(e){const{variants:t,...n}=e,r={variants:t,style:bn(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=bn(i.style))}),r}const Dv=gh();function Co(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function gn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Fv(e){return e?(t,n)=>n[e]:null}function Lv(e,t,n){e.theme=Bv(e.theme)?n:e.theme[t]||e.theme}function ui(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>ui(e,i,n));if(Array.isArray(r==null?void 0:r.variants)){let i;if(r.isProcessed)i=n?gn(r.style,n):r.style;else{const{variants:s,...o}=r;i=n?gn(bn(o),n):o}return bh(e,r.variants,[i],n)}return r!=null&&r.isProcessed?n?gn(bn(r.style),n):r.style:n?gn(bn(r),n):r}function bh(e,t,n=[],r=void 0){var s;let i;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),!a.props(i))continue}else for(const l in a.props)if(e[l]!==a.props[l]&&((s=e.ownerState)==null?void 0:s[l])!==a.props[l])continue e;typeof a.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?gn(bn(a.style(i)),r):a.style(i))):n.push(r?gn(bn(a.style),r):a.style)}return n}function Ov(e={}){const{themeId:t,defaultTheme:n=Dv,rootShouldForwardProp:r=Co,slotShouldForwardProp:i=Co}=e;function s(a){Lv(a,t,n)}return(a,l={})=>{Av(a,C=>C.filter(N=>N!==Gn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:m=Fv(vh(u)),...g}=l,p=c&&c.startsWith("Mui")||u?"components":"custom",b=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,v=h||!1;let k=Co;u==="Root"||u==="root"?k=r:u?k=i:zv(a)&&(k=void 0);const S=Tv(a,{shouldForwardProp:k,label:_v(c,u),...g}),A=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(P){return ui(P,C,P.theme.modularCssLayers?p:void 0)};if(Bt(C)){const N=xh(C);return function(L){return N.variants?ui(L,N,L.theme.modularCssLayers?p:void 0):L.theme.modularCssLayers?gn(N.style,p):N.style}}return C},T=(...C)=>{const N=[],P=C.map(A),L=[];if(N.push(s),c&&m&&L.push(function(B){var ie,F;const Y=(F=(ie=B.theme.components)==null?void 0:ie[c])==null?void 0:F.styleOverrides;if(!Y)return null;const de={};for(const W in Y)de[W]=ui(B,Y[W],B.theme.modularCssLayers?"theme":void 0);return m(B,de)}),c&&!b&&L.push(function(B){var de,ie;const H=B.theme,Y=(ie=(de=H==null?void 0:H.components)==null?void 0:de[c])==null?void 0:ie.variants;return Y?bh(B,Y,[],B.theme.modularCssLayers?"theme":void 0):null}),v||L.push(Gn),Array.isArray(P[0])){const D=P.shift(),B=new Array(N.length).fill(""),H=new Array(L.length).fill("");let Y;Y=[...B,...D,...H],Y.raw=[...B,...D.raw,...H],N.unshift(Y)}const y=[...N,...P,...L],M=S(...y);return a.muiName&&(M.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(M.displayName=$v(c,u,a)),M};return S.withConfig&&(T.withConfig=S.withConfig),T}}function $v(e,t,n){return e?`${e}${wn(t||"")}`:`Styled(${Vv(n)})`}function _v(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${vh(t||"Root")}`),n}function Bv(e){for(const t in e)return!1;return!0}function zv(e){return typeof e=="string"&&e.charCodeAt(0)>96}function vh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function xs(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=i;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const o=e[s],a=t[s];if(!a)r[s]=o||{};else if(!o)r[s]=a;else{r[s]={...a};for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const c=l;r[s][c]=xs(o[c],a[c],n)}}}else s==="className"&&n&&t.className?r.className=Ds(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[s]===void 0&&(r[s]=e[s])}return r}function Hv(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function ja(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Hv(e,t,n)}function Uv(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function on(e){if(e.type)return e;if(e.charAt(0)==="#")return on(Uv(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
76
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:rn(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
77
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:rn(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const Wv=e=>{const t=on(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},hr=(e,t)=>{try{return Wv(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Wi(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function wh(e){e=on(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),o=(c,u=(c+n/30)%12)=>i-s*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Wi({type:a,values:l})}function bs(e){e=on(e);let t=e.type==="hsl"||e.type==="hsla"?on(wh(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function ru(e,t){const n=bs(e),r=bs(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Zv(e,t){return e=on(e),t=ja(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Wi(e)}function Jr(e,t,n){try{return Zv(e,t)}catch{return e}}function Pa(e,t){if(e=on(e),t=ja(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Wi(e)}function De(e,t,n){try{return Pa(e,t)}catch{return e}}function Ma(e,t){if(e=on(e),t=ja(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Wi(e)}function Fe(e,t,n){try{return Ma(e,t)}catch{return e}}function qv(e,t=.15){return bs(e)>.5?Pa(e,t):Ma(e,t)}function ei(e,t,n){try{return qv(e,t)}catch{return e}}const Gv=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(Te.node,Te.object);function Kv(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?xs(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?xs(i,r,t.components.mergeClassNameAndStyle):r}function Yv({props:e,name:t}){const n=x.useContext(Gv);return Kv({props:e,name:t,theme:{components:n}})}const iu={theme:void 0};function Xv(e){let t,n;return function(i){let s=t;return(s===void 0||i.theme!==n)&&(iu.theme=i.theme,s=xh(e(iu)),t=s,n=i.theme),s}}function Qv(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const ou=(e,t,n,r=[])=>{let i=e;t.forEach((s,o)=>{o===t.length-1?Array.isArray(i)?i[Number(s)]=n:i&&typeof i=="object"&&(i[s]=n):i&&typeof i=="object"&&(i[s]||(i[s]=r.includes(s)?[]:{}),i=i[s])})},Jv=(e,t,n)=>{function r(i,s=[],o=[]){Object.entries(i).forEach(([a,l])=>{(!n||n&&!n([...s,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...s,a],Array.isArray(l)?[...o,a]:o):t([...s,a],l,o))})}r(e)},ew=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Eo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},o={};return Jv(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,d=ew(a,l);Object.assign(i,{[u]:d}),ou(s,a,`var(${u})`,c),ou(o,a,`var(${u}, ${d})`,c)}},a=>a[0]==="vars"),{css:i,vars:s,varsWithDefaults:o}}function tw(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:o,defaultColorScheme:a="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Eo(l,t);let h=d;const m={},{[a]:g,...p}=s;if(Object.entries(p||{}).forEach(([S,A])=>{const{vars:T,css:C,varsWithDefaults:N}=Eo(A,t);h=yt(h,N),m[S]={css:C,vars:T}}),g){const{css:S,vars:A,varsWithDefaults:T}=Eo(g,t);h=yt(h,T),m[a]={css:S,vars:A}}function b(S,A){var C,N;let T=i;if(i==="class"&&(T=".%s"),i==="data"&&(T="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(T=`[${i}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((N=(C=s[S])==null?void 0:C.palette)==null?void 0:N.mode)||S})`]:{":root":A}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:h,generateThemeVars:()=>{let S={...c};return Object.entries(m).forEach(([,{vars:A}])=>{S=yt(S,A)}),S},generateStyleSheets:()=>{var P,L;const S=[],A=e.defaultColorScheme||"light";function T(y,M){Object.keys(M).length&&S.push(typeof y=="string"?{[y]:{...M}}:y)}T(n(void 0,{...u}),u);const{[A]:C,...N}=m;if(C){const{css:y}=C,M=(L=(P=s[A])==null?void 0:P.palette)==null?void 0:L.mode,D=!r&&M?{colorScheme:M,...y}:{...y};T(n(A,{...D}),D)}return Object.entries(N).forEach(([y,{css:M}])=>{var H,Y;const D=(Y=(H=s[y])==null?void 0:H.palette)==null?void 0:Y.mode,B=!r&&D?{colorScheme:D,...M}:{...M};T(n(y,{...B}),B)}),S}}}function nw(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Mr={black:"#000",white:"#fff"},rw={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},An={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ar={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Pn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Mn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Nn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function kh(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Mr.white,default:Mr.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const iw=kh();function Sh(){return{text:{primary:Mr.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Mr.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const su=Sh();function au(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Ma(e.main,i):t==="dark"&&(e.dark=Pa(e.main,s)))}function ow(e="light"){return e==="dark"?{main:Pn[200],light:Pn[50],dark:Pn[400]}:{main:Pn[700],light:Pn[400],dark:Pn[800]}}function sw(e="light"){return e==="dark"?{main:An[200],light:An[50],dark:An[400]}:{main:An[500],light:An[300],dark:An[700]}}function aw(e="light"){return e==="dark"?{main:jn[500],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[400],dark:jn[800]}}function lw(e="light"){return e==="dark"?{main:Mn[400],light:Mn[300],dark:Mn[700]}:{main:Mn[700],light:Mn[500],dark:Mn[900]}}function cw(e="light"){return e==="dark"?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:Nn[800],light:Nn[500],dark:Nn[900]}}function uw(e="light"){return e==="dark"?{main:ar[400],light:ar[300],dark:ar[700]}:{main:"#ed6c02",light:ar[500],dark:ar[900]}}function Na(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||ow(t),o=e.secondary||sw(t),a=e.error||aw(t),l=e.info||lw(t),c=e.success||cw(t),u=e.warning||uw(t);function d(p){const b=ru(p,su.text.primary)>=n?su.text.primary:iw.text.primary;if(process.env.NODE_ENV!=="production"){const v=ru(p,b);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${b} on ${p}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
78
+ `))}return b}const h=({color:p,name:b,mainShade:v=500,lightShade:k=300,darkShade:S=700})=>{if(p={...p},!p.main&&p[v]&&(p.main=p[v]),!p.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
79
+ The color object needs to have a \`main\` property or a \`${v}\` property.`:rn(11,b?` (${b})`:"",v));if(typeof p.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
80
+ \`color.main\` should be a string, but \`${JSON.stringify(p.main)}\` was provided instead.
140
81
 
141
82
  Did you intend to use one of the following approaches?
142
83
 
@@ -148,50 +89,78 @@ const theme1 = createTheme({ palette: {
148
89
 
149
90
  const theme2 = createTheme({ palette: {
150
91
  primary: { main: green[500] },
151
- } });`:Nt(12,b?` (${b})`:"",JSON.stringify(m.main)));return tl(m,"light",C,s),tl(m,"dark",T,s),m.contrastText||(m.contrastText=f(m.main)),m};let p;return t==="light"?p=wd():t==="dark"&&(p=Sd()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),qe({common:{...On},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:c,name:"info"}),success:h({color:d,name:"success"}),grey:Ky,contrastThreshold:n,getContrastText:f,augmentColor:h,tonalOffset:s,...p},r)}function n1(e){const t={};return Object.entries(e).forEach(s=>{const[r,i]=s;typeof i=="object"&&(t[r]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function s1(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function r1(e){return Math.round(e*1e5)/1e5}const nl={textTransform:"uppercase"},sl='"Roboto", "Helvetica", "Arial", sans-serif';function o1(e,t){const{fontFamily:n=sl,fontSize:s=14,fontWeightLight:r=300,fontWeightRegular:i=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:c=16,allVariants:d,pxToRem:u,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof s!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof c!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=s/14,p=u||(b=>`${b/c*h}rem`),x=(b,S,C,T,k)=>({fontFamily:n,fontWeight:b,fontSize:p(S),lineHeight:C,...n===sl?{letterSpacing:`${r1(T/S)}em`}:{},...k,...d}),m={h1:x(r,96,1.167,-1.5),h2:x(r,60,1.2,-.5),h3:x(i,48,1.167,0),h4:x(i,34,1.235,.25),h5:x(i,24,1.334,0),h6:x(o,20,1.6,.15),subtitle1:x(i,16,1.75,.15),subtitle2:x(o,14,1.57,.1),body1:x(i,16,1.5,.15),body2:x(i,14,1.43,.15),button:x(o,14,1.75,.4,nl),caption:x(i,12,1.66,.4),overline:x(i,12,2.66,1,nl),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return qe({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:s,fontWeightLight:r,fontWeightRegular:i,fontWeightMedium:o,fontWeightBold:a,...m},f,{clone:!1})}const i1=.2,a1=.14,l1=.12;function Ae(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${i1})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${a1})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${l1})`].join(",")}const c1=["none",Ae(0,2,1,-1,0,1,1,0,0,1,3,0),Ae(0,3,1,-2,0,2,2,0,0,1,5,0),Ae(0,3,3,-2,0,3,4,0,0,1,8,0),Ae(0,2,4,-1,0,4,5,0,0,1,10,0),Ae(0,3,5,-1,0,5,8,0,0,1,14,0),Ae(0,3,5,-1,0,6,10,0,0,1,18,0),Ae(0,4,5,-2,0,7,10,1,0,2,16,1),Ae(0,5,5,-3,0,8,10,1,0,3,14,2),Ae(0,5,6,-3,0,9,12,1,0,3,16,2),Ae(0,6,6,-3,0,10,14,1,0,4,18,3),Ae(0,6,7,-4,0,11,15,1,0,4,20,3),Ae(0,7,8,-4,0,12,17,2,0,5,22,4),Ae(0,7,8,-4,0,13,19,2,0,5,24,4),Ae(0,7,9,-4,0,14,21,2,0,5,26,4),Ae(0,8,9,-5,0,15,22,2,0,6,28,5),Ae(0,8,10,-5,0,16,24,2,0,6,30,5),Ae(0,8,11,-5,0,17,26,2,0,6,32,5),Ae(0,9,11,-5,0,18,28,2,0,7,34,6),Ae(0,9,12,-6,0,19,29,2,0,7,36,6),Ae(0,10,13,-6,0,20,31,3,0,8,38,7),Ae(0,10,13,-6,0,21,33,3,0,8,40,7),Ae(0,10,14,-6,0,22,35,3,0,8,42,7),Ae(0,11,14,-7,0,23,36,3,0,9,44,8),Ae(0,11,15,-7,0,24,38,3,0,9,46,8)],d1={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},u1={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function rl(e){return`${Math.round(e)}ms`}function f1(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function h1(e){const t={...d1,...e.easing},n={...u1,...e.duration};return{getAutoHeightDuration:f1,create:(r=["all"],i={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:c=0,...d}=i;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",f=h=>!Number.isNaN(parseFloat(h));!u(r)&&!Array.isArray(r)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!f(c)&&!u(c)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
152
- `)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(r)?r:[r]).map(u=>`${u} ${typeof o=="string"?o:rl(o)} ${a} ${typeof c=="string"?c:rl(c)}`).join(",")},...e,easing:t,duration:n}}const m1={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function g1(e){return pt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Cd(e={}){const t={...e};function n(s){const r=Object.entries(s);for(let i=0;i<r.length;i++){const[o,a]=r[i];!g1(a)||o.startsWith("unstable_")?delete s[o]:pt(a)&&(s[o]={...a},n(s[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
92
+ } });`:rn(12,b?` (${b})`:"",JSON.stringify(p.main)));return au(p,"light",k,r),au(p,"dark",S,r),p.contrastText||(p.contrastText=d(p.main)),p};let m;return t==="light"?m=kh():t==="dark"&&(m=Sh()),process.env.NODE_ENV!=="production"&&(m||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),yt({common:{...Mr},mode:t,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:a,name:"error"}),warning:h({color:u,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:c,name:"success"}),grey:rw,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...m},i)}function dw(e){const t={};return Object.entries(e).forEach(r=>{const[i,s]=r;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function fw(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function hw(e){return Math.round(e*1e5)/1e5}const lu={textTransform:"uppercase"},cu='"Roboto", "Helvetica", "Arial", sans-serif';function mw(e,t){const{fontFamily:n=cu,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=r/14,m=u||(b=>`${b/l*h}rem`),g=(b,v,k,S,A)=>({fontFamily:n,fontWeight:b,fontSize:m(v),lineHeight:k,...n===cu?{letterSpacing:`${hw(S/v)}em`}:{},...A,...c}),p={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(o,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(o,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(o,14,1.75,.4,lu),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,lu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return yt({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:a,...p},d,{clone:!1})}const pw=.2,gw=.14,yw=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${pw})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${gw})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${yw})`].join(",")}const xw=["none",_e(0,2,1,-1,0,1,1,0,0,1,3,0),_e(0,3,1,-2,0,2,2,0,0,1,5,0),_e(0,3,3,-2,0,3,4,0,0,1,8,0),_e(0,2,4,-1,0,4,5,0,0,1,10,0),_e(0,3,5,-1,0,5,8,0,0,1,14,0),_e(0,3,5,-1,0,6,10,0,0,1,18,0),_e(0,4,5,-2,0,7,10,1,0,2,16,1),_e(0,5,5,-3,0,8,10,1,0,3,14,2),_e(0,5,6,-3,0,9,12,1,0,3,16,2),_e(0,6,6,-3,0,10,14,1,0,4,18,3),_e(0,6,7,-4,0,11,15,1,0,4,20,3),_e(0,7,8,-4,0,12,17,2,0,5,22,4),_e(0,7,8,-4,0,13,19,2,0,5,24,4),_e(0,7,9,-4,0,14,21,2,0,5,26,4),_e(0,8,9,-5,0,15,22,2,0,6,28,5),_e(0,8,10,-5,0,16,24,2,0,6,30,5),_e(0,8,11,-5,0,17,26,2,0,6,32,5),_e(0,9,11,-5,0,18,28,2,0,7,34,6),_e(0,9,12,-6,0,19,29,2,0,7,36,6),_e(0,10,13,-6,0,20,31,3,0,8,38,7),_e(0,10,13,-6,0,21,33,3,0,8,40,7),_e(0,10,14,-6,0,22,35,3,0,8,42,7),_e(0,11,14,-7,0,23,36,3,0,9,44,8),_e(0,11,15,-7,0,24,38,3,0,9,46,8)],bw={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},vw={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function uu(e){return`${Math.round(e)}ms`}function ww(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function kw(e){const t={...bw,...e.easing},n={...vw,...e.duration};return{getAutoHeightDuration:ww,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:l=0,...c}=s;if(process.env.NODE_ENV!=="production"){const u=h=>typeof h=="string",d=h=>!Number.isNaN(parseFloat(h));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(o)&&!u(o)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!d(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
93
+ `)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof o=="string"?o:uu(o)} ${a} ${typeof l=="string"?l:uu(l)}`).join(",")},...e,easing:t,duration:n}}const Sw={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Cw(e){return Bt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Ch(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let s=0;s<i.length;s++){const[o,a]=i[s];!Cw(a)||o.startsWith("unstable_")?delete r[o]:Bt(a)&&(r[o]={...a},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
153
94
 
154
95
  const theme = ${JSON.stringify(t,null,2)};
155
96
 
156
97
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
157
98
  theme.transitions = createTransitions(theme.transitions || {});
158
99
 
159
- export default theme;`}function Gr(e={},...t){const{breakpoints:n,mixins:s={},spacing:r,palette:i={},transitions:o={},typography:a={},shape:c,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Nt(20));const u=zo(i),f=gd(e);let h=qe(f,{mixins:s1(f.breakpoints,s),palette:u,shadows:c1.slice(),typography:o1(u,a),transitions:h1(o),zIndex:{...m1}});if(h=qe(h,d),h=t.reduce((p,x)=>qe(p,x),h),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],x=(m,b)=>{let S;for(S in m){const C=m[S];if(p.includes(S)&&Object.keys(C).length>0){if(process.env.NODE_ENV!=="production"){const T=_o("",S);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:C}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
160
- `))}m[S]={}}}};Object.keys(h.components).forEach(m=>{const b=h.components[m].styleOverrides;b&&m.startsWith("Mui")&&x(b,m)})}return h.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},h.unstable_sx=function(x){return fn({sx:x,theme:this})},h.toRuntimeSource=Cd,h}function p1(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const y1=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=p1(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function kd(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Td(e){return e==="dark"?y1:[]}function x1(e){const{palette:t={mode:"light"},opacity:n,overlays:s,...r}=e,i=zo(t);return{palette:i,opacity:{...kd(i.mode),...n},overlays:s||Td(i.mode),...r}}function b1(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const v1=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],w1=e=>(t,n)=>{const s=e.rootSelector||":root",r=e.colorSchemeSelector;let i=r;if(r==="class"&&(i=".%s"),r==="data"&&(i="[data-%s]"),r!=null&&r.startsWith("data-")&&!r.includes("%s")&&(i=`[${r}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return v1(e.cssVarPrefix).forEach(a=>{o[a]=n[a],delete n[a]}),i==="media"?{[s]:n,"@media (prefers-color-scheme: dark)":{[s]:o}}:i?{[i.replace("%s",t)]:o,[`${s}, ${i.replace("%s",t)}`]:n}:{[s]:{...n,...o}}}if(i&&i!=="media")return`${s}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[s]:n}};if(i)return i.replace("%s",String(t))}return s};function S1(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function P(e,t,n){!e[t]&&n&&(e[t]=n)}function Tn(e){return typeof e!="string"||!e.startsWith("hsl")?e:vd(e)}function gt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=kn(Tn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
161
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function C1(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const ct=e=>{try{return e()}catch{}},k1=(e="mui")=>Hy(e);function pr(e,t,n,s){if(!t)return;t=t===!0?{}:t;const r=s==="dark"?"dark":"light";if(!n){e[s]=x1({...t,palette:{mode:r,...t==null?void 0:t.palette}});return}const{palette:i,...o}=Gr({...n,palette:{mode:r,...t==null?void 0:t.palette}});return e[s]={...t,palette:i,opacity:{...kd(r),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Td(r)},o}function T1(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:s,disableCssColorScheme:r=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:o=b1,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...d}=e,u=Object.keys(n)[0],f=s||(n.light&&u!=="light"?"light":u),h=k1(i),{[f]:p,light:x,dark:m,...b}=n,S={...b};let C=p;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(C=!0),!C)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Nt(21,f));const T=pr(S,C,d,f);x&&!S.light&&pr(S,x,void 0,"light"),m&&!S.dark&&pr(S,m,void 0,"dark");let k={defaultColorScheme:f,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:c,getCssVar:h,colorSchemes:S,font:{...n1(T.typography),...T.font},spacing:C1(d.spacing)};Object.keys(k.colorSchemes).forEach(_=>{const y=k.colorSchemes[_].palette,D=W=>{const te=W.split("-"),ue=te[1],ie=te[2];return h(W,y[ue][ie])};if(y.mode==="light"&&(P(y.common,"background","#fff"),P(y.common,"onBackground","#000")),y.mode==="dark"&&(P(y.common,"background","#000"),P(y.common,"onBackground","#fff")),S1(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){P(y.Alert,"errorColor",Se(y.error.light,.6)),P(y.Alert,"infoColor",Se(y.info.light,.6)),P(y.Alert,"successColor",Se(y.success.light,.6)),P(y.Alert,"warningColor",Se(y.warning.light,.6)),P(y.Alert,"errorFilledBg",D("palette-error-main")),P(y.Alert,"infoFilledBg",D("palette-info-main")),P(y.Alert,"successFilledBg",D("palette-success-main")),P(y.Alert,"warningFilledBg",D("palette-warning-main")),P(y.Alert,"errorFilledColor",ct(()=>y.getContrastText(y.error.main))),P(y.Alert,"infoFilledColor",ct(()=>y.getContrastText(y.info.main))),P(y.Alert,"successFilledColor",ct(()=>y.getContrastText(y.success.main))),P(y.Alert,"warningFilledColor",ct(()=>y.getContrastText(y.warning.main))),P(y.Alert,"errorStandardBg",Ce(y.error.light,.9)),P(y.Alert,"infoStandardBg",Ce(y.info.light,.9)),P(y.Alert,"successStandardBg",Ce(y.success.light,.9)),P(y.Alert,"warningStandardBg",Ce(y.warning.light,.9)),P(y.Alert,"errorIconColor",D("palette-error-main")),P(y.Alert,"infoIconColor",D("palette-info-main")),P(y.Alert,"successIconColor",D("palette-success-main")),P(y.Alert,"warningIconColor",D("palette-warning-main")),P(y.AppBar,"defaultBg",D("palette-grey-100")),P(y.Avatar,"defaultBg",D("palette-grey-400")),P(y.Button,"inheritContainedBg",D("palette-grey-300")),P(y.Button,"inheritContainedHoverBg",D("palette-grey-A100")),P(y.Chip,"defaultBorder",D("palette-grey-400")),P(y.Chip,"defaultAvatarColor",D("palette-grey-700")),P(y.Chip,"defaultIconColor",D("palette-grey-700")),P(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),P(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),P(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),P(y.LinearProgress,"primaryBg",Ce(y.primary.main,.62)),P(y.LinearProgress,"secondaryBg",Ce(y.secondary.main,.62)),P(y.LinearProgress,"errorBg",Ce(y.error.main,.62)),P(y.LinearProgress,"infoBg",Ce(y.info.main,.62)),P(y.LinearProgress,"successBg",Ce(y.success.main,.62)),P(y.LinearProgress,"warningBg",Ce(y.warning.main,.62)),P(y.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.11)`),P(y.Slider,"primaryTrack",Ce(y.primary.main,.62)),P(y.Slider,"secondaryTrack",Ce(y.secondary.main,.62)),P(y.Slider,"errorTrack",Ce(y.error.main,.62)),P(y.Slider,"infoTrack",Ce(y.info.main,.62)),P(y.Slider,"successTrack",Ce(y.success.main,.62)),P(y.Slider,"warningTrack",Ce(y.warning.main,.62));const W=is(y.background.default,.8);P(y.SnackbarContent,"bg",W),P(y.SnackbarContent,"color",ct(()=>y.getContrastText(W))),P(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),P(y.StepConnector,"border",D("palette-grey-400")),P(y.StepContent,"border",D("palette-grey-400")),P(y.Switch,"defaultColor",D("palette-common-white")),P(y.Switch,"defaultDisabledColor",D("palette-grey-100")),P(y.Switch,"primaryDisabledColor",Ce(y.primary.main,.62)),P(y.Switch,"secondaryDisabledColor",Ce(y.secondary.main,.62)),P(y.Switch,"errorDisabledColor",Ce(y.error.main,.62)),P(y.Switch,"infoDisabledColor",Ce(y.info.main,.62)),P(y.Switch,"successDisabledColor",Ce(y.success.main,.62)),P(y.Switch,"warningDisabledColor",Ce(y.warning.main,.62)),P(y.TableCell,"border",Ce(os(y.divider,1),.88)),P(y.Tooltip,"bg",os(y.grey[700],.92))}if(y.mode==="dark"){P(y.Alert,"errorColor",Ce(y.error.light,.6)),P(y.Alert,"infoColor",Ce(y.info.light,.6)),P(y.Alert,"successColor",Ce(y.success.light,.6)),P(y.Alert,"warningColor",Ce(y.warning.light,.6)),P(y.Alert,"errorFilledBg",D("palette-error-dark")),P(y.Alert,"infoFilledBg",D("palette-info-dark")),P(y.Alert,"successFilledBg",D("palette-success-dark")),P(y.Alert,"warningFilledBg",D("palette-warning-dark")),P(y.Alert,"errorFilledColor",ct(()=>y.getContrastText(y.error.dark))),P(y.Alert,"infoFilledColor",ct(()=>y.getContrastText(y.info.dark))),P(y.Alert,"successFilledColor",ct(()=>y.getContrastText(y.success.dark))),P(y.Alert,"warningFilledColor",ct(()=>y.getContrastText(y.warning.dark))),P(y.Alert,"errorStandardBg",Se(y.error.light,.9)),P(y.Alert,"infoStandardBg",Se(y.info.light,.9)),P(y.Alert,"successStandardBg",Se(y.success.light,.9)),P(y.Alert,"warningStandardBg",Se(y.warning.light,.9)),P(y.Alert,"errorIconColor",D("palette-error-main")),P(y.Alert,"infoIconColor",D("palette-info-main")),P(y.Alert,"successIconColor",D("palette-success-main")),P(y.Alert,"warningIconColor",D("palette-warning-main")),P(y.AppBar,"defaultBg",D("palette-grey-900")),P(y.AppBar,"darkBg",D("palette-background-paper")),P(y.AppBar,"darkColor",D("palette-text-primary")),P(y.Avatar,"defaultBg",D("palette-grey-600")),P(y.Button,"inheritContainedBg",D("palette-grey-800")),P(y.Button,"inheritContainedHoverBg",D("palette-grey-700")),P(y.Chip,"defaultBorder",D("palette-grey-700")),P(y.Chip,"defaultAvatarColor",D("palette-grey-300")),P(y.Chip,"defaultIconColor",D("palette-grey-300")),P(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),P(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),P(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),P(y.LinearProgress,"primaryBg",Se(y.primary.main,.5)),P(y.LinearProgress,"secondaryBg",Se(y.secondary.main,.5)),P(y.LinearProgress,"errorBg",Se(y.error.main,.5)),P(y.LinearProgress,"infoBg",Se(y.info.main,.5)),P(y.LinearProgress,"successBg",Se(y.success.main,.5)),P(y.LinearProgress,"warningBg",Se(y.warning.main,.5)),P(y.Skeleton,"bg",`rgba(${D("palette-text-primaryChannel")} / 0.13)`),P(y.Slider,"primaryTrack",Se(y.primary.main,.5)),P(y.Slider,"secondaryTrack",Se(y.secondary.main,.5)),P(y.Slider,"errorTrack",Se(y.error.main,.5)),P(y.Slider,"infoTrack",Se(y.info.main,.5)),P(y.Slider,"successTrack",Se(y.success.main,.5)),P(y.Slider,"warningTrack",Se(y.warning.main,.5));const W=is(y.background.default,.98);P(y.SnackbarContent,"bg",W),P(y.SnackbarContent,"color",ct(()=>y.getContrastText(W))),P(y.SpeedDialAction,"fabHoverBg",is(y.background.paper,.15)),P(y.StepConnector,"border",D("palette-grey-600")),P(y.StepContent,"border",D("palette-grey-600")),P(y.Switch,"defaultColor",D("palette-grey-300")),P(y.Switch,"defaultDisabledColor",D("palette-grey-600")),P(y.Switch,"primaryDisabledColor",Se(y.primary.main,.55)),P(y.Switch,"secondaryDisabledColor",Se(y.secondary.main,.55)),P(y.Switch,"errorDisabledColor",Se(y.error.main,.55)),P(y.Switch,"infoDisabledColor",Se(y.info.main,.55)),P(y.Switch,"successDisabledColor",Se(y.success.main,.55)),P(y.Switch,"warningDisabledColor",Se(y.warning.main,.55)),P(y.TableCell,"border",Se(os(y.divider,1),.68)),P(y.Tooltip,"bg",os(y.grey[700],.92))}gt(y.background,"default"),gt(y.background,"paper"),gt(y.common,"background"),gt(y.common,"onBackground"),gt(y,"divider"),Object.keys(y).forEach(W=>{const te=y[W];W!=="tonalOffset"&&te&&typeof te=="object"&&(te.main&&P(y[W],"mainChannel",kn(Tn(te.main))),te.light&&P(y[W],"lightChannel",kn(Tn(te.light))),te.dark&&P(y[W],"darkChannel",kn(Tn(te.dark))),te.contrastText&&P(y[W],"contrastTextChannel",kn(Tn(te.contrastText))),W==="text"&&(gt(y[W],"primary"),gt(y[W],"secondary")),W==="action"&&(te.active&&gt(y[W],"active"),te.selected&&gt(y[W],"selected")))})}),k=t.reduce((_,y)=>qe(_,y),k);const v={prefix:i,disableCssColorScheme:r,shouldSkipGeneratingVar:o,getSelector:w1(k)},{vars:j,generateThemeVars:V,generateStyleSheets:E}=Zy(k,v);return k.vars=j,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([_,y])=>{k[_]=y}),k.generateThemeVars=V,k.generateStyleSheets=E,k.generateSpacing=function(){return md(d.spacing,Oo(this))},k.getColorSchemeSelector=Gy(a),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=o,k.unstable_sxConfig={...Ls,...d==null?void 0:d.unstable_sxConfig},k.unstable_sx=function(y){return fn({sx:y,theme:this})},k.toRuntimeSource=Cd,k}function ol(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:zo({...n===!0?{}:n.palette,mode:t})})}function E1(e={},...t){const{palette:n,cssVariables:s=!1,colorSchemes:r=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...o}=e,a=i||"light",c=r==null?void 0:r[a],d={...r,...n?{[a]:{...typeof c!="boolean"&&c,palette:n}}:void 0};if(s===!1){if(!("colorSchemes"in e))return Gr(e,...t);let u=n;"palette"in e||d[a]&&(d[a]!==!0?u=d[a].palette:a==="dark"&&(u={mode:"dark"}));const f=Gr({...e,palette:u},...t);return f.defaultColorScheme=a,f.colorSchemes=d,f.palette.mode==="light"&&(f.colorSchemes.light={...d.light!==!0&&d.light,palette:f.palette},ol(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},ol(f,"light",d.light)),f}return!n&&!("light"in d)&&a==="light"&&(d.light=!0),T1({...o,colorSchemes:d,defaultColorScheme:a,...typeof s!="boolean"&&s},...t)}const A1=E1(),j1="$$material";function N1(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const M1=e=>N1(e)&&e!=="classes",V1=Ny({themeId:j1,defaultTheme:A1,rootShouldForwardProp:M1}),P1=Uy;process.env.NODE_ENV!=="production"&&(ge.node,ge.object.isRequired);function R1(e){return By(e)}function I1(e){return _o("MuiSvgIcon",e)}ky("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const D1=e=>{const{color:t,fontSize:n,classes:s}=e,r={root:["root",t!=="inherit"&&`color${zt(t)}`,`fontSize${zt(n)}`]};return g0(r,I1,s)},$1=V1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${zt(n.color)}`],t[`fontSize${zt(n.fontSize)}`]]}})(P1(({theme:e})=>{var t,n,s,r,i,o,a,c,d,u,f,h,p,x;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(r=(t=e.transitions)==null?void 0:t.create)==null?void 0:r.call(t,"fill",{duration:(s=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:s.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:o.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:c.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:u.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,S;return{props:{color:m},style:{color:(S=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(h=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(x=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:x.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ts=g.forwardRef(function(t,n){const s=R1({props:t,name:"MuiSvgIcon"}),{children:r,className:i,color:o="inherit",component:a="svg",fontSize:c="medium",htmlColor:d,inheritViewBox:u=!1,titleAccess:f,viewBox:h="0 0 24 24",...p}=s,x=g.isValidElement(r)&&r.type==="svg",m={...s,color:o,component:a,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:x},b={};u||(b.viewBox=h);const S=D1(m);return l.jsxs($1,{as:a,className:Xr(S.root,i),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...b,...p,...x&&r.props,ownerState:m,children:[x?r.props.children:r,f?l.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Ts.propTypes={children:ge.node,classes:ge.object,className:ge.string,color:ge.oneOfType([ge.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ge.string]),component:ge.elementType,fontSize:ge.oneOfType([ge.oneOf(["inherit","large","medium","small"]),ge.string]),htmlColor:ge.string,inheritViewBox:ge.bool,shapeRendering:ge.string,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),titleAccess:ge.string,viewBox:ge.string});Ts.muiName="SvgIcon";function bn(e,t){function n(s,r){return l.jsx(Ts,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:r,...s,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ts.muiName,g.memo(g.forwardRef(n))}const F1=bn(l.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),O1=bn(l.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),L1=bn([l.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),l.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Ed=bn(l.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),Ad=bn(l.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),jd=bn(l.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam");function _1({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=w.useState(""),[o,a]=w.useState(0);return w.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),w.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function B1({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a,c;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:i}),l.jsxs("div",{className:`
100
+ export default theme;`}function vs(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:s={},transitions:o={},typography:a={},shape:l,...c}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":rn(20));const u=Na(s),d=gh(e);let h=yt(d,{mixins:fw(d.breakpoints,r),palette:u,shadows:xw.slice(),typography:mw(u,a),transitions:kw(o),zIndex:{...Sw}});if(h=yt(h,c),h=t.reduce((m,g)=>yt(m,g),h),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],g=(p,b)=>{let v;for(v in p){const k=p[v];if(m.includes(v)&&Object.keys(k).length>0){if(process.env.NODE_ENV!=="production"){const S=Aa("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(p,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:k}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
101
+ `))}p[v]={}}}};Object.keys(h.components).forEach(p=>{const b=h.components[p].styleOverrides;b&&p.startsWith("Mui")&&g(b,p)})}return h.unstable_sxConfig={...Ui,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(g){return Gn({sx:g,theme:this})},h.toRuntimeSource=Ch,h}function Ew(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Tw=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Ew(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Eh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Th(e){return e==="dark"?Tw:[]}function Aw(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Na(t);return{palette:s,opacity:{...Eh(s.mode),...n},overlays:r||Th(s.mode),...i}}function jw(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Pw=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Mw=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return Pw(e.cssVarPrefix).forEach(a=>{o[a]=n[a],delete n[a]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:s?{[s.replace("%s",t)]:o,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function Nw(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function O(e,t,n){!e[t]&&n&&(e[t]=n)}function mr(e){return typeof e!="string"||!e.startsWith("hsl")?e:wh(e)}function _t(e,t){`${t}Channel`in e||(e[`${t}Channel`]=hr(mr(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
102
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Iw(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Nt=e=>{try{return e()}catch{}},Rw=(e="mui")=>Qv(e);function To(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=Aw({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:s,...o}=vs({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:s,opacity:{...Eh(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Th(i)},o}function Vw(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=jw,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),h=Rw(s),{[d]:m,light:g,dark:p,...b}=n,v={...b};let k=m;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(k=!0),!k)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:rn(21,d));const S=To(v,k,c,d);g&&!v.light&&To(v,g,void 0,"light"),p&&!v.dark&&To(v,p,void 0,"dark");let A={defaultColorScheme:d,...S,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:l,getCssVar:h,colorSchemes:v,font:{...dw(S.typography),...S.font},spacing:Iw(c.spacing)};Object.keys(A.colorSchemes).forEach(L=>{const y=A.colorSchemes[L].palette,M=D=>{const B=D.split("-"),H=B[1],Y=B[2];return h(D,y[H][Y])};if(y.mode==="light"&&(O(y.common,"background","#fff"),O(y.common,"onBackground","#000")),y.mode==="dark"&&(O(y.common,"background","#000"),O(y.common,"onBackground","#fff")),Nw(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){O(y.Alert,"errorColor",De(y.error.light,.6)),O(y.Alert,"infoColor",De(y.info.light,.6)),O(y.Alert,"successColor",De(y.success.light,.6)),O(y.Alert,"warningColor",De(y.warning.light,.6)),O(y.Alert,"errorFilledBg",M("palette-error-main")),O(y.Alert,"infoFilledBg",M("palette-info-main")),O(y.Alert,"successFilledBg",M("palette-success-main")),O(y.Alert,"warningFilledBg",M("palette-warning-main")),O(y.Alert,"errorFilledColor",Nt(()=>y.getContrastText(y.error.main))),O(y.Alert,"infoFilledColor",Nt(()=>y.getContrastText(y.info.main))),O(y.Alert,"successFilledColor",Nt(()=>y.getContrastText(y.success.main))),O(y.Alert,"warningFilledColor",Nt(()=>y.getContrastText(y.warning.main))),O(y.Alert,"errorStandardBg",Fe(y.error.light,.9)),O(y.Alert,"infoStandardBg",Fe(y.info.light,.9)),O(y.Alert,"successStandardBg",Fe(y.success.light,.9)),O(y.Alert,"warningStandardBg",Fe(y.warning.light,.9)),O(y.Alert,"errorIconColor",M("palette-error-main")),O(y.Alert,"infoIconColor",M("palette-info-main")),O(y.Alert,"successIconColor",M("palette-success-main")),O(y.Alert,"warningIconColor",M("palette-warning-main")),O(y.AppBar,"defaultBg",M("palette-grey-100")),O(y.Avatar,"defaultBg",M("palette-grey-400")),O(y.Button,"inheritContainedBg",M("palette-grey-300")),O(y.Button,"inheritContainedHoverBg",M("palette-grey-A100")),O(y.Chip,"defaultBorder",M("palette-grey-400")),O(y.Chip,"defaultAvatarColor",M("palette-grey-700")),O(y.Chip,"defaultIconColor",M("palette-grey-700")),O(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),O(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),O(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),O(y.LinearProgress,"primaryBg",Fe(y.primary.main,.62)),O(y.LinearProgress,"secondaryBg",Fe(y.secondary.main,.62)),O(y.LinearProgress,"errorBg",Fe(y.error.main,.62)),O(y.LinearProgress,"infoBg",Fe(y.info.main,.62)),O(y.LinearProgress,"successBg",Fe(y.success.main,.62)),O(y.LinearProgress,"warningBg",Fe(y.warning.main,.62)),O(y.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),O(y.Slider,"primaryTrack",Fe(y.primary.main,.62)),O(y.Slider,"secondaryTrack",Fe(y.secondary.main,.62)),O(y.Slider,"errorTrack",Fe(y.error.main,.62)),O(y.Slider,"infoTrack",Fe(y.info.main,.62)),O(y.Slider,"successTrack",Fe(y.success.main,.62)),O(y.Slider,"warningTrack",Fe(y.warning.main,.62));const D=ei(y.background.default,.8);O(y.SnackbarContent,"bg",D),O(y.SnackbarContent,"color",Nt(()=>y.getContrastText(D))),O(y.SpeedDialAction,"fabHoverBg",ei(y.background.paper,.15)),O(y.StepConnector,"border",M("palette-grey-400")),O(y.StepContent,"border",M("palette-grey-400")),O(y.Switch,"defaultColor",M("palette-common-white")),O(y.Switch,"defaultDisabledColor",M("palette-grey-100")),O(y.Switch,"primaryDisabledColor",Fe(y.primary.main,.62)),O(y.Switch,"secondaryDisabledColor",Fe(y.secondary.main,.62)),O(y.Switch,"errorDisabledColor",Fe(y.error.main,.62)),O(y.Switch,"infoDisabledColor",Fe(y.info.main,.62)),O(y.Switch,"successDisabledColor",Fe(y.success.main,.62)),O(y.Switch,"warningDisabledColor",Fe(y.warning.main,.62)),O(y.TableCell,"border",Fe(Jr(y.divider,1),.88)),O(y.Tooltip,"bg",Jr(y.grey[700],.92))}if(y.mode==="dark"){O(y.Alert,"errorColor",Fe(y.error.light,.6)),O(y.Alert,"infoColor",Fe(y.info.light,.6)),O(y.Alert,"successColor",Fe(y.success.light,.6)),O(y.Alert,"warningColor",Fe(y.warning.light,.6)),O(y.Alert,"errorFilledBg",M("palette-error-dark")),O(y.Alert,"infoFilledBg",M("palette-info-dark")),O(y.Alert,"successFilledBg",M("palette-success-dark")),O(y.Alert,"warningFilledBg",M("palette-warning-dark")),O(y.Alert,"errorFilledColor",Nt(()=>y.getContrastText(y.error.dark))),O(y.Alert,"infoFilledColor",Nt(()=>y.getContrastText(y.info.dark))),O(y.Alert,"successFilledColor",Nt(()=>y.getContrastText(y.success.dark))),O(y.Alert,"warningFilledColor",Nt(()=>y.getContrastText(y.warning.dark))),O(y.Alert,"errorStandardBg",De(y.error.light,.9)),O(y.Alert,"infoStandardBg",De(y.info.light,.9)),O(y.Alert,"successStandardBg",De(y.success.light,.9)),O(y.Alert,"warningStandardBg",De(y.warning.light,.9)),O(y.Alert,"errorIconColor",M("palette-error-main")),O(y.Alert,"infoIconColor",M("palette-info-main")),O(y.Alert,"successIconColor",M("palette-success-main")),O(y.Alert,"warningIconColor",M("palette-warning-main")),O(y.AppBar,"defaultBg",M("palette-grey-900")),O(y.AppBar,"darkBg",M("palette-background-paper")),O(y.AppBar,"darkColor",M("palette-text-primary")),O(y.Avatar,"defaultBg",M("palette-grey-600")),O(y.Button,"inheritContainedBg",M("palette-grey-800")),O(y.Button,"inheritContainedHoverBg",M("palette-grey-700")),O(y.Chip,"defaultBorder",M("palette-grey-700")),O(y.Chip,"defaultAvatarColor",M("palette-grey-300")),O(y.Chip,"defaultIconColor",M("palette-grey-300")),O(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),O(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),O(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),O(y.LinearProgress,"primaryBg",De(y.primary.main,.5)),O(y.LinearProgress,"secondaryBg",De(y.secondary.main,.5)),O(y.LinearProgress,"errorBg",De(y.error.main,.5)),O(y.LinearProgress,"infoBg",De(y.info.main,.5)),O(y.LinearProgress,"successBg",De(y.success.main,.5)),O(y.LinearProgress,"warningBg",De(y.warning.main,.5)),O(y.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),O(y.Slider,"primaryTrack",De(y.primary.main,.5)),O(y.Slider,"secondaryTrack",De(y.secondary.main,.5)),O(y.Slider,"errorTrack",De(y.error.main,.5)),O(y.Slider,"infoTrack",De(y.info.main,.5)),O(y.Slider,"successTrack",De(y.success.main,.5)),O(y.Slider,"warningTrack",De(y.warning.main,.5));const D=ei(y.background.default,.98);O(y.SnackbarContent,"bg",D),O(y.SnackbarContent,"color",Nt(()=>y.getContrastText(D))),O(y.SpeedDialAction,"fabHoverBg",ei(y.background.paper,.15)),O(y.StepConnector,"border",M("palette-grey-600")),O(y.StepContent,"border",M("palette-grey-600")),O(y.Switch,"defaultColor",M("palette-grey-300")),O(y.Switch,"defaultDisabledColor",M("palette-grey-600")),O(y.Switch,"primaryDisabledColor",De(y.primary.main,.55)),O(y.Switch,"secondaryDisabledColor",De(y.secondary.main,.55)),O(y.Switch,"errorDisabledColor",De(y.error.main,.55)),O(y.Switch,"infoDisabledColor",De(y.info.main,.55)),O(y.Switch,"successDisabledColor",De(y.success.main,.55)),O(y.Switch,"warningDisabledColor",De(y.warning.main,.55)),O(y.TableCell,"border",De(Jr(y.divider,1),.68)),O(y.Tooltip,"bg",Jr(y.grey[700],.92))}_t(y.background,"default"),_t(y.background,"paper"),_t(y.common,"background"),_t(y.common,"onBackground"),_t(y,"divider"),Object.keys(y).forEach(D=>{const B=y[D];D!=="tonalOffset"&&B&&typeof B=="object"&&(B.main&&O(y[D],"mainChannel",hr(mr(B.main))),B.light&&O(y[D],"lightChannel",hr(mr(B.light))),B.dark&&O(y[D],"darkChannel",hr(mr(B.dark))),B.contrastText&&O(y[D],"contrastTextChannel",hr(mr(B.contrastText))),D==="text"&&(_t(y[D],"primary"),_t(y[D],"secondary")),D==="action"&&(B.active&&_t(y[D],"active"),B.selected&&_t(y[D],"selected")))})}),A=t.reduce((L,y)=>yt(L,y),A);const T={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:Mw(A)},{vars:C,generateThemeVars:N,generateStyleSheets:P}=tw(A,T);return A.vars=C,Object.entries(A.colorSchemes[A.defaultColorScheme]).forEach(([L,y])=>{A[L]=y}),A.generateThemeVars=N,A.generateStyleSheets=P,A.generateSpacing=function(){return ph(c.spacing,Ea(this))},A.getColorSchemeSelector=nw(a),A.spacing=A.generateSpacing(),A.shouldSkipGeneratingVar=o,A.unstable_sxConfig={...Ui,...c==null?void 0:c.unstable_sxConfig},A.unstable_sx=function(y){return Gn({sx:y,theme:this})},A.toRuntimeSource=Ch,A}function du(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Na({...n===!0?{}:n.palette,mode:t})})}function Dw(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:s=n==null?void 0:n.mode,...o}=e,a=s||"light",l=i==null?void 0:i[a],c={...i,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return vs(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const d=vs({...e,palette:u},...t);return d.defaultColorScheme=a,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},du(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},du(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Vw({...o,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const Fw=Dw(),Lw="$$material";function Ow(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const $w=e=>Ow(e)&&e!=="classes",_w=Ov({themeId:Lw,defaultTheme:Fw,rootShouldForwardProp:$w}),Bw=Xv;process.env.NODE_ENV!=="production"&&(Te.node,Te.object.isRequired);function zw(e){return Yv(e)}function Hw(e){return Aa("MuiSvgIcon",e)}Rv("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Uw=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${wn(t)}`,`fontSize${wn(n)}`]};return Cb(i,Hw,r)},Ww=_w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${wn(n.color)}`],t[`fontSize${wn(n.fontSize)}`]]}})(Bw(({theme:e})=>{var t,n,r,i,s,o,a,l,c,u,d,h,m,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:p=>!p.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((o=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,p])=>p&&p.main).map(([p])=>{var b,v;return{props:{color:p},style:{color:(v=(b=(e.vars??e).palette)==null?void 0:b[p])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(h=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:h.active}},{props:{color:"disabled"},style:{color:(g=(m=(e.vars??e).palette)==null?void 0:m.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ei=x.forwardRef(function(t,n){const r=zw({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:h="0 0 24 24",...m}=r,g=x.isValidElement(i)&&i.type==="svg",p={...r,color:o,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:h,hasSvgAsChild:g},b={};u||(b.viewBox=h);const v=Uw(p);return f.jsxs(Ww,{as:a,className:Ds(v.root,s),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...b,...m,...g&&i.props,ownerState:p,children:[g?i.props.children:i,d?f.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Ei.propTypes={children:Te.node,classes:Te.object,className:Te.string,color:Te.oneOfType([Te.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Te.string]),component:Te.elementType,fontSize:Te.oneOfType([Te.oneOf(["inherit","large","medium","small"]),Te.string]),htmlColor:Te.string,inheritViewBox:Te.bool,shapeRendering:Te.string,sx:Te.oneOfType([Te.arrayOf(Te.oneOfType([Te.func,Te.object,Te.bool])),Te.func,Te.object]),titleAccess:Te.string,viewBox:Te.string});Ei.muiName="SvgIcon";function nr(e,t){function n(r,i){return f.jsx(Ei,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ei.muiName,x.memo(x.forwardRef(n))}const Zw=nr(f.jsx("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"}),"AttachFile"),qw=nr(f.jsx("path",{d:"M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7s.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71s-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9"}),"CallEnd"),Gw=nr([f.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),f.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Ah=nr(f.jsx("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M6 9h12v2H6zm8 5H6v-2h8zm4-6H6V6h12z"}),"Chat"),jh=nr(f.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3m5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72z"}),"Mic"),Ph=nr(f.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam");function Kw({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[i,s]=j.useState(""),[o,a]=j.useState(0);return j.useEffect(()=>{if(n){s(e);return}if(t){s(e);return}if(o<e.length){const l=setTimeout(()=>{s(e.slice(0,o+1)),a(o+1)},r);return()=>clearTimeout(l)}},[e,o,t,r,n]),j.useEffect(()=>{n||(a(0),s(""))},[e,n]),f.jsxs("span",{className:"relative",children:[f.jsx("span",{className:"inline-block",children:i}),!t&&f.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:l*.2,ease:"easeInOut"}},l))})]})}function Yw({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var o,a,l;const i=tt(t),s=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return f.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:f.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:s}),f.jsxs("div",{className:`
162
103
  relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
163
- ${n?`${((o=r.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=r.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
164
- ${s?"shimmer":""}
104
+ ${n?`${((o=i.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=i.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
105
+ ${r?"shimmer":""}
165
106
  transition-all duration-200 group-hover:scale-[1.02]
166
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:s&&!n?l.jsx(_1,{text:e.content,isComplete:!s,isRealTimeStream:((c=e.metadata)==null?void 0:c.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}const Nd=w.forwardRef(({disabled:e,capabilities:t,sessionStarted:n,participantName:s="User",loadingText:r="Waiting for agent to connect...",theme:i="vox",client:o,displayType:a="widget",onBack:c},d)=>{var ae,Oe,Be,Pe,ze,Xe,rt,wt,Gn,Kn,Zt;const[u,f]=w.useState(!1),[h,p]=w.useState(!1),[x,m]=w.useState(!1),[b,S]=w.useState(()=>{var oe;return((oe=o==null?void 0:o.getCurrentInteraction)==null?void 0:oe.call(o))||null}),[C,T]=w.useState(()=>o&&typeof o.getChatMessages=="function"?o.getChatMessages():[]),[k,v]=w.useState(()=>{const z=n;return console.log("🚀 SessionView: Initial loading state calculation:",{sessionStarted:n,shouldShowLoading:z}),z}),[j,V]=w.useState(!0),[E,_]=w.useState(new Set),[y,D]=w.useState([]),W=w.useRef(null),te=w.useRef(null),[ue,ie]=w.useState(!0),fe=w.useRef(null),ne=w.useRef(null),R=w.useMemo(()=>Math.random().toString(36).substr(2,9),[]);console.log(`🚀 SessionView-${R}: Component initialized with:`,{initialMessagesCount:C.length,clientExists:!!o,sessionStarted:n,agentConnected:x,isLoading:k,displayType:a,disabled:e});const B=(ae=o==null?void 0:o.getCurrentAgentInfo)==null?void 0:ae.call(o),O=((B==null?void 0:B.name)||"AI Assistant").split(" ").map(z=>z[0]).join("").toUpperCase().slice(0,2),q=w.useCallback(()=>{if(te.current){const{scrollTop:z,scrollHeight:oe,clientHeight:ke}=te.current;return oe-z-ke<100}return!0},[]),Y=w.useCallback(()=>{const z=q();ie(z)},[q]),U=w.useCallback((z=!1)=>{if(ue&&te.current){const oe=te.current;z?oe.scrollTop=oe.scrollHeight:oe.scrollTo({top:oe.scrollHeight,behavior:"smooth"})}},[ue]);w.useEffect(()=>{if(!o)return;const z=ee=>{var Te,H,me,xe,Ee;if(console.log(`SessionView-${R}: Received message:`,ee),console.log(`SessionView-${R}: Message sender details:`,{senderId:(Te=ee.sender)==null?void 0:Te.id,senderName:(H=ee.sender)==null?void 0:H.name,senderType:(me=ee.sender)==null?void 0:me.type,content:ee.content,messageId:ee.id,topic:(xe=ee.metadata)==null?void 0:xe.topic,isTranscription:((Ee=ee.metadata)==null?void 0:Ee.topic)==="lk.transcription"}),v(!1),b&&ee.sender.type==="agent"){console.log("SessionView: Queuing agent message due to active interaction:",b.methodName),D(ot=>[...ot,ee]);return}ee.sender.type==="agent"&&V(!1),T(ot=>{var Us;if(ot.some(Rt=>Rt.id===ee.id))return console.log("SessionView: Message already exists, skipping:",ee.id),ot;if(console.log(`SessionView-${R}: Adding new message:`,ee.id),ee.sender.type==="agent"&&(_(Rt=>new Set(Rt).add(ee.id)),!((Us=ee.metadata)!=null&&Us.streaming))){const Rt=ee.content.length*35+1e3;setTimeout(()=>{_(Kd=>{const Jo=new Set(Kd);return Jo.delete(ee.id),Jo})},Rt)}return[...ot,ee]}),setTimeout(()=>{ue&&U(!0)},0)},oe=ee=>{var Te;if(console.log("SessionView: Updated message:",ee),b&&ee.sender.type==="agent"){console.log("SessionView: Queuing agent message update due to active interaction:",b.methodName),D(H=>{const me=H.findIndex(xe=>xe.id===ee.id);if(me>=0){const xe=[...H];return xe[me]=ee,xe}else return[...H,ee]});return}T(H=>H.map(me=>me.id===ee.id?{...ee}:me)),setTimeout(()=>{ue&&U(!0)},0),(Te=ee.metadata)!=null&&Te.streaming||_(H=>{const me=new Set(H);return me.delete(ee.id),me})},ke=ee=>{var Te,H,me,xe,Ee,ot;if(console.log(`SessionView-${R}: Sent message:`,ee),console.log(`SessionView-${R}: Sent message details:`,{senderId:(Te=ee.sender)==null?void 0:Te.id,senderName:(H=ee.sender)==null?void 0:H.name,senderType:(me=ee.sender)==null?void 0:me.type,content:ee.content,messageId:ee.id,topic:(xe=ee.metadata)==null?void 0:xe.topic,isTranscription:((Ee=ee.metadata)==null?void 0:Ee.topic)==="lk.transcription"}),v(!1),((ot=ee.metadata)==null?void 0:ot.topic)==="lk.transcription"){console.log(`SessionView-${R}: Skipping sent transcription message (will come through received):`,ee.id);return}T(Yn=>Yn.some(Rt=>Rt.id===ee.id)?(console.log("SessionView: Sent message already exists, skipping:",ee.id),Yn):(console.log("SessionView: Adding sent message:",ee.id),[...Yn,ee])),setTimeout(()=>{ue&&U(!0)},0)};return o.on("chat.message.received",z),o.on("chat.message.updated",oe),o.on("chat.message.sent",ke),()=>{o.off("chat.message.received",z),o.off("chat.message.updated",oe),o.off("chat.message.sent",ke)}},[o,b,ue,U]),w.useEffect(()=>{if(!o)return;const z=()=>{if(console.log("SessionView: Agent is thinking"),b){console.log("SessionView: Suppressing thinking indicator due to active interaction:",b.methodName);return}V(!0)},oe=()=>{console.log("SessionView: Agent is speaking"),V(!1)};return o.on("agent.thinking",z),o.on("agent.speaking",oe),()=>{o.off("agent.thinking",z),o.off("agent.speaking",oe)}},[o,b]),w.useEffect(()=>{console.log("🎬 SessionView: Messages state updated:",{messageCount:C.length,messages:C.map(z=>{var oe,ke;return{id:z.id,text:((oe=z.content)==null?void 0:oe.substring(0,50))+"...",from:(ke=z.sender)==null?void 0:ke.id}})})},[C]),w.useEffect(()=>{const z=C.filter(oe=>oe.content&&oe.content.trim()!==""&&oe.content.trim()!=="...");C.length===0?console.log("📝 SessionView: Showing empty state - no messages available"):z.length===0?console.log("📝 SessionView: Showing empty state - no messages with content available",{totalMessages:C.length,messagesWithContent:z.length}):console.log("📝 SessionView: Showing messages",{totalMessages:C.length,messagesWithContent:z.length})},[C]);const{agent:{isActive:re=!1}={}}=o?ad(o):{agent:{isActive:!1}},$=_e(i),I=w.useMemo(()=>o&&typeof o.getCurrentSession=="function"?!!o.getCurrentSession():!1,[o]),L=w.useMemo(()=>o&&typeof o.getIsAgentConnected=="function"&&o.getIsAgentConnected()||x,[o,x]),N=re||L;w.useEffect(()=>{var z,oe;console.log("🤖 SessionView agent state:",{isAgentActive:re,hasActiveSession:I,isAgentActuallyConnected:L,effectiveAgentActive:N,sessionStarted:n,clientSession:(oe=(z=o==null?void 0:o.getCurrentSession)==null?void 0:z.call(o))==null?void 0:oe.id,isLoading:k}),N&&k&&(console.log("✅ SessionView: Agent became active, stopping loading state"),v(!1))},[re,I,L,N,n,o,k]),w.useEffect(()=>{re&&console.log("🤖 Agent became active")},[re]),w.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:s,effectiveAgentActive:N,chatOpen:u,currentInteraction:(b==null?void 0:b.methodName)||"none"})},[n,e,s,N,u,b]),w.useEffect(()=>{if(n&&!N){console.log("⏰ Starting agent timeout detection...");const z=setTimeout(()=>{I&&!N&&(console.log("⚡ Fallback: Assuming agent is connected after 5 seconds with active session"),m(!0),p(!1))},5e3),oe=setTimeout(()=>{N||(console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),p(!0))},3e4);return()=>{clearTimeout(z),clearTimeout(oe)}}else N&&(console.log("✅ Agent is active, clearing timeout"),p(!1))},[n,N,I]),w.useEffect(()=>{if(!o)return;const z=()=>{console.log("🔄 Client connection state changed:",o.connected)},oe=ke=>{console.log("🔴 Client disconnected:",ke),S(null),f(!1),p(!1)};return o.on("connection.connected",z),o.on("connection.disconnected",oe),()=>{o.off("connection.connected",z),o.off("connection.disconnected",oe)}},[o]),w.useEffect(()=>{if(!o)return;const z=Te=>{console.log("🤖 SessionView: Agent connected!",Te),m(!0),p(!1),v(!1)},oe=Te=>{console.log("🗣️ SessionView: Agent speaking detected!",Te),x||(m(!0),p(!1),v(!1))},ke=Te=>{console.log("🤔 SessionView: Agent thinking detected!",Te),x||(m(!0),p(!1),v(!1))},ee=()=>{console.log("🤖 SessionView: Agent disconnected"),m(!1),v(!0)};return o.on("agent.connected",z),o.on("agent.speaking",oe),o.on("agent.thinking",ke),o.on("connection.disconnected",ee),()=>{o.off("agent.connected",z),o.off("agent.speaking",oe),o.off("agent.thinking",ke),o.off("connection.disconnected",ee)}},[o,x]),w.useEffect(()=>{if(!o)return;const z=Te=>{console.log("🎯 SessionView: RPC Interaction started:",Te);const H=o.getCurrentInteraction();H&&(console.log("📱 SessionView: Setting current interaction:",H.methodName,"mode:",H.presentationMode),S(H))},oe=Te=>{console.log("✅ SessionView: RPC Interaction completed:",Te),S(null)},ke=async Te=>{console.log("⏰ SessionView: RPC Interaction timeout:",Te),S(null)},ee=async Te=>{console.log("❌ SessionView: RPC Interaction dismissed:",Te),S(null)};return o.on("rpc.interaction.started",z),o.on("rpc.interaction.completed",oe),o.on("rpc.interaction.timeout",ke),o.on("rpc.interaction.dismissed",ee),()=>{o.off("rpc.interaction.started",z),o.off("rpc.interaction.completed",oe),o.off("rpc.interaction.timeout",ke),o.off("rpc.interaction.dismissed",ee)}},[o]),w.useEffect(()=>{if(!o)return;const z=o.getCurrentInteraction();z?(console.log("🔄 SessionView: Syncing with existing interaction:",z.methodName),S(z)):S(null)},[o]),w.useEffect(()=>{b!=null&&b.methodName&&console.log("🎭 SessionView: Interactive UI started:",b.methodName)},[b==null?void 0:b.methodName]),w.useEffect(()=>{a==="fullscreen"&&console.log("📱 SessionView: Switched to fullscreen mode")},[a]),w.useEffect(()=>{b&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),f(!1))},[b,u]),s0(),w.useEffect(()=>{fe.current&&u&&C.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",C.length),setTimeout(()=>{ue&&U(!0)},100))},[C.length,u,ue,U]),w.useEffect(()=>{C.length>0&&C.length%5===0&&console.log("📝 SessionView: Messages count:",C.length)},[C.length]);async function F(z){var oe,ke;try{b&&(console.log("SessionView: Dismissing active interaction due to user message send"),(oe=o==null?void 0:o.dismissCurrentInteraction)==null||oe.call(o),S(null)),await((ke=o==null?void 0:o.sendChatMessage)==null?void 0:ke.call(o,z))}catch(ee){console.error("Failed to send message:",ee)}}const se=w.useCallback(z=>{console.log("📝 SessionView: Adding local message for voice session context:",z)},[]),A=w.useCallback(async z=>{try{o&&typeof o.sendAttachments=="function"&&(await o.sendAttachments(z),console.log("📎 SessionView: Attachments sent successfully:",z.map(oe=>oe.name)))}catch(oe){console.error("❌ SessionView: Failed to send attachments:",oe)}},[o]),Z=w.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:N,chatOpen:u,currentInteraction:b==null?void 0:b.methodName,hasOnBack:!!c}),b&&(console.log("🎭 SessionView: Dismissing current interaction:",b.methodName),S(null),o&&typeof o.dismissCurrentInteraction=="function"&&o.dismissCurrentInteraction()),f(!1),p(!1),console.log("✅ SessionView: Local state reset"),o&&typeof o.endSession=="function"&&(o.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),o&&typeof o.disconnect=="function"&&(o.disconnect(),console.log("✅ SessionView: Client disconnected")),c?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),c(),console.log("✅ SessionView: onBack called")):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(z){console.error("❌ SessionView: Failed to end call:",z),S(null),f(!1),p(!1),c&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),c())}},[o,c,b,n,N,u]);w.useEffect(()=>(n||console.log("🔄 SessionView: Session ended, component will unmount"),()=>{n||console.log("🧹 SessionView: Component unmounted")}),[n]),w.useEffect(()=>{var oe,ke;const z=((ke=(oe=o==null?void 0:o.getCurrentSession)==null?void 0:oe.call(o))==null?void 0:ke.id)||null;ne.current&&!z&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:ne.current,currentSession:z,displayType:a,sessionStarted:n,effectiveAgentActive:N}),ne.current=z},[o,a,n,N]);const G=Q("w-full flex flex-col items-center justify-center",a==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",$.main,a==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),de=c&&(a==="popup"||a==="fullscreen");return k?l.jsx("main",{ref:d,className:Q(G,"relative",e&&"pointer-events-none opacity-50"),children:de&&l.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Oe=$.chatHeader)==null?void 0:Oe.container)||"border-gray-200"}`,children:l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),l.jsx("p",{className:`text-sm ${$.text.muted}`,children:s})]})})})}):l.jsxs("main",{ref:d,className:Q(G,"relative",e&&"pointer-events-none opacity-50"),style:{minHeight:0},children:[de&&l.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Be=$.chatHeader)==null?void 0:Be.container)||"border-gray-200"}`,children:l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),l.jsx("p",{className:`text-sm ${$.text.muted}`,children:s})]})})}),l.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!N&&l.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[l.jsx(le.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:l.jsx(Do,{className:$.spinner,weight:"bold"})}),l.jsx(le.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${$.text.muted} text-center max-w-xs`,children:h?"Agent is taking longer than expected...":r}),l.jsx(le.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${$.text.muted} mt-2 text-center opacity-60`,children:h?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),h&&c&&l.jsx(le.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:c,className:`mt-4 px-4 py-2 rounded-lg ${((Pe=$.chatHeader)==null?void 0:Pe.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),N&&l.jsxs(l.Fragment,{children:[u&&l.jsxs("div",{className:Q("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[l.jsxs("div",{className:Q("flex-shrink-0 px-4 py-3 border-b",a==="fullscreen"?"px-8":"px-5",((ze=$.chatHeader)==null?void 0:ze.container)||"border-gray-200 dark:border-gray-700"),children:[l.jsx("h3",{className:Q("font-semibold text-lg",((Xe=$.text)==null?void 0:Xe.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),l.jsxs("p",{className:Q("text-sm",((rt=$.text)==null?void 0:rt.muted)||"text-gray-600 dark:text-gray-400"),children:[C.length," messages"]})]}),l.jsx("div",{className:Q("flex-1 flex flex-col min-h-0",a==="fullscreen"?"px-8":"px-5"),children:l.jsxs("div",{ref:te,className:`flex-1 flex flex-col h-full ${Q("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:Y,children:[C.filter(z=>z.content&&z.content.trim()!==""&&z.content.trim()!=="...").length===0&&l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:O}),l.jsx("p",{className:Q("text-lg font-medium mb-2",((wt=$.text)==null?void 0:wt.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),l.jsx("p",{className:Q("text-sm",((Gn=$.text)==null?void 0:Gn.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),C.length>0&&l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[l.jsx(Et,{mode:"popLayout",children:C.filter(z=>z.content&&z.content.trim()!==""&&z.content.trim()!=="...").map((z,oe)=>l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:oe*.02},layout:!0,children:l.jsx(B1,{message:z,theme:i,isOwn:z.sender.type==="participant",isStreaming:E.has(z.id)})},z.id||`message-${oe}`))}),j&&!b&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:C.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${i==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:O}),l.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(z=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:z*.2,ease:"easeInOut"}},z))})})]})}),l.jsx("div",{ref:W})]})})]})}),!ue&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{ie(!0),U(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${i==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]}),!u&&l.jsxs("div",{className:Q("flex-1 flex flex-col items-center w-full h-full min-h-0",(b==null?void 0:b.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[l.jsx(le.div,{className:"w-full flex justify-center",animate:{y:(b==null?void 0:b.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:l.jsx(n0,{chatOpen:u,client:o},`media-tiles-${((Zt=(Kn=o==null?void 0:o.getCurrentSession)==null?void 0:Kn.call(o))==null?void 0:Zt.id)||"no-session"}`)}),l.jsx(Et,{mode:"wait",children:b&&b.presentationMode==="embedded"&&l.jsx(le.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:Q("w-full relative mt-4 flex justify-center",a==="fullscreen"?"max-w-4xl":"max-w-md"),children:l.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:l.jsx(un,{interaction:b,theme:i,onDismiss:()=>{var z;return(z=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:z.call(o)},client:o,addLocalMessage:se})})},`embedded-${b.methodName}`)})]})]})]}),l.jsx(Et,{mode:"wait",children:b&&b.presentationMode!=="embedded"&&!u&&l.jsx("div",{className:Q("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",a==="fullscreen"?"bg-black/70":"bg-black/50"),children:l.jsx(le.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:Q("relative w-full overflow-hidden",a==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:l.jsx(un,{interaction:b,theme:i,onDismiss:()=>{var z;return(z=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:z.call(o)},client:o,addLocalMessage:se})},`modal-${b.methodName}`)})}),l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:l.jsx(U1,{capabilities:t,onSendMessage:F,onSendAttachments:A,onEndCall:Z,onChatOpenChange:f,disabled:e,theme:i,client:o,sessionStarted:n})})]})});Nd.displayName="SessionView";function U1({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:s,onChatOpenChange:r,disabled:i=!1,theme:o,client:a,sessionStarted:c=!1}){const[d,u]=w.useState(!1),f=w.useRef(null),h=w.useRef(null);w.useEffect(()=>{const C=()=>{const T=navigator.userAgent.toLowerCase(),v=["android","iphone","ipad","mobile","tablet"].some(E=>T.includes(E)),j="ontouchstart"in window||navigator.maxTouchPoints>0,V=window.innerWidth<=768;u(v||j&&V)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]);const p=C=>{const T=C.target.files;if(T&&T.length>0){const v=Array.from(T).filter(j=>j.type.startsWith("image/"));if(v.length===0){console.warn("No valid image files selected");return}n&&n(v),f.current&&(f.current.value="")}},x=C=>{const T=C.target.files;if(T&&T.length>0){const k=T[0];k.type.startsWith("image/")&&n&&n([k]),h.current&&(h.current.value="")}},m=()=>{!i&&f.current&&f.current.click()},b=()=>{!i&&d&&h.current&&h.current.click()},S=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:i,sessionStarted:c,hasOnEndCall:!!s}),s?s():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return l.jsx("div",{className:Q("px-3 py-2 !w-full backdrop-blur-xl border-0 shadow-lg",o==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:l.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[l.jsx("input",{ref:f,type:"file",multiple:!0,onChange:p,className:"hidden",accept:"image/*"}),l.jsx("input",{ref:h,type:"file",onChange:x,className:"hidden",accept:"image/*",capture:"environment"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("button",{onClick:m,disabled:i,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:l.jsx(F1,{className:"w-4 h-4"})}),d&&l.jsx("button",{onClick:b,disabled:i,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:l.jsx(L1,{className:"w-4 h-4"})})]}),l.jsx("div",{className:"flex-1 flex justify-center px-2",children:l.jsx(Yp,{capabilities:e,onChatOpenChange:r,onSendMessage:t,theme:o,client:a,className:"border-none py-0 rounded-xl max-w-md w-full"})}),l.jsx("div",{className:"flex items-center",children:l.jsx("button",{onClick:S,disabled:i||!c,className:Q("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",i||!c?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:l.jsx(O1,{className:"w-4 h-4"})})})]})})}function H1({onSendMessage:e,onSendAttachments:t,disabled:n,theme:s,onEndChat:r}){const[i,o]=g.useState(""),[a,c]=g.useState(!1),d=g.useRef(null),u=g.useRef(null),[f,h]=g.useState(!1),p=_e(s);g.useEffect(()=>{const k=()=>{const v=navigator.userAgent.toLowerCase(),V=["android","iphone","ipad","mobile","tablet"].some(y=>v.includes(y)),E="ontouchstart"in window||navigator.maxTouchPoints>0,_=window.innerWidth<=768;h(V||E&&_)};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const x=k=>{k.preventDefault(),i.trim()&&!n&&(e(i.trim()),o(""))},m=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),x(k))},b=k=>{const v=k.target.files;if(v&&v.length>0){const j=Array.from(v),V=j.filter(E=>E.type.startsWith("image/"));if(V.length===0){console.warn("No valid image files selected");return}V.length!==j.length&&console.warn("Some non-image files were filtered out"),t(V),d.current&&(d.current.value="")}},S=()=>{!n&&d.current&&d.current.click()},C=()=>{!n&&f&&u.current&&u.current.click()},T=k=>{const v=k.target.files;if(v&&v.length>0){const j=v[0];j.type.startsWith("image/")?t([j]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return l.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:l.jsx("form",{onSubmit:x,className:"flex items-center !w-full mx-auto max-w-4xl",children:l.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${s==="light"?"bg-white/90 border-gray-200":p.chatInput.container}`,children:[l.jsx(le.button,{type:"button",onClick:S,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${p.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:l.jsx($e.Paperclip,{className:"w-4 h-4"})}),f&&l.jsx(le.button,{type:"button",onClick:C,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${p.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:l.jsx($e.Camera,{className:"w-4 h-4"})}),l.jsx("input",{ref:d,type:"file",multiple:!0,onChange:b,className:"hidden",accept:"image/*"}),l.jsx("input",{ref:u,type:"file",onChange:T,className:"hidden",accept:"image/*",capture:"environment"}),l.jsx("textarea",{value:i,onChange:k=>o(k.target.value),onKeyDown:m,onFocus:()=>c(!0),onBlur:()=>c(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${p.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:k=>{const v=k.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,80)}px`}}),l.jsx(le.button,{type:"submit",disabled:n||!i.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${i.trim()&&!n?p.chatInput.sendButton:s==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:l.jsx($e.SendHorizontal,{className:"w-4 h-4"})}),r&&l.jsx(le.button,{type:"button",onClick:r,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${p.chatInput.endButton}`,"aria-label":"End chat",children:l.jsx($e.PhoneOff,{className:"w-4 h-4"})})]})})})}function z1({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=g.useState(""),[o,a]=g.useState(0);return g.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),g.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function W1({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:i}),l.jsxs("div",{className:`
167
- relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
168
- ${n?`${r.chatMessage.own} rounded-br-md`:`${r.chatMessage.other} rounded-bl-md`}
169
- ${s?"shimmer":""}
107
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[f.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:r&&!n?f.jsx(Kw,{text:e.content,isComplete:!r,isRealTimeStream:((l=e.metadata)==null?void 0:l.streaming)===!0,speed:35}):e.content}),f.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}const Mh=j.forwardRef(({disabled:e,capabilities:t,sessionStarted:n,participantName:r="User",loadingText:i="Waiting for agent to connect...",theme:s="vox",client:o,displayType:a="widget",onBack:l},c)=>{var Z,pe,Ae,xe,Ne,ze,He,rt,Gt,Lt,_;const[u,d]=j.useState(!1),[h,m]=j.useState(!1),[g,p]=j.useState(!1),[b,v]=j.useState(()=>{var q;return((q=o==null?void 0:o.getCurrentInteraction)==null?void 0:q.call(o))||null}),[k,S]=j.useState(()=>o&&typeof o.getChatMessages=="function"?o.getChatMessages():[]),[A,T]=j.useState(()=>{const I=n;return console.log("🚀 SessionView: Initial loading state calculation:",{sessionStarted:n,shouldShowLoading:I}),I}),[C,N]=j.useState(!0),[P,L]=j.useState(new Set),[y,M]=j.useState([]),D=j.useRef(null),B=j.useRef(null),[H,Y]=j.useState(!0),de=j.useRef(null),ie=j.useRef(null),F=j.useMemo(()=>Math.random().toString(36).substr(2,9),[]);console.log(`🚀 SessionView-${F}: Component initialized with:`,{initialMessagesCount:k.length,clientExists:!!o,sessionStarted:n,agentConnected:g,isLoading:A,displayType:a,disabled:e});const W=(Z=o==null?void 0:o.getCurrentAgentInfo)==null?void 0:Z.call(o),z=((W==null?void 0:W.name)||"AI Assistant").split(" ").map(I=>I[0]).join("").toUpperCase().slice(0,2),oe=j.useCallback(()=>{if(B.current){const{scrollTop:I,scrollHeight:q,clientHeight:ue}=B.current;return q-I-ue<100}return!0},[]),E=j.useCallback(()=>{const I=oe();Y(I)},[oe]),U=j.useCallback((I=!1)=>{if(H&&B.current){const q=B.current;I?q.scrollTop=q.scrollHeight:q.scrollTo({top:q.scrollHeight,behavior:"smooth"})}},[H]);j.useEffect(()=>{if(!o)return;const I=J=>{var ke,K,be,Ce,je;if(console.log(`SessionView-${F}: Received message:`,J),console.log(`SessionView-${F}: Message sender details:`,{senderId:(ke=J.sender)==null?void 0:ke.id,senderName:(K=J.sender)==null?void 0:K.name,senderType:(be=J.sender)==null?void 0:be.type,content:J.content,messageId:J.id,topic:(Ce=J.metadata)==null?void 0:Ce.topic,isTranscription:((je=J.metadata)==null?void 0:je.topic)==="lk.transcription"}),T(!1),b&&J.sender.type==="agent"){console.log("SessionView: Queuing agent message due to active interaction:",b.methodName),M($e=>[...$e,J]);return}J.sender.type==="agent"&&N(!1),S($e=>{var mt;if($e.some(cn=>cn.id===J.id))return console.log("SessionView: Message already exists, skipping:",J.id),$e;if(console.log(`SessionView-${F}: Adding new message:`,J.id),J.sender.type==="agent"&&(L(cn=>new Set(cn).add(J.id)),!((mt=J.metadata)!=null&&mt.streaming))){const cn=J.content.length*35+1e3;setTimeout(()=>{L(Jm=>{const rl=new Set(Jm);return rl.delete(J.id),rl})},cn)}return[...$e,J]}),setTimeout(()=>{H&&U(!0)},0)},q=J=>{var ke;if(console.log("SessionView: Updated message:",J),b&&J.sender.type==="agent"){console.log("SessionView: Queuing agent message update due to active interaction:",b.methodName),M(K=>{const be=K.findIndex(Ce=>Ce.id===J.id);if(be>=0){const Ce=[...K];return Ce[be]=J,Ce}else return[...K,J]});return}S(K=>K.map(be=>be.id===J.id?{...J}:be)),setTimeout(()=>{H&&U(!0)},0),(ke=J.metadata)!=null&&ke.streaming||L(K=>{const be=new Set(K);return be.delete(J.id),be})},ue=J=>{var ke,K,be,Ce,je,$e;if(console.log(`SessionView-${F}: Sent message:`,J),console.log(`SessionView-${F}: Sent message details:`,{senderId:(ke=J.sender)==null?void 0:ke.id,senderName:(K=J.sender)==null?void 0:K.name,senderType:(be=J.sender)==null?void 0:be.type,content:J.content,messageId:J.id,topic:(Ce=J.metadata)==null?void 0:Ce.topic,isTranscription:((je=J.metadata)==null?void 0:je.topic)==="lk.transcription"}),T(!1),(($e=J.metadata)==null?void 0:$e.topic)==="lk.transcription"){console.log(`SessionView-${F}: Skipping sent transcription message (will come through received):`,J.id);return}S(Tt=>Tt.some(cn=>cn.id===J.id)?(console.log("SessionView: Sent message already exists, skipping:",J.id),Tt):(console.log("SessionView: Adding sent message:",J.id),[...Tt,J])),setTimeout(()=>{H&&U(!0)},0)};return o.on("chat.message.received",I),o.on("chat.message.updated",q),o.on("chat.message.sent",ue),()=>{o.off("chat.message.received",I),o.off("chat.message.updated",q),o.off("chat.message.sent",ue)}},[o,b,H,U]),j.useEffect(()=>{if(!o)return;const I=()=>{if(console.log("SessionView: Agent is thinking"),b){console.log("SessionView: Suppressing thinking indicator due to active interaction:",b.methodName);return}N(!0)},q=()=>{console.log("SessionView: Agent is speaking"),N(!1)};return o.on("agent.thinking",I),o.on("agent.speaking",q),()=>{o.off("agent.thinking",I),o.off("agent.speaking",q)}},[o,b]),j.useEffect(()=>{console.log("🎬 SessionView: Messages state updated:",{messageCount:k.length,messages:k.map(I=>{var q,ue;return{id:I.id,text:((q=I.content)==null?void 0:q.substring(0,50))+"...",from:(ue=I.sender)==null?void 0:ue.id}})})},[k]),j.useEffect(()=>{const I=k.filter(q=>q.content&&q.content.trim()!==""&&q.content.trim()!=="...");k.length===0?console.log("📝 SessionView: Showing empty state - no messages available"):I.length===0?console.log("📝 SessionView: Showing empty state - no messages with content available",{totalMessages:k.length,messagesWithContent:I.length}):console.log("📝 SessionView: Showing messages",{totalMessages:k.length,messagesWithContent:I.length})},[k]);const{agent:{isActive:se=!1}={}}=o?lh(o):{agent:{isActive:!1}},$=tt(s),ee=j.useMemo(()=>o&&typeof o.getCurrentSession=="function"?!!o.getCurrentSession():!1,[o]),Q=j.useMemo(()=>o&&typeof o.getIsAgentConnected=="function"&&o.getIsAgentConnected()||g,[o,g]),V=se||Q;j.useEffect(()=>{var I,q;console.log("🤖 SessionView agent state:",{isAgentActive:se,hasActiveSession:ee,isAgentActuallyConnected:Q,effectiveAgentActive:V,sessionStarted:n,clientSession:(q=(I=o==null?void 0:o.getCurrentSession)==null?void 0:I.call(o))==null?void 0:q.id,isLoading:A}),V&&A&&(console.log("✅ SessionView: Agent became active, stopping loading state"),T(!1))},[se,ee,Q,V,n,o,A]),j.useEffect(()=>{se&&console.log("🤖 Agent became active")},[se]),j.useEffect(()=>{console.log("📋 Session state changed:",{sessionStarted:n,disabled:e,participantName:r,effectiveAgentActive:V,chatOpen:u,currentInteraction:(b==null?void 0:b.methodName)||"none"})},[n,e,r,V,u,b]),j.useEffect(()=>{if(n&&!V){console.log("⏰ Starting agent timeout detection...");const I=setTimeout(()=>{ee&&!V&&(console.log("⚡ Fallback: Assuming agent is connected after 5 seconds with active session"),p(!0),m(!1))},5e3),q=setTimeout(()=>{V||(console.log("⚠️ Agent timeout: Agent did not become active within 30 seconds"),m(!0))},3e4);return()=>{clearTimeout(I),clearTimeout(q)}}else V&&(console.log("✅ Agent is active, clearing timeout"),m(!1))},[n,V,ee]),j.useEffect(()=>{if(!o)return;const I=()=>{console.log("🔄 Client connection state changed:",o.connected)},q=ue=>{console.log("🔴 Client disconnected:",ue),v(null),d(!1),m(!1)};return o.on("connection.connected",I),o.on("connection.disconnected",q),()=>{o.off("connection.connected",I),o.off("connection.disconnected",q)}},[o]),j.useEffect(()=>{if(!o)return;const I=ke=>{console.log("🤖 SessionView: Agent connected!",ke),p(!0),m(!1),T(!1)},q=ke=>{console.log("🗣️ SessionView: Agent speaking detected!",ke),g||(p(!0),m(!1),T(!1))},ue=ke=>{console.log("🤔 SessionView: Agent thinking detected!",ke),g||(p(!0),m(!1),T(!1))},J=()=>{console.log("🤖 SessionView: Agent disconnected"),p(!1),T(!0)};return o.on("agent.connected",I),o.on("agent.speaking",q),o.on("agent.thinking",ue),o.on("connection.disconnected",J),()=>{o.off("agent.connected",I),o.off("agent.speaking",q),o.off("agent.thinking",ue),o.off("connection.disconnected",J)}},[o,g]),j.useEffect(()=>{if(!o)return;const I=ke=>{console.log("🎯 SessionView: RPC Interaction started:",ke);const K=o.getCurrentInteraction();K&&(console.log("📱 SessionView: Setting current interaction:",K.methodName,"mode:",K.presentationMode),v(K))},q=ke=>{console.log("✅ SessionView: RPC Interaction completed:",ke),v(null)},ue=async ke=>{console.log("⏰ SessionView: RPC Interaction timeout:",ke),v(null)},J=async ke=>{console.log("❌ SessionView: RPC Interaction dismissed:",ke),v(null)};return o.on("rpc.interaction.started",I),o.on("rpc.interaction.completed",q),o.on("rpc.interaction.timeout",ue),o.on("rpc.interaction.dismissed",J),()=>{o.off("rpc.interaction.started",I),o.off("rpc.interaction.completed",q),o.off("rpc.interaction.timeout",ue),o.off("rpc.interaction.dismissed",J)}},[o]),j.useEffect(()=>{if(!o)return;const I=o.getCurrentInteraction();I?(console.log("🔄 SessionView: Syncing with existing interaction:",I.methodName),v(I)):v(null)},[o]),j.useEffect(()=>{b!=null&&b.methodName&&console.log("🎭 SessionView: Interactive UI started:",b.methodName)},[b==null?void 0:b.methodName]),j.useEffect(()=>{a==="fullscreen"&&console.log("📱 SessionView: Switched to fullscreen mode")},[a]),j.useEffect(()=>{b&&u&&(console.log("🎭 SessionView: Interactive UI appeared, closing chat"),d(!1))},[b,u]),hb(),j.useEffect(()=>{de.current&&u&&k.length>0&&(console.log("📜 SessionView: Auto-scrolling to latest message, count:",k.length),setTimeout(()=>{H&&U(!0)},100))},[k.length,u,H,U]),j.useEffect(()=>{k.length>0&&k.length%5===0&&console.log("📝 SessionView: Messages count:",k.length)},[k.length]);async function G(I){var q,ue;try{b&&(console.log("SessionView: Dismissing active interaction due to user message send"),(q=o==null?void 0:o.dismissCurrentInteraction)==null||q.call(o),v(null)),await((ue=o==null?void 0:o.sendChatMessage)==null?void 0:ue.call(o,I))}catch(J){console.error("Failed to send message:",J)}}const fe=j.useCallback(I=>{console.log("📝 SessionView: Adding local message for voice session context:",I)},[]),R=j.useCallback(async I=>{try{o&&typeof o.sendAttachments=="function"&&(await o.sendAttachments(I),console.log("📎 SessionView: Attachments sent successfully:",I.map(q=>q.name)))}catch(q){console.error("❌ SessionView: Failed to send attachments:",q)}},[o]),re=j.useCallback(()=>{try{console.log("📞 SessionView: Ending call..."),console.log("📞 SessionView: Current state before ending:",{sessionStarted:n,effectiveAgentActive:V,chatOpen:u,currentInteraction:b==null?void 0:b.methodName,hasOnBack:!!l}),b&&(console.log("🎭 SessionView: Dismissing current interaction:",b.methodName),v(null),o&&typeof o.dismissCurrentInteraction=="function"&&o.dismissCurrentInteraction()),d(!1),m(!1),console.log("✅ SessionView: Local state reset"),o&&typeof o.endSession=="function"&&(o.endSession(),console.log("✅ SessionView: Session ended via client.endSession()")),o&&typeof o.disconnect=="function"&&(o.disconnect(),console.log("✅ SessionView: Client disconnected")),l?(console.log("🔄 SessionView: Calling onBack to return to welcome..."),l(),console.log("✅ SessionView: onBack called")):console.warn("⚠️ SessionView: No onBack function provided - cannot return to welcome"),console.log("🏁 SessionView: Call ended and cleanup completed")}catch(I){console.error("❌ SessionView: Failed to end call:",I),v(null),d(!1),m(!1),l&&(console.log("🔄 SessionView: Error occurred, still calling onBack..."),l())}},[o,l,b,n,V,u]);j.useEffect(()=>(n||console.log("🔄 SessionView: Session ended, component will unmount"),()=>{n||console.log("🧹 SessionView: Component unmounted")}),[n]),j.useEffect(()=>{var q,ue;const I=((ue=(q=o==null?void 0:o.getCurrentSession)==null?void 0:q.call(o))==null?void 0:ue.id)||null;ie.current&&!I&&console.warn("⚠️ SessionView: Session was lost unexpectedly!",{previousSession:ie.current,currentSession:I,displayType:a,sessionStarted:n,effectiveAgentActive:V}),ie.current=I},[o,a,n,V]);const ne=ce("w-full flex flex-col items-center justify-center",a==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",$.main,a==="fullscreen"?"max-w-none":"","overflow-hidden","h-full"),me=l&&(a==="popup"||a==="fullscreen");return A?f.jsx("main",{ref:c,className:ce(ne,"relative",e&&"pointer-events-none opacity-50"),children:me&&f.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((pe=$.chatHeader)==null?void 0:pe.container)||"border-gray-200"}`,children:f.jsx("div",{className:"flex items-center",children:f.jsxs("div",{children:[f.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),f.jsx("p",{className:`text-sm ${$.text.muted}`,children:r})]})})})}):f.jsxs("main",{ref:c,className:ce(ne,"relative",e&&"pointer-events-none opacity-50"),style:{minHeight:0},children:[me&&f.jsx("div",{className:`flex items-center justify-between w-full p-4 border-b ${((Ae=$.chatHeader)==null?void 0:Ae.container)||"border-gray-200"}`,children:f.jsx("div",{className:"flex items-center",children:f.jsxs("div",{children:[f.jsx("h3",{className:`font-semibold ${$.text.primary}`,children:"Voice Session"}),f.jsx("p",{className:`text-sm ${$.text.muted}`,children:r})]})})}),f.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!V&&f.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[f.jsx(ge.div,{animate:{rotate:360,scale:[1,1.1,1]},transition:{rotate:{duration:2,repeat:1/0,ease:"linear"},scale:{duration:1,repeat:1/0,ease:"easeInOut"}},className:"w-12 h-12 mb-4",children:f.jsx(xa,{className:$.spinner,weight:"bold"})}),f.jsx(ge.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${$.text.muted} text-center max-w-xs`,children:h?"Agent is taking longer than expected...":i}),f.jsx(ge.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${$.text.muted} mt-2 text-center opacity-60`,children:h?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),h&&l&&f.jsx(ge.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:l,className:`mt-4 px-4 py-2 rounded-lg ${((xe=$.chatHeader)==null?void 0:xe.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),V&&f.jsxs(f.Fragment,{children:[u&&f.jsxs("div",{className:ce("absolute inset-0 w-full h-full flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",s==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm",u?"translate-y-0 opacity-100 delay-200":"translate-y-10 opacity-0"),children:[f.jsxs("div",{className:ce("flex-shrink-0 px-4 py-3 border-b",a==="fullscreen"?"px-8":"px-5",((Ne=$.chatHeader)==null?void 0:Ne.container)||"border-gray-200 dark:border-gray-700"),children:[f.jsx("h3",{className:ce("font-semibold text-lg",((ze=$.text)==null?void 0:ze.primary)||"text-gray-900 dark:text-white"),children:"Transcription & Chat"}),f.jsxs("p",{className:ce("text-sm",((He=$.text)==null?void 0:He.muted)||"text-gray-600 dark:text-gray-400"),children:[k.length," messages"]})]}),f.jsx("div",{className:ce("flex-1 flex flex-col min-h-0",a==="fullscreen"?"px-8":"px-5"),children:f.jsxs("div",{ref:B,className:`flex-1 flex flex-col h-full ${ce("overflow-y-auto scrollbar-hide py-4")}`,style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:E,children:[k.filter(I=>I.content&&I.content.trim()!==""&&I.content.trim()!=="...").length===0&&f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsxs("div",{className:"text-center",children:[f.jsx(ge.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:z}),f.jsx("p",{className:ce("text-lg font-medium mb-2",((rt=$.text)==null?void 0:rt.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),f.jsx("p",{className:ce("text-sm",((Gt=$.text)==null?void 0:Gt.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),k.length>0&&f.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:f.jsxs("div",{className:"space-y-3",children:[f.jsx(en,{mode:"popLayout",children:k.filter(I=>I.content&&I.content.trim()!==""&&I.content.trim()!=="...").map((I,q)=>f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:q*.02},layout:!0,children:f.jsx(Yw,{message:I,theme:s,isOwn:I.sender.type==="participant",isStreaming:P.has(I.id)})},I.id||`message-${q}`))}),C&&!b&&f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:k.length*.1},className:"flex w-full justify-start mb-4 px-1",children:f.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${s==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:z}),f.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:f.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(I=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:I*.2,ease:"easeInOut"}},I))})})]})}),f.jsx("div",{ref:D})]})})]})}),!H&&f.jsx(ge.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{Y(!0),U(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${s==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]}),!u&&f.jsxs("div",{className:ce("flex-1 flex flex-col items-center w-full h-full min-h-0",(b==null?void 0:b.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[f.jsx(ge.div,{className:"w-full flex justify-center",animate:{y:(b==null?void 0:b.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:f.jsx(fb,{chatOpen:u,client:o},`media-tiles-${((_=(Lt=o==null?void 0:o.getCurrentSession)==null?void 0:Lt.call(o))==null?void 0:_.id)||"no-session"}`)}),f.jsx(en,{mode:"wait",children:b&&b.presentationMode==="embedded"&&f.jsx(ge.div,{initial:{opacity:0,y:20,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:20,height:0},transition:{duration:.3,ease:"easeOut"},className:ce("w-full relative mt-4 flex justify-center",a==="fullscreen"?"max-w-4xl":"max-w-md"),children:f.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:f.jsx(Pr,{interaction:b,theme:s,onDismiss:()=>{var I;return(I=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:I.call(o)},client:o,addLocalMessage:fe})})},`embedded-${b.methodName}`)})]})]})]}),f.jsx(en,{mode:"wait",children:b&&b.presentationMode!=="embedded"&&!u&&f.jsx("div",{className:ce("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",a==="fullscreen"?"bg-black/70":"bg-black/50"),children:f.jsx(ge.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:ce("relative w-full overflow-hidden",a==="fullscreen"?"max-w-2xl mx-8 max-h-[85vh]":"max-w-lg mx-4 max-h-[80vh]","bg-white dark:bg-gray-900 rounded-2xl shadow-2xl","border border-gray-200 dark:border-gray-700"),children:f.jsx(Pr,{interaction:b,theme:s,onDismiss:()=>{var I;return(I=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:I.call(o)},client:o,addLocalMessage:fe})},`modal-${b.methodName}`)})}),f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"absolute bottom-0 left-0 right-0 flex-shrink-0 w-full z-20",children:f.jsx(Xw,{capabilities:t,onSendMessage:G,onSendAttachments:R,onEndCall:re,onChatOpenChange:d,disabled:e,theme:s,client:o,sessionStarted:n})})]})});Mh.displayName="SessionView";function Xw({capabilities:e,onSendMessage:t,onSendAttachments:n,onEndCall:r,onChatOpenChange:i,disabled:s=!1,theme:o,client:a,sessionStarted:l=!1}){const[c,u]=j.useState(!1),d=j.useRef(null),h=j.useRef(null);j.useEffect(()=>{const k=()=>{const S=rh().toLowerCase(),T=["android","iphone","ipad","mobile","tablet"].some(L=>S.includes(L)),C=ih(),{width:N}=oh(),P=N<=768;u(T||C&&P)};return k(),wa(zt,"resize",k),()=>ka(zt,"resize",k)},[]);const m=k=>{const S=k.target.files;if(S&&S.length>0){const T=Array.from(S).filter(C=>C.type.startsWith("image/"));if(T.length===0){console.warn("No valid image files selected");return}n&&n(T),d.current&&(d.current.value="")}},g=k=>{const S=k.target.files;if(S&&S.length>0){const A=S[0];A.type.startsWith("image/")&&n&&n([A]),h.current&&(h.current.value="")}},p=()=>{!s&&d.current&&d.current.click()},b=()=>{!s&&c&&h.current&&h.current.click()},v=()=>{console.log("🔴 VoiceControlPanel: End call button clicked"),console.log("🔴 VoiceControlPanel: Current state:",{disabled:s,sessionStarted:l,hasOnEndCall:!!r}),r?r():console.warn("⚠️ VoiceControlPanel: No onEndCall function provided")};return f.jsx("div",{className:ce("px-3 py-2 !w-full backdrop-blur-xl border-0 shadow-lg",o==="light"?"bg-white/95 border-t border-gray-200":"bg-gray-900/95 border-t border-gray-700"),children:f.jsxs("div",{className:"flex items-center justify-between !w-full mx-auto max-w-4xl",children:[f.jsx("input",{ref:d,type:"file",multiple:!0,onChange:m,className:"hidden",accept:"image/*"}),f.jsx("input",{ref:h,type:"file",onChange:g,className:"hidden",accept:"image/*",capture:"environment"}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{onClick:p,disabled:s,className:ce("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",s?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Attach files",children:f.jsx(Zw,{className:"w-4 h-4"})}),c&&f.jsx("button",{onClick:b,disabled:s,className:ce("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",s?"opacity-50 cursor-not-allowed":"hover:shadow-md",o==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/50 hover:bg-gray-600/50 text-gray-300"),title:"Take photo",children:f.jsx(Gw,{className:"w-4 h-4"})})]}),f.jsx("div",{className:"flex-1 flex justify-center px-2",children:f.jsx(ob,{capabilities:e,onChatOpenChange:i,onSendMessage:t,theme:o,client:a,className:"border-none py-0 rounded-xl max-w-md w-full"})}),f.jsx("div",{className:"flex items-center",children:f.jsx("button",{onClick:v,disabled:s||!l,className:ce("p-2 rounded-full transition-all duration-200 hover:scale-105 active:scale-95",s||!l?"opacity-50 cursor-not-allowed":"hover:shadow-md","bg-red-500 hover:bg-red-600 text-white"),title:"End call",children:f.jsx(qw,{className:"w-4 h-4"})})})]})})}function Qw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Jw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,e2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,t2={};function fu(e,t){return(t2.jsx?e2:Jw).test(e)}const n2=/[ \t\n\f\r]/g;function r2(e){return typeof e=="object"?e.type==="text"?hu(e.value):!1:hu(e)}function hu(e){return e.replace(n2,"")===""}class $r{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}$r.prototype.normal={};$r.prototype.property={};$r.prototype.space=void 0;function Nh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new $r(n,r,t)}function ws(e){return e.toLowerCase()}class ht{constructor(t,n){this.attribute=n,this.property=t}}ht.prototype.attribute="";ht.prototype.booleanish=!1;ht.prototype.boolean=!1;ht.prototype.commaOrSpaceSeparated=!1;ht.prototype.commaSeparated=!1;ht.prototype.defined=!1;ht.prototype.mustUseProperty=!1;ht.prototype.number=!1;ht.prototype.overloadedBoolean=!1;ht.prototype.property="";ht.prototype.spaceSeparated=!1;ht.prototype.space=void 0;let i2=0;const ve=Sn(),Je=Sn(),ks=Sn(),X=Sn(),Oe=Sn(),Wn=Sn(),pt=Sn();function Sn(){return 2**++i2}const Ss=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:Je,commaOrSpaceSeparated:pt,commaSeparated:Wn,number:X,overloadedBoolean:ks,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),Ao=Object.keys(Ss);class Ia extends ht{constructor(t,n,r,i){let s=-1;if(super(t,n),mu(this,"space",i),typeof r=="number")for(;++s<Ao.length;){const o=Ao[s];mu(this,Ao[s],(r&Ss[o])===Ss[o])}}}Ia.prototype.defined=!0;function mu(e,t,n){n&&(e[t]=n)}function rr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ia(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[ws(r)]=r,n[ws(s.attribute)]=r}return new $r(t,n,e.space)}const Ih=rr({properties:{ariaActiveDescendant:null,ariaAtomic:Je,ariaAutoComplete:null,ariaBusy:Je,ariaChecked:Je,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Je,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Je,ariaFlowTo:Oe,ariaGrabbed:Je,ariaHasPopup:null,ariaHidden:Je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:X,ariaLive:null,ariaModal:Je,ariaMultiLine:Je,ariaMultiSelectable:Je,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Je,ariaReadOnly:Je,ariaRelevant:null,ariaRequired:Je,ariaRoleDescription:Oe,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Je,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Rh(e,t){return t in e?e[t]:t}function Vh(e,t){return Rh(e,t.toLowerCase())}const o2=rr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wn,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:Oe,autoFocus:ve,autoPlay:ve,blocking:Oe,capture:null,charSet:null,checked:ve,cite:null,className:Oe,cols:X,colSpan:null,content:null,contentEditable:Je,controls:ve,controlsList:Oe,coords:X|Wn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:ks,draggable:Je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Oe,height:X,hidden:ks,high:X,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ve,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ve,optimum:X,pattern:null,ping:Oe,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:Oe,required:ve,reversed:ve,rows:X,rowSpan:X,sandbox:Oe,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Je,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Je,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Je,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:X,security:null,unselectable:null},space:"html",transform:Vh}),s2=rr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pt,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wn,g2:Wn,glyphName:Wn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pt,rev:pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pt,requiredFeatures:pt,requiredFonts:pt,requiredFormats:pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pt,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Rh}),Dh=rr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fh=rr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vh}),Lh=rr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),a2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},l2=/[A-Z]/g,pu=/-[a-z]/g,c2=/^data[-\w.:]+$/i;function u2(e,t){const n=ws(t);let r=t,i=ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&c2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(pu,f2);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!pu.test(s)){let o=s.replace(l2,d2);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ia}return new i(r,t)}function d2(e){return"-"+e.toLowerCase()}function f2(e){return e.charAt(1).toUpperCase()}const h2=Nh([Ih,o2,Dh,Fh,Lh],"html"),Ra=Nh([Ih,s2,Dh,Fh,Lh],"svg");function m2(e){return e.join(" ").trim()}var In={},jo,gu;function p2(){if(gu)return jo;gu=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
108
+ `,c="/",u="*",d="",h="comment",m="declaration";jo=function(p,b){if(typeof p!="string")throw new TypeError("First argument must be a string");if(!p)return[];b=b||{};var v=1,k=1;function S(B){var H=B.match(t);H&&(v+=H.length);var Y=B.lastIndexOf(l);k=~Y?B.length-Y:k+B.length}function A(){var B={line:v,column:k};return function(H){return H.position=new T(B),P(),H}}function T(B){this.start=B,this.end={line:v,column:k},this.source=b.source}T.prototype.content=p;function C(B){var H=new Error(b.source+":"+v+":"+k+": "+B);if(H.reason=B,H.filename=b.source,H.line=v,H.column=k,H.source=p,!b.silent)throw H}function N(B){var H=B.exec(p);if(H){var Y=H[0];return S(Y),p=p.slice(Y.length),H}}function P(){N(n)}function L(B){var H;for(B=B||[];H=y();)H!==!1&&B.push(H);return B}function y(){var B=A();if(!(c!=p.charAt(0)||u!=p.charAt(1))){for(var H=2;d!=p.charAt(H)&&(u!=p.charAt(H)||c!=p.charAt(H+1));)++H;if(H+=2,d===p.charAt(H-1))return C("End of comment missing");var Y=p.slice(2,H-2);return k+=2,S(Y),p=p.slice(H),k+=2,B({type:h,comment:Y})}}function M(){var B=A(),H=N(r);if(H){if(y(),!N(i))return C("property missing ':'");var Y=N(s),de=B({type:m,property:g(H[0].replace(e,d)),value:Y?g(Y[0].replace(e,d)):d});return N(o),de}}function D(){var B=[];L(B);for(var H;H=M();)H!==!1&&(B.push(H),L(B));return B}return P(),D()};function g(p){return p?p.replace(a,d):d}return jo}var yu;function g2(){if(yu)return In;yu=1;var e=In&&In.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(In,"__esModule",{value:!0}),In.default=n;var t=e(p2());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var o=(0,t.default)(r),a=typeof i=="function";return o.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;a?i(c,u,l):u&&(s=s||{},s[c]=u)}}),s}return In}var lr={},xu;function y2(){if(xu)return lr;xu=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(c){return!c||n.test(c)||e.test(c)},o=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),s(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,a):c=c.replace(r,a),c.replace(t,o))};return lr.camelCase=l,lr}var cr,bu;function x2(){if(bu)return cr;bu=1;var e=cr&&cr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(g2()),n=y2();function r(i,s){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(o[(0,n.camelCase)(a,s)]=l)}),o}return r.default=r,cr=r,cr}var b2=x2();const v2=Sa(b2),Oh=$h("end"),Va=$h("start");function $h(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function w2(e){const t=Va(e),n=Oh(e);if(t&&n)return{start:t,end:n}}function vr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vu(e.position):"start"in e||"end"in e?vu(e):"line"in e||"column"in e?Cs(e):""}function Cs(e){return wu(e&&e.line)+":"+wu(e&&e.column)}function vu(e){return Cs(e&&e.start)+"-"+Cs(e&&e.end)}function wu(e){return e&&typeof e=="number"?e:1}class at extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=vr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}at.prototype.file="";at.prototype.name="";at.prototype.reason="";at.prototype.message="";at.prototype.stack="";at.prototype.column=void 0;at.prototype.line=void 0;at.prototype.ancestors=void 0;at.prototype.cause=void 0;at.prototype.fatal=void 0;at.prototype.place=void 0;at.prototype.ruleId=void 0;at.prototype.source=void 0;const Da={}.hasOwnProperty,k2=new Map,S2=/[A-Z]/g,C2=new Set(["table","tbody","thead","tfoot","tr"]),E2=new Set(["td","th"]),_h="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function T2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=V2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=R2(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ra:h2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Bh(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Bh(e,t,n){if(t.type==="element")return A2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return j2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return M2(e,t,n);if(t.type==="mdxjsEsm")return P2(e,t);if(t.type==="root")return N2(e,t,n);if(t.type==="text")return I2(e,t)}function A2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ra,e.schema=i),e.ancestors.push(t);const s=Hh(e,t.tagName,!1),o=D2(e,t);let a=La(e,t);return C2.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!r2(l):!0})),zh(e,o,s,t),Fa(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function j2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Nr(e,t.position)}function P2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nr(e,t.position)}function M2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ra,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Hh(e,t.name,!0),o=F2(e,t),a=La(e,t);return zh(e,o,s,t),Fa(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function N2(e,t,n){const r={};return Fa(r,La(e,t)),e.create(t,e.Fragment,r,n)}function I2(e,t){return t.value}function zh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Fa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function R2(e,t,n){return r;function r(i,s,o,a){const c=Array.isArray(o.children)?n:t;return a?c(s,o,a):c(s,o)}}function V2(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Va(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function D2(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Da.call(t.properties,i)){const s=L2(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&E2.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function F2(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Nr(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else Nr(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function La(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:k2;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const a=Bh(e,s,o);a!==void 0&&n.push(a)}return n}function L2(e,t,n){const r=u2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Qw(n):m2(n)),r.property==="style"){let i=typeof n=="object"?n:O2(e,String(n));return e.stylePropertyNameCase==="css"&&(i=$2(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?a2[r.property]||r.property:r.attribute,n]}}function O2(e,t){try{return v2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new at("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=_h+"#cannot-parse-style-attribute",i}}function Hh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const a=fu(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=fu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Da.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Nr(e)}function Nr(e,t){const n=new at("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=_h+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $2(e){const t={};let n;for(n in e)Da.call(e,n)&&(t[_2(n)]=e[n]);return t}function _2(e){let t=e.replace(S2,B2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function B2(e){return"-"+e.toLowerCase()}const Po={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},z2={};function Oa(e,t){const n=z2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Uh(e,r,i)}function Uh(e,t,n){if(H2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ku(e.children,t,n)}return Array.isArray(e)?ku(e,t,n):""}function ku(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Uh(e[i],t,n);return r.join("")}function H2(e){return!!(e&&typeof e=="object")}const Su=document.createElement("i");function $a(e){const t="&"+e+";";Su.innerHTML=t;const n=Su.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xt(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function kt(e,t){return e.length>0?(xt(e,e.length,0,t),e):t}const Cu={}.hasOwnProperty;function Wh(e){const t={};let n=-1;for(;++n<e.length;)U2(t,e[n]);return t}function U2(e,t){let n;for(n in t){const i=(Cu.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){Cu.call(i,o)||(i[o]=[]);const a=s[o];W2(i[o],Array.isArray(a)?a:a?[a]:[])}}}function W2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xt(e,0,0,r)}function Zh(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lt=ln(/[A-Za-z]/),st=ln(/[\dA-Za-z]/),Z2=ln(/[#-'*+\--9=?A-Z^-~]/);function Ti(e){return e!==null&&(e<32||e===127)}const Es=ln(/\d/),q2=ln(/[\dA-Fa-f]/),G2=ln(/[!-/:-@[-`{-~]/);function he(e){return e!==null&&e<-2}function Le(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}const Zi=ln(new RegExp("\\p{P}|\\p{S}","u")),kn=ln(/\s/);function ln(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ir(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&st(e.charCodeAt(n+1))&&st(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ee(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Se(l)?(e.enter(n),a(l)):t(l)}function a(l){return Se(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const K2={tokenize:Y2};function Y2(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ee(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return he(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),o)}}const X2={tokenize:Q2},Eu={tokenize:J2};function Q2(e){const t=this,n=[];let r=0,i,s,o;return a;function a(S){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const A=t.events.length;let T=A,C;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){C=t.events[T][1].end;break}v(r);let N=A;for(;N<t.events.length;)t.events[N][1].end={...C},N++;return xt(t.events,T+1,0,t.events.slice(A)),t.events.length=N,c(S)}return a(S)}function c(S){if(r===n.length){if(!i)return h(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Eu,u,d)(S)}function u(S){return i&&k(),v(r),h(S)}function d(S){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(S)}function h(S){return t.containerState={},e.attempt(Eu,m,g)(S)}function m(S){return r++,n.push([t.currentConstruct,t.containerState]),h(S)}function g(S){if(S===null){i&&k(),v(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),p(S)}function p(S){if(S===null){b(e.exit("chunkFlow"),!0),v(0),e.consume(S);return}return he(S)?(e.consume(S),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(S),p)}function b(S,A){const T=t.sliceStream(S);if(A&&T.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(T),t.parser.lazy[S.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<o&&(!i.events[C][1].end||i.events[C][1].end.offset>o))return;const N=t.events.length;let P=N,L,y;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(L){y=t.events[P][1].end;break}L=!0}for(v(r),C=N;C<t.events.length;)t.events[C][1].end={...y},C++;xt(t.events,P+1,0,t.events.slice(N)),t.events.length=C}}function v(S){let A=n.length;for(;A-- >S;){const T=n[A];t.containerState=T[1],T[0].exit.call(t,e)}n.length=S}function k(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function J2(e,t,n){return Ee(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Kn(e){if(e===null||Le(e)||kn(e))return 1;if(Zi(e))return 2}function qi(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Ts={name:"attention",resolveAll:ek,tokenize:tk};function ek(e,t){let n=-1,r,i,s,o,a,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};Tu(d,-l),Tu(h,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kt(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=kt(c,qi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kt(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=kt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,xt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function tk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Kn(r);let s;return o;function o(l){return s=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===s)return e.consume(l),a;const c=e.exit("attentionSequence"),u=Kn(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?d:d&&(i||!h)),c._close=!!(s===42?h:h&&(u||!d)),t(l)}}function Tu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const nk={name:"autolink",tokenize:rk};function rk(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return lt(m)?(e.consume(m),o):m===64?n(m):c(m)}function o(m){return m===43||m===45||m===46||st(m)?(r=1,a(m)):c(m)}function a(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||st(m))&&r++<32?(e.consume(m),a):(r=0,c(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ti(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):Z2(m)?(e.consume(m),c):n(m)}function u(m){return st(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,u):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):h(m)}function h(m){if((m===45||st(m))&&r++<63){const g=m===45?h:d;return e.consume(m),g}return n(m)}}const _r={partial:!0,tokenize:ik};function ik(e,t,n){return r;function r(s){return Se(s)?Ee(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||he(s)?t(s):n(s)}}const qh={continuation:{tokenize:sk},exit:ak,name:"blockQuote",tokenize:ok};function ok(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Se(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function sk(e,t,n){const r=this;return i;function i(o){return Se(o)?Ee(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(qh,t,n)(o)}}function ak(e){e.exit("blockQuote")}const Gh={name:"characterEscape",tokenize:lk};function lk(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return G2(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Kh={name:"characterReference",tokenize:ck};function ck(e,t,n){const r=this;let i=0,s,o;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,o=st,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=q2,u):(e.enter("characterReferenceValue"),s=7,o=Es,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===st&&!$a(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<s?(e.consume(d),u):n(d)}}const Au={partial:!0,tokenize:dk},ju={concrete:!0,name:"codeFenced",tokenize:uk};function uk(e,t,n){const r=this,i={partial:!0,tokenize:T};let s=0,o=0,a;return l;function l(C){return c(C)}function c(C){const N=r.events[r.events.length-1];return s=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===a?(o++,e.consume(C),u):o<3?n(C):(e.exit("codeFencedFenceSequence"),Se(C)?Ee(e,d,"whitespace")(C):d(C))}function d(C){return C===null||he(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Au,p,A)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):Se(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ee(e,m,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),h)}function m(C){return C===null||he(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(e.consume(C),g)}function p(C){return e.attempt(i,A,b)(C)}function b(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),v}function v(C){return s>0&&Se(C)?Ee(e,k,"linePrefix",s+1)(C):k(C)}function k(C){return C===null||he(C)?e.check(Au,p,A)(C):(e.enter("codeFlowValue"),S(C))}function S(C){return C===null||he(C)?(e.exit("codeFlowValue"),k(C)):(e.consume(C),S)}function A(C){return e.exit("codeFenced"),t(C)}function T(C,N,P){let L=0;return y;function y(Y){return C.enter("lineEnding"),C.consume(Y),C.exit("lineEnding"),M}function M(Y){return C.enter("codeFencedFence"),Se(Y)?Ee(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):D(Y)}function D(Y){return Y===a?(C.enter("codeFencedFenceSequence"),B(Y)):P(Y)}function B(Y){return Y===a?(L++,C.consume(Y),B):L>=o?(C.exit("codeFencedFenceSequence"),Se(Y)?Ee(C,H,"whitespace")(Y):H(Y)):P(Y)}function H(Y){return Y===null||he(Y)?(C.exit("codeFencedFence"),N(Y)):P(Y)}}}function dk(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Mo={name:"codeIndented",tokenize:hk},fk={partial:!0,tokenize:mk};function hk(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ee(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):he(c)?e.attempt(fk,o,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||he(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function mk(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):he(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ee(e,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):he(o)?i(o):n(o)}}const pk={name:"codeText",previous:yk,resolve:gk,tokenize:xk};function gk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function yk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function xk(e,t,n){let r=0,i,s;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(s=e.enter("codeTextSequence"),i=0,u(d)):he(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||he(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class bk{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&ur(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ur(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ur(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ur(this.left,n.reverse())}}}function ur(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Yh(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new bk(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,vk(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=u.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return xt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function vk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],c={};let u,d,h=-1,m=n,g=0,p=0;const b=[p];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(u=r.sliceStream(m),m.next||u.push(null),d&&o.defineSkip(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(p=h+1,b.push(p),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):b.pop(),h=b.length;h--;){const v=a.slice(b[h],b[h+1]),k=s.pop();l.push([k,k+v.length-1]),e.splice(k,2,v)}for(l.reverse(),h=-1;++h<l.length;)c[g+l[h][0]]=g+l[h][1],g+=l[h][1]-l[h][0]-1;return c}const wk={resolve:Sk,tokenize:Ck},kk={partial:!0,tokenize:Ek};function Sk(e){return Yh(e),e}function Ck(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):he(a)?e.check(kk,o,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function o(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ek(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ee(e,s,"linePrefix")}function s(o){if(o===null||he(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Xh(e,t,n,r,i,s,o,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(v){return v===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(v),e.exit(s),h):v===null||v===32||v===41||Ti(v)?n(v):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(v))}function h(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(a),h(v)):v===null||v===60||he(v)?n(v):(e.consume(v),v===92?g:m)}function g(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function p(v){return!u&&(v===null||v===41||Le(v))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),t(v)):u<c&&v===40?(e.consume(v),u++,p):v===41?(e.consume(v),u--,p):v===null||v===32||v===40||Ti(v)?n(v):(e.consume(v),v===92?b:p)}function b(v){return v===40||v===41||v===92?(e.consume(v),p):p(v)}}function Qh(e,t,n,r,i,s){const o=this;let a=0,l;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),u}function u(m){return a>999||m===null||m===91||m===93&&!l||m===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):he(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||he(m)||a++>999?(e.exit("chunkString"),u(m)):(e.consume(m),l||(l=!Se(m)),m===92?h:d)}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function Jh(e,t,n,r,i,s){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,l):n(h)}function l(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(s),c(h))}function c(h){return h===o?(e.exit(s),l(o)):h===null?n(h):he(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Ee(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===o||h===null||he(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:u)}function d(h){return h===o||h===92?(e.consume(h),u):u(h)}}function wr(e,t){let n;return r;function r(i){return he(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Se(i)?Ee(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Tk={name:"definition",tokenize:jk},Ak={partial:!0,tokenize:Pk};function jk(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),o(m)}function o(m){return Qh.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function a(m){return i=Pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Le(m)?wr(e,c)(m):c(m)}function c(m){return Xh(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function u(m){return e.attempt(Ak,d,d)(m)}function d(m){return Se(m)?Ee(e,h,"whitespace")(m):h(m)}function h(m){return m===null||he(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function Pk(e,t,n){return r;function r(a){return Le(a)?wr(e,i)(a):n(a)}function i(a){return Jh(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return Se(a)?Ee(e,o,"whitespace")(a):o(a)}function o(a){return a===null||he(a)?t(a):n(a)}}const Mk={name:"hardBreakEscape",tokenize:Nk};function Nk(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return he(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Ik={name:"headingAtx",resolve:Rk,tokenize:Vk};function Rk(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Vk(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||Le(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||he(u)?(e.exit("atxHeading"),t(u)):Se(u)?Ee(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Le(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const Dk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Pu=["pre","script","style","textarea"],Fk={concrete:!0,name:"htmlFlow",resolveTo:$k,tokenize:_k},Lk={partial:!0,tokenize:zk},Ok={partial:!0,tokenize:Bk};function $k(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _k(e,t,n){const r=this;let i,s,o,a,l;return c;function c(E){return u(E)}function u(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),d}function d(E){return E===33?(e.consume(E),h):E===47?(e.consume(E),s=!0,p):E===63?(e.consume(E),i=3,r.interrupt?t:w):lt(E)?(e.consume(E),o=String.fromCharCode(E),b):n(E)}function h(E){return E===45?(e.consume(E),i=2,m):E===91?(e.consume(E),i=5,a=0,g):lt(E)?(e.consume(E),i=4,r.interrupt?t:w):n(E)}function m(E){return E===45?(e.consume(E),r.interrupt?t:w):n(E)}function g(E){const U="CDATA[";return E===U.charCodeAt(a++)?(e.consume(E),a===U.length?r.interrupt?t:D:g):n(E)}function p(E){return lt(E)?(e.consume(E),o=String.fromCharCode(E),b):n(E)}function b(E){if(E===null||E===47||E===62||Le(E)){const U=E===47,se=o.toLowerCase();return!U&&!s&&Pu.includes(se)?(i=1,r.interrupt?t(E):D(E)):Dk.includes(o.toLowerCase())?(i=6,U?(e.consume(E),v):r.interrupt?t(E):D(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):s?k(E):S(E))}return E===45||st(E)?(e.consume(E),o+=String.fromCharCode(E),b):n(E)}function v(E){return E===62?(e.consume(E),r.interrupt?t:D):n(E)}function k(E){return Se(E)?(e.consume(E),k):y(E)}function S(E){return E===47?(e.consume(E),y):E===58||E===95||lt(E)?(e.consume(E),A):Se(E)?(e.consume(E),S):y(E)}function A(E){return E===45||E===46||E===58||E===95||st(E)?(e.consume(E),A):T(E)}function T(E){return E===61?(e.consume(E),C):Se(E)?(e.consume(E),T):S(E)}function C(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),l=E,N):Se(E)?(e.consume(E),C):P(E)}function N(E){return E===l?(e.consume(E),l=null,L):E===null||he(E)?n(E):(e.consume(E),N)}function P(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||Le(E)?T(E):(e.consume(E),P)}function L(E){return E===47||E===62||Se(E)?S(E):n(E)}function y(E){return E===62?(e.consume(E),M):n(E)}function M(E){return E===null||he(E)?D(E):Se(E)?(e.consume(E),M):n(E)}function D(E){return E===45&&i===2?(e.consume(E),de):E===60&&i===1?(e.consume(E),ie):E===62&&i===4?(e.consume(E),z):E===63&&i===3?(e.consume(E),w):E===93&&i===5?(e.consume(E),W):he(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Lk,oe,B)(E)):E===null||he(E)?(e.exit("htmlFlowData"),B(E)):(e.consume(E),D)}function B(E){return e.check(Ok,H,oe)(E)}function H(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Y}function Y(E){return E===null||he(E)?B(E):(e.enter("htmlFlowData"),D(E))}function de(E){return E===45?(e.consume(E),w):D(E)}function ie(E){return E===47?(e.consume(E),o="",F):D(E)}function F(E){if(E===62){const U=o.toLowerCase();return Pu.includes(U)?(e.consume(E),z):D(E)}return lt(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),F):D(E)}function W(E){return E===93?(e.consume(E),w):D(E)}function w(E){return E===62?(e.consume(E),z):E===45&&i===2?(e.consume(E),w):D(E)}function z(E){return E===null||he(E)?(e.exit("htmlFlowData"),oe(E)):(e.consume(E),z)}function oe(E){return e.exit("htmlFlow"),t(E)}}function Bk(e,t,n){const r=this;return i;function i(o){return he(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function zk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(_r,t,n)}}const Hk={name:"htmlText",tokenize:Uk};function Uk(e,t,n){const r=this;let i,s,o;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),l}function l(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),T):w===63?(e.consume(w),S):lt(w)?(e.consume(w),P):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),s=0,g):lt(w)?(e.consume(w),k):n(w)}function u(w){return w===45?(e.consume(w),m):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):he(w)?(o=d,ie(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),m):d(w)}function m(w){return w===62?de(w):w===45?h(w):d(w)}function g(w){const z="CDATA[";return w===z.charCodeAt(s++)?(e.consume(w),s===z.length?p:g):n(w)}function p(w){return w===null?n(w):w===93?(e.consume(w),b):he(w)?(o=p,ie(w)):(e.consume(w),p)}function b(w){return w===93?(e.consume(w),v):p(w)}function v(w){return w===62?de(w):w===93?(e.consume(w),v):p(w)}function k(w){return w===null||w===62?de(w):he(w)?(o=k,ie(w)):(e.consume(w),k)}function S(w){return w===null?n(w):w===63?(e.consume(w),A):he(w)?(o=S,ie(w)):(e.consume(w),S)}function A(w){return w===62?de(w):S(w)}function T(w){return lt(w)?(e.consume(w),C):n(w)}function C(w){return w===45||st(w)?(e.consume(w),C):N(w)}function N(w){return he(w)?(o=N,ie(w)):Se(w)?(e.consume(w),N):de(w)}function P(w){return w===45||st(w)?(e.consume(w),P):w===47||w===62||Le(w)?L(w):n(w)}function L(w){return w===47?(e.consume(w),de):w===58||w===95||lt(w)?(e.consume(w),y):he(w)?(o=L,ie(w)):Se(w)?(e.consume(w),L):de(w)}function y(w){return w===45||w===46||w===58||w===95||st(w)?(e.consume(w),y):M(w)}function M(w){return w===61?(e.consume(w),D):he(w)?(o=M,ie(w)):Se(w)?(e.consume(w),M):L(w)}function D(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,B):he(w)?(o=D,ie(w)):Se(w)?(e.consume(w),D):(e.consume(w),H)}function B(w){return w===i?(e.consume(w),i=void 0,Y):w===null?n(w):he(w)?(o=B,ie(w)):(e.consume(w),B)}function H(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Le(w)?L(w):(e.consume(w),H)}function Y(w){return w===47||w===62||Le(w)?L(w):n(w)}function de(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ie(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),F}function F(w){return Se(w)?Ee(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):W(w)}function W(w){return e.enter("htmlTextData"),o(w)}}const _a={name:"labelEnd",resolveAll:Gk,resolveTo:Kk,tokenize:Yk},Wk={tokenize:Xk},Zk={tokenize:Qk},qk={tokenize:Jk};function Gk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&xt(e,0,e.length,n),e}function Kk(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=kt(a,e.slice(s+1,s+r+3)),a=kt(a,[["enter",u,t]]),a=kt(a,qi(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=kt(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=kt(a,e.slice(o+1)),a=kt(a,[["exit",l,t]]),xt(e,s,e.length,a),e}function Yk(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(h){return s?s._inactive?d(h):(o=r.parser.defined.includes(Pt(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(Wk,u,o?u:d)(h):h===91?e.attempt(Zk,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(qk,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function Xk(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Le(d)?wr(e,s)(d):s(d)}function s(d){return d===41?u(d):Xh(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Le(d)?wr(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Jh(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Le(d)?wr(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Qk(e,t,n){const r=this;return i;function i(a){return Qh.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Pt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function Jk(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const eS={name:"labelStartImage",resolveAll:_a.resolveAll,tokenize:tS};function tS(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const nS={name:"labelStartLink",resolveAll:_a.resolveAll,tokenize:rS};function rS(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const No={name:"lineEnding",tokenize:iS};function iS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}const di={name:"thematicBreak",tokenize:oS};function oS(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||he(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Se(c)?Ee(e,a,"whitespace")(c):a(c))}}const ut={continuation:{tokenize:cS},exit:dS,name:"list",tokenize:lS},sS={partial:!0,tokenize:fS},aS={partial:!0,tokenize:uS};function lS(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Es(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(di,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return Es(m)&&++o<10?(e.consume(m),l):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(_r,r.interrupt?n:u,e.attempt(sS,h,d))}function u(m){return r.containerState.initialBlankLine=!0,s++,h(m)}function d(m){return Se(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),h):n(m)}function h(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function cS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(_r,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ee(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Se(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(aS,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(ut,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function uS(e,t,n){const r=this;return Ee(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function dS(e){e.exit(this.containerState.type)}function fS(e,t,n){const r=this;return Ee(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Se(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Mu={name:"setextUnderline",resolveTo:hS,tokenize:mS};function hS(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function mS(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),Se(c)?Ee(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||he(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const pS={tokenize:gS};function gS(e){const t=this,n=e.attempt(_r,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(wk,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const yS={resolveAll:tm()},xS=em("string"),bS=em("text");function em(e){return{resolveAll:tm(e==="text"?vS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let h=-1;if(d)for(;++h<d.length;){const m=d[h];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function tm(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function vS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(c===-2)l=!0,a++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const wS={42:ut,43:ut,45:ut,48:ut,49:ut,50:ut,51:ut,52:ut,53:ut,54:ut,55:ut,56:ut,57:ut,62:qh},kS={91:Tk},SS={[-2]:Mo,[-1]:Mo,32:Mo},CS={35:Ik,42:di,45:[Mu,di],60:Fk,61:Mu,95:di,96:ju,126:ju},ES={38:Kh,92:Gh},TS={[-5]:No,[-4]:No,[-3]:No,33:eS,38:Kh,42:Ts,60:[nk,Hk],91:nS,92:[Mk,Gh],93:_a,95:Ts,96:pk},AS={null:[Ts,yS]},jS={null:[42,95]},PS={null:[]},MS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jS,contentInitial:kS,disable:PS,document:wS,flow:CS,flowInitial:SS,insideSpan:AS,string:ES,text:TS},Symbol.toStringTag,{value:"Module"}));function NS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:N(T),check:N(C),consume:k,enter:S,exit:A,interrupt:N(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:p,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:m,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function d(M){return o=kt(o,M),b(),o[o.length-1]!==null?[]:(P(t,0),c.events=qi(s,c.events,c),c.events)}function h(M,D){return RS(m(M),D)}function m(M){return IS(o,M)}function g(){const{_bufferIndex:M,_index:D,line:B,column:H,offset:Y}=r;return{_bufferIndex:M,_index:D,line:B,column:H,offset:Y}}function p(M){i[M.line]=M.column,y()}function b(){let M;for(;r._index<o.length;){const D=o[r._index];if(typeof D=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<D.length;)v(D.charCodeAt(r._bufferIndex));else v(D)}}function v(M){u=u(M)}function k(M){he(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,y()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=M}function S(M,D){const B=D||{};return B.type=M,B.start=g(),c.events.push(["enter",B,c]),a.push(B),B}function A(M){const D=a.pop();return D.end=g(),c.events.push(["exit",D,c]),D}function T(M,D){P(M,D.from)}function C(M,D){D.restore()}function N(M,D){return B;function B(H,Y,de){let ie,F,W,w;return Array.isArray(H)?oe(H):"tokenize"in H?oe([H]):z(H);function z($){return ee;function ee(Q){const V=Q!==null&&$[Q],G=Q!==null&&$.null,fe=[...Array.isArray(V)?V:V?[V]:[],...Array.isArray(G)?G:G?[G]:[]];return oe(fe)(Q)}}function oe($){return ie=$,F=0,$.length===0?de:E($[F])}function E($){return ee;function ee(Q){return w=L(),W=$,$.partial||(c.currentConstruct=$),$.name&&c.parser.constructs.disable.null.includes($.name)?se():$.tokenize.call(D?Object.assign(Object.create(c),D):c,l,U,se)(Q)}}function U($){return M(W,w),Y}function se($){return w.restore(),++F<ie.length?E(ie[F]):de}}}function P(M,D){M.resolveAll&&!s.includes(M)&&s.push(M),M.resolve&&xt(c.events,D,c.events.length-D,M.resolve(c.events.slice(D),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function L(){const M=g(),D=c.previous,B=c.currentConstruct,H=c.events.length,Y=Array.from(a);return{from:H,restore:de};function de(){r=M,c.previous=D,c.currentConstruct=B,c.events.length=H,a=Y,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function IS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function RS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
109
+ `;break}case-3:{o=`\r
110
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function VS(e){const r={constructs:Wh([MS,...(e||{}).extensions||[]]),content:i(K2),defined:[],document:i(X2),flow:i(pS),lazy:{},string:i(xS),text:i(bS)};return r;function i(s){return o;function o(a){return NS(r,s,a)}}}function DS(e){for(;!Yh(e););return e}const Nu=/[\0\t\n\r]/g;function FS(){let e=1,t="",n=!0,r;return i;function i(s,o,a){const l=[];let c,u,d,h,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Nu.lastIndex=d,c=Nu.exec(s),h=c&&c.index!==void 0?c.index:s.length,m=s.charCodeAt(h),!c){t=s.slice(d);break}if(m===10&&d===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<h&&(l.push(s.slice(d,h)),e+=h-d),m){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const LS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function OS(e){return e.replace(LS,$S)}function $S(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Zh(n.slice(s?2:1),s?16:10)}return $a(n)||e}const nm={}.hasOwnProperty;function _S(e,t,n){return typeof t!="string"&&(n=t,t=void 0),BS(n)(DS(VS(n).document().write(FS()(e,t,!0))))}function BS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xe),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(me),blockQuote:s(G),characterEscape:L,characterReference:L,codeFenced:s(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(fe,o),codeText:s(R,o),codeTextData:L,data:L,codeFlowValue:L,definition:s(re),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(ne),hardBreakEscape:s(Z),hardBreakTrailing:s(Z),htmlFlow:s(pe,o),htmlFlowData:L,htmlText:s(pe,o),htmlTextData:L,image:s(Ae),label:o,link:s(xe),listItem:s(ze),listItemValue:h,listOrdered:s(Ne,d),listUnordered:s(Ne),paragraph:s(He),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(me),strong:s(rt),thematicBreak:s(Lt)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:V,autolinkProtocol:Q,blockQuote:l(),characterEscapeValue:y,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:$,characterReference:ee,codeFenced:l(b),codeFencedFence:p,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:y,codeIndented:l(v),codeText:l(Y),codeTextData:y,data:y,definition:l(),definitionDestinationString:A,definitionLabelString:k,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(B),htmlFlowData:y,htmlText:l(H),htmlTextData:y,image:l(ie),label:W,labelText:F,lineEnding:M,link:l(de),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:w,resourceTitleString:z,resource:oe,setextHeading:l(P),setextHeadingLineSequence:N,setextHeadingText:C,strong:l(),thematicBreak:l()}};rm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(_){let I={type:"root",children:[]};const q={stack:[I],tokenStack:[],config:t,enter:a,exit:c,buffer:o,resume:u,data:n},ue=[];let J=-1;for(;++J<_.length;)if(_[J][1].type==="listOrdered"||_[J][1].type==="listUnordered")if(_[J][0]==="enter")ue.push(J);else{const ke=ue.pop();J=i(_,ke,J)}for(J=-1;++J<_.length;){const ke=t[_[J][0]];nm.call(ke,_[J][1].type)&&ke[_[J][1].type].call(Object.assign({sliceSerialize:_[J][2].sliceSerialize},q),_[J][1])}if(q.tokenStack.length>0){const ke=q.tokenStack[q.tokenStack.length-1];(ke[1]||Iu).call(q,void 0,ke[0])}for(I.position={start:Yt(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Yt(_.length>0?_[_.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)I=t.transforms[J](I)||I;return I}function i(_,I,q){let ue=I-1,J=-1,ke=!1,K,be,Ce,je;for(;++ue<=q;){const $e=_[ue];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?J++:J--,je=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(K&&!je&&!J&&!Ce&&(Ce=ue),je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!J&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||J===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(K){let Tt=ue;for(be=void 0;Tt--;){const mt=_[Tt];if(mt[1].type==="lineEnding"||mt[1].type==="lineEndingBlank"){if(mt[0]==="exit")continue;be&&(_[be][1].type="lineEndingBlank",ke=!0),mt[1].type="lineEnding",be=Tt}else if(!(mt[1].type==="linePrefix"||mt[1].type==="blockQuotePrefix"||mt[1].type==="blockQuotePrefixWhitespace"||mt[1].type==="blockQuoteMarker"||mt[1].type==="listItemIndent"))break}Ce&&(!be||Ce<be)&&(K._spread=!0),K.end=Object.assign({},be?_[be][1].start:$e[1].end),_.splice(be||ue,0,["exit",K,$e[2]]),ue++,q++}if($e[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};K=Tt,_.splice(ue,0,["enter",Tt,$e[2]]),ue++,q++,Ce=void 0,je=!0}}}return _[I][1]._spread=ke,q}function s(_,I){return q;function q(ue){a.call(this,_(ue),ue),I&&I.call(this,ue)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(_,I,q){this.stack[this.stack.length-1].children.push(_),this.stack.push(_),this.tokenStack.push([I,q||void 0]),_.position={start:Yt(I.start),end:void 0}}function l(_){return I;function I(q){_&&_.call(this,q),c.call(this,q)}}function c(_,I){const q=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==_.type&&(I?I.call(this,_,ue[0]):(ue[1]||Iu).call(this,_,ue[0]));else throw new Error("Cannot close `"+_.type+"` ("+vr({start:_.start,end:_.end})+"): it’s not open");q.position.end=Yt(_.end)}function u(){return Oa(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(_){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(_),10),this.data.expectingFirstListItemValue=void 0}}function m(){const _=this.resume(),I=this.stack[this.stack.length-1];I.lang=_}function g(){const _=this.resume(),I=this.stack[this.stack.length-1];I.meta=_}function p(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const _=this.resume(),I=this.stack[this.stack.length-1];I.value=_.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const _=this.resume(),I=this.stack[this.stack.length-1];I.value=_.replace(/(\r?\n|\r)$/g,"")}function k(_){const I=this.resume(),q=this.stack[this.stack.length-1];q.label=I,q.identifier=Pt(this.sliceSerialize(_)).toLowerCase()}function S(){const _=this.resume(),I=this.stack[this.stack.length-1];I.title=_}function A(){const _=this.resume(),I=this.stack[this.stack.length-1];I.url=_}function T(_){const I=this.stack[this.stack.length-1];if(!I.depth){const q=this.sliceSerialize(_).length;I.depth=q}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function N(_){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(_).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function L(_){const q=this.stack[this.stack.length-1].children;let ue=q[q.length-1];(!ue||ue.type!=="text")&&(ue=Gt(),ue.position={start:Yt(_.start),end:void 0},q.push(ue)),this.stack.push(ue)}function y(_){const I=this.stack.pop();I.value+=this.sliceSerialize(_),I.position.end=Yt(_.end)}function M(_){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=I.children[I.children.length-1];q.position.end=Yt(_.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(L.call(this,_),y.call(this,_))}function D(){this.data.atHardBreak=!0}function B(){const _=this.resume(),I=this.stack[this.stack.length-1];I.value=_}function H(){const _=this.resume(),I=this.stack[this.stack.length-1];I.value=_}function Y(){const _=this.resume(),I=this.stack[this.stack.length-1];I.value=_}function de(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=I,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function ie(){const _=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";_.type+="Reference",_.referenceType=I,delete _.url,delete _.title}else delete _.identifier,delete _.label;this.data.referenceType=void 0}function F(_){const I=this.sliceSerialize(_),q=this.stack[this.stack.length-2];q.label=OS(I),q.identifier=Pt(I).toLowerCase()}function W(){const _=this.stack[this.stack.length-1],I=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const ue=_.children;q.children=ue}else q.alt=I}function w(){const _=this.resume(),I=this.stack[this.stack.length-1];I.url=_}function z(){const _=this.resume(),I=this.stack[this.stack.length-1];I.title=_}function oe(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function U(_){const I=this.resume(),q=this.stack[this.stack.length-1];q.label=I,q.identifier=Pt(this.sliceSerialize(_)).toLowerCase(),this.data.referenceType="full"}function se(_){this.data.characterReferenceType=_.type}function $(_){const I=this.sliceSerialize(_),q=this.data.characterReferenceType;let ue;q?(ue=Zh(I,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=$a(I);const J=this.stack[this.stack.length-1];J.value+=ue}function ee(_){const I=this.stack.pop();I.position.end=Yt(_.end)}function Q(_){y.call(this,_);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(_)}function V(_){y.call(this,_);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(_)}function G(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function R(){return{type:"inlineCode",value:""}}function re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function pe(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function xe(){return{type:"link",title:null,url:"",children:[]}}function Ne(_){return{type:"list",ordered:_.type==="listOrdered",start:null,spread:_._spread,children:[]}}function ze(_){return{type:"listItem",spread:_._spread,checked:null,children:[]}}function He(){return{type:"paragraph",children:[]}}function rt(){return{type:"strong",children:[]}}function Gt(){return{type:"text",value:""}}function Lt(){return{type:"thematicBreak"}}}function Yt(e){return{line:e.line,column:e.column,offset:e.offset}}function rm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?rm(e,r):zS(e,r)}}function zS(e,t){let n;for(n in t)if(nm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Iu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vr({start:t.start,end:t.end})+") is still open")}function HS(e){const t=this;t.parser=n;function n(r){return _S(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function US(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
111
+ `}]}function ZS(e,t){const n=t.value?t.value+`
112
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function qS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ir(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function YS(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function im(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function QS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return im(e,t);const i={src:ir(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function JS(e,t){const n={src:ir(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function eC(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function tC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return im(e,t);const i={href:ir(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function nC(e,t){const n={href:ir(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function rC(e,t,n){const r=e.all(t),i=n?iC(n):om(t),s={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
113
+ `}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
114
+ `});const c={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,c),e.applyData(t,c)}function iC(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=om(n[r])}return t}function om(e){const t=e.spread;return t??e.children.length>1}function oC(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function sC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function lC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cC(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Va(t.children[1]),l=Oh(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function uC(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],h={},m=o?o[l]:void 0;m&&(h.align=m);let g={type:"element",tagName:s,properties:h,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),c.push(g)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function dC(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ru=9,Vu=32;function fC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Du(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Du(t.slice(i),i>0,!1)),s.join("")}function Du(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Ru||s===Vu;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Ru||s===Vu;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function hC(e,t){const n={type:"text",value:fC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pC={blockquote:US,break:WS,code:ZS,delete:qS,emphasis:GS,footnoteReference:KS,heading:YS,html:XS,imageReference:QS,image:JS,inlineCode:eC,linkReference:tC,link:nC,listItem:rC,list:oC,paragraph:sC,root:aC,strong:lC,table:cC,tableCell:dC,tableRow:uC,text:hC,thematicBreak:mC,toml:ti,yaml:ti,definition:ti,footnoteDefinition:ti};function ti(){}const sm=-1,Gi=0,kr=1,Ai=2,Ba=3,za=4,Ha=5,Ua=6,am=7,lm=8,Fu=typeof self=="object"?self:globalThis,gC=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Gi:case sm:return n(o,i);case kr:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Ai:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case Ba:return n(new Date(o),i);case za:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Ha:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case Ua:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case am:{const{name:a,message:l}=o;return n(new Fu[a](l),i)}case lm:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return n(new DataView(a),o)}}return n(new Fu[s](o),i)};return r},Lu=e=>gC(new Map,e)(0),Rn="",{toString:yC}={},{keys:xC}=Object,dr=e=>{const t=typeof e;if(t!=="object"||!e)return[Gi,t];const n=yC.call(e).slice(8,-1);switch(n){case"Array":return[kr,Rn];case"Object":return[Ai,Rn];case"Date":return[Ba,Rn];case"RegExp":return[za,Rn];case"Map":return[Ha,Rn];case"Set":return[Ua,Rn];case"DataView":return[kr,n]}return n.includes("Array")?[kr,n]:n.includes("Error")?[am,n]:[Ai,n]},ni=([e,t])=>e===Gi&&(t==="function"||t==="symbol"),bC=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=dr(o);switch(a){case Gi:{let u=o;switch(l){case"bigint":a=lm,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([sm],o)}return i([a,u],o)}case kr:{if(l){let h=o;return l==="DataView"?h=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(o)),i([l,[...h]],o)}const u=[],d=i([a,u],o);for(const h of o)u.push(s(h));return d}case Ai:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const u=[],d=i([a,u],o);for(const h of xC(o))(e||!ni(dr(o[h])))&&u.push([s(h),s(o[h])]);return d}case Ba:return i([a,o.toISOString()],o);case za:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Ha:{const u=[],d=i([a,u],o);for(const[h,m]of o)(e||!(ni(dr(h))||ni(dr(m))))&&u.push([s(h),s(m)]);return d}case Ua:{const u=[],d=i([a,u],o);for(const h of o)(e||!ni(dr(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},Ou=(e,{json:t,lossy:n}={})=>{const r=[];return bC(!(t||n),!!t,new Map,r)(e),r},ji=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Lu(Ou(e,t)):structuredClone(e):(e,t)=>Lu(Ou(e,t));function vC(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function wC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vC,r=e.options.footnoteBackLabel||wC,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),d=String(c.identifier).toUpperCase(),h=ir(d.toLowerCase());let m=0;const g=[],p=e.footnoteCounts.get(d);for(;p!==void 0&&++m<=p;){g.length>0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(l,m);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const k=b.children[b.children.length-1];k&&k.type==="text"?k.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...g)}else u.push(...g);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(c,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ji(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
115
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
116
+ `}]}}const Ki=function(e){if(e==null)return TC;if(typeof e=="function")return Yi(e);if(typeof e=="object")return Array.isArray(e)?SC(e):CC(e);if(typeof e=="string")return EC(e);throw new Error("Expected function, string, or object as test")};function SC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ki(e[n]);return Yi(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function CC(e){const t=e;return Yi(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function EC(e){return Yi(t);function t(n){return n&&n.type===e}}function Yi(e){return t;function t(n,r,i){return!!(AC(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function TC(){return!0}function AC(e){return e!==null&&typeof e=="object"&&"type"in e}const cm=[],jC=!0,As=!1,PC="skip";function um(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Ki(i),o=r?-1:1;a(e,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=cm,g,p,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(m=MC(n(l,u)),m[0]===As))return m;if("children"in l&&l.children){const v=l;if(v.children&&m[0]!==PC)for(p=(r?v.children.length:-1)+o,b=u.concat(v);p>-1&&p<v.children.length;){const k=v.children[p];if(g=a(k,p,b)(),g[0]===As)return g;p=typeof g[1]=="number"?g[1]:p+o}}return m}}}function MC(e){return Array.isArray(e)?e:typeof e=="number"?[jC,e]:e==null?cm:[e]}function Wa(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),um(e,s,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return o(l,d,u)}}const js={}.hasOwnProperty,NC={};function IC(e,t){const n=t||NC,r=new Map,i=new Map,s=new Map,o={...pC,...n.handlers},a={all:c,applyData:VC,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:RC,wrap:FC};return Wa(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();d.has(h)||d.set(h,u)}}),a;function l(u,d){const h=u.type,m=a.handlers[h];if(js.call(a.handlers,h)&&m)return m(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:p,...b}=u,v=ji(b);return v.children=a.all(u),v}return ji(u)}return(a.options.unknownHandler||DC)(a,u,d)}function c(u){const d=[];if("children"in u){const h=u.children;let m=-1;for(;++m<h.length;){const g=a.one(h[m],u);if(g){if(m&&h[m-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=$u(g.value)),!Array.isArray(g)&&g.type==="element")){const p=g.children[0];p&&p.type==="text"&&(p.value=$u(p.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function RC(e,t){e.position&&(t.position=w2(e))}function VC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,ji(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function DC(e,t){const n=t.data||{},r="value"in t&&!(js.call(n,"hProperties")||js.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
117
+ `});++r<e.length;)r&&n.push({type:"text",value:`
118
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
119
+ `}),n}function $u(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function _u(e,t){const n=IC(e,t),r=n.one(e,void 0),i=kC(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
120
+ `},i),s}function LC(e,t){return e&&"run"in e?async function(n,r){const i=_u(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _u(n,{file:r,...e||t})}}function Bu(e){if(e)throw e}var Io,zu;function OC(){if(zu)return Io;zu=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var u=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!d)return!1;var h;for(h in c);return typeof h>"u"||e.call(c,h)},o=function(c,u){n&&u.name==="__proto__"?n(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},a=function(c,u){if(u==="__proto__")if(e.call(c,u)){if(r)return r(c,u).value}else return;return c[u]};return Io=function l(){var c,u,d,h,m,g,p=arguments[0],b=1,v=arguments.length,k=!1;for(typeof p=="boolean"&&(k=p,p=arguments[1]||{},b=2),(p==null||typeof p!="object"&&typeof p!="function")&&(p={});b<v;++b)if(c=arguments[b],c!=null)for(u in c)d=a(p,u),h=a(c,u),p!==h&&(k&&h&&(s(h)||(m=i(h)))?(m?(m=!1,g=d&&i(d)?d:[]):g=d&&s(d)?d:{},o(p,{name:u,newValue:l(k,g,h)})):typeof h<"u"&&o(p,{name:u,newValue:h}));return p},Io}var $C=OC();const Ro=Sa($C);function Ps(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function _C(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);a(null,...i);function a(l,...c){const u=e[++s];let d=-1;if(l){o(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?BC(u,a)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function BC(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const It={basename:zC,dirname:HC,extname:UC,join:WC,sep:"/"};function zC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Br(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function HC(e){if(Br(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UC(e){Br(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function WC(...e){let t=-1,n;for(;++t<e.length;)Br(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":ZC(n)}function ZC(e){Br(e);const t=e.codePointAt(0)===47;let n=qC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function qC(e,t){let n="",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function Br(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const GC={cwd:KC};function KC(){return"/"}function Ms(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function YC(e){if(typeof e=="string")e=new URL(e);else if(!Ms(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return XC(e)}function XC(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Vo=["history","path","basename","stem","extname","dirname"];class dm{constructor(t){let n;t?Ms(t)?n={path:t}:typeof t=="string"||QC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":GC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vo.length;){const s=Vo[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Vo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?It.basename(this.path):void 0}set basename(t){Fo(t,"basename"),Do(t,"basename"),this.path=It.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?It.dirname(this.path):void 0}set dirname(t){Hu(this.basename,"dirname"),this.path=It.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?It.extname(this.path):void 0}set extname(t){if(Do(t,"extname"),Hu(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=It.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ms(t)&&(t=YC(t)),Fo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?It.basename(this.path,this.extname):void 0}set stem(t){Fo(t,"stem"),Do(t,"stem"),this.path=It.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new at(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Do(e,t){if(e&&e.includes(It.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+It.sep+"`")}function Fo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hu(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function QC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JC=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},e4={}.hasOwnProperty;class Za extends JC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=_C()}copy(){const t=new Za;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ro(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?($o("data",this.frozen),this.namespace[t]=n,this):e4.call(this.namespace,t)&&this.namespace[t]||void 0:t?($o("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ri(t),r=this.parser||this.Parser;return Lo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Lo("process",this.parser||this.Parser),Oo("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=ri(t),l=r.parse(a);r.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const m=d,g=r.stringify(m,h);r4(g)?h.value=g:h.result=g,c(u,h)});function c(u,d){u||!d?o(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Lo("processSync",this.parser||this.Parser),Oo("processSync",this.compiler||this.Compiler),this.process(t,i),Wu("processSync","process",n),r;function i(s,o){n=!0,Bu(s),r=o}}run(t,n,r){Uu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=ri(n);i.run(t,l,c);function c(u,d,h){const m=d||t;u?a(u):o?o(m):r(void 0,m,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Wu("runSync","run",r),i;function s(o,a){Bu(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=ri(n),i=this.compiler||this.Compiler;return Oo("stringify",i),Uu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if($o("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(i.settings=Ro(!0,i.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...u]);else if(u.length>0){let[m,...g]=u;const p=r[h][1];Ps(p)&&Ps(m)&&(m=Ro(!0,p,m)),r[h]=[c,m,...g]}}}}const t4=new Za().freeze();function Lo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Oo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function $o(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Uu(e){if(!Ps(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Wu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ri(e){return n4(e)?e:new dm(e)}function n4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function r4(e){return typeof e=="string"||i4(e)}function i4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zu=[],qu={allowDangerousHtml:!0},s4=/^(https?|ircs?|mailto|xmpp)$/i,a4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function l4(e){const t=c4(e),n=u4(e);return d4(t.runSync(t.parse(n),n),e)}function c4(e){const t=e.rehypePlugins||Zu,n=e.remarkPlugins||Zu,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qu}:qu;return t4().use(HS).use(n).use(LC,r).use(t)}function u4(e){const t=e.children||"",n=new dm;return typeof t=="string"&&(n.value=t),n}function d4(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||f4;for(const u of a4)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+o4+u.id,void 0);return Wa(e,c),T2(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function c(u,d,h){if(u.type==="raw"&&h&&typeof d=="number")return o?h.children.splice(d,1):h.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let m;for(m in Po)if(Object.hasOwn(Po,m)&&Object.hasOwn(u.properties,m)){const g=u.properties[m],p=Po[m];(p===null||p.includes(u.tagName))&&(u.properties[m]=l(String(g||""),m,u))}}if(u.type==="element"){let m=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!m&&r&&typeof d=="number"&&(m=!r(u,d,h)),m&&h&&typeof d=="number")return a&&u.children?h.children.splice(d,1,...u.children):h.children.splice(d,1),d}}}function f4(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||s4.test(e.slice(0,t))?e:""}function Gu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function h4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function m4(e,t,n){const i=Ki((n||{}).ignore||[]),s=p4(t);let o=-1;for(;++o<s.length;)um(e,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const m=u[d],g=h?h.children:void 0;if(i(m,g?g.indexOf(m):void 0,h))return;h=m}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=s[o][0],m=s[o][1];let g=0;const b=d.children.indexOf(c);let v=!1,k=[];h.lastIndex=0;let S=h.exec(c.value);for(;S;){const A=S.index,T={index:S.index,input:S.input,stack:[...u,c]};let C=m(...S,T);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=A+1:(g!==A&&k.push({type:"text",value:c.value.slice(g,A)}),Array.isArray(C)?k.push(...C):C&&k.push(C),g=A+S[0].length,v=!0),!h.global)break;S=h.exec(c.value)}return v?(g<c.value.length&&k.push({type:"text",value:c.value.slice(g)}),d.children.splice(b,1,...k)):k=[c],b+k.length}}function p4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([g4(i[0]),y4(i[1])])}return t}function g4(e){return typeof e=="string"?new RegExp(h4(e),"g"):e}function y4(e){return typeof e=="function"?e:function(){return e}}const _o="phrasing",Bo=["autolink","link","image","label"];function x4(){return{transforms:[E4],enter:{literalAutolink:v4,literalAutolinkEmail:zo,literalAutolinkHttp:zo,literalAutolinkWww:zo},exit:{literalAutolink:C4,literalAutolinkEmail:S4,literalAutolinkHttp:w4,literalAutolinkWww:k4}}}function b4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_o,notInConstruct:Bo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_o,notInConstruct:Bo},{character:":",before:"[ps]",after:"\\/",inConstruct:_o,notInConstruct:Bo}]}}function v4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zo(e){this.config.enter.autolinkProtocol.call(this,e)}function w4(e){this.config.exit.autolinkProtocol.call(this,e)}function k4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function S4(e){this.config.exit.autolinkEmail.call(this,e)}function C4(e){this.exit(e)}function E4(e){m4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,T4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),A4]],{ignore:["link","linkReference"]})}function T4(e,t,n,r,i){let s="";if(!fm(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!j4(n)))return!1;const o=P4(n+r);if(!o[0])return!1;const a={type:"link",title:null,url:s+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[a,{type:"text",value:o[1]}]:a}function A4(e,t,n,r){return!fm(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function j4(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function P4(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Gu(e,"(");let s=Gu(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function fm(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||kn(n)||Zi(n))&&(!t||n!==47)}hm.peek=O4;function M4(){this.buffer()}function N4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I4(){this.buffer()}function R4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function V4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function D4(e){this.exit(e)}function F4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L4(e){this.exit(e)}function O4(){return"["}function hm(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const o=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),o(),s+=i.move("]"),s}function $4(){return{enter:{gfmFootnoteCallString:M4,gfmFootnoteCall:N4,gfmFootnoteDefinitionLabelString:I4,gfmFootnoteDefinition:R4},exit:{gfmFootnoteCallString:V4,gfmFootnoteCall:D4,gfmFootnoteDefinitionLabelString:F4,gfmFootnoteDefinition:L4}}}function _4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:hm},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,o){const a=s.createTracker(o);let l=a.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=a.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
121
+ `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?mm:B4))),c(),l}}function B4(e,t,n){return t===0?e:mm(e,t,n)}function mm(e,t,n){return(n?"":" ")+e}const z4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pm.peek=q4;function H4(){return{canContainEols:["delete"],enter:{strikethrough:W4},exit:{strikethrough:Z4}}}function U4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:z4}],handlers:{delete:pm}}}function W4(e){this.enter({type:"delete",children:[]},e)}function Z4(e){this.exit(e)}function pm(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function q4(){return"~"}function G4(e){return e.length}function K4(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||G4,s=[],o=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const p=[],b=[];let v=-1;for(e[u].length>c&&(c=e[u].length);++v<e[u].length;){const k=Y4(e[u][v]);if(n.alignDelimiters!==!1){const S=i(k);b[v]=S,(l[v]===void 0||S>l[v])&&(l[v]=S)}p.push(k)}o[u]=p,a[u]=b}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)s[d]=Ku(r[d]);else{const p=Ku(r);for(;++d<c;)s[d]=p}d=-1;const h=[],m=[];for(;++d<c;){const p=s[d];let b="",v="";p===99?(b=":",v=":"):p===108?b=":":p===114&&(v=":");let k=n.alignDelimiters===!1?1:Math.max(1,l[d]-b.length-v.length);const S=b+"-".repeat(k)+v;n.alignDelimiters!==!1&&(k=b.length+k+v.length,k>l[d]&&(l[d]=k),m[d]=k),h[d]=S}o.splice(1,0,h),a.splice(1,0,m),u=-1;const g=[];for(;++u<o.length;){const p=o[u],b=a[u];d=-1;const v=[];for(;++d<c;){const k=p[d]||"";let S="",A="";if(n.alignDelimiters!==!1){const T=l[d]-(b[d]||0),C=s[d];C===114?S=" ".repeat(T):C===99?T%2?(S=" ".repeat(T/2+.5),A=" ".repeat(T/2-.5)):(S=" ".repeat(T/2),A=S):A=" ".repeat(T)}n.delimiterStart!==!1&&!d&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||d)&&v.push(" "),n.alignDelimiters!==!1&&v.push(S),v.push(k),n.alignDelimiters!==!1&&v.push(A),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&v.push("|")}g.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return g.join(`
122
+ `)}function Y4(e){return e==null?"":String(e)}function Ku(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function X4(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),Q4);return i(),o}function Q4(e,t,n){return">"+(n?"":" ")+e}function J4(e,t){return Yu(e,t.inConstruct,!0)&&!Yu(e,t.notInConstruct,!1)}function Yu(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Xu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
123
+ `&&J4(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
124
+ `}function e6(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function t6(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function n6(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function r6(e,t,n,r){const i=n6(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(t6(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,i6);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(e6(s,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${o}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
125
+ `,encode:["`"],...a.current()})),d()}return u+=a.move(`
126
+ `),s&&(u+=a.move(s+`
127
+ `)),u+=a.move(l),c(),u}function i6(e,t,n){return(n?"":" ")+e}function qa(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function o6(e,t,n,r){const i=qa(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
128
+ `,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),o(),c}function s6(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ir(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pi(e,t,n){const r=Kn(e),i=Kn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}gm.peek=a6;function gm(e,t,n,r){const i=s6(n),s=n.enter("emphasis"),o=n.createTracker(r),a=o.move(i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Pi(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Ir(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Pi(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Ir(d));const m=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+m}function a6(e,t,n){return n.options.emphasis||"*"}function l6(e,t){let n=!1;return Wa(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,As}),!!((!e.depth||e.depth<3)&&Oa(e)&&(t.options.setext||n))}function c6(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(l6(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...s.current(),before:`
129
+ `,after:`
130
+ `});return d(),u(),h+`
131
+ `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
132
+ `))+1))}const o="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");s.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
133
+ `,...s.current()});return/^[\t ]/.test(c)&&(c=Ir(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}ym.peek=u6;function ym(e){return e.value||""}function u6(){return"<"}xm.peek=d6;function xm(e,t,n,r){const i=qa(n),s=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),o(),c}function d6(){return"!"}bm.peek=f6;function bm(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("![");const c=n.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function f6(){return"!"}vm.peek=h6;function vm(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function h6(){return"`"}function wm(e,t){const n=Oa(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}km.peek=m6;function km(e,t,n,r){const i=qa(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(wm(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),a(),c}function m6(e,t,n){return wm(e,n)?"<":"["}Sm.peek=p6;function Sm(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let o=n.enter("label");const a=n.createTracker(r);let l=a.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return o(),n.stack=u,s(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function p6(){return"["}function Ga(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function g6(e){const t=Ga(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function y6(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Cm(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function x6(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?y6(n):Ga(n);const a=e.ordered?o==="."?")":".":g6(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Cm(n)===o&&u){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),c}function b6(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function v6(e,t,n,r){const i=b6(n);let s=n.bulletCurrent||Ga(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(o-s.length)),a.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,h,m){return h?(m?"":" ".repeat(o))+d:(m?s:s+" ".repeat(o-s.length))+d}}function w6(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const k6=Ki(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function S6(e,t,n,r){return(e.children.some(function(o){return k6(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function C6(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Em.peek=E6;function Em(e,t,n,r){const i=C6(n),s=n.enter("strong"),o=n.createTracker(r),a=o.move(i+i);let l=o.move(n.containerPhrasing(e,{after:i,before:a,...o.current()}));const c=l.charCodeAt(0),u=Pi(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Ir(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Pi(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Ir(d));const m=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+m}function E6(e,t,n){return n.options.strong||"*"}function T6(e,t,n,r){return n.safe(e.value,r)}function A6(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function j6(e,t,n){const r=(Cm(n)+(n.options.ruleSpaces?" ":"")).repeat(A6(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Tm={blockquote:X4,break:Xu,code:r6,definition:o6,emphasis:gm,hardBreak:Xu,heading:c6,html:ym,image:xm,imageReference:bm,inlineCode:vm,link:km,linkReference:Sm,list:x6,listItem:v6,paragraph:w6,root:S6,strong:Em,text:T6,thematicBreak:j6};function P6(){return{enter:{table:M6,tableData:Qu,tableHeader:Qu,tableRow:I6},exit:{codeText:R6,table:N6,tableData:Ho,tableHeader:Ho,tableRow:Ho}}}function M6(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function N6(e){this.exit(e),this.data.inTable=void 0}function I6(e){this.enter({type:"tableRow",children:[]},e)}function Ho(e){this.exit(e)}function Qu(e){this.enter({type:"tableCell",children:[]},e)}function R6(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,V6));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function V6(e,t){return t==="|"?t:e}function D6(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
134
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:o,tableCell:l,tableRow:a}};function o(m,g,p,b){return c(u(m,p,b),m.align)}function a(m,g,p,b){const v=d(m,p,b),k=c([v]);return k.slice(0,k.indexOf(`
135
+ `))}function l(m,g,p,b){const v=p.enter("tableCell"),k=p.enter("phrasing"),S=p.containerPhrasing(m,{...b,before:s,after:s});return k(),v(),S}function c(m,g){return K4(m,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function u(m,g,p){const b=m.children;let v=-1;const k=[],S=g.enter("table");for(;++v<b.length;)k[v]=d(b[v],g,p);return S(),k}function d(m,g,p){const b=m.children;let v=-1;const k=[],S=g.enter("tableRow");for(;++v<b.length;)k[v]=l(b[v],m,g,p);return S(),k}function h(m,g,p){let b=Tm.inlineCode(m,g,p);return p.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function F6(){return{exit:{taskListCheckValueChecked:Ju,taskListCheckValueUnchecked:Ju,paragraph:O6}}}function L6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$6}}}function Ju(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function O6(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function $6(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(o);let l=Tm.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function _6(){return[x4(),$4(),H4(),P6(),F6()]}function B6(e){return{extensions:[b4(),_4(e),U4(),D6(e),L6()]}}const z6={tokenize:G6,partial:!0},Am={tokenize:K6,partial:!0},jm={tokenize:Y6,partial:!0},Pm={tokenize:X6,partial:!0},H6={tokenize:Q6,partial:!0},Mm={name:"wwwAutolink",tokenize:Z6,previous:Im},Nm={name:"protocolAutolink",tokenize:q6,previous:Rm},qt={name:"emailAutolink",tokenize:W6,previous:Vm},Dt={};function U6(){return{text:Dt}}let fn=48;for(;fn<123;)Dt[fn]=qt,fn++,fn===58?fn=65:fn===91&&(fn=97);Dt[43]=qt;Dt[45]=qt;Dt[46]=qt;Dt[95]=qt;Dt[72]=[qt,Nm];Dt[104]=[qt,Nm];Dt[87]=[qt,Mm];Dt[119]=[qt,Mm];function W6(e,t,n){const r=this;let i,s;return o;function o(d){return!Ns(d)||!Vm.call(r,r.previous)||Ka(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return Ns(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(H6,u,c)(d):d===45||d===95||st(d)?(s=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return s&&i&&lt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Z6(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!Im.call(r,r.previous)||Ka(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z6,e.attempt(Am,e.attempt(jm,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function q6(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&Rm.call(r,r.previous)&&!Ka(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(lt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),s?c:(s=!0,l)):n(d)}function c(d){return d===null||Ti(d)||Le(d)||kn(d)||Zi(d)?n(d):e.attempt(Am,e.attempt(jm,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function G6(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function K6(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(Pm,l,a)(c):c===null||Le(c)||kn(c)||c!==45&&Zi(c)?l(c):(s=!0,e.consume(c),o)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!s?n(c):t(c)}}function Y6(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Pm,t,s)(o):o===null||Le(o)||kn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function X6(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||Le(a)||kn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Le(a)||kn(a)?t(a):r(a)}function s(a){return lt(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):lt(a)?(e.consume(a),o):n(a)}}function Q6(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return st(s)?n(s):t(s)}}function Im(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function Rm(e){return!lt(e)}function Vm(e){return!(e===47||Ns(e))}function Ns(e){return e===43||e===45||e===46||e===95||st(e)}function Ka(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const J6={tokenize:aE,partial:!0};function eE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:iE,continuation:{tokenize:oE},exit:sE}},text:{91:{name:"gfmFootnoteCall",tokenize:rE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tE,resolveTo:nE}}}}function tE(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return n(l);const c=Pt(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function nE(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function rE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(s>999||d===93&&!o||d===null||d===91||Le(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(Pt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Le(d)||(o=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function iE(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(g)}function u(g){if(o>999||g===93&&!a||g===null||g===91||Le(g))return n(g);if(g===93){e.exit("chunkString");const p=e.exit("gfmFootnoteDefinitionLabelString");return s=Pt(r.sliceSerialize(p)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Le(g)||(a=!0),o++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,u):u(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ee(e,m,"gfmFootnoteDefinitionWhitespace")):n(g)}function m(g){return t(g)}}function oE(e,t,n){return e.check(_r,t,e.attempt(J6,t,n))}function sE(e){e.exit("gfmFootnoteDefinition")}function aE(e,t,n){const r=this;return Ee(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function lE(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},h=[["enter",u,a],["enter",o[c][1],a],["exit",o[c][1],a],["enter",d,a]],m=a.parser.constructs.insideSpan.null;m&&xt(h,h.length,0,qi(m,o.slice(c+1,l),a)),xt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),xt(o,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function s(o,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),m(g))}function m(g){const p=Kn(c);if(g===126)return d>1?l(g):(o.consume(g),d++,m);if(d<2&&!n)return l(g);const b=o.exit("strikethroughSequenceTemporary"),v=Kn(g);return b._open=!v||v===2&&!!p,b._close=!p||p===2&&!!v,a(g)}}}class cE{constructor(){this.map=[]}add(t,n,r){uE(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function uE(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function dE(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function fE(){return{flow:{null:{name:"table",tokenize:hE,resolveAll:mE}}}}function hE(e,t,n){const r=this;let i=0,s=0,o;return a;function a(y){let M=r.events.length-1;for(;M>-1;){const H=r.events[M][1].type;if(H==="lineEnding"||H==="linePrefix")M--;else break}const D=M>-1?r.events[M][1].type:null,B=D==="tableHead"||D==="tableRow"?C:l;return B===C&&r.parser.lazy[r.now().line]?n(y):B(y)}function l(y){return e.enter("tableHead"),e.enter("tableRow"),c(y)}function c(y){return y===124||(o=!0,s+=1),u(y)}function u(y){return y===null?n(y):he(y)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):n(y):Se(y)?Ee(e,u,"whitespace")(y):(s+=1,o&&(o=!1,i+=1),y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),d(y)))}function d(y){return y===null||y===124||Le(y)?(e.exit("data"),u(y)):(e.consume(y),y===92?h:d)}function h(y){return y===92||y===124?(e.consume(y),d):d(y)}function m(y){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(y):(e.enter("tableDelimiterRow"),o=!1,Se(y)?Ee(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):g(y))}function g(y){return y===45||y===58?b(y):y===124?(o=!0,e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),p):T(y)}function p(y){return Se(y)?Ee(e,b,"whitespace")(y):b(y)}function b(y){return y===58?(s+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),v):y===45?(s+=1,v(y)):y===null||he(y)?A(y):T(y)}function v(y){return y===45?(e.enter("tableDelimiterFiller"),k(y)):T(y)}function k(y){return y===45?(e.consume(y),k):y===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(y),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(y))}function S(y){return Se(y)?Ee(e,A,"whitespace")(y):A(y)}function A(y){return y===124?g(y):y===null||he(y)?!o||i!==s?T(y):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(y)):T(y)}function T(y){return n(y)}function C(y){return e.enter("tableRow"),N(y)}function N(y){return y===124?(e.enter("tableCellDivider"),e.consume(y),e.exit("tableCellDivider"),N):y===null||he(y)?(e.exit("tableRow"),t(y)):Se(y)?Ee(e,N,"whitespace")(y):(e.enter("data"),P(y))}function P(y){return y===null||y===124||Le(y)?(e.exit("data"),N(y)):(e.consume(y),y===92?L:P)}function L(y){return y===92||y===124?(e.consume(y),P):P(y)}}function mE(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,c,u,d;const h=new cE;for(;++n<e.length;){const m=e[n],g=m[1];m[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(ed(h,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",u,t]])),i=g.type==="tableDelimiterRow"?2:u?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],d=ii(h,t,s,i,void 0,d),s=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],d=ii(h,t,s,i,void 0,d)),s=o,o=[s[1],n,0,0])):g.type==="tableHead"?(a=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(o[0]=o[1],d=ii(h,t,s,i,n,d)):o[1]!==0&&(d=ii(h,t,o,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&ed(h,t,l,c,u),h.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=dE(t.events,n))}return e}function ii(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},Vn(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=Vn(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=Vn(t.events,n[2]),u=Vn(t.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],m=t.events[n[3]];if(h[1].end=Object.assign({},m[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,p=n[3]-n[2]-1;e.add(g,p,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Vn(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function ed(e,t,n,r,i){const s=[],o=Vn(t.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,t])),r.end=Object.assign({},o),s.push(["exit",r,t]),e.add(n+1,0,s)}function Vn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const pE={name:"tasklistCheck",tokenize:yE};function gE(){return{text:{91:pE}}}function yE(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Le(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return he(l)?t(l):Se(l)?e.check({tokenize:xE},t,n)(l):n(l)}}function xE(e,t,n){return Ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function bE(e){return Wh([U6(),eE(),lE(e),fE(),gE()])}const vE={};function wE(e){const t=this,n=e||vE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(bE(n)),s.push(_6()),o.push(B6(n))}function kE({onSendMessage:e,onSendAttachments:t,disabled:n,theme:r,onEndChat:i}){const[s,o]=x.useState(""),[a,l]=x.useState(!1),c=x.useRef(null),u=x.useRef(null),[d,h]=x.useState(!1),m=tt(r);x.useEffect(()=>{const A=()=>{const T=rh().toLowerCase(),N=["android","iphone","ipad","mobile","tablet"].some(M=>T.includes(M)),P=ih(),{width:L}=oh(),y=L<=768;h(N||P&&y)};return A(),wa(zt,"resize",A),()=>ka(zt,"resize",A)},[]);const g=A=>{A.preventDefault(),s.trim()&&!n&&(e(s.trim()),o(""))},p=A=>{A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),g(A))},b=A=>{const T=A.target.files;if(T&&T.length>0){const C=Array.from(T),N=C.filter(P=>P.type.startsWith("image/"));if(N.length===0){console.warn("No valid image files selected");return}N.length!==C.length&&console.warn("Some non-image files were filtered out"),t(N),c.current&&(c.current.value="")}},v=()=>{!n&&c.current&&c.current.click()},k=()=>{!n&&d&&u.current&&u.current.click()},S=A=>{const T=A.target.files;if(T&&T.length>0){const C=T[0];C.type.startsWith("image/")?t([C]):console.warn("Selected file is not an image"),u.current&&(u.current.value="")}};return f.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:f.jsx("form",{onSubmit:g,className:"flex items-center !w-full mx-auto max-w-4xl",children:f.jsxs("div",{className:`flex items-center gap-2 !w-full backdrop-blur-md rounded-full px-3 py-2 shadow-sm hover:shadow-md focus-within:shadow-lg focus-within:ring-2 focus-within:ring-blue-500/30 focus-within:border-blue-500/50 transition-all duration-200 border ${r==="light"?"bg-white/90 border-gray-200":m.chatInput.container}`,children:[f.jsx(ge.button,{type:"button",onClick:v,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${m.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:f.jsx(Ze.Paperclip,{className:"w-4 h-4"})}),d&&f.jsx(ge.button,{type:"button",onClick:k,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${m.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:f.jsx(Ze.Camera,{className:"w-4 h-4"})}),f.jsx("input",{ref:c,type:"file",multiple:!0,onChange:b,className:"hidden",accept:"image/*"}),f.jsx("input",{ref:u,type:"file",onChange:S,className:"hidden",accept:"image/*",capture:"environment"}),f.jsx("textarea",{value:s,onChange:A=>o(A.target.value),onKeyDown:p,onFocus:()=>l(!0),onBlur:()=>l(!1),placeholder:"Type your message...",disabled:n,className:`flex-1 px-2 py-1 bg-transparent resize-none min-h-[32px] max-h-20 focus:outline-none text-sm border-0 ${m.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:A=>{const T=A.target;T.style.height="auto",T.style.height=`${Math.min(T.scrollHeight,80)}px`}}),f.jsx(ge.button,{type:"submit",disabled:n||!s.trim(),whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${s.trim()&&!n?m.chatInput.sendButton:r==="light"?"bg-gray-200 text-gray-400 cursor-not-allowed opacity-70":"bg-gray-600/50 text-gray-500 cursor-not-allowed opacity-50"}`,"aria-label":"Send message",children:f.jsx(Ze.SendHorizontal,{className:"w-4 h-4"})}),i&&f.jsx(ge.button,{type:"button",onClick:i,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 flex-shrink-0 ${m.chatInput.endButton}`,"aria-label":"End chat",children:f.jsx(Ze.PhoneOff,{className:"w-4 h-4"})})]})})})}function SE({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[i,s]=x.useState(""),[o,a]=x.useState(0);return x.useEffect(()=>{if(n){s(e);return}if(t){s(e);return}if(o<e.length){const l=setTimeout(()=>{s(e.slice(0,o+1)),a(o+1)},r);return()=>clearTimeout(l)}},[e,o,t,r,n]),x.useEffect(()=>{n||(a(0),s(""))},[e,n]),f.jsxs("span",{className:"relative",children:[f.jsx("span",{className:"inline-block",children:i}),!t&&f.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:l*.2,ease:"easeInOut"}},l))})]})}function CE({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var l,c,u,d;const i=tt(t),s=e.sender.name?e.sender.name.split(" ").map(h=>h[0]).join("").toUpperCase().slice(0,2):"U",o=((l=e==null?void 0:e.metadata)==null?void 0:l.format)==="markdown"||((c=e==null?void 0:e.metadata)==null?void 0:c.markdown)===!0||/(\n|^)#\s|\n##\s|```|\*\s|\-\s|\d+\.\s|>\s|!\[|\]\(https?:\/\//.test(e.content),a={h1:h=>f.jsx("h1",{className:"text-lg font-semibold mt-2 mb-1",...h}),h2:h=>f.jsx("h2",{className:"text-base font-semibold mt-2 mb-1",...h}),h3:h=>f.jsx("h3",{className:"text-sm font-semibold mt-2 mb-1",...h}),p:h=>f.jsx("p",{className:"my-1 leading-relaxed",...h}),a:({href:h,children:m,...g})=>f.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"underline text-blue-600 dark:text-blue-400 hover:opacity-80",...g,children:m}),code:({inline:h,children:m,...g})=>h?f.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-[0.85em]",...g,children:m}):f.jsx("pre",{className:"bg-gray-100 dark:bg-gray-800 rounded-md p-3 overflow-x-auto text-[0.85em]",children:f.jsx("code",{...g,children:m})}),ul:h=>f.jsx("ul",{className:"list-disc pl-5 my-1 space-y-1",...h}),ol:h=>f.jsx("ol",{className:"list-decimal pl-5 my-1 space-y-1",...h}),li:h=>f.jsx("li",{className:"leading-relaxed",...h}),blockquote:h=>f.jsx("blockquote",{className:"border-l-4 border-gray-300 dark:border-gray-600 pl-3 italic my-2",...h}),img:h=>f.jsx("img",{className:"max-w-full h-auto rounded-md my-2",...h}),table:h=>f.jsx("div",{className:"overflow-x-auto my-2",children:f.jsx("table",{className:"min-w-full text-left text-sm",...h})}),th:h=>f.jsx("th",{className:"border-b border-gray-300 dark:border-gray-600 px-2 py-1 font-semibold",...h}),td:h=>f.jsx("td",{className:"border-b border-gray-200 dark:border-gray-700 px-2 py-1 align-top",...h})};return f.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:f.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%] min-w-0`,children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${n?t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700":t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:s}),f.jsxs("div",{className:`
136
+ relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover min-w-0 max-w-full overflow-hidden
137
+ ${n?`${i.chatMessage.own} rounded-br-md`:`${i.chatMessage.other} rounded-bl-md`}
138
+ ${r?"shimmer":""}
170
139
  transition-all duration-200 group-hover:scale-[1.02]
171
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:((o=e.metadata)==null?void 0:o.type)==="attachment"?l.jsx(K1,{message:e,theme:t,isOwn:n}):s&&!n?l.jsx(z1,{text:e.content,isComplete:!s,isRealTimeStream:((a=e.metadata)==null?void 0:a.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function Z1(e,t){return e.startsWith("image/")?$e.Image:e.startsWith("video/")?$e.Video:e.startsWith("audio/")?$e.Music:e.includes("zip")||e.includes("rar")||e.includes("archive")?$e.Archive:$e.FileText}function G1(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,s)).toFixed(2))+" "+n[s]}function K1({message:e,theme:t,isOwn:n}){const s=_e(t),r=e.metadata,i=(r==null?void 0:r.fileName)||"Unknown file",o=(r==null?void 0:r.fileSize)||0,a=(r==null?void 0:r.mimeType)||"application/octet-stream",c=r==null?void 0:r.downloading,d=r==null?void 0:r.uploading,u=(r==null?void 0:r.downloadProgress)||0,f=(r==null?void 0:r.uploadProgress)||0,h=r==null?void 0:r.downloadUrl,p=r==null?void 0:r.file,x=Z1(a),m=c||d,b=c?u:f,S=c?"Downloading...":d?"Uploading...":"Complete",[C,T]=g.useState(null);g.useEffect(()=>{if(h)T(h);else if(p&&a.startsWith("image/")){const V=URL.createObjectURL(p);return T(V),()=>URL.revokeObjectURL(V)}else T(null)},[h,p,a]);const k=()=>{if(h){const V=document.createElement("a");V.href=h,V.download=i,V.click()}},j=a.startsWith("image/")&&C;return l.jsxs("div",{className:"flex flex-col gap-2 max-w-sm",children:[j&&l.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[l.jsx("img",{src:C,alt:i,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:k}),l.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),l.jsxs("div",{className:`
140
+ `,style:{wordWrap:"break-word",overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[f.jsx("div",{className:"leading-relaxed text-sm overflow-hidden",children:((u=e.metadata)==null?void 0:u.type)==="attachment"?f.jsx(AE,{message:e,theme:t,isOwn:n}):r&&!n?f.jsx(SE,{text:e.content,isComplete:!r,isRealTimeStream:((d=e.metadata)==null?void 0:d.streaming)===!0,speed:35}):o?f.jsx(l4,{remarkPlugins:[wE],components:a,children:e.content}):f.jsx("span",{className:"whitespace-pre-wrap break-words",children:e.content})}),f.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function EE(e,t){return e.startsWith("image/")?Ze.Image:e.startsWith("video/")?Ze.Video:e.startsWith("audio/")?Ze.Music:e.includes("zip")||e.includes("rar")||e.includes("archive")?Ze.Archive:Ze.FileText}function TE(e){if(e===0)return"0 Bytes";const t=1024,n=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+n[r]}function AE({message:e,theme:t,isOwn:n}){const r=tt(t),i=e.metadata,s=(i==null?void 0:i.fileName)||"Unknown file",o=(i==null?void 0:i.fileSize)||0,a=(i==null?void 0:i.mimeType)||"application/octet-stream",l=i==null?void 0:i.downloading,c=i==null?void 0:i.uploading,u=(i==null?void 0:i.downloadProgress)||0,d=(i==null?void 0:i.uploadProgress)||0,h=i==null?void 0:i.downloadUrl,m=i==null?void 0:i.file,g=EE(a),p=l||c,b=l?u:d,v=l?"Downloading...":c?"Uploading...":"Complete",[k,S]=x.useState(null);x.useEffect(()=>{if(h)S(h);else if(m&&a.startsWith("image/")){const N=URL.createObjectURL(m);return S(N),()=>URL.revokeObjectURL(N)}else S(null)},[h,m,a]);const A=()=>{if(h){const N=nh("a");N&&(N.href=h,N.download=s,N.click())}},C=a.startsWith("image/")&&k;return f.jsxs("div",{className:"flex flex-col gap-2 max-w-full sm:max-w-sm",children:[C&&f.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[f.jsx("img",{src:k,alt:s,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:A}),f.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),f.jsxs("div",{className:`
172
141
  flex items-center gap-3 p-3 rounded-lg border transition-all duration-200
173
142
  ${t==="light"?"bg-gray-50 border-gray-200 hover:bg-gray-100":"bg-gray-800/50 border-gray-700 hover:bg-gray-700/50"}
174
- `,children:[l.jsx("div",{className:`
143
+ `,children:[f.jsx("div",{className:`
175
144
  p-2 rounded-lg flex-shrink-0
176
145
  ${t==="light"?"bg-blue-100 text-blue-600":"bg-blue-900/50 text-blue-400"}
177
- `,children:l.jsx(x,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:`font-medium text-sm truncate ${s.text.primary}`,children:i}),l.jsxs("div",{className:`text-xs ${s.text.muted}`,children:[o>0&&G1(o),m&&l.jsxs(l.Fragment,{children:[o>0&&" • ",S," ",Math.round(b*100),"%"]})]}),m&&l.jsx("div",{className:`
146
+ `,children:f.jsx(g,{className:"w-5 h-5"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsx("div",{className:`font-medium text-sm truncate ${r.text.primary}`,children:s}),f.jsxs("div",{className:`text-xs ${r.text.muted}`,children:[o>0&&TE(o),p&&f.jsxs(f.Fragment,{children:[o>0&&" • ",v," ",Math.round(b*100),"%"]})]}),p&&f.jsx("div",{className:`
178
147
  w-full h-1 rounded-full mt-1 overflow-hidden
179
148
  ${t==="light"?"bg-gray-200":"bg-gray-700"}
180
- `,children:l.jsx(le.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${b*100}%`},transition:{duration:.3}})})]}),h&&!m&&l.jsx(le.button,{onClick:k,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
149
+ `,children:f.jsx(ge.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${b*100}%`},transition:{duration:.3}})})]}),h&&!p&&f.jsx(ge.button,{onClick:A,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
181
150
  p-2 rounded-lg transition-colors duration-200
182
151
  ${t==="light"?"hover:bg-gray-200 text-gray-600 hover:text-gray-800":"hover:bg-gray-600 text-gray-400 hover:text-gray-200"}
183
- `,"aria-label":"Download file",children:l.jsx($e.Download,{className:"w-4 h-4"})})]})]})}function Y1(){return l.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[l.jsx("div",{className:"text-2xl mb-2",children:"✅"}),l.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function q1(){return l.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[l.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),l.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function X1({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r="widget",onEndChat:i}){const[o,a]=g.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[c,d]=g.useState(!0),[u,f]=g.useState(()=>{const N=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),F=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!N&&!F}),[h,p]=g.useState(new Set),[x,m]=g.useState([]),[b,S]=g.useState(!1),[C,T]=g.useState(!1),[k,v]=g.useState(()=>e.getCurrentInteraction()),j=g.useRef(null),V=g.useRef(null),[E,_]=g.useState(!0),y=_e(t);g.useEffect(()=>{const N=()=>{const F=navigator.userAgent.toLowerCase(),A=["android","iphone","ipad","mobile","tablet"].some(ae=>F.includes(ae)),Z="ontouchstart"in window||navigator.maxTouchPoints>0,G=window.innerWidth<=768,de=A||Z&&G;S(de),de&&r==="widget"&&T(!0)};return N(),window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[r]),g.useEffect(()=>(C&&b&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen().catch(console.log)),()=>{C&&b&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.width="unset",document.body.style.height="unset",document.fullscreenElement&&document.exitFullscreen().catch(console.log))}),[C,b]);const D=e.getCurrentAgentInfo(),W=(D==null?void 0:D.name)||"AI Assistant",te=W.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2),ue=g.useCallback(N=>{const F={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:N,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(se=>[...se,F])},[]),ie=g.useCallback((N=!1)=>{if(V.current){const F=V.current;N?F.scrollTop=F.scrollHeight:F.scrollTo({top:F.scrollHeight,behavior:"smooth"})}},[]),fe=g.useCallback(()=>{if(V.current){const{scrollTop:N,scrollHeight:F,clientHeight:se}=V.current;return F-N-se<100}return!0},[]),ne=g.useCallback(()=>{const N=fe();_(N)},[fe]),R=g.useCallback((N=!1)=>{E&&ie(N)},[E,ie]);g.useEffect(()=>{if(E&&o.length>0){R(!0);const N=setTimeout(()=>{E&&R(!1)},10);return()=>clearTimeout(N)}},[o.length,R,E]),g.useEffect(()=>{if(k&&E){R(!0);const N=setTimeout(()=>{E&&R(!1)},50);return()=>clearTimeout(N)}},[k,R,E]),g.useEffect(()=>{const N=A=>{if(console.log("ChatView: Received message:",A),f(!1),k&&A.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",k.methodName),m(Z=>[...Z,A]);return}A.sender.type==="agent"&&d(!1),a(Z=>{var de;if(Z.some(ae=>ae.id===A.id))return console.log("ChatView: Message already exists, skipping:",A.id),Z;if(console.log("ChatView: Adding new message:",A.id),A.sender.type==="agent"&&(p(ae=>new Set(ae).add(A.id)),!((de=A.metadata)!=null&&de.streaming))){const ae=A.content.length*35+1e3;setTimeout(()=>{p(Oe=>{const Be=new Set(Oe);return Be.delete(A.id),Be})},ae)}return[...Z,A]}),setTimeout(()=>{E&&R(!0)},0)},F=A=>{var Z;if(console.log("ChatView: Updated message:",A),k&&A.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",k.methodName),m(G=>{const de=G.findIndex(ae=>ae.id===A.id);if(de>=0){const ae=[...G];return ae[de]=A,ae}else return[...G,A]});return}a(G=>G.map(de=>de.id===A.id?{...A}:de)),setTimeout(()=>{E&&R(!0)},0),(Z=A.metadata)!=null&&Z.streaming||p(G=>{const de=new Set(G);return de.delete(A.id),de})},se=A=>{console.log("ChatView: Sent message:",A),f(!1),a(Z=>Z.some(de=>de.id===A.id)?(console.log("ChatView: Sent message already exists, skipping:",A.id),Z):(console.log("ChatView: Adding sent message:",A.id),[...Z,A])),setTimeout(()=>{E&&R(!0)},0)};return e.on("chat.message.received",N),e.on("chat.message.updated",F),e.on("chat.message.sent",se),()=>{e.off("chat.message.received",N),e.off("chat.message.updated",F),e.off("chat.message.sent",se)}},[e,k,E,R]),g.useEffect(()=>{const N=Z=>{console.log("ChatView: RPC interaction started:",Z);const G=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",G==null?void 0:G.methodName),v(G),d(!1),E&&(R(!0),setTimeout(()=>{E&&R(!1)},100))},F=Z=>{if(console.log("ChatView: RPC interaction completed:",Z),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages"),a(G=>{const de=[...G];return x.forEach(ae=>{var Be;if(!de.some(Pe=>Pe.id===ae.id)&&(console.log("ChatView: Adding queued message:",ae.id),de.push(ae),ae.sender.type==="agent"&&(p(Pe=>new Set(Pe).add(ae.id)),!((Be=ae.metadata)!=null&&Be.streaming)))){const Pe=ae.content.length*35+1e3;setTimeout(()=>{p(ze=>{const Xe=new Set(ze);return Xe.delete(ae.id),Xe})},Pe)}}),de}),m([]),setTimeout(()=>{E&&R(!0)},0)),Z&&Z.response&&Z.response.success){let G=null;Z.response.successView?G=Z.response.successView:Z.successView&&(G=Z.successView),a(de=>{const ae=[...de].reverse().findIndex(ze=>ze.sender.type==="participant");let Oe=de.length;ae!==-1&&(Oe=de.length-ae);const Be={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:G||l.jsx(Y1,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Be);const Pe=[...de];return Pe.splice(Oe,0,Be),Pe})}},se=async Z=>{k&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after timeout"),a(de=>{const ae=[...de];return x.forEach(Oe=>{var Pe;if(!ae.some(ze=>ze.id===Oe.id)&&(ae.push(Oe),Oe.sender.type==="agent"&&(p(ze=>new Set(ze).add(Oe.id)),!((Pe=Oe.metadata)!=null&&Pe.streaming)))){const ze=Oe.content.length*35+1e3;setTimeout(()=>{p(Xe=>{const rt=new Set(Xe);return rt.delete(Oe.id),rt})},ze)}}),ae}),m([]),setTimeout(()=>{E&&R(!0)},0));let G=null;Z&&Z.response&&Z.response.timeoutView?G=Z.response.timeoutView:Z&&Z.timeoutView&&(G=Z.timeoutView),a(de=>{const ae={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:W,type:"agent"},metadata:{type:"timeoutView",view:G||l.jsx(q1,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(ae),[...de,ae]}),setTimeout(()=>{e.getCurrentInteraction()||v(null)},100)},A=async Z=>{console.log("ChatView: RPC interaction dismissed:",Z),console.log("ChatView: Current interaction before dismiss:",k==null?void 0:k.methodName),v(null),x.length>0&&(console.log("ChatView: Processing",x.length,"queued messages after dismissal"),a(G=>{const de=[...G];return x.forEach(ae=>{var Be;if(!de.some(Pe=>Pe.id===ae.id)&&(de.push(ae),ae.sender.type==="agent"&&(p(Pe=>new Set(Pe).add(ae.id)),!((Be=ae.metadata)!=null&&Be.streaming)))){const Pe=ae.content.length*35+1e3;setTimeout(()=>{p(ze=>{const Xe=new Set(ze);return Xe.delete(ae.id),Xe})},Pe)}}),de}),m([]),setTimeout(()=>{E&&R(!0)},0)),setTimeout(()=>{const G=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(G==null?void 0:G.methodName)||"null"),G===null&&v(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",N),e.on("rpc.interaction.completed",F),e.on("rpc.interaction.timeout",se),e.on("rpc.interaction.dismissed",A),()=>{e.off("rpc.interaction.started",N),e.off("rpc.interaction.completed",F),e.off("rpc.interaction.timeout",se),e.off("rpc.interaction.dismissed",A)}},[e,E,R,W,x]),g.useEffect(()=>{const N=()=>{if(console.log("ChatView: Agent is thinking"),k){console.log("ChatView: Suppressing thinking indicator due to active interaction:",k.methodName);return}d(!0)},F=()=>{console.log("ChatView: Agent is speaking"),d(!1)};return e.on("agent.thinking",N),e.on("agent.speaking",F),()=>{e.off("agent.thinking",N),e.off("agent.speaking",F)}},[e,k]),g.useEffect(()=>{const N=e.getCurrentInteraction();N?(console.log("ChatView: Restoring interaction state on mount/client change:",N.methodName),v(N)):v(null)},[e]),g.useEffect(()=>{console.log("ChatView: Display type changed to:",r,"Current interaction:",(k==null?void 0:k.methodName)||"none")},[r,k]);const B=async N=>{try{k&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),v(null)),await e.sendChatMessage(N)}catch(F){console.error("Failed to send message:",F)}},M=async N=>{try{k&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),v(null)),await e.sendAttachments(N),console.log("Attachments sent successfully:",N.map(F=>F.name))}catch(F){console.error("Failed to send attachments:",F)}},[O,q]=g.useState([]);g.useEffect(()=>{const N=F=>{q(Array.isArray(F)?F:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",N),()=>{e.off("suggested.response",N)}},[e]);const Y=C&&b?"fullscreen":r,U=Y==="fullscreen"?C&&b?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout",re=Y==="fullscreen"?C&&b?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${y.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${y.chatHeader.container}`,$=Y==="fullscreen"?C&&b?"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0",I="flex-shrink-0 !w-full",L=()=>{T(!1),n&&n()};return l.jsxs("div",{className:`${U} relative`,children:[l.jsx("div",{className:re,children:l.jsxs("div",{className:"flex items-center gap-2",children:[C&&b&&l.jsx(le.button,{onClick:L,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),l.jsxs("div",{children:[l.jsx("h3",{className:`font-semibold text-base leading-tight ${C&&b?"text-white":y.text.primary}`,children:W}),l.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${C&&b?"text-gray-300":y.text.muted}`,children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),l.jsxs("div",{ref:V,className:`${$} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none",contain:"layout style paint",overscrollBehavior:"contain"},onScroll:ne,children:[" ",o.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:te}),l.jsxs("p",{className:`text-base mb-2 ${C&&b?"text-white":y.text.secondary}`,children:[W," is joining..."]}),l.jsx("p",{className:`text-xs ${C&&b?"text-gray-300":y.text.muted}`,children:"Your conversation will begin shortly"})]}):l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[o.map((N,F)=>{var se,A;return l.jsx("div",{children:((se=N.metadata)==null?void 0:se.type)==="successView"?l.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%]",children:[l.jsx(le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.own}`,children:[N.metadata.view,l.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((A=N.metadata)==null?void 0:A.type)==="timeoutView"?l.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:te}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[N.metadata.view,l.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:N.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):l.jsx(W1,{message:N,theme:t,isOwn:N.sender.type==="participant",isStreaming:h.has(N.id)})},N.id)}),c&&!k&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:te}),l.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${y.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]`,style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(N=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:N*.2,ease:"easeInOut"}},N))})})]})}),k&&k.presentationMode==="embedded"&&l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx(le.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:te}),l.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other}`,children:[l.jsx(un,{interaction:k,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ue},k.methodName),l.jsx(le.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),l.jsx("div",{ref:j})]})})]}),!E&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{_(!0),ie(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})}),O.length>0&&l.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:O.map((N,F)=>{var se;return l.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
184
- ${t==="light"?"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900":t==="dark"?"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white":((se=y.suggestedResponse)==null?void 0:se.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
185
- `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{B(N),q([])},children:N},N+F)})}),k&&k.presentationMode!=="embedded"&&l.jsx(un,{interaction:k,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:ue},k.methodName),l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:I,children:l.jsx(H1,{onSendMessage:B,onSendAttachments:M,disabled:s,theme:t,onEndChat:i})})]})}function J1({text:e,isComplete:t,isRealTimeStream:n=!1,speed:s=50}){const[r,i]=g.useState(""),[o,a]=g.useState(0);return g.useEffect(()=>{if(n){i(e);return}if(t){i(e);return}if(o<e.length){const c=setTimeout(()=>{i(e.slice(0,o+1)),a(o+1)},s);return()=>clearTimeout(c)}},[e,o,t,s,n]),g.useEffect(()=>{n||(a(0),i(""))},[e,n]),l.jsxs("span",{className:"relative",children:[l.jsx("span",{className:"inline-block",children:r}),!t&&l.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(c=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:c*.2,ease:"easeInOut"}},c))})]})}function Q1({message:e,theme:t,isOwn:n,isStreaming:s=!1}){var o,a,c;const r=_e(t),i=e.sender.name?e.sender.name.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2):"U";return l.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:l.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:i}),l.jsxs("div",{className:`
152
+ `,"aria-label":"Download file",children:f.jsx(Ze.Download,{className:"w-4 h-4"})})]})]})}function jE(){return f.jsxs("div",{className:"max-w-xs mx-auto bg-green-50 border border-green-200 rounded-lg shadow p-3 flex flex-col items-center",children:[f.jsx("div",{className:"text-2xl mb-2",children:"✅"}),f.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),f.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function PE(){return f.jsxs("div",{className:"max-w-xs mx-auto bg-yellow-50 border border-yellow-200 rounded-lg shadow p-3 flex flex-col items-center",children:[f.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),f.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),f.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function ME({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:i="widget",onEndChat:s}){const[o,a]=x.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[l,c]=x.useState(!0),[u,d]=x.useState(()=>{const V=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),G=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!V&&!G}),[h,m]=x.useState(new Set),[g,p]=x.useState([]),[b,v]=x.useState(!1),[k,S]=x.useState(!1),[A,T]=x.useState(()=>e.getCurrentInteraction()),C=x.useRef(null),N=x.useRef(null),[P,L]=x.useState(!0),y=tt(t);x.useEffect(()=>{const V=()=>{const G=navigator.userAgent.toLowerCase(),R=["android","iphone","ipad","mobile","tablet"].some(Z=>G.includes(Z)),re="ontouchstart"in window||navigator.maxTouchPoints>0,ne=window.innerWidth<=768,me=R||re&&ne;v(me),me&&i==="widget"&&S(!0)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[i]),x.useEffect(()=>{var V;return k&&b&&(Sc({overflow:"hidden",position:"fixed",width:"100%",height:"100%"}),(V=z1())==null||V.catch(console.log)),()=>{var G;k&&b&&(Sc({overflow:"unset",position:"unset",width:"unset",height:"unset"}),U1()&&((G=H1())==null||G.catch(console.log)))}},[k,b]);const M=e.getCurrentAgentInfo(),D=(M==null?void 0:M.name)||"AI Assistant",B=D.split(" ").map(V=>V[0]).join("").toUpperCase().slice(0,2),H=x.useCallback(V=>{const G={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:V,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};a(fe=>[...fe,G])},[]),Y=x.useCallback((V=!1)=>{if(N.current){const G=N.current;V?G.scrollTop=G.scrollHeight:G.scrollTo({top:G.scrollHeight,behavior:"smooth"})}},[]),de=x.useCallback(()=>{if(N.current){const{scrollTop:V,scrollHeight:G,clientHeight:fe}=N.current;return G-V-fe<100}return!0},[]),ie=x.useCallback(()=>{const V=de();L(V)},[de]),F=x.useCallback((V=!1)=>{P&&Y(V)},[P,Y]);x.useEffect(()=>{if(P&&o.length>0){F(!0);const V=setTimeout(()=>{P&&F(!1)},10);return()=>clearTimeout(V)}},[o.length,F,P]),x.useEffect(()=>{if(A&&P){F(!0);const V=setTimeout(()=>{P&&F(!1)},50);return()=>clearTimeout(V)}},[A,F,P]),x.useEffect(()=>{const V=R=>{if(console.log("ChatView: Received message:",R),d(!1),A&&R.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",A.methodName),p(re=>[...re,R]);return}R.sender.type==="agent"&&c(!1),a(re=>{var me;if(re.some(Z=>Z.id===R.id))return console.log("ChatView: Message already exists, skipping:",R.id),re;if(console.log("ChatView: Adding new message:",R.id),R.sender.type==="agent"&&(m(Z=>new Set(Z).add(R.id)),!((me=R.metadata)!=null&&me.streaming))){const Z=R.content.length*35+1e3;setTimeout(()=>{m(pe=>{const Ae=new Set(pe);return Ae.delete(R.id),Ae})},Z)}return[...re,R]}),setTimeout(()=>{P&&F(!0)},0)},G=R=>{var re;if(console.log("ChatView: Updated message:",R),A&&R.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",A.methodName),p(ne=>{const me=ne.findIndex(Z=>Z.id===R.id);if(me>=0){const Z=[...ne];return Z[me]=R,Z}else return[...ne,R]});return}a(ne=>ne.map(me=>me.id===R.id?{...R}:me)),setTimeout(()=>{P&&F(!0)},0),(re=R.metadata)!=null&&re.streaming||m(ne=>{const me=new Set(ne);return me.delete(R.id),me})},fe=R=>{console.log("ChatView: Sent message:",R),d(!1),a(re=>re.some(me=>me.id===R.id)?(console.log("ChatView: Sent message already exists, skipping:",R.id),re):(console.log("ChatView: Adding sent message:",R.id),[...re,R])),setTimeout(()=>{P&&F(!0)},0)};return e.on("chat.message.received",V),e.on("chat.message.updated",G),e.on("chat.message.sent",fe),()=>{e.off("chat.message.received",V),e.off("chat.message.updated",G),e.off("chat.message.sent",fe)}},[e,A,P,F]),x.useEffect(()=>{const V=re=>{console.log("ChatView: RPC interaction started:",re);const ne=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",ne==null?void 0:ne.methodName),T(ne),c(!1),P&&(F(!0),setTimeout(()=>{P&&F(!1)},100))},G=re=>{if(console.log("ChatView: RPC interaction completed:",re),T(null),g.length>0&&(console.log("ChatView: Processing",g.length,"queued messages"),a(ne=>{const me=[...ne];return g.forEach(Z=>{var Ae;if(!me.some(xe=>xe.id===Z.id)&&(console.log("ChatView: Adding queued message:",Z.id),me.push(Z),Z.sender.type==="agent"&&(m(xe=>new Set(xe).add(Z.id)),!((Ae=Z.metadata)!=null&&Ae.streaming)))){const xe=Z.content.length*35+1e3;setTimeout(()=>{m(Ne=>{const ze=new Set(Ne);return ze.delete(Z.id),ze})},xe)}}),me}),p([]),setTimeout(()=>{P&&F(!0)},0)),re&&re.response&&re.response.success){let ne=null;re.response.successView?ne=re.response.successView:re.successView&&(ne=re.successView),a(me=>{const Z=[...me].reverse().findIndex(Ne=>Ne.sender.type==="participant");let pe=me.length;Z!==-1&&(pe=me.length-Z);const Ae={id:`success_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{type:"successView",view:ne||f.jsx(jE,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Ae);const xe=[...me];return xe.splice(pe,0,Ae),xe})}},fe=async re=>{A&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),T(null),g.length>0&&(console.log("ChatView: Processing",g.length,"queued messages after timeout"),a(me=>{const Z=[...me];return g.forEach(pe=>{var xe;if(!Z.some(Ne=>Ne.id===pe.id)&&(Z.push(pe),pe.sender.type==="agent"&&(m(Ne=>new Set(Ne).add(pe.id)),!((xe=pe.metadata)!=null&&xe.streaming)))){const Ne=pe.content.length*35+1e3;setTimeout(()=>{m(ze=>{const He=new Set(ze);return He.delete(pe.id),He})},Ne)}}),Z}),p([]),setTimeout(()=>{P&&F(!0)},0));let ne=null;re&&re.response&&re.response.timeoutView?ne=re.response.timeoutView:re&&re.timeoutView&&(ne=re.timeoutView),a(me=>{const Z={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:D,type:"agent"},metadata:{type:"timeoutView",view:ne||f.jsx(PE,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Z),[...me,Z]}),setTimeout(()=>{e.getCurrentInteraction()||T(null)},100)},R=async re=>{console.log("ChatView: RPC interaction dismissed:",re),console.log("ChatView: Current interaction before dismiss:",A==null?void 0:A.methodName),T(null),g.length>0&&(console.log("ChatView: Processing",g.length,"queued messages after dismissal"),a(ne=>{const me=[...ne];return g.forEach(Z=>{var Ae;if(!me.some(xe=>xe.id===Z.id)&&(me.push(Z),Z.sender.type==="agent"&&(m(xe=>new Set(xe).add(Z.id)),!((Ae=Z.metadata)!=null&&Ae.streaming)))){const xe=Z.content.length*35+1e3;setTimeout(()=>{m(Ne=>{const ze=new Set(Ne);return ze.delete(Z.id),ze})},xe)}}),me}),p([]),setTimeout(()=>{P&&F(!0)},0)),setTimeout(()=>{const ne=e.getCurrentInteraction();console.log("ChatView: Latest interaction from client after dismiss:",(ne==null?void 0:ne.methodName)||"null"),ne===null&&T(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",V),e.on("rpc.interaction.completed",G),e.on("rpc.interaction.timeout",fe),e.on("rpc.interaction.dismissed",R),()=>{e.off("rpc.interaction.started",V),e.off("rpc.interaction.completed",G),e.off("rpc.interaction.timeout",fe),e.off("rpc.interaction.dismissed",R)}},[e,P,F,D,g]),x.useEffect(()=>{const V=()=>{if(console.log("ChatView: Agent is thinking"),A){console.log("ChatView: Suppressing thinking indicator due to active interaction:",A.methodName);return}c(!0)},G=()=>{console.log("ChatView: Agent is speaking"),c(!1)};return e.on("agent.thinking",V),e.on("agent.speaking",G),()=>{e.off("agent.thinking",V),e.off("agent.speaking",G)}},[e,A]),x.useEffect(()=>{const V=e.getCurrentInteraction();V?(console.log("ChatView: Restoring interaction state on mount/client change:",V.methodName),T(V)):T(null)},[e]),x.useEffect(()=>{console.log("ChatView: Display type changed to:",i,"Current interaction:",(A==null?void 0:A.methodName)||"none")},[i,A]);const W=async V=>{try{A&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),T(null)),await e.sendChatMessage(V)}catch(G){console.error("Failed to send message:",G)}},w=async V=>{try{A&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),T(null)),await e.sendAttachments(V),console.log("Attachments sent successfully:",V.map(G=>G.name))}catch(G){console.error("Failed to send attachments:",G)}},[z,oe]=x.useState([]);x.useEffect(()=>{const V=G=>{oe(Array.isArray(G)?G:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",V),()=>{e.off("suggested.response",V)}},[e]);const E=k&&b?"fullscreen":i,U=E==="fullscreen"?k&&b?"fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black":"flex flex-col h-full w-full max-w-none":"flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout",se=E==="fullscreen"?k&&b?"flex items-center w-full justify-between px-4 pt-3 pb-3 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-6 pt-5 pb-4 border-b ${y.chatHeader.container}`:`flex items-center w-full justify-between px-4 pt-5 pb-4 border-b ${y.chatHeader.container}`,$=E==="fullscreen"?k&&b?"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0":"flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0",ee="flex-shrink-0 !w-full",Q=()=>{S(!1),n&&n()};return f.jsxs("div",{className:`${U} relative`,children:[f.jsx("div",{className:se,children:f.jsxs("div",{className:"flex items-center gap-2",children:[k&&b&&f.jsx(ge.button,{onClick:Q,whileHover:{scale:1.05},whileTap:{scale:.95},className:"p-2 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors mr-2","aria-label":"Exit fullscreen",children:"✕"}),f.jsxs("div",{children:[f.jsx("h3",{className:`font-semibold text-base leading-tight ${k&&b?"text-white":y.text.primary}`,children:D}),f.jsxs("p",{className:`text-xs flex items-center gap-1.5 mt-0.5 ${k&&b?"text-gray-300":y.text.muted}`,children:[f.jsx("span",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Online"]})]})]})}),f.jsxs("div",{ref:N,className:`${$} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none",contain:"layout style paint",overscrollBehavior:"contain"},onScroll:ie,children:[" ",o.length===0?f.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[f.jsx(ge.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl",children:B}),f.jsxs("p",{className:`text-base mb-2 ${k&&b?"text-white":y.text.secondary}`,children:[D," is joining..."]}),f.jsx("p",{className:`text-xs ${k&&b?"text-gray-300":y.text.muted}`,children:"Your conversation will begin shortly"})]}):f.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:f.jsxs("div",{className:"space-y-3",children:[o.map((V,G)=>{var fe,R;return f.jsx("div",{children:((fe=V.metadata)==null?void 0:fe.type)==="successView"?f.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:f.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%] min-w-0",children:[f.jsx(ge.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:"Y"}),f.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-br-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.own} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[V.metadata.view,f.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:V.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((R=V.metadata)==null?void 0:R.type)==="timeoutView"?f.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:f.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:B}),f.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[V.metadata.view,f.jsx("div",{className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:V.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):f.jsx(CE,{message:V,theme:t,isOwn:V.sender.type==="participant",isStreaming:h.has(V.id)})},V.id)}),l&&!A&&f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o.length*.1},className:"flex w-full justify-start mb-4 px-1",children:f.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:B}),f.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${y.chatMessage.other} rounded-bl-md transition-all duration-200 group-hover:scale-[1.02] min-w-0 max-w-full overflow-hidden`,style:{wordWrap:"break-word",overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto",minWidth:48},children:f.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(V=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:V*.2,ease:"easeInOut"}},V))})})]})}),A&&A.presentationMode==="embedded"&&f.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[f.jsx(ge.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1},className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to_gray-700"}`,children:B}),f.jsxs("div",{className:`flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${y.chatMessage.other} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[f.jsx(Pr,{interaction:A,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:H},A.methodName),f.jsx(ge.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${y.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),f.jsx("div",{ref:C})]})})]}),!P&&f.jsx(ge.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{L(!0),Y(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})}),z.length>0&&f.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:z.map((V,G)=>{var fe;return f.jsx("button",{className:`whitespace-nowrap px-3 py-1 rounded-full border shadow-sm flex-shrink-0 transition-all duration-150 font-medium text-sm focus:outline-none focus:ring-2 focus:ring-blue-400/40
153
+ ${t==="light"?"bg-white text-blue-700 border-blue-200 hover:bg-blue-50 hover:text-blue-900":t==="dark"?"bg-gray-800 text-blue-300 border-gray-700 hover:bg-gray-700 hover:text-white":((fe=y.suggestedResponse)==null?void 0:fe.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
154
+ `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{W(V),oe([])},children:V},V+G)})}),A&&A.presentationMode!=="embedded"&&f.jsx(Pr,{interaction:A,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:H},A.methodName),f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:ee,children:f.jsx(kE,{onSendMessage:W,onSendAttachments:w,disabled:r,theme:t,onEndChat:s})})]})}function NE({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[i,s]=x.useState(""),[o,a]=x.useState(0);return x.useEffect(()=>{if(n){s(e);return}if(t){s(e);return}if(o<e.length){const l=setTimeout(()=>{s(e.slice(0,o+1)),a(o+1)},r);return()=>clearTimeout(l)}},[e,o,t,r,n]),x.useEffect(()=>{n||(a(0),s(""))},[e,n]),f.jsxs("span",{className:"relative",children:[f.jsx("span",{className:"inline-block",children:i}),!t&&f.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:l*.2,ease:"easeInOut"}},l))})]})}function IE({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var o,a,l;const i=tt(t),s=e.sender.name?e.sender.name.split(" ").map(c=>c[0]).join("").toUpperCase().slice(0,2):"U";return f.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:f.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%]`,children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:s}),f.jsxs("div",{className:`
186
155
  relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
187
- ${n?`${((o=r.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=r.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
188
- ${s?"shimmer":""}
156
+ ${n?`${((o=i.chatMessage)==null?void 0:o.own)||"bg-blue-500 text-white"} rounded-br-md`:`${((a=i.chatMessage)==null?void 0:a.other)||"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white"} rounded-bl-md`}
157
+ ${r?"shimmer":""}
189
158
  transition-all duration-200 group-hover:scale-[1.02]
190
- `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[l.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:s&&!n?l.jsx(J1,{text:e.content,isComplete:!s,isRealTimeStream:((c=e.metadata)==null?void 0:c.streaming)===!0,speed:35}):e.content}),l.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function ex({onToggleCamera:e,onToggleScreenShare:t,onToggleChat:n,onEndCall:s,onBack:r,theme:i,cameraEnabled:o,screenShareEnabled:a,chatOpen:c,isCameraLoading:d,isScreenShareLoading:u,disabled:f}){const h=_e(i);return l.jsxs("div",{className:`flex items-center justify-center gap-3 p-4 ${h.video.controlsBackground}`,children:[l.jsx("button",{onClick:e,disabled:f||d,className:`p-3 rounded-full transition-all duration-200 ${o?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Turn off camera":"Turn on camera",children:d?l.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?l.jsx($e.Camera,{className:"w-5 h-5"}):l.jsx($e.CameraOff,{className:"w-5 h-5"})}),l.jsx("button",{onClick:t,disabled:f||u,className:`p-3 rounded-full transition-all duration-200 ${a?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:a?"Stop screen share":"Share screen",children:u?l.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):a?l.jsx($e.MonitorOff,{className:"w-5 h-5"}):l.jsx($e.Monitor,{className:"w-5 h-5"})}),l.jsx("button",{onClick:n,disabled:f,className:`relative p-3 rounded-full transition-all duration-200 ${c?h.video.controlEnabled:h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:c?"Hide chat":"Show chat & transcription",children:l.jsx($e.MessageCircle,{className:"w-5 h-5"})}),s&&l.jsx("button",{onClick:s,disabled:f,className:`p-3 rounded-full transition-all duration-200 ${h.video.endCall} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:l.jsx($e.PhoneOff,{className:"w-5 h-5"})}),r&&l.jsx("button",{onClick:r,disabled:f,className:`p-3 rounded-full transition-all duration-200 ${h.video.controlDisabled} ${f?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"Back",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 19l-7-7m0 0l7-7m-7 7h18"})})})]})}function il({trackRef:e,participant:t,isLocal:n=!1,className:s="",theme:r}){var c;const i=_e(r),o=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return l.jsxs("div",{className:`relative rounded-lg overflow-hidden ${i.video.tile} ${s}`,children:[a?l.jsx(Ke.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):l.jsx("div",{className:`w-full h-full flex items-center justify-center ${i.video.placeholder}`,children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${i.video.avatar}`,children:l.jsx($e.User,{className:"w-8 h-8"})}),l.jsx("p",{className:"text-sm opacity-80",children:o}),l.jsx("p",{className:"text-xs opacity-60",children:"Camera off"})]})}),l.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${i.video.nameOverlay}`,children:o}),((c=e==null?void 0:e.publication)==null?void 0:c.isMuted)&&l.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${i.video.mutedIndicator}`,children:l.jsx($e.CameraOff,{className:"w-4 h-4"})})]})}function tx({trackRefs:e,participants:t,theme:n,localParticipant:s}){const r=e.find(u=>u.source===K.Track.Source.Camera&&u.participant===s),i=e.filter(u=>u.participant!==s),o=e.length,a=o<=1?1:o<=4?2:3,c="grid gap-2 h-full",d={gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoRows:"minmax(0, 1fr)"};return l.jsxs("div",{className:c,style:d,children:[r&&s&&l.jsx(il,{trackRef:r,participant:s,isLocal:!0,theme:n,className:"min-h-0"}),i.map((u,f)=>{var h;return l.jsx(il,{trackRef:u,participant:u.participant,isLocal:!1,theme:n,className:"min-h-0"},((h=u.publication)==null?void 0:h.trackSid)||f)}),o===0&&l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsxs("div",{className:"text-center",children:[l.jsx($e.Users,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),l.jsx("p",{className:"text-lg opacity-70",children:"Starting your video call..."})]})})]})}function nx({client:e,theme:t="vox",onBack:n,disabled:s=!1,displayType:r,onEndCall:i}){var O,q,Y,U,re,$;const o=_e(t),[a,c]=g.useState(!1),[d,u]=g.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[f,h]=g.useState(!1),[p,x]=g.useState(new Set),m=g.useRef(null),b=g.useRef(null),[S,C]=g.useState(!0),T=id(e),{videoTrackRefs:k}=Lp(e),v=g.useMemo(()=>e.getRemoteParticipants(),[e,T]),j=Mn(e,"camera"),V=Mn(e,"screenShare"),[E,_]=g.useState(null),y=(O=e==null?void 0:e.getCurrentAgentInfo)==null?void 0:O.call(e),W=((y==null?void 0:y.name)||"AI Assistant").split(" ").map(I=>I[0]).join("").toUpperCase().slice(0,2),te=g.useCallback(()=>{if(b.current){const{scrollTop:I,scrollHeight:L,clientHeight:N}=b.current;return L-I-N<100}return!0},[]),ue=g.useCallback(()=>{const I=te();C(I)},[te]),ie=g.useCallback((I=!1)=>{if(S&&b.current){const L=b.current;I?L.scrollTop=L.scrollHeight:L.scrollTo({top:L.scrollHeight,behavior:"smooth"})}},[S]);g.useEffect(()=>{if(!e)return;const I=F=>{console.log("VideoView: Received message:",F),F.sender.type==="agent"&&h(!1),u(se=>{var Z;if(se.some(G=>G.id===F.id))return se;if(F.sender.type==="agent"&&(x(G=>new Set(G).add(F.id)),!((Z=F.metadata)!=null&&Z.streaming))){const G=F.content.length*35+1e3;setTimeout(()=>{x(de=>{const ae=new Set(de);return ae.delete(F.id),ae})},G)}return[...se,F]}),setTimeout(()=>{S&&ie(!0)},0)},L=F=>{var se;console.log("VideoView: Updated message:",F),u(A=>A.map(Z=>Z.id===F.id?{...F}:Z)),setTimeout(()=>{S&&ie(!0)},0),(se=F.metadata)!=null&&se.streaming||x(A=>{const Z=new Set(A);return Z.delete(F.id),Z})},N=F=>{var se;console.log("VideoView: Sent message:",F),((se=F.metadata)==null?void 0:se.topic)!=="lk.transcription"&&(u(A=>A.some(G=>G.id===F.id)?A:[...A,F]),setTimeout(()=>{S&&ie(!0)},0))};return e.on("chat.message.received",I),e.on("chat.message.updated",L),e.on("chat.message.sent",N),()=>{e.off("chat.message.received",I),e.off("chat.message.updated",L),e.off("chat.message.sent",N)}},[e,S,ie]),g.useEffect(()=>{if(!e)return;const I=()=>{console.log("VideoView: Agent is thinking"),h(!0)},L=()=>{console.log("VideoView: Agent is speaking"),h(!1)};return e.on("agent.thinking",I),e.on("agent.speaking",L),()=>{e.off("agent.thinking",I),e.off("agent.speaking",L)}},[e]);const fe=g.useCallback(async()=>{j.pending||await j.toggle()},[j]),ne=g.useCallback(async()=>{V.pending||await V.toggle()},[V]),R=g.useCallback(()=>{c(I=>!I)},[]),B=g.useCallback(()=>{i?i():n&&n()},[i,n]);g.useCallback(async I=>{var L;try{await((L=e==null?void 0:e.sendChatMessage)==null?void 0:L.call(e,I))}catch(N){console.error("Failed to send message:",N)}},[e]),g.useEffect(()=>{a&&d.length>0&&setTimeout(()=>{S&&ie(!0)},100)},[d.length,a,S,ie]);const M=g.useMemo(()=>d.filter(I=>I.content&&I.content.trim()!==""&&I.content.trim()!=="..."),[d]);return g.useEffect(()=>{if(!e)return;const I=L=>{console.log("📺 Video: Interactive UI state updated:",L),_(L)};return e.on("interactive.ui.update",I),e.on("interactive.ui.show",I),()=>{e.off("interactive.ui.update",I),e.off("interactive.ui.show",I)}},[e]),l.jsxs("div",{className:`flex flex-col h-full ${o.video.container} relative`,children:[l.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o.video.header}`,children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:`w-3 h-3 rounded-full ${o.video.statusDot}`}),l.jsx("span",{className:"font-medium",children:"Video Call"}),l.jsxs("span",{className:"text-sm opacity-70",children:[v.length+1," participant",v.length!==0?"s":""]})]}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsx("button",{className:`p-2 rounded-lg transition-colors ${o.video.headerButton}`,title:"Layout options",children:l.jsx($e.LayoutGrid,{className:"w-4 h-4"})})})]}),!a&&l.jsx("div",{className:"flex-1 p-4 min-h-0",children:l.jsx(tx,{trackRefs:k,participants:v,localParticipant:T==null?void 0:T.localParticipant,theme:t})}),l.jsx(Et,{mode:"wait",children:a&&l.jsxs(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"},className:Q("absolute inset-0 w-full h-full flex flex-col z-20",t==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm"),children:[l.jsx("div",{className:Q("flex-shrink-0 px-4 py-3 border-b",r==="fullscreen"?"px-8":"px-5",((q=o.chatHeader)==null?void 0:q.container)||"border-gray-200 dark:border-gray-700"),children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:Q("font-semibold text-lg",((Y=o.text)==null?void 0:Y.primary)||"text-gray-900 dark:text-white"),children:"Chat & Transcription"}),l.jsxs("p",{className:Q("text-sm",((U=o.text)==null?void 0:U.muted)||"text-gray-600 dark:text-gray-400"),children:[M.length," messages"]})]}),l.jsx("button",{onClick:()=>c(!1),className:Q("p-2 rounded-lg transition-colors",o.video.headerButton||"hover:bg-gray-100 dark:hover:bg-gray-800"),title:"Close chat",children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),l.jsxs("div",{className:Q("flex-1 flex flex-col min-h-0",r==="fullscreen"?"px-8":"px-5"),children:[l.jsxs("div",{ref:b,className:Q("flex-1 flex flex-col h-full overflow-y-auto scrollbar-hide py-4"),style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"120px"},onScroll:ue,children:[M.length===0&&l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx(le.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:W}),l.jsx("p",{className:Q("text-lg font-medium mb-2",((re=o.text)==null?void 0:re.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),l.jsx("p",{className:Q("text-sm",(($=o.text)==null?void 0:$.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),M.length>0&&l.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:l.jsxs("div",{className:"space-y-3",children:[l.jsx(Et,{mode:"popLayout",children:M.map((I,L)=>l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:L*.02},layout:!0,children:l.jsx(Q1,{message:I,theme:t,isOwn:I.sender.type==="participant",isStreaming:p.has(I.id)})},I.id||`message-${L}`))}),f&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:M.length*.1},className:"flex w-full justify-start mb-4 px-1",children:l.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[l.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:W}),l.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:l.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(I=>l.jsx(le.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:I*.2,ease:"easeInOut"}},I))})})]})}),l.jsx("div",{ref:m})]})})]}),!S&&M.length>0&&l.jsx(le.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{C(!0),ie(!1)},className:`absolute right-6 bottom-20 z-10 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105 ${t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"}`,"aria-label":"Scroll to bottom",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]})]})}),E&&!a&&l.jsx(le.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute inset-4 z-10",children:l.jsx(un,{interaction:E,onDismiss:()=>_(null),theme:t})}),l.jsx(ex,{onToggleCamera:fe,onToggleScreenShare:ne,onToggleChat:R,onEndCall:B,onBack:n,theme:t,cameraEnabled:j.enabled,screenShareEnabled:V.enabled,chatOpen:a,isCameraLoading:j.pending,isScreenShareLoading:V.pending,disabled:s})]})}function as({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:l.jsx(Ad,{})})}function yr({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:l.jsx(Ed,{})})}function xr({onClick:e,disabled:t,theme:n}){const s=_e(n);return l.jsx("button",{className:s.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:l.jsx(jd,{})})}function sx({prompts:e,theme:t}){const n=_e(t),[s,r]=w.useState(0);return w.useEffect(()=>{const i=setInterval(()=>{r(o=>(o+1)%e.length)},3e3);return()=>clearInterval(i)},[e.length]),l.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((i,o)=>l.jsx("div",{className:`
159
+ `,style:{wordWrap:"break-word",overflowWrap:"break-word"},children:[f.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-sm",children:r&&!n?f.jsx(NE,{text:e.content,isComplete:!r,isRealTimeStream:((l=e.metadata)==null?void 0:l.streaming)===!0,speed:35}):e.content}),f.jsx("div",{className:"text-xs mt-1",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function RE({onToggleMicrophone:e,onToggleCamera:t,onToggleScreenShare:n,onToggleChat:r,onEndCall:i,theme:s,microphoneEnabled:o,cameraEnabled:a,screenShareEnabled:l,chatOpen:c,isMicrophoneLoading:u,isCameraLoading:d,isScreenShareLoading:h,disabled:m}){const g=tt(s);return f.jsxs("div",{className:ce("flex items-center justify-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",s==="light"?"bg-white/95 border-gray-200":"bg-gray-900/90 border-gray-700"),children:[f.jsx("button",{onClick:e,disabled:m||u,className:`p-3 rounded-full transition-all duration-200 ${o?g.video.controlEnabled:g.video.controlDisabled} ${m?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Mute microphone":"Unmute microphone",children:u?f.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):o?f.jsx(Ze.Mic,{className:"w-5 h-5"}):f.jsx(Ze.MicOff,{className:"w-5 h-5"})}),f.jsx("button",{onClick:t,disabled:m||d,className:`p-3 rounded-full transition-all duration-200 ${a?g.video.controlEnabled:g.video.controlDisabled} ${m?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:a?"Turn off camera":"Turn on camera",children:d?f.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):a?f.jsx(Ze.Camera,{className:"w-5 h-5"}):f.jsx(Ze.CameraOff,{className:"w-5 h-5"})}),f.jsx("button",{onClick:n,disabled:m||h,className:`p-3 rounded-full transition-all duration-200 ${l?g.video.controlEnabled:g.video.controlDisabled} ${m?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:l?"Stop screen share":"Share screen",children:h?f.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):f.jsx(Ze.Monitor,{className:"w-5 h-5"})}),f.jsx("button",{onClick:r,disabled:m,className:`relative p-3 rounded-full transition-all duration-200 ${c?g.video.controlEnabled:g.video.controlDisabled} ${m?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:c?"Hide chat":"Show chat & transcription",children:f.jsx(Ze.MessageCircle,{className:"w-5 h-5"})}),i&&f.jsx("button",{onClick:i,disabled:m,className:`p-3 rounded-full transition-all duration-200 ${g.video.endCall} ${m?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:f.jsx(Ze.PhoneOff,{className:"w-5 h-5"})})]})}function td({trackRef:e,participant:t,isLocal:n=!1,className:r="",theme:i}){var l;const s=tt(i),o=(t==null?void 0:t.name)||(t==null?void 0:t.identity)||(n?"You":"Participant"),a=(e==null?void 0:e.publication)&&!e.publication.isMuted;return f.jsxs("div",{className:`relative rounded-lg overflow-hidden ${s.video.tile} ${r}`,children:[a?f.jsx(dt.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):f.jsx("div",{className:`w-full h-full flex items-center justify-center ${s.video.placeholder}`,children:f.jsx("div",{className:"text-center",children:f.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${s.video.avatar}`,children:f.jsx(Ze.User,{className:"w-8 h-8"})})})}),f.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${s.video.nameOverlay}`,children:o}),((l=e==null?void 0:e.publication)==null?void 0:l.isMuted)&&f.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${s.video.mutedIndicator}`,children:f.jsx(Ze.CameraOff,{className:"w-4 h-4"})})]})}function VE({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:i,onEndCall:s}){var G,fe,R,re,ne,me;const o=tt(t),[a,l]=x.useState(!1),[c,u]=x.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[d,h]=x.useState(!1),[m,g]=x.useState(new Set),p=x.useRef(null),b=x.useRef(null),[v,k]=x.useState(!0),S=x.useRef(null),[A,T]=x.useState(64);x.useLayoutEffect(()=>{const Z=S.current;if(!Z)return;const pe=()=>T(Z.offsetHeight||64);pe();const Ae=new ResizeObserver(()=>pe());return Ae.observe(Z),wa(zt,"resize",pe),()=>{Ae.disconnect(),ka(zt,"resize",pe)}},[]);const C=ah(e),{screenShareTrackRefs:N}=K1(e),P=x.useMemo(()=>e.getRemoteParticipants(),[e,C]),L=Hn(e,"microphone"),y=Hn(e,"camera"),M=Hn(e,"screenShare"),[D,B]=x.useState(null),H=(G=e==null?void 0:e.getCurrentAgentInfo)==null?void 0:G.call(e),de=((H==null?void 0:H.name)||"AI Assistant").split(" ").map(Z=>Z[0]).join("").toUpperCase().slice(0,2),ie=x.useCallback(()=>{if(b.current){const{scrollTop:Z,scrollHeight:pe,clientHeight:Ae}=b.current;return pe-Z-Ae<100}return!0},[]),F=x.useCallback(()=>{const Z=ie();k(Z)},[ie]),W=x.useCallback((Z=!1)=>{if(v&&b.current){const pe=b.current;Z?pe.scrollTop=pe.scrollHeight:pe.scrollTo({top:pe.scrollHeight,behavior:"smooth"})}},[v]);x.useEffect(()=>{if(!e)return;const Z=xe=>{console.log("VideoView: Received message:",xe),xe.sender.type==="agent"&&h(!1),u(Ne=>{var He;if(Ne.some(rt=>rt.id===xe.id))return Ne;if(xe.sender.type==="agent"&&(g(rt=>new Set(rt).add(xe.id)),!((He=xe.metadata)!=null&&He.streaming))){const rt=xe.content.length*35+1e3;setTimeout(()=>{g(Gt=>{const Lt=new Set(Gt);return Lt.delete(xe.id),Lt})},rt)}return[...Ne,xe]}),setTimeout(()=>{v&&W(!0)},0)},pe=xe=>{var Ne;console.log("VideoView: Updated message:",xe),u(ze=>ze.map(He=>He.id===xe.id?{...xe}:He)),setTimeout(()=>{v&&W(!0)},0),(Ne=xe.metadata)!=null&&Ne.streaming||g(ze=>{const He=new Set(ze);return He.delete(xe.id),He})},Ae=xe=>{var Ne;console.log("VideoView: Sent message:",xe),((Ne=xe.metadata)==null?void 0:Ne.topic)!=="lk.transcription"&&(u(ze=>ze.some(rt=>rt.id===xe.id)?ze:[...ze,xe]),setTimeout(()=>{v&&W(!0)},0))};return e.on("chat.message.received",Z),e.on("chat.message.updated",pe),e.on("chat.message.sent",Ae),()=>{e.off("chat.message.received",Z),e.off("chat.message.updated",pe),e.off("chat.message.sent",Ae)}},[e,v,W]),x.useEffect(()=>{if(!e)return;const Z=()=>{console.log("VideoView: Agent is thinking"),h(!0)},pe=()=>{console.log("VideoView: Agent is speaking"),h(!1)};return e.on("agent.thinking",Z),e.on("agent.speaking",pe),()=>{e.off("agent.thinking",Z),e.off("agent.speaking",pe)}},[e]);const w=x.useCallback(async()=>{y.pending||await y.toggle()},[y]),z=x.useCallback(async()=>{M.pending||await M.toggle()},[M]),oe=x.useCallback(()=>{l(Z=>!Z)},[]),E=x.useCallback(()=>{s?s():n&&n()},[s,n]);x.useCallback(async Z=>{var pe;try{await((pe=e==null?void 0:e.sendChatMessage)==null?void 0:pe.call(e,Z))}catch(Ae){console.error("Failed to send message:",Ae)}},[e]),x.useEffect(()=>{a&&c.length>0&&setTimeout(()=>{v&&W(!0)},100)},[c.length,a,v,W]);const U=x.useMemo(()=>c.filter(Z=>Z.content&&Z.content.trim()!==""&&Z.content.trim()!=="..."),[c]);x.useEffect(()=>{if(!e)return;const Z=pe=>{console.log("📺 Video: Interactive UI state updated:",pe),B(pe)};return e.on("interactive.ui.update",Z),e.on("interactive.ui.show",Z),()=>{e.off("interactive.ui.update",Z),e.off("interactive.ui.show",Z)}},[e]);const se=C==null?void 0:C.localParticipant,$=x.useMemo(()=>(e?e.getCameraTrackRefs():[]).find(Z=>Z.participant===se),[e,se]),Q=x.useMemo(()=>(e?e.getCameraTrackRefs():[]).filter(Z=>Z.participant!==se),[e,se])[0],V=x.useMemo(()=>(N||[]).find(Z=>Z.participant===se),[N,se]);return f.jsxs("div",{className:`flex flex-col h-full ${o.video.container} relative`,children:[f.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${o.video.header}`,children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:`w-3 h-3 rounded-full ${o.video.statusDot}`}),f.jsx("span",{className:"font-medium",children:"Video Call"}),f.jsxs("span",{className:"text-sm opacity-70",children:[P.length+1," participant",P.length!==0?"s":""]})]}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsx("button",{className:`p-2 rounded-lg transition-colors ${o.video.headerButton}`,title:"Layout options",children:f.jsx(Ze.LayoutGrid,{className:"w-4 h-4"})})})]}),f.jsx("div",{className:"relative flex-1 min-h-0",children:!a&&f.jsx("div",{className:"p-4 min-h-0 h-full",children:f.jsxs("div",{className:"relative w-full h-full rounded-lg overflow-hidden",children:[Q?f.jsx(td,{trackRef:Q,participant:Q.participant,isLocal:!1,theme:t,className:"w-full h-full"}):f.jsx("div",{className:"w-full h-full flex items-center justify-center",children:f.jsxs("div",{className:"text-center",children:[f.jsx(Ze.Users,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),f.jsx("p",{className:"text-lg opacity-70",children:"Waiting for agent video..."})]})}),V&&f.jsx("div",{className:"absolute bottom-4 left-0 sm:left-0 z-10 w-32 sm:w-36 h-20 sm:h-24 rounded-lg overflow-hidden shadow-xl border border-white/20",children:f.jsxs("div",{className:"relative w-full h-full bg-black/40",children:[f.jsx(dt.VideoTrack,{trackRef:V,className:"w-full h-full object-contain"}),f.jsx("div",{className:`absolute top-1 left-1 px-1.5 py-0.5 rounded text-xs ${o.video.nameOverlay}`,children:f.jsxs("span",{className:"inline-flex items-center gap-1",children:[f.jsx(Ze.Monitor,{className:"w-3 h-3"}),f.jsx("span",{className:"text-xs",children:"Sharing"})]})})]})}),$&&f.jsx("div",{className:"absolute bottom-4 right-0 w-32 sm:w-36 h-20 sm:h-24 rounded-lg overflow-hidden shadow-xl border border-white/20",children:f.jsx(td,{trackRef:$,participant:se||void 0,isLocal:!0,theme:t,className:"w-full h-full"})})]})})}),f.jsx(en,{mode:"wait",children:a&&f.jsxs(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"},className:ce("absolute left-0 right-0 top-0 flex flex-col z-20",t==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm"),style:{bottom:`${A}px`},children:[f.jsx("div",{className:ce("flex-shrink-0 px-4 py-3 border-b",i==="fullscreen"?"px-8":"px-5",((fe=o.chatHeader)==null?void 0:fe.container)||"border-gray-200 dark:border-gray-700"),children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h3",{className:ce("font-semibold text-lg",((R=o.text)==null?void 0:R.primary)||"text-gray-900 dark:text-white"),children:"Chat & Transcription"}),f.jsxs("p",{className:ce("text-sm",((re=o.text)==null?void 0:re.muted)||"text-gray-600 dark:text-gray-400"),children:[U.length," messages"]})]}),f.jsx("button",{onClick:()=>l(!1),className:ce("p-2 rounded-lg transition-colors",o.video.headerButton||"hover:bg-gray-100 dark:hover:bg-gray-800"),title:"Close chat",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),f.jsxs("div",{className:ce("flex-1 flex flex-col min-h-0",i==="fullscreen"?"px-8":"px-5"),children:[f.jsxs("div",{ref:b,className:ce("flex-1 flex flex-col h-full overflow-y-auto scrollbar-hide py-4"),style:{scrollbarWidth:"none",scrollBehavior:"smooth",paddingBottom:"16px"},onScroll:F,children:[U.length===0&&f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsxs("div",{className:"text-center",children:[f.jsx(ge.div,{transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-16 h-16 rounded-full bg-gradient-to-br from-blue-500 to-purple-600 flex items-center justify-center text-white font-bold text-xl mb-6 shadow-xl mx-auto",children:de}),f.jsx("p",{className:ce("text-lg font-medium mb-2",((ne=o.text)==null?void 0:ne.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),f.jsx("p",{className:ce("text-sm",((me=o.text)==null?void 0:me.muted)||"text-gray-600 dark:text-gray-400"),children:"Your conversation will appear here"})]})}),U.length>0&&f.jsx("div",{className:"w-full max-w-5xl mx-auto space-y-3 py-4 flex-1 flex flex-col justify-end",children:f.jsxs("div",{className:"space-y-3",children:[f.jsx(en,{mode:"popLayout",children:U.map((Z,pe)=>f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3,ease:"easeOut",delay:pe*.02},layout:!0,children:f.jsx(IE,{message:Z,theme:t,isOwn:Z.sender.type==="participant",isStreaming:m.has(Z.id)})},Z.id||`message-${pe}`))}),d&&f.jsx(ge.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:U.length*.1},className:"flex w-full justify-start mb-4 px-1",children:f.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%]",children:[f.jsx("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t==="light"?"bg-gradient-to-br from-blue-500 to-purple-600":"bg-gradient-to-br from-gray-600 to-gray-700"}`,children:de}),f.jsx("div",{className:"relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-white rounded-bl-md transition-all duration-200 group-hover:scale-[1.02]",style:{wordWrap:"break-word",overflowWrap:"break-word",minWidth:48},children:f.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(Z=>f.jsx(ge.span,{className:"w-1.5 h-1.5 bg-current rounded-full mx-0.5",animate:{y:[0,-4,0],opacity:[.4,1,.4],scale:[.8,1,.8]},transition:{duration:.8,repeat:1/0,repeatType:"mirror",delay:Z*.2,ease:"easeInOut"}},Z))})})]})}),f.jsx("div",{ref:p})]})})]}),!v&&U.length>0&&f.jsx(ge.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{k(!0),W(!1)},className:ce("absolute right-6 z-30 p-3 rounded-full shadow-lg backdrop-blur-sm border transition-all duration-200 hover:scale-105",t==="light"?"bg-white/90 text-gray-600 border-gray-200 hover:bg-white hover:text-gray-800":"bg-gray-800/90 text-gray-300 border-gray-700 hover:bg-gray-700 hover:text-white"),style:{bottom:16},"aria-label":"Scroll to bottom",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})})]})]})}),f.jsx("div",{ref:S,className:"relative z-30 mt-auto",children:f.jsx(RE,{onToggleMicrophone:()=>L.toggle(),onToggleCamera:w,onToggleScreenShare:z,onToggleChat:oe,onEndCall:E,theme:t,microphoneEnabled:L.enabled,cameraEnabled:y.enabled,screenShareEnabled:M.enabled,chatOpen:a,isMicrophoneLoading:L.pending,isCameraLoading:y.pending,isScreenShareLoading:M.pending,disabled:r})})]})}function oi({onClick:e,disabled:t,theme:n}){const r=tt(n);return f.jsx("button",{className:r.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:f.jsx(jh,{})})}function Uo({onClick:e,disabled:t,theme:n}){const r=tt(n);return f.jsx("button",{className:r.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:f.jsx(Ah,{})})}function Wo({onClick:e,disabled:t,theme:n}){const r=tt(n);return f.jsx("button",{className:r.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:f.jsx(Ph,{})})}function DE({prompts:e,theme:t}){const n=tt(t),[r,i]=j.useState(0);return j.useEffect(()=>{const s=setInterval(()=>{i(o=>(o+1)%e.length)},3e3);return()=>clearInterval(s)},[e.length]),f.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((s,o)=>f.jsx("div",{className:`
191
160
  ${n.promptSlider}
192
- ${o===s?"opacity-100":"opacity-0"}
161
+ ${o===r?"opacity-100":"opacity-0"}
193
162
  whitespace-pre-line break-words
194
- `,style:{minHeight:"2.5rem",display:o===s?"block":"none"},children:i},o))})}function rx({statusMessage:e,theme:t}){const n=_e(t);return l.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[l.jsx("div",{className:n.statusIndicator}),l.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const Md=w.forwardRef(({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:s,prompts:r=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:i="Agent is ready",title:o="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:c="vox",modalities:d=["voice","chat","video"]},u)=>{const f=_e(c),h=d.includes("voice"),p=d.includes("chat"),x=d.includes("video"),m=[h,p,x].filter(Boolean).length;return l.jsxs("div",{className:"flex p-8 flex-col items-center h-full justify-center w-full relative","aria-disabled":e,style:{background:"transparent"},children:[l.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[l.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:f.pulseRings.ring1}),l.jsx("div",{className:f.pulseRings.ring2,style:{animationDelay:"0.5s"}}),l.jsx("div",{className:f.pulseRings.ring3,style:{animationDelay:"1s"}})]}),l.jsx("div",{className:"relative z-10 flex items-center justify-center",children:h&&p&&x?l.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[l.jsx(as,{onClick:t,disabled:e,theme:c}),l.jsx(yr,{onClick:n,disabled:e,theme:c}),l.jsx(xr,{onClick:s||t,disabled:e,theme:c})]}):m>1?l.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&l.jsx(as,{onClick:t,disabled:e,theme:c}),p&&l.jsx(yr,{onClick:n,disabled:e,theme:c}),x&&s&&l.jsx(xr,{onClick:s,disabled:e,theme:c})]}):l.jsx("div",{className:"flex items-center justify-center",children:h?l.jsx(as,{onClick:t,disabled:e,theme:c}):p?l.jsx(yr,{onClick:n,disabled:e,theme:c}):x&&s?l.jsx(xr,{onClick:s,disabled:e,theme:c}):l.jsx(as,{onClick:t,disabled:e,theme:c})})})]}),l.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[l.jsx("h3",{className:`text-xl font-semibold mb-2 ${f.text.accent}`,children:o}),l.jsx("p",{className:`text-sm leading-relaxed px-4 ${f.text.secondary}`,children:a}),m>1&&l.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[h&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(Ad,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Voice"})]}),p&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(Ed,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Chat"})]}),x&&l.jsxs("div",{className:"flex flex-col items-center gap-1",children:[l.jsx(jd,{className:"w-4 h-4"}),l.jsx("span",{className:f.text.muted,children:"Video"})]})]})]}),l.jsx(sx,{prompts:r,theme:c}),l.jsx(rx,{statusMessage:i,theme:c})]})});Md.displayName="Welcome";class Wo extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("VoxketWidget Error:",t,n)}render(){if(this.state.hasError){if(this.props.fallback){const t=this.props.fallback;return g.createElement(t,{error:this.state.error})}return g.createElement("div",{style:{padding:"20px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"}},"VoxketWidget encountered an error. Please check the console for details.")}return this.props.children}}function Vd({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:s=!0,enableLocalStorage:r=!0,voxketSessionId:i}={}){const[o,a]=g.useState(null),[c,d]=g.useState([]),[u,f]=g.useState(null),[h,p]=g.useState([]),x=g.useCallback((C,T)=>{const k={timestamp:new Date,event:C,data:T,sessionId:o==null?void 0:o.sessionId,participantId:u==null?void 0:u.identity};if(d(v=>[...v,k]),r){const v=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");v.push(k),localStorage.setItem("voxket-session-logs",JSON.stringify(v))}return k},[o==null?void 0:o.sessionId,u==null?void 0:u.identity,s,r]);g.useEffect(()=>{if(!e)return;const C=()=>{const y=i||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,D=new Date,W={sessionId:y,startTime:D,totalMessages:0,connectionIssues:0,participantCount:h.length,events:[]};a(W),x("SESSION_STARTED",{sessionId:y,startTime:D}),n==null||n(y)},T=()=>{if(o){const y=new Date,D=y.getTime()-o.startTime.getTime(),W={...o,endTime:y,duration:D,events:c};x("SESSION_ENDED",{sessionId:o.sessionId,duration:`${Math.round(D/1e3)}s`,totalMessages:o.totalMessages,connectionIssues:o.connectionIssues}),t==null||t(W),a(null),d([])}},k=y=>{x("CONNECTION_STATE_CHANGED",{state:y}),y===K.ConnectionState.Reconnecting&&o&&(a(D=>D?{...D,connectionIssues:D.connectionIssues+1}:null),x("CONNECTION_ISSUE",{type:"reconnecting"}))},v=y=>{x("TRACK_PUBLISHED",{trackKind:y.kind,trackSource:y.source})},j=y=>{x("TRACK_UNPUBLISHED",{trackKind:y.kind,trackSource:y.source})},V=(y,D)=>{o&&a(W=>W?{...W,totalMessages:W.totalMessages+1}:null),x("DATA_RECEIVED",{participantId:D==null?void 0:D.identity,dataSize:y.length})},E=y=>{x("PARTICIPANT_CONNECTED",{participantId:y.identity,participantName:y.name}),p(D=>[...D,y]),o&&a(D=>D?{...D,participantCount:D.participantCount+1}:null)},_=y=>{x("PARTICIPANT_DISCONNECTED",{participantId:y.identity,participantName:y.name}),p(D=>D.filter(W=>W.identity!==y.identity))};return e.localParticipant&&f(e.localParticipant),e.on(K.RoomEvent.Connected,C),e.on(K.RoomEvent.Disconnected,T),e.on(K.RoomEvent.ConnectionStateChanged,k),e.on(K.RoomEvent.TrackPublished,v),e.on(K.RoomEvent.TrackUnpublished,j),e.on(K.RoomEvent.DataReceived,V),e.on(K.RoomEvent.ParticipantConnected,E),e.on(K.RoomEvent.ParticipantDisconnected,_),()=>{e.off(K.RoomEvent.Connected,C),e.off(K.RoomEvent.Disconnected,T),e.off(K.RoomEvent.ConnectionStateChanged,k),e.off(K.RoomEvent.TrackPublished,v),e.off(K.RoomEvent.TrackUnpublished,j),e.off(K.RoomEvent.DataReceived,V),e.off(K.RoomEvent.ParticipantConnected,E),e.off(K.RoomEvent.ParticipantDisconnected,_)}},[e,o,c,h.length,x,t,n]);const m=g.useCallback(()=>r?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):c,[c,r]),b=g.useCallback(()=>{r&&localStorage.removeItem("voxket-session-logs"),d([])},[r]),S=g.useCallback(()=>{const C=m(),T=JSON.stringify(C,null,2),k="data:application/json;charset=utf-8,"+encodeURIComponent(T),v=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,j=document.createElement("a");j.setAttribute("href",k),j.setAttribute("download",v),j.click()},[m]);return{sessionMetrics:o,sessionLogs:c,logEvent:x,getSessionLogs:m,clearSessionLogs:b,exportSessionLogs:S}}class Zo{constructor(){Ne(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const s=(...r)=>{this.off(t,s),n(...r)};return this.on(t,s)}off(t,n){const s=this.listeners[t];if(!s)return;const r=s.indexOf(n);r>-1&&s.splice(r,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const s=this.listeners[t];if(!s)return;const r=[...s];for(const i of r)try{i(...n)}catch(o){console.error(`Error in event listener for ${String(t)}:`,o)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class Pd{constructor(t){Ne(this,"plugins",new Map);Ne(this,"installedPlugins",new Set);Ne(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const s=this.plugins.get(t);if(!s)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(s.dependencies)for(const i of s.dependencies)this.installedPlugins.has(i)||await this.install(i);const r={...this.context,config:{...s.config,...n}};s.install&&await s.install(r),this.installedPlugins.add(t),this.setupPluginEvents(s,r)}async uninstall(t){var s;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[r,i]of this.plugins)if(this.installedPlugins.has(r)&&((s=i.dependencies)!=null&&s.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${r}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",s=>{t.onSessionStart(n,s.id)}),t.onSessionEnd&&n.on("session.ended",s=>{t.onSessionEnd(n,s.id)}),t.onAgentResponse&&n.on("agent.response",s=>{t.onAgentResponse(n,s)})}}function ox(e){return e}function Go(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async s=>{n.onActivate&&await n.onActivate(s)},uninstall:async s=>{n.onDeactivate&&await n.onDeactivate(s)},onAgentResponse:n.onMessage}}const ix={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},ax={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...s)=>(console.log(`[Debug] Event: ${String(n)}`,s),t(n,...s))}},lx={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Rd=w.createContext(null);function hs({config:e,children:t,autoConnect:n=!1,client:s}){const[r,i]=w.useState(null),[o,a]=w.useState(!1),[c,d]=w.useState(!1),[u,f]=w.useState(null),[h,p]=w.useState(null),[x,m]=w.useState("idle"),[b,S]=w.useState(null),[C,T]=w.useState([]),[k,v]=w.useState([]),[j,V]=w.useState([]);w.useEffect(()=>{const B=s||new Wn(e);i(B);const M=E(B);return n&&!s&&_(B),()=>{M(),s||B.disconnect().catch(console.error)}},[e,n,s]);const E=B=>{const M=()=>{d(!0),f(null)},O=()=>{a(!0),d(!1),f(null)},q=()=>{a(!1),d(!1),p(null),m("idle"),T([]),v([]),V([])},Y=Z=>{f(Z),d(!1)},U=Z=>{p(Z),m(Z.state)},re=Z=>{m(Z),h&&p({...h,state:Z})},$=(Z,G)=>{p(null),m("idle"),S(G),T([]),v([]),V([])},I=Z=>{T(G=>[...G,Z])},L=Z=>{T(G=>G.filter(de=>de.id!==Z.id))},N=Z=>{v(G=>[...G,Z])},F=Z=>{v(G=>[...G,Z])},se=Z=>{console.log("📝 VoxketProvider: Received transcription:",Z),V(G=>G.find(ae=>ae.id===Z.id)?(console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:",Z.id),G):(console.log("📝 VoxketProvider: Adding new transcription:",Z.id),[...G,Z]))},A=()=>{console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"),v([]),V([])};return B.on("connection.connecting",M),B.on("connection.connected",O),B.on("connection.disconnected",q),B.on("connection.error",Y),B.on("session.created",U),B.on("session.state.changed",re),B.on("session.ended",$),B.on("participant.joined",I),B.on("participant.left",L),B.on("chat.message.received",N),B.on("chat.message.sent",F),B.on("transcription.received",se),B.on("chat.history.cleared",A),()=>{console.log("📝 VoxketProvider: Cleaning up event listeners"),B.off("connection.connecting",M),B.off("connection.connected",O),B.off("connection.disconnected",q),B.off("connection.error",Y),B.off("session.created",U),B.off("session.state.changed",re),B.off("session.ended",$),B.off("participant.joined",I),B.off("participant.left",L),B.off("chat.message.received",N),B.off("chat.message.sent",F),B.off("chat.history.cleared",A),B.off("transcription.received",se)}},_=async B=>{const M=B||r;if(M)try{await M.connect()}catch(O){console.error("Failed to connect:",O)}},R={client:r,isConnected:o,isConnecting:c,connectionError:u,currentSession:h,sessionState:x,sessionMetrics:b,participants:C,chatMessages:k,transcriptions:j,connect:()=>_(),disconnect:async()=>{if(r)try{await r.disconnect()}catch(B){console.error("Failed to disconnect:",B)}},createSession:async(B,M={})=>{if(!r)throw new Error("Client not initialized");const O={agentId:B,participantName:M.participantName||"User",metadata:M.metadata,modalities:M.modalities||["voice"]};return await r.createSession(O)},endSession:async()=>r?await r.endSession():null,sendChatMessage:async B=>{if(!r)throw new Error("Client not initialized");await r.sendChatMessage(B)},setMicrophoneEnabled:async B=>{if(!r)throw new Error("Client not initialized");await r.setMicrophoneEnabled(B)},setCameraEnabled:async B=>{if(!r)throw new Error("Client not initialized");await r.setCameraEnabled(B)},startScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.startScreenShare()},stopScreenShare:async()=>{if(!r)throw new Error("Client not initialized");await r.stopScreenShare()}};return l.jsx(Rd.Provider,{value:R,children:t})}function ft(){const e=w.useContext(Rd);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class cx extends Zo{constructor(n){super();Ne(this,"room",null);Ne(this,"registeredMethods",new Map);Ne(this,"activeInteractions",new Map);Ne(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,s,r="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const i={methodName:n,component:s,presentationMode:r};this.registeredMethods.set(n,i);try{this.room.registerRpcMethod(n,async o=>{console.log(`RpcManager: RPC method '${n}' called by ${o.callerIdentity}`),console.log("RpcManager: Payload:",o.payload),this.emit("rpc.method.called",{methodName:n,data:o});let a;console.log(`RpcManager: Current registration for '${n}':`,i);let c=o.responseTimeout||30;try{a=JSON.parse(o.payload)}catch{a=o.payload}try{const d=await this.awaitUserInteraction(n,s,r,a,c);return JSON.stringify(d)}catch(d){throw console.error(`RpcManager: Error in RPC method '${n}':`,d),d}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(o){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,o),o}}async awaitUserInteraction(n,s,r,i,o){return new Promise((a,c)=>{const d=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${o} seconds`);const u={didSuccess:(h,p)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,h),this.clearInteraction(d),this.currentInteraction=null;const x={success:!0,message:"User interaction completed successfully",data:h,timestamp:new Date,...p?{successView:p}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:x}),a(x)},didFail:h=>{console.log(`RpcManager: User interaction failed for method: ${n}`,h),this.clearInteraction(d);const p={success:!1,message:"User interaction failed",error:h,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:p}),a(p)},dismissView:()=>{var p;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(p=this.currentInteraction)==null?void 0:p.methodName),this.clearInteraction(d),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const h={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:h}),this.emit("rpc.interaction.completed",{methodName:n,response:h}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(h)},didTimeout:h=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(d),this.currentInteraction=null;const p={success:!0,message:`User interaction timed out after ${o} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...h?{timeoutView:h}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:p}),setTimeout(()=>{var x;((x=this.currentInteraction)==null?void 0:x.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(p)}},f=setTimeout(()=>{u.didTimeout&&u.didTimeout()},o);this.activeInteractions.set(d,{resolve:h=>a(JSON.parse(h)),reject:c,timeoutId:f}),this.currentInteraction={isVisible:!0,methodName:n,component:s,presentationMode:r,timeout:o,data:i,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:r}),setTimeout(async()=>{var h;if((h=this.currentInteraction)!=null&&h.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,i)}catch(p){console.error("RpcManager: Error loading data into component:",p),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const s=this.activeInteractions.get(n);s&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(s.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,s]of this.activeInteractions)clearTimeout(s.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class we extends Error{constructor(t,n,s){super(t),this.code=n,this.details=s,this.name="VoxketError"}}const Ct=new WeakSet,br=new WeakSet;class Wn extends Zo{constructor(n){super();Ne(this,"config");Ne(this,"room",null);Ne(this,"pluginManager");Ne(this,"rpcManager");Ne(this,"isConnected",!1);Ne(this,"currentSession",null);Ne(this,"connectionState",K.ConnectionState.Disconnected);Ne(this,"renderedComponents",new Map);Ne(this,"textStreamHandlersRegistered",!1);Ne(this,"currentAgentInfo",null);Ne(this,"chatMessages",[]);Ne(this,"activeTranscriptions",new Map);Ne(this,"isAgentConnected",!1);Ne(this,"agentState","idle");this.config=n,this.pluginManager=new Pd(this),this.rpcManager=new cx,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,s;this.isConnected=!0,(s=(n=this.config).onConnected)==null||s.call(n)}),this.on("connection.disconnected",n=>{var s,r;this.isConnected=!1,(r=(s=this.config).onDisconnected)==null||r.call(s,n)}),this.on("connection.error",n=>{var s,r;(r=(s=this.config).onError)==null||r.call(s,n)}),this.on("chat.message.received",n=>{var s,r;this.addChatMessage(n),(r=(s=this.config).onMessageReceived)==null||r.call(s,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var s,r;(r=(s=this.config).onTranscriptionReceived)==null||r.call(s,n)}),this.on("session.state.changed",n=>{var s,r;(r=(s=this.config).onSessionStateChanged)==null||r.call(s,n)}),this.on("session.created",n=>{var s,r;(r=(s=this.config).onSessionStart)==null||r.call(s,n.id)}),this.on("session.ended",(n,s)=>{var r,i;(i=(r=this.config).onSessionEnd)==null||i.call(r,s)}),this.on("participant.joined",n=>{var s,r;(r=(s=this.config).onUserJoined)==null||r.call(s,n.id)}),this.on("participant.left",n=>{var s,r;(r=(s=this.config).onUserLeft)==null||r.call(s,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new K.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(K.RoomEvent.Connected,()=>{var n,s;this.connectionState=K.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(s=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&s.includes("voice")&&setTimeout(async()=>{var r;try{(r=this.room)!=null&&r.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(i){console.warn("VoxketClient: Failed to enable microphone after room connection:",i)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(K.RoomEvent.Disconnected,n=>{var s;console.log("🔴 VoxketClient: Room disconnected, reason:",n),this.connectionState=K.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.isAgentConnected=!1,console.log("🤖 VoxketClient: Agent marked as disconnected"),this.clearChatMessages(),n&&console.log("🔍 VoxketClient: Disconnect reason details:",{reason:n.toString(),currentSession:(s=this.currentSession)==null?void 0:s.id,agentConnected:this.isAgentConnected,connectionState:this.connectionState}),this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(K.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===K.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(K.RoomEvent.ParticipantConnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",s)}),this.room.on(K.RoomEvent.ParticipantDisconnected,n=>{const s={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",s)}))}setupTextStreamHandlers(){if(!this.room)return;try{this.room.registerTextStreamHandler("lk.chat",async(s,r)=>{try{const i=await s.readAll(),o={id:`msg_${Date.now()}_${r.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:i,timestamp:new Date,sender:{id:r.identity||"user",name:r.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(i){console.error("VoxketClient: Failed to process lk.chat message:",i)}})}catch(s){console.warn("VoxketClient: lk.chat handler already registered, skipping:",s)}try{console.log("📝 VoxketClient: Registering lk.transcription handler..."),this.room.registerTextStreamHandler("lk.transcription",async(s,r)=>{var i,o,a,c,d,u;console.log("📝 VoxketClient: Received transcription stream from:",r.identity);try{console.log("📝 VoxketClient: Processing transcription stream...");const f=r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity),h=Date.now(),p=r.identity,x=this.activeTranscriptions.get(p);let m,b=!0;x&&h-x.timestamp<1e3?(m=x.messageId,b=!1,console.log("📝 VoxketClient: Reusing existing transcription message ID:",m)):(m=`msg_${f?"user":"agent"}_${r.identity}_${h}`,this.activeTranscriptions.set(p,{messageId:m,timestamp:h}),console.log("📝 VoxketClient: Created new transcription message ID:",m));let S="";const C=((a=this.currentAgentInfo)==null?void 0:a.name)||r.identity||"AI Assistant";console.log("📝 VoxketClient: Using agent name:",C);const T=f?"participant":"agent",k=f?this.config.participantName||"User":C;console.log("📝 VoxketClient: Transcription sender info:",{participantIdentity:r.identity,localParticipantIdentity:(d=(c=this.room)==null?void 0:c.localParticipant)==null?void 0:d.identity,isFromUser:f,senderType:T,senderName:k});const v={id:m,content:"",timestamp:new Date,sender:{id:r.identity||"unknown",name:k,type:T},metadata:{topic:"lk.transcription",streaming:!0}};b&&this.emit("chat.message.received",v),console.log("📝 VoxketClient: Starting to read transcription stream...");for await(const _ of s){console.log("📝 VoxketClient: Received chunk:",_.length,"chars"),S+=_;const y=this.convertMarkdownToText(S),D={...v,content:y,metadata:{...v.metadata,streaming:!0}};this.emit("chat.message.updated",D)}const j=this.convertMarkdownToText(S),V={...v,content:j,metadata:{...v.metadata,streaming:!1}};this.emit("chat.message.updated",V);const E={id:m,text:j,isFinal:!0,startTime:v.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",E),console.log("📝 VoxketClient: Emitted transcription event:",E)}catch(f){console.error("VoxketClient: Failed to process lk.transcription message:",f);try{const h=await s.readAll(),p=((u=this.currentAgentInfo)==null?void 0:u.name)||r.identity||"AI Assistant",x={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:h,timestamp:new Date,sender:{id:r.identity||"agent",name:p,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",x);const m={id:x.id,text:x.content,isFinal:!0,startTime:x.timestamp.getTime(),participantId:r.identity||"agent"};this.emit("transcription.received",m),console.log("📝 VoxketClient: Emitted fallback transcription event:",m)}catch(h){console.error("VoxketClient: Fallback failed for lk.transcription:",h)}}})}catch(s){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("suggested_response",async s=>{const r=await s.readAll();let i=[];try{i=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,r)}this.emit("suggested.response",i)})}catch(s){console.warn("VoxketClient: suggested_response handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("agent_state_changed",async(s,r)=>{const i=await s.readAll();console.log("🤖 VoxketClient: agent_state_changed stream received:",i);let o={};try{o=typeof i=="string"?JSON.parse(i.replace(/'/g,'"')):i}catch(a){console.warn("VoxketClient: Failed to parse agent_state_changed:",a,i)}this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent marked as connected (first state change received)"),this.emit("agent.connected",o)),o.new_state==="speaking"?(this.setAgentState("speaking"),this.emit("agent.speaking",o)):o.new_state==="thinking"?(this.setAgentState("thinking"),this.emit("agent.thinking",o)):(o.new_state==="idle"||o.new_state==="listening")&&this.setAgentState("idle")})}catch(s){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",s)}try{this.room.registerTextStreamHandler("images",async(s,r)=>{try{const i=await s.readAll()}catch(i){console.error("VoxketClient: Error processing images stream:",i)}})}catch(s){console.warn("VoxketClient: images handler already registered, skipping:",s)}try{this.room.registerByteStreamHandler("images",async(s,r)=>{var i,o;try{const a=s.info,c={id:`img_${Date.now()}_${r.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${a.name||"Image"}`,sender:{id:r.identity||"agent",name:r.identity||"Agent",type:r.identity===((o=(i=this.room)==null?void 0:i.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:a.name,fileSize:a.size,mimeType:a.mimeType,streamId:a.id,downloading:!0}};this.emit("chat.message.received",c),s.onProgress&&(s.onProgress=p=>{const x={...c,metadata:{...c.metadata,downloadProgress:p||0}};this.emit("chat.message.updated",x)});const d=[];for await(const p of s)d.push(p);const u=new Blob(d,{type:a.mimeType||"application/octet-stream"}),f=URL.createObjectURL(u),h={...c,metadata:{...c.metadata,downloading:!1,downloadProgress:1,downloadUrl:f,blob:u}};this.emit("chat.message.updated",h)}catch(a){console.error("VoxketClient: Error processing image attachment:",a)}})}catch(s){console.warn("VoxketClient: image handler already registered, skipping:",s)}["error","warning","status","system","debug","info"].forEach(s=>{try{this.room.registerTextStreamHandler(s,async(r,i)=>{try{const o=await r.readAll();if(console.log(`📝 VoxketClient: Received '${s}' stream:`,o),s==="error"){let a={};try{a=typeof o=="string"?JSON.parse(o):o}catch{a={message:o}}console.warn("� VoxketClient: Agent error:",a),this.emit("agent.error",a)}else this.emit("text.stream.received",{topic:s,data:o,participantInfo:i})}catch(o){console.error(`VoxketClient: Failed to process '${s}' stream:`,o)}})}catch(r){console.warn(`VoxketClient: Handler for '${s}' already registered, skipping:`,r)}});try{this.room.registerTextStreamHandler("*",async(s,r)=>{var i;try{const o=await s.readAll(),a=((i=s.info)==null?void 0:i.topic)||"unknown";console.log(`📝 VoxketClient: Received unhandled text stream for topic '${a}':`,o),this.emit("text.stream.unhandled",{topic:a,data:o,participantInfo:r})}catch(o){console.error("VoxketClient: Failed to process unhandled text stream:",o)}})}catch(s){console.warn("VoxketClient: Generic text stream handler already registered, skipping:",s)}this.textStreamHandlersRegistered=!0}async fetchConnectionDetails(n,s,r){const i=n||this.config.agentId||"default-agent",o=s||this.config.participantName||"User",a=r||this.config.modalities||["voice"];try{const c={agent_id:i,participant_name:o,participant_metadata:{user_id:""},modality:a[0],modalities:a};console.log("🔗 VoxketClient: Creating session with modalities:",a);const d=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(c)});if(!d.ok){let h=`HTTP ${d.status}: Failed to fetch connection details`;try{const p=await d.json();p&&(p.error?h=`API Error: ${p.error}`:p.detail?h=`API Error: ${p.detail}`:p.message&&(h=`API Error: ${p.message}`))}catch{try{const x=await d.text();x&&(h=`API Error: ${x}`)}catch{}}throw new Error(h)}const u=await d.json();let f;return u.agent_info&&(f={id:u.agent_info.id||i,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=f),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:f}}catch(c){console.error("VoxketClient: fetchConnectionDetails failed:",c);const d=new we(`Failed to fetch connection details: ${c instanceof Error?c.message:"Unknown error"}`,"CONNECTION_FAILED",c);throw this.emit("connection.error",d),d}}async connect(n,s,r){var i;try{this.emit("connection.connecting");const o=await this.fetchConnectionDetails(n,s,r);return await((i=this.room)==null?void 0:i.connect(o.serverUrl,o.participantToken)),this.isConnected=!0,o}catch(o){console.error("VoxketClient: Connection failed:",o);const a=new we(`Failed to connect to Voxket services: ${o instanceof Error?o.message:"Unknown error"}`,"CONNECTION_FAILED",o);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{console.log("🔌 VoxketClient: Starting disconnect process..."),this.room&&(console.log("🔌 VoxketClient: Disconnecting from room:",{roomState:this.room.state,numParticipants:this.room.numParticipants,sessionId:(n=this.currentSession)==null?void 0:n.id}),await this.room.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),console.log("🔌 VoxketClient: Creating new room instance..."),this.room=new K.Room,this.setupRoomEventListeners(),console.log("✅ VoxketClient: Disconnect completed successfully"),this.emit("connection.disconnected")}catch(s){console.error("❌ VoxketClient: Disconnect failed:",s);const r=new we("Failed to disconnect properly","NETWORK_ERROR",s);throw this.emit("connection.error",r),r}}async createSession(n){var s,r,i,o;try{const a=await this.connect(n.agentId,n.participantName,n.modalities),c={id:a.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:a.agentInfo||this.currentAgentInfo};if(this.currentSession=c,this.emit("session.created",c),(s=n.modalities)!=null&&s.includes("voice"))try{await new Promise(d=>setTimeout(d,500)),(r=this.room)!=null&&r.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(d){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",d)}if((i=n.modalities)!=null&&i.includes("video"))try{await new Promise(d=>setTimeout(d,200)),(o=this.room)!=null&&o.localParticipant&&(console.log("🎥 VoxketClient: Attempting to enable camera for video session"),await this.room.localParticipant.setCameraEnabled(!0),this.emit("track.unmuted",{source:"camera",enabled:!0}),console.log("🎥 VoxketClient: Camera enabled successfully"))}catch(d){console.warn("VoxketClient: Failed to enable camera, but continuing with session:",d)}return setTimeout(()=>{var d;this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state),this.forceAgentConnected(),console.log("🤖 VoxketClient: Session marked as active:",{sessionId:this.currentSession.id,modalities:this.currentSession.activeModalities,agentConnected:this.isAgentConnected,hasRoom:!!this.room,remoteParticipants:((d=this.room)==null?void 0:d.remoteParticipants.size)||0}))},1e3),c}catch(a){throw console.error("VoxketClient: Failed to create session:",a),a instanceof we?a:a instanceof TypeError&&a.message.includes("fetch")?new we("Network connection failed","CONNECTION_FAILED",a):a instanceof Error&&a.message.includes("Failed to fetch connection details")?new we(`API connection failed: ${a.message}`,"CONNECTION_FAILED",a):new we(`Failed to create session: ${a instanceof Error?a.message:"Unknown error"}`,"SESSION_NOT_FOUND",a)}}async startSession(n,s){const r={agentId:n||this.config.agentId||"default-agent",participantName:(s==null?void 0:s.participantName)||this.config.participantName||"User",modalities:(s==null?void 0:s.modalities)||this.config.modalities||["voice","chat"],metadata:s==null?void 0:s.metadata};return this.createSession(r)}async endSession(){var n,s;if(!this.currentSession)return null;try{const r={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,r),await this.disconnect(),r}catch(r){throw new we("Failed to end session","SESSION_NOT_FOUND",r)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getIsAgentConnected(){return this.isAgentConnected}forceAgentConnected(){this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent manually marked as connected"),this.emit("agent.connected",{forced:!0}))}getAgentState(){return this.agentState}setAgentState(n){this.agentState!==n&&(this.agentState=n,this.emit("agent.state.changed",{state:n}))}getAgentAudioTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(K.Track.Source.Microphone);if(r!=null&&r.track)return{source:K.Track.Source.Microphone,participant:s,publication:r}}return null}getAgentVideoTrack(){const n=this.getRemoteParticipants();for(const s of n){const r=s.getTrackPublication(K.Track.Source.Camera);if(r!=null&&r.track)return{source:K.Track.Source.Camera,participant:s,publication:r}}return null}getVideoTrackRefs(){const n=[],s=this.getLocalParticipant();if(s){const i=s.getTrackPublication(K.Track.Source.Camera);i!=null&&i.track&&n.push({source:K.Track.Source.Camera,participant:s,publication:i});const o=s.getTrackPublication(K.Track.Source.ScreenShare);o!=null&&o.track&&n.push({source:K.Track.Source.ScreenShare,participant:s,publication:o})}const r=this.getRemoteParticipants();for(const i of r){const o=i.getTrackPublication(K.Track.Source.Camera);o!=null&&o.track&&n.push({source:K.Track.Source.Camera,participant:i,publication:o});const a=i.getTrackPublication(K.Track.Source.ScreenShare);a!=null&&a.track&&n.push({source:K.Track.Source.ScreenShare,participant:i,publication:a})}return n}getCameraTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===K.Track.Source.Camera)}getScreenShareTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===K.Track.Source.ScreenShare)}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(r=>r.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const s=this.chatMessages.findIndex(r=>r.id===n.id);s!==-1&&(this.chatMessages[s]=n)}clearChatMessages(){this.chatMessages=[],this.activeTranscriptions.clear(),this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),console.log("🧹 VoxketClient: Cleared chat messages and transcription history"),this.emit("chat.history.cleared")}renderUI(n={}){var o,a,c,d,u,f,h,p,x;const s=this.resolveTarget(n.target||"body"),r=this.getTargetKey(s);if(br.has(s)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(Ct.has(s)){console.log("✋ VoxketClient: Target already has a React root in registry, updating existing props...");const m=this.renderedComponents.get(r);if(m&&m.root){const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((o=n.modality)==null?void 0:o.includes("chat"))!==!1,suportsVideoInput:((a=n.modality)==null?void 0:a.includes("video"))===!0,suportsScreenShare:((c=n.modality)==null?void 0:c.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{m.root.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)})),console.log("✅ VoxketClient: Successfully updated existing widget with new props");return}catch(S){throw console.error("Error re-rendering existing widget:",S),new Error(`Failed to update existing widget: ${S instanceof Error?S.message:"Unknown error"}`)}}else console.warn("⚠️ Registry inconsistency detected, cleaning up"),Ct.delete(s)}let i=this.renderedComponents.get(r);if(i&&i.target===s&&Ct.has(s)){console.log("🔄 VoxketClient: Reusing existing React root for target:",r);const m=i.root,b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((d=n.modality)==null?void 0:d.includes("chat"))!==!1,suportsVideoInput:((u=n.modality)==null?void 0:u.includes("video"))===!0,suportsScreenShare:((f=n.modality)==null?void 0:f.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{m.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)}))}catch(S){throw console.error("Error rendering Voxket widget:",S),new Error(`Failed to render Voxket widget: ${S instanceof Error?S.message:"Unknown error"}`)}return}br.add(s);try{if(i){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{i.root.unmount(),this.renderedComponents.delete(r),Ct.delete(i.target),s.innerHTML=""}catch(S){console.warn("Failed to cleanup existing root:",S)}}if(Ct.has(s)){console.warn("⚠️ VoxketClient: Target already in registry, skipping root creation");return}console.log("🆕 VoxketClient: Creating new React root for target:",r);const m=eu.createRoot(s);this.renderedComponents.set(r,{root:m,target:s}),Ct.add(s);const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((h=n.modality)==null?void 0:h.includes("chat"))!==!1,suportsVideoInput:((p=n.modality)==null?void 0:p.includes("video"))===!0,suportsScreenShare:((x=n.modality)==null?void 0:x.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};if(!m||typeof m.render!="function")throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");try{m.render(w.createElement(hs,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:w.createElement(ms,b)}))}catch(S){throw console.error("Error rendering Voxket widget:",S),new Error(`Failed to render Voxket widget: ${S instanceof Error?S.message:"Unknown error"}`)}}finally{br.delete(s)}}removeUI(n){const s=n?this.resolveTarget(n):null;if(s){const r=this.getTargetKey(s),i=this.renderedComponents.get(r);i?(console.log("🗑️ VoxketClient: Removing UI for target:",r),this.renderedComponents.delete(r),Ct.delete(s),setTimeout(()=>{try{i.root&&typeof i.root.unmount=="function"?s&&s.isConnected?(i.root.unmount(),console.log("✅ VoxketClient: UI removal completed for target:",r)):console.log("ℹ️ VoxketClient: Target element already disconnected, skipping unmount"):console.log("ℹ️ VoxketClient: Root already unmounted, skipping"),s&&s.isConnected&&s.parentNode&&(s.innerHTML="")}catch(a){console.warn("Failed to unmount React root:",a)}},0)):(console.log("ℹ️ VoxketClient: No component found for target, cleaning registry:",r),Ct.delete(s),s.isConnected&&(s.innerHTML="")),s.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(a=>{try{a.remove()}catch(c){console.warn("Failed to remove element:",c)}}),s===document.body&&s.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(c=>{if(c.classList.contains("bg-black")&&c.classList.contains("backdrop-blur-sm"))try{c.remove()}catch(d){console.warn("Failed to remove fixed element:",d)}})}}removeAllUI(){for(const[n,s]of this.renderedComponents)s.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){document.body.querySelectorAll(".fixed.inset-0.z-50").forEach(s=>{if(s.classList.contains("bg-black")&&(s.classList.contains("backdrop-blur-sm")||s.classList.contains("bg-opacity-30")))try{s.remove()}catch(r){console.warn("Failed to remove overlay:",r)}})}resolveTarget(n){if(typeof n=="string"){const s=document.querySelector(n);if(!s)throw new Error(`Target element not found: ${n}`);return s}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,s){var r;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new we("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new we("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new we("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const i={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:s||{}},o=await((r=this.room)==null?void 0:r.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",i)}catch(i){throw console.error("VoxketClient: Failed to send chat message:",i),new we("Failed to send message","NETWORK_ERROR",i)}}async sendChatMessage(n,s){return this.sendMessage(n,s)}async sendAttachments(n,s){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new we("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new we("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new we("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new we("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const r=n.filter(i=>i.type.startsWith("image/"));if(r.length===0)throw new we("Only image files are allowed","INVALID_PARAMETER");r.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const i=r.map(async(o,a)=>{const d={id:`att_${Date.now()}_${a}`,content:`📎 ${o.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...s,type:"attachment",fileName:o.name,fileSize:o.size,mimeType:o.type,uploading:!0}};this.emit("chat.message.sent",d);const u=await this.room.localParticipant.sendFile(o,{mimeType:o.type,topic:"images",onProgress:h=>{const p={...d,metadata:{...d.metadata,uploadProgress:h}};this.emit("chat.message.updated",p)}});try{const h=new FileReader,p=new Promise((b,S)=>{h.onload=()=>{typeof h.result=="string"?b(h.result):S(new Error("Failed to convert to base64"))},h.onerror=S});h.readAsDataURL(o);const m={type:"image",data:await p,filename:o.name,mimeType:o.type,size:o.size};await this.room.localParticipant.sendText(JSON.stringify(m),{topic:"images",destinationIdentities:[]})}catch(h){console.warn("VoxketClient: Failed to send image data to agent:",h);try{const p=`I've shared an image: ${o.name}`;await this.room.localParticipant.sendText(p,{topic:"lk.chat",destinationIdentities:[]})}catch(p){console.warn("VoxketClient: Failed to send image notification to agent:",p)}}const f={...d,metadata:{...d.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",f),u});await Promise.all(i)}catch(i){throw console.error("VoxketClient: Failed to send attachments:",i),new we("Failed to send attachments","NETWORK_ERROR",i)}}async sendAttachment(n,s){return this.sendAttachments([n],s)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isMicrophoneEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setMicrophoneEnabled(o)),o?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle microphone:",i),new we("Failed to toggle microphone","PERMISSION_DENIED",i)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var s,r;try{const i=(s=this.room)==null?void 0:s.localParticipant.isCameraEnabled,o=n??!i;await((r=this.room)==null?void 0:r.localParticipant.setCameraEnabled(o)),o?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(i){throw console.error("VoxketClient: Failed to toggle camera:",i),new we("Failed to toggle camera","PERMISSION_DENIED",i)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0))}catch(s){throw new we("Failed to start screen share","PERMISSION_DENIED",s)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1))}catch(s){throw new we("Failed to stop screen share","PERMISSION_DENIED",s)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="audioinput")}catch(n){throw new we("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="videoinput")}catch(n){throw new we("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new we("Failed to set audio input device","DEVICE_ERROR",r)}}async setVideoInputDevice(n){var s;try{if(!((s=this.room)!=null&&s.localParticipant))throw new Error("Not connected to room")}catch(r){throw new we("Failed to set video input device","DEVICE_ERROR",r)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const s=n.permissions;if(!s)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const r=i=>!!s.canPublish&&(s.canPublishSources.length===0||s.canPublishSources.includes(i));return{camera:r(1),microphone:r(2),screenShare:r(3),data:s.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===K.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.Microphone)return s.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.Camera)return s.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,s]of n.trackPublications)if(s.source===K.Track.Source.ScreenShare)return s.track;return null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack();return n?!n.isMuted:!1}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(s=>{n.push({id:s.identity,name:s.name||s.identity,isLocal:!1})}),n}getSessionMetrics(){var n,s;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((s=this.room)==null?void 0:s.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new we("Failed to start recording","RECORDING_ERROR",s)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(s){throw new we("Failed to stop recording","RECORDING_ERROR",s)}}async registerFrontendRPC(n,s,r="embedded"){return this.rpcManager.registerFrontendRPC(n,s,r)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,s){return this.on(n,s)}registerEventEmitter(n,s){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async r=>{try{const i=await r.readAll();s(i)}catch(i){console.error(`Error processing event for topic '${n}':`,i)}})}catch(r){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,r)}}convertMarkdownToText(n){if(!n)return"";let s=n;return s=s.replace(/\*\*(.*?)\*\*/g,"$1"),s=s.replace(/__(.*?)__/g,"$1"),s=s.replace(/\*(.*?)\*/g,"$1"),s=s.replace(/_(.*?)_/g,"$1"),s=s.replace(/~~(.*?)~~/g,"$1"),s=s.replace(/`([^`]+)`/g,"$1"),s=s.replace(/```[\s\S]*?```/g,""),s=s.replace(/^#{1,6}\s+/gm,""),s=s.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),s.trim()}}const dx=le.create(Nd),ux=le.create(X1),fx=le.create(nx),hx=le.create(Md);function mx({theme:e,mode:t,loadingText:n}){const s=_e(e),r=()=>{switch(t){case"voice":return n||"Connecting to voice agent...";case"chat":return n||"Starting chat session...";case"video":return n||"Connecting to video call...";default:return n||"Connecting..."}};return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h3",{className:`text-lg font-semibold mb-2 ${s.text.accent}`,children:r()}),l.jsx("p",{className:`text-sm ${s.text.muted}`,children:"Please wait a moment..."})]}),l.jsxs("div",{className:"flex space-x-1 mt-4",children:[l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"0ms"}}),l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"150ms"}}),l.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"300ms"}})]})]})}const gx=le.create(mx);function px({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:s}){const r={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},i=_e(s);return l.jsx(le.button,{onClick:e,className:`voxket-popup-trigger fixed ${r[n]} z-50 px-4 py-2 rounded-full shadow-lg ${i.popupTrigger} transition-all duration-200 hover:scale-105`,style:{position:"fixed",zIndex:9999,background:"linear-gradient(135deg, #3b82f6, #8b5cf6)",color:"#ffffff",border:"none",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",padding:"0.5rem 1rem",fontWeight:"500",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',fontSize:"14px",cursor:"pointer",...n==="bottom-right"&&{bottom:"1rem",right:"1rem"},...n==="bottom-left"&&{bottom:"1rem",left:"1rem"},...n==="top-right"&&{top:"1rem",right:"1rem"},...n==="top-left"&&{top:"1rem",left:"1rem"}},initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},"data-position":n,children:t})}function al({children:e,theme:t,displayType:n="widget",onClose:s,popupPosition:r="bottom-right",onExpand:i}){const o=_e(t);if(n==="fullscreen")return l.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",onClick:a=>{a.target===a.currentTarget&&s&&s()},children:l.jsxs("div",{className:"w-full h-full max-w-7xl max-h-[95vh] rounded-2xl relative bg-transparent flex flex-col",onClick:a=>{a.stopPropagation()},children:[s&&l.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),s()},className:"absolute top-4 cursor-pointer right-4 z-[10000] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} w-full h-full flex flex-col rounded-2xl shadow-2xl relative overflow-hidden`,"data-theme":t,style:{minHeight:"600px",height:"100%",contain:"layout style paint",overscrollBehavior:"contain",background:t==="vox"?"linear-gradient(135deg, #171727, #12121f, #0f0f23) !important":t==="dark"?"linear-gradient(135deg, #0f172a, #1e293b, #0f172a) !important":"linear-gradient(135deg, #f0f9ff, #ffffff, #e0f2fe) !important"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return l.jsx("div",{className:"fixed rounded-2xl inset-0 z-[9999] pointer-events-none",children:l.jsxs("div",{className:`fixed rounded-2xl ${a[r]} pointer-events-auto`,children:[s&&l.jsx("button",{onClick:s,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} rounded-2xl flex flex-col relative overflow-hidden`,"data-theme":t,style:{width:"350px",height:"500px",contain:"layout style paint",overscrollBehavior:"contain",background:t==="vox"?"linear-gradient(135deg, #171727, #12121f, #0f0f23) !important":t==="dark"?"linear-gradient(135deg, #0f172a, #1e293b, #0f172a) !important":"linear-gradient(135deg, #f0f9ff, #ffffff, #e0f2fe) !important"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return l.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} relative overflow-hidden`,"data-theme":t,style:{height:"100%",maxHeight:"100%",contain:"layout style paint",overscrollBehavior:"contain",background:t==="vox"?"linear-gradient(135deg, #171727, #12121f, #0f0f23) !important":t==="dark"?"linear-gradient(135deg, #0f172a, #1e293b, #0f172a) !important":"linear-gradient(135deg, #f0f9ff, #ffffff, #e0f2fe) !important"},children:[l.jsx("div",{className:o.cardTopGradient}),l.jsx("div",{className:o.cardPurpleBlur}),l.jsx("div",{className:o.cardPinkBlur}),l.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),l.jsx("div",{className:o.cardPulse1}),l.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})}function yx(e){if(typeof window>"u")return null;const{agentId:t,participantName:n,baseUrl:s,appSecret:r,appId:i,prompts:o,statusMessage:a,welcomeTitle:c,welcomeSubTitle:d,className:u,width:f,height:h,loadingText:p,suportsChatInput:x=!0,suportsVideoInput:m=!0,suportsScreenShare:b=!0,theme:S="vox",onSessionStart:C,onSessionEnd:T,enableSessionLogging:k=!0,onSessionLogsUpdate:v,onSessionMetricsUpdate:j,modalities:V=["voice"],displayType:E="widget",popupPosition:_="bottom-right",popupTriggerText:y="Open Chat",onPopupToggle:D,voxketClient:W,onDisplayTypeChange:te}=e,[ue,ie]=g.useState(!1),[fe,ne]=g.useState(null),[R,B]=g.useState(()=>{try{if(W)return!!W.getCurrentSession()}catch(H){console.error("Error checking existing session:",H)}return!1}),[M,O]=g.useState(!1),[q,Y]=g.useState(t||""),[U,re]=g.useState(n||"User"),[$,I]=g.useState(()=>{try{if(W)return W.getCurrentSession()}catch(H){console.error("Error getting current session:",H)}return null}),[L,N]=g.useState(()=>{var H,me,xe;try{if(W){const Ee=W.getCurrentSession();if((H=Ee==null?void 0:Ee.activeModalities)!=null&&H.includes("chat"))return"chat";if((me=Ee==null?void 0:Ee.activeModalities)!=null&&me.includes("voice"))return"voice";if((xe=Ee==null?void 0:Ee.activeModalities)!=null&&xe.includes("video"))return"video"}}catch(Ee){console.error("Error determining current mode:",Ee)}return"welcome"}),[F,se]=g.useState(!1);g.useEffect(()=>{E==="fullscreen"&&console.log("🎯 Widget: Switched to fullscreen mode")},[E]),g.useEffect(()=>{R&&!M?console.log("📊 Session started:",{currentMode:L,sessionId:$==null?void 0:$.id}):!R&&!M&&L==="welcome"&&console.log("📊 Returned to welcome screen")},[R,L,M]);const A=g.useMemo(()=>{try{if(W)return console.log("🔄 Using existing VoxketClient to preserve session state"),W;if(!i||!r||!s){const me=`Missing required props: ${i?"":"appId "}${r?"":"appSecret "}${s?"":"baseUrl"}`;return console.error("❌ VoxketClient creation failed:",me),ne(new Error(me)),ie(!0),null}const H={appId:i,appSecret:r,baseUrl:s,agentId:q,participantName:U||"User",modalities:V};return console.log("🔧 Creating new VoxketClient with config:",{appId:i.substring(0,8)+"...",baseUrl:s,agentId:q,participantName:U||"User",modalities:V}),new Wn(H)}catch(H){return console.error("❌ Failed to create VoxketClient:",H),ne(H),ie(!0),null}},[W,i,r,s,q,U,V]),Z=V,G=g.useMemo(()=>{try{if(!A)return console.warn("⚠️ No VoxketClient available, creating fallback room"),new K.Room;const H=A.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!H,roomState:H==null?void 0:H.state,sessionStarted:R,currentMode:L}),H||new K.Room}catch(H){return console.error("❌ Error getting room from client:",H),new K.Room}},[A,R,L]);g.useEffect(()=>{if(G){const H=()=>{console.log("🏠 Widget: Room state changed:",{state:G.state,numParticipants:G.numParticipants,isConnected:G.state==="connected",sessionId:$==null?void 0:$.id})},me=(xe,Ee,ot)=>{console.log("🎵 Widget: Track subscribed:",{trackKind:xe.kind,trackSource:xe.source,participantSid:ot.sid,participantIdentity:ot.identity,sessionId:$==null?void 0:$.id})};return G.on(K.RoomEvent.Connected,H),G.on(K.RoomEvent.Disconnected,H),G.on(K.RoomEvent.TrackSubscribed,me),()=>{G.off(K.RoomEvent.Connected,H),G.off(K.RoomEvent.Disconnected,H),G.off(K.RoomEvent.TrackSubscribed,me)}}},[G,$==null?void 0:$.id]),g.useEffect(()=>{!M&&L==="welcome"?console.log("🎬 Widget: Welcome screen ready"):R&&L!=="welcome"&&console.log("🎬 Widget: Session mode active:",L)},[L,M,R]);const de={suportsChatInput:x,suportsVideoInput:m,suportsScreenShare:b};g.useEffect(()=>{(L==="voice"||L==="video"||L==="chat")&&!$&&!R&&!M&&A&&!A.connected&&(console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"),N("welcome"),O(!1))},[L,$,R,M,A]);const{sessionMetrics:ae,sessionLogs:Oe,logEvent:Be}=Vd({room:G,onSessionStart:C,onSessionEnd:T,enableConsoleLogging:k,enableLocalStorage:k,voxketSessionId:$==null?void 0:$.id});g.useEffect(()=>{v&&v(Oe)},[Oe,v]),g.useEffect(()=>{j&&ae&&j(ae)},[ae,j]),g.useEffect(()=>{if(!A)return;const H=()=>{const me=A.connected,xe=A.getCurrentSession();console.log("🔗 Connection state changed:",{isConnected:me,currentSessionId:xe==null?void 0:xe.id,currentMode:L,loading:M,sessionStarted:R}),!me&&R&&!M&&(console.log("🔴 Connection lost during active session - returning to welcome"),O(!1),B(!1),I(null),N("welcome")),me&&xe&&M&&(console.log("🟢 Connected with active session - removing loader"),O(!1),B(!0),I(xe))};return A.on("connectionStateChanged",H),A.on("sessionEnded",()=>{console.log("📞 Session ended - returning to welcome"),O(!1),B(!1),I(null),N("welcome")}),()=>{A.off("connectionStateChanged",H),A.off("sessionEnded",()=>{})}},[A,L,M,R]),g.useEffect(()=>{const H=xe=>{console.log("🔴 Widget: Room disconnected:",xe),console.log("🔍 Widget: Current state on disconnect:",{currentMode:L,sessionStarted:R,currentSessionId:$==null?void 0:$.id,loading:M}),O(!1),B(!1),I(null),N("welcome"),console.log("🏠 Widget: Automatically returning to welcome screen after disconnect")},me=xe=>{console.log("📹 Media devices error:",xe),O(!1),B(!1),I(null),N("welcome")};return G.on(K.RoomEvent.MediaDevicesError,me),G.on(K.RoomEvent.Disconnected,H),()=>{G.off(K.RoomEvent.Disconnected,H),G.off(K.RoomEvent.MediaDevicesError,me)}},[G,L,R,$==null?void 0:$.id,M]);const Pe=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("voice"),console.log("🎤 Starting voice session...",{agentId:q,participantName:U}),console.log("🎤 Pre-start state:",{currentMode:"voice",sessionStarted:!1,loading:!0}),Be("USER_STARTED_VOICE_SESSION",{agentId:q,participantName:U});const H=await A.startSession(q,{participantName:U||"User",modalities:["voice",...m?["video"]:[]]});console.log("✅ Voice session started successfully:",H.id),I(H),B(!0),O(!1),C&&C(H.id)}catch(H){console.error("❌ Failed to start voice session:",H),O(!1),B(!1),N("welcome")}},ze=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("chat"),console.log("💬 Starting chat session...",{agentId:q,participantName:U}),Be("USER_STARTED_CHAT_SESSION",{agentId:q,participantName:U});const H=await A.startSession(q,{participantName:U||"User",modalities:["chat"]});console.log("✅ Chat session started successfully:",H.id),I(H),B(!0),O(!1),C&&C(H.id)}catch(H){console.error("❌ Failed to start chat session:",H),O(!1),B(!1),N("welcome")}},Xe=async()=>{try{if(!A){console.error("❌ VoxketClient not available"),ne(new Error("VoxketClient not initialized")),ie(!0);return}O(!0),N("video"),console.log("📺 Starting video session...",{agentId:q,participantName:U}),console.log("📺 Pre-start state:",{currentMode:"video",sessionStarted:!1,loading:!0}),Be("USER_STARTED_VIDEO_SESSION",{agentId:q,participantName:U});const H=await A.startSession(q,{participantName:U||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",H.id),I(H),B(!0),O(!1),C&&C(H.id)}catch(H){console.error("❌ Failed to start video session:",H),O(!1),B(!1),N("welcome")}},rt=()=>{console.log("🔄 Widget: handleBackToWelcome called",{currentMode:L,sessionStarted:R,currentSessionId:$==null?void 0:$.id,displayType:E,loading:M}),N("welcome"),O(!1),te&&te(e.displayType||"widget"),$&&R?(console.log("🧹 Widget: Cleaning up active session"),B(!1),I(null),A&&(console.log("🔌 Widget: Disconnecting client and cleaning up room"),A.disconnect().catch(H=>{console.error("❌ Widget: Error during disconnect:",H)}))):(console.log("📝 Widget: No active session to clean up"),A&&A.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),A.disconnect().catch(H=>{console.error("❌ Widget: Error during force disconnect:",H)}))),E==="popup"&&!F&&se(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},wt=()=>{const H=!F;se(H),D&&D(H),!H&&!($&&R)&&(N("welcome"),B(!1),I(null))},Gn=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},Kn=()=>{if(console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange)e.onDisplayTypeChange("fullscreen");else{console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");const H=document.getElementById("voice-card")||document.querySelector(".voxket-widget-container");H&&H.requestFullscreen&&H.requestFullscreen().catch(me=>{console.warn("⚠️ Fullscreen API not supported or failed:",me)})}};g.useEffect(()=>{var H,me,xe;if(W&&A){const Ee=A.getCurrentSession();A.connected,Ee&&(console.log("✅ Restoring session state:",Ee.id),I(Ee),B(!0),O(!1),(H=Ee.activeModalities)!=null&&H.includes("chat")?N("chat"):(me=Ee.activeModalities)!=null&&me.includes("voice")?N("voice"):(xe=Ee.activeModalities)!=null&&xe.includes("video")&&N("video"))}},[W,A]),g.useEffect(()=>()=>{!W&&A&&A.disconnect()},[A,W]);let Zt=L==="video"?"w-[32rem]":"w-96",z=L==="video"?"h-[30rem]":"h-[25rem]",oe={};if(f&&(f.startsWith("w-")?Zt=f:(oe.width=f,Zt="")),h&&(h.startsWith("h-")?z=h:(oe.height=h,z="")),E==="popup"&&!F)return console.log("🟡 Showing popup trigger button"),l.jsx(px,{onClick:wt,text:y,position:_,theme:S});if(ue||!A){const H=(fe==null?void 0:fe.message)||"VoxketWidget encountered an error. Please check your configuration.";return l.jsx("div",{className:`voxket-widget-root theme-${S} flex items-center justify-center p-8 ${u||""}`,style:{width:f||"400px",height:h||"500px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"},children:l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"text-4xl mb-4",children:"⚠️"}),l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Widget Error"}),l.jsx("p",{className:"text-sm mb-4",children:H}),l.jsx("button",{onClick:()=>{ie(!1),ne(null),window.location.reload()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]})})}let ke=`voxket-widget-root theme-${S}`,ee={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};E==="widget"?(ke+=` flex items-center justify-center min-h-fit ${Zt} ${z} ${u}`,ee={...ee,...oe}):(ke=`${u||""}`,ee={});const Te=l.jsx("div",{className:"h-full flex flex-col overflow-hidden relative z-10",children:l.jsxs(Et,{mode:"wait",children:[L==="welcome"&&!M&&l.jsx(hx,{agentId:q,participantName:U||"",onAgentIdChange:Y,onParticipantNameChange:re,onStartCall:Pe,onStartChat:ze,onStartVideo:Xe,disabled:R||M,prompts:o,statusMessage:a,title:c,subTitle:d,theme:S,modalities:Z,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),M&&(L==="voice"||L==="chat"||L==="video")&&l.jsx(gx,{theme:S,mode:L,loadingText:p,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3,ease:"easeInOut"}},`loading-${L}`),L==="voice"&&!M&&R&&A&&l.jsxs(Ke.RoomContext.Provider,{value:G,children:[l.jsx(Ke.RoomAudioRenderer,{},`audio-${($==null?void 0:$.id)||"no-session"}`),l.jsx(Ke.StartAudio,{label:"Start Audio"},`start-audio-${($==null?void 0:$.id)||"no-session"}`),l.jsx(dx,{loadingText:p,participantName:U||"User",capabilities:de,sessionStarted:R,disabled:!1,theme:S,client:A,displayType:E,onBack:E==="popup"?wt:rt,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"voice-session")]}),L==="chat"&&!M&&R&&A&&l.jsx(ux,{client:A,theme:S,displayType:E,onBack:E==="popup"?wt:rt,onEndChat:rt,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),L==="video"&&!M&&R&&A&&l.jsxs(Ke.RoomContext.Provider,{value:G,children:[l.jsx(Ke.RoomAudioRenderer,{},`audio-video-${($==null?void 0:$.id)||"no-session"}`),l.jsx(Ke.StartAudio,{label:"Start Audio"},`start-audio-video-${($==null?void 0:$.id)||"no-session"}`),l.jsx(fx,{client:A,theme:S,displayType:E,onBack:E==="popup"?wt:rt,onEndCall:rt,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-session")]})]})});return E==="fullscreen"||E==="popup"?l.jsx(al,{theme:S,displayType:E,popupPosition:_,onClose:E==="fullscreen"?Gn:wt,children:Te}):l.jsx("div",{className:ke,style:ee,children:l.jsx(al,{theme:S,displayType:E,popupPosition:_,onExpand:Kn,children:Te})})}function ms(e){return l.jsx(Wo,{children:l.jsx(yx,{...e})})}function xx({logs:e,onClear:t,onExport:n}){const[s,r]=w.useState(!1),[i,o]=w.useState(""),a=e.filter(c=>!i||c.event.toLowerCase().includes(i.toLowerCase()));return s?l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:l.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[l.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",placeholder:"Filter events...",value:i,onChange:c=>o(c.target.value),className:"px-3 py-1 border rounded text-sm"}),l.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),l.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),l.jsx("button",{onClick:()=>r(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),l.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?l.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):l.jsx("div",{className:"space-y-2",children:a.map((c,d)=>l.jsxs("div",{className:"border rounded p-3 text-sm",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:"font-semibold text-blue-600",children:c.event}),l.jsx("span",{className:"text-gray-500 text-xs",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.sessionId&&l.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",c.sessionId]}),c.data&&l.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:l.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(c.data,null,2)})})]},d))})})]})}):l.jsxs("button",{onClick:()=>r(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function bx({metrics:e}){return e?l.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[l.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Session ID:"}),l.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Start Time:"}),l.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Messages:"}),l.jsx("div",{children:e.totalMessages})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Participants:"}),l.jsx("div",{children:e.participantCount})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),l.jsx("div",{children:e.connectionIssues})]}),l.jsxs("div",{children:[l.jsx("span",{className:"text-gray-600",children:"Duration:"}),l.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function Wt(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:s,endSession:r}=ft(),i=w.useCallback(async(a,c)=>await s(a,c),[s]),o=w.useCallback(async()=>await r(),[r]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:i,stop:o}}function Id(){const{sessionMetrics:e,currentSession:t}=ft();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function Dd(){const{setMicrophoneEnabled:e,client:t}=ft(),[n,s]=w.useState(!1),[r,i]=w.useState(!1),o=w.useCallback(async()=>{if(!r){i(!0);try{const d=!n;await e(d),s(d)}catch(d){console.error("Failed to toggle microphone:",d)}finally{i(!1)}}},[n,r,e]),a=w.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(!0),s(!0)}catch(d){console.error("Failed to enable microphone:",d)}finally{i(!1)}}},[n,r,e]),c=w.useCallback(async()=>{if(!(!n||r)){i(!0);try{await e(!1),s(!1)}catch(d){console.error("Failed to disable microphone:",d)}finally{i(!1)}}},[n,r,e]);return{isEnabled:n,isLoading:r,toggle:o,enable:a,disable:c}}function $d(){const{setCameraEnabled:e}=ft(),[t,n]=w.useState(!1),[s,r]=w.useState(!1),i=w.useCallback(async()=>{if(!s){r(!0);try{const c=!t;await e(c),n(c)}catch(c){console.error("Failed to toggle camera:",c)}finally{r(!1)}}},[t,s,e]),o=w.useCallback(async()=>{if(!(t||s)){r(!0);try{await e(!0),n(!0)}catch(c){console.error("Failed to enable camera:",c)}finally{r(!1)}}},[t,s,e]),a=w.useCallback(async()=>{if(!(!t||s)){r(!0);try{await e(!1),n(!1)}catch(c){console.error("Failed to disable camera:",c)}finally{r(!1)}}},[t,s,e]);return{isEnabled:t,isLoading:s,toggle:i,enable:o,disable:a}}function Fd(){const{startScreenShare:e,stopScreenShare:t}=ft(),[n,s]=w.useState(!1),[r,i]=w.useState(!1),o=w.useCallback(async()=>{if(!(n||r)){i(!0);try{await e(),s(!0)}catch(d){console.error("Failed to start screen share:",d)}finally{i(!1)}}},[n,r,e]),a=w.useCallback(async()=>{if(!(!n||r)){i(!0);try{await t(),s(!1)}catch(d){console.error("Failed to stop screen share:",d)}finally{i(!1)}}},[n,r,t]),c=w.useCallback(async()=>{n?await a():await o()},[n,o,a]);return{isSharing:n,isLoading:r,start:o,stop:a,toggle:c}}function vx(){const{client:e}=ft(),[t,n]=w.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),s=w.useMemo(()=>t.tracks.find(m=>m.isLocal),[t.tracks]),r=w.useMemo(()=>t.tracks.filter(m=>!m.isLocal),[t.tracks]),i=w.useCallback(async()=>{try{s!=null&&s.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(m){throw console.error("Failed to toggle camera:",m),m}},[e,s]),o=w.useCallback(async()=>{try{t.tracks.find(b=>b.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(m){throw console.error("Failed to toggle screen share:",m),m}},[e,t.tracks]),a=w.useCallback(m=>{n(b=>({...b,layout:m}))},[]),c=w.useCallback(m=>{n(b=>({...b,pinnedTrack:m}))},[]),d=w.useCallback(()=>{n(m=>({...m,pinnedTrack:void 0}))},[]),u=w.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(m=>({...m,isRecording:!0}))}catch(m){throw console.error("Failed to start recording:",m),m}},[e]),f=w.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(m=>({...m,isRecording:!1}))}catch(m){throw console.error("Failed to stop recording:",m),m}},[e]),h=w.useCallback(m=>t.tracks.find(b=>b.id===m),[t.tracks]),p=w.useCallback(m=>t.tracks.filter(b=>b.participantId===m),[t.tracks]),x=w.useCallback(m=>m.isEnabled&&t.tracks.includes(m),[t.tracks]);return w.useEffect(()=>{if(!e)return;const m=C=>{n(T=>({...T,tracks:[...T.tracks.filter(k=>k.id!==C.id),C]}))},b=C=>{n(T=>{var k;return{...T,tracks:T.tracks.filter(v=>v.id!==C),pinnedTrack:((k=T.pinnedTrack)==null?void 0:k.id)===C?void 0:T.pinnedTrack}})},S=C=>{n(T=>({...T,tracks:T.tracks.map(k=>k.id===C.id?C:k)}))};return e.on("videoTrackAdded",m),e.on("videoTrackRemoved",b),e.on("videoTrackUpdated",S),()=>{e.off("videoTrackAdded",m),e.off("videoTrackRemoved",b),e.off("videoTrackUpdated",S)}},[e]),{tracks:t.tracks,localTrack:s,remoteTraracks:r,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:i,toggleScreenShare:o,setLayout:a,pinTrack:c,unpinTrack:d,startRecording:u,stopRecording:f,getTrackById:h,getTracksByParticipant:p,isTrackActive:x}}function Bs(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=ft(),[s,r]=w.useState(!1),i=w.useCallback(async d=>{if(!(!d.trim()||s||!n)){r(!0);try{await t(d.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{r(!1)}}},[t,s,n]),{userMessages:o,agentMessages:a,allMessages:c}=w.useMemo(()=>{const d=e.filter(f=>f.sender.type==="participant"),u=e.filter(f=>f.sender.type==="agent");return{userMessages:d,agentMessages:u,allMessages:e}},[e]);return{messages:c,userMessages:o,agentMessages:a,messageCount:c.length,isSending:s,canSend:!!n&&!s,send:i}}function wx(){const{send:e,isSending:t,canSend:n}=Bs(),[s,r]=w.useState(""),i=w.useCallback(async()=>{if(!(!s.trim()||!n))try{await e(s),r("")}catch(a){throw a}},[s,e,n]),o=w.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),i())},[i]);return{value:s,setValue:r,send:i,handleKeyPress:o,isSending:t,canSend:n&&s.trim().length>0}}function Ko(){const{isConnected:e,isConnecting:t,connectionError:n,connect:s,disconnect:r}=ft(),i=w.useCallback(async()=>{if(!(e||t))try{await s()}catch(a){throw console.error("Failed to connect:",a),a}},[s,e,t]),o=w.useCallback(async()=>{if(e)try{await r()}catch(a){throw console.error("Failed to disconnect:",a),a}},[r,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:i,disconnect:o}}function Od(){const{participants:e}=ft();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Ld=w.createContext({}),Zn=()=>w.useContext(Ld);function _d({children:e,...t}){return l.jsx(Ld.Provider,{value:t,children:e})}function gs({name:e,children:t,fallback:n,className:s}){return l.jsx("div",{className:`voxket-slot voxket-slot--${e} ${s||""}`,children:t||n})}function Bd(e,t={}){return Object.assign(e,t)}function Ud({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:s=!0,customControls:r,className:i=""}){const o=Wt(),a=Dd(),c=$d(),d=Fd(),u=Zn(),f=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,o.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",i].filter(Boolean).join(" ");return!o.isActive&&!s?l.jsx("div",{className:f,children:l.jsx("div",{className:"voxket-controls-inactive",children:l.jsx("p",{children:"Controls available during active session"})})}):l.jsxs("div",{className:f,children:[s&&l.jsx("div",{className:"voxket-session-actions",children:o.isActive?l.jsx("button",{onClick:o.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):l.jsx(Sx,{})}),o.isActive&&l.jsxs("div",{className:"voxket-media-controls",children:[e&&l.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[l.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&l.jsxs("button",{onClick:c.toggle,disabled:c.isLoading,className:`voxket-button voxket-button--media ${c.isEnabled?"voxket-button--active":""}`,title:c.isEnabled?"Stop camera":"Start camera",children:[l.jsx("span",{className:"voxket-icon",children:"📹"}),c.isLoading?"Loading...":c.isEnabled?"Stop Video":"Start Video"]}),n&&l.jsxs("button",{onClick:d.toggle,disabled:d.isLoading,className:`voxket-button voxket-button--media ${d.isSharing?"voxket-button--active":""}`,title:d.isSharing?"Stop screen share":"Start screen share",children:[l.jsx("span",{className:"voxket-icon",children:"🖥️"}),d.isLoading?"Loading...":d.isSharing?"Stop Share":"Share Screen"]})]}),r&&l.jsx("div",{className:"voxket-custom-controls",children:r})]})}function Sx(){Wt();const[e,t]=w.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(s){console.error("Failed to start session:",s)}finally{t(!1)}};return l.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function Yo({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:s=""}){const r=Wt(),i=Ko(),o=Zn(),a=["voxket-session-header",`voxket-session-header--${o.variant||"default"}`,`voxket-session-header--${o.size||"md"}`,s].filter(Boolean).join(" ");return l.jsxs("div",{className:a,children:[e&&l.jsxs("div",{className:"voxket-connection-status",children:[l.jsx("div",{className:`voxket-status-indicator ${i.isConnected?"connected":"disconnected"}`}),l.jsx("span",{className:"voxket-status-text",children:i.isConnecting?"Connecting...":i.isConnected?"Connected":"Disconnected"})]}),t&&r.session&&l.jsxs("div",{className:"voxket-session-info",children:[l.jsxs("div",{className:"voxket-session-id",children:["Session: ",r.session.id.slice(-8)]}),l.jsxs("div",{className:"voxket-session-state",children:["State: ",r.state]})]}),n&&r.session&&l.jsxs("div",{className:"voxket-agent-info",children:[l.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",r.session.agentId]}),l.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",r.session.activeModalities.join(", ")]})]}),i.error&&l.jsxs("div",{className:"voxket-error-message",children:["Error: ",i.error.message]})]})}function qo({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:s=""}){const r=Wt(),i=Bs(),o=Zn(),a=["voxket-session-content",`voxket-session-content--${o.variant||"default"}`,`voxket-session-content--${o.size||"md"}`,s].filter(Boolean).join(" ");return r.isActive?l.jsx("div",{className:a,children:n||l.jsxs(l.Fragment,{children:[e&&l.jsxs("div",{className:"voxket-chat-container",children:[l.jsxs("div",{className:"voxket-chat-messages",children:[i.messages.map(c=>l.jsxs("div",{className:`voxket-message voxket-message--${c.sender.type}`,children:[l.jsxs("div",{className:"voxket-message-header",children:[l.jsx("span",{className:"voxket-message-sender",children:c.sender.name}),l.jsx("span",{className:"voxket-message-time",children:c.timestamp.toLocaleTimeString()})]}),l.jsx("div",{className:"voxket-message-content",children:c.content})]},c.id)),i.messages.length===0&&l.jsx("div",{className:"voxket-empty-messages",children:l.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),l.jsx(Cx,{})]}),t&&l.jsx("div",{className:"voxket-transcriptions",children:l.jsx("div",{className:"voxket-transcription-placeholder",children:l.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):l.jsx("div",{className:a,children:l.jsx("div",{className:"voxket-inactive-state",children:l.jsxs("div",{className:"voxket-inactive-message",children:[l.jsx("h3",{children:"Start a conversation"}),l.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function Cx(){const e=Bs(),[t,n]=w.useState(""),s=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(i){console.error("Failed to send message:",i)}},r=i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),s())};return l.jsxs("div",{className:"voxket-chat-input",children:[l.jsx("input",{type:"text",value:t,onChange:i=>n(i.target.value),onKeyPress:r,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),l.jsx("button",{onClick:s,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function Xo({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:s,className:r=""}){const i=Wt(),o=Id(),a=Od(),c=Zn(),d=["voxket-session-footer",`voxket-session-footer--${c.variant||"default"}`,`voxket-session-footer--${c.size||"md"}`,r].filter(Boolean).join(" ");return i.isActive?l.jsx("div",{className:d,children:s||l.jsxs(l.Fragment,{children:[n&&l.jsxs("div",{className:"voxket-session-status",children:[l.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),l.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&o.metrics&&l.jsxs("div",{className:"voxket-session-metrics",children:[l.jsxs("div",{className:"voxket-metric",children:[l.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),l.jsx("span",{className:"voxket-metric-value",children:kx(o.duration||0)})]}),l.jsxs("div",{className:"voxket-metric",children:[l.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),l.jsx("span",{className:"voxket-metric-value",children:o.metrics.messageCount})]})]}),t&&l.jsxs("div",{className:"voxket-participants-info",children:[l.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&l.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>l.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):l.jsx("div",{className:d,children:l.jsx("div",{className:"voxket-footer-inactive",children:l.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function kx(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),s=Math.floor(n/60);return s>0?`${s}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function Tx({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:s,onSessionEnd:r,variant:i="default",size:o="md",theme:a,className:c="",children:d}){var p;const u=Wt(),f=Ko();w.useEffect(()=>{n&&e&&f.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,f.isConnected,u.isActive]),w.useEffect(()=>{var x;(x=u.session)!=null&&x.id&&s&&s(u.session.id)},[(p=u.session)==null?void 0:p.id,s]),w.useEffect(()=>()=>{u.isActive&&r&&u.stop().then(r).catch(console.error)},[]);const h=["voxket-session",`voxket-session--${i}`,`voxket-session--${o}`,u.isActive?"voxket-session--active":"voxket-session--inactive",c].filter(Boolean).join(" ");return l.jsx(_d,{variant:i,size:o,theme:a,className:c,children:l.jsx("div",{className:h,children:d||l.jsxs(l.Fragment,{children:[l.jsx(gs,{name:"header",fallback:l.jsx(Yo,{})}),l.jsx(gs,{name:"content",fallback:l.jsx(qo,{})}),l.jsx(gs,{name:"footer",fallback:l.jsx(Xo,{})})]})})})}const Hd=Bd(Tx,{Header:Yo,Content:qo,Footer:Xo,Controls:Ud}),Ht={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Kr={...Ht,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},Yr={...Ht,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},zd=w.createContext(null),Wd=()=>{const e=w.useContext(zd);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function Ex({theme:e="default",themes:t={},children:n,cssVariables:s=!0,className:r=""}){const[i,o]=w.useState(()=>{const h={default:Ht,dark:Kr,enterprise:Yr,...t};return typeof e=="string"?h[e]||Ht:e}),[a,c]=w.useState(()=>({default:Ht,dark:Kr,enterprise:Yr,...t})),d=h=>{if(typeof h=="string"){const p=a[h];p&&o(p)}else o(h)},u=h=>{c(p=>({...p,[h.name]:h}))};w.useEffect(()=>{if(s&&typeof document<"u"){const h=document.documentElement;Object.entries(Zd(i)).forEach(([p,x])=>{h.style.setProperty(`--voxket-${p}`,x)})}},[i,s]);const f={theme:i,setTheme:d,themes:a,registerTheme:u};return l.jsx(zd.Provider,{value:f,children:l.jsx("div",{className:`voxket-theme voxket-theme--${i.name} ${r}`,children:n})})}function Zd(e){const t={},n=(s,r="")=>{for(const[i,o]of Object.entries(s)){const a=r?`${r}-${i}`:i;typeof o=="object"&&o!==null&&!Array.isArray(o)?n(o,a):t[a]=String(o)}};return n(e),t}function Ax(e=Ht,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function jx(e){var n;const{theme:t}=Wd();return((n=t.components)==null?void 0:n[e])||{}}const Nx=Go("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&Mx(e),t.enableVoiceActivation&&Vx(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&Px(e,t)}});function Mx(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function Vx(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function Px(e,t){console.log("Playing audio response:",t.content)}const Rx=Go("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&Ix(),t.enableFileUpload&&Dx(e),t.enableCustomComponents&&$x(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?Fx(e,t):t.type==="text"&&n.enableRichText&&Ox(e,t)}});function Ix(e){console.log("Rich text support enabled")}function Dx(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function $x(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",Lx),t.set("form",_x),t.set("card",Bx),t.set("chart",Ux)}function Fx(e,t){const{componentType:n,props:s}=t.metadata;console.log("Rendering custom component:",n,s),e.emit("chat.component.render",{type:n,props:s,timestamp:new Date})}function Ox(e,t){console.log("Processing rich text message:",t.content)}function Lx(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function _x(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function Bx(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function Ux(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function ps({track:e,participantName:t,showControls:n=!0,showName:s=!0,showMuteIndicator:r=!0,isPinned:i=!1,className:o="",onClick:a,onPin:c,onUnpin:d}){const u=w.useRef(null),[f,h]=w.useState(!1);w.useEffect(()=>{if(!u.current||!e.isEnabled)return;const b=u.current;return b.srcObject=null,()=>{b.srcObject&&(b.srcObject=null)}},[e]);const p=()=>{a==null||a(e)},x=b=>{b.stopPropagation(),i?d==null||d(e):c==null||c(e)},m=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",i?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",f?"voxket-video-tile--hovered":"",o].filter(Boolean).join(" ");return l.jsxs("div",{className:m,onClick:p,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[l.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&l.jsxs("div",{className:"voxket-video-placeholder",children:[l.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),l.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),l.jsxs("div",{className:"voxket-video-overlay",children:[s&&t&&l.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),r&&!e.isEnabled&&l.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(f||i)&&l.jsxs("div",{className:"voxket-video-controls",children:[l.jsx("button",{className:`voxket-video-control-btn ${i?"voxket-video-control-btn--active":""}`,onClick:x,title:i?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&l.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&l.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&l.jsx("div",{className:"voxket-video-loading",children:l.jsx("div",{className:"voxket-spinner"})})]})}function Hx({tracks:e,layout:t,className:n="",onLayoutChange:s,onTrackClick:r,maxVisibleTracks:i=9,showPagination:o=!0}){const[a,c]=w.useState(0),[d,u]=w.useState(null),f=w.useMemo(()=>{let C=[...e];t.type==="speaker"&&d&&(C=[d,...e.filter(v=>v.id!==d.id)]);const T=a*i,k=T+i;return C.slice(T,k)},[e,t,d,a,i]),h=Math.ceil(e.length/i),p=w.useMemo(()=>{const C=f.length;switch(t.type){case"grid":const T=Math.ceil(Math.sqrt(C)),k=Math.ceil(C/T);return{display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gridTemplateRows:`repeat(${k}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,f.length]),x=C=>{u(C)},m=()=>{u(null)},b=C=>{s==null||s({...t,type:C})},S=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${f.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?l.jsx("div",{className:"voxket-video-grid-empty",children:l.jsxs("div",{className:"voxket-video-grid-empty-content",children:[l.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),l.jsx("p",{children:"No video tracks available"})]})}):l.jsxs("div",{className:S,children:[l.jsxs("div",{className:"voxket-video-grid-controls",children:[l.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(C=>l.jsx("button",{className:`voxket-layout-btn ${t.type===C?"voxket-layout-btn--active":""}`,onClick:()=>b(C),title:`Switch to ${C} layout`,children:zx(C)},C))}),l.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),l.jsx("div",{className:"voxket-video-grid-content",style:p,children:t.type==="speaker"&&d?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"voxket-video-speaker-main",children:l.jsx(ps,{track:d,participantName:`Participant ${d.participantId}`,isPinned:!0,onClick:r,onUnpin:m})}),l.jsx("div",{className:"voxket-video-speaker-sidebar",children:f.filter(C=>C.id!==d.id).map(C=>l.jsx(ps,{track:C,participantName:`Participant ${C.participantId}`,showControls:!1,onClick:r,onPin:x},C.id))})]}):f.map(C=>l.jsx(ps,{track:C,participantName:`Participant ${C.participantId}`,isPinned:(d==null?void 0:d.id)===C.id,onClick:r,onPin:x,onUnpin:m},C.id))}),o&&h>1&&l.jsxs("div",{className:"voxket-video-pagination",children:[l.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.max(0,a-1)),disabled:a===0,children:"←"}),l.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",h]}),l.jsx("button",{className:"voxket-pagination-btn",onClick:()=>c(Math.min(h-1,a+1)),disabled:a===h-1,children:"→"})]})]})}function zx(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function Wx({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:s,showLayoutControls:r=!0,showCameraControls:i=!0,showScreenShareControls:o=!0,className:a=""}){const c=["voxket-video-controls",a].filter(Boolean).join(" "),d=u=>{s==null||s({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return l.jsxs("div",{className:c,children:[i&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),l.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[l.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),l.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&l.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),o&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),l.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[l.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),l.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),r&&l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),l.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:f,label:h})=>l.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>d(u),title:`Switch to ${h} layout`,children:[l.jsx("span",{className:"voxket-control-icon",children:f}),l.jsx("span",{className:"voxket-control-label",children:h})]},u))})]}),l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),l.jsxs("div",{className:"voxket-video-settings",children:[l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Quality"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"high",children:"High (720p)"}),l.jsx("option",{value:"medium",children:"Medium (480p)"}),l.jsx("option",{value:"low",children:"Low (240p)"})]})]}),l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"30",children:"30 fps"}),l.jsx("option",{value:"15",children:"15 fps"}),l.jsx("option",{value:"10",children:"10 fps"})]})]}),l.jsxs("div",{className:"voxket-setting-group",children:[l.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),l.jsxs("select",{className:"voxket-setting-select",children:[l.jsx("option",{value:"unlimited",children:"Unlimited"}),l.jsx("option",{value:"1000",children:"1 Mbps"}),l.jsx("option",{value:"500",children:"500 Kbps"}),l.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),l.jsxs("div",{className:"voxket-video-controls-section",children:[l.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),l.jsxs("div",{className:"voxket-video-stats",children:[l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),l.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Source:"}),l.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),l.jsxs("div",{className:"voxket-stat-item",children:[l.jsx("span",{className:"voxket-stat-label",children:"Status:"}),l.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const Gd=({handler:e,loadData:t,data:n,client:s,addLocalMessage:r})=>{const[i,o]=g.useState(null),[a,c]=g.useState(!0),[d,u]=g.useState(!1),[f]=g.useState(Date.now());g.useEffect(()=>{(async()=>{try{if(c(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const b={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};o(b),console.log("📋 AssignmentView: Assignment loaded from RPC data:",b)}}catch(b){console.error("📋 AssignmentView: Error loading assignment:",b),o({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{c(!1)}})()},[n,t]);const h=({message:m,assignment:b})=>{const S=m.toLowerCase().includes("declined"),C=S?"bg-red-50 border-red-200":"bg-green-50 border-green-200",T=S?"text-red-700":"text-green-700",k=S?"❌":"🎉";return l.jsxs("div",{className:`max-w-sm mx-auto ${C} border rounded-lg shadow p-3 flex flex-col items-center`,children:[l.jsx("div",{className:"text-2xl mb-2",children:k}),l.jsx("div",{className:`${T} font-semibold text-sm mb-1`,children:m}),l.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:b.title}),l.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},p=async()=>{if(!(!i||!e)){u(!0);try{const m={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",m),e.didSuccess(m,l.jsx(h,{message:"Assignment accepted!",assignment:i}))}catch(m){console.error("📋 AssignmentView: Error accepting assignment:",m),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},x=async()=>{if(!(!i||!e)){u(!0);try{const m={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",m),e.didSuccess(m,l.jsx(h,{message:"Assignment declined",assignment:i}))}catch(m){console.error("📋 AssignmentView: Error declining assignment:",m),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?l.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:l.jsxs("div",{className:"flex items-center justify-center py-4",children:[l.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),l.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):i?l.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[l.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:l.jsx("div",{className:"flex items-center justify-between",children:l.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:i.title})})}),l.jsxs("div",{className:"p-3 text-black",children:[l.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:l.jsx("p",{className:"text-xs text-black leading-snug",children:i.description})}),l.jsx("div",{className:"mb-3 text-black",children:l.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[l.jsx("span",{className:"text-xs mr-1",children:"📅"}),l.jsxs("span",{children:["Est: ",i.estimated_time_of_completion]})]})}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:p,disabled:d,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:d?l.jsxs("span",{className:"flex items-center justify-center",children:[l.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),l.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),l.jsx("button",{onClick:x,disabled:d,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):l.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:l.jsxs("div",{className:"text-center py-4",children:[l.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),l.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function Zx(){const[e,t]=g.useState(null),[n,s]=g.useState([]);g.useEffect(()=>{const a=new Wn({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",c=>{console.log("RPC Method Called:",c)}),a.on("rpc.interaction.completed",c=>{console.log("RPC Interaction Completed:",c)}),()=>{a.disconnect()}},[]);const r=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",Gd,"embedded");const a=e.getRegisteredRpcMethods();s(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},i=async()=>{if(!e)return;const a=({handler:c,timeout:d})=>{const[u,f]=g.useState(""),h=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],p=m=>{f(m)},x=()=>{const m=h.find(b=>b.id===u);c==null||c.didSuccess({selectedProduct:u,productName:m==null?void 0:m.name,price:m==null?void 0:m.price,timestamp:new Date().toISOString()})};return l.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[l.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),l.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),l.jsx("div",{className:"space-y-3 mb-6",children:h.map(m=>l.jsx("div",{onClick:()=>p(m.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===m.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-medium",children:m.name}),l.jsx("p",{className:"text-gray-600 text-sm",children:m.price})]}),l.jsx("div",{className:`w-4 h-4 rounded-full ${u===m.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},m.id))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),l.jsx("button",{onClick:x,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),d&&l.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",d," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const c=e.getRegisteredRpcMethods();s(c),console.log("✅ Product Recommendation RPC registered successfully")}catch(c){console.error("❌ Failed to register product recommendation RPC:",c)}},o=async()=>{if(!e)return;const a=({handler:c})=>{const[d,u]=g.useState(0),[f,h]=g.useState(""),p=()=>{c==null||c.didSuccess({rating:d,comment:f,timestamp:new Date().toISOString()})};return l.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),l.jsxs("div",{className:"mb-4",children:[l.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),l.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(x=>l.jsx("button",{onClick:()=>u(x),className:`text-2xl ${x<=d?"text-yellow-400":"text-gray-300"}`,children:"⭐"},x))})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),l.jsx("textarea",{value:f,onChange:x=>h(x.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[l.jsx("button",{onClick:()=>c==null?void 0:c.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),l.jsx("button",{onClick:p,disabled:d===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const c=e.getRegisteredRpcMethods();s(c),console.log("✅ Feedback RPC registered successfully")}catch(c){console.error("❌ Failed to register feedback RPC:",c)}};return l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),l.jsxs("div",{className:"space-y-4 mb-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),l.jsxs("div",{className:"space-x-2",children:[l.jsx("button",{onClick:r,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),l.jsx("button",{onClick:i,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),l.jsx("button",{onClick:o,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?l.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>l.jsx("li",{className:"text-gray-700",children:l.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):l.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),l.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),l.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[l.jsxs("li",{children:["Register RPC methods with React components using ",l.jsx("code",{children:"client.registerFrontendRPC()"})]}),l.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),l.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),l.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),l.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),l.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),l.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),l.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
163
+ `,style:{minHeight:"2.5rem",display:o===r?"block":"none"},children:s},o))})}function FE({statusMessage:e,theme:t}){const n=tt(t);return f.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[f.jsx("div",{className:n.statusIndicator}),f.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const Dm=j.forwardRef(({disabled:e,onStartCall:t,onStartChat:n,onStartVideo:r,prompts:i=['"Book a meeting with the marketing team"',`"What's the status of project Alpha?"`,`"Summarize yesterday's sales report"`,'"Find a good Italian restaurant nearby"','"Remind me to call John tomorrow at 10 AM"'],statusMessage:s="Agent is ready",title:o="Choose how to interact",subTitle:a="Ask me anything or give me a task to complete",theme:l="vox",modalities:c=["voice","chat","video"]},u)=>{const d=tt(l),h=c.includes("voice"),m=c.includes("chat"),g=c.includes("video"),p=[h,m,g].filter(Boolean).length;return f.jsxs("div",{className:"flex p-8 flex-col items-center h-full justify-center w-full relative","aria-disabled":e,style:{background:"transparent"},children:[f.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[f.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[f.jsx("div",{className:d.pulseRings.ring1}),f.jsx("div",{className:d.pulseRings.ring2,style:{animationDelay:"0.5s"}}),f.jsx("div",{className:d.pulseRings.ring3,style:{animationDelay:"1s"}})]}),f.jsx("div",{className:"relative z-10 flex items-center justify-center",children:h&&m&&g?f.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[f.jsx(oi,{onClick:t,disabled:e,theme:l}),f.jsx(Uo,{onClick:n,disabled:e,theme:l}),f.jsx(Wo,{onClick:r||t,disabled:e,theme:l})]}):p>1?f.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&f.jsx(oi,{onClick:t,disabled:e,theme:l}),m&&f.jsx(Uo,{onClick:n,disabled:e,theme:l}),g&&r&&f.jsx(Wo,{onClick:r,disabled:e,theme:l})]}):f.jsx("div",{className:"flex items-center justify-center",children:h?f.jsx(oi,{onClick:t,disabled:e,theme:l}):m?f.jsx(Uo,{onClick:n,disabled:e,theme:l}):g&&r?f.jsx(Wo,{onClick:r,disabled:e,theme:l}):f.jsx(oi,{onClick:t,disabled:e,theme:l})})})]}),f.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[f.jsx("h3",{className:`text-xl font-semibold mb-2 ${d.text.accent}`,children:o}),f.jsx("p",{className:`text-sm leading-relaxed px-4 ${d.text.secondary}`,children:a}),p>1&&f.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[h&&f.jsxs("div",{className:"flex flex-col items-center gap-1",children:[f.jsx(jh,{className:"w-4 h-4"}),f.jsx("span",{className:d.text.muted,children:"Voice"})]}),m&&f.jsxs("div",{className:"flex flex-col items-center gap-1",children:[f.jsx(Ah,{className:"w-4 h-4"}),f.jsx("span",{className:d.text.muted,children:"Chat"})]}),g&&f.jsxs("div",{className:"flex flex-col items-center gap-1",children:[f.jsx(Ph,{className:"w-4 h-4"}),f.jsx("span",{className:d.text.muted,children:"Video"})]})]})]}),f.jsx(DE,{prompts:i,theme:l}),f.jsx(FE,{statusMessage:s,theme:l})]})});Dm.displayName="Welcome";class Ya extends x.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("VoxketWidget Error:",t,n)}render(){if(this.state.hasError){if(this.props.fallback){const t=this.props.fallback;return x.createElement(t,{error:this.state.error})}return x.createElement("div",{style:{padding:"20px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"}},"VoxketWidget encountered an error. Please check the console for details.")}return this.props.children}}function Fm({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:r=!0,enableLocalStorage:i=!0,voxketSessionId:s}={}){const[o,a]=x.useState(null),[l,c]=x.useState([]),[u,d]=x.useState(null),[h,m]=x.useState([]),g=x.useCallback((k,S)=>{const A={timestamp:new Date,event:k,data:S,sessionId:o==null?void 0:o.sessionId,participantId:u==null?void 0:u.identity};if(c(T=>[...T,A]),i){const T=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");T.push(A),localStorage.setItem("voxket-session-logs",JSON.stringify(T))}return A},[o==null?void 0:o.sessionId,u==null?void 0:u.identity,r,i]);x.useEffect(()=>{if(!e)return;const k=()=>{const y=s||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,M=new Date,D={sessionId:y,startTime:M,totalMessages:0,connectionIssues:0,participantCount:h.length,events:[]};a(D),g("SESSION_STARTED",{sessionId:y,startTime:M}),n==null||n(y)},S=()=>{if(o){const y=new Date,M=y.getTime()-o.startTime.getTime(),D={...o,endTime:y,duration:M,events:l};g("SESSION_ENDED",{sessionId:o.sessionId,duration:`${Math.round(M/1e3)}s`,totalMessages:o.totalMessages,connectionIssues:o.connectionIssues}),t==null||t(D),a(null),c([])}},A=y=>{g("CONNECTION_STATE_CHANGED",{state:y}),y===te.ConnectionState.Reconnecting&&o&&(a(M=>M?{...M,connectionIssues:M.connectionIssues+1}:null),g("CONNECTION_ISSUE",{type:"reconnecting"}))},T=y=>{g("TRACK_PUBLISHED",{trackKind:y.kind,trackSource:y.source})},C=y=>{g("TRACK_UNPUBLISHED",{trackKind:y.kind,trackSource:y.source})},N=(y,M)=>{o&&a(D=>D?{...D,totalMessages:D.totalMessages+1}:null),g("DATA_RECEIVED",{participantId:M==null?void 0:M.identity,dataSize:y.length})},P=y=>{g("PARTICIPANT_CONNECTED",{participantId:y.identity,participantName:y.name}),m(M=>[...M,y]),o&&a(M=>M?{...M,participantCount:M.participantCount+1}:null)},L=y=>{g("PARTICIPANT_DISCONNECTED",{participantId:y.identity,participantName:y.name}),m(M=>M.filter(D=>D.identity!==y.identity))};return e.localParticipant&&d(e.localParticipant),e.on(te.RoomEvent.Connected,k),e.on(te.RoomEvent.Disconnected,S),e.on(te.RoomEvent.ConnectionStateChanged,A),e.on(te.RoomEvent.TrackPublished,T),e.on(te.RoomEvent.TrackUnpublished,C),e.on(te.RoomEvent.DataReceived,N),e.on(te.RoomEvent.ParticipantConnected,P),e.on(te.RoomEvent.ParticipantDisconnected,L),()=>{e.off(te.RoomEvent.Connected,k),e.off(te.RoomEvent.Disconnected,S),e.off(te.RoomEvent.ConnectionStateChanged,A),e.off(te.RoomEvent.TrackPublished,T),e.off(te.RoomEvent.TrackUnpublished,C),e.off(te.RoomEvent.DataReceived,N),e.off(te.RoomEvent.ParticipantConnected,P),e.off(te.RoomEvent.ParticipantDisconnected,L)}},[e,o,l,h.length,g,t,n]);const p=x.useCallback(()=>i?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):l,[l,i]),b=x.useCallback(()=>{i&&localStorage.removeItem("voxket-session-logs"),c([])},[i]),v=x.useCallback(()=>{const k=p(),S=JSON.stringify(k,null,2),A="data:application/json;charset=utf-8,"+encodeURIComponent(S),T=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,C=nh("a");C&&(C.setAttribute("href",A),C.setAttribute("download",T),C.click())},[p]);return{sessionMetrics:o,sessionLogs:l,logEvent:g,getSessionLogs:p,clearSessionLogs:b,exportSessionLogs:v}}class Xa{constructor(){Ue(this,"listeners",{})}on(t,n){return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(n),()=>this.off(t,n)}once(t,n){const r=(...i)=>{this.off(t,r),n(...i)};return this.on(t,r)}off(t,n){const r=this.listeners[t];if(!r)return;const i=r.indexOf(n);i>-1&&r.splice(i,1)}removeAllListeners(t){t?delete this.listeners[t]:this.listeners={}}emit(t,...n){const r=this.listeners[t];if(!r)return;const i=[...r];for(const s of i)try{s(...n)}catch(o){console.error(`Error in event listener for ${String(t)}:`,o)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class Lm{constructor(t){Ue(this,"plugins",new Map);Ue(this,"installedPlugins",new Set);Ue(this,"context");this.context={client:t,emit:t.emit.bind(t),on:t.on.bind(t),config:{}}}register(t){if(this.plugins.has(t.name))throw new Error(`Plugin '${t.name}' is already registered`);if(t.dependencies){for(const n of t.dependencies)if(!this.plugins.has(n))throw new Error(`Plugin '${t.name}' depends on '${n}' which is not registered`)}this.plugins.set(t.name,t)}async install(t,n){const r=this.plugins.get(t);if(!r)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t))throw new Error(`Plugin '${t}' is already installed`);if(r.dependencies)for(const s of r.dependencies)this.installedPlugins.has(s)||await this.install(s);const i={...this.context,config:{...r.config,...n}};r.install&&await r.install(i),this.installedPlugins.add(t),this.setupPluginEvents(r,i)}async uninstall(t){var r;const n=this.plugins.get(t);if(!n)throw new Error(`Plugin '${t}' is not registered`);if(this.installedPlugins.has(t)){for(const[i,s]of this.plugins)if(this.installedPlugins.has(i)&&((r=s.dependencies)!=null&&r.includes(t)))throw new Error(`Cannot uninstall '${t}' because '${i}' depends on it`);n.uninstall&&await n.uninstall(this.context),this.installedPlugins.delete(t)}}isInstalled(t){return this.installedPlugins.has(t)}getInstalledPlugins(){return Array.from(this.installedPlugins)}getAvailablePlugins(){return Array.from(this.plugins.keys())}getPluginInfo(t){return this.plugins.get(t)}setupPluginEvents(t,n){t.onSessionStart&&n.on("session.started",r=>{t.onSessionStart(n,r.id)}),t.onSessionEnd&&n.on("session.ended",r=>{t.onSessionEnd(n,r.id)}),t.onAgentResponse&&n.on("agent.response",r=>{t.onAgentResponse(n,r)})}}function LE(e){return e}function Qa(e,t,n){return{name:e,version:"1.0.0",description:`${t} modality plugin`,install:async r=>{n.onActivate&&await n.onActivate(r)},uninstall:async r=>{n.onDeactivate&&await n.onDeactivate(r)},onAgentResponse:n.onMessage}}const OE={name:"analytics",version:"1.0.0",description:"Built-in analytics tracking",install:async e=>{console.log("Analytics plugin installed"),e.on("session.started",t=>{console.log("Analytics: Session started",t.id)}),e.on("session.ended",(t,n)=>{console.log("Analytics: Session ended",t.id,n)}),e.on("chat.message.sent",t=>{console.log("Analytics: User message sent",t.content.length)})}},$E={name:"debug",version:"1.0.0",description:"Debug logging and development tools",install:async e=>{console.log("Debug plugin installed");const t=e.emit;e.emit=(n,...r)=>(console.log(`[Debug] Event: ${String(n)}`,r),t(n,...r))}},_E={name:"metrics",version:"1.0.0",description:"Advanced metrics collection",install:async e=>{console.log("Metrics plugin installed");const t=new Map;e.on("session.started",n=>{t.set(n.id,{startTime:Date.now(),events:[]})}),e.on("agent.response",n=>{console.log("Metrics: Agent response analyzed",{type:n.type,length:n.content.length,timestamp:n.timestamp})})}},Om=j.createContext(null);function fi({config:e,children:t,autoConnect:n=!1,client:r}){const[i,s]=j.useState(null),[o,a]=j.useState(!1),[l,c]=j.useState(!1),[u,d]=j.useState(null),[h,m]=j.useState(null),[g,p]=j.useState("idle"),[b,v]=j.useState(null),[k,S]=j.useState([]),[A,T]=j.useState([]),[C,N]=j.useState([]);j.useEffect(()=>{const W=r||new zr(e);s(W);const w=P(W);return n&&!r&&L(W),()=>{w(),r||W.disconnect().catch(console.error)}},[e,n,r]);const P=W=>{const w=()=>{c(!0),d(null)},z=()=>{a(!0),c(!1),d(null)},oe=()=>{a(!1),c(!1),m(null),p("idle"),S([]),T([]),N([])},E=re=>{d(re),c(!1)},U=re=>{m(re),p(re.state)},se=re=>{p(re),h&&m({...h,state:re})},$=(re,ne)=>{m(null),p("idle"),v(ne),S([]),T([]),N([])},ee=re=>{S(ne=>[...ne,re])},Q=re=>{S(ne=>ne.filter(me=>me.id!==re.id))},V=re=>{T(ne=>[...ne,re])},G=re=>{T(ne=>[...ne,re])},fe=re=>{console.log("📝 VoxketProvider: Received transcription:",re),N(ne=>ne.find(Z=>Z.id===re.id)?(console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:",re.id),ne):(console.log("📝 VoxketProvider: Adding new transcription:",re.id),[...ne,re]))},R=()=>{console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"),T([]),N([])};return W.on("connection.connecting",w),W.on("connection.connected",z),W.on("connection.disconnected",oe),W.on("connection.error",E),W.on("session.created",U),W.on("session.state.changed",se),W.on("session.ended",$),W.on("participant.joined",ee),W.on("participant.left",Q),W.on("chat.message.received",V),W.on("chat.message.sent",G),W.on("transcription.received",fe),W.on("chat.history.cleared",R),()=>{console.log("📝 VoxketProvider: Cleaning up event listeners"),W.off("connection.connecting",w),W.off("connection.connected",z),W.off("connection.disconnected",oe),W.off("connection.error",E),W.off("session.created",U),W.off("session.state.changed",se),W.off("session.ended",$),W.off("participant.joined",ee),W.off("participant.left",Q),W.off("chat.message.received",V),W.off("chat.message.sent",G),W.off("chat.history.cleared",R),W.off("transcription.received",fe)}},L=async W=>{const w=W||i;if(w)try{await w.connect()}catch(z){console.error("Failed to connect:",z)}},F={client:i,isConnected:o,isConnecting:l,connectionError:u,currentSession:h,sessionState:g,sessionMetrics:b,participants:k,chatMessages:A,transcriptions:C,connect:()=>L(),disconnect:async()=>{if(i)try{await i.disconnect()}catch(W){console.error("Failed to disconnect:",W)}},createSession:async(W,w={})=>{if(!i)throw new Error("Client not initialized");const z={agentId:W,participantName:w.participantName||"User",metadata:w.metadata,modalities:w.modalities||["voice"]};return await i.createSession(z)},endSession:async()=>i?await i.endSession():null,sendChatMessage:async W=>{if(!i)throw new Error("Client not initialized");await i.sendChatMessage(W)},setMicrophoneEnabled:async W=>{if(!i)throw new Error("Client not initialized");await i.setMicrophoneEnabled(W)},setCameraEnabled:async W=>{if(!i)throw new Error("Client not initialized");await i.setCameraEnabled(W)},startScreenShare:async()=>{if(!i)throw new Error("Client not initialized");await i.startScreenShare()},stopScreenShare:async()=>{if(!i)throw new Error("Client not initialized");await i.stopScreenShare()}};return f.jsx(Om.Provider,{value:F,children:t})}function Ft(){const e=j.useContext(Om);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class BE extends Xa{constructor(n){super();Ue(this,"room",null);Ue(this,"registeredMethods",new Map);Ue(this,"activeInteractions",new Map);Ue(this,"currentInteraction",null);n&&this.setRoom(n)}setRoom(n){this.room=n}async registerFrontendRPC(n,r,i="embedded"){if(console.log(`RpcManager: Starting registration for method '${n}'`),!this.room)throw console.error(`RpcManager: Cannot register '${n}' - no room instance`),new Error("Room not initialized. Cannot register RPC method.");if(!this.room.localParticipant)throw console.error(`RpcManager: Cannot register '${n}' - no local participant`),new Error("Local participant not available for RPC registration");console.log(`RpcManager: Room state: ${this.room.state}`),console.log(`RpcManager: Local participant: ${this.room.localParticipant.identity}`),console.log(`RpcManager: Registering frontend RPC method: ${n}`);const s={methodName:n,component:r,presentationMode:i};this.registeredMethods.set(n,s);try{this.room.registerRpcMethod(n,async o=>{console.log(`RpcManager: RPC method '${n}' called by ${o.callerIdentity}`),console.log("RpcManager: Payload:",o.payload),this.emit("rpc.method.called",{methodName:n,data:o});let a;console.log(`RpcManager: Current registration for '${n}':`,s);let l=o.responseTimeout||30;try{a=JSON.parse(o.payload)}catch{a=o.payload}try{const c=await this.awaitUserInteraction(n,r,i,a,l);return JSON.stringify(c)}catch(c){throw console.error(`RpcManager: Error in RPC method '${n}':`,c),c}}),this.emit("rpc.method.registered",{methodName:n}),console.log(`RpcManager: Successfully registered RPC method: ${n}`)}catch(o){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,o),o}}async awaitUserInteraction(n,r,i,s,o){return new Promise((a,l)=>{const c=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${o} seconds`);const u={didSuccess:(h,m)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,h),this.clearInteraction(c),this.currentInteraction=null;const g={success:!0,message:"User interaction completed successfully",data:h,timestamp:new Date,...m?{successView:m}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:g}),a(g)},didFail:h=>{console.log(`RpcManager: User interaction failed for method: ${n}`,h),this.clearInteraction(c);const m={success:!1,message:"User interaction failed",error:h,timestamp:new Date};this.emit("rpc.interaction.completed",{methodName:n,response:m}),a(m)},dismissView:()=>{var m;console.log(`RpcManager: User dismissed interaction for method: ${n}`),console.log("RpcManager: Current interaction before dismiss:",(m=this.currentInteraction)==null?void 0:m.methodName),this.clearInteraction(c),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const h={success:!0,data:{dismissed:!0,reason:"User dismissed the interaction"},message:"User interaction dismissed",timestamp:new Date};this.emit("rpc.interaction.dismissed",{methodName:n,response:h}),this.emit("rpc.interaction.completed",{methodName:n,response:h}),setTimeout(()=>{var g;((g=this.currentInteraction)==null?void 0:g.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(h)},didTimeout:h=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(c),this.currentInteraction=null;const m={success:!0,message:`User interaction timed out after ${o} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...h?{timeoutView:h}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:m}),setTimeout(()=>{var g;((g=this.currentInteraction)==null?void 0:g.methodName)===n&&(console.log(`RpcManager: Force clearing interaction for ${n}`),this.currentInteraction=null)},0),a(m)}},d=setTimeout(()=>{u.didTimeout&&u.didTimeout()},o);this.activeInteractions.set(c,{resolve:h=>a(JSON.parse(h)),reject:l,timeoutId:d}),this.currentInteraction={isVisible:!0,methodName:n,component:r,presentationMode:i,timeout:o,data:s,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:i}),setTimeout(async()=>{var h;if((h=this.currentInteraction)!=null&&h.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,s)}catch(m){console.error("RpcManager: Error loading data into component:",m),u.didFail({error:"Failed to load data into component"})}},100)})}clearInteraction(n){const r=this.activeInteractions.get(n);r&&(console.log(`RpcManager: Clearing interaction: ${n}`),clearTimeout(r.timeoutId),this.activeInteractions.delete(n))}getCurrentInteraction(){return this.currentInteraction}dismissCurrentInteraction(){var n;this.currentInteraction&&(console.log(`RpcManager: Dismissing current interaction: ${this.currentInteraction.methodName}`),(n=this.currentInteraction.handler)==null||n.dismissView(),setTimeout(()=>{this.currentInteraction&&(console.log("RpcManager: Force clearing lingering interaction"),this.currentInteraction=null)},0))}getRegisteredMethods(){return Array.from(this.registeredMethods.keys())}unregisterMethod(n){this.registeredMethods.delete(n),console.log(`RpcManager: Unregistered RPC method: ${n}`)}clear(){for(const[n,r]of this.activeInteractions)clearTimeout(r.timeoutId);this.activeInteractions.clear(),this.registeredMethods.clear(),this.currentInteraction=null,console.log("RpcManager: Cleared all registrations and interactions")}}class Ve extends Error{constructor(t,n,r){super(t),this.code=n,this.details=r,this.name="VoxketError"}}const Xt=new WeakSet,Zo=new WeakSet;class zr extends Xa{constructor(n){super();Ue(this,"config");Ue(this,"room",null);Ue(this,"pluginManager");Ue(this,"rpcManager");Ue(this,"isConnected",!1);Ue(this,"currentSession",null);Ue(this,"connectionState",te.ConnectionState.Disconnected);Ue(this,"renderedComponents",new Map);Ue(this,"textStreamHandlersRegistered",!1);Ue(this,"currentAgentInfo",null);Ue(this,"chatMessages",[]);Ue(this,"activeTranscriptions",new Map);Ue(this,"isAgentConnected",!1);Ue(this,"agentState","idle");this.config=n,this.pluginManager=new Lm(this),this.rpcManager=new BE,this.setupEventListeners(),this.initializeClient()}setupEventListeners(){this.on("connection.connected",()=>{var n,r;this.isConnected=!0,(r=(n=this.config).onConnected)==null||r.call(n)}),this.on("connection.disconnected",n=>{var r,i;this.isConnected=!1,(i=(r=this.config).onDisconnected)==null||i.call(r,n)}),this.on("connection.error",n=>{var r,i;(i=(r=this.config).onError)==null||i.call(r,n)}),this.on("chat.message.received",n=>{var r,i;this.addChatMessage(n),(i=(r=this.config).onMessageReceived)==null||i.call(r,n)}),this.on("chat.message.updated",n=>{this.updateChatMessage(n)}),this.on("chat.message.sent",n=>{this.addChatMessage(n)}),this.on("transcription.received",n=>{var r,i;(i=(r=this.config).onTranscriptionReceived)==null||i.call(r,n)}),this.on("session.state.changed",n=>{var r,i;(i=(r=this.config).onSessionStateChanged)==null||i.call(r,n)}),this.on("session.created",n=>{var r,i;(i=(r=this.config).onSessionStart)==null||i.call(r,n.id)}),this.on("session.ended",(n,r)=>{var i,s;(s=(i=this.config).onSessionEnd)==null||s.call(i,r)}),this.on("participant.joined",n=>{var r,i;(i=(r=this.config).onUserJoined)==null||i.call(r,n.id)}),this.on("participant.left",n=>{var r,i;(i=(r=this.config).onUserLeft)==null||i.call(r,n.id)}),this.setupRpcEventForwarding()}setupRpcEventForwarding(){if(!this.rpcManager){console.warn("RpcManager not initialized, skipping event forwarding setup");return}this.rpcManager.on("rpc.method.registered",n=>this.emit("rpc.method.registered",n)),this.rpcManager.on("rpc.method.called",n=>this.emit("rpc.method.called",n)),this.rpcManager.on("rpc.interaction.started",n=>this.emit("rpc.interaction.started",n)),this.rpcManager.on("rpc.interaction.completed",n=>this.emit("rpc.interaction.completed",n)),this.rpcManager.on("rpc.interaction.timeout",n=>this.emit("rpc.interaction.timeout",n)),this.rpcManager.on("rpc.interaction.dismissed",n=>this.emit("rpc.interaction.dismissed",n))}initializeClient(){this.room=new te.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(te.RoomEvent.Connected,()=>{var n,r;this.connectionState=te.ConnectionState.Connected,this.emit("connection.connected"),this.rpcManager.setRoom(this.room),(r=(n=this.currentSession)==null?void 0:n.activeModalities)!=null&&r.includes("voice")&&setTimeout(async()=>{var i;try{(i=this.room)!=null&&i.localParticipant&&(this.room.localParticipant.isMicrophoneEnabled?this.emit("track.unmuted",{source:"microphone",enabled:!0}):(await this.room.localParticipant.setMicrophoneEnabled(!0),this.emit("track.unmuted",{source:"microphone",enabled:!0})))}catch(s){console.warn("VoxketClient: Failed to enable microphone after room connection:",s)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(te.RoomEvent.Disconnected,n=>{var r;console.log("🔴 VoxketClient: Room disconnected, reason:",n),this.connectionState=te.ConnectionState.Disconnected,this.textStreamHandlersRegistered=!1,this.isAgentConnected=!1,console.log("🤖 VoxketClient: Agent marked as disconnected"),this.clearChatMessages(),n&&console.log("🔍 VoxketClient: Disconnect reason details:",{reason:n.toString(),currentSession:(r=this.currentSession)==null?void 0:r.id,agentConnected:this.isAgentConnected,connectionState:this.connectionState}),this.emit("connection.disconnected",n==null?void 0:n.toString())}),this.room.on(te.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===te.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(te.RoomEvent.ParticipantConnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",r)}),this.room.on(te.RoomEvent.ParticipantDisconnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",r)}),this.room.on(te.RoomEvent.LocalTrackPublished,n=>{console.log("🎬 VoxketClient: Local track published:",n.source),n.source===te.Track.Source.ScreenShare&&this.emit("track.unmuted",{source:"screenShare",enabled:!0})}),this.room.on(te.RoomEvent.LocalTrackUnpublished,n=>{console.log("🎬 VoxketClient: Local track unpublished:",n.source),n.source===te.Track.Source.ScreenShare&&this.emit("track.muted",{source:"screenShare",enabled:!1})}))}setupTextStreamHandlers(){if(!this.room)return;try{this.room.registerTextStreamHandler("lk.chat",async(r,i)=>{try{const s=await r.readAll(),o={id:`msg_${Date.now()}_${i.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:s,timestamp:new Date,sender:{id:i.identity||"user",name:i.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",o)}catch(s){console.error("VoxketClient: Failed to process lk.chat message:",s)}})}catch(r){console.warn("VoxketClient: lk.chat handler already registered, skipping:",r)}try{console.log("📝 VoxketClient: Registering lk.transcription handler..."),this.room.registerTextStreamHandler("lk.transcription",async(r,i)=>{var s,o,a,l,c,u;console.log("📝 VoxketClient: Received transcription stream from:",i.identity);try{console.log("📝 VoxketClient: Processing transcription stream...");const d=i.identity===((o=(s=this.room)==null?void 0:s.localParticipant)==null?void 0:o.identity),h=Date.now(),m=i.identity,g=this.activeTranscriptions.get(m);let p,b=!0;g&&h-g.timestamp<1e3?(p=g.messageId,b=!1,console.log("📝 VoxketClient: Reusing existing transcription message ID:",p)):(p=`msg_${d?"user":"agent"}_${i.identity}_${h}`,this.activeTranscriptions.set(m,{messageId:p,timestamp:h}),console.log("📝 VoxketClient: Created new transcription message ID:",p));let v="";const k=((a=this.currentAgentInfo)==null?void 0:a.name)||i.identity||"AI Assistant";console.log("📝 VoxketClient: Using agent name:",k);const S=d?"participant":"agent",A=d?this.config.participantName||"User":k;console.log("📝 VoxketClient: Transcription sender info:",{participantIdentity:i.identity,localParticipantIdentity:(c=(l=this.room)==null?void 0:l.localParticipant)==null?void 0:c.identity,isFromUser:d,senderType:S,senderName:A});const T={id:p,content:"",timestamp:new Date,sender:{id:i.identity||"unknown",name:A,type:S},metadata:{topic:"lk.transcription",streaming:!0}};b&&this.emit("chat.message.received",T),console.log("📝 VoxketClient: Starting to read transcription stream...");for await(const L of r){console.log("📝 VoxketClient: Received chunk:",L.length,"chars"),v+=L;const y=this.convertMarkdownToText(v),M={...T,content:y,metadata:{...T.metadata,streaming:!0}};this.emit("chat.message.updated",M)}const C=this.convertMarkdownToText(v),N={...T,content:C,metadata:{...T.metadata,streaming:!1}};this.emit("chat.message.updated",N);const P={id:p,text:C,isFinal:!0,startTime:T.timestamp.getTime(),participantId:i.identity||"agent"};this.emit("transcription.received",P),console.log("📝 VoxketClient: Emitted transcription event:",P)}catch(d){console.error("VoxketClient: Failed to process lk.transcription message:",d);try{const h=await r.readAll(),m=((u=this.currentAgentInfo)==null?void 0:u.name)||i.identity||"AI Assistant",g={id:`msg_${Date.now()}_agent_transcription_${Math.random().toString(36).substr(2,9)}`,content:h,timestamp:new Date,sender:{id:i.identity||"agent",name:m,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",g);const p={id:g.id,text:g.content,isFinal:!0,startTime:g.timestamp.getTime(),participantId:i.identity||"agent"};this.emit("transcription.received",p),console.log("📝 VoxketClient: Emitted fallback transcription event:",p)}catch(h){console.error("VoxketClient: Fallback failed for lk.transcription:",h)}}})}catch(r){console.warn("VoxketClient: lk.transcription handler already registered, skipping:",r)}try{this.room.registerTextStreamHandler("suggested_response",async r=>{const i=await r.readAll();let s=[];try{s=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(o){console.warn("VoxketClient: Failed to parse suggested_response:",o,i)}this.emit("suggested.response",s)})}catch(r){console.warn("VoxketClient: suggested_response handler already registered, skipping:",r)}try{this.room.registerTextStreamHandler("agent_state_changed",async(r,i)=>{const s=await r.readAll();console.log("🤖 VoxketClient: agent_state_changed stream received:",s);let o={};try{o=typeof s=="string"?JSON.parse(s.replace(/'/g,'"')):s}catch(a){console.warn("VoxketClient: Failed to parse agent_state_changed:",a,s)}this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent marked as connected (first state change received)"),this.emit("agent.connected",o)),o.new_state==="speaking"?(this.setAgentState("speaking"),this.emit("agent.speaking",o)):o.new_state==="thinking"?(this.setAgentState("thinking"),this.emit("agent.thinking",o)):(o.new_state==="idle"||o.new_state==="listening")&&this.setAgentState("idle")})}catch(r){console.warn("VoxketClient: conversation_item_added handler already registered, skipping:",r)}try{this.room.registerTextStreamHandler("images",async(r,i)=>{try{const s=await r.readAll()}catch(s){console.error("VoxketClient: Error processing images stream:",s)}})}catch(r){console.warn("VoxketClient: images handler already registered, skipping:",r)}try{this.room.registerByteStreamHandler("images",async(r,i)=>{var s,o;try{const a=r.info,l={id:`img_${Date.now()}_${i.identity||"agent"}_${Math.random().toString(36).substr(2,9)}`,content:`�️ ${a.name||"Image"}`,sender:{id:i.identity||"agent",name:i.identity||"Agent",type:i.identity===((o=(s=this.room)==null?void 0:s.localParticipant)==null?void 0:o.identity)?"participant":"agent"},timestamp:new Date,metadata:{type:"attachment",fileName:a.name,fileSize:a.size,mimeType:a.mimeType,streamId:a.id,downloading:!0}};this.emit("chat.message.received",l),r.onProgress&&(r.onProgress=m=>{const g={...l,metadata:{...l.metadata,downloadProgress:m||0}};this.emit("chat.message.updated",g)});const c=[];for await(const m of r)c.push(m);const u=new Blob(c,{type:a.mimeType||"application/octet-stream"}),d=URL.createObjectURL(u),h={...l,metadata:{...l.metadata,downloading:!1,downloadProgress:1,downloadUrl:d,blob:u}};this.emit("chat.message.updated",h)}catch(a){console.error("VoxketClient: Error processing image attachment:",a)}})}catch(r){console.warn("VoxketClient: image handler already registered, skipping:",r)}["error","warning","status","system","debug","info"].forEach(r=>{try{this.room.registerTextStreamHandler(r,async(i,s)=>{try{const o=await i.readAll();if(console.log(`📝 VoxketClient: Received '${r}' stream:`,o),r==="error"){let a={};try{a=typeof o=="string"?JSON.parse(o):o}catch{a={message:o}}console.warn("� VoxketClient: Agent error:",a),this.emit("agent.error",a)}else this.emit("text.stream.received",{topic:r,data:o,participantInfo:s})}catch(o){console.error(`VoxketClient: Failed to process '${r}' stream:`,o)}})}catch(i){console.warn(`VoxketClient: Handler for '${r}' already registered, skipping:`,i)}});try{this.room.registerTextStreamHandler("*",async(r,i)=>{var s;try{const o=await r.readAll(),a=((s=r.info)==null?void 0:s.topic)||"unknown";console.log(`📝 VoxketClient: Received unhandled text stream for topic '${a}':`,o),this.emit("text.stream.unhandled",{topic:a,data:o,participantInfo:i})}catch(o){console.error("VoxketClient: Failed to process unhandled text stream:",o)}})}catch(r){console.warn("VoxketClient: Generic text stream handler already registered, skipping:",r)}this.textStreamHandlersRegistered=!0}async fetchConnectionDetails(n,r,i){const s=n||this.config.agentId||"default-agent",o=r||this.config.participantName||"User",a=i||this.config.modalities||["voice"];try{const l={agent_id:s,participant_name:o,participant_metadata:{user_id:""},modality:a[0],modalities:a};console.log("🔗 VoxketClient: Creating session with modalities:",a);const c=await fetch(`${this.config.baseUrl}/api/live/agent/session`,{method:"POST",headers:{accept:"application/json","X-APP-ID":this.config.appId,"X-APP-SECRET":this.config.appSecret,"Content-Type":"application/json"},body:JSON.stringify(l)});if(!c.ok){let h=`HTTP ${c.status}: Failed to fetch connection details`;try{const m=await c.json();m&&(m.error?h=`API Error: ${m.error}`:m.detail?h=`API Error: ${m.detail}`:m.message&&(h=`API Error: ${m.message}`))}catch{try{const g=await c.text();g&&(h=`API Error: ${g}`)}catch{}}throw new Error(h)}const u=await c.json();let d;return u.agent_info&&(d={id:u.agent_info.id||s,name:u.agent_info.name||"AI Assistant",avatar:u.agent_info.avatar,capabilities:u.agent_info.capabilities||["voice_interaction","text_chat"],metadata:u.agent_info.metadata||{}},this.currentAgentInfo=d),{serverUrl:u.wss_url,participantToken:u.token,voxketSessionId:u.session_id,agentInfo:d}}catch(l){console.error("VoxketClient: fetchConnectionDetails failed:",l);const c=new Ve(`Failed to fetch connection details: ${l instanceof Error?l.message:"Unknown error"}`,"CONNECTION_FAILED",l);throw this.emit("connection.error",c),c}}async connect(n,r,i){var s;try{this.emit("connection.connecting");const o=await this.fetchConnectionDetails(n,r,i);return await((s=this.room)==null?void 0:s.connect(o.serverUrl,o.participantToken)),this.isConnected=!0,o}catch(o){console.error("VoxketClient: Connection failed:",o);const a=new Ve(`Failed to connect to Voxket services: ${o instanceof Error?o.message:"Unknown error"}`,"CONNECTION_FAILED",o);throw this.emit("connection.error",a),a}}async disconnect(){var n;try{console.log("🔌 VoxketClient: Starting disconnect process..."),this.room&&(console.log("🔌 VoxketClient: Disconnecting from room:",{roomState:this.room.state,numParticipants:this.room.numParticipants,sessionId:(n=this.currentSession)==null?void 0:n.id}),await this.room.disconnect()),this.isConnected=!1,this.currentSession=null,this.currentAgentInfo=null,this.textStreamHandlersRegistered=!1,this.clearChatMessages(),console.log("🔌 VoxketClient: Creating new room instance..."),this.room=new te.Room,this.setupRoomEventListeners(),console.log("✅ VoxketClient: Disconnect completed successfully"),this.emit("connection.disconnected")}catch(r){console.error("❌ VoxketClient: Disconnect failed:",r);const i=new Ve("Failed to disconnect properly","NETWORK_ERROR",r);throw this.emit("connection.error",i),i}}async createSession(n){var r,i,s,o;try{const a=await this.connect(n.agentId,n.participantName,n.modalities),l={id:a.voxketSessionId,agentId:n.agentId,state:"connecting",startedAt:new Date,metadata:n.metadata||{},activeModalities:n.modalities||["voice"],agentInfo:a.agentInfo||this.currentAgentInfo};if(this.currentSession=l,this.emit("session.created",l),(r=n.modalities)!=null&&r.includes("voice"))try{await new Promise(c=>setTimeout(c,500)),(i=this.room)!=null&&i.localParticipant?(await this.room.localParticipant.setMicrophoneEnabled(!0,void 0,{preConnectBuffer:!0}),this.emit("track.unmuted",{source:"microphone",enabled:!0})):console.warn("VoxketClient: No local participant found, microphone not enabled")}catch(c){console.warn("VoxketClient: Failed to enable microphone, but continuing with session:",c)}if((s=n.modalities)!=null&&s.includes("video"))try{await new Promise(c=>setTimeout(c,200)),(o=this.room)!=null&&o.localParticipant&&(console.log("🎥 VoxketClient: Attempting to enable camera for video session"),await this.room.localParticipant.setCameraEnabled(!0),this.emit("track.unmuted",{source:"camera",enabled:!0}),console.log("🎥 VoxketClient: Camera enabled successfully"))}catch(c){console.warn("VoxketClient: Failed to enable camera, but continuing with session:",c)}return setTimeout(()=>{var c;this.currentSession&&(this.currentSession.state="active",this.emit("session.state.changed","active",this.currentSession.state),this.forceAgentConnected(),console.log("🤖 VoxketClient: Session marked as active:",{sessionId:this.currentSession.id,modalities:this.currentSession.activeModalities,agentConnected:this.isAgentConnected,hasRoom:!!this.room,remoteParticipants:((c=this.room)==null?void 0:c.remoteParticipants.size)||0}))},1e3),l}catch(a){throw console.error("VoxketClient: Failed to create session:",a),a instanceof Ve?a:a instanceof TypeError&&a.message.includes("fetch")?new Ve("Network connection failed","CONNECTION_FAILED",a):a instanceof Error&&a.message.includes("Failed to fetch connection details")?new Ve(`API connection failed: ${a.message}`,"CONNECTION_FAILED",a):new Ve(`Failed to create session: ${a instanceof Error?a.message:"Unknown error"}`,"SESSION_NOT_FOUND",a)}}async startSession(n,r){const i={agentId:n||this.config.agentId||"default-agent",participantName:(r==null?void 0:r.participantName)||this.config.participantName||"User",modalities:(r==null?void 0:r.modalities)||this.config.modalities||["voice","chat"],metadata:r==null?void 0:r.metadata};return this.createSession(i)}async endSession(){var n,r;if(!this.currentSession)return null;try{const i={sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]};return this.currentSession.endedAt=new Date,this.currentSession.state="disconnected",this.emit("session.ended",this.currentSession,i),await this.disconnect(),i}catch(i){throw new Ve("Failed to end session","SESSION_NOT_FOUND",i)}}getCurrentSession(){return this.currentSession}getCurrentAgentInfo(){return this.currentAgentInfo}getIsAgentConnected(){return this.isAgentConnected}forceAgentConnected(){this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent manually marked as connected"),this.emit("agent.connected",{forced:!0}))}getAgentState(){return this.agentState}setAgentState(n){this.agentState!==n&&(this.agentState=n,this.emit("agent.state.changed",{state:n}))}getAgentAudioTrack(){const n=this.getRemoteParticipants();for(const r of n){const i=r.getTrackPublication(te.Track.Source.Microphone);if(i!=null&&i.track)return{source:te.Track.Source.Microphone,participant:r,publication:i}}return null}getAgentVideoTrack(){const n=this.getRemoteParticipants();for(const r of n){const i=r.getTrackPublication(te.Track.Source.Camera);if(i!=null&&i.track)return{source:te.Track.Source.Camera,participant:r,publication:i}}return null}getVideoTrackRefs(){const n=[],r=this.getLocalParticipant();if(r){const s=r.getTrackPublication(te.Track.Source.Camera);s!=null&&s.track&&n.push({source:te.Track.Source.Camera,participant:r,publication:s});const o=r.getTrackPublication(te.Track.Source.ScreenShare);o!=null&&o.track&&n.push({source:te.Track.Source.ScreenShare,participant:r,publication:o})}const i=this.getRemoteParticipants();for(const s of i){const o=s.getTrackPublication(te.Track.Source.Camera);o!=null&&o.track&&n.push({source:te.Track.Source.Camera,participant:s,publication:o});const a=s.getTrackPublication(te.Track.Source.ScreenShare);a!=null&&a.track&&n.push({source:te.Track.Source.ScreenShare,participant:s,publication:a})}return n}getCameraTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===te.Track.Source.Camera)}getScreenShareTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===te.Track.Source.ScreenShare)}getChatMessages(){return[...this.chatMessages]}addChatMessage(n){this.chatMessages.some(i=>i.id===n.id)||this.chatMessages.push(n)}updateChatMessage(n){const r=this.chatMessages.findIndex(i=>i.id===n.id);r!==-1&&(this.chatMessages[r]=n)}clearChatMessages(){this.chatMessages=[],this.activeTranscriptions.clear(),this.dismissCurrentInteraction(),this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays(),console.log("🧹 VoxketClient: Cleared chat messages and transcription history"),this.emit("chat.history.cleared")}renderUI(n={}){var o,a,l,c,u,d,h,m,g;const r=this.resolveTarget(n.target||"body"),i=this.getTargetKey(r);if(Zo.has(r)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(Xt.has(r)){console.log("✋ VoxketClient: Target already has a React root in registry, updating existing props...");const p=this.renderedComponents.get(i);if(p&&p.root){const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((o=n.modality)==null?void 0:o.includes("chat"))!==!1,suportsVideoInput:((a=n.modality)==null?void 0:a.includes("video"))===!0,suportsScreenShare:((l=n.modality)==null?void 0:l.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{p.root.render(j.createElement(fi,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(hi,b)})),console.log("✅ VoxketClient: Successfully updated existing widget with new props");return}catch(v){throw console.error("Error re-rendering existing widget:",v),new Error(`Failed to update existing widget: ${v instanceof Error?v.message:"Unknown error"}`)}}else console.warn("⚠️ Registry inconsistency detected, cleaning up"),Xt.delete(r)}let s=this.renderedComponents.get(i);if(s&&s.target===r&&Xt.has(r)){console.log("🔄 VoxketClient: Reusing existing React root for target:",i);const p=s.root,b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((c=n.modality)==null?void 0:c.includes("chat"))!==!1,suportsVideoInput:((u=n.modality)==null?void 0:u.includes("video"))===!0,suportsScreenShare:((d=n.modality)==null?void 0:d.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};try{p.render(j.createElement(fi,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(hi,b)}))}catch(v){throw console.error("Error rendering Voxket widget:",v),new Error(`Failed to render Voxket widget: ${v instanceof Error?v.message:"Unknown error"}`)}return}Zo.add(r);try{if(s){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{s.root.unmount(),this.renderedComponents.delete(i),Xt.delete(s.target),r.innerHTML=""}catch(v){console.warn("Failed to cleanup existing root:",v)}}if(Xt.has(r)){console.warn("⚠️ VoxketClient: Target already in registry, skipping root creation");return}console.log("🆕 VoxketClient: Creating new React root for target:",i);const p=op.createRoot(r);this.renderedComponents.set(i,{root:p,target:r}),Xt.add(r);const b={agentId:n.agentId||this.config.agentId||"default-agent",participantName:n.participantName||this.config.participantName||"User",baseUrl:this.config.baseUrl,appSecret:this.config.appSecret,appId:this.config.appId,className:n.className,theme:typeof n.theme=="string"?n.theme:void 0,modalities:n.modality||this.config.modalities||["voice"],suportsChatInput:((h=n.modality)==null?void 0:h.includes("chat"))!==!1,suportsVideoInput:((m=n.modality)==null?void 0:m.includes("video"))===!0,suportsScreenShare:((g=n.modality)==null?void 0:g.includes("screen_share"))===!0,autoStart:n.autoStart,displayType:n.displayType||"widget",popupPosition:n.popupPosition||"bottom-right",popupTriggerText:n.popupTriggerText||"Open Chat",width:n.width,height:n.height,onDisplayTypeChange:n.onDisplayTypeChange,prompts:n.prompts,statusMessage:n.statusMessage,welcomeTitle:n.welcomeTitle,welcomeSubTitle:n.welcomeSubTitle,loadingText:n.loadingText,voxketClient:this};if(!p||typeof p.render!="function")throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");try{p.render(j.createElement(fi,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(hi,b)}))}catch(v){throw console.error("Error rendering Voxket widget:",v),new Error(`Failed to render Voxket widget: ${v instanceof Error?v.message:"Unknown error"}`)}}finally{Zo.delete(r)}}removeUI(n){var i;const r=n?this.resolveTarget(n):null;if(r){const s=this.getTargetKey(r),o=this.renderedComponents.get(s);if(o){console.log("🗑️ VoxketClient: Removing UI for target:",s),this.renderedComponents.delete(s),Xt.delete(r);try{const l=o.target;l&&l.isConnected?(typeof((i=o.root)==null?void 0:i.unmount)=="function"&&(o.root.unmount(),console.log("✅ VoxketClient: UI unmounted for target:",s)),l.hasChildNodes()&&(l.innerHTML="")):console.log("ℹ️ VoxketClient: Target element already disconnected, skipping unmount")}catch(l){console.warn("Failed to unmount React root:",l)}}else console.log("ℹ️ VoxketClient: No component found for target, cleaning registry:",s),Xt.delete(r),r.isConnected&&r.hasChildNodes()&&(r.innerHTML="");r.querySelectorAll('[id*="voxket"], [class*="voxket"], .fixed.inset-0.z-50').forEach(l=>{try{l.remove()}catch(c){console.warn("Failed to remove element:",c)}}),wi&&Xe&&r===Xe.body&&r.querySelectorAll(".fixed.z-50, .fixed.inset-0").forEach(c=>{if(c.classList.contains("bg-black")&&(c.classList.contains("backdrop-blur-sm")||c.classList.contains("bg-opacity-30")))try{c.remove()}catch(u){console.warn("Failed to remove fixed element:",u)}})}}removeAllUI(){for(const[n,r]of this.renderedComponents)r.root.unmount();this.renderedComponents.clear(),this.forceCleanupFullscreenOverlays()}forceCleanupFullscreenOverlays(){if(!wi||!Xe)return;Xe.body.querySelectorAll(".fixed.inset-0.z-50").forEach(r=>{if(r.classList.contains("bg-black")&&(r.classList.contains("backdrop-blur-sm")||r.classList.contains("bg-opacity-30")))try{r.remove()}catch(i){console.warn("Failed to remove overlay:",i)}})}resolveTarget(n){if(typeof n=="string"){const r=th(n);if(!r)throw new Error(`Target element not found: ${n}`);return r}return n}getTargetKey(n){return n.id?n.id:n.className?n.tagName+"_"+n.className.replace(/\s+/g,"_"):n.tagName+"_"+n.outerHTML.length%1e3}async sendMessage(n,r){var i;if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new Ve("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new Ve("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new Ve("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const s={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:r||{}},o=await((i=this.room)==null?void 0:i.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",s)}catch(s){throw console.error("VoxketClient: Failed to send chat message:",s),new Ve("Failed to send message","NETWORK_ERROR",s)}}async sendChatMessage(n,r){return this.sendMessage(n,r)}async sendAttachments(n,r){if(!this.currentSession)throw console.error("VoxketClient: No active session found"),new Ve("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new Ve("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new Ve("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new Ve("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const i=n.filter(s=>s.type.startsWith("image/"));if(i.length===0)throw new Ve("Only image files are allowed","INVALID_PARAMETER");i.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const s=i.map(async(o,a)=>{const c={id:`att_${Date.now()}_${a}`,content:`📎 ${o.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...r,type:"attachment",fileName:o.name,fileSize:o.size,mimeType:o.type,uploading:!0}};this.emit("chat.message.sent",c);const u=await this.room.localParticipant.sendFile(o,{mimeType:o.type,topic:"images",onProgress:h=>{const m={...c,metadata:{...c.metadata,uploadProgress:h}};this.emit("chat.message.updated",m)}});try{const h=new FileReader,m=new Promise((b,v)=>{h.onload=()=>{typeof h.result=="string"?b(h.result):v(new Error("Failed to convert to base64"))},h.onerror=v});h.readAsDataURL(o);const p={type:"image",data:await m,filename:o.name,mimeType:o.type,size:o.size};await this.room.localParticipant.sendText(JSON.stringify(p),{topic:"images",destinationIdentities:[]})}catch(h){console.warn("VoxketClient: Failed to send image data to agent:",h);try{const m=`I've shared an image: ${o.name}`;await this.room.localParticipant.sendText(m,{topic:"lk.chat",destinationIdentities:[]})}catch(m){console.warn("VoxketClient: Failed to send image notification to agent:",m)}}const d={...c,metadata:{...c.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",d),u});await Promise.all(s)}catch(s){throw console.error("VoxketClient: Failed to send attachments:",s),new Ve("Failed to send attachments","NETWORK_ERROR",s)}}async sendAttachment(n,r){return this.sendAttachments([n],r)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var r,i;try{const s=(r=this.room)==null?void 0:r.localParticipant.isMicrophoneEnabled,o=n??!s;await((i=this.room)==null?void 0:i.localParticipant.setMicrophoneEnabled(o)),o?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(s){throw console.error("VoxketClient: Failed to toggle microphone:",s),new Ve("Failed to toggle microphone","PERMISSION_DENIED",s)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var r,i;try{const s=(r=this.room)==null?void 0:r.localParticipant.isCameraEnabled,o=n??!s;await((i=this.room)==null?void 0:i.localParticipant.setCameraEnabled(o)),o?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(s){throw console.error("VoxketClient: Failed to toggle camera:",s),new Ve("Failed to toggle camera","PERMISSION_DENIED",s)}}async enableCamera(){return this.setCameraEnabled(!0)}async disableCamera(){return this.setCameraEnabled(!1)}async startScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!0)),this.emit("track.unmuted",{source:"screenShare",enabled:!0})}catch(r){throw new Ve("Failed to start screen share","PERMISSION_DENIED",r)}}async stopScreenShare(){var n;try{await((n=this.room)==null?void 0:n.localParticipant.setScreenShareEnabled(!1)),this.emit("track.muted",{source:"screenShare",enabled:!1})}catch(r){throw new Ve("Failed to stop screen share","PERMISSION_DENIED",r)}}async getAudioInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="audioinput")}catch(n){throw new Ve("Failed to get audio input devices","DEVICE_ERROR",n)}}async getVideoInputDevices(){try{return(await navigator.mediaDevices.enumerateDevices()).filter(r=>r.kind==="videoinput")}catch(n){throw new Ve("Failed to get video input devices","DEVICE_ERROR",n)}}async setAudioInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(i){throw new Ve("Failed to set audio input device","DEVICE_ERROR",i)}}async setVideoInputDevice(n){var r;try{if(!((r=this.room)!=null&&r.localParticipant))throw new Error("Not connected to room")}catch(i){throw new Ve("Failed to set video input device","DEVICE_ERROR",i)}}getLocalParticipant(){var n;return((n=this.room)==null?void 0:n.localParticipant)??null}getRemoteParticipants(){var n;return Array.from(((n=this.room)==null?void 0:n.remoteParticipants.values())??[])}getPublishPermissions(){const n=this.getLocalParticipant();if(!n)return{camera:!1,microphone:!1,screenShare:!1,data:!1};const r=n.permissions;if(!r)return{camera:!0,microphone:!0,screenShare:!0,data:!0};const i=s=>!!r.canPublish&&(r.canPublishSources.length===0||r.canPublishSources.includes(s));return{camera:i(1),microphone:i(2),screenShare:i(3),data:r.canPublishData??!1}}canPublishSource(n){return this.getPublishPermissions()[n]}getRoom(){return this.room}getConnectionState(){return this.connectionState}get connected(){return this.isConnected&&this.connectionState===te.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Microphone)return r.track;return null}getCameraTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.Camera)return r.track;return null}getScreenShareTrack(){const n=this.getLocalParticipant();if(!n)return console.log("🎬 VoxketClient: getScreenShareTrack - no local participant"),null;for(const[,r]of n.trackPublications)if(r.source===te.Track.Source.ScreenShare)return console.log("🎬 VoxketClient: getScreenShareTrack - found screen share track:",{trackSid:r.trackSid,isMuted:r.isMuted,hasTrack:!!r.track}),r.track;return console.log("🎬 VoxketClient: getScreenShareTrack - no screen share track found"),null}get isMicrophoneEnabled(){const n=this.getMicrophoneTrack();return n?!n.isMuted:!1}get isCameraEnabled(){const n=this.getCameraTrack();return n?!n.isMuted:!1}get isScreenShareEnabled(){const n=this.getScreenShareTrack(),r=n?!n.isMuted:!1;return console.log("🎬 VoxketClient: isScreenShareEnabled check:",{hasTrack:!!n,trackMuted:n==null?void 0:n.isMuted,enabled:r}),r}registerPlugin(n){this.pluginManager.register(n)}getPluginManager(){return this.pluginManager}getParticipants(){if(!this.room)return[];const n=[];return this.room.localParticipant&&n.push({id:this.room.localParticipant.identity,name:this.room.localParticipant.name||this.room.localParticipant.identity,isLocal:!0}),this.room.remoteParticipants.forEach(r=>{n.push({id:r.identity,name:r.name||r.identity,isLocal:!1})}),n}getSessionMetrics(){var n,r;return this.currentSession?{sessionId:this.currentSession.id,duration:Date.now()-(((n=this.currentSession.startedAt)==null?void 0:n.getTime())||0),messageCount:0,participantCount:((r=this.room)==null?void 0:r.remoteParticipants.size)||0,audioQuality:{avgBitrate:64e3,avgLatency:150,packetLoss:.01,jitter:.05},videoQuality:{avgBitrate:5e5,avgLatency:150,packetLoss:.01,jitter:.05},networkStats:{totalBytesReceived:0,totalBytesSent:0,connectionType:"webrtc",avgRoundTripTime:150},events:[]}:null}updateConfig(n){this.config={...this.config,...n}}async startRecording(){var n;try{this.emit("recording.started",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new Ve("Failed to start recording","RECORDING_ERROR",r)}}async stopRecording(){var n;try{this.emit("recording.stopped",{sessionId:(n=this.currentSession)==null?void 0:n.id,timestamp:new Date})}catch(r){throw new Ve("Failed to stop recording","RECORDING_ERROR",r)}}async registerFrontendRPC(n,r,i="embedded"){return this.rpcManager.registerFrontendRPC(n,r,i)}getCurrentInteraction(){return this.rpcManager.getCurrentInteraction()}dismissCurrentInteraction(){this.rpcManager.dismissCurrentInteraction()}getRegisteredRpcMethods(){return this.rpcManager.getRegisteredMethods()}unregisterRpcMethod(n){this.rpcManager.unregisterMethod(n)}registerEventListener(n,r){return this.on(n,r)}registerEventEmitter(n,r){if(!this.room)throw new Error("Room not available");try{this.room.registerTextStreamHandler(n,async i=>{try{const s=await i.readAll();r(s)}catch(s){console.error(`Error processing event for topic '${n}':`,s)}})}catch(i){console.warn(`VoxketClient: Handler for topic '${n}' may already be registered:`,i)}}convertMarkdownToText(n){if(!n)return"";let r=n;return r=r.replace(/\*\*(.*?)\*\*/g,"$1"),r=r.replace(/__(.*?)__/g,"$1"),r=r.replace(/\*(.*?)\*/g,"$1"),r=r.replace(/_(.*?)_/g,"$1"),r=r.replace(/~~(.*?)~~/g,"$1"),r=r.replace(/`([^`]+)`/g,"$1"),r=r.replace(/```[\s\S]*?```/g,""),r=r.replace(/^#{1,6}\s+/gm,""),r=r.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),r.trim()}}const zE=ge.create(Mh),HE=ge.create(ME),UE=ge.create(VE),WE=ge.create(Dm);function ZE({theme:e,mode:t,loadingText:n}){const r=tt(e),i=()=>{switch(t){case"voice":return n||"Connecting to voice agent...";case"chat":return n||"Starting chat session...";case"video":return n||"Connecting to video call...";default:return n||"Connecting..."}};return f.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("h3",{className:`text-lg font-semibold mb-2 ${r.text.accent}`,children:i()}),f.jsx("p",{className:`text-sm ${r.text.muted}`,children:"Please wait a moment..."})]}),f.jsxs("div",{className:"flex space-x-1 mt-4",children:[f.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"0ms"}}),f.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"150ms"}}),f.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"300ms"}})]})]})}const qE=ge.create(ZE);function GE({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:r}){const i={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"},s=tt(r);return f.jsx(ge.button,{onClick:e,className:`voxket-popup-trigger fixed ${i[n]} z-50 px-4 py-2 rounded-full shadow-lg ${s.popupTrigger} transition-all duration-200 hover:scale-105`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:{scale:1.05},whileTap:{scale:.95},"data-position":n,children:t})}function nd({children:e,theme:t,displayType:n="widget",onClose:r,popupPosition:i="bottom-right",onExpand:s}){const o=tt(t);if(n==="fullscreen")return f.jsx("div",{className:"fixed inset-0 z-[9999] bg-black/40 bg-opacity-30 backdrop-blur-sm flex items-center justify-center p-8",onClick:a=>{a.target===a.currentTarget&&r&&r()},children:f.jsxs("div",{className:"w-full h-full max-w-7xl max-h-[95vh] rounded-2xl relative bg-transparent flex flex-col",onClick:a=>{a.stopPropagation()},children:[r&&f.jsx("button",{onClick:a=>{a.preventDefault(),a.stopPropagation(),r()},className:"absolute top-4 cursor-pointer right-4 z-[10000] w-12 h-12 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 shadow-lg border border-gray-700 backdrop-blur-sm",title:"Exit Fullscreen",type:"button",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"})})}),f.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} w-full h-full flex flex-col rounded-xl shadow-2xl relative overflow-hidden`,"data-theme":t,style:{minHeight:"600px",height:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[f.jsx("div",{className:o.cardTopGradient}),f.jsx("div",{className:o.cardPurpleBlur}),f.jsx("div",{className:o.cardPinkBlur}),f.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),f.jsx("div",{className:o.cardPulse1}),f.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const a={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return f.jsx("div",{className:"fixed rounded-2xl inset-0 z-[9999] pointer-events-none",children:f.jsxs("div",{className:`fixed rounded-2xl ${a[i]} pointer-events-auto`,children:[r&&f.jsx("button",{onClick:r,className:"absolute -top-2 -right-2 z-10 w-8 h-8 rounded-full bg-gray-900 bg-opacity-90 text-white flex items-center justify-center hover:bg-gray-800 transition-all duration-200 text-sm shadow-lg border border-gray-700",children:"×"}),f.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} rounded-2xl flex flex-col relative overflow-hidden`,"data-theme":t,style:{width:"350px",height:"500px",contain:"layout style paint",overscrollBehavior:"contain"},children:[f.jsx("div",{className:o.cardTopGradient}),f.jsx("div",{className:o.cardPurpleBlur}),f.jsx("div",{className:o.cardPinkBlur}),f.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),f.jsx("div",{className:o.cardPulse1}),f.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})]})})}return f.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${o.card} relative overflow-hidden`,"data-theme":t,style:{height:"100%",maxHeight:"100%",contain:"layout style paint",overscrollBehavior:"contain"},children:[f.jsx("div",{className:o.cardTopGradient}),f.jsx("div",{className:o.cardPurpleBlur}),f.jsx("div",{className:o.cardPinkBlur}),f.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),f.jsx("div",{className:o.cardPulse1}),f.jsx("div",{className:o.cardPulse2,style:{animationDelay:"1s"}})]})}function KE(e){if(typeof window>"u")return null;const{agentId:t,participantName:n,baseUrl:r,appSecret:i,appId:s,prompts:o,statusMessage:a,welcomeTitle:l,welcomeSubTitle:c,className:u,width:d,height:h,loadingText:m,suportsChatInput:g=!0,suportsVideoInput:p=!0,suportsScreenShare:b=!0,theme:v="vox",onSessionStart:k,onSessionEnd:S,enableSessionLogging:A=!0,onSessionLogsUpdate:T,onSessionMetricsUpdate:C,modalities:N=["voice"],displayType:P="widget",popupPosition:L="bottom-right",popupTriggerText:y="Open Chat",onPopupToggle:M,voxketClient:D,onDisplayTypeChange:B}=e,[H,Y]=x.useState(!1),[de,ie]=x.useState(null),[F,W]=x.useState(()=>{try{if(D)return!!D.getCurrentSession()}catch(K){console.error("Error checking existing session:",K)}return!1}),[w,z]=x.useState(!1),[oe,E]=x.useState(t||""),[U,se]=x.useState(n||"User"),[$,ee]=x.useState(()=>{try{if(D)return D.getCurrentSession()}catch(K){console.error("Error getting current session:",K)}return null}),[Q,V]=x.useState(()=>{var K,be,Ce;try{if(D){const je=D.getCurrentSession();if((K=je==null?void 0:je.activeModalities)!=null&&K.includes("chat"))return"chat";if((be=je==null?void 0:je.activeModalities)!=null&&be.includes("voice"))return"voice";if((Ce=je==null?void 0:je.activeModalities)!=null&&Ce.includes("video"))return"video"}}catch(je){console.error("Error determining current mode:",je)}return"welcome"}),[G,fe]=x.useState(!1);x.useEffect(()=>{P==="fullscreen"&&console.log("🎯 Widget: Switched to fullscreen mode")},[P]),x.useEffect(()=>{F&&!w?console.log("📊 Session started:",{currentMode:Q,sessionId:$==null?void 0:$.id}):!F&&!w&&Q==="welcome"&&console.log("📊 Returned to welcome screen")},[F,Q,w]);const R=x.useMemo(()=>{try{if(D)return console.log("🔄 Using existing VoxketClient to preserve session state"),D;if(!s||!i||!r){const be=`Missing required props: ${s?"":"appId "}${i?"":"appSecret "}${r?"":"baseUrl"}`;return console.error("❌ VoxketClient creation failed:",be),ie(new Error(be)),Y(!0),null}const K={appId:s,appSecret:i,baseUrl:r,agentId:oe,participantName:U||"User",modalities:N};return console.log("🔧 Creating new VoxketClient with config:",{appId:s.substring(0,8)+"...",baseUrl:r,agentId:oe,participantName:U||"User",modalities:N}),new zr(K)}catch(K){return console.error("❌ Failed to create VoxketClient:",K),ie(K),Y(!0),null}},[D,s,i,r,oe,U,N]),re=N,ne=x.useMemo(()=>{try{if(!R)return console.warn("⚠️ No VoxketClient available, creating fallback room"),new te.Room;const K=R.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!K,roomState:K==null?void 0:K.state,sessionStarted:F,currentMode:Q}),K||new te.Room}catch(K){return console.error("❌ Error getting room from client:",K),new te.Room}},[R,F,Q]);x.useEffect(()=>{if(ne){const K=()=>{console.log("🏠 Widget: Room state changed:",{state:ne.state,numParticipants:ne.numParticipants,isConnected:ne.state==="connected",sessionId:$==null?void 0:$.id})},be=(Ce,je,$e)=>{console.log("🎵 Widget: Track subscribed:",{trackKind:Ce.kind,trackSource:Ce.source,participantSid:$e.sid,participantIdentity:$e.identity,sessionId:$==null?void 0:$.id})};return ne.on(te.RoomEvent.Connected,K),ne.on(te.RoomEvent.Disconnected,K),ne.on(te.RoomEvent.TrackSubscribed,be),()=>{ne.off(te.RoomEvent.Connected,K),ne.off(te.RoomEvent.Disconnected,K),ne.off(te.RoomEvent.TrackSubscribed,be)}}},[ne,$==null?void 0:$.id]),x.useEffect(()=>{!w&&Q==="welcome"?console.log("🎬 Widget: Welcome screen ready"):F&&Q!=="welcome"&&console.log("🎬 Widget: Session mode active:",Q)},[Q,w,F]);const me={suportsChatInput:g,suportsVideoInput:p,suportsScreenShare:b};x.useEffect(()=>{(Q==="voice"||Q==="video"||Q==="chat")&&!$&&!F&&!w&&R&&!R.connected&&(console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"),V("welcome"),z(!1))},[Q,$,F,w,R]);const{sessionMetrics:Z,sessionLogs:pe,logEvent:Ae}=Fm({room:ne,onSessionStart:k,onSessionEnd:S,enableConsoleLogging:A,enableLocalStorage:A,voxketSessionId:$==null?void 0:$.id});x.useEffect(()=>{T&&T(pe)},[pe,T]),x.useEffect(()=>{C&&Z&&C(Z)},[Z,C]),x.useEffect(()=>{if(!R)return;const K=()=>{const be=R.connected,Ce=R.getCurrentSession();console.log("🔗 Connection state changed:",{isConnected:be,currentSessionId:Ce==null?void 0:Ce.id,currentMode:Q,loading:w,sessionStarted:F}),!be&&F&&!w&&(console.log("🔴 Connection lost during active session - returning to welcome"),z(!1),W(!1),ee(null),V("welcome")),be&&Ce&&w&&(console.log("🟢 Connected with active session - removing loader"),z(!1),W(!0),ee(Ce))};return R.on("connectionStateChanged",K),R.on("sessionEnded",()=>{console.log("📞 Session ended - returning to welcome"),z(!1),W(!1),ee(null),V("welcome")}),()=>{R.off("connectionStateChanged",K),R.off("sessionEnded",()=>{})}},[R,Q,w,F]),x.useEffect(()=>{const K=Ce=>{console.log("🔴 Widget: Room disconnected:",Ce),console.log("🔍 Widget: Current state on disconnect:",{currentMode:Q,sessionStarted:F,currentSessionId:$==null?void 0:$.id,loading:w}),z(!1),W(!1),ee(null),V("welcome"),console.log("🏠 Widget: Automatically returning to welcome screen after disconnect")},be=Ce=>{console.log("📹 Media devices error:",Ce)};return ne.on(te.RoomEvent.MediaDevicesError,be),ne.on(te.RoomEvent.Disconnected,K),()=>{ne.off(te.RoomEvent.Disconnected,K),ne.off(te.RoomEvent.MediaDevicesError,be)}},[ne,Q,F,$==null?void 0:$.id,w]);const xe=async()=>{try{if(!R){console.error("❌ VoxketClient not available"),ie(new Error("VoxketClient not initialized")),Y(!0);return}z(!0),V("voice"),console.log("🎤 Starting voice session...",{agentId:oe,participantName:U}),console.log("🎤 Pre-start state:",{currentMode:"voice",sessionStarted:!1,loading:!0}),Ae("USER_STARTED_VOICE_SESSION",{agentId:oe,participantName:U});const K=await R.startSession(oe,{participantName:U||"User",modalities:["voice",...p?["video"]:[]]});console.log("✅ Voice session started successfully:",K.id),ee(K),W(!0),z(!1),k&&k(K.id)}catch(K){console.error("❌ Failed to start voice session:",K),z(!1),W(!1),V("welcome")}},Ne=async()=>{try{if(!R){console.error("❌ VoxketClient not available"),ie(new Error("VoxketClient not initialized")),Y(!0);return}z(!0),V("chat"),console.log("💬 Starting chat session...",{agentId:oe,participantName:U}),Ae("USER_STARTED_CHAT_SESSION",{agentId:oe,participantName:U});const K=await R.startSession(oe,{participantName:U||"User",modalities:["chat"]});console.log("✅ Chat session started successfully:",K.id),ee(K),W(!0),z(!1),k&&k(K.id)}catch(K){console.error("❌ Failed to start chat session:",K),z(!1),W(!1),V("welcome")}},ze=async()=>{try{if(!R){console.error("❌ VoxketClient not available"),ie(new Error("VoxketClient not initialized")),Y(!0);return}z(!0),V("video"),console.log("📺 Starting video session...",{agentId:oe,participantName:U}),console.log("📺 Pre-start state:",{currentMode:"video",sessionStarted:!1,loading:!0}),Ae("USER_STARTED_VIDEO_SESSION",{agentId:oe,participantName:U});const K=await R.startSession(oe,{participantName:U||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",K.id),ee(K),W(!0),z(!1),k&&k(K.id)}catch(K){console.error("❌ Failed to start video session:",K),z(!1),W(!1),V("welcome")}},He=()=>{console.log("🔄 Widget: handleBackToWelcome called",{currentMode:Q,sessionStarted:F,currentSessionId:$==null?void 0:$.id,displayType:P,loading:w}),V("welcome"),z(!1),B&&B(e.displayType||"widget"),$&&F?(console.log("🧹 Widget: Cleaning up active session"),W(!1),ee(null),R&&(console.log("🔌 Widget: Disconnecting client and cleaning up room"),R.disconnect().catch(K=>{console.error("❌ Widget: Error during disconnect:",K)}))):(console.log("📝 Widget: No active session to clean up"),R&&R.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),R.disconnect().catch(K=>{console.error("❌ Widget: Error during force disconnect:",K)}))),P==="popup"&&!G&&fe(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},rt=()=>{const K=!G;fe(K),M&&M(K),!K&&!($&&F)&&(V("welcome"),W(!1),ee(null))},Gt=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},Lt=()=>{if(console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange)e.onDisplayTypeChange("fullscreen");else{console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");const K=B1("voice-card")||th(".voxket-widget-container");K&&"requestFullscreen"in K&&K.requestFullscreen().catch(be=>{console.warn("⚠️ Fullscreen API not supported or failed:",be)})}};x.useEffect(()=>{var K,be,Ce;if(D&&R){const je=R.getCurrentSession();R.connected,je&&(console.log("✅ Restoring session state:",je.id),ee(je),W(!0),z(!1),(K=je.activeModalities)!=null&&K.includes("chat")?V("chat"):(be=je.activeModalities)!=null&&be.includes("voice")?V("voice"):(Ce=je.activeModalities)!=null&&Ce.includes("video")&&V("video"))}},[D,R]),x.useEffect(()=>()=>{!D&&R&&R.disconnect()},[R,D]);let _=Q==="video"?"w-[32rem]":"w-96",I=Q==="video"?"h-[30rem]":"h-[25rem]",q={};if(d&&(d.startsWith("w-")?_=d:(q.width=d,_="")),h&&(h.startsWith("h-")?I=h:(q.height=h,I="")),P==="popup"&&!G)return console.log("🟡 Showing popup trigger button"),f.jsx(GE,{onClick:rt,text:y,position:L,theme:v});if(H||!R){const K=(de==null?void 0:de.message)||"VoxketWidget encountered an error. Please check your configuration.";return f.jsx("div",{className:`voxket-widget-root theme-${v} flex items-center justify-center p-8 ${u||""}`,style:{width:d||"400px",height:h||"500px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"},children:f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:"text-4xl mb-4",children:"⚠️"}),f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Widget Error"}),f.jsx("p",{className:"text-sm mb-4",children:K}),f.jsx("button",{onClick:()=>{Y(!1),ie(null),zt==null||zt.location.reload()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]})})}let ue=`voxket-widget-root theme-${v}`,J={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};P==="widget"?(ue+=` flex items-center justify-center min-h-fit ${_} ${I} ${u}`,J={...J,...q}):(ue=`${u||""}`,J={});const ke=f.jsx("div",{className:"h-full flex flex-col overflow-hidden relative z-10",children:f.jsxs(en,{mode:"wait",children:[Q==="welcome"&&!w&&f.jsx(WE,{agentId:oe,participantName:U||"",onAgentIdChange:E,onParticipantNameChange:se,onStartCall:xe,onStartChat:Ne,onStartVideo:ze,disabled:F||w,prompts:o,statusMessage:a,title:l,subTitle:c,theme:v,modalities:re,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),w&&(Q==="voice"||Q==="chat"||Q==="video")&&f.jsx(qE,{theme:v,mode:Q,loadingText:m,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3,ease:"easeInOut"}},`loading-${Q}`),Q==="voice"&&!w&&F&&R&&f.jsxs(dt.RoomContext.Provider,{value:ne,children:[f.jsx(dt.RoomAudioRenderer,{},`audio-${($==null?void 0:$.id)||"no-session"}`),f.jsx(dt.StartAudio,{label:"Start Audio"},`start-audio-${($==null?void 0:$.id)||"no-session"}`),f.jsx(zE,{loadingText:m,participantName:U||"User",capabilities:me,sessionStarted:F,disabled:!1,theme:v,client:R,displayType:P,onBack:P==="popup"?rt:He,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"voice-session")]}),Q==="chat"&&!w&&F&&R&&f.jsx(HE,{client:R,theme:v,displayType:P,onBack:P==="popup"?rt:He,onEndChat:He,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),Q==="video"&&!w&&F&&R&&f.jsxs(dt.RoomContext.Provider,{value:ne,children:[f.jsx(dt.RoomAudioRenderer,{},`audio-video-${($==null?void 0:$.id)||"no-session"}`),f.jsx(dt.StartAudio,{label:"Start Audio"},`start-audio-video-${($==null?void 0:$.id)||"no-session"}`),f.jsx(UE,{client:R,theme:v,displayType:P,onBack:P==="popup"?rt:He,onEndCall:He,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"video-session")]})]})});return P==="fullscreen"||P==="popup"?f.jsx(nd,{theme:v,displayType:P,popupPosition:L,onClose:P==="fullscreen"?Gt:rt,children:ke}):f.jsx("div",{className:ue,style:J,children:f.jsx(nd,{theme:v,displayType:P,popupPosition:L,onExpand:Lt,children:ke})})}function hi(e){return f.jsx(Ya,{children:f.jsx(KE,{...e})})}function YE({logs:e,onClear:t,onExport:n}){const[r,i]=j.useState(!1),[s,o]=j.useState(""),a=e.filter(l=>!s||l.event.toLowerCase().includes(s.toLowerCase()));return r?f.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:f.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[f.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[f.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"text",placeholder:"Filter events...",value:s,onChange:l=>o(l.target.value),className:"px-3 py-1 border rounded text-sm"}),f.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),f.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),f.jsx("button",{onClick:()=>i(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),f.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?f.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):f.jsx("div",{className:"space-y-2",children:a.map((l,c)=>f.jsxs("div",{className:"border rounded p-3 text-sm",children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsx("span",{className:"font-semibold text-blue-600",children:l.event}),f.jsx("span",{className:"text-gray-500 text-xs",children:new Date(l.timestamp).toLocaleTimeString()})]}),l.sessionId&&f.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",l.sessionId]}),l.data&&f.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:f.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(l.data,null,2)})})]},c))})})]})}):f.jsxs("button",{onClick:()=>i(!0),className:"fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-blue-700 transition-colors text-sm z-50",children:["Session Logs (",e.length,")"]})}function XE({metrics:e}){return e?f.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[f.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Session ID:"}),f.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Start Time:"}),f.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Messages:"}),f.jsx("div",{children:e.totalMessages})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Participants:"}),f.jsx("div",{children:e.participantCount})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),f.jsx("div",{children:e.connectionIssues})]}),f.jsxs("div",{children:[f.jsx("span",{className:"text-gray-600",children:"Duration:"}),f.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function Cn(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:r,endSession:i}=Ft(),s=j.useCallback(async(a,l)=>await r(a,l),[r]),o=j.useCallback(async()=>await i(),[i]);return{session:e,state:t,metrics:n,isActive:e!==null&&t!=="disconnected",isConnecting:t==="connecting",isConnected:t==="connected"||t==="active",start:s,stop:o}}function $m(){const{sessionMetrics:e,currentSession:t}=Ft();return{metrics:e,sessionId:t==null?void 0:t.id,duration:e==null?void 0:e.duration,participantCount:e==null?void 0:e.participantCount,messageCount:e==null?void 0:e.messageCount,audioQuality:e==null?void 0:e.audioQuality,networkStats:e==null?void 0:e.networkStats}}function _m(){const{setMicrophoneEnabled:e,client:t}=Ft(),[n,r]=j.useState(!1),[i,s]=j.useState(!1),o=j.useCallback(async()=>{if(!i){s(!0);try{const c=!n;await e(c),r(c)}catch(c){console.error("Failed to toggle microphone:",c)}finally{s(!1)}}},[n,i,e]),a=j.useCallback(async()=>{if(!(n||i)){s(!0);try{await e(!0),r(!0)}catch(c){console.error("Failed to enable microphone:",c)}finally{s(!1)}}},[n,i,e]),l=j.useCallback(async()=>{if(!(!n||i)){s(!0);try{await e(!1),r(!1)}catch(c){console.error("Failed to disable microphone:",c)}finally{s(!1)}}},[n,i,e]);return{isEnabled:n,isLoading:i,toggle:o,enable:a,disable:l}}function Bm(){const{setCameraEnabled:e}=Ft(),[t,n]=j.useState(!1),[r,i]=j.useState(!1),s=j.useCallback(async()=>{if(!r){i(!0);try{const l=!t;await e(l),n(l)}catch(l){console.error("Failed to toggle camera:",l)}finally{i(!1)}}},[t,r,e]),o=j.useCallback(async()=>{if(!(t||r)){i(!0);try{await e(!0),n(!0)}catch(l){console.error("Failed to enable camera:",l)}finally{i(!1)}}},[t,r,e]),a=j.useCallback(async()=>{if(!(!t||r)){i(!0);try{await e(!1),n(!1)}catch(l){console.error("Failed to disable camera:",l)}finally{i(!1)}}},[t,r,e]);return{isEnabled:t,isLoading:r,toggle:s,enable:o,disable:a}}function zm(){const{startScreenShare:e,stopScreenShare:t}=Ft(),[n,r]=j.useState(!1),[i,s]=j.useState(!1),o=j.useCallback(async()=>{if(!(n||i)){s(!0);try{await e(),r(!0)}catch(c){console.error("Failed to start screen share:",c)}finally{s(!1)}}},[n,i,e]),a=j.useCallback(async()=>{if(!(!n||i)){s(!0);try{await t(),r(!1)}catch(c){console.error("Failed to stop screen share:",c)}finally{s(!1)}}},[n,i,t]),l=j.useCallback(async()=>{n?await a():await o()},[n,o,a]);return{isSharing:n,isLoading:i,start:o,stop:a,toggle:l}}function QE(){const{client:e}=Ft(),[t,n]=j.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),r=j.useMemo(()=>t.tracks.find(p=>p.isLocal),[t.tracks]),i=j.useMemo(()=>t.tracks.filter(p=>!p.isLocal),[t.tracks]),s=j.useCallback(async()=>{try{r!=null&&r.isEnabled?await(e==null?void 0:e.disableCamera()):await(e==null?void 0:e.enableCamera())}catch(p){throw console.error("Failed to toggle camera:",p),p}},[e,r]),o=j.useCallback(async()=>{try{t.tracks.find(b=>b.isScreenShare)?await(e==null?void 0:e.stopScreenShare()):await(e==null?void 0:e.startScreenShare())}catch(p){throw console.error("Failed to toggle screen share:",p),p}},[e,t.tracks]),a=j.useCallback(p=>{n(b=>({...b,layout:p}))},[]),l=j.useCallback(p=>{n(b=>({...b,pinnedTrack:p}))},[]),c=j.useCallback(()=>{n(p=>({...p,pinnedTrack:void 0}))},[]),u=j.useCallback(async()=>{try{await(e==null?void 0:e.startRecording()),n(p=>({...p,isRecording:!0}))}catch(p){throw console.error("Failed to start recording:",p),p}},[e]),d=j.useCallback(async()=>{try{await(e==null?void 0:e.stopRecording()),n(p=>({...p,isRecording:!1}))}catch(p){throw console.error("Failed to stop recording:",p),p}},[e]),h=j.useCallback(p=>t.tracks.find(b=>b.id===p),[t.tracks]),m=j.useCallback(p=>t.tracks.filter(b=>b.participantId===p),[t.tracks]),g=j.useCallback(p=>p.isEnabled&&t.tracks.includes(p),[t.tracks]);return j.useEffect(()=>{if(!e)return;const p=k=>{n(S=>({...S,tracks:[...S.tracks.filter(A=>A.id!==k.id),k]}))},b=k=>{n(S=>{var A;return{...S,tracks:S.tracks.filter(T=>T.id!==k),pinnedTrack:((A=S.pinnedTrack)==null?void 0:A.id)===k?void 0:S.pinnedTrack}})},v=k=>{n(S=>({...S,tracks:S.tracks.map(A=>A.id===k.id?k:A)}))};return e.on("videoTrackAdded",p),e.on("videoTrackRemoved",b),e.on("videoTrackUpdated",v),()=>{e.off("videoTrackAdded",p),e.off("videoTrackRemoved",b),e.off("videoTrackUpdated",v)}},[e]),{tracks:t.tracks,localTrack:r,remoteTraracks:i,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:s,toggleScreenShare:o,setLayout:a,pinTrack:l,unpinTrack:c,startRecording:u,stopRecording:d,getTrackById:h,getTracksByParticipant:m,isTrackActive:g}}function Xi(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=Ft(),[r,i]=j.useState(!1),s=j.useCallback(async c=>{if(!(!c.trim()||r||!n)){i(!0);try{await t(c.trim())}catch(u){throw console.error("Failed to send chat message:",u),u}finally{i(!1)}}},[t,r,n]),{userMessages:o,agentMessages:a,allMessages:l}=j.useMemo(()=>{const c=e.filter(d=>d.sender.type==="participant"),u=e.filter(d=>d.sender.type==="agent");return{userMessages:c,agentMessages:u,allMessages:e}},[e]);return{messages:l,userMessages:o,agentMessages:a,messageCount:l.length,isSending:r,canSend:!!n&&!r,send:s}}function JE(){const{send:e,isSending:t,canSend:n}=Xi(),[r,i]=j.useState(""),s=j.useCallback(async()=>{if(!(!r.trim()||!n))try{await e(r),i("")}catch(a){throw a}},[r,e,n]),o=j.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),s())},[s]);return{value:r,setValue:i,send:s,handleKeyPress:o,isSending:t,canSend:n&&r.trim().length>0}}function Ja(){const{isConnected:e,isConnecting:t,connectionError:n,connect:r,disconnect:i}=Ft(),s=j.useCallback(async()=>{if(!(e||t))try{await r()}catch(a){throw console.error("Failed to connect:",a),a}},[r,e,t]),o=j.useCallback(async()=>{if(e)try{await i()}catch(a){throw console.error("Failed to disconnect:",a),a}},[i,e]);return{isConnected:e,isConnecting:t,isDisconnected:!e&&!t,error:n,hasError:!!n,connect:s,disconnect:o}}function Hm(){const{participants:e}=Ft();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Um=j.createContext({}),Hr=()=>j.useContext(Um);function Wm({children:e,...t}){return f.jsx(Um.Provider,{value:t,children:e})}function mi({name:e,children:t,fallback:n,className:r}){return f.jsx("div",{className:`voxket-slot voxket-slot--${e} ${r||""}`,children:t||n})}function Zm(e,t={}){return Object.assign(e,t)}function qm({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:r=!0,customControls:i,className:s=""}){const o=Cn(),a=_m(),l=Bm(),c=zm(),u=Hr(),d=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,o.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",s].filter(Boolean).join(" ");return!o.isActive&&!r?f.jsx("div",{className:d,children:f.jsx("div",{className:"voxket-controls-inactive",children:f.jsx("p",{children:"Controls available during active session"})})}):f.jsxs("div",{className:d,children:[r&&f.jsx("div",{className:"voxket-session-actions",children:o.isActive?f.jsx("button",{onClick:o.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):f.jsx(eT,{})}),o.isActive&&f.jsxs("div",{className:"voxket-media-controls",children:[e&&f.jsxs("button",{onClick:a.toggle,disabled:a.isLoading,className:`voxket-button voxket-button--media ${a.isEnabled?"voxket-button--active":""}`,title:a.isEnabled?"Mute microphone":"Unmute microphone",children:[f.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&f.jsxs("button",{onClick:l.toggle,disabled:l.isLoading,className:`voxket-button voxket-button--media ${l.isEnabled?"voxket-button--active":""}`,title:l.isEnabled?"Stop camera":"Start camera",children:[f.jsx("span",{className:"voxket-icon",children:"📹"}),l.isLoading?"Loading...":l.isEnabled?"Stop Video":"Start Video"]}),n&&f.jsxs("button",{onClick:c.toggle,disabled:c.isLoading,className:`voxket-button voxket-button--media ${c.isSharing?"voxket-button--active":""}`,title:c.isSharing?"Stop screen share":"Start screen share",children:[f.jsx("span",{className:"voxket-icon",children:"🖥️"}),c.isLoading?"Loading...":c.isSharing?"Stop Share":"Share Screen"]})]}),i&&f.jsx("div",{className:"voxket-custom-controls",children:i})]})}function eT(){Cn();const[e,t]=j.useState(!1),n=async()=>{t(!0);try{console.log("Start session - agentId needed")}catch(r){console.error("Failed to start session:",r)}finally{t(!1)}};return f.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function el({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:r=""}){const i=Cn(),s=Ja(),o=Hr(),a=["voxket-session-header",`voxket-session-header--${o.variant||"default"}`,`voxket-session-header--${o.size||"md"}`,r].filter(Boolean).join(" ");return f.jsxs("div",{className:a,children:[e&&f.jsxs("div",{className:"voxket-connection-status",children:[f.jsx("div",{className:`voxket-status-indicator ${s.isConnected?"connected":"disconnected"}`}),f.jsx("span",{className:"voxket-status-text",children:s.isConnecting?"Connecting...":s.isConnected?"Connected":"Disconnected"})]}),t&&i.session&&f.jsxs("div",{className:"voxket-session-info",children:[f.jsxs("div",{className:"voxket-session-id",children:["Session: ",i.session.id.slice(-8)]}),f.jsxs("div",{className:"voxket-session-state",children:["State: ",i.state]})]}),n&&i.session&&f.jsxs("div",{className:"voxket-agent-info",children:[f.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",i.session.agentId]}),f.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",i.session.activeModalities.join(", ")]})]}),s.error&&f.jsxs("div",{className:"voxket-error-message",children:["Error: ",s.error.message]})]})}function tl({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:r=""}){const i=Cn(),s=Xi(),o=Hr(),a=["voxket-session-content",`voxket-session-content--${o.variant||"default"}`,`voxket-session-content--${o.size||"md"}`,r].filter(Boolean).join(" ");return i.isActive?f.jsx("div",{className:a,children:n||f.jsxs(f.Fragment,{children:[e&&f.jsxs("div",{className:"voxket-chat-container",children:[f.jsxs("div",{className:"voxket-chat-messages",children:[s.messages.map(l=>f.jsxs("div",{className:`voxket-message voxket-message--${l.sender.type}`,children:[f.jsxs("div",{className:"voxket-message-header",children:[f.jsx("span",{className:"voxket-message-sender",children:l.sender.name}),f.jsx("span",{className:"voxket-message-time",children:l.timestamp.toLocaleTimeString()})]}),f.jsx("div",{className:"voxket-message-content",children:l.content})]},l.id)),s.messages.length===0&&f.jsx("div",{className:"voxket-empty-messages",children:f.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),f.jsx(tT,{})]}),t&&f.jsx("div",{className:"voxket-transcriptions",children:f.jsx("div",{className:"voxket-transcription-placeholder",children:f.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):f.jsx("div",{className:a,children:f.jsx("div",{className:"voxket-inactive-state",children:f.jsxs("div",{className:"voxket-inactive-message",children:[f.jsx("h3",{children:"Start a conversation"}),f.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function tT(){const e=Xi(),[t,n]=j.useState(""),r=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(s){console.error("Failed to send message:",s)}},i=s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),r())};return f.jsxs("div",{className:"voxket-chat-input",children:[f.jsx("input",{type:"text",value:t,onChange:s=>n(s.target.value),onKeyPress:i,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),f.jsx("button",{onClick:r,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function nl({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:r,className:i=""}){const s=Cn(),o=$m(),a=Hm(),l=Hr(),c=["voxket-session-footer",`voxket-session-footer--${l.variant||"default"}`,`voxket-session-footer--${l.size||"md"}`,i].filter(Boolean).join(" ");return s.isActive?f.jsx("div",{className:c,children:r||f.jsxs(f.Fragment,{children:[n&&f.jsxs("div",{className:"voxket-session-status",children:[f.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),f.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&o.metrics&&f.jsxs("div",{className:"voxket-session-metrics",children:[f.jsxs("div",{className:"voxket-metric",children:[f.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),f.jsx("span",{className:"voxket-metric-value",children:nT(o.duration||0)})]}),f.jsxs("div",{className:"voxket-metric",children:[f.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),f.jsx("span",{className:"voxket-metric-value",children:o.metrics.messageCount})]})]}),t&&f.jsxs("div",{className:"voxket-participants-info",children:[f.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&f.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>f.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):f.jsx("div",{className:c,children:f.jsx("div",{className:"voxket-footer-inactive",children:f.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function nT(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),r=Math.floor(n/60);return r>0?`${r}:${(n%60).toString().padStart(2,"0")}:${(t%60).toString().padStart(2,"0")}`:`${n}:${(t%60).toString().padStart(2,"0")}`}function rT({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:r,onSessionEnd:i,variant:s="default",size:o="md",theme:a,className:l="",children:c}){var m;const u=Cn(),d=Ja();j.useEffect(()=>{n&&e&&d.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,d.isConnected,u.isActive]),j.useEffect(()=>{var g;(g=u.session)!=null&&g.id&&r&&r(u.session.id)},[(m=u.session)==null?void 0:m.id,r]),j.useEffect(()=>()=>{u.isActive&&i&&u.stop().then(i).catch(console.error)},[]);const h=["voxket-session",`voxket-session--${s}`,`voxket-session--${o}`,u.isActive?"voxket-session--active":"voxket-session--inactive",l].filter(Boolean).join(" ");return f.jsx(Wm,{variant:s,size:o,theme:a,className:l,children:f.jsx("div",{className:h,children:c||f.jsxs(f.Fragment,{children:[f.jsx(mi,{name:"header",fallback:f.jsx(el,{})}),f.jsx(mi,{name:"content",fallback:f.jsx(tl,{})}),f.jsx(mi,{name:"footer",fallback:f.jsx(nl,{})})]})})})}const Gm=Zm(rT,{Header:el,Content:tl,Footer:nl,Controls:qm}),vn={name:"default",colors:{primary:"#3B82F6",secondary:"#6B7280",accent:"#8B5CF6",background:"#FFFFFF",surface:"#F9FAFB",text:{primary:"#111827",secondary:"#6B7280",muted:"#9CA3AF",inverse:"#FFFFFF"},status:{success:"#10B981",warning:"#F59E0B",error:"#EF4444",info:"#3B82F6"},border:"#E5E7EB",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},typography:{fontFamily:"system-ui, -apple-system, sans-serif",fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,normal:1.5,relaxed:1.75}},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},borderRadius:{none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",full:"9999px"},shadows:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1)"}},Is={...vn,name:"dark",colors:{primary:"#60A5FA",secondary:"#9CA3AF",accent:"#A78BFA",background:"#111827",surface:"#1F2937",text:{primary:"#F9FAFB",secondary:"#D1D5DB",muted:"#9CA3AF",inverse:"#111827"},status:{success:"#34D399",warning:"#FBBF24",error:"#F87171",info:"#60A5FA"},border:"#374151",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.3)"}},Rs={...vn,name:"enterprise",colors:{primary:"#1E40AF",secondary:"#64748B",accent:"#7C3AED",background:"#FFFFFF",surface:"#F8FAFC",text:{primary:"#0F172A",secondary:"#475569",muted:"#94A3B8",inverse:"#FFFFFF"},status:{success:"#059669",warning:"#D97706",error:"#DC2626",info:"#1E40AF"},border:"#CBD5E1",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"},borderRadius:{none:"0",sm:"0.125rem",md:"0.25rem",lg:"0.375rem",full:"9999px"}},Km=j.createContext(null),Ym=()=>{const e=j.useContext(Km);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function iT({theme:e="default",themes:t={},children:n,cssVariables:r=!0,className:i=""}){const[s,o]=j.useState(()=>{const h={default:vn,dark:Is,enterprise:Rs,...t};return typeof e=="string"?h[e]||vn:e}),[a,l]=j.useState(()=>({default:vn,dark:Is,enterprise:Rs,...t})),c=h=>{if(typeof h=="string"){const m=a[h];m&&o(m)}else o(h)},u=h=>{l(m=>({...m,[h.name]:h}))};j.useEffect(()=>{if(r&&wi&&Xe){const h=Xe.documentElement;Object.entries(Xm(s)).forEach(([m,g])=>{h.style.setProperty(`--voxket-${m}`,g)})}},[s,r]);const d={theme:s,setTheme:c,themes:a,registerTheme:u};return f.jsx(Km.Provider,{value:d,children:f.jsx("div",{className:`voxket-theme voxket-theme--${s.name} ${i}`,children:n})})}function Xm(e){const t={},n=(r,i="")=>{for(const[s,o]of Object.entries(r)){const a=i?`${i}-${s}`:s;typeof o=="object"&&o!==null&&!Array.isArray(o)?n(o,a):t[a]=String(o)}};return n(e),t}function oT(e=vn,t){return{...e,...t,colors:{...e.colors,...t.colors},typography:{...e.typography,...t.typography},spacing:{...e.spacing,...t.spacing},borderRadius:{...e.borderRadius,...t.borderRadius},shadows:{...e.shadows,...t.shadows}}}function sT(e){var n;const{theme:t}=Ym();return((n=t.components)==null?void 0:n[e])||{}}const aT=Qa("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&lT(e),t.enableVoiceActivation&&cT(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&uT(e,t)}});function lT(e,t){e.on("participant.speaking.started",n=>{console.log("Transcription: Started for",n.name)}),e.on("participant.speaking.stopped",n=>{console.log("Transcription: Stopped for",n.name)})}function cT(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function uT(e,t){console.log("Playing audio response:",t.content)}const dT=Qa("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&fT(),t.enableFileUpload&&hT(e),t.enableCustomComponents&&mT(),console.log("Chat modality activated",t)},onDeactivate:async e=>{console.log("Chat modality deactivated")},onMessage:async(e,t)=>{const n=e.config;t.type==="ui_component"?pT(e,t):t.type==="text"&&n.enableRichText&&gT(e,t)}});function fT(e){console.log("Rich text support enabled")}function hT(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function mT(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",yT),t.set("form",xT),t.set("card",bT),t.set("chart",vT)}function pT(e,t){const{componentType:n,props:r}=t.metadata;console.log("Rendering custom component:",n,r),e.emit("chat.component.render",{type:n,props:r,timestamp:new Date})}function gT(e,t){console.log("Processing rich text message:",t.content)}function yT(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function xT(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function bT(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function vT(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function pi({track:e,participantName:t,showControls:n=!0,showName:r=!0,showMuteIndicator:i=!0,isPinned:s=!1,className:o="",onClick:a,onPin:l,onUnpin:c}){const u=j.useRef(null),[d,h]=j.useState(!1);j.useEffect(()=>{if(!u.current||!e.isEnabled)return;const b=u.current;return b.srcObject=null,()=>{b.srcObject&&(b.srcObject=null)}},[e]);const m=()=>{a==null||a(e)},g=b=>{b.stopPropagation(),s?c==null||c(e):l==null||l(e)},p=["voxket-video-tile",e.isLocal?"voxket-video-tile--local":"voxket-video-tile--remote",e.isScreenShare?"voxket-video-tile--screen-share":"voxket-video-tile--camera",s?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",d?"voxket-video-tile--hovered":"",o].filter(Boolean).join(" ");return f.jsxs("div",{className:p,onClick:m,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[f.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&f.jsxs("div",{className:"voxket-video-placeholder",children:[f.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),f.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),f.jsxs("div",{className:"voxket-video-overlay",children:[r&&t&&f.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),i&&!e.isEnabled&&f.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(d||s)&&f.jsxs("div",{className:"voxket-video-controls",children:[f.jsx("button",{className:`voxket-video-control-btn ${s?"voxket-video-control-btn--active":""}`,onClick:g,title:s?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&f.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&f.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&f.jsx("div",{className:"voxket-video-loading",children:f.jsx("div",{className:"voxket-spinner"})})]})}function wT({tracks:e,layout:t,className:n="",onLayoutChange:r,onTrackClick:i,maxVisibleTracks:s=9,showPagination:o=!0}){const[a,l]=j.useState(0),[c,u]=j.useState(null),d=j.useMemo(()=>{let k=[...e];t.type==="speaker"&&c&&(k=[c,...e.filter(T=>T.id!==c.id)]);const S=a*s,A=S+s;return k.slice(S,A)},[e,t,c,a,s]),h=Math.ceil(e.length/s),m=j.useMemo(()=>{const k=d.length;switch(t.type){case"grid":const S=Math.ceil(Math.sqrt(k)),A=Math.ceil(k/S);return{display:"grid",gridTemplateColumns:`repeat(${S}, 1fr)`,gridTemplateRows:`repeat(${A}, 1fr)`,gap:"8px"};case"speaker":return{display:"flex",flexDirection:"column",gap:"8px"};case"sidebar":return{display:"flex",gap:"8px"};case"gallery":return{display:"flex",flexWrap:"wrap",gap:"8px",justifyContent:"center"};default:return{}}},[t.type,d.length]),g=k=>{u(k)},p=()=>{u(null)},b=k=>{r==null||r({...t,type:k})},v=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${d.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?f.jsx("div",{className:"voxket-video-grid-empty",children:f.jsxs("div",{className:"voxket-video-grid-empty-content",children:[f.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),f.jsx("p",{children:"No video tracks available"})]})}):f.jsxs("div",{className:v,children:[f.jsxs("div",{className:"voxket-video-grid-controls",children:[f.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(k=>f.jsx("button",{className:`voxket-layout-btn ${t.type===k?"voxket-layout-btn--active":""}`,onClick:()=>b(k),title:`Switch to ${k} layout`,children:kT(k)},k))}),f.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),f.jsx("div",{className:"voxket-video-grid-content",style:m,children:t.type==="speaker"&&c?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"voxket-video-speaker-main",children:f.jsx(pi,{track:c,participantName:`Participant ${c.participantId}`,isPinned:!0,onClick:i,onUnpin:p})}),f.jsx("div",{className:"voxket-video-speaker-sidebar",children:d.filter(k=>k.id!==c.id).map(k=>f.jsx(pi,{track:k,participantName:`Participant ${k.participantId}`,showControls:!1,onClick:i,onPin:g},k.id))})]}):d.map(k=>f.jsx(pi,{track:k,participantName:`Participant ${k.participantId}`,isPinned:(c==null?void 0:c.id)===k.id,onClick:i,onPin:g,onUnpin:p},k.id))}),o&&h>1&&f.jsxs("div",{className:"voxket-video-pagination",children:[f.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.max(0,a-1)),disabled:a===0,children:"←"}),f.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",h]}),f.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.min(h-1,a+1)),disabled:a===h-1,children:"→"})]})]})}function kT(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function ST({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:r,showLayoutControls:i=!0,showCameraControls:s=!0,showScreenShareControls:o=!0,className:a=""}){const l=["voxket-video-controls",a].filter(Boolean).join(" "),c=u=>{r==null||r({type:u,showLocalVideo:!0,aspectRatio:"16:9"})};return f.jsxs("div",{className:l,children:[s&&f.jsxs("div",{className:"voxket-video-controls-section",children:[f.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),f.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isEnabled?"voxket-control-btn--active":""}`,onClick:t,title:e!=null&&e.isEnabled?"Turn off camera":"Turn on camera",children:[f.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),f.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&f.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),o&&f.jsxs("div",{className:"voxket-video-controls-section",children:[f.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),f.jsxs("button",{className:`voxket-control-btn ${e!=null&&e.isScreenShare?"voxket-control-btn--active":""}`,onClick:n,title:e!=null&&e.isScreenShare?"Stop screen sharing":"Start screen sharing",children:[f.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),f.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),i&&f.jsxs("div",{className:"voxket-video-controls-section",children:[f.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),f.jsx("div",{className:"voxket-layout-buttons",children:[{type:"grid",icon:"⊞",label:"Grid"},{type:"speaker",icon:"🎤",label:"Speaker"},{type:"sidebar",icon:"⫸",label:"Sidebar"},{type:"gallery",icon:"⊡",label:"Gallery"}].map(({type:u,icon:d,label:h})=>f.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>c(u),title:`Switch to ${h} layout`,children:[f.jsx("span",{className:"voxket-control-icon",children:d}),f.jsx("span",{className:"voxket-control-label",children:h})]},u))})]}),f.jsxs("div",{className:"voxket-video-controls-section",children:[f.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),f.jsxs("div",{className:"voxket-video-settings",children:[f.jsxs("div",{className:"voxket-setting-group",children:[f.jsx("label",{className:"voxket-setting-label",children:"Quality"}),f.jsxs("select",{className:"voxket-setting-select",children:[f.jsx("option",{value:"high",children:"High (720p)"}),f.jsx("option",{value:"medium",children:"Medium (480p)"}),f.jsx("option",{value:"low",children:"Low (240p)"})]})]}),f.jsxs("div",{className:"voxket-setting-group",children:[f.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),f.jsxs("select",{className:"voxket-setting-select",children:[f.jsx("option",{value:"30",children:"30 fps"}),f.jsx("option",{value:"15",children:"15 fps"}),f.jsx("option",{value:"10",children:"10 fps"})]})]}),f.jsxs("div",{className:"voxket-setting-group",children:[f.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),f.jsxs("select",{className:"voxket-setting-select",children:[f.jsx("option",{value:"unlimited",children:"Unlimited"}),f.jsx("option",{value:"1000",children:"1 Mbps"}),f.jsx("option",{value:"500",children:"500 Kbps"}),f.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),f.jsxs("div",{className:"voxket-video-controls-section",children:[f.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),f.jsxs("div",{className:"voxket-video-stats",children:[f.jsxs("div",{className:"voxket-stat-item",children:[f.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),f.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),f.jsxs("div",{className:"voxket-stat-item",children:[f.jsx("span",{className:"voxket-stat-label",children:"Source:"}),f.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),f.jsxs("div",{className:"voxket-stat-item",children:[f.jsx("span",{className:"voxket-stat-label",children:"Status:"}),f.jsx("span",{className:`voxket-stat-value ${e!=null&&e.isEnabled?"voxket-stat-value--active":"voxket-stat-value--inactive"}`,children:e!=null&&e.isEnabled?"Active":"Inactive"})]})]})]})]})}const Qm=({handler:e,loadData:t,data:n,client:r,addLocalMessage:i})=>{const[s,o]=x.useState(null),[a,l]=x.useState(!0),[c,u]=x.useState(!1),[d]=x.useState(Date.now());x.useEffect(()=>{(async()=>{try{if(l(!0),console.log("📋 AssignmentView: Loading assignment data..."),console.log("📋 AssignmentView: Received data from RPC:",n),n&&typeof n=="object"){const b={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};o(b),console.log("📋 AssignmentView: Assignment loaded from RPC data:",b)}}catch(b){console.error("📋 AssignmentView: Error loading assignment:",b),o({title:"Assignment Loading Error",description:"There was an error loading the assignment details. Please try again.",estimated_time_of_completion:"Unknown"})}finally{l(!1)}})()},[n,t]);const h=({message:p,assignment:b})=>{const v=p.toLowerCase().includes("declined"),k=v?"bg-red-50 border-red-200":"bg-green-50 border-green-200",S=v?"text-red-700":"text-green-700",A=v?"❌":"🎉";return f.jsxs("div",{className:`max-w-sm mx-auto ${k} border rounded-lg shadow p-3 flex flex-col items-center`,children:[f.jsx("div",{className:"text-2xl mb-2",children:A}),f.jsx("div",{className:`${S} font-semibold text-sm mb-1`,children:p}),f.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:b.title}),f.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},m=async()=>{if(!(!s||!e)){u(!0);try{const p={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",p),e.didSuccess(p,f.jsx(h,{message:"Assignment accepted!",assignment:s}))}catch(p){console.error("📋 AssignmentView: Error accepting assignment:",p),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},g=async()=>{if(!(!s||!e)){u(!0);try{const p={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",p),e.didSuccess(p,f.jsx(h,{message:"Assignment declined",assignment:s}))}catch(p){console.error("📋 AssignmentView: Error declining assignment:",p),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?f.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:f.jsxs("div",{className:"flex items-center justify-center py-4",children:[f.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),f.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):s?f.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[f.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:f.jsx("div",{className:"flex items-center justify-between",children:f.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:s.title})})}),f.jsxs("div",{className:"p-3 text-black",children:[f.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:f.jsx("p",{className:"text-xs text-black leading-snug",children:s.description})}),f.jsx("div",{className:"mb-3 text-black",children:f.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[f.jsx("span",{className:"text-xs mr-1",children:"📅"}),f.jsxs("span",{children:["Est: ",s.estimated_time_of_completion]})]})}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:m,disabled:c,className:"flex-1 bg-green-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:c?f.jsxs("span",{className:"flex items-center justify-center",children:[f.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),f.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),f.jsx("button",{onClick:g,disabled:c,className:"flex-1 bg-red-600 text-white py-2 px-3 rounded text-xs font-medium hover:bg-red-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Decline"})]})]})]}):f.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:f.jsxs("div",{className:"text-center py-4",children:[f.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),f.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function CT(){const[e,t]=x.useState(null),[n,r]=x.useState([]);x.useEffect(()=>{const a=new zr({appId:"your-app-id",appSecret:"your-app-secret",baseUrl:"https://your-voxket-api.com",agentId:"your-agent-id",participantName:"User",modalities:["chat"]});return t(a),a.on("rpc.method.called",l=>{console.log("RPC Method Called:",l)}),a.on("rpc.interaction.completed",l=>{console.log("RPC Interaction Completed:",l)}),()=>{a.disconnect()}},[]);const i=async()=>{if(e)try{await e.registerFrontendRPC("give_assignment",Qm,"embedded");const a=e.getRegisteredRpcMethods();r(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},s=async()=>{if(!e)return;const a=({handler:l,timeout:c})=>{const[u,d]=x.useState(""),h=[{id:"pro",name:"Pro Plan",price:"$29/month"},{id:"enterprise",name:"Enterprise Plan",price:"$99/month"},{id:"basic",name:"Basic Plan",price:"$9/month"}],m=p=>{d(p)},g=()=>{const p=h.find(b=>b.id===u);l==null||l.didSuccess({selectedProduct:u,productName:p==null?void 0:p.name,price:p==null?void 0:p.price,timestamp:new Date().toISOString()})};return f.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[f.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),f.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),f.jsx("div",{className:"space-y-3 mb-6",children:h.map(p=>f.jsx("div",{onClick:()=>m(p.id),className:`p-4 border rounded-lg cursor-pointer transition-all ${u===p.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:f.jsxs("div",{className:"flex justify-between items-center",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"font-medium",children:p.name}),f.jsx("p",{className:"text-gray-600 text-sm",children:p.price})]}),f.jsx("div",{className:`w-4 h-4 rounded-full ${u===p.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},p.id))}),f.jsxs("div",{className:"flex justify-end space-x-3",children:[f.jsx("button",{onClick:()=>l==null?void 0:l.dismissView(),className:"px-4 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Cancel"}),f.jsx("button",{onClick:g,disabled:!u,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Select Plan"})]}),c&&f.jsxs("p",{className:"text-xs text-gray-500 mt-2",children:["Time remaining: ",c," seconds"]})]})};try{await e.registerFrontendRPC("recommend_product",a,"modal");const l=e.getRegisteredRpcMethods();r(l),console.log("✅ Product Recommendation RPC registered successfully")}catch(l){console.error("❌ Failed to register product recommendation RPC:",l)}},o=async()=>{if(!e)return;const a=({handler:l})=>{const[c,u]=x.useState(0),[d,h]=x.useState(""),m=()=>{l==null||l.didSuccess({rating:c,comment:d,timestamp:new Date().toISOString()})};return f.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[f.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),f.jsxs("div",{className:"mb-4",children:[f.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),f.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(g=>f.jsx("button",{onClick:()=>u(g),className:`text-2xl ${g<=c?"text-yellow-400":"text-gray-300"}`,children:"⭐"},g))})]}),f.jsxs("div",{className:"mb-4",children:[f.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),f.jsx("textarea",{value:d,onChange:g=>h(g.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),f.jsxs("div",{className:"flex justify-end space-x-2",children:[f.jsx("button",{onClick:()=>l==null?void 0:l.dismissView(),className:"px-3 py-1 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50",children:"Skip"}),f.jsx("button",{onClick:m,disabled:c===0,className:"px-3 py-1 text-sm bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",children:"Submit"})]})]})};try{await e.registerFrontendRPC("collect_feedback",a,"embedded");const l=e.getRegisteredRpcMethods();r(l),console.log("✅ Feedback RPC registered successfully")}catch(l){console.error("❌ Failed to register feedback RPC:",l)}};return f.jsxs("div",{className:"p-6",children:[f.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),f.jsxs("div",{className:"space-y-4 mb-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),f.jsxs("div",{className:"space-x-2",children:[f.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),f.jsx("button",{onClick:s,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),f.jsx("button",{onClick:o,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?f.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>f.jsx("li",{className:"text-gray-700",children:f.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):f.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),f.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[f.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),f.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[f.jsxs("li",{children:["Register RPC methods with React components using ",f.jsx("code",{children:"client.registerFrontendRPC()"})]}),f.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),f.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),f.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),f.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),f.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[f.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),f.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),f.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
195
164
  const response = await participant.performRpc({
196
165
  method: 'give_assignment',
197
166
  data: JSON.stringify({
@@ -202,60 +171,4 @@ const response = await participant.performRpc({
202
171
  })
203
172
  });
204
173
 
205
- console.log('User response:', response);`})]})]})}const Gx={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const s=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),r=JSON.parse(s);return console.log("✅ Agent: Received user response:",r),await this.processAssignmentResponse(r),r}catch(s){throw console.error("❌ Agent: RPC failed:",s),s}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,s=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${s}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:s,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}};if(typeof document<"u"){const e=()=>{if(!document.querySelector("style[data-voxket-critical-styles]")){const t=document.createElement("style");t.type="text/css",t.setAttribute("data-voxket-critical-styles","true"),t.textContent=`
206
- .voxket-widget-root {
207
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif !important;
208
- line-height: 1.5 !important;
209
- font-weight: 400 !important;
210
- color-scheme: light dark !important;
211
- color: rgba(255, 255, 255, 0.87) !important;
212
- font-synthesis: none !important;
213
- text-rendering: optimizeLegibility !important;
214
- -webkit-font-smoothing: antialiased !important;
215
- -moz-osx-font-smoothing: grayscale !important;
216
- box-sizing: border-box !important;
217
- position: relative !important;
218
- visibility: visible !important;
219
- opacity: 1 !important;
220
- }
221
-
222
- .voxket-widget-root *, .voxket-widget-root *:before, .voxket-widget-root *:after {
223
- box-sizing: border-box !important;
224
- }
225
-
226
- .voxket-popup-trigger {
227
- position: fixed !important;
228
- z-index: 9999 !important;
229
- background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
230
- color: #ffffff !important;
231
- border: none !important;
232
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
233
- display: inline-flex !important;
234
- align-items: center !important;
235
- justify-content: center !important;
236
- border-radius: 9999px !important;
237
- padding: 0.5rem 1rem !important;
238
- font-weight: 500 !important;
239
- transition: all 0.15s ease-in-out !important;
240
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
241
- font-size: 14px !important;
242
- cursor: pointer !important;
243
- }
244
-
245
- .voxket-popup-trigger:hover {
246
- background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
247
- transform: scale(1.05) !important;
248
- }
249
-
250
- .voxket-widget-root[data-theme="vox"] #voice-card {
251
- background: linear-gradient(135deg, #171727, #12121f, #0f0f23) !important;
252
- }
253
-
254
- .voxket-widget-root[data-theme="dark"] #voice-card {
255
- background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a) !important;
256
- }
257
-
258
- .voxket-widget-root[data-theme="light"] #voice-card {
259
- background: linear-gradient(135deg, #f0f9ff, #ffffff, #e0f2fe) !important;
260
- }
261
- `,(document.head||document.getElementsByTagName("head")[0]).appendChild(t)}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}const Kx=e=>typeof window>"u"?null:g.createElement(Wo,{children:g.createElement(ms,e)});exports.AssignmentView=Gd;exports.CompoundProvider=_d;exports.InteractiveComponent=un;exports.PluginManager=Pd;exports.RpcExamples=Zx;exports.SessionContainer=Hd;exports.SessionContent=qo;exports.SessionControls=Ud;exports.SessionFooter=Xo;exports.SessionHeader=Yo;exports.SessionLogViewer=xx;exports.SessionMetricsComponent=bx;exports.Slot=gs;exports.ThemeProvider=Ex;exports.VideoControls=Wx;exports.VideoGrid=Hx;exports.VideoTile=ps;exports.VoxketClient=Wn;exports.VoxketErrorBoundary=Wo;exports.VoxketEventEmitter=Zo;exports.VoxketProvider=hs;exports.VoxketSDK=Wn;exports.VoxketSessionComponent=Hd;exports.agentRpcExample=Gx;exports.analyticsPlugin=ix;exports.chatModalityPlugin=Rx;exports.createCustomTheme=Ax;exports.createModalityPlugin=Go;exports.createPlugin=ox;exports.darkTheme=Kr;exports.debugPlugin=ax;exports.default=Kx;exports.defaultTheme=Ht;exports.enterpriseTheme=Yr;exports.flattenTheme=Zd;exports.metricsPlugin=lx;exports.useComponentTheme=jx;exports.useCompoundContext=Zn;exports.useSessionLogging=Vd;exports.useTheme=Wd;exports.useVoxket=ft;exports.useVoxketCamera=$d;exports.useVoxketChat=Bs;exports.useVoxketChatInput=wx;exports.useVoxketConnection=Ko;exports.useVoxketMetrics=Id;exports.useVoxketMicrophone=Dd;exports.useVoxketParticipants=Od;exports.useVoxketScreenShare=Fd;exports.useVoxketSession=Wt;exports.useVoxketVideo=vx;exports.voiceModalityPlugin=Nx;exports.withCompoundComponent=Bd;
174
+ console.log('User response:', response);`})]})]})}const ET={async checkAvailableRpcs(e){const t=e.getRegisteredRpcMethods();return console.log("🔍 Agent: Available RPC methods:",t),t},async triggerAssignment(e,t){const n={title:"Complete Q4 Sales Analysis Report",description:"Please analyze the Q4 sales data and create a comprehensive report with insights, trends, and recommendations for the upcoming quarter. Include visualizations and executive summary.",estimated_time_of_completion:"2-3 hours"};try{console.log("🤖 Agent: Triggering give_assignment RPC with data:",n);const r=await e.localParticipant.performRpc(t,"give_assignment",JSON.stringify(n),{responseTimeout:12e4}),i=JSON.parse(r);return console.log("✅ Agent: Received user response:",i),await this.processAssignmentResponse(i),i}catch(r){throw console.error("❌ Agent: RPC failed:",r),r}},async processAssignmentResponse(e){console.log("🧠 Agent: Processing assignment response...");const t=e.status,n=e.assignmentId,r=e.timeSpent;return t==="accepted"?(console.log("🎉 Agent: User accepted the assignment!"),console.log(`� Assignment ID: ${n}`),console.log(`⏱️ Time to respond: ${r}ms`),console.log("💬 Agent: Sending follow-up:","Great! I've recorded that you've accepted the assignment. You'll receive the detailed requirements and access to the data shortly. Let me know if you need any clarification!")):t==="declined"?(console.log("❌ Agent: User declined the assignment"),console.log("💬 Agent: Sending follow-up:","No problem! Is there anything specific about this assignment that doesn't work for you? I can suggest alternatives or modify the requirements.")):t==="completed"&&(console.log("✅ Agent: User completed the assignment"),console.log("💬 Agent: Sending follow-up:","Excellent work! Could you please share the completed report? I'm excited to review your analysis and insights.")),{status:t,assignmentId:n,timeSpent:r,processed:!0,followupAction:t==="accepted"?"send_requirements":t==="declined"?"offer_alternatives":"request_deliverables"}},getAssignmentExamples(){return{marketing:{title:"Create Social Media Campaign",description:"Design and plan a social media campaign for our new product launch. Include content calendar, post designs, and engagement strategy.",estimated_time_of_completion:"4-5 hours"},technical:{title:"API Integration Documentation",description:"Create comprehensive documentation for our new API endpoints, including examples, error codes, and best practices for developers.",estimated_time_of_completion:"6-8 hours"},research:{title:"Market Research Analysis",description:"Research and analyze competitor pricing strategies in our target market. Provide recommendations for our pricing model.",estimated_time_of_completion:"3-4 hours"},quick:{title:"Customer Feedback Summary",description:"Review this week's customer feedback and create a summary of key themes and actionable insights.",estimated_time_of_completion:"30-45 minutes"}}}},TT=e=>va?x.createElement(Ya,{children:x.createElement(hi,e)}):null;exports.AssignmentView=Qm;exports.CompoundProvider=Wm;exports.InteractiveComponent=Pr;exports.PluginManager=Lm;exports.RpcExamples=CT;exports.SessionContainer=Gm;exports.SessionContent=tl;exports.SessionControls=qm;exports.SessionFooter=nl;exports.SessionHeader=el;exports.SessionLogViewer=YE;exports.SessionMetricsComponent=XE;exports.Slot=mi;exports.ThemeProvider=iT;exports.VideoControls=ST;exports.VideoGrid=wT;exports.VideoTile=pi;exports.VoxketClient=zr;exports.VoxketErrorBoundary=Ya;exports.VoxketEventEmitter=Xa;exports.VoxketProvider=fi;exports.VoxketSDK=zr;exports.VoxketSessionComponent=Gm;exports.agentRpcExample=ET;exports.analyticsPlugin=OE;exports.chatModalityPlugin=dT;exports.createCustomTheme=oT;exports.createModalityPlugin=Qa;exports.createPlugin=LE;exports.darkTheme=Is;exports.debugPlugin=$E;exports.default=TT;exports.defaultTheme=vn;exports.enterpriseTheme=Rs;exports.flattenTheme=Xm;exports.metricsPlugin=_E;exports.useComponentTheme=sT;exports.useCompoundContext=Hr;exports.useSessionLogging=Fm;exports.useTheme=Ym;exports.useVoxket=Ft;exports.useVoxketCamera=Bm;exports.useVoxketChat=Xi;exports.useVoxketChatInput=JE;exports.useVoxketConnection=Ja;exports.useVoxketMetrics=$m;exports.useVoxketMicrophone=_m;exports.useVoxketParticipants=Hm;exports.useVoxketScreenShare=zm;exports.useVoxketSession=Cn;exports.useVoxketVideo=QE;exports.voiceModalityPlugin=aT;exports.withCompoundComponent=Zm;