@voxket-ai/voxket-live 1.0.126 → 1.0.138

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,7 +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
- 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";
11
+ style.textContent = "/*!\n Theme: GitHub\n Description: Light theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-light\n Current colors taken from GitHub's CSS\n*/.voxket-widget-root .hljs{color:#24292e;background:#fff}.voxket-widget-root .hljs-doctag,.voxket-widget-root .hljs-keyword,.voxket-widget-root .hljs-meta .hljs-keyword,.voxket-widget-root .hljs-template-tag,.voxket-widget-root .hljs-template-variable,.voxket-widget-root .hljs-type,.voxket-widget-root .hljs-variable.language_{color:#d73a49}.voxket-widget-root .hljs-title,.voxket-widget-root .hljs-title.class_,.voxket-widget-root .hljs-title.class_.inherited__,.voxket-widget-root .hljs-title.function_{color:#6f42c1}.voxket-widget-root .hljs-attr,.voxket-widget-root .hljs-attribute,.voxket-widget-root .hljs-literal,.voxket-widget-root .hljs-meta,.voxket-widget-root .hljs-number,.voxket-widget-root .hljs-operator,.voxket-widget-root .hljs-variable,.voxket-widget-root .hljs-selector-attr,.voxket-widget-root .hljs-selector-class,.voxket-widget-root .hljs-selector-id{color:#005cc5}.voxket-widget-root .hljs-regexp,.voxket-widget-root .hljs-string,.voxket-widget-root .hljs-meta .hljs-string{color:#032f62}.voxket-widget-root .hljs-built_in,.voxket-widget-root .hljs-symbol{color:#e36209}.voxket-widget-root .hljs-comment,.voxket-widget-root .hljs-code,.voxket-widget-root .hljs-formula{color:#6a737d}.voxket-widget-root .hljs-name,.voxket-widget-root .hljs-quote,.voxket-widget-root .hljs-selector-tag,.voxket-widget-root .hljs-selector-pseudo{color:#22863a}.voxket-widget-root .hljs-subst{color:#24292e}.voxket-widget-root .hljs-section{color:#005cc5;font-weight:700}.voxket-widget-root .hljs-bullet{color:#735c0f}.voxket-widget-root .hljs-emphasis{color:#24292e;font-style:italic}.voxket-widget-root .hljs-strong{color:#24292e;font-weight:700}.voxket-widget-root .hljs-addition{color:#22863a;background-color:#f0fff4}.voxket-widget-root .hljs-deletion{color:#b31d28;background-color:#ffeef0}.voxket-widget-root pre code.hljs{display:block;overflow-x:auto;padding:1em}.voxket-widget-root code.hljs{padding:3px 5px}/*!\n Theme: GitHub Dark\n Description: Dark theme as seen on github.com\n Author: github.com\n Maintainer: @Hirse\n Updated: 2021-05-15\n\n Outdated base version: https://github.com/primer/github-syntax-dark\n Current colors taken from GitHub's CSS\n*/.voxket-widget-root .hljs{color:#c9d1d9;background:#0d1117}.voxket-widget-root .hljs-doctag,.voxket-widget-root .hljs-keyword,.voxket-widget-root .hljs-meta .hljs-keyword,.voxket-widget-root .hljs-template-tag,.voxket-widget-root .hljs-template-variable,.voxket-widget-root .hljs-type,.voxket-widget-root .hljs-variable.language_{color:#ff7b72}.voxket-widget-root .hljs-title,.voxket-widget-root .hljs-title.class_,.voxket-widget-root .hljs-title.class_.inherited__,.voxket-widget-root .hljs-title.function_{color:#d2a8ff}.voxket-widget-root .hljs-attr,.voxket-widget-root .hljs-attribute,.voxket-widget-root .hljs-literal,.voxket-widget-root .hljs-meta,.voxket-widget-root .hljs-number,.voxket-widget-root .hljs-operator,.voxket-widget-root .hljs-variable,.voxket-widget-root .hljs-selector-attr,.voxket-widget-root .hljs-selector-class,.voxket-widget-root .hljs-selector-id{color:#79c0ff}.voxket-widget-root .hljs-regexp,.voxket-widget-root .hljs-string,.voxket-widget-root .hljs-meta .hljs-string{color:#a5d6ff}.voxket-widget-root .hljs-built_in,.voxket-widget-root .hljs-symbol{color:#ffa657}.voxket-widget-root .hljs-comment,.voxket-widget-root .hljs-code,.voxket-widget-root .hljs-formula{color:#8b949e}.voxket-widget-root .hljs-name,.voxket-widget-root .hljs-quote,.voxket-widget-root .hljs-selector-tag,.voxket-widget-root .hljs-selector-pseudo{color:#7ee787}.voxket-widget-root .hljs-subst{color:#c9d1d9}.voxket-widget-root .hljs-section{color:#1f6feb;font-weight:700}.voxket-widget-root .hljs-bullet{color:#f2cc60}.voxket-widget-root .hljs-emphasis{color:#c9d1d9;font-style:italic}.voxket-widget-root .hljs-strong{color:#c9d1d9;font-weight:700}.voxket-widget-root .hljs-addition{color:#aff5b4;background-color:#033a16}.voxket-widget-root .hljs-deletion{color:#ffdcd7;background-color:#67060c}/*! 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 .isolate{isolation:isolate}.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 .z-\\[2147483600\\]{z-index:2147483600}.voxket-widget-root .z-\\[2147483646\\]{z-index:2147483646}.voxket-widget-root .z-\\[2147483647\\]{z-index:2147483647}.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 .my-3{margin-block:calc(var(--spacing)*3)}.voxket-widget-root .my-4{margin-block:calc(var(--spacing)*4)}.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-3{margin-top:calc(var(--spacing)*3)}.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-11{height:calc(var(--spacing)*11)}.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-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 .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-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.voxket-widget-root .rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.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-50\\/50{background-color:#f9fafb80}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-50\\/50{background-color:color-mix(in oklab,var(--color-gray-50)50%,transparent)}}.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-300{background-color:var(--color-gray-300)}.voxket-widget-root .bg-gray-400{background-color:var(--color-gray-400)}.voxket-widget-root .bg-gray-500{background-color:var(--color-gray-500)}.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\\/60{background-color:#36415399}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-700\\/60{background-color:color-mix(in oklab,var(--color-gray-700)60%,transparent)}}.voxket-widget-root .bg-gray-800{background-color:var(--color-gray-800)}.voxket-widget-root .bg-gray-800\\/30{background-color:#1e29394d}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .bg-gray-800\\/30{background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}}.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-\\[\\#6721a4\\]{--tw-gradient-from:#6721a4;--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-\\[\\#5c64f6\\]{--tw-gradient-to:#5c64f6;--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-\\[\\#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-10{padding-inline:calc(var(--spacing)*10)}.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 .pr-8{padding-right:calc(var(--spacing)*8)}.voxket-widget-root .pb-1{padding-bottom:calc(var(--spacing)*1)}.voxket-widget-root .pb-2{padding-bottom:calc(var(--spacing)*2)}.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-4{padding-left:calc(var(--spacing)*4)}.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 .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-100{color:var(--color-gray-100)}.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-orange-500{color:var(--color-orange-500)}.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-500{color:var(--color-yellow-500)}.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-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 .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\\/60:hover{background-color:#4a556599}@supports (color:color-mix(in lab,red,red)){.voxket-widget-root .hover\\:bg-gray-600\\/60:hover{background-color:color-mix(in oklab,var(--color-gray-600)60%,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-300:hover{color:var(--color-blue-300)}.voxket-widget-root .hover\\:text-blue-800:hover{color:var(--color-blue-800)}.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 .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-900{background-color:var(--color-gray-900)}.voxket-widget-root .dark\\:bg-white{background-color:var(--color-white)}.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-orange-500:oklch(70.5% .213 47.604);--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-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";
12
12
 
13
13
  const head = document.head || document.getElementsByTagName('head')[0];
14
14
  if (head.firstChild) {
@@ -18,34 +18,87 @@
18
18
  }
19
19
  })();
20
20
 
21
- "use strict";var Bm=Object.defineProperty;var zm=(e,t,n)=>t in e?Bm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ue=(e,t,n)=>zm(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"),ut=require("@livekit/components-react"),Ms=require("class-variance-authority"),Ns=require("clsx"),Hm=require("@radix-ui/react-toggle"),Um=require("@radix-ui/react-select"),Ze=require("lucide-react"),Wm=require("@emotion/styled");require("@emotion/react");const Zm=require("react-dom/client");function Is(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=Is(j),qm=Is(Hm),kt=Is(Um),Rs=j.createContext({});function Vs(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ds=typeof window<"u",Yu=Ds?j.useLayoutEffect:j.useEffect,Ti=j.createContext(null);function Fs(e,t){e.indexOf(t)===-1&&e.push(t)}function Ls(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;function zo(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let qn=()=>{},zt=()=>{};process.env.NODE_ENV!=="production"&&(qn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(zo(t,n))},zt=(e,t,n)=>{if(!e)throw new Error(zo(t,n))});const Ht={},Xu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Qu(e){return typeof e=="object"&&e!==null}const Ju=e=>/^0[^.\s]+$/u.test(e);function Os(e){let t;return()=>(t===void 0&&(t=e()),t)}const St=e=>e,Gm=(e,t)=>n=>t(e(n)),Mr=(...e)=>e.reduce(Gm),vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class $s{constructor(){this.subscriptions=[]}add(t){return Fs(this.subscriptions,t),()=>Ls(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 At=e=>e*1e3,It=e=>e/1e3;function ed(e,t){return t?e*(1e3/t):0}const Xa=new Set;function _s(e,t,n){e||Xa.has(t)||(console.warn(zo(t,n)),Xa.add(t))}const td=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Km=1e-7,Ym=12;function Xm(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=td(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Km&&++a<Ym);return o}function Nr(e,t,n,r){if(e===t&&n===r)return St;const i=s=>Xm(s,0,1,e,n);return s=>s===0||s===1?s:td(i(s),t,r)}const nd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rd=e=>t=>1-e(1-t),id=Nr(.33,1.53,.69,.99),Bs=rd(id),od=nd(Bs),sd=e=>(e*=2)<1?.5*Bs(e):.5*(2-Math.pow(2,-10*(e-1))),zs=e=>1-Math.sin(Math.acos(e)),ad=rd(zs),ld=nd(zs),Qm=Nr(.42,0,1,1),Jm=Nr(0,0,.58,1),cd=Nr(.42,0,.58,1),ep=e=>Array.isArray(e)&&typeof e[0]!="number",ud=e=>Array.isArray(e)&&typeof e[0]=="number",Qa={linear:St,easeIn:Qm,easeInOut:cd,easeOut:Jm,circIn:zs,circInOut:ld,circOut:ad,backIn:Bs,backInOut:od,backOut:id,anticipate:sd},tp=e=>typeof e=="string",Ja=e=>{if(ud(e)){zt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Nr(t,n,r,i)}else if(tp(e))return zt(Qa[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Qa[e];return e},Br=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function np(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 rp=40;function dd(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Br.reduce((S,A)=>(S[A]=np(s),S),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:m,postRender:g}=o,p=()=>{const S=Ht.useManualTiming?i.timestamp:performance.now();n=!1,Ht.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,rp),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:Br.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<Br.length;A++)o[Br[A]].cancel(S)},state:i,steps:o}}const{schedule:Be,cancel:Jt,state:rt,steps:qi}=dd(typeof requestAnimationFrame<"u"?requestAnimationFrame:St,!0);let ri;function ip(){ri=void 0}const dt={now:()=>(ri===void 0&&dt.set(rt.isProcessing||Ht.useManualTiming?rt.timestamp:performance.now()),ri),set:e=>{ri=e,queueMicrotask(ip)}},fd=e=>t=>typeof t=="string"&&t.startsWith(e),Hs=fd("--"),op=fd("var(--"),Us=e=>op(e)?sp.test(e.split("/*")[0].trim()):!1,sp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Gn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wr={...Gn,transform:e=>Bt(0,1,e)},zr={...Gn,default:1},fr=e=>Math.round(e*1e5)/1e5,Ws=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ap(e){return e==null}const lp=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zs=(e,t)=>n=>!!(typeof n=="string"&&lp.test(n)&&n.startsWith(e)||t&&!ap(n)&&Object.prototype.hasOwnProperty.call(n,t)),hd=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Ws);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},cp=e=>Bt(0,255,e),Gi={...Gn,transform:e=>Math.round(cp(e))},fn={test:Zs("rgb","red"),parse:hd("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gi.transform(e)+", "+Gi.transform(t)+", "+Gi.transform(n)+", "+fr(wr.transform(r))+")"};function up(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 Ho={test:Zs("#"),parse:up,transform:fn.transform},Ir=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yt=Ir("deg"),Rt=Ir("%"),ye=Ir("px"),dp=Ir("vh"),fp=Ir("vw"),el={...Rt,parse:e=>Rt.parse(e)/100,transform:e=>Rt.transform(e*100)},Rn={test:Zs("hsl","hue"),parse:hd("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rt.transform(fr(t))+", "+Rt.transform(fr(n))+", "+fr(wr.transform(r))+")"},Je={test:e=>fn.test(e)||Ho.test(e)||Rn.test(e),parse:e=>fn.test(e)?fn.parse(e):Rn.test(e)?Rn.parse(e):Ho.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fn.transform(e):Rn.transform(e),getAnimatableNone:e=>{const t=Je.parse(e);return t.alpha=0,Je.transform(t)}},hp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ws))==null?void 0:t.length)||0)+(((n=e.match(hp))==null?void 0:n.length)||0)>0}const md="number",pd="color",pp="var",gp="var(",tl="${}",yp=/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 kr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(yp,l=>(Je.test(l)?(r.color.push(s),i.push(pd),n.push(Je.parse(l))):l.startsWith(gp)?(r.var.push(s),i.push(pp),n.push(l)):(r.number.push(s),i.push(md),n.push(parseFloat(l))),++s,tl)).split(tl);return{values:n,split:a,indexes:r,types:i}}function gd(e){return kr(e).values}function yd(e){const{split:t,types:n}=kr(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===md?s+=fr(i[o]):a===pd?s+=Je.transform(i[o]):s+=i[o]}return s}}const xp=e=>typeof e=="number"?0:Je.test(e)?Je.getAnimatableNone(e):e;function bp(e){const t=gd(e);return yd(e)(t.map(xp))}const en={test:mp,parse:gd,createTransformer:yd,getAnimatableNone:bp};function Ki(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 vp({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=Ki(l,a,e+1/3),s=Ki(l,a,e),o=Ki(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function hi(e,t){return n=>n>0?t:e}const qe=(e,t,n)=>e+(t-e)*n,Yi=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wp=[Ho,fn,Rn],kp=e=>wp.find(t=>t.test(e));function nl(e){const t=kp(e);if(qn(!!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===Rn&&(n=vp(n)),n}const rl=(e,t)=>{const n=nl(e),r=nl(t);if(!n||!r)return hi(e,t);const i={...n};return s=>(i.red=Yi(n.red,r.red,s),i.green=Yi(n.green,r.green,s),i.blue=Yi(n.blue,r.blue,s),i.alpha=qe(n.alpha,r.alpha,s),fn.transform(i))},Uo=new Set(["none","hidden"]);function Sp(e,t){return Uo.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cp(e,t){return n=>qe(e,t,n)}function qs(e){return typeof e=="number"?Cp:typeof e=="string"?Us(e)?hi:Je.test(e)?rl:Ap:Array.isArray(e)?xd:typeof e=="object"?Je.test(e)?rl:Ep:hi}function xd(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>qs(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function Ep(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qs(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function Tp(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 Ap=(e,t)=>{const n=en.createTransformer(t),r=kr(e),i=kr(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?Uo.has(e)&&!i.values.length||Uo.has(t)&&!r.values.length?Sp(e,t):Mr(xd(Tp(r,i),i.values),n):(qn(!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"),hi(e,t))};function bd(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?qe(e,t,n):qs(e)(e,t)}const jp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Be.update(t,n),stop:()=>Jt(t),now:()=>rt.isProcessing?rt.timestamp:dt.now()}},vd=(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)})`},mi=2e4;function Gs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mi;)t+=n,r=e.next(t);return t>=mi?1/0:t}function Pp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Gs(r),mi);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:It(i)}}const Mp=5;function wd(e,t,n){const r=Math.max(t-Mp,0);return ed(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},Xi=.001;function Np({duration:e=We.duration,bounce:t=We.bounce,velocity:n=We.velocity,mass:r=We.mass}){let i,s;qn(e<=At(We.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Bt(We.minDamping,We.maxDamping,o),e=Bt(We.minDuration,We.maxDuration,It(e)),o<1?(i=c=>{const u=c*o,d=u*e,h=u-n,m=Wo(c,o),g=Math.exp(-d);return Xi-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=Wo(Math.pow(c,2),o);return(-i(c)+Xi>0?-1:1)*((h-m)*g)/p}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Xi+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Rp(i,s,a);if(e=At(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 Ip=12;function Rp(e,t,n){let r=n;for(let i=1;i<Ip;i++)r=r-e(r)/t(r);return r}function Wo(e,t){return e*Math.sqrt(1-t*t)}const Vp=["duration","bounce"],Dp=["stiffness","damping","mass"];function il(e,t){return t.some(n=>e[n]!==void 0)}function Fp(e){let t={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...e};if(!il(e,Dp)&&il(e,Vp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:We.mass,stiffness:i,damping:s}}else{const n=Np(e);t={...t,...n,mass:We.mass},t.isResolvedFromDuration=!0}return t}function pi(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}=Fp({...n,velocity:-It(n.velocity||0)}),g=h||0,p=c/(2*Math.sqrt(l*u)),b=o-s,v=It(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=Wo(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?At(g):wd(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(Gs(A),mi),C=vd(N=>A.next(T*N).value,T,30);return T+"ms "+C},toTransition:()=>{}};return A}pi.applyToOptions=e=>{const t=Pp(e,100,pi);return e.ease=t.ease,e.duration=At(t.duration),e.type="keyframes",e};function Zo({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=pi({keyframes:[h.value,g(h.value)],velocity:wd(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 Lp(e,t,n){const r=[],i=n||Ht.mix||bd,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]||St:t;a=Mr(l,a)}r.push(a)}return r}function Op(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(zt(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=Lp(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=vr(e[d],e[d+1],u);return a[d](h)};return n?u=>c(Bt(e[0],e[s-1],u)):c}function $p(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=vr(0,t,r);e.push(qe(n,1,i))}}function _p(e){const t=[0];return $p(t,e.length-1),t}function Bp(e,t){return e.map(n=>n*t)}function zp(e,t){return e.map(()=>t||cd).splice(0,e.length-1)}function Vn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=ep(r)?r.map(Ja):Ja(r),s={done:!1,value:t[0]},o=Bp(n&&n.length===t.length?n:_p(t),e),a=Op(o,t,{ease:Array.isArray(i)?i:zp(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Hp=e=>e!==null;function Ks(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(Hp),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const Up={decay:Zo,inertia:Zo,tween:Vn,keyframes:Vn,spring:pi};function kd(e){typeof e.type=="string"&&(e.type=Up[e.type])}class Ys{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 Wp=e=>e/100;class Xs extends Ys{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!==dt.now()&&this.tick(dt.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;kd(t);const{type:n=Vn,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||Vn;process.env.NODE_ENV!=="production"&&l!==Vn&&zt(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Vn&&typeof a[0]!="number"&&(this.mixKeyframes=Mr(Wp,bd(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=Gs(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=Bt(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!==Zo&&(T.value=Ks(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 It(this.calculatedDuration)}get time(){return It(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(dt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=It(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=jp,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(dt.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 Zp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const hn=e=>e*180/Math.PI,qo=e=>{const t=hn(Math.atan2(e[1],e[0]));return Go(t)},qp={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=>hn(Math.atan(e[1])),skewY:e=>hn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Go=e=>(e=e%360,e<0&&(e+=360),e),ol=qo,sl=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),al=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Gp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sl,scaleY:al,scale:e=>(sl(e)+al(e))/2,rotateX:e=>Go(hn(Math.atan2(e[6],e[5]))),rotateY:e=>Go(hn(Math.atan2(-e[2],e[0]))),rotateZ:ol,rotate:ol,skewX:e=>hn(Math.atan(e[4])),skewY:e=>hn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ko(e){return e.includes("scale")?1:0}function Yo(e,t){if(!e||e==="none")return Ko(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Gp,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qp,i=a}if(!i)return Ko(t);const s=r[t],o=i[1].split(",").map(Yp);return typeof s=="function"?s(o):o[s]}const Kp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Yo(n,t)};function Yp(e){return parseFloat(e.trim())}const Kn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yn=new Set(Kn),ll=e=>e===Gn||e===ye,Xp=new Set(["x","y","z"]),Qp=Kn.filter(e=>!Xp.has(e));function Jp(e){const t=[];return Qp.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const pn={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})=>Yo(t,"x"),y:(e,{transform:t})=>Yo(t,"y")};pn.translateX=pn.x;pn.translateY=pn.y;const gn=new Set;let Xo=!1,Qo=!1,Jo=!1;function Sd(){if(Qo){const e=Array.from(gn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Jp(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)})}Qo=!1,Xo=!1,gn.forEach(e=>e.complete(Jo)),gn.clear()}function Cd(){gn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qo=!0)})}function eg(){Jo=!0,Cd(),Sd(),Jo=!1}class Qs{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?(gn.add(this),Xo||(Xo=!0,Be.read(Cd),Be.resolveKeyframes(Sd))):(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])}Zp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),gn.delete(this)}cancel(){this.state==="scheduled"&&(gn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tg=e=>e.startsWith("--");function ng(e,t,n){tg(t)?e.style.setProperty(t,n):e.style[t]=n}const rg=Os(()=>window.ScrollTimeline!==void 0),ig={};function og(e,t){const n=Os(e);return()=>ig[t]??n()}const Ed=og(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,cl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function Td(e,t){if(e)return typeof e=="function"?Ed()?vd(e,t):"ease-out":ud(e)?cr(e):Array.isArray(e)?e.map(n=>Td(n,t)||cl.easeOut):cl[e]}function sg(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=Td(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 Ad(e){return typeof e=="function"&&"applyToOptions"in e}function ag({type:e,...t}){return Ad(e)&&Ed()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lg extends Ys{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,zt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=ag(t);this.animation=sg(n,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Ks(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ng(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 It(Number(t))}get time(){return It(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 r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&rg()?(this.animation.timeline=t,St):n(this)}}const jd={anticipate:sd,backInOut:od,circInOut:ld};function cg(e){return e in jd}function ug(e){typeof e.ease=="string"&&cg(e.ease)&&(e.ease=jd[e.ease])}const ul=10;class dg extends lg{constructor(t){ug(t),kd(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 Xs({...o,autoplay:!1}),l=At(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ul).value,a.sample(l).value,ul),a.stop()}}const dl=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(en.test(e)||e==="0")&&!e.startsWith("url("));function fg(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 hg(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=dl(i,t),a=dl(s,t);return qn(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:fg(e)||(n==="spring"||Ad(n))&&r}function es(e){e.duration=0,e.type}const mg=new Set(["opacity","clipPath","filter","transform"]),pg=Os(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gg(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 pg()&&n&&mg.has(n)&&(n!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const yg=40;class xg extends Ys{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=dt.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)||Qs;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=dt.now(),hg(t,s,o,a)||((Ht.instantAnimations||!l)&&(u==null||u(Ks(t,r,n))),t[0]=t[t.length-1],es(r),r.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>yg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!c&&gg(h)?new dg({...h,element:h.motionValue.owner.current}):new Xs(h);m.finished.then(()=>this.notifyFinished()).catch(St),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(),eg()),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 bg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vg(e){const t=bg.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const wg=4;function Pd(e,t,n=1){zt(n<=wg,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=vg(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Xu(o)?parseFloat(o):o}return Us(i)?Pd(i,t,n+1):i}function Js(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Md=new Set(["width","height","top","left","right","bottom",...Kn]),kg={test:e=>e==="auto",parse:e=>e},Nd=e=>t=>t.test(e),Id=[Gn,ye,Rt,Yt,fp,dp,kg],fl=e=>Id.find(Nd(e));function Sg(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ju(e):!0}const Cg=new Set(["brightness","contrast","saturate","opacity"]);function Eg(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ws)||[];if(!r)return e;const i=n.replace(r,"");let s=Cg.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Tg=/\b([a-z-]*)\(.*?\)/gu,ts={...en,getAnimatableNone:e=>{const t=e.match(Tg);return t?t.map(Eg).join(" "):e}},hl={...Gn,transform:Math.round},Ag={rotate:Yt,rotateX:Yt,rotateY:Yt,rotateZ:Yt,scale:zr,scaleX:zr,scaleY:zr,scaleZ:zr,skew:Yt,skewX:Yt,skewY:Yt,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:wr,originX:el,originY:el,originZ:ye},ea={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,...Ag,zIndex:hl,fillOpacity:wr,strokeOpacity:wr,numOctaves:hl},jg={...ea,color:Je,backgroundColor:Je,outlineColor:Je,fill:Je,stroke:Je,borderColor:Je,borderTopColor:Je,borderRightColor:Je,borderBottomColor:Je,borderLeftColor:Je,filter:ts,WebkitFilter:ts},Rd=e=>jg[e];function Vd(e,t){let n=Rd(e);return n!==ts&&(n=en),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Pg=new Set(["auto","none","0"]);function Mg(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!Pg.has(s)&&kr(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=Vd(n,i)}class Ng extends Qs{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(),Us(c))){const u=Pd(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Md.has(r)||t.length!==2)return;const[i,s]=t,o=fl(i),a=fl(s);if(o!==a)if(ll(o)&&ll(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else pn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Sg(t[i]))&&r.push(i);r.length&&Mg(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=pn[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]=pn[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 Ig(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 Dd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Fd(e){return Qu(e)&&"offsetHeight"in e}const ml=30,Rg=e=>!isNaN(parseFloat(e));class Vg{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=dt.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=dt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rg(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&_s(!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 $s);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=dt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ml)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ml);return ed(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 Hn(e,t){return new Vg(e,t)}const{schedule:ta}=dd(queueMicrotask,!1),Tt={x:!1,y:!1};function Ld(){return Tt.x||Tt.y}function Dg(e){return e==="x"||e==="y"?Tt[e]?null:(Tt[e]=!0,()=>{Tt[e]=!1}):Tt.x||Tt.y?null:(Tt.x=Tt.y=!0,()=>{Tt.x=Tt.y=!1})}function Od(e,t){const n=Ig(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function pl(e){return!(e.pointerType==="touch"||Ld())}function Fg(e,t,n={}){const[r,i,s]=Od(e,n),o=a=>{if(!pl(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{pl(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const $d=(e,t)=>t?e===t?!0:$d(e,t.parentElement):!1,na=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Lg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Og(e){return Lg.has(e.tagName)||e.tabIndex!==-1}const ii=new WeakSet;function gl(e){return t=>{t.key==="Enter"&&e(t)}}function Qi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const $g=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=gl(()=>{if(ii.has(n))return;Qi(n,"down");const i=gl(()=>{Qi(n,"up")}),s=()=>Qi(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 yl(e){return na(e)&&!Ld()}function _g(e,t,n={}){const[r,i,s]=Od(e,n),o=a=>{const l=a.currentTarget;if(!yl(a))return;ii.add(l);const c=t(l,a),u=(m,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),ii.has(l)&&ii.delete(l),yl(m)&&typeof c=="function"&&c(m,{success:g})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||$d(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),Fd(a)&&(a.addEventListener("focus",c=>$g(c,i)),!Og(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function _d(e){return Qu(e)&&"ownerSVGElement"in e}function Bg(e){return _d(e)&&e.tagName==="svg"}const it=e=>!!(e&&e.getVelocity),zg=[...Id,Je,en],Hg=e=>zg.find(Nd(e)),ra=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Ug extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Fd(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 Wg({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(ra);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(`
21
+ "use strict";var zg=Object.defineProperty;var Ug=(e,t,n)=>t in e?zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var at=(e,t,n)=>Ug(e,typeof t!="symbol"?t+"":t,n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const A=require("react"),h=require("react/jsx-runtime"),ce=require("livekit-client"),$t=require("@livekit/components-react"),We=require("lucide-react"),Ba=require("clsx"),Hg=require("@emotion/styled");require("@emotion/react");const Wg=require("react-dom/client"),yf=require("react-dom");function Gg(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 P=Gg(A),ja=A.createContext({});function $a(e){const t=A.useRef(null);return t.current===null&&(t.current=e()),t.current}const Va=typeof window<"u",xf=Va?A.useLayoutEffect:A.useEffect,So=A.createContext(null);function za(e,t){e.indexOf(t)===-1&&e.push(t)}function Ua(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const xn=(e,t,n)=>n>t?t:n<e?e:n;function Zs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Nr=()=>{},wn=()=>{};process.env.NODE_ENV!=="production"&&(Nr=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Zs(t,n))},wn=(e,t,n)=>{if(!e)throw new Error(Zs(t,n))});const vn={},wf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function vf(e){return typeof e=="object"&&e!==null}const Ef=e=>/^0[^.\s]+$/u.test(e);function Ha(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qt=e=>e,Kg=(e,t)=>n=>t(e(n)),hi=(...e)=>e.reduce(Kg),ni=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Wa{constructor(){this.subscriptions=[]}add(t){return za(this.subscriptions,t),()=>Ua(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 o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nn=e=>e*1e3,un=e=>e/1e3;function kf(e,t){return t?e*(1e3/t):0}const mc=new Set;function Ga(e,t,n){e||mc.has(t)||(console.warn(Zs(t,n)),mc.add(t))}const Sf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qg=1e-7,Yg=12;function Zg(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Sf(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>qg&&++a<Yg);return s}function pi(e,t,n,r){if(e===t&&n===r)return Qt;const i=o=>Zg(o,0,1,e,n);return o=>o===0||o===1?o:Sf(i(o),t,r)}const Cf=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_f=e=>t=>1-e(1-t),Tf=pi(.33,1.53,.69,.99),Ka=_f(Tf),Nf=Cf(Ka),Af=e=>(e*=2)<1?.5*Ka(e):.5*(2-Math.pow(2,-10*(e-1))),qa=e=>1-Math.sin(Math.acos(e)),Rf=_f(qa),Mf=Cf(qa),Xg=pi(.42,0,1,1),Qg=pi(0,0,.58,1),If=pi(.42,0,.58,1),Jg=e=>Array.isArray(e)&&typeof e[0]!="number",Of=e=>Array.isArray(e)&&typeof e[0]=="number",gc={linear:Qt,easeIn:Xg,easeInOut:If,easeOut:Qg,circIn:qa,circInOut:Mf,circOut:Rf,backIn:Ka,backInOut:Nf,backOut:Tf,anticipate:Af},eb=e=>typeof e=="string",bc=e=>{if(Of(e)){wn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return pi(t,n,r,i)}else if(eb(e))return wn(gc[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),gc[e];return e},Ri=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tb(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&i?n:r;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const nb=40;function Pf(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Ri.reduce((v,_)=>(v[_]=tb(o),v),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:g}=s,m=()=>{const v=vn.useManualTiming?i.timestamp:performance.now();n=!1,vn.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,nb),1)),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),p.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},x=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:Ri.reduce((v,_)=>{const S=s[_];return v[_]=(C,M=!1,N=!1)=>(n||x(),S.schedule(C,M,N)),v},{}),cancel:v=>{for(let _=0;_<Ri.length;_++)s[Ri[_]].cancel(v)},state:i,steps:s}}const{schedule:st,cancel:Mn,state:Nt,steps:es}=Pf(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qt,!0);let Xi;function rb(){Xi=void 0}const Vt={now:()=>(Xi===void 0&&Vt.set(Nt.isProcessing||vn.useManualTiming?Nt.timestamp:performance.now()),Xi),set:e=>{Xi=e,queueMicrotask(rb)}},Df=e=>t=>typeof t=="string"&&t.startsWith(e),Ya=Df("--"),ib=Df("var(--"),Za=e=>ib(e)?ob.test(e.split("/*")[0].trim()):!1,ob=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ar={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ri={...Ar,transform:e=>xn(0,1,e)},Mi={...Ar,default:1},qr=e=>Math.round(e*1e5)/1e5,Xa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sb(e){return e==null}const ab=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qa=(e,t)=>n=>!!(typeof n=="string"&&ab.test(n)&&n.startsWith(e)||t&&!sb(n)&&Object.prototype.hasOwnProperty.call(n,t)),Lf=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Xa);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},lb=e=>xn(0,255,e),ts={...Ar,transform:e=>Math.round(lb(e))},Un={test:Qa("rgb","red"),parse:Lf("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ts.transform(e)+", "+ts.transform(t)+", "+ts.transform(n)+", "+qr(ri.transform(r))+")"};function cb(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 Xs={test:Qa("#"),parse:cb,transform:Un.transform},mi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),An=mi("deg"),dn=mi("%"),Ee=mi("px"),ub=mi("vh"),db=mi("vw"),yc={...dn,parse:e=>dn.parse(e)/100,transform:e=>dn.transform(e*100)},pr={test:Qa("hsl","hue"),parse:Lf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dn.transform(qr(t))+", "+dn.transform(qr(n))+", "+qr(ri.transform(r))+")"},wt={test:e=>Un.test(e)||Xs.test(e)||pr.test(e),parse:e=>Un.test(e)?Un.parse(e):pr.test(e)?pr.parse(e):Xs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Un.transform(e):pr.transform(e),getAnimatableNone:e=>{const t=wt.parse(e);return t.alpha=0,wt.transform(t)}},fb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hb(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xa))==null?void 0:t.length)||0)+(((n=e.match(fb))==null?void 0:n.length)||0)>0}const Ff="number",Bf="color",pb="var",mb="var(",xc="${}",gb=/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 ii(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(gb,l=>(wt.test(l)?(r.color.push(o),i.push(Bf),n.push(wt.parse(l))):l.startsWith(mb)?(r.var.push(o),i.push(pb),n.push(l)):(r.number.push(o),i.push(Ff),n.push(parseFloat(l))),++o,xc)).split(xc);return{values:n,split:a,indexes:r,types:i}}function jf(e){return ii(e).values}function $f(e){const{split:t,types:n}=ii(e),r=t.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=t[s],i[s]!==void 0){const a=n[s];a===Ff?o+=qr(i[s]):a===Bf?o+=wt.transform(i[s]):o+=i[s]}return o}}const bb=e=>typeof e=="number"?0:wt.test(e)?wt.getAnimatableNone(e):e;function yb(e){const t=jf(e);return $f(e)(t.map(bb))}const In={test:hb,parse:jf,createTransformer:$f,getAnimatableNone:yb};function ns(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 xb({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=ns(l,a,e+1/3),o=ns(l,a,e),s=ns(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function lo(e,t){return n=>n>0?t:e}const ct=(e,t,n)=>e+(t-e)*n,rs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},wb=[Xs,Un,pr],vb=e=>wb.find(t=>t.test(e));function wc(e){const t=vb(e);if(Nr(!!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===pr&&(n=xb(n)),n}const vc=(e,t)=>{const n=wc(e),r=wc(t);if(!n||!r)return lo(e,t);const i={...n};return o=>(i.red=rs(n.red,r.red,o),i.green=rs(n.green,r.green,o),i.blue=rs(n.blue,r.blue,o),i.alpha=ct(n.alpha,r.alpha,o),Un.transform(i))},Qs=new Set(["none","hidden"]);function Eb(e,t){return Qs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kb(e,t){return n=>ct(e,t,n)}function Ja(e){return typeof e=="number"?kb:typeof e=="string"?Za(e)?lo:wt.test(e)?vc:_b:Array.isArray(e)?Vf:typeof e=="object"?wt.test(e)?vc:Sb:lo}function Vf(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>Ja(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Sb(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Ja(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Cb(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}const _b=(e,t)=>{const n=In.createTransformer(t),r=ii(e),i=ii(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?Qs.has(e)&&!i.values.length||Qs.has(t)&&!r.values.length?Eb(e,t):hi(Vf(Cb(r,i),i.values),n):(Nr(!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"),lo(e,t))};function zf(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ct(e,t,n):Ja(e)(e,t)}const Tb=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>st.update(t,n),stop:()=>Mn(t),now:()=>Nt.isProcessing?Nt.timestamp:Vt.now()}},Uf=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},co=2e4;function el(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<co;)t+=n,r=e.next(t);return t>=co?1/0:t}function Nb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(el(r),co);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:un(i)}}const Ab=5;function Hf(e,t,n){const r=Math.max(t-Ab,0);return kf(n-e(r),t-r)}const lt={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},is=.001;function Rb({duration:e=lt.duration,bounce:t=lt.bounce,velocity:n=lt.velocity,mass:r=lt.mass}){let i,o;Nr(e<=nn(lt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=xn(lt.minDamping,lt.maxDamping,s),e=xn(lt.minDuration,lt.maxDuration,un(e)),s<1?(i=c=>{const u=c*s,d=u*e,f=u-n,p=Js(c,s),g=Math.exp(-d);return is-f/p*g},o=c=>{const d=c*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(c,2)*e,g=Math.exp(-d),m=Js(Math.pow(c,2),s);return(-i(c)+is>0?-1:1)*((f-p)*g)/m}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-is+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=Ib(i,o,a);if(e=nn(e),isNaN(l))return{stiffness:lt.stiffness,damping:lt.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const Mb=12;function Ib(e,t,n){let r=n;for(let i=1;i<Mb;i++)r=r-e(r)/t(r);return r}function Js(e,t){return e*Math.sqrt(1-t*t)}const Ob=["duration","bounce"],Pb=["stiffness","damping","mass"];function Ec(e,t){return t.some(n=>e[n]!==void 0)}function Db(e){let t={velocity:lt.velocity,stiffness:lt.stiffness,damping:lt.damping,mass:lt.mass,isResolvedFromDuration:!1,...e};if(!Ec(e,Pb)&&Ec(e,Ob))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*xn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:lt.mass,stiffness:i,damping:o}}else{const n=Rb(e);t={...t,...n,mass:lt.mass},t.isResolvedFromDuration=!0}return t}function uo(e=lt.visualDuration,t=lt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Db({...n,velocity:-un(n.velocity||0)}),g=f||0,m=c/(2*Math.sqrt(l*u)),x=s-o,y=un(Math.sqrt(l/u)),k=Math.abs(x)<5;r||(r=k?lt.restSpeed.granular:lt.restSpeed.default),i||(i=k?lt.restDelta.granular:lt.restDelta.default);let v;if(m<1){const S=Js(y,m);v=C=>{const M=Math.exp(-m*y*C);return s-M*((g+m*y*x)/S*Math.sin(S*C)+x*Math.cos(S*C))}}else if(m===1)v=S=>s-Math.exp(-y*S)*(x+(g+y*x)*S);else{const S=y*Math.sqrt(m*m-1);v=C=>{const M=Math.exp(-m*y*C),N=Math.min(S*C,300);return s-M*((g+m*y*x)*Math.sinh(N)+S*x*Math.cosh(N))/S}}const _={calculatedDuration:p&&d||null,next:S=>{const C=v(S);if(p)a.done=S>=d;else{let M=S===0?g:0;m<1&&(M=S===0?nn(g):Hf(v,S,C));const N=Math.abs(M)<=r,I=Math.abs(s-C)<=i;a.done=N&&I}return a.value=a.done?s:C,a},toString:()=>{const S=Math.min(el(_),co),C=Uf(M=>_.next(S*M).value,S,30);return S+"ms "+C},toTransition:()=>{}};return _}uo.applyToOptions=e=>{const t=Nb(e,100,uo);return e.ease=t.ease,e.duration=nn(t.duration),e.type="keyframes",e};function ea({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=N=>a!==void 0&&N<a||l!==void 0&&N>l,g=N=>a===void 0?l:l===void 0||Math.abs(a-N)<Math.abs(l-N)?a:l;let m=n*t;const x=d+m,y=s===void 0?x:s(x);y!==x&&(m=y-d);const k=N=>-m*Math.exp(-N/r),v=N=>y+k(N),_=N=>{const I=k(N),b=v(N);f.done=Math.abs(I)<=c,f.value=f.done?y:b};let S,C;const M=N=>{p(f.value)&&(S=N,C=uo({keyframes:[f.value,g(f.value)],velocity:Hf(v,N,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:N=>{let I=!1;return!C&&S===void 0&&(I=!0,_(N),M(N)),S!==void 0&&N>=S?C.next(N-S):(!I&&_(N),f)}}}function Lb(e,t,n){const r=[],i=n||vn.mix||zf,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Qt:t;a=hi(l,a)}r.push(a)}return r}function Fb(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(wn(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Lb(t,r,i),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ni(e[d],e[d+1],u);return a[d](f)};return n?u=>c(xn(e[0],e[o-1],u)):c}function Bb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ni(0,t,r);e.push(ct(n,1,i))}}function jb(e){const t=[0];return Bb(t,e.length-1),t}function $b(e,t){return e.map(n=>n*t)}function Vb(e,t){return e.map(()=>t||If).splice(0,e.length-1)}function mr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Jg(r)?r.map(bc):bc(r),o={done:!1,value:t[0]},s=$b(n&&n.length===t.length?n:jb(t),e),a=Fb(s,t,{ease:Array.isArray(i)?i:Vb(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const zb=e=>e!==null;function tl(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(zb),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Ub={decay:ea,inertia:ea,tween:mr,keyframes:mr,spring:uo};function Wf(e){typeof e.type=="string"&&(e.type=Ub[e.type])}class nl{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 Hb=e=>e/100;class rl extends nl{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!==Vt.now()&&this.tick(Vt.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;Wf(t);const{type:n=mr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const l=n||mr;process.env.NODE_ENV!=="production"&&l!==mr&&wn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==mr&&typeof a[0]!="number"&&(this.mixKeyframes=hi(Hb,zf(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=el(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:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:x}=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 y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,_=r;if(d){const N=Math.min(this.currentTime,i)/a;let I=Math.floor(N),b=N%1;!b&&N>=1&&(b=1),b===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(b=1-b,p&&(b-=p/a)):f==="mirror"&&(_=s)),v=xn(0,1,b)*a}const S=k?{done:!1,value:u[0]}:_.next(v);o&&(S.value=o(S.value));let{done:C}=S;!k&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return M&&g!==ea&&(S.value=tl(u,this.options,x,this.speed)),m&&m(S.value),M&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return un(this.calculatedDuration)}get time(){return un(this.currentTime)}set time(t){var n;t=nn(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(Vt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=un(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=Tb,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.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(Vt.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 Wb(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Hn=e=>e*180/Math.PI,ta=e=>{const t=Hn(Math.atan2(e[1],e[0]));return na(t)},Gb={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ta,rotateZ:ta,skewX:e=>Hn(Math.atan(e[1])),skewY:e=>Hn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},na=e=>(e=e%360,e<0&&(e+=360),e),kc=ta,Sc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Cc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kb={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Sc,scaleY:Cc,scale:e=>(Sc(e)+Cc(e))/2,rotateX:e=>na(Hn(Math.atan2(e[6],e[5]))),rotateY:e=>na(Hn(Math.atan2(-e[2],e[0]))),rotateZ:kc,rotate:kc,skewX:e=>Hn(Math.atan(e[4])),skewY:e=>Hn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ra(e){return e.includes("scale")?1:0}function ia(e,t){if(!e||e==="none")return ra(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Kb,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Gb,i=a}if(!i)return ra(t);const o=r[t],s=i[1].split(",").map(Yb);return typeof o=="function"?o(s):s[o]}const qb=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ia(n,t)};function Yb(e){return parseFloat(e.trim())}const Rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mr=new Set(Rr),_c=e=>e===Ar||e===Ee,Zb=new Set(["x","y","z"]),Xb=Rr.filter(e=>!Zb.has(e));function Qb(e){const t=[];return Xb.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gn={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})=>ia(t,"x"),y:(e,{transform:t})=>ia(t,"y")};Gn.translateX=Gn.x;Gn.translateY=Gn.y;const Kn=new Set;let oa=!1,sa=!1,aa=!1;function Gf(){if(sa){const e=Array.from(Kn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Qb(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(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}sa=!1,oa=!1,Kn.forEach(e=>e.complete(aa)),Kn.clear()}function Kf(){Kn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(sa=!0)})}function Jb(){aa=!0,Kf(),Gf(),aa=!1}class il{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Kn.add(this),oa||(oa=!0,st.read(Kf),st.resolveKeyframes(Gf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}Wb(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Kn.delete(this)}cancel(){this.state==="scheduled"&&(Kn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ey=e=>e.startsWith("--");function ty(e,t,n){ey(t)?e.style.setProperty(t,n):e.style[t]=n}const ny=Ha(()=>window.ScrollTimeline!==void 0),ry={};function iy(e,t){const n=Ha(e);return()=>ry[t]??n()}const qf=iy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Tc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wr([0,.65,.55,1]),circOut:Wr([.55,0,1,.45]),backIn:Wr([.31,.01,.66,-.59]),backOut:Wr([.33,1.53,.69,.99])};function Yf(e,t){if(e)return typeof e=="function"?qf()?Uf(e,t):"ease-out":Of(e)?Wr(e):Array.isArray(e)?e.map(n=>Yf(n,t)||Tc.easeOut):Tc[e]}function oy(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Yf(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function Zf(e){return typeof e=="function"&&"applyToOptions"in e}function sy({type:e,...t}){return Zf(e)&&qf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ay extends nl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,wn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=sy(t);this.animation=oy(n,r,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=tl(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ty(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 un(Number(t))}get time(){return un(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=nn(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&&ny()?(this.animation.timeline=t,Qt):n(this)}}const Xf={anticipate:Af,backInOut:Nf,circInOut:Mf};function ly(e){return e in Xf}function cy(e){typeof e.ease=="string"&&ly(e.ease)&&(e.ease=Xf[e.ease])}const Nc=10;class uy extends ay{constructor(t){cy(t),Wf(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new rl({...s,autoplay:!1}),l=nn(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Nc).value,a.sample(l).value,Nc),a.stop()}}const Ac=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(In.test(e)||e==="0")&&!e.startsWith("url("));function dy(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 fy(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=Ac(i,t),a=Ac(o,t);return Nr(s===a,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:dy(e)||(n==="spring"||Zf(n))&&r}function la(e){e.duration=0,e.type}const hy=new Set(["opacity","clipPath","filter","transform"]),py=Ha(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function my(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=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 py()&&n&&hy.has(n)&&(n!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const gy=40;class by extends nl{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var g;super(),this.stop=()=>{var m,x;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Vt.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:c,element:u,...d},p=(u==null?void 0:u.KeyframeResolver)||il;this.keyframeResolver=new p(a,(m,x,y)=>this.onKeyframesResolved(m,x,f,!y),l,c,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Vt.now(),fy(t,o,s,a)||((vn.instantAnimations||!l)&&(u==null||u(tl(t,r,n))),t[0]=t[t.length-1],la(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>gy?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&my(f)?new uy({...f,element:f.motionValue.owner.current}):new rl(f);p.finished.then(()=>this.notifyFinished()).catch(Qt),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(),Jb()),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 yy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xy(e){const t=yy.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const wy=4;function Qf(e,t,n=1){wn(n<=wy,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=xy(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return wf(s)?parseFloat(s):s}return Za(i)?Qf(i,t,n+1):i}function ol(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Jf=new Set(["width","height","top","left","right","bottom",...Rr]),vy={test:e=>e==="auto",parse:e=>e},eh=e=>t=>t.test(e),th=[Ar,Ee,dn,An,db,ub,vy],Rc=e=>th.find(eh(e));function Ey(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ef(e):!0}const ky=new Set(["brightness","contrast","saturate","opacity"]);function Sy(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Xa)||[];if(!r)return e;const i=n.replace(r,"");let o=ky.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Cy=/\b([a-z-]*)\(.*?\)/gu,ca={...In,getAnimatableNone:e=>{const t=e.match(Cy);return t?t.map(Sy).join(" "):e}},Mc={...Ar,transform:Math.round},_y={rotate:An,rotateX:An,rotateY:An,rotateZ:An,scale:Mi,scaleX:Mi,scaleY:Mi,scaleZ:Mi,skew:An,skewX:An,skewY:An,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ri,originX:yc,originY:yc,originZ:Ee},sl={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,..._y,zIndex:Mc,fillOpacity:ri,strokeOpacity:ri,numOctaves:Mc},Ty={...sl,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:ca,WebkitFilter:ca},nh=e=>Ty[e];function rh(e,t){let n=nh(e);return n!==ca&&(n=In),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ny=new Set(["auto","none","0"]);function Ay(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Ny.has(o)&&ii(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=rh(n,i)}class Ry extends il{constructor(t,n,r,i,o){super(t,n,r,i,o,!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(),Za(c))){const u=Qf(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Jf.has(r)||t.length!==2)return;const[i,o]=t,s=Rc(i),a=Rc(o);if(s!==a)if(_c(s)&&_c(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else Gn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Ey(t[i]))&&r.push(i);r.length&&Ay(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=Gn[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 o=r.length-1,s=r[o];r[o]=Gn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function My(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 ih=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function oh(e){return vf(e)&&"offsetHeight"in e}const Ic=30,Iy=e=>!isNaN(parseFloat(e));class Oy{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Vt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Iy(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ga(!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 Wa);const r=this.events[t].add(n);return t==="change"?()=>{r(),st.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=Vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ic)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ic);return kf(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 kr(e,t){return new Oy(e,t)}const{schedule:al}=Pf(queueMicrotask,!1),tn={x:!1,y:!1};function sh(){return tn.x||tn.y}function Py(e){return e==="x"||e==="y"?tn[e]?null:(tn[e]=!0,()=>{tn[e]=!1}):tn.x||tn.y?null:(tn.x=tn.y=!0,()=>{tn.x=tn.y=!1})}function ah(e,t){const n=My(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Oc(e){return!(e.pointerType==="touch"||sh())}function Dy(e,t,n={}){const[r,i,o]=ah(e,n),s=a=>{if(!Oc(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Oc(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const lh=(e,t)=>t?e===t?!0:lh(e,t.parentElement):!1,ll=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ly=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Fy(e){return Ly.has(e.tagName)||e.tabIndex!==-1}const Qi=new WeakSet;function Pc(e){return t=>{t.key==="Enter"&&e(t)}}function os(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const By=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Pc(()=>{if(Qi.has(n))return;os(n,"down");const i=Pc(()=>{os(n,"up")}),o=()=>os(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Dc(e){return ll(e)&&!sh()}function jy(e,t,n={}){const[r,i,o]=ah(e,n),s=a=>{const l=a.currentTarget;if(!Dc(a))return;Qi.add(l);const c=t(l,a),u=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Qi.has(l)&&Qi.delete(l),Dc(p)&&typeof c=="function"&&c(p,{success:g})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||lh(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),oh(a)&&(a.addEventListener("focus",c=>By(c,i)),!Fy(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ch(e){return vf(e)&&"ownerSVGElement"in e}function $y(e){return ch(e)&&e.tagName==="svg"}const Mt=e=>!!(e&&e.getVelocity),Vy=[...th,wt,In],zy=e=>Vy.find(eh(e)),cl=A.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class Uy extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=oh(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Hy({children:e,isPresent:t,anchorX:n,root:r}){const i=A.useId(),o=A.useRef(null),s=A.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=A.useContext(cl);return A.useInsertionEffect(()=>{const{width:l,height:c,top:u,left:d,right:f}=s.current;if(t||!o.current||!l||!c)return;const p=n==="left"?`left: ${d}`:`right: ${f}`;o.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const m=r??document.head;return m.appendChild(g),g.sheet&&g.sheet.insertRule(`
22
22
  [data-motion-pop-id="${i}"] {
23
23
  position: absolute !important;
24
24
  width: ${l}px !important;
25
25
  height: ${c}px !important;
26
- ${m}px !important;
26
+ ${p}px !important;
27
27
  top: ${u}px !important;
28
28
  }
29
- `),()=>{p.contains(g)&&p.removeChild(g)}},[t]),f.jsx(Ug,{isPresent:t,childRef:s,sizeRef:o,children:x.cloneElement(e,{ref:s})})}const Zg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a,root:l})=>{const c=Vs(qg),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(Wg,{isPresent:n,anchorX:a,root:l,children:e})),f.jsx(Ti.Provider,{value:h,children:e})};function qg(){return new Map}function Bd(e=!0){const t=j.useContext(Ti);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 Hr=e=>e.key||"";function xl(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const Qt=({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]=Bd(o),d=j.useMemo(()=>xl(e),[e]),h=o&&!c?[]:d.map(Hr),m=j.useRef(!0),g=j.useRef(d),p=Vs(()=>new Map),[b,v]=j.useState(d),[k,S]=j.useState(d);Yu(()=>{m.current=!1,g.current=d;for(let C=0;C<k.length;C++){const N=Hr(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=Hr(P);h.includes(L)||(C.splice(N,0,P),A.push(P))}return s==="wait"&&A.length&&(C=A),S(xl(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(Rs);return f.jsx(f.Fragment,{children:k.map(C=>{const N=Hr(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(Zg,{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)})})},zd=j.createContext({strict:!1}),bl={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"]},Un={};for(const e in bl)Un[e]={isEnabled:t=>bl[e].some(n=>!!t[n])};function Gg(e){for(const t in e)Un[t]={...Un[t],...e[t]}}const Kg=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 gi(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kg.has(e)}let Hd=e=>!gi(e);function Yg(e){typeof e=="function"&&(Hd=t=>t.startsWith("on")?!gi(t):e(t))}try{Yg(require("@emotion/is-prop-valid").default)}catch{}function Xg(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Hd(i)||n===!0&&gi(i)||!t&&!gi(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Ai=j.createContext({});function ji(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sr(e){return typeof e=="string"||Array.isArray(e)}const ia=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oa=["initial",...ia];function Pi(e){return ji(e.animate)||oa.some(t=>Sr(e[t]))}function Ud(e){return!!(Pi(e)||e.variants)}function Qg(e,t){if(Pi(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Sr(n)?n:void 0,animate:Sr(r)?r:void 0}}return e.inherit!==!1?t:{}}function Jg(e){const{initial:t,animate:n}=Qg(e,j.useContext(Ai));return j.useMemo(()=>({initial:t,animate:n}),[vl(t),vl(n)])}function vl(e){return Array.isArray(e)?e.join(" "):e}const Cr={};function e0(e){for(const t in e)Cr[t]=e[t],Hs(t)&&(Cr[t].isCSSVariable=!0)}function Wd(e,{layout:t,layoutId:n}){return Yn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cr[e]||e==="opacity")}const t0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n0=Kn.length;function r0(e,t,n){let r="",i=!0;for(let s=0;s<n0;s++){const o=Kn[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=Dd(a,ea[o]);if(!l){i=!1;const u=t0[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function sa(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(Yn.has(l)){o=!0;continue}else if(Hs(l)){i[l]=c;continue}else{const u=Dd(c,ea[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=r0(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 aa=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zd(e,t,n){for(const r in t)!it(t[r])&&!Wd(r,n)&&(e[r]=t[r])}function i0({transformTemplate:e},t){return j.useMemo(()=>{const n=aa();return sa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function o0(e,t){const n=e.style||{},r={};return Zd(r,n,e),Object.assign(r,i0(e,t)),r}function s0(e,t){const n={},r=o0(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 a0={offset:"stroke-dashoffset",array:"stroke-dasharray"},l0={offset:"strokeDashoffset",array:"strokeDasharray"};function c0(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?a0:l0;e[s.offset]=ye.transform(-r);const o=ye.transform(t),a=ye.transform(n);e[s.array]=`${o} ${a}`}function qd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,c,u){if(sa(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&&c0(d,i,s,o,!1)}const Gd=()=>({...aa(),attrs:{}}),Kd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function u0(e,t,n,r){const i=j.useMemo(()=>{const s=Gd();return qd(s,t,Kd(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zd(s,e.style,e),i.style={...s,...i.style}}return i}const d0=["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 la(e){return typeof e!="string"||e.includes("-")?!1:!!(d0.indexOf(e)>-1||/[A-Z]/u.test(e))}function f0(e,t,n,{latestValues:r},i,s=!1){const a=(la(e)?u0:s0)(t,r,i,e),l=Xg(t,typeof e=="string",s),c=e!==j.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=j.useMemo(()=>it(u)?u.get():u,[u]);return j.createElement(e,{...c,children:d})}function wl(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ca(e,t,n,r){if(typeof t=="function"){const[i,s]=wl(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]=wl(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function oi(e){return it(e)?e.get():e}function h0({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:m0(n,r,i,e),renderState:t()}}function m0(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=oi(s[h]);let{initial:o,animate:a}=e;const l=Pi(e),c=Ud(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"&&!ji(d)){const h=Array.isArray(d)?d:[d];for(let m=0;m<h.length;m++){const g=ca(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 Yd=e=>(t,n)=>{const r=j.useContext(Ai),i=j.useContext(Ti),s=()=>h0(e,t,r,i);return n?s():Vs(s)};function ua(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(it(r[o])||t.style&&it(t.style[o])||Wd(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const p0=Yd({scrapeMotionValuesFromProps:ua,createRenderState:aa});function Xd(e,t,n){const r=ua(e,t,n);for(const i in e)if(it(e[i])||it(t[i])){const s=Kn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const g0=Yd({scrapeMotionValuesFromProps:Xd,createRenderState:Gd}),y0=Symbol.for("motionComponentSymbol");function Dn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function x0(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):Dn(n)&&(n.current=r))},[t])}const da=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),b0="framerAppearId",Qd="data-"+da(b0),Jd=j.createContext({});function v0(e,t,n,r,i){var p,b;const{visualElement:s}=j.useContext(Ai),o=j.useContext(zd),a=j.useContext(Ti),l=j.useContext(ra).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(Jd);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&w0(c.current,n,i,d);const h=j.useRef(!1);j.useInsertionEffect(()=>{u&&h.current&&u.update(n,a)});const m=n[Qd],g=j.useRef(!!m&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,m))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,m)));return Yu(()=>{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 w0(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:ef(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Dn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function ef(e){if(e)return e.options.allowProjection!==!1?e.projection:ef(e.parent)}function Ji(e,{forwardMotionProps:t=!1}={},n,r){n&&Gg(n);const i=la(e)?g0:p0;function s(a,l){let c;const u={...j.useContext(ra),...a,layoutId:k0(a)},{isStatic:d}=u,h=Jg(a),m=i(a,d);if(!d&&Ds){S0(u,n);const g=C0(u);c=g.MeasureLayout,h.visualElement=v0(e,m,u,r,g.ProjectionNode)}return f.jsxs(Ai.Provider,{value:h,children:[c&&h.visualElement?f.jsx(c,{visualElement:h.visualElement,...u}):null,f0(e,a,x0(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[y0]=e,o}function k0({layoutId:e}){const t=j.useContext(Rs).id;return t&&e!==void 0?t+"-"+e:e}function S0(e,t){const n=j.useContext(zd).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?qn(!1,r,"lazy-strict-mode"):zt(!1,r,"lazy-strict-mode")}}function C0(e){const{drag:t,layout:n}=Un;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 E0(e,t){if(typeof Proxy>"u")return Ji;const n=new Map,r=(s,o)=>Ji(s,o,e,t),i=(s,o)=>(process.env.NODE_ENV!=="production"&&_s(!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,Ji(o,void 0,e,t)),n.get(o))})}function tf({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function T0({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function A0(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 eo(e){return e===void 0||e===1}function ns({scale:e,scaleX:t,scaleY:n}){return!eo(e)||!eo(t)||!eo(n)}function dn(e){return ns(e)||nf(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function nf(e){return kl(e.x)||kl(e.y)}function kl(e){return e&&e!=="0%"}function yi(e,t,n){const r=e-n,i=t*r;return n+i}function Sl(e,t,n,r,i){return i!==void 0&&(e=yi(e,i,r)),yi(e,n,r)+t}function rs(e,t=0,n=1,r,i){e.min=Sl(e.min,t,n,r,i),e.max=Sl(e.max,t,n,r,i)}function rf(e,{x:t,y:n}){rs(e.x,t.translate,t.scale,t.originPoint),rs(e.y,n.translate,n.scale,n.originPoint)}const Cl=.999999999999,El=1.0000000000001;function j0(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&&Ln(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,rf(e,o)),r&&dn(s.latestValues)&&Ln(e,s.latestValues))}t.x<El&&t.x>Cl&&(t.x=1),t.y<El&&t.y>Cl&&(t.y=1)}function Fn(e,t){e.min=e.min+t,e.max=e.max+t}function Tl(e,t,n,r,i=.5){const s=qe(e.min,e.max,i);rs(e,t,n,s,r)}function Ln(e,t){Tl(e.x,t.x,t.scaleX,t.scale,t.originX),Tl(e.y,t.y,t.scaleY,t.scale,t.originY)}function of(e,t){return tf(A0(e.getBoundingClientRect(),t))}function P0(e,t,n){const r=of(e,n),{scroll:i}=t;return i&&(Fn(r.x,i.offset.x),Fn(r.y,i.offset.y)),r}const Al=()=>({translate:0,scale:1,origin:0,originPoint:0}),On=()=>({x:Al(),y:Al()}),jl=()=>({min:0,max:0}),Ye=()=>({x:jl(),y:jl()}),is={current:null},sf={current:!1};function M0(){if(sf.current=!0,!!Ds)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>is.current=e.matches;e.addEventListener("change",t),t()}else is.current=!1}const N0=new WeakMap;function I0(e,t,n){for(const r in t){const i=t[r],s=n[r];if(it(i))e.addValue(r,i);else if(it(s))e.addValue(r,Hn(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,Hn(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class R0{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=Qs,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=dt.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=Pi(n),this.isVariantNode=Ud(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&&it(m)&&m.set(l[h])}}mount(t){var n;this.current=t,N0.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)),sf.current||M0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:is.current,process.env.NODE_ENV!=="production"&&_s(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(),Jt(this.notifyUpdate),Jt(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=Yn.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 Un){const n=Un[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<Pl.length;r++){const i=Pl[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=I0(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=Hn(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"&&(Xu(r)||Ju(r))?r=parseFloat(r):!Hg(r)&&en.test(n)&&(r=Vd(t,n)),this.setBaseTarget(t,it(r)?r.get():r)),it(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=ca(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&&!it(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 $s),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ta.render(this.render)}}class af extends R0{constructor(){super(...arguments),this.KeyframeResolver=Ng}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;it(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function lf(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 V0(e){return window.getComputedStyle(e)}class D0 extends af{constructor(){super(...arguments),this.type="html",this.renderInstance=lf}readValueFromInstance(t,n){var r;if(Yn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ko(n):Kp(t,n);{const i=V0(t),s=(Hs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return of(t,n)}build(t,n,r){sa(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ua(t,n,r)}}const cf=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 F0(e,t,n,r){lf(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cf.has(i)?i:da(i),t.attrs[i])}class L0 extends af{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ye}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Yn.has(n)){const r=Rd(n);return r&&r.default||0}return n=cf.has(n)?n:da(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xd(t,n,r)}build(t,n,r){qd(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){F0(t,n,r,i)}mount(t){this.isSVGTag=Kd(t.tagName),super.mount(t)}}const O0=(e,t)=>la(e)?new L0(t):new D0(t,{allowProjection:e!==j.Fragment});function $n(e,t,n){const r=e.getProps();return ca(r,t,n!==void 0?n:r.custom,e)}const os=e=>Array.isArray(e);function $0(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hn(n))}function _0(e){return os(e)?e[e.length-1]||0:e}function B0(e,t){const n=$n(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=_0(s[o]);$0(e,o,a)}}function z0(e){return!!(it(e)&&e.add)}function ss(e,t){const n=e.getValue("willChange");if(z0(n))return n.add(t);if(!n&&Ht.WillChange){const r=new Ht.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uf(e){return e.props[Qd]}const H0=e=>e!==null;function U0(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(H0),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const W0={type:"spring",stiffness:500,damping:25,restSpeed:10},Z0=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),q0={type:"keyframes",duration:.8},G0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},K0=(e,{keyframes:t})=>t.length>2?q0:Yn.has(e)?e.startsWith("scale")?Z0(t[1]):W0:G0;function Y0({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 fa=(e,t,n,r={},i,s)=>o=>{const a=Js(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-At(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};Y0(a)||Object.assign(u,K0(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 d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(es(u),u.delay===0&&(d=!0)),(Ht.instantAnimations||Ht.skipAnimations)&&(d=!0,es(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const h=U0(u.keyframes,a);if(h!==void 0){Be.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Xs(u):new xg(u)};function X0({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function df(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&&X0(c,u))continue;const m={delay:n,...Js(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=uf(e);if(v){const k=window.MotionHandoffAnimation(v,u,Be);k!==null&&(m.startTime=k,p=!0)}}ss(e,u),d.start(fa(u,d,h,e.shouldReduceMotion&&Md.has(u)?{type:!1}:m,e,p));const b=d.animation;b&&l.push(b)}return o&&Promise.all(l).then(()=>{Be.update(()=>{o&&B0(e,o)})}),l}function ff(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 as(e,t,n={}){var l;const r=$n(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(df(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=i;return Q0(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 Q0(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(as(l,t,{...o,delay:n+(typeof r=="function"?0:r)+ff(e.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function J0(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>as(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=as(e,t,n);else{const i=typeof t=="function"?$n(e,t,n.custom):t;r=Promise.all(df(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function hf(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 ey=oa.length;function mf(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mf(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ey;n++){const r=oa[n],i=e.props[r];(Sr(i)||i===!1)&&(t[r]=i)}return t}const ty=[...ia].reverse(),ny=ia.length;function ry(e){return t=>Promise.all(t.map(({animation:n,options:r})=>J0(e,n,r)))}function iy(e){let t=ry(e),n=Ml(),r=!0;const i=l=>(c,u)=>{var h;const d=$n(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=mf(e.parent)||{},d=[],h=new Set;let m={},g=1/0;for(let b=0;b<ny;b++){const v=ty[b],k=n[v],S=c[v]!==void 0?c[v]:u[v],A=Sr(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||ji(S)||typeof S=="boolean")continue;const N=oy(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;os(F)&&os(W)?w=!hf(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 K=C&&N;P&&(!K||L)&&d.push(...y.map(ie=>{const F={type:v};if(typeof ie=="string"&&r&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,w=$n(W,ie);if(W.enteringChildren&&w){const{delayChildren:z}=w.transition||{};F.delay=ff(W.enteringChildren,e,z)}}return{animation:ie,options:F}}))}if(h.size){const b={};if(typeof c.initial!="boolean"){const v=$n(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=Ml(),r=!0}}}function oy(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hf(t,e):!1}function ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ml(){return{animate:ln(!0),whileInView:ln(),whileHover:ln(),whileTap:ln(),whileDrag:ln(),whileFocus:ln(),exit:ln()}}class rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sy extends rn{constructor(t){super(t),t.animationState||(t.animationState=iy(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ji(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 ay=0;class ly extends rn{constructor(){super(...arguments),this.id=ay++}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 cy={animation:{Feature:sy},exit:{Feature:ly}};function Er(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Rr(e){return{point:{x:e.pageX,y:e.pageY}}}const uy=e=>t=>na(t)&&e(t,Rr(t));function hr(e,t,n,r){return Er(e,t,uy(n),r)}const pf=1e-4,dy=1-pf,fy=1+pf,gf=.01,hy=0-gf,my=0+gf;function lt(e){return e.max-e.min}function py(e,t,n){return Math.abs(e-t)<=n}function Nl(e,t,n,r=.5){e.origin=r,e.originPoint=qe(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=qe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dy&&e.scale<=fy||isNaN(e.scale))&&(e.scale=1),(e.translate>=hy&&e.translate<=my||isNaN(e.translate))&&(e.translate=0)}function mr(e,t,n,r){Nl(e.x,t.x,n.x,r?r.originX:void 0),Nl(e.y,t.y,n.y,r?r.originY:void 0)}function Il(e,t,n){e.min=n.min+t.min,e.max=e.min+lt(t)}function gy(e,t,n){Il(e.x,t.x,n.x),Il(e.y,t.y,n.y)}function Rl(e,t,n){e.min=t.min-n.min,e.max=e.min+lt(t)}function pr(e,t,n){Rl(e.x,t.x,n.x),Rl(e.y,t.y,n.y)}function bt(e){return[e("x"),e("y")]}const yf=({current:e})=>e?e.ownerDocument.defaultView:null,Vl=(e,t)=>Math.abs(e-t);function yy(e,t){const n=Vl(e.x,t.x),r=Vl(e.y,t.y);return Math.sqrt(n**2+r**2)}class xf{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=no(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=yy(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:p}=h,{timestamp:b}=rt;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=to(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=no(h.type==="pointercancel"?this.lastMoveEventInfo:to(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,v),p&&p(h,v)},!na(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const a=Rr(t),l=to(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=rt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,no(l,this.history)),this.removeListeners=Mr(hr(this.contextWindow,"pointermove",this.handlePointerMove),hr(this.contextWindow,"pointerup",this.handlePointerUp),hr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jt(this.updatePoint)}}function to(e,t){return t?{point:t(e.point)}:e}function Dl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function no({point:e},t){return{point:e,delta:Dl(e,bf(t)),offset:Dl(e,xy(t)),velocity:by(t,.1)}}function xy(e){return e[0]}function bf(e){return e[e.length-1]}function by(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=bf(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>At(t)));)n--;if(!r)return{x:0,y:0};const s=It(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 vy(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 Fl(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 wy(e,{top:t,left:n,bottom:r,right:i}){return{x:Fl(e.x,n,i),y:Fl(e.y,t,r)}}function Ll(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 ky(e,t){return{x:Ll(e.x,t.x),y:Ll(e.y,t.y)}}function Sy(e,t){let n=.5;const r=lt(e),i=lt(t);return i>r?n=vr(t.min,t.max-r,e.min):r>i&&(n=vr(e.min,e.max-i,t.min)),Bt(0,1,n)}function Cy(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 ls=.35;function Ey(e=ls){return e===!1?e=0:e===!0&&(e=ls),{x:Ol(e,"left","right"),y:Ol(e,"top","bottom")}}function Ol(e,t,n){return{min:$l(e,t),max:$l(e,n)}}function $l(e,t){return typeof e=="number"?e:e[t]||0}const Ty=new WeakMap;class Ay{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(Rr(d).point)},o=(d,h)=>{const{drag:m,dragPropagation:g,onDragStart:p}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Dg(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),bt(v=>{let k=this.getAxisMotionValue(v).get()||0;if(Rt.test(k)){const{projection:S}=this.visualElement;if(S&&S.layout){const A=S.layout.layoutBox[v];A&&(k=lt(A)*(parseFloat(k)/100))}}this.originPoint[v]=k}),p&&Be.postRender(()=>p(d,h)),ss(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=jy(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=()=>bt(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 xf(t,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:yf(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||!Ur(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=vy(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&&Dn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wy(r.layoutBox,t):this.constraints=!1,this.elastic=Ey(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Cy(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dn(t))return!1;const r=t.current;zt(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=P0(r,i.root,this.visualElement.getTransformPagePoint());let o=ky(i.layout.layoutBox,s);if(n){const a=n(T0(o));this.hasMutatedConstraints=!!a,a&&(o=tf(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=bt(u=>{if(!Ur(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 ss(this.visualElement,t),r.start(fa(t,r,0,n,this.visualElement,!1))}stopAnimation(){bt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bt(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){bt(n=>{const{drag:r}=this.getProps();if(!Ur(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(!Dn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};bt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Sy({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(),bt(o=>{if(!Ur(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;Ty.set(this.visualElement,this);const t=this.visualElement.current,n=hr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dn(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=Er(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(bt(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=ls,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Ur(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jy(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Py extends rn{constructor(t){super(t),this.removeGroupControls=St,this.removeListeners=St,this.controls=new Ay(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||St}unmount(){this.removeGroupControls(),this.removeListeners()}}const _l=e=>(t,n)=>{e&&Be.postRender(()=>e(t,n))};class My extends rn{constructor(){super(...arguments),this.removePointerDownListener=St}onPointerDown(t){this.session=new xf(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yf(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:_l(t),onStart:_l(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Be.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=hr(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 si={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bl(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ye.test(e))e=parseFloat(e);else return e;const n=Bl(e,t.target.x),r=Bl(e,t.target.y);return`${n}% ${r}%`}},Ny={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=en.parse(e);if(i.length>5)return r;const s=en.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 ro=!1;class Iy extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;e0(Ry),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),ro&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),si.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,ro=!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(),ta.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ro=!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 vf(e){const[t,n]=Bd(),r=j.useContext(Rs);return f.jsx(Iy,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(Jd),isPresent:t,safeToRemove:n})}const Ry={borderRadius:{...nr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nr,borderTopRightRadius:nr,borderBottomLeftRadius:nr,borderBottomRightRadius:nr,boxShadow:Ny};function Vy(e,t,n){const r=it(e)?e:Hn(e);return r.start(fa("",r,t,n)),r.animation}const Dy=(e,t)=>e.depth-t.depth;class Fy{constructor(){this.children=[],this.isDirty=!1}add(t){Fs(this.children,t),this.isDirty=!0}remove(t){Ls(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dy),this.isDirty=!1,this.children.forEach(t)}}function Ly(e,t){const n=dt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Jt(r),e(s-t))};return Be.setup(r,!0),()=>Jt(r)}const wf=["TopLeft","TopRight","BottomLeft","BottomRight"],Oy=wf.length,zl=e=>typeof e=="string"?parseFloat(e):e,Hl=e=>typeof e=="number"||ye.test(e);function $y(e,t,n,r,i,s){i?(e.opacity=qe(0,n.opacity??1,_y(r)),e.opacityExit=qe(t.opacity??1,0,By(r))):s&&(e.opacity=qe(t.opacity??1,n.opacity??1,r));for(let o=0;o<Oy;o++){const a=`border${wf[o]}Radius`;let l=Ul(t,a),c=Ul(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Hl(l)===Hl(c)?(e[a]=Math.max(qe(zl(l),zl(c),r),0),(Rt.test(c)||Rt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=qe(t.rotate||0,n.rotate||0,r))}function Ul(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _y=kf(0,.5,ad),By=kf(.5,.95,St);function kf(e,t,n){return r=>r<e?0:r>t?1:n(vr(e,t,r))}function Wl(e,t){e.min=t.min,e.max=t.max}function xt(e,t){Wl(e.x,t.x),Wl(e.y,t.y)}function Zl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ql(e,t,n,r,i){return e-=t,e=yi(e,1/n,r),i!==void 0&&(e=yi(e,1/i,r)),e}function zy(e,t=0,n=1,r=.5,i,s=e,o=e){if(Rt.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=ql(e.min,t,n,a,i),e.max=ql(e.max,t,n,a,i)}function Gl(e,t,[n,r,i],s,o){zy(e,t[n],t[r],t[i],t.scale,s,o)}const Hy=["x","scaleX","originX"],Uy=["y","scaleY","originY"];function Kl(e,t,n,r){Gl(e.x,t,Hy,n?n.x:void 0,r?r.x:void 0),Gl(e.y,t,Uy,n?n.y:void 0,r?r.y:void 0)}function Yl(e){return e.translate===0&&e.scale===1}function Sf(e){return Yl(e.x)&&Yl(e.y)}function Xl(e,t){return e.min===t.min&&e.max===t.max}function Wy(e,t){return Xl(e.x,t.x)&&Xl(e.y,t.y)}function Ql(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Cf(e,t){return Ql(e.x,t.x)&&Ql(e.y,t.y)}function Jl(e){return lt(e.x)/lt(e.y)}function ec(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Zy{constructor(){this.members=[]}add(t){Fs(this.members,t),t.scheduleRender()}remove(t){if(Ls(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 qy(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 io=["","X","Y","Z"],Gy=1e3;let Ky=0;function oo(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ef(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uf(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&&Ef(r)}function Tf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Ky++,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(Qy),this.nodes.forEach(nx),this.nodes.forEach(rx),this.nodes.forEach(Jy)},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 Fy)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new $s),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=_d(o)&&!Bg(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=Ly(h,250),si.hasAnimatedSinceResize&&(si.hasAnimatedSinceResize=!1,this.nodes.forEach(rc)))})}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()||lx,{onLayoutAnimationStart:p,onLayoutAnimationComplete:b}=c.getProps(),v=!this.targetLayout||!Cf(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={...Js(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||rc(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(),Jt(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(ix),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&&Ef(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(tc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(nc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tx),this.nodes.forEach(Yy),this.nodes.forEach(Xy)):this.nodes.forEach(nc),this.clearAllSnapshots();const a=dt.now();rt.delta=Bt(0,1e3/60,a-rt.timestamp),rt.timestamp=a,rt.isProcessing=!0,qi.update.process(rt),qi.preRender.process(rt),qi.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ta.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ex),this.sharedNodes.forEach(ox)}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&&!lt(this.snapshot.measuredBox.x)&&!lt(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&&!Sf(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||dn(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)),cx(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(ux))){const{scroll:u}=this.root;u&&(Fn(a.x,u.offset.x),Fn(a.y,u.offset.y))}return a}removeElementScroll(o){var l;const a=Ye();if(xt(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&&xt(a,o),Fn(a.x,d.offset.x),Fn(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Ye();xt(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&&Ln(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),dn(u.latestValues)&&Ln(l,u.latestValues)}return dn(this.latestValues)&&Ln(l,this.latestValues),l}removeTransform(o){const a=Ye();xt(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!dn(c.latestValues))continue;ns(c.latestValues)&&c.updateSnapshot();const u=Ye(),d=c.measurePageBox();xt(u,d),Kl(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return dn(this.latestValues)&&Kl(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!==rt.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=rt.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(),pr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),xt(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(),gy(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xt(this.target,this.layout.layoutBox),rf(this.target,this.targetDelta)):xt(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(),pr(this.relativeTargetOrigin,this.target,m.target),xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ns(this.parent.latestValues)||nf(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===rt.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;xt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;j0(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():(Zl(this.prevProjectionDelta.x,this.projectionDelta.x),Zl(this.prevProjectionDelta.y,this.projectionDelta.y)),mr(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!ec(this.projectionDelta.x,this.prevProjectionDelta.x)||!ec(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=On(),this.projectionDelta=On(),this.projectionDeltaWithTransform=On()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=On();(!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(ax));this.animationProgress=0;let S;this.mixTargetDelta=A=>{const T=A/1e3;ic(d.x,o.x,T),ic(d.y,o.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sx(this.relativeTarget,this.relativeTargetOrigin,h,T),S&&Wy(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Ye()),xt(S,this.relativeTarget)),p&&(this.animationValues=u,$y(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&&(Jt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{si.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hn(0)),this.currentAnimation=Vy(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(Gy),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&&Af(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ye();const d=lt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=lt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}xt(a,l),Ln(a,u),mr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Zy),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&&oo("z",o,c,this.animationValues);for(let u=0;u<io.length;u++)oo(`rotate${io[u]}`,o,c,this.animationValues),oo(`skew${io[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=oi(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=oi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!dn(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=qy(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 Cr){if(u[g]===void 0)continue;const{correct:p,applyTo:b,isCSSVariable:v}=Cr[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?oi(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(tc),this.root.sharedNodes.clear()}}}function Yy(e){e.updateLayout()}function Xy(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"?bt(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=lt(h);h.min=r[d].min,h.max=h.min+m}):Af(s,t.layoutBox,r)&&bt(d=>{const h=o?t.measuredBox[d]:t.layoutBox[d],m=lt(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=On();mr(a,r,t.layoutBox);const l=On();o?mr(l,e.applyTransform(i,!0),t.measuredBox):mr(l,r,t.layoutBox);const c=!Sf(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();pr(g,t.layoutBox,h.layoutBox);const p=Ye();pr(p,r,m.layoutBox),Cf(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 Qy(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 Jy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ex(e){e.clearSnapshot()}function tc(e){e.clearMeasurements()}function nc(e){e.isLayoutDirty=!1}function tx(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function rc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nx(e){e.resolveTargetDelta()}function rx(e){e.calcProjection()}function ix(e){e.resetSkewAndRotation()}function ox(e){e.removeLeadSnapshot()}function ic(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 oc(e,t,n,r){e.min=qe(t.min,n.min,r),e.max=qe(t.max,n.max,r)}function sx(e,t,n,r){oc(e.x,t.x,n.x,r),oc(e.y,t.y,n.y,r)}function ax(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lx={duration:.45,ease:[.4,0,.1,1]},sc=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ac=sc("applewebkit/")&&!sc("chrome/")?Math.round:St;function lc(e){e.min=ac(e.min),e.max=ac(e.max)}function cx(e){lc(e.x),lc(e.y)}function Af(e,t,n){return e==="position"||e==="preserve-aspect"&&!py(Jl(t),Jl(n),.2)}function ux(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const dx=Tf({attachResizeListener:(e,t)=>Er(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),so={current:void 0},jf=Tf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!so.current){const e=new dx({});e.mount(window),e.setOptions({layoutScroll:!0}),so.current=e}return so.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fx={pan:{Feature:My},drag:{Feature:Py,ProjectionNode:jf,MeasureLayout:vf}};function cc(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,Rr(t)))}class hx extends rn{mount(){const{current:t}=this.node;t&&(this.unmount=Fg(t,(n,r)=>(cc(this.node,r,"Start"),i=>cc(this.node,i,"End"))))}unmount(){}}class mx extends rn{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=Mr(Er(this.node.current,"focus",()=>this.onFocus()),Er(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uc(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,Rr(t)))}class px extends rn{mount(){const{current:t}=this.node;t&&(this.unmount=_g(t,(n,r)=>(uc(this.node,r,"Start"),(i,{success:s})=>uc(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cs=new WeakMap,ao=new WeakMap,gx=e=>{const t=cs.get(e.target);t&&t(e)},yx=e=>{e.forEach(gx)};function xx({root:e,...t}){const n=e||document;ao.has(n)||ao.set(n,{});const r=ao.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(yx,{root:e,...t})),r[i]}function bx(e,t,n){const r=xx(t);return cs.set(e,n),r.observe(e),()=>{cs.delete(e),r.unobserve(e)}}const vx={some:0,all:1};class wx extends rn{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:vx[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 bx(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(kx(t,n))&&this.startObserver()}unmount(){}}function kx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Sx={inView:{Feature:wx},tap:{Feature:px},focus:{Feature:mx},hover:{Feature:hx}},Cx={layout:{ProjectionNode:jf,MeasureLayout:vf}},Ex={...cy,...Sx,...fx,...Cx},ge=E0(Ex,O0),Pt=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))});Pt.displayName="SSRBase";const Tx=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"}))]]),ha=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Tx}));ha.displayName="CaretDownIcon";const Ax=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"}))]]),Pf=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Ax}));Pf.displayName="CaretUpIcon";const jx=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"}))]]),Mf=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:jx}));Mf.displayName="ChatTextIcon";const Px=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"}))]]),Nf=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Px}));Nf.displayName="CheckIcon";const Mx=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"}))]]),If=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Mx}));If.displayName="MicrophoneIcon";const Nx=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"}))]]),Rf=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Nx}));Rf.displayName="MicrophoneSlashIcon";const Ix=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"}))]]),Vf=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Ix}));Vf.displayName="MonitorArrowUpIcon";const Rx=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"}))]]),ma=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Rx}));ma.displayName="SpinnerIcon";const Vx=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"}))]]),Df=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Vx}));Df.displayName="VideoCameraIcon";const Dx=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"}))]]),Ff=x.forwardRef((e,t)=>x.createElement(Pt,{ref:t,...e,weights:Dx}));Ff.displayName="VideoCameraSlashIcon";function dc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fx(...e){return t=>{let n=!1;const r=e.map(i=>{const s=dc(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():dc(e[i],null)}}}}function Lx(e){const t=$x(e),n=x.forwardRef((r,i)=>{const{children:s,...o}=r,a=x.Children.toArray(s),l=a.find(Bx);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 Ox=Lx("Slot");function $x(e){const t=x.forwardRef((n,r)=>{const{children:i,...s}=n;if(x.isValidElement(i)){const o=Hx(i),a=zx(s,i.props);return i.type!==x.Fragment&&(a.ref=r?Fx(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 _x=Symbol("radix.slottable");function Bx(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_x}function zx(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 Hx(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 pa="-",Ux=e=>{const t=Zx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(pa);return a[0]===""&&a.length!==1&&a.shift(),Lf(a,t)||Wx(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},Lf=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Lf(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(pa);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},fc=/^\[(.+)\]$/,Wx=e=>{if(fc.test(e)){const t=fc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Zx=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)us(n[i],r,i,t);return r},us=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:hc(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(qx(i)){us(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{us(o,hc(t,s),n,r)})})},hc=(e,t)=>{let n=e;return t.split(pa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},qx=e=>e.isThemeGetter,Gx=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)}}},ds="!",fs=":",Kx=fs.length,Yx=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===fs){s.push(i.slice(l,g)),l=g+Kx;continue}if(p==="/"){c=g;continue}}p==="["?o++:p==="]"?o--:p==="("?a++:p===")"&&a--}const u=s.length===0?i:i.substring(l),d=Xx(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+fs,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},Xx=e=>e.endsWith(ds)?e.substring(0,e.length-1):e.startsWith(ds)?e.substring(1):e,Qx=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}},Jx=e=>({cache:Gx(e.cacheSize),parseClassName:Yx(e),sortModifiers:Qx(e),...Ux(e)}),e1=/\s+/,t1=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],a=e.trim().split(e1);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+ds: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 n1(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Of(t))&&(r&&(r+=" "),r+=n);return r}const Of=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Of(e[r]))&&(n&&(n+=" "),n+=t);return n};function r1(e,...t){let n,r,i,s=o;function o(l){const c=t.reduce((u,d)=>d(u),e());return n=Jx(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=t1(l,n);return i(l,u),u}return function(){return s(n1.apply(null,arguments))}}const tt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},$f=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_f=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i1=/^\d+\/\d+$/,o1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s1=/\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$/,a1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,l1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sn=e=>i1.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),qt=e=>!!e&&Number.isInteger(Number(e)),lo=e=>e.endsWith("%")&&we(e.slice(0,-1)),Lt=e=>o1.test(e),u1=()=>!0,d1=e=>s1.test(e)&&!a1.test(e),Bf=()=>!1,f1=e=>l1.test(e),h1=e=>c1.test(e),m1=e=>!ae(e)&&!le(e),p1=e=>Xn(e,Uf,Bf),ae=e=>$f.test(e),cn=e=>Xn(e,Wf,d1),co=e=>Xn(e,v1,we),mc=e=>Xn(e,zf,Bf),g1=e=>Xn(e,Hf,h1),Wr=e=>Xn(e,Zf,f1),le=e=>_f.test(e),rr=e=>Qn(e,Wf),y1=e=>Qn(e,w1),pc=e=>Qn(e,zf),x1=e=>Qn(e,Uf),b1=e=>Qn(e,Hf),Zr=e=>Qn(e,Zf,!0),Xn=(e,t,n)=>{const r=$f.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Qn=(e,t,n=!1)=>{const r=_f.exec(e);return r?r[1]?t(r[1]):n:!1},zf=e=>e==="position"||e==="percentage",Hf=e=>e==="image"||e==="url",Uf=e=>e==="length"||e==="size"||e==="bg-size",Wf=e=>e==="length",v1=e=>e==="number",w1=e=>e==="family-name",Zf=e=>e==="shadow",k1=()=>{const e=tt("color"),t=tt("font"),n=tt("text"),r=tt("font-weight"),i=tt("tracking"),s=tt("leading"),o=tt("breakpoint"),a=tt("container"),l=tt("spacing"),c=tt("radius"),u=tt("shadow"),d=tt("inset-shadow"),h=tt("text-shadow"),m=tt("drop-shadow"),g=tt("blur"),p=tt("perspective"),b=tt("aspect"),v=tt("ease"),k=tt("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=()=>[Sn,"full","auto",...P()],y=()=>[qt,"none","subgrid",le,ae],M=()=>["auto",{span:["full",qt,le,ae]},qt,le,ae],D=()=>[qt,"auto",le,ae],B=()=>["auto","min","max","fr",le,ae],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],de=()=>["auto",...P()],ie=()=>[Sn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],F=()=>[e,le,ae],W=()=>[...A(),pc,mc,{position:[le,ae]}],w=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",x1,p1,{size:[le,ae]}],oe=()=>[lo,rr,cn],E=()=>["","none","full",c,le,ae],U=()=>["",we,rr,cn],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,lo,pc,mc],Q=()=>["","none",g,le,ae],V=()=>["none",we,le,ae],X=()=>["none",we,le,ae],fe=()=>[we,le,ae],R=()=>[Sn,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Lt],breakpoint:[Lt],color:[u1],container:[Lt],"drop-shadow":[Lt],ease:["in","out","in-out"],font:[m1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Lt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Lt],shadow:[Lt],spacing:["px",we],text:[Lt],"text-shadow":[Lt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sn,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:[qt,"auto",le,ae]}],basis:[{basis:[Sn,"full","auto",a,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,Sn,"auto","initial","none",ae]}],grow:[{grow:["",we,le,ae]}],shrink:[{shrink:["",we,le,ae]}],order:[{order:[qt,"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":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],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,rr,cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,le,co]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",lo,ae]}],"font-family":[{font:[y1,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,co]}],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,cn]}],"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"]},qt,le,ae],radial:["",le,ae],conic:[qt,le,ae]},b1,g1]}],"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,rr,cn]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",u,Zr,Wr]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",d,Zr,Wr]}],"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,cn]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",h,Zr,Wr]}],"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,Zr,Wr]}],"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:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"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,rr,cn,co]}],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"]}},S1=r1(k1);function ce(...e){return S1(Ns.clsx(e))}const C1=Ms.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 E1({className:e,variant:t,size:n,asChild:r=!1,...i}){const s=r?Ox:"button";return f.jsx(s,{"data-slot":"button",className:ce(C1({variant:t,size:n,className:e})),...i})}const T1=Ms.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 qf({className:e,variant:t,size:n,...r}){return f.jsx(qm.Root,{"data-slot":"toggle",className:ce(T1({variant:t,size:n,className:e})),...r})}function A1(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 Gf(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 _n(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 Kf(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 j1(e,t){const[n,r]=j.useState([]),[i,s]=j.useState("");return j.useEffect(()=>{var c;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()};return(c=navigator.mediaDevices)==null||c.addEventListener("devicechange",l),()=>{var u;(u=navigator.mediaDevices)==null||u.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 P1(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 Yf(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 M1(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 gc({...e}){return f.jsx(kt.Root,{"data-slot":"select",...e})}function yc({...e}){return f.jsx(kt.Value,{"data-slot":"select-value",...e})}function xc({className:e,size:t="default",children:n,...r}){return f.jsxs(kt.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(kt.Icon,{asChild:!0,children:f.jsx(ha,{weight:"bold",className:"size-4 transition-colors"})})]})}function bc({className:e,children:t,position:n="popper",...r}){return f.jsx(kt.Portal,{children:f.jsxs(kt.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(N1,{}),f.jsx(kt.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(I1,{})]})})}function vc({className:e,children:t,...n}){return f.jsxs(kt.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(kt.ItemIndicator,{children:f.jsx(Nf,{className:"size-4",weight:"bold"})})}),f.jsx(kt.ItemText,{children:t})]})}function N1({className:e,...t}){return f.jsx(kt.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Pf,{className:"size-4",weight:"bold"})})}function I1({className:e,...t}){return f.jsx(kt.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:ce("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(ha,{className:"size-4",weight:"bold"})})}const wc=Ms.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 kc({kind:e,track:t,requestPermissions:n,onError:r,client:i,...s}){const o=s.size||"default";if(!i)return f.jsxs(gc,{disabled:!0,children:[f.jsx(xc,{className:ce(wc({size:o}),s.className),children:f.jsx(yc,{placeholder:`Select a ${e}`})}),f.jsx(bc,{children:f.jsx(vc,{value:"none",children:"No devices available"})})]});const{devices:a,activeDeviceId:l,setActiveMediaDevice:c}=j1(i,e==="audioinput"?"audioinput":"videoinput");return f.jsxs(gc,{value:l,onValueChange:c,children:[f.jsx(xc,{className:ce(wc({size:o}),s.className,"hover:bg"),children:o!=="sm"&&f.jsx(yc,{className:"font-mono text-sm",placeholder:`Select a ${e}`})}),f.jsx(bc,{children:a.map(u=>f.jsx(vc,{value:u.deviceId,className:"font-mono text-xs",children:u.label},u.deviceId))})]})}function R1(e,t,n=!1){if(n)return ma;switch(e){case te.Track.Source.Microphone:return t?If:Rf;case te.Track.Source.Camera:return t?Df:Ff;case te.Track.Source.ScreenShare:return Vf;default:return x.Fragment}}function uo({source:e,pressed:t,pending:n,className:r,...i}){const s=R1(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(qf,{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 V1(e){return e?A1(e):{camera:!0,microphone:!0,screenShare:!0,data:!0}}function D1(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}=Gf(r),a=V1(r);Kf(r);const l=_n(r,"microphone",{onDeviceError:C=>{var N;return(N=e.onDeviceError)==null?void 0:N.call(e,{source:te.Track.Source.Microphone,error:C})}}),c=_n(r,"camera",{onDeviceError:C=>{var N;return(N=e.onDeviceError)==null?void 0:N.call(e,{source:te.Track.Source.Camera,error:C})}}),u=_n(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}=P1({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 F1={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"}},L1={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"}},O1={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"}},Sc={dark:F1,light:L1,vox:O1};function et(e){return Sc[e]||Sc.vox}function $1({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(E1,{type:"submit",size:"sm",disabled:!i.trim()||t||o,className:"ml-2 px-2 py-1 text-xs",children:o?"...":"Send"})]})}function _1({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=et(l),{micTrackRef:b,visibleControls:v,cameraToggle:k,microphoneToggle:S,screenShareToggle:A,handleAudioDeviceChange:T,handleVideoDeviceChange:C,handleDisconnect:N}=D1({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($1,{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(uo,{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(ut.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(kc,{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(uo,{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(kc,{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(uo,{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(qf,{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(Mf,{weight:"bold",className:"h-4 w-4"})})})]})]})}const Xf=j.forwardRef(({state:e,audioTrack:t,className:n},r)=>f.jsx("div",{ref:r,className:ce("",n),children:t?f.jsx(ut.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))})})})}));Xf.displayName="AgentTile";const B1=({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(ut.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"})})},z1=ge.create(ut.VideoTrack),H1=({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(z1,{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")})})},Cc=ge.create(H1),U1=ge.create(Xf),W1=ge.create(B1),Ot={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},Cn={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 Z1(e,t){const{localParticipant:n}=Gf(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 q1({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:r,state:i="idle",audioTrack:s,videoTrack:o}=t?Yf(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=ut.useTracks([te.Track.Source.ScreenShare]),l=Z1(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={...Ot.transition,delay:e?0:.15},g={...Ot.animate,scale:e?1:3,transition:m},p={...Ot.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(Cn.grid),children:[h&&f.jsx("div",{className:ce(["grid",!e&&Cn.agentChatClosed,e&&d&&Cn.agentChatOpenWithSecondTile,e&&!d&&Cn.agentChatOpenWithoutSecondTile]),children:f.jsxs("div",{className:"h-full flex items-center justify-center",children:[!k&&f.jsx(U1,{layoutId:"agent",...Ot,animate:g,transition:b,state:i,audioTrack:s||void 0,className:ce(e?"h-[90px]":"h-auto w-full")},"agent"),k&&o&&f.jsx(W1,{layoutId:"avatar",...Ot,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&&Cn.secondTileChatOpen,!e&&Cn.secondTileChatClosed]),children:f.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[l&&c&&f.jsx(Cc,{layout:"position",layoutId:"camera",...Ot,trackRef:l,transition:{...Ot.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&f.jsx(Cc,{layout:"position",layoutId:"screen",...Ot,trackRef:a,transition:{...Ot.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}function Ec({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 Tr({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(Qt,{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(Ec,{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(Qt,{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(Ec,{timeout:e.timeout}),o()]})})})}}const G1=({logLevel:e}={})=>{const t=ut.useRoomContext();x.useEffect(()=>(te.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},Tc=e=>e,K1=()=>{let e=Tc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Tc}}},Y1=K1();function tn(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 bn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":tn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qr={exports:{}},Gr={exports:{}},Pe={};/** @license React v16.13.1
29
+ `),()=>{m.contains(g)&&m.removeChild(g)}},[t]),h.jsx(Uy,{isPresent:t,childRef:o,sizeRef:s,children:P.cloneElement(e,{ref:o})})}const Wy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const c=$a(Gy),u=A.useId();let d=!0,f=A.useMemo(()=>(d=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:p=>{c.set(p,!0);for(const g of c.values())if(!g)return;r&&r()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[n,c,r]);return o&&d&&(f={...f}),A.useMemo(()=>{c.forEach((p,g)=>c.set(g,!1))},[n]),P.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),s==="popLayout"&&(e=h.jsx(Hy,{isPresent:n,anchorX:a,root:l,children:e})),h.jsx(So.Provider,{value:f,children:e})};function Gy(){return new Map}function uh(e=!0){const t=A.useContext(So);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=A.useId();A.useEffect(()=>{if(e)return i(o)},[e]);const s=A.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const Ii=e=>e.key||"";function Lc(e){const t=[];return A.Children.forEach(e,n=>{A.isValidElement(n)&&t.push(n)}),t}const Sr=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[c,u]=uh(s),d=A.useMemo(()=>Lc(e),[e]),f=s&&!c?[]:d.map(Ii),p=A.useRef(!0),g=A.useRef(d),m=$a(()=>new Map),[x,y]=A.useState(d),[k,v]=A.useState(d);xf(()=>{p.current=!1,g.current=d;for(let C=0;C<k.length;C++){const M=Ii(k[C]);f.includes(M)?m.delete(M):m.get(M)!==!0&&m.set(M,!1)}},[k,f.length,f.join("-")]);const _=[];if(d!==x){let C=[...d];for(let M=0;M<k.length;M++){const N=k[M],I=Ii(N);f.includes(I)||(C.splice(M,0,N),_.push(N))}return o==="wait"&&_.length&&(C=_),v(Lc(C)),y(d),null}process.env.NODE_ENV!=="production"&&o==="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:S}=A.useContext(ja);return h.jsx(h.Fragment,{children:k.map(C=>{const M=Ii(C),N=s&&!c?!1:d===k||f.includes(M),I=()=>{if(m.has(M))m.set(M,!0);else return;let b=!0;m.forEach(R=>{R||(b=!1)}),b&&(S==null||S(),v(g.current),s&&(u==null||u()),r&&r())};return h.jsx(Wy,{isPresent:N,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:N?void 0:I,anchorX:a,children:C},M)})})},dh=A.createContext({strict:!1}),Fc={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"]},Cr={};for(const e in Fc)Cr[e]={isEnabled:t=>Fc[e].some(n=>!!t[n])};function Ky(e){for(const t in e)Cr[t]={...Cr[t],...e[t]}}const qy=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 fo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qy.has(e)}let fh=e=>!fo(e);function Yy(e){typeof e=="function"&&(fh=t=>t.startsWith("on")?!fo(t):e(t))}try{Yy(require("@emotion/is-prop-valid").default)}catch{}function Zy(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fh(i)||n===!0&&fo(i)||!t&&!fo(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Co=A.createContext({});function _o(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function oi(e){return typeof e=="string"||Array.isArray(e)}const ul=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dl=["initial",...ul];function To(e){return _o(e.animate)||dl.some(t=>oi(e[t]))}function hh(e){return!!(To(e)||e.variants)}function Xy(e,t){if(To(e)){const{initial:n,animate:r}=e;return{initial:n===!1||oi(n)?n:void 0,animate:oi(r)?r:void 0}}return e.inherit!==!1?t:{}}function Qy(e){const{initial:t,animate:n}=Xy(e,A.useContext(Co));return A.useMemo(()=>({initial:t,animate:n}),[Bc(t),Bc(n)])}function Bc(e){return Array.isArray(e)?e.join(" "):e}const si={};function Jy(e){for(const t in e)si[t]=e[t],Ya(t)&&(si[t].isCSSVariable=!0)}function ph(e,{layout:t,layoutId:n}){return Mr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!si[e]||e==="opacity")}const ex={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tx=Rr.length;function nx(e,t,n){let r="",i=!0;for(let o=0;o<tx;o++){const s=Rr[o],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ih(a,sl[s]);if(!l){i=!1;const u=ex[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function fl(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(Mr.has(l)){s=!0;continue}else if(Ya(l)){i[l]=c;continue}else{const u=ih(c,sl[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=nx(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;r.transformOrigin=`${l} ${c} ${u}`}}const hl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mh(e,t,n){for(const r in t)!Mt(t[r])&&!ph(r,n)&&(e[r]=t[r])}function rx({transformTemplate:e},t){return A.useMemo(()=>{const n=hl();return fl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ix(e,t){const n=e.style||{},r={};return mh(r,n,e),Object.assign(r,rx(e,t)),r}function ox(e,t){const n={},r=ix(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 sx={offset:"stroke-dashoffset",array:"stroke-dasharray"},ax={offset:"strokeDashoffset",array:"strokeDasharray"};function lx(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?sx:ax;e[o.offset]=Ee.transform(-r);const s=Ee.transform(t),a=Ee.transform(n);e[o.array]=`${s} ${a}`}function gh(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,c,u){if(fl(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.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&&lx(d,i,o,s,!1)}const bh=()=>({...hl(),attrs:{}}),yh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cx(e,t,n,r){const i=A.useMemo(()=>{const o=bh();return gh(o,t,yh(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};mh(o,e.style,e),i.style={...o,...i.style}}return i}const ux=["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 pl(e){return typeof e!="string"||e.includes("-")?!1:!!(ux.indexOf(e)>-1||/[A-Z]/u.test(e))}function dx(e,t,n,{latestValues:r},i,o=!1){const a=(pl(e)?cx:ox)(t,r,i,e),l=Zy(t,typeof e=="string",o),c=e!==A.Fragment?{...l,...a,ref:n}:{},{children:u}=t,d=A.useMemo(()=>Mt(u)?u.get():u,[u]);return A.createElement(e,{...c,children:d})}function jc(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ml(e,t,n,r){if(typeof t=="function"){const[i,o]=jc(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=jc(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Ji(e){return Mt(e)?e.get():e}function fx({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:hx(n,r,i,e),renderState:t()}}function hx(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Ji(o[f]);let{initial:s,animate:a}=e;const l=To(e),c=hh(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!_o(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const g=ml(e,f[p]);if(g){const{transitionEnd:m,transition:x,...y}=g;for(const k in y){let v=y[k];if(Array.isArray(v)){const _=u?v.length-1:0;v=v[_]}v!==null&&(i[k]=v)}for(const k in m)i[k]=m[k]}}}return i}const xh=e=>(t,n)=>{const r=A.useContext(Co),i=A.useContext(So),o=()=>fx(e,t,r,i);return n?o():$a(o)};function gl(e,t,n){var o;const{style:r}=e,i={};for(const s in r)(Mt(r[s])||t.style&&Mt(t.style[s])||ph(s,e)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const px=xh({scrapeMotionValuesFromProps:gl,createRenderState:hl});function wh(e,t,n){const r=gl(e,t,n);for(const i in e)if(Mt(e[i])||Mt(t[i])){const o=Rr.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const mx=xh({scrapeMotionValuesFromProps:wh,createRenderState:bh}),gx=Symbol.for("motionComponentSymbol");function gr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bx(e,t,n){return A.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gr(n)&&(n.current=r))},[t])}const bl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yx="framerAppearId",vh="data-"+bl(yx),Eh=A.createContext({});function xx(e,t,n,r,i){var m,x;const{visualElement:o}=A.useContext(Co),s=A.useContext(dh),a=A.useContext(So),l=A.useContext(cl).reducedMotion,c=A.useRef(null);r=r||s.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=A.useContext(Eh);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&wx(c.current,n,i,d);const f=A.useRef(!1);A.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const p=n[vh],g=A.useRef(!!p&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,p))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,p)));return xf(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),g.current&&u.animationState&&u.animationState.animateChanges())}),A.useEffect(()=>{u&&(!g.current&&u.animationState&&u.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,p)}),g.current=!1),u.enteringChildren=void 0)}),u}function wx(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kh(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&gr(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function kh(e){if(e)return e.options.allowProjection!==!1?e.projection:kh(e.parent)}function ss(e,{forwardMotionProps:t=!1}={},n,r){n&&Ky(n);const i=pl(e)?mx:px;function o(a,l){let c;const u={...A.useContext(cl),...a,layoutId:vx(a)},{isStatic:d}=u,f=Qy(a),p=i(a,d);if(!d&&Va){Ex(u,n);const g=kx(u);c=g.MeasureLayout,f.visualElement=xx(e,p,u,r,g.ProjectionNode)}return h.jsxs(Co.Provider,{value:f,children:[c&&f.visualElement?h.jsx(c,{visualElement:f.visualElement,...u}):null,dx(e,a,bx(p,f.visualElement,l),p,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=A.forwardRef(o);return s[gx]=e,s}function vx({layoutId:e}){const t=A.useContext(ja).id;return t&&e!==void 0?t+"-"+e:e}function Ex(e,t){const n=A.useContext(dh).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?Nr(!1,r,"lazy-strict-mode"):wn(!1,r,"lazy-strict-mode")}}function kx(e){const{drag:t,layout:n}=Cr;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 Sx(e,t){if(typeof Proxy>"u")return ss;const n=new Map,r=(o,s)=>ss(o,s,e,t),i=(o,s)=>(process.env.NODE_ENV!=="production"&&Ga(!1,"motion() is deprecated. Use motion.create() instead."),r(o,s));return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,ss(s,void 0,e,t)),n.get(s))})}function Sh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Cx({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _x(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 as(e){return e===void 0||e===1}function ua({scale:e,scaleX:t,scaleY:n}){return!as(e)||!as(t)||!as(n)}function zn(e){return ua(e)||Ch(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ch(e){return $c(e.x)||$c(e.y)}function $c(e){return e&&e!=="0%"}function ho(e,t,n){const r=e-n,i=t*r;return n+i}function Vc(e,t,n,r,i){return i!==void 0&&(e=ho(e,i,r)),ho(e,n,r)+t}function da(e,t=0,n=1,r,i){e.min=Vc(e.min,t,n,r,i),e.max=Vc(e.max,t,n,r,i)}function _h(e,{x:t,y:n}){da(e.x,t.translate,t.scale,t.originPoint),da(e.y,n.translate,n.scale,n.originPoint)}const zc=.999999999999,Uc=1.0000000000001;function Tx(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&yr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,_h(e,s)),r&&zn(o.latestValues)&&yr(e,o.latestValues))}t.x<Uc&&t.x>zc&&(t.x=1),t.y<Uc&&t.y>zc&&(t.y=1)}function br(e,t){e.min=e.min+t,e.max=e.max+t}function Hc(e,t,n,r,i=.5){const o=ct(e.min,e.max,i);da(e,t,n,o,r)}function yr(e,t){Hc(e.x,t.x,t.scaleX,t.scale,t.originX),Hc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Th(e,t){return Sh(_x(e.getBoundingClientRect(),t))}function Nx(e,t,n){const r=Th(e,n),{scroll:i}=t;return i&&(br(r.x,i.offset.x),br(r.y,i.offset.y)),r}const Wc=()=>({translate:0,scale:1,origin:0,originPoint:0}),xr=()=>({x:Wc(),y:Wc()}),Gc=()=>({min:0,max:0}),mt=()=>({x:Gc(),y:Gc()}),fa={current:null},Nh={current:!1};function Ax(){if(Nh.current=!0,!!Va)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fa.current=e.matches;e.addEventListener("change",t),t()}else fa.current=!1}const Rx=new WeakMap;function Mx(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Mt(i))e.addValue(r,i);else if(Mt(o))e.addValue(r,kr(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,kr(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Kc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ix{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=il,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 f=Vt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,st.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;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=!!o,this.isControllingVariants=To(n),this.isVariantNode=hh(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&Mt(p)&&p.set(l[f])}}mount(t){var n;this.current=t,Rx.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)),Nh.current||Ax(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:fa.current,process.env.NODE_ENV!=="production"&&Ga(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(),Mn(this.notifyUpdate),Mn(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=Mr.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&st.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),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 Cr){const n=Cr[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 o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mt()}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<Kc.length;r++){const i=Kc[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Mx(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=kr(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"&&(wf(r)||Ef(r))?r=parseFloat(r):!zy(r)&&In.test(n)&&(r=rh(t,n)),this.setBaseTarget(t,Mt(r)?r.get():r)),Mt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ml(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Mt(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 Wa),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){al.render(this.render)}}class Ah extends Ix{constructor(){super(...arguments),this.KeyframeResolver=Ry}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;Mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Rh(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function Ox(e){return window.getComputedStyle(e)}class Px extends Ah{constructor(){super(...arguments),this.type="html",this.renderInstance=Rh}readValueFromInstance(t,n){var r;if(Mr.has(n))return(r=this.projection)!=null&&r.isProjecting?ra(n):qb(t,n);{const i=Ox(t),o=(Ya(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Th(t,n)}build(t,n,r){fl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gl(t,n,r)}}const Mh=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 Dx(e,t,n,r){Rh(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Mh.has(i)?i:bl(i),t.attrs[i])}class Lx extends Ah{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Mr.has(n)){const r=nh(n);return r&&r.default||0}return n=Mh.has(n)?n:bl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return wh(t,n,r)}build(t,n,r){gh(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Dx(t,n,r,i)}mount(t){this.isSVGTag=yh(t.tagName),super.mount(t)}}const Fx=(e,t)=>pl(e)?new Lx(t):new Px(t,{allowProjection:e!==A.Fragment});function wr(e,t,n){const r=e.getProps();return ml(r,t,n!==void 0?n:r.custom,e)}const ha=e=>Array.isArray(e);function Bx(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kr(n))}function jx(e){return ha(e)?e[e.length-1]||0:e}function $x(e,t){const n=wr(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=jx(o[s]);Bx(e,s,a)}}function Vx(e){return!!(Mt(e)&&e.add)}function pa(e,t){const n=e.getValue("willChange");if(Vx(n))return n.add(t);if(!n&&vn.WillChange){const r=new vn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Ih(e){return e.props[vh]}const zx=e=>e!==null;function Ux(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(zx),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Hx={type:"spring",stiffness:500,damping:25,restSpeed:10},Wx=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gx={type:"keyframes",duration:.8},Kx={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qx=(e,{keyframes:t})=>t.length>2?Gx:Mr.has(e)?e.startsWith("scale")?Wx(t[1]):Hx:Kx;function Yx({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const yl=(e,t,n,r={},i,o)=>s=>{const a=ol(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-nn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};Yx(a)||Object.assign(u,qx(e,u)),u.duration&&(u.duration=nn(u.duration)),u.repeatDelay&&(u.repeatDelay=nn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(la(u),u.delay===0&&(d=!0)),(vn.instantAnimations||vn.skipAnimations)&&(d=!0,la(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=Ux(u.keyframes,a);if(f!==void 0){st.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new rl(u):new by(u)};function Zx({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Oh(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=t;r&&(o=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),f=a[u];if(f===void 0||c&&Zx(c,u))continue;const p={delay:n,...ol(o||{},u)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Ih(e);if(y){const k=window.MotionHandoffAnimation(y,u,st);k!==null&&(p.startTime=k,m=!0)}}pa(e,u),d.start(yl(u,d,f,e.shouldReduceMotion&&Jf.has(u)?{type:!1}:p,e,m));const x=d.animation;x&&l.push(x)}return s&&Promise.all(l).then(()=>{st.update(()=>{s&&$x(e,s)})}),l}function Ph(e,t,n,r=0,i=1){const o=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function ma(e,t,n={}){var l;const r=wr(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 o=r?()=>Promise.all(Oh(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Xx(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function Xx(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(ma(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Ph(e.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Qx(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>ma(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=ma(e,t,n);else{const i=typeof t=="function"?wr(e,t,n.custom):t;r=Promise.all(Oh(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Dh(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 Jx=dl.length;function Lh(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Lh(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Jx;n++){const r=dl[n],i=e.props[r];(oi(i)||i===!1)&&(t[r]=i)}return t}const e0=[...ul].reverse(),t0=ul.length;function n0(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Qx(e,n,r)))}function r0(e){let t=n0(e),n=qc(),r=!0;const i=l=>(c,u)=>{var f;const d=wr(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:p,transitionEnd:g,...m}=d;c={...c,...m,...g}}return c};function o(l){t=l(e)}function s(l){const{props:c}=e,u=Lh(e.parent)||{},d=[],f=new Set;let p={},g=1/0;for(let x=0;x<t0;x++){const y=e0[x],k=n[y],v=c[y]!==void 0?c[y]:u[y],_=oi(v),S=y===l?k.isActive:null;S===!1&&(g=x);let C=v===u[y]&&v!==c[y]&&_;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),k.protectedKeys={...p},!k.isActive&&S===null||!v&&!k.prevProp||_o(v)||typeof v=="boolean")continue;const M=i0(k.prevProp,v);let N=M||y===l&&k.isActive&&!C&&_||x>g&&_,I=!1;const b=Array.isArray(v)?v:[v];let R=b.reduce(i(y),{});S===!1&&(R={});const{prevResolvedValues:O={}}=k,D={...O,...R},$=ne=>{N=!0,f.has(ne)&&(I=!0,f.delete(ne)),k.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in D){const j=R[ne],W=O[ne];if(p.hasOwnProperty(ne))continue;let w=!1;ha(j)&&ha(W)?w=!Dh(j,W):w=j!==W,w?j!=null?$(ne):f.add(ne):j!==void 0&&f.has(ne)?$(ne):k.protectedKeys[ne]=!0}k.prevProp=v,k.prevResolvedValues=R,k.isActive&&(p={...p,...R}),r&&e.blockInitialAnimation&&(N=!1);const U=C&&M;N&&(!U||I)&&d.push(...b.map(ne=>{const j={type:y};if(typeof ne=="string"&&r&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:W}=e,w=wr(W,ne);if(W.enteringChildren&&w){const{delayChildren:F}=w.transition||{};j.delay=Ph(W.enteringChildren,e,F)}}return{animation:ne,options:j}}))}if(f.size){const x={};if(typeof c.initial!="boolean"){const y=wr(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(x.transition=y.transition)}f.forEach(y=>{const k=e.getBaseTarget(y),v=e.getValue(y);v&&(v.liveStyle=!0),x[y]=k??null}),d.push({animation:x})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var p;return(p=f.animationState)==null?void 0:p.setActive(l,c)}),n[l].isActive=c;const u=s(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=qc(),r=!0}}}function i0(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Dh(t,e):!1}function jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qc(){return{animate:jn(!0),whileInView:jn(),whileHover:jn(),whileTap:jn(),whileDrag:jn(),whileFocus:jn(),exit:jn()}}class Dn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class o0 extends Dn{constructor(t){super(t),t.animationState||(t.animationState=r0(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_o(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 s0=0;class a0 extends Dn{constructor(){super(...arguments),this.id=s0++}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 l0={animation:{Feature:o0},exit:{Feature:a0}};function ai(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function gi(e){return{point:{x:e.pageX,y:e.pageY}}}const c0=e=>t=>ll(t)&&e(t,gi(t));function Yr(e,t,n,r){return ai(e,t,c0(n),r)}const Fh=1e-4,u0=1-Fh,d0=1+Fh,Bh=.01,f0=0-Bh,h0=0+Bh;function Lt(e){return e.max-e.min}function p0(e,t,n){return Math.abs(e-t)<=n}function Yc(e,t,n,r=.5){e.origin=r,e.originPoint=ct(t.min,t.max,e.origin),e.scale=Lt(n)/Lt(t),e.translate=ct(n.min,n.max,e.origin)-e.originPoint,(e.scale>=u0&&e.scale<=d0||isNaN(e.scale))&&(e.scale=1),(e.translate>=f0&&e.translate<=h0||isNaN(e.translate))&&(e.translate=0)}function Zr(e,t,n,r){Yc(e.x,t.x,n.x,r?r.originX:void 0),Yc(e.y,t.y,n.y,r?r.originY:void 0)}function Zc(e,t,n){e.min=n.min+t.min,e.max=e.min+Lt(t)}function m0(e,t,n){Zc(e.x,t.x,n.x),Zc(e.y,t.y,n.y)}function Xc(e,t,n){e.min=t.min-n.min,e.max=e.min+Lt(t)}function Xr(e,t,n){Xc(e.x,t.x,n.x),Xc(e.y,t.y,n.y)}function Yt(e){return[e("x"),e("y")]}const jh=({current:e})=>e?e.ownerDocument.defaultView:null,Qc=(e,t)=>Math.abs(e-t);function g0(e,t){const n=Qc(e.x,t.x),r=Qc(e.y,t.y);return Math.sqrt(n**2+r**2)}class $h{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=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 f=cs(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=g0(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;const{point:m}=f,{timestamp:x}=Nt;this.history.push({...m,timestamp:x});const{onStart:y,onMove:k}=this.handlers;p||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ls(p,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=cs(f.type==="pointercancel"?this.lastMoveEventInfo:ls(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,y),m&&m(f,y)},!ll(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=gi(t),l=ls(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=Nt;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,cs(l,this.history)),this.removeListeners=hi(Yr(this.contextWindow,"pointermove",this.handlePointerMove),Yr(this.contextWindow,"pointerup",this.handlePointerUp),Yr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mn(this.updatePoint)}}function ls(e,t){return t?{point:t(e.point)}:e}function Jc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cs({point:e},t){return{point:e,delta:Jc(e,Vh(t)),offset:Jc(e,b0(t)),velocity:y0(t,.1)}}function b0(e){return e[0]}function Vh(e){return e[e.length-1]}function y0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Vh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>nn(t)));)n--;if(!r)return{x:0,y:0};const o=un(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function x0(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ct(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ct(n,e,r.max):Math.min(e,n)),e}function eu(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 w0(e,{top:t,left:n,bottom:r,right:i}){return{x:eu(e.x,n,i),y:eu(e.y,t,r)}}function tu(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 v0(e,t){return{x:tu(e.x,t.x),y:tu(e.y,t.y)}}function E0(e,t){let n=.5;const r=Lt(e),i=Lt(t);return i>r?n=ni(t.min,t.max-r,e.min):r>i&&(n=ni(e.min,e.max-i,t.min)),xn(0,1,n)}function k0(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 ga=.35;function S0(e=ga){return e===!1?e=0:e===!0&&(e=ga),{x:nu(e,"left","right"),y:nu(e,"top","bottom")}}function nu(e,t,n){return{min:ru(e,t),max:ru(e,n)}}function ru(e,t){return typeof e=="number"?e:e[t]||0}const C0=new WeakMap;class _0{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=mt(),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 o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(gi(d).point)},s=(d,f)=>{const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Py(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yt(y=>{let k=this.getAxisMotionValue(y).get()||0;if(dn.test(k)){const{projection:v}=this.visualElement;if(v&&v.layout){const _=v.layout.layoutBox[y];_&&(k=Lt(_)*(parseFloat(k)/100))}}this.originPoint[y]=k}),m&&st.postRender(()=>m(d,f)),pa(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(g&&this.currentDirection===null){this.currentDirection=T0(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Yt(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new $h(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:jh(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&st.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||!Oi(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=x0(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&gr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=w0(r.layoutBox,t):this.constraints=!1,this.elastic=S0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Yt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=k0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gr(t))return!1;const r=t.current;wn(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 o=Nx(r,i.root,this.visualElement.getTransformPagePoint());let s=v0(i.layout.layoutBox,o);if(n){const a=n(Cx(s));this.hasMutatedConstraints=!!a,a&&(s=Sh(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Yt(u=>{if(!Oi(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pa(this.visualElement,t),r.start(yl(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yt(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){Yt(n=>{const{drag:r}=this.getProps();if(!Oi(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-ct(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Yt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=E0({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Yt(s=>{if(!Oi(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(ct(l,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;C0.set(this.visualElement,this);const t=this.visualElement.current,n=Yr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();gr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),st.read(r);const s=ai(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Yt(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ga,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Oi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function T0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class N0 extends Dn{constructor(t){super(t),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new _0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const iu=e=>(t,n)=>{e&&st.postRender(()=>e(t,n))};class A0 extends Dn{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(t){this.session=new $h(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jh(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:iu(t),onStart:iu(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&st.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Yr(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 eo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ou(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=ou(e,t.target.x),r=ou(e,t.target.y);return`${n}% ${r}%`}},R0={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=In.parse(e);if(i.length>5)return r;const o=In.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const c=ct(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),o(i)}};let us=!1;class M0 extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Jy(I0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),us&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),eo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,us=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||st.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),al.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;us=!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 zh(e){const[t,n]=uh(),r=A.useContext(ja);return h.jsx(M0,{...e,layoutGroup:r,switchLayoutGroup:A.useContext(Eh),isPresent:t,safeToRemove:n})}const I0={borderRadius:{...Fr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fr,borderTopRightRadius:Fr,borderBottomLeftRadius:Fr,borderBottomRightRadius:Fr,boxShadow:R0};function O0(e,t,n){const r=Mt(e)?e:kr(e);return r.start(yl("",r,t,n)),r.animation}const P0=(e,t)=>e.depth-t.depth;class D0{constructor(){this.children=[],this.isDirty=!1}add(t){za(this.children,t),this.isDirty=!0}remove(t){Ua(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(P0),this.isDirty=!1,this.children.forEach(t)}}function L0(e,t){const n=Vt.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Mn(r),e(o-t))};return st.setup(r,!0),()=>Mn(r)}const Uh=["TopLeft","TopRight","BottomLeft","BottomRight"],F0=Uh.length,su=e=>typeof e=="string"?parseFloat(e):e,au=e=>typeof e=="number"||Ee.test(e);function B0(e,t,n,r,i,o){i?(e.opacity=ct(0,n.opacity??1,j0(r)),e.opacityExit=ct(t.opacity??1,0,$0(r))):o&&(e.opacity=ct(t.opacity??1,n.opacity??1,r));for(let s=0;s<F0;s++){const a=`border${Uh[s]}Radius`;let l=lu(t,a),c=lu(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||au(l)===au(c)?(e[a]=Math.max(ct(su(l),su(c),r),0),(dn.test(c)||dn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ct(t.rotate||0,n.rotate||0,r))}function lu(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const j0=Hh(0,.5,Rf),$0=Hh(.5,.95,Qt);function Hh(e,t,n){return r=>r<e?0:r>t?1:n(ni(e,t,r))}function cu(e,t){e.min=t.min,e.max=t.max}function qt(e,t){cu(e.x,t.x),cu(e.y,t.y)}function uu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function du(e,t,n,r,i){return e-=t,e=ho(e,1/n,r),i!==void 0&&(e=ho(e,1/i,r)),e}function V0(e,t=0,n=1,r=.5,i,o=e,s=e){if(dn.test(t)&&(t=parseFloat(t),t=ct(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ct(o.min,o.max,r);e===o&&(a-=t),e.min=du(e.min,t,n,a,i),e.max=du(e.max,t,n,a,i)}function fu(e,t,[n,r,i],o,s){V0(e,t[n],t[r],t[i],t.scale,o,s)}const z0=["x","scaleX","originX"],U0=["y","scaleY","originY"];function hu(e,t,n,r){fu(e.x,t,z0,n?n.x:void 0,r?r.x:void 0),fu(e.y,t,U0,n?n.y:void 0,r?r.y:void 0)}function pu(e){return e.translate===0&&e.scale===1}function Wh(e){return pu(e.x)&&pu(e.y)}function mu(e,t){return e.min===t.min&&e.max===t.max}function H0(e,t){return mu(e.x,t.x)&&mu(e.y,t.y)}function gu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Gh(e,t){return gu(e.x,t.x)&&gu(e.y,t.y)}function bu(e){return Lt(e.x)/Lt(e.y)}function yu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class W0{constructor(){this.members=[]}add(t){za(this.members,t),t.scheduleRender()}remove(t){if(Ua(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 o=this.members[i];if(o.isPresent!==!1){r=o;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 G0(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}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 ds=["","X","Y","Z"],K0=1e3;let q0=0;function fs(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Kh(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ih(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",st,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Kh(r)}function qh({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=q0++,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(X0),this.nodes.forEach(tw),this.nodes.forEach(nw),this.nodes.forEach(Q0)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 D0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Wa),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=ch(s)&&!$y(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),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 f=()=>this.root.updateBlockedByResize=!1;st.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=L0(f,250),eo.hasAnimatedSinceResize&&(eo.hasAnimatedSinceResize=!1,this.nodes.forEach(vu)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||aw,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!Gh(this.targetLayout,p),k=!d&&f;if(this.options.layoutRoot||this.resumeFrom||k||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...ol(g,"layout"),onPlay:m,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,k)}else d||vu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Mn(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(rw),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Kh(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(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(xu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ew),this.nodes.forEach(Y0),this.nodes.forEach(Z0)):this.nodes.forEach(wu),this.clearAllSnapshots();const a=Vt.now();Nt.delta=xn(0,1e3/60,a-Nt.timestamp),Nt.timestamp=a,Nt.isProcessing=!0,es.update.process(Nt),es.preRender.process(Nt),es.render.process(Nt),Nt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,al.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(J0),this.sharedNodes.forEach(iw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Lt(this.snapshot.measuredBox.x)&&!Lt(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 s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=mt(),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Wh(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||zn(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),lw(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:s}=this.options;if(!s)return mt();const a=s.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(cw))){const{scroll:u}=this.root;u&&(br(a.x,u.offset.x),br(a.y,u.offset.y))}return a}removeElementScroll(s){var l;const a=mt();if(qt(a,s),(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:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&qt(a,s),br(a.x,d.offset.x),br(a.y,d.offset.y))}return a}applyTransform(s,a=!1){const l=mt();qt(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&yr(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),zn(u.latestValues)&&yr(l,u.latestValues)}return zn(this.latestValues)&&yr(l,this.latestValues),l}removeTransform(s){const a=mt();qt(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!zn(c.latestValues))continue;ua(c.latestValues)&&c.updateSnapshot();const u=mt(),d=c.measurePageBox();qt(u,d),hu(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return zn(this.latestValues)&&hu(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.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!==Nt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var f;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(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Nt.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=mt(),this.relativeTargetOrigin=mt(),Xr(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=mt(),this.targetWithTransforms=mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),m0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qt(this.target,this.layout.layoutBox),_h(this.target,this.targetDelta)):qt(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=mt(),this.relativeTargetOrigin=mt(),Xr(this.relativeTargetOrigin,this.target,p.target),qt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ua(this.parent.latestValues)||Ch(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 s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Nt.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;qt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Tx(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=mt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(uu(this.prevProjectionDelta.x,this.projectionDelta.x),uu(this.prevProjectionDelta.y,this.projectionDelta.y)),Zr(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!yu(this.projectionDelta.x,this.prevProjectionDelta.x)||!yu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xr(),this.projectionDelta=xr(),this.projectionDeltaWithTransform=xr()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=xr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=mt(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),y=!x||x.members.length<=1,k=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(sw));this.animationProgress=0;let v;this.mixTargetDelta=_=>{const S=_/1e3;Eu(d.x,s.x,S),Eu(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ow(this.relativeTarget,this.relativeTargetOrigin,f,S),v&&H0(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=mt()),qt(v,this.relativeTarget)),m&&(this.animationValues=u,B0(u,c,this.latestValues,S,k,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){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&&(Mn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{eo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=kr(0)),this.currentAnimation=O0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.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 s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(K0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&Yh(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||mt();const d=Lt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Lt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}qt(a,l),yr(a,u),Zr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new W0),this.sharedNodes.get(s).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 s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&fs("z",s,c,this.animationValues);for(let u=0;u<ds.length;u++)fs(`rotate${ds[u]}`,s,c,this.animationValues),fs(`skew${ds[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ji(a==null?void 0:a.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ji(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!zn(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=G0(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in si){if(u[g]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:y}=si[g],k=d==="none"?u[g]:m(u[g],c);if(x){const v=x.length;for(let _=0;_<v;_++)s[x[_]]=k}else y?this.options.visualElement.renderState.vars[g]=k:s[g]=k}this.options.layoutId&&(s.pointerEvents=c===this?Ji(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(xu),this.root.sharedNodes.clear()}}}function Y0(e){e.updateLayout()}function Z0(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:o}=e.options,s=t.source!==e.layout.source;o==="size"?Yt(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],p=Lt(f);f.min=r[d].min,f.max=f.min+p}):Yh(o,t.layoutBox,r)&&Yt(d=>{const f=s?t.measuredBox[d]:t.layoutBox[d],p=Lt(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=xr();Zr(a,r,t.layoutBox);const l=xr();s?Zr(l,e.applyTransform(i,!0),t.measuredBox):Zr(l,r,t.layoutBox);const c=!Wh(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const g=mt();Xr(g,t.layoutBox,f.layoutBox);const m=mt();Xr(m,r,p.layoutBox),Gh(g,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,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 X0(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 Q0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function J0(e){e.clearSnapshot()}function xu(e){e.clearMeasurements()}function wu(e){e.isLayoutDirty=!1}function ew(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function vu(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tw(e){e.resolveTargetDelta()}function nw(e){e.calcProjection()}function rw(e){e.resetSkewAndRotation()}function iw(e){e.removeLeadSnapshot()}function Eu(e,t,n){e.translate=ct(t.translate,0,n),e.scale=ct(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ku(e,t,n,r){e.min=ct(t.min,n.min,r),e.max=ct(t.max,n.max,r)}function ow(e,t,n,r){ku(e.x,t.x,n.x,r),ku(e.y,t.y,n.y,r)}function sw(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aw={duration:.45,ease:[.4,0,.1,1]},Su=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cu=Su("applewebkit/")&&!Su("chrome/")?Math.round:Qt;function _u(e){e.min=Cu(e.min),e.max=Cu(e.max)}function lw(e){_u(e.x),_u(e.y)}function Yh(e,t,n){return e==="position"||e==="preserve-aspect"&&!p0(bu(t),bu(n),.2)}function cw(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const uw=qh({attachResizeListener:(e,t)=>ai(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hs={current:void 0},Zh=qh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hs.current){const e=new uw({});e.mount(window),e.setOptions({layoutScroll:!0}),hs.current=e}return hs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),dw={pan:{Feature:A0},drag:{Feature:N0,ProjectionNode:Zh,MeasureLayout:zh}};function Tu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&st.postRender(()=>o(t,gi(t)))}class fw extends Dn{mount(){const{current:t}=this.node;t&&(this.unmount=Dy(t,(n,r)=>(Tu(this.node,r,"Start"),i=>Tu(this.node,i,"End"))))}unmount(){}}class hw extends Dn{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=hi(ai(this.node.current,"focus",()=>this.onFocus()),ai(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Nu(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),o=r[i];o&&st.postRender(()=>o(t,gi(t)))}class pw extends Dn{mount(){const{current:t}=this.node;t&&(this.unmount=jy(t,(n,r)=>(Nu(this.node,r,"Start"),(i,{success:o})=>Nu(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ba=new WeakMap,ps=new WeakMap,mw=e=>{const t=ba.get(e.target);t&&t(e)},gw=e=>{e.forEach(mw)};function bw({root:e,...t}){const n=e||document;ps.has(n)||ps.set(n,{});const r=ps.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gw,{root:e,...t})),r[i]}function yw(e,t,n){const r=bw(t);return ba.set(e,n),r.observe(e),()=>{ba.delete(e),r.unobserve(e)}}const xw={some:0,all:1};class ww extends Dn{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:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:xw[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!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(),f=c?u:d;f&&f(l)};return yw(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(vw(t,n))&&this.startObserver()}unmount(){}}function vw({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Ew={inView:{Feature:ww},tap:{Feature:pw},focus:{Feature:hw},hover:{Feature:fw}},kw={layout:{ProjectionNode:Zh,MeasureLayout:zh}},Sw={...l0,...Ew,...dw,...kw},Ie=Sx(Sw,Fx);function Cw(e){const[t,n]=A.useState(()=>e.getLocalParticipant()),[r,i]=A.useState(()=>e.getMicrophoneTrack());return A.useEffect(()=>{const o=()=>{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)};o(),e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("track.muted",o),e.on("track.unmuted",o);const s=e.getRoom();if(s){const a=()=>{console.log("🎤 Track published, updating participant state"),o()},l=()=>{console.log("🎤 Track unpublished, updating participant state"),o()};return s.on("localTrackPublished",a),s.on("localTrackUnpublished",l),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o),s.off("localTrackPublished",a),s.off("localTrackUnpublished",l)}}else return()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("track.muted",o),e.off("track.unmuted",o)}},[e]),{localParticipant:t,microphoneTrack:r}}function to(e,t,n){const[r,i]=A.useState(!1),[o,s]=A.useState(!1);return A.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:o,toggle:async l=>{try{s(!0);const c=l!==void 0?l:!r;switch(console.log(`🎬 useVoxketTrackToggle: ${t} toggle called`,{currentEnabled:r,targetEnabled:c,forceEnabled:l}),t){case"microphone":await e.toggleMicrophone(c);break;case"camera":await e.toggleCamera(c);break;case"screenShare":c?(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(c){console.error(`🎬 useVoxketTrackToggle: ${t} toggle failed:`,c)}finally{s(!1)}}}}function _w(e){const[t,n]=A.useState(()=>e.getRoom()),[r,i]=A.useState(()=>e.getConnectionState());return A.useEffect(()=>{const o=()=>{n(e.getRoom()),i(e.getConnectionState())};return e.on("connection.connected",o),e.on("connection.disconnected",o),e.on("connection.connecting",o),()=>{e.off("connection.connected",o),e.off("connection.disconnected",o),e.off("connection.connecting",o)}},[e]),t}function xl(e){const[t,n]=A.useState(()=>e.getIsAgentConnected()),[r,i]=A.useState(()=>e.getCurrentSession()),[o,s]=A.useState(()=>e.getCurrentAgentInfo()),[a,l]=A.useState(()=>e.getAgentState()),[c,u]=A.useState(()=>e.getAgentAudioTrack()),[d,f]=A.useState(()=>e.getAgentVideoTrack());return A.useEffect(()=>{const p=()=>{const v=e.getIsAgentConnected(),_=e.getCurrentSession(),S=e.getCurrentAgentInfo(),C=e.getAgentState(),M=e.getAgentAudioTrack(),N=e.getAgentVideoTrack();console.log("🤖 useVoxketVoiceAssistant: Updating state:",{isAgentConnected:v,hasSession:!!_,sessionId:_==null?void 0:_.id,hasAgentInfo:!!S,agentState:C,hasAudioTrack:!!M,hasVideoTrack:!!N}),n(v),i(_),s(S),l(C),u(M),f(N)};p();const g=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent connected event"),p()},m=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent disconnected event"),p()},x=()=>{console.log("🤖 useVoxketVoiceAssistant: Session changed event"),p()},y=()=>{console.log("🤖 useVoxketVoiceAssistant: Connection changed event"),p()},k=()=>{console.log("🤖 useVoxketVoiceAssistant: Agent state changed event"),p()};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",m),e.on("session.created",x),e.on("session.ended",x),e.on("session.state.changed",x),e.on("connection.connected",y),()=>{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",m),e.off("session.created",x),e.off("session.ended",x),e.off("session.state.changed",x),e.off("connection.connected",y)}},[e]),{agent:{isActive:t,info:o},session:r,state:a,audioTrack:c,videoTrack:d}}function Tw(e){const[t,n]=A.useState(()=>e.getVideoTrackRefs()),[r,i]=A.useState(()=>e.getCameraTrackRefs()),[o,s]=A.useState(()=>e.getScreenShareTrackRefs());return A.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),s(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:o}}const wl="-",Nw=e=>{const t=Rw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(wl);return a[0]===""&&a.length!==1&&a.shift(),Xh(a,t)||Aw(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Xh=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Xh(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(wl);return(s=t.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId},Au=/^\[(.+)\]$/,Aw=e=>{if(Au.test(e)){const t=Au.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Rw=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)ya(n[i],r,i,t);return r},ya=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Ru(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Mw(i)){ya(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{ya(s,Ru(t,o),n,r)})})},Ru=(e,t)=>{let n=e;return t.split(wl).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Mw=e=>e.isThemeGetter,Iw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,s)=>{n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}},xa="!",wa=":",Ow=wa.length,Pw=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,a=0,l=0,c;for(let g=0;g<i.length;g++){let m=i[g];if(s===0&&a===0){if(m===wa){o.push(i.slice(l,g)),l=g+Ow;continue}if(m==="/"){c=g;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const u=o.length===0?i:i.substring(l),d=Dw(u),f=d!==u,p=c&&c>l?c-l:void 0;return{modifiers:o,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}};if(t){const i=t+wa,o=r;r=s=>s.startsWith(i)?o(s.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},Dw=e=>e.endsWith(xa)?e.substring(0,e.length-1):e.startsWith(xa)?e.substring(1):e,Lw=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let o=[];return r.forEach(s=>{s[0]==="["||t[s]?(i.push(...o.sort(),s),o=[]):o.push(s)}),i.push(...o.sort()),i}},Fw=e=>({cache:Iw(e.cacheSize),parseClassName:Pw(e),sortModifiers:Lw(e),...Nw(e)}),Bw=/\s+/,jw=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],a=e.trim().split(Bw);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let x=!!m,y=r(x?g.substring(0,m):g);if(!y){if(!x){l=u+(l.length>0?" "+l:l);continue}if(y=r(g),!y){l=u+(l.length>0?" "+l:l);continue}x=!1}const k=o(f).join(":"),v=p?k+xa:k,_=v+y;if(s.includes(_))continue;s.push(_);const S=i(y,x);for(let C=0;C<S.length;++C){const M=S[C];s.push(v+M)}l=u+(l.length>0?" "+l:l)}return l};function $w(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Qh(t))&&(r&&(r+=" "),r+=n);return r}const Qh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qh(e[r]))&&(n&&(n+=" "),n+=t);return n};function Vw(e,...t){let n,r,i,o=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=Fw(c),r=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=jw(l,n);return i(l,u),u}return function(){return o($w.apply(null,arguments))}}const kt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Jh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ep=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zw=/^\d+\/\d+$/,Uw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hw=/\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$/,Ww=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=e=>zw.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),_n=e=>!!e&&Number.isInteger(Number(e)),ms=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),mn=e=>Uw.test(e),qw=()=>!0,Yw=e=>Hw.test(e)&&!Ww.test(e),tp=()=>!1,Zw=e=>Gw.test(e),Xw=e=>Kw.test(e),Qw=e=>!de(e)&&!fe(e),Jw=e=>Ir(e,ip,tp),de=e=>Jh.test(e),$n=e=>Ir(e,op,Yw),gs=e=>Ir(e,iv,Pe),Mu=e=>Ir(e,np,tp),ev=e=>Ir(e,rp,Xw),Pi=e=>Ir(e,sp,Zw),fe=e=>ep.test(e),Br=e=>Or(e,op),tv=e=>Or(e,ov),Iu=e=>Or(e,np),nv=e=>Or(e,ip),rv=e=>Or(e,rp),Di=e=>Or(e,sp,!0),Ir=(e,t,n)=>{const r=Jh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Or=(e,t,n=!1)=>{const r=ep.exec(e);return r?r[1]?t(r[1]):n:!1},np=e=>e==="position"||e==="percentage",rp=e=>e==="image"||e==="url",ip=e=>e==="length"||e==="size"||e==="bg-size",op=e=>e==="length",iv=e=>e==="number",ov=e=>e==="family-name",sp=e=>e==="shadow",sv=()=>{const e=kt("color"),t=kt("font"),n=kt("text"),r=kt("font-weight"),i=kt("tracking"),o=kt("leading"),s=kt("breakpoint"),a=kt("container"),l=kt("spacing"),c=kt("radius"),u=kt("shadow"),d=kt("inset-shadow"),f=kt("text-shadow"),p=kt("drop-shadow"),g=kt("blur"),m=kt("perspective"),x=kt("aspect"),y=kt("ease"),k=kt("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[..._(),fe,de],C=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],N=()=>[fe,de,l],I=()=>[nr,"full","auto",...N()],b=()=>[_n,"none","subgrid",fe,de],R=()=>["auto",{span:["full",_n,fe,de]},_n,fe,de],O=()=>[_n,"auto",fe,de],D=()=>["auto","min","max","fr",fe,de],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...N()],ne=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],j=()=>[e,fe,de],W=()=>[..._(),Iu,Mu,{position:[fe,de]}],w=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",nv,Jw,{size:[fe,de]}],Y=()=>[ms,Br,$n],E=()=>["","none","full",c,fe,de],B=()=>["",Pe,Br,$n],z=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Pe,ms,Iu,Mu],me=()=>["","none",g,fe,de],Q=()=>["none",Pe,fe,de],le=()=>["none",Pe,fe,de],he=()=>[Pe,fe,de],G=()=>[nr,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mn],breakpoint:[mn],color:[qw],container:[mn],"drop-shadow":[mn],ease:["in","out","in-out"],font:[Qw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mn],shadow:[mn],spacing:["px",Pe],text:[mn],"text-shadow":[mn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,de,fe,x]}],container:["container"],columns:[{columns:[Pe,de,fe,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:S()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",fe,de]}],basis:[{basis:[nr,"full","auto",a,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,nr,"auto","initial","none",de]}],grow:[{grow:["",Pe,fe,de]}],shrink:[{shrink:["",Pe,fe,de]}],order:[{order:[_n,"first","last","none",fe,de]}],"grid-cols":[{"grid-cols":b()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":b()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"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:[s]},...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,Br,$n]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,fe,gs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ms,de]}],"font-family":[{font:[tv,de,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,fe,de]}],"line-clamp":[{"line-clamp":[Pe,"none",fe,gs]}],leading:[{leading:[o,...N()]}],"list-image":[{"list-image":["none",fe,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",fe,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",fe,$n]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Pe,"auto",fe,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe,de]}],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",fe,de]}],"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:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,fe,de],radial:["",fe,de],conic:[_n,fe,de]},rv,ev]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],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:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,fe,de]}],"outline-w":[{outline:["",Pe,Br,$n]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",u,Di,Pi]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",d,Di,Pi]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Pe,$n]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",f,Di,Pi]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Pe,fe,de]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[fe,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"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:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",fe,de]}],filter:[{filter:["","none",fe,de]}],blur:[{blur:me()}],brightness:[{brightness:[Pe,fe,de]}],contrast:[{contrast:[Pe,fe,de]}],"drop-shadow":[{"drop-shadow":["","none",p,Di,Pi]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Pe,fe,de]}],"hue-rotate":[{"hue-rotate":[Pe,fe,de]}],invert:[{invert:["",Pe,fe,de]}],saturate:[{saturate:[Pe,fe,de]}],sepia:[{sepia:["",Pe,fe,de]}],"backdrop-filter":[{"backdrop-filter":["","none",fe,de]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,fe,de]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,fe,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,fe,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,fe,de]}],"backdrop-invert":[{"backdrop-invert":["",Pe,fe,de]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,fe,de]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,fe,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,fe,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",fe,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",fe,de]}],ease:[{ease:["linear","initial",y,fe,de]}],delay:[{delay:[Pe,fe,de]}],animate:[{animate:["none",k,fe,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,fe,de]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[fe,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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",fe,de]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",fe,de]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Pe,Br,$n,gs]}],stroke:[{stroke:["none",...j()]}],"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"]}},av=Vw(sv);function Je(...e){return av(Ba.clsx(e))}function No(e){var i;if(!e)return{sessionSettings:{},capabilities:{},modality:"voice"};const t={session_timer:((i=e.session_settings)==null?void 0:i.session_timer)||null},n=e.capabilities||{},r=e.modality||"voice";return{sessionSettings:t,capabilities:n,modality:r}}function lv(e,t){return e.capabilities[t]===!0}function Ao(e){return e.sessionSettings.session_timer||null}function ap(e){const t=e.capabilities;return{userVideoEnabled:t.user_video_enabled!==!1,agentAvatarEnabled:t.agent_avatar_enabled!==!1,screenshareEnabled:t.screenshare_session_enabled!==!1}}function lp(e){const t=e.capabilities;return{suggestedReplyEnabled:t.suggested_reply_enabled!==!1,attachmentsEnabled:t.support_in_chat_attachments!==!1}}function cp(e){return{...e.capabilities}}function up(e){const t=Math.floor(e/60),n=e%60;return`${t}:${n.toString().padStart(2,"0")}`}const dp=A.forwardRef(({state:e,audioTrack:t,className:n},r)=>h.jsx("div",{ref:r,className:Je("",n),children:t?h.jsx($t.BarVisualizer,{barCount:5,state:e,options:{minHeight:5},trackRef:t,className:Je("flex aspect-video w-40 items-center justify-center gap-1"),children:h.jsx("span",{className:Je(["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]"])})}):h.jsx("div",{className:Je("flex aspect-video w-40 items-center justify-center"),children:h.jsx("div",{className:"flex flex-col items-center justify-center",children:h.jsx("div",{className:"flex gap-1",children:Array.from({length:5}).map((i,o)=>h.jsx("span",{className:Je(["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"])},o))})})})}));dp.displayName="AgentTile";const cv=({videoTrack:e,className:t,ref:n})=>{var r,i;return!e||!e.publication||!e.participant?h.jsx("div",{ref:n,className:Je(t),children:h.jsx("div",{className:"w-full h-full bg-gray-200 rounded-md flex items-center justify-center",children:h.jsx("span",{className:"text-gray-500",children:"No video available"})})}):h.jsx("div",{ref:n,className:Je(t),children:h.jsx($t.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"})})},uv=Ie.create($t.VideoTrack),dv=({trackRef:e,className:t,ref:n})=>{var r,i;return h.jsx("div",{className:Je("bg-muted overflow-hidden rounded-md",t),children:h.jsx(uv,{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:Je("h-full w-auto")})})},Ou=Ie.create(dv),fv=Ie.create(dp),hv=Ie.create(cv),gn={initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",stiffness:675,damping:75,mass:1}},rr={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 pv(e,t){const{localParticipant:n}=Cw(t),r=n==null?void 0:n.getTrackPublication(e);return A.useMemo(()=>r&&n?{source:e,participant:n,publication:r}:void 0,[e,r,n])}function mv({chatOpen:e,client:t}){const{agent:{isActive:n=!1}={},session:r,state:i="idle",audioTrack:o,videoTrack:s}=t?xl(t):{agent:{isActive:!1},session:null,state:"idle",audioTrack:null,videoTrack:null},[a]=$t.useTracks([ce.Track.Source.ScreenShare]),l=pv(ce.Track.Source.Camera,t),c=l&&!l.publication.isMuted,u=a&&!a.publication.isMuted,d=c||u,f=n||r&&r.state==="active",p={...gn.transition,delay:e?0:.15},g={...gn.animate,scale:e?1:3,transition:p},m={...gn.animate,transition:p},x=p,y=p,k=s&&s.publication&&s.participant;return h.jsx("div",{className:"relative w-full h-full z-10 flex items-center justify-center",children:h.jsx("div",{className:"relative w-full h-full max-w-2xl px-4 md:px-0",children:h.jsxs("div",{className:Je(rr.grid),children:[f&&h.jsx("div",{className:Je(["grid",!e&&rr.agentChatClosed,e&&d&&rr.agentChatOpenWithSecondTile,e&&!d&&rr.agentChatOpenWithoutSecondTile]),children:h.jsxs("div",{className:"h-full flex items-center justify-center",children:[!k&&h.jsx(fv,{layoutId:"agent",...gn,animate:g,transition:x,state:i,audioTrack:o||void 0,className:Je(e?"h-[90px]":"h-auto w-full")},"agent"),k&&s&&h.jsx(hv,{layoutId:"avatar",...gn,animate:m,transition:y,videoTrack:s,className:Je(e?"h-[90px] [&>video]:h-[90px] [&>video]:w-auto":"h-auto w-full")},"avatar")]})}),h.jsx("div",{className:Je(["grid",e&&rr.secondTileChatOpen,!e&&rr.secondTileChatClosed]),children:h.jsxs("div",{className:"w-full px-10 flex items-center shadow-2xl justify-between",children:[l&&c&&h.jsx(Ou,{layout:"position",layoutId:"camera",...gn,trackRef:l,transition:{...gn.transition,delay:e?0:.15},className:"h-[60px] order-1"},"camera"),u&&h.jsx(Ou,{layout:"position",layoutId:"screen",...gn,trackRef:a,transition:{...gn.transition,delay:e?0:.15},className:"h-[70px] order-2"},"screen")]})})]})})})}const gv={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"}},bv={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"}},yv={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"}},Pu={dark:gv,light:bv,vox:yv};function Ct(e){return Pu[e]||Pu.vox}function Du({timeout:e}){const[t,n]=A.useState(100),r=A.useRef(null),i=A.useRef(null);return A.useEffect(()=>{if(!e||e<=0)return;n(100),i.current=Date.now();const o=()=>{if(!e||i.current===null)return;const s=Date.now()-i.current,a=Math.max(0,100-s/e*100);n(a),a>0&&(r.current=requestAnimationFrame(o))};return r.current=requestAnimationFrame(o),()=>{r.current&&cancelAnimationFrame(r.current)}},[e]),!e||e<=0?null:h.jsx("div",{className:"w-full h-1 relative top-1 rounded-t-4xl bg-gray-700 overflow-hidden",children:h.jsx(Ie.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 li({interaction:e,theme:t,onDismiss:n,client:r,addLocalMessage:i}){var a;if(!e||!e.isVisible||!e.component)return null;const[o]=P.useState(()=>Date.now()),s=()=>e.component?P.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}):h.jsx("div",{className:"p-4 text-red-500",children:"Component not found"});switch(e.presentationMode){case"fullscreen":return h.jsx(Sr,{children:h.jsxs(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[9999] bg-black",children:[h.jsxs("div",{className:"flex flex-col",children:[h.jsx(Du,{timeout:e.timeout}),h.jsxs("div",{className:"flex items-center justify-between p-4 bg-black/80 text-white border-b border-gray-700",children:[h.jsx("h3",{className:"text-lg font-semibold",children:e.methodName.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase())}),h.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:h.jsx(We.X,{className:"w-5 h-5"})})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:s()})]})});case"embedded":default:return h.jsx(Sr,{children:h.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"w-fit rounded-lg ",children:h.jsxs("div",{children:[h.jsx(Du,{timeout:e.timeout}),s()]})})})}}function ci({duration:e,theme:t="vox",onTimerExpired:n,className:r="",showIcon:i=!0}){const[o,s]=A.useState(e),[a,l]=A.useState(!1);A.useEffect(()=>{if(o<=0){l(!0),n==null||n();return}const u=setInterval(()=>{s(d=>{const f=d-1;return f<=0?(l(!0),n==null||n(),0):f})},1e3);return()=>clearInterval(u)},[o,n]),A.useEffect(()=>{s(e),l(!1)},[e]);const c=()=>a?"text-red-500":o<=60?"text-orange-500":o<=300?"text-yellow-500":t==="dark"?"text-gray-300":"text-gray-600";return h.jsxs("div",{className:`flex items-center gap-1 text-sm ${c()} ${r}`,children:[i&&h.jsx(We.Clock,{className:"w-4 h-4"}),h.jsx("span",{className:"font-mono",children:up(o)}),a&&h.jsx("span",{className:"text-xs ml-1 text-red-500",children:"(Expired)"})]})}const xv=({logLevel:e}={})=>{const t=$t.useRoomContext();P.useEffect(()=>(ce.setLogLevel(e??"debug"),window.__lk_room=t,()=>{window.__lk_room=void 0}),[t,e])},fp=P.forwardRef((e,t)=>{const{alt:n,color:r="currentColor",size:i="1em",weight:o="regular",mirrored:s=!1,children:a,weights:l,...c}=e;return P.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:r,viewBox:"0 0 256 256",transform:s?"scale(-1, 1)":void 0,...c},!!n&&P.createElement("title",null,n),a,l.get(o))});fp.displayName="SSRBase";const wv=new Map([["bold",P.createElement(P.Fragment,null,P.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",P.createElement(P.Fragment,null,P.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),P.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",P.createElement(P.Fragment,null,P.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",P.createElement(P.Fragment,null,P.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",P.createElement(P.Fragment,null,P.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",P.createElement(P.Fragment,null,P.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"}))]]),vl=P.forwardRef((e,t)=>P.createElement(fp,{ref:t,...e,weights:wv}));vl.displayName="SpinnerIcon";function vv(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ev=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sv={};function Lu(e,t){return(Sv.jsx?kv:Ev).test(e)}const Cv=/[ \t\n\f\r]/g;function _v(e){return typeof e=="object"?e.type==="text"?Fu(e.value):!1:Fu(e)}function Fu(e){return e.replace(Cv,"")===""}class bi{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}bi.prototype.normal={};bi.prototype.property={};bi.prototype.space=void 0;function hp(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new bi(n,r,t)}function va(e){return e.toLowerCase()}class zt{constructor(t,n){this.attribute=n,this.property=t}}zt.prototype.attribute="";zt.prototype.booleanish=!1;zt.prototype.boolean=!1;zt.prototype.commaOrSpaceSeparated=!1;zt.prototype.commaSeparated=!1;zt.prototype.defined=!1;zt.prototype.mustUseProperty=!1;zt.prototype.number=!1;zt.prototype.overloadedBoolean=!1;zt.prototype.property="";zt.prototype.spaceSeparated=!1;zt.prototype.space=void 0;let Tv=0;const Me=Qn(),xt=Qn(),Ea=Qn(),X=Qn(),it=Qn(),vr=Qn(),Ht=Qn();function Qn(){return 2**++Tv}const ka=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:xt,commaOrSpaceSeparated:Ht,commaSeparated:vr,number:X,overloadedBoolean:Ea,spaceSeparated:it},Symbol.toStringTag,{value:"Module"})),bs=Object.keys(ka);class El extends zt{constructor(t,n,r,i){let o=-1;if(super(t,n),Bu(this,"space",i),typeof r=="number")for(;++o<bs.length;){const s=bs[o];Bu(this,bs[o],(r&ka[s])===ka[s])}}}El.prototype.defined=!0;function Bu(e,t,n){n&&(e[t]=n)}function Pr(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new El(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[va(r)]=r,n[va(o.attribute)]=r}return new bi(t,n,e.space)}const pp=Pr({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:it,ariaCurrent:null,ariaDescribedBy:it,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:it,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:it,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:it,ariaLevel:X,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:it,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:it,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:xt,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 mp(e,t){return t in e?e[t]:t}function gp(e,t){return mp(e,t.toLowerCase())}const Nv=Pr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vr,acceptCharset:it,accessKey:it,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:it,autoFocus:Me,autoPlay:Me,blocking:it,capture:null,charSet:null,checked:Me,cite:null,className:it,cols:X,colSpan:null,content:null,contentEditable:xt,controls:Me,controlsList:it,coords:X|vr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Ea,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:it,height:X,hidden:Ea,high:X,href:null,hrefLang:null,htmlFor:it,httpEquiv:it,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:it,itemRef:it,itemScope:Me,itemType:it,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,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:Me,optimum:X,pattern:null,ping:it,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:it,required:Me,reversed:Me,rows:X,rowSpan:X,sandbox:it,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:xt,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:Me,useMap:null,value:xt,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:it,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:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:xt,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:Me,disableRemotePlayback:Me,prefix:null,property:null,results:X,security:null,unselectable:null},space:"html",transform:gp}),Av=Pr({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:Ht,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:it,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:Me,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:vr,g2:vr,glyphName:vr,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:Ht,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:it,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ht,rev:Ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ht,requiredFeatures:Ht,requiredFonts:Ht,requiredFormats:Ht,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:Ht,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:Ht,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:Ht,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:mp}),bp=Pr({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()}}),yp=Pr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:gp}),xp=Pr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Rv={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"},Mv=/[A-Z]/g,ju=/-[a-z]/g,Iv=/^data[-\w.:]+$/i;function Ov(e,t){const n=va(t);let r=t,i=zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Iv.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ju,Dv);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ju.test(o)){let s=o.replace(Mv,Pv);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=El}return new i(r,t)}function Pv(e){return"-"+e.toLowerCase()}function Dv(e){return e.charAt(1).toUpperCase()}const Lv=hp([pp,Nv,bp,yp,xp],"html"),kl=hp([pp,Av,bp,yp,xp],"svg");function Fv(e){return e.join(" ").trim()}function Ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ir={},ys,$u;function Bv(){if($u)return ys;$u=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
30
+ `,c="/",u="*",d="",f="comment",p="declaration";ys=function(m,x){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];x=x||{};var y=1,k=1;function v(D){var $=D.match(t);$&&(y+=$.length);var U=D.lastIndexOf(l);k=~U?D.length-U:k+D.length}function _(){var D={line:y,column:k};return function($){return $.position=new S(D),N(),$}}function S(D){this.start=D,this.end={line:y,column:k},this.source=x.source}S.prototype.content=m;function C(D){var $=new Error(x.source+":"+y+":"+k+": "+D);if($.reason=D,$.filename=x.source,$.line=y,$.column=k,$.source=m,!x.silent)throw $}function M(D){var $=D.exec(m);if($){var U=$[0];return v(U),m=m.slice(U.length),$}}function N(){M(n)}function I(D){var $;for(D=D||[];$=b();)$!==!1&&D.push($);return D}function b(){var D=_();if(!(c!=m.charAt(0)||u!=m.charAt(1))){for(var $=2;d!=m.charAt($)&&(u!=m.charAt($)||c!=m.charAt($+1));)++$;if($+=2,d===m.charAt($-1))return C("End of comment missing");var U=m.slice(2,$-2);return k+=2,v(U),m=m.slice($),k+=2,D({type:f,comment:U})}}function R(){var D=_(),$=M(r);if($){if(b(),!M(i))return C("property missing ':'");var U=M(o),re=D({type:p,property:g($[0].replace(e,d)),value:U?g(U[0].replace(e,d)):d});return M(s),re}}function O(){var D=[];I(D);for(var $;$=R();)$!==!1&&(D.push($),I(D));return D}return N(),O()};function g(m){return m?m.replace(a,d):d}return ys}var Vu;function jv(){if(Vu)return ir;Vu=1;var e=ir&&ir.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.default=n;var t=e(Bv());function n(r,i){var o=null;if(!r||typeof r!="string")return o;var s=(0,t.default)(r),a=typeof i=="function";return s.forEach(function(l){if(l.type==="declaration"){var c=l.property,u=l.value;a?i(c,u,l):u&&(o=o||{},o[c]=u)}}),o}return ir}var jr={},zu;function $v(){if(zu)return jr;zu=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(c){return!c||n.test(c)||e.test(c)},s=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,a):c=c.replace(r,a),c.replace(t,s))};return jr.camelCase=l,jr}var $r,Uu;function Vv(){if(Uu)return $r;Uu=1;var e=$r&&$r.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(jv()),n=$v();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,$r=r,$r}var zv=Vv();const Uv=Ro(zv),wp=vp("end"),Sl=vp("start");function vp(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 Hv(e){const t=Sl(e),n=wp(e);if(t&&n)return{start:t,end:n}}function Qr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hu(e.position):"start"in e||"end"in e?Hu(e):"line"in e||"column"in e?Sa(e):""}function Sa(e){return Wu(e&&e.line)+":"+Wu(e&&e.column)}function Hu(e){return Sa(e&&e.start)+"-"+Sa(e&&e.end)}function Wu(e){return e&&typeof e=="number"?e:1}class Ot extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.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=Qr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const Cl={}.hasOwnProperty,Wv=new Map,Gv=/[A-Z]/g,Kv=new Set(["table","tbody","thead","tfoot","tr"]),qv=new Set(["td","th"]),Ep="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yv(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=rE(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=nE(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"?kl:Lv,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=kp(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function kp(e,t,n){if(t.type==="element")return Zv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Xv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Jv(e,t,n);if(t.type==="mdxjsEsm")return Qv(e,t);if(t.type==="root")return eE(e,t,n);if(t.type==="text")return tE(e,t)}function Zv(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=kl,e.schema=i),e.ancestors.push(t);const o=Cp(e,t.tagName,!1),s=iE(e,t);let a=Tl(e,t);return Kv.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!_v(l):!0})),Sp(e,s,o,t),_l(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Xv(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)}ui(e,t.position)}function Qv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ui(e,t.position)}function Jv(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=kl,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Cp(e,t.name,!0),s=oE(e,t),a=Tl(e,t);return Sp(e,s,o,t),_l(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function eE(e,t,n){const r={};return _l(r,Tl(e,t)),e.create(t,e.Fragment,r,n)}function tE(e,t){return t.value}function Sp(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _l(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nE(e,t,n){return r;function r(i,o,s,a){const c=Array.isArray(s.children)?n:t;return a?c(o,s,a):c(o,s)}}function rE(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=Sl(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function iE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Cl.call(t.properties,i)){const o=sE(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&qv.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function oE(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ui(e,t.position);else{const i=r.name;let o;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,o=e.evaluater.evaluateExpression(a.expression)}else ui(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Tl(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Wv;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;s=l+"-"+c,i.set(l,c+1)}}const a=kp(e,o,s);a!==void 0&&n.push(a)}return n}function sE(e,t,n){const r=Ov(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?vv(n):Fv(n)),r.property==="style"){let i=typeof n=="object"?n:aE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=lE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Rv[r.property]||r.property:r.attribute,n]}}function aE(e,t){try{return Uv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ot("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=Ep+"#cannot-parse-style-attribute",i}}function Cp(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=Lu(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=Lu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Cl.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ui(e)}function ui(e,t){const n=new Ot("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=Ep+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lE(e){const t={};let n;for(n in e)Cl.call(e,n)&&(t[cE(n)]=e[n]);return t}function cE(e){let t=e.replace(Gv,uE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uE(e){return"-"+e.toLowerCase()}const xs={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"]},dE={};function Nl(e,t){const n=dE,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _p(e,r,i)}function _p(e,t,n){if(fE(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 Gu(e.children,t,n)}return Array.isArray(e)?Gu(e,t,n):""}function Gu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=_p(e[i],t,n);return r.join("")}function fE(e){return!!(e&&typeof e=="object")}const Ku=document.createElement("i");function Al(e){const t="&"+e+";";Ku.innerHTML=t;const n=Ku.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Gt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function Zt(e,t){return e.length>0?(Gt(e,e.length,0,t),e):t}const qu={}.hasOwnProperty;function Tp(e){const t={};let n=-1;for(;++n<e.length;)hE(t,e[n]);return t}function hE(e,t){let n;for(n in t){const i=(qu.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){qu.call(i,s)||(i[s]=[]);const a=o[s];pE(i[s],Array.isArray(a)?a:a?[a]:[])}}}function pE(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Gt(e,0,0,r)}function Np(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 rn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dt=Ln(/[A-Za-z]/),It=Ln(/[\dA-Za-z]/),mE=Ln(/[#-'*+\--9=?A-Z^-~]/);function po(e){return e!==null&&(e<32||e===127)}const Ca=Ln(/\d/),gE=Ln(/[\dA-Fa-f]/),bE=Ln(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function De(e){return e===-2||e===-1||e===32}const Mo=Ln(new RegExp("\\p{P}|\\p{S}","u")),Zn=Ln(/\s/);function Ln(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Dr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&It(e.charCodeAt(n+1))&&It(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return De(l)?(e.enter(n),a(l)):t(l)}function a(l){return De(l)&&o++<i?(e.consume(l),a):(e.exit(n),t(l))}}const yE={tokenize:xE};function xE(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"),Be(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return xe(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const wE={tokenize:vE},Yu={tokenize:EE};function vE(e){const t=this,n=[];let r=0,i,o,s;return a;function a(v){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const _=t.events.length;let S=_,C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){C=t.events[S][1].end;break}y(r);let M=_;for(;M<t.events.length;)t.events[M][1].end={...C},M++;return Gt(t.events,S+1,0,t.events.slice(_)),t.events.length=M,c(v)}return a(v)}function c(v){if(r===n.length){if(!i)return f(v);if(i.currentConstruct&&i.currentConstruct.concrete)return g(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Yu,u,d)(v)}function u(v){return i&&k(),y(r),f(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(v)}function f(v){return t.containerState={},e.attempt(Yu,p,g)(v)}function p(v){return r++,n.push([t.currentConstruct,t.containerState]),f(v)}function g(v){if(v===null){i&&k(),y(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),m(v)}function m(v){if(v===null){x(e.exit("chunkFlow"),!0),y(0),e.consume(v);return}return xe(v)?(e.consume(v),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),m)}function x(v,_){const S=t.sliceStream(v);if(_&&S.push(null),v.previous=o,o&&(o.next=v),o=v,i.defineSkip(v.start),i.write(S),t.parser.lazy[v.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const M=t.events.length;let N=M,I,b;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(I){b=t.events[N][1].end;break}I=!0}for(y(r),C=M;C<t.events.length;)t.events[C][1].end={...b},C++;Gt(t.events,N+1,0,t.events.slice(M)),t.events.length=C}}function y(v){let _=n.length;for(;_-- >v;){const S=n[_];t.containerState=S[1],S[0].exit.call(t,e)}n.length=v}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function EE(e,t,n){return Be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _r(e){if(e===null||et(e)||Zn(e))return 1;if(Mo(e))return 2}function Io(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const _a={name:"attention",resolveAll:kE,tokenize:SE};function kE(e,t){let n=-1,r,i,o,s,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},f={...e[n][1].start};Zu(d,-l),Zu(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Zt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Zt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),c=Zt(c,Io(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Zt(c,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Zt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Gt(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 SE(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_r(r);let o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;const c=e.exit("attentionSequence"),u=_r(l),d=!u||u===2&&i||n.includes(l),f=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?d:d&&(i||!f)),c._close=!!(o===42?f:f&&(u||!d)),t(l)}}function Zu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const CE={name:"autolink",tokenize:_E};function _E(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Dt(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||It(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||It(p))&&r++<32?(e.consume(p),a):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||po(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):mE(p)?(e.consume(p),c):n(p)}function u(p){return It(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||It(p))&&r++<63){const g=p===45?f:d;return e.consume(p),g}return n(p)}}const yi={partial:!0,tokenize:TE};function TE(e,t,n){return r;function r(o){return De(o)?Be(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||xe(o)?t(o):n(o)}}const Ap={continuation:{tokenize:AE},exit:RE,name:"blockQuote",tokenize:NE};function NE(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return De(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function AE(e,t,n){const r=this;return i;function i(s){return De(s)?Be(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Ap,t,n)(s)}}function RE(e){e.exit("blockQuote")}const Rp={name:"characterEscape",tokenize:ME};function ME(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return bE(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Mp={name:"characterReference",tokenize:IE};function IE(e,t,n){const r=this;let i=0,o,s;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"),o=31,s=It,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=gE,u):(e.enter("characterReferenceValue"),o=7,s=Ca,u(d))}function u(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===It&&!Al(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),u):n(d)}}const Xu={partial:!0,tokenize:PE},Qu={concrete:!0,name:"codeFenced",tokenize:OE};function OE(e,t,n){const r=this,i={partial:!0,tokenize:S};let o=0,s=0,a;return l;function l(C){return c(C)}function c(C){const M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===a?(s++,e.consume(C),u):s<3?n(C):(e.exit("codeFencedFenceSequence"),De(C)?Be(e,d,"whitespace")(C):d(C))}function d(C){return C===null||xe(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Xu,m,_)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||xe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(C)):De(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Be(e,p,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),f)}function p(C){return C===null||xe(C)?d(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||xe(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(e.consume(C),g)}function m(C){return e.attempt(i,_,x)(C)}function x(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&De(C)?Be(e,k,"linePrefix",o+1)(C):k(C)}function k(C){return C===null||xe(C)?e.check(Xu,m,_)(C):(e.enter("codeFlowValue"),v(C))}function v(C){return C===null||xe(C)?(e.exit("codeFlowValue"),k(C)):(e.consume(C),v)}function _(C){return e.exit("codeFenced"),t(C)}function S(C,M,N){let I=0;return b;function b(U){return C.enter("lineEnding"),C.consume(U),C.exit("lineEnding"),R}function R(U){return C.enter("codeFencedFence"),De(U)?Be(C,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):O(U)}function O(U){return U===a?(C.enter("codeFencedFenceSequence"),D(U)):N(U)}function D(U){return U===a?(I++,C.consume(U),D):I>=s?(C.exit("codeFencedFenceSequence"),De(U)?Be(C,$,"whitespace")(U):$(U)):N(U)}function $(U){return U===null||xe(U)?(C.exit("codeFencedFence"),M(U)):N(U)}}}function PE(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const ws={name:"codeIndented",tokenize:LE},DE={partial:!0,tokenize:FE};function LE(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Be(e,o,"linePrefix",5)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):xe(c)?e.attempt(DE,s,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||xe(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function FE(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Be(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):xe(s)?i(s):n(s)}}const BE={name:"codeText",previous:$E,resolve:jE,tokenize:VE};function jE(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 $E(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VE(e,t,n){let r=0,i,o;return s;function s(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?(o=e.enter("codeTextSequence"),i=0,u(d)):xe(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||xe(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)):(o.type="codeTextData",c(d))}}class zE{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 o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Vr(this.left,r),o.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),Vr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vr(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);Vr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vr(this.left,n.reverse())}}}function Vr(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 Ip(e){const t={};let n=-1,r,i,o,s,a,l,c;const u=new zE(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,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,UE(u,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=u.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[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 Gt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function UE(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,l=[],c={};let u,d,f=-1,p=n,g=0,m=0;const x=[m];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(m=f+1,x.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):x.pop(),f=x.length;f--;){const y=a.slice(x[f],x[f+1]),k=o.pop();l.push([k,k+y.length-1]),e.splice(k,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[g+l[f][0]]=g+l[f][1],g+=l[f][1]-l[f][0]-1;return c}const HE={resolve:GE,tokenize:KE},WE={partial:!0,tokenize:qE};function GE(e){return Ip(e),e}function KE(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?o(a):xe(a)?e.check(WE,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function qE(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Be(e,o,"linePrefix")}function o(s){if(s===null||xe(s))return n(s);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(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Op(e,t,n,r,i,o,s,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),f):y===null||y===32||y===41||po(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),f(y)):y===null||y===60||xe(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||et(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||po(y)?n(y):(e.consume(y),y===92?x:m)}function x(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function Pp(e,t,n,r,i,o){const s=this;let a=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):xe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||xe(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!De(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Dp(e,t,n,r,i,o){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,l):n(f)}function l(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),c(f))}function c(f){return f===s?(e.exit(o),l(s)):f===null?n(f):xe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||xe(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(e.consume(f),u):u(f)}}function Jr(e,t){let n;return r;function r(i){return xe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):De(i)?Be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const YE={name:"definition",tokenize:XE},ZE={partial:!0,tokenize:QE};function XE(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return Pp.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return et(p)?Jr(e,c)(p):c(p)}function c(p){return Op(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(ZE,d,d)(p)}function d(p){return De(p)?Be(e,f,"whitespace")(p):f(p)}function f(p){return p===null||xe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function QE(e,t,n){return r;function r(a){return et(a)?Jr(e,i)(a):n(a)}function i(a){return Dp(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return De(a)?Be(e,s,"whitespace")(a):s(a)}function s(a){return a===null||xe(a)?t(a):n(a)}}const JE={name:"hardBreakEscape",tokenize:ek};function ek(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return xe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const tk={name:"headingAtx",resolve:nk,tokenize:rk};function nk(e,t){let n=e.length-2,r=3,i,o;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},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Gt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function rk(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(e.consume(u),s):u===null||et(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||xe(u)?(e.exit("atxHeading"),t(u)):De(u)?Be(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||et(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const ik=["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"],Ju=["pre","script","style","textarea"],ok={concrete:!0,name:"htmlFlow",resolveTo:lk,tokenize:ck},sk={partial:!0,tokenize:dk},ak={partial:!0,tokenize:uk};function lk(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 ck(e,t,n){const r=this;let i,o,s,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),f):E===47?(e.consume(E),o=!0,m):E===63?(e.consume(E),i=3,r.interrupt?t:w):Dt(E)?(e.consume(E),s=String.fromCharCode(E),x):n(E)}function f(E){return E===45?(e.consume(E),i=2,p):E===91?(e.consume(E),i=5,a=0,g):Dt(E)?(e.consume(E),i=4,r.interrupt?t:w):n(E)}function p(E){return E===45?(e.consume(E),r.interrupt?t:w):n(E)}function g(E){const B="CDATA[";return E===B.charCodeAt(a++)?(e.consume(E),a===B.length?r.interrupt?t:O:g):n(E)}function m(E){return Dt(E)?(e.consume(E),s=String.fromCharCode(E),x):n(E)}function x(E){if(E===null||E===47||E===62||et(E)){const B=E===47,z=s.toLowerCase();return!B&&!o&&Ju.includes(z)?(i=1,r.interrupt?t(E):O(E)):ik.includes(s.toLowerCase())?(i=6,B?(e.consume(E),y):r.interrupt?t(E):O(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):o?k(E):v(E))}return E===45||It(E)?(e.consume(E),s+=String.fromCharCode(E),x):n(E)}function y(E){return E===62?(e.consume(E),r.interrupt?t:O):n(E)}function k(E){return De(E)?(e.consume(E),k):b(E)}function v(E){return E===47?(e.consume(E),b):E===58||E===95||Dt(E)?(e.consume(E),_):De(E)?(e.consume(E),v):b(E)}function _(E){return E===45||E===46||E===58||E===95||It(E)?(e.consume(E),_):S(E)}function S(E){return E===61?(e.consume(E),C):De(E)?(e.consume(E),S):v(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,M):De(E)?(e.consume(E),C):N(E)}function M(E){return E===l?(e.consume(E),l=null,I):E===null||xe(E)?n(E):(e.consume(E),M)}function N(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||et(E)?S(E):(e.consume(E),N)}function I(E){return E===47||E===62||De(E)?v(E):n(E)}function b(E){return E===62?(e.consume(E),R):n(E)}function R(E){return E===null||xe(E)?O(E):De(E)?(e.consume(E),R):n(E)}function O(E){return E===45&&i===2?(e.consume(E),re):E===60&&i===1?(e.consume(E),ne):E===62&&i===4?(e.consume(E),F):E===63&&i===3?(e.consume(E),w):E===93&&i===5?(e.consume(E),W):xe(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(sk,Y,D)(E)):E===null||xe(E)?(e.exit("htmlFlowData"),D(E)):(e.consume(E),O)}function D(E){return e.check(ak,$,Y)(E)}function $(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),U}function U(E){return E===null||xe(E)?D(E):(e.enter("htmlFlowData"),O(E))}function re(E){return E===45?(e.consume(E),w):O(E)}function ne(E){return E===47?(e.consume(E),s="",j):O(E)}function j(E){if(E===62){const B=s.toLowerCase();return Ju.includes(B)?(e.consume(E),F):O(E)}return Dt(E)&&s.length<8?(e.consume(E),s+=String.fromCharCode(E),j):O(E)}function W(E){return E===93?(e.consume(E),w):O(E)}function w(E){return E===62?(e.consume(E),F):E===45&&i===2?(e.consume(E),w):O(E)}function F(E){return E===null||xe(E)?(e.exit("htmlFlowData"),Y(E)):(e.consume(E),F)}function Y(E){return e.exit("htmlFlow"),t(E)}}function uk(e,t,n){const r=this;return i;function i(s){return xe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function dk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(yi,t,n)}}const fk={name:"htmlText",tokenize:hk};function hk(e,t,n){const r=this;let i,o,s;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),S):w===63?(e.consume(w),v):Dt(w)?(e.consume(w),N):n(w)}function c(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),o=0,g):Dt(w)?(e.consume(w),k):n(w)}function u(w){return w===45?(e.consume(w),p):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),f):xe(w)?(s=d,ne(w)):(e.consume(w),d)}function f(w){return w===45?(e.consume(w),p):d(w)}function p(w){return w===62?re(w):w===45?f(w):d(w)}function g(w){const F="CDATA[";return w===F.charCodeAt(o++)?(e.consume(w),o===F.length?m:g):n(w)}function m(w){return w===null?n(w):w===93?(e.consume(w),x):xe(w)?(s=m,ne(w)):(e.consume(w),m)}function x(w){return w===93?(e.consume(w),y):m(w)}function y(w){return w===62?re(w):w===93?(e.consume(w),y):m(w)}function k(w){return w===null||w===62?re(w):xe(w)?(s=k,ne(w)):(e.consume(w),k)}function v(w){return w===null?n(w):w===63?(e.consume(w),_):xe(w)?(s=v,ne(w)):(e.consume(w),v)}function _(w){return w===62?re(w):v(w)}function S(w){return Dt(w)?(e.consume(w),C):n(w)}function C(w){return w===45||It(w)?(e.consume(w),C):M(w)}function M(w){return xe(w)?(s=M,ne(w)):De(w)?(e.consume(w),M):re(w)}function N(w){return w===45||It(w)?(e.consume(w),N):w===47||w===62||et(w)?I(w):n(w)}function I(w){return w===47?(e.consume(w),re):w===58||w===95||Dt(w)?(e.consume(w),b):xe(w)?(s=I,ne(w)):De(w)?(e.consume(w),I):re(w)}function b(w){return w===45||w===46||w===58||w===95||It(w)?(e.consume(w),b):R(w)}function R(w){return w===61?(e.consume(w),O):xe(w)?(s=R,ne(w)):De(w)?(e.consume(w),R):I(w)}function O(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,D):xe(w)?(s=O,ne(w)):De(w)?(e.consume(w),O):(e.consume(w),$)}function D(w){return w===i?(e.consume(w),i=void 0,U):w===null?n(w):xe(w)?(s=D,ne(w)):(e.consume(w),D)}function $(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||et(w)?I(w):(e.consume(w),$)}function U(w){return w===47||w===62||et(w)?I(w):n(w)}function re(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function ne(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),j}function j(w){return De(w)?Be(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):W(w)}function W(w){return e.enter("htmlTextData"),s(w)}}const Rl={name:"labelEnd",resolveAll:bk,resolveTo:yk,tokenize:xk},pk={tokenize:wk},mk={tokenize:vk},gk={tokenize:Ek};function bk(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&&Gt(e,0,e.length,n),e}function yk(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",l,t],["enter",c,t]],a=Zt(a,e.slice(o+1,o+r+3)),a=Zt(a,[["enter",u,t]]),a=Zt(a,Io(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=Zt(a,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),a=Zt(a,e.slice(s+1)),a=Zt(a,[["exit",l,t]]),Gt(e,o,e.length,a),e}function xk(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(f){return o?o._inactive?d(f):(s=r.parser.defined.includes(rn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(pk,u,s?u:d)(f):f===91?e.attempt(mk,u,s?c:d)(f):s?u(f):d(f)}function c(f){return e.attempt(gk,u,d)(f)}function u(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function wk(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 et(d)?Jr(e,o)(d):o(d)}function o(d){return d===41?u(d):Op(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return et(d)?Jr(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Dp(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return et(d)?Jr(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 vk(e,t,n){const r=this;return i;function i(a){return Pp.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(rn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function Ek(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const kk={name:"labelStartImage",resolveAll:Rl.resolveAll,tokenize:Sk};function Sk(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ck={name:"labelStartLink",resolveAll:Rl.resolveAll,tokenize:_k};function _k(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const vs={name:"lineEnding",tokenize:Tk};function Tk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Be(e,t,"linePrefix")}}const no={name:"thematicBreak",tokenize:Nk};function Nk(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,a(c)}function a(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||xe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),De(c)?Be(e,a,"whitespace")(c):a(c))}}const jt={continuation:{tokenize:Ik},exit:Pk,name:"list",tokenize:Mk},Ak={partial:!0,tokenize:Dk},Rk={partial:!0,tokenize:Ok};function Mk(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Ca(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(no,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return Ca(p)&&++s<10?(e.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(yi,r.interrupt?n:u,e.attempt(Ak,f,d))}function u(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return De(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Ik(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(yi,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!De(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Rk,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Be(e,e.attempt(jt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Ok(e,t,n){const r=this;return Be(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Pk(e){e.exit(this.containerState.type)}function Dk(e,t,n){const r=this;return Be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!De(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const ed={name:"setextUnderline",resolveTo:Lk,tokenize:Fk};function Lk(e,t){let n=e.length,r,i,o;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),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Fk(e,t,n){const r=this;let i;return o;function o(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,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),De(c)?Be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||xe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Bk={tokenize:jk};function jk(e){const t=this,n=e.attempt(yi,r,e.attempt(this.parser.constructs.flowInitial,i,Be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(HE,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $k={resolveAll:Fp()},Vk=Lp("string"),zk=Lp("text");function Lp(e){return{resolveAll:Fp(e==="text"?Uk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(u){return c(u)?o(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"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=i[u];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Fp(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Uk(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 o=i.length,s=-1,a=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const c={type:n===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,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 Hk={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:Ap},Wk={91:YE},Gk={[-2]:ws,[-1]:ws,32:ws},Kk={35:tk,42:no,45:[ed,no],60:ok,61:ed,95:no,96:Qu,126:Qu},qk={38:Mp,92:Rp},Yk={[-5]:vs,[-4]:vs,[-3]:vs,33:kk,38:Mp,42:_a,60:[CE,fk],91:Ck,92:[JE,Rp],93:Rl,95:_a,96:BE},Zk={null:[_a,$k]},Xk={null:[42,95]},Qk={null:[]},Jk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Xk,contentInitial:Wk,disable:Qk,document:Hk,flow:Kk,flowInitial:Gk,insideSpan:Zk,string:qk,text:Yk},Symbol.toStringTag,{value:"Module"}));function eS(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={},o=[];let s=[],a=[];const l={attempt:M(S),check:M(C),consume:k,enter:v,exit:_,interrupt:M(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(R){return s=Zt(s,R),x(),s[s.length-1]!==null?[]:(N(t,0),c.events=Io(o,c.events,c),c.events)}function f(R,O){return nS(p(R),O)}function p(R){return tS(s,R)}function g(){const{_bufferIndex:R,_index:O,line:D,column:$,offset:U}=r;return{_bufferIndex:R,_index:O,line:D,column:$,offset:U}}function m(R){i[R.line]=R.column,b()}function x(){let R;for(;r._index<s.length;){const O=s[r._index];if(typeof O=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<O.length;)y(O.charCodeAt(r._bufferIndex));else y(O)}}function y(R){u=u(R)}function k(R){xe(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,b()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=R}function v(R,O){const D=O||{};return D.type=R,D.start=g(),c.events.push(["enter",D,c]),a.push(D),D}function _(R){const O=a.pop();return O.end=g(),c.events.push(["exit",O,c]),O}function S(R,O){N(R,O.from)}function C(R,O){O.restore()}function M(R,O){return D;function D($,U,re){let ne,j,W,w;return Array.isArray($)?Y($):"tokenize"in $?Y([$]):F($);function F(K){return q;function q(me){const Q=me!==null&&K[me],le=me!==null&&K.null,he=[...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(le)?le:le?[le]:[]];return Y(he)(me)}}function Y(K){return ne=K,j=0,K.length===0?re:E(K[j])}function E(K){return q;function q(me){return w=I(),W=K,K.partial||(c.currentConstruct=K),K.name&&c.parser.constructs.disable.null.includes(K.name)?z():K.tokenize.call(O?Object.assign(Object.create(c),O):c,l,B,z)(me)}}function B(K){return R(W,w),U}function z(K){return w.restore(),++j<ne.length?E(ne[j]):re}}}function N(R,O){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Gt(c.events,O,c.events.length-O,R.resolve(c.events.slice(O),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function I(){const R=g(),O=c.previous,D=c.currentConstruct,$=c.events.length,U=Array.from(a);return{from:$,restore:re};function re(){r=R,c.previous=O,c.currentConstruct=D,c.events.length=$,a=U,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function nS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
31
+ `;break}case-3:{s=`\r
32
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function rS(e){const r={constructs:Tp([Jk,...(e||{}).extensions||[]]),content:i(yE),defined:[],document:i(wE),flow:i(Bk),lazy:{},string:i(Vk),text:i(zk)};return r;function i(o){return s;function s(a){return eS(r,o,a)}}}function iS(e){for(;!Ip(e););return e}const td=/[\0\t\n\r]/g;function oS(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const l=[];let c,u,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(td.lastIndex=d,c=td.exec(o),f=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(f),!c){t=o.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),p){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=f+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const sS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aS(e){return e.replace(sS,lS)}function lS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Np(n.slice(o?2:1),o?16:10)}return Al(n)||e}const Bp={}.hasOwnProperty;function cS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),uS(n)(iS(rS(n).document().write(oS()(e,t,!0))))}function uS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ne),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(te),blockQuote:o(le),characterEscape:I,characterReference:I,codeFenced:o(he),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(he,s),codeText:o(G,s),codeTextData:I,data:I,codeFlowValue:I,definition:o(Se),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Z),hardBreakEscape:o(ye),hardBreakTrailing:o(ye),htmlFlow:o(ae,s),htmlFlowData:I,htmlText:o(ae,s),htmlTextData:I,image:o(ve),label:s,link:o(Ne),listItem:o(Ce),listItemValue:f,listOrdered:o(_e,d),listUnordered:o(_e),paragraph:o(bt),reference:E,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(te),strong:o(vt),thematicBreak:o(ut)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:Q,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:K,characterReference:q,codeFenced:l(x),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:b,codeIndented:l(y),codeText:l(U),codeTextData:b,data:b,definition:l(),definitionDestinationString:_,definitionLabelString:k,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(D),htmlFlowData:b,htmlText:l($),htmlTextData:b,image:l(ne),label:W,labelText:j,lineEnding:R,link:l(re),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:w,resourceTitleString:F,resource:Y,setextHeading:l(N),setextHeadingLineSequence:M,setextHeadingText:C,strong:l(),thematicBreak:l()}};jp(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let J={type:"root",children:[]};const we={stack:[J],tokenStack:[],config:t,enter:a,exit:c,buffer:s,resume:u,data:n},Re=[];let $e=-1;for(;++$e<L.length;)if(L[$e][1].type==="listOrdered"||L[$e][1].type==="listUnordered")if(L[$e][0]==="enter")Re.push($e);else{const _t=Re.pop();$e=i(L,_t,$e)}for($e=-1;++$e<L.length;){const _t=t[L[$e][0]];Bp.call(_t,L[$e][1].type)&&_t[L[$e][1].type].call(Object.assign({sliceSerialize:L[$e][2].sliceSerialize},we),L[$e][1])}if(we.tokenStack.length>0){const _t=we.tokenStack[we.tokenStack.length-1];(_t[1]||nd).call(we,void 0,_t[0])}for(J.position={start:Tn(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:Tn(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)J=t.transforms[$e](J)||J;return J}function i(L,J,we){let Re=J-1,$e=-1,_t=!1,Ft,Bt,oe,tt;for(;++Re<=we;){const Fe=L[Re];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?$e++:$e--,tt=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(Ft&&!tt&&!$e&&!oe&&(oe=Re),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!$e&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||$e===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(Ft){let Ge=Re;for(Bt=void 0;Ge--;){const At=L[Ge];if(At[1].type==="lineEnding"||At[1].type==="lineEndingBlank"){if(At[0]==="exit")continue;Bt&&(L[Bt][1].type="lineEndingBlank",_t=!0),At[1].type="lineEnding",Bt=Ge}else if(!(At[1].type==="linePrefix"||At[1].type==="blockQuotePrefix"||At[1].type==="blockQuotePrefixWhitespace"||At[1].type==="blockQuoteMarker"||At[1].type==="listItemIndent"))break}oe&&(!Bt||oe<Bt)&&(Ft._spread=!0),Ft.end=Object.assign({},Bt?L[Bt][1].start:Fe[1].end),L.splice(Bt||Re,0,["exit",Ft,Fe[2]]),Re++,we++}if(Fe[1].type==="listItemPrefix"){const Ge={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};Ft=Ge,L.splice(Re,0,["enter",Ge,Fe[2]]),Re++,we++,oe=void 0,tt=!0}}}return L[J][1]._spread=_t,we}function o(L,J){return we;function we(Re){a.call(this,L(Re),Re),J&&J.call(this,Re)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(L,J,we){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([J,we||void 0]),L.position={start:Tn(J.start),end:void 0}}function l(L){return J;function J(we){L&&L.call(this,we),c.call(this,we)}}function c(L,J){const we=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==L.type&&(J?J.call(this,L,Re[0]):(Re[1]||nd).call(this,L,Re[0]));else throw new Error("Cannot close `"+L.type+"` ("+Qr({start:L.start,end:L.end})+"): it’s not open");we.position.end=Tn(L.end)}function u(){return Nl(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(L){if(this.data.expectingFirstListItemValue){const J=this.stack[this.stack.length-2];J.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),J=this.stack[this.stack.length-1];J.lang=L}function g(){const L=this.resume(),J=this.stack[this.stack.length-1];J.meta=L}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const L=this.resume(),J=this.stack[this.stack.length-1];J.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const L=this.resume(),J=this.stack[this.stack.length-1];J.value=L.replace(/(\r?\n|\r)$/g,"")}function k(L){const J=this.resume(),we=this.stack[this.stack.length-1];we.label=J,we.identifier=rn(this.sliceSerialize(L)).toLowerCase()}function v(){const L=this.resume(),J=this.stack[this.stack.length-1];J.title=L}function _(){const L=this.resume(),J=this.stack[this.stack.length-1];J.url=L}function S(L){const J=this.stack[this.stack.length-1];if(!J.depth){const we=this.sliceSerialize(L).length;J.depth=we}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function M(L){const J=this.stack[this.stack.length-1];J.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function I(L){const we=this.stack[this.stack.length-1].children;let Re=we[we.length-1];(!Re||Re.type!=="text")&&(Re=je(),Re.position={start:Tn(L.start),end:void 0},we.push(Re)),this.stack.push(Re)}function b(L){const J=this.stack.pop();J.value+=this.sliceSerialize(L),J.position.end=Tn(L.end)}function R(L){const J=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=J.children[J.children.length-1];we.position.end=Tn(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(J.type)&&(I.call(this,L),b.call(this,L))}function O(){this.data.atHardBreak=!0}function D(){const L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function $(){const L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function U(){const L=this.resume(),J=this.stack[this.stack.length-1];J.value=L}function re(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const J=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=J,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function ne(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const J=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=J,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function j(L){const J=this.sliceSerialize(L),we=this.stack[this.stack.length-2];we.label=aS(J),we.identifier=rn(J).toLowerCase()}function W(){const L=this.stack[this.stack.length-1],J=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Re=L.children;we.children=Re}else we.alt=J}function w(){const L=this.resume(),J=this.stack[this.stack.length-1];J.url=L}function F(){const L=this.resume(),J=this.stack[this.stack.length-1];J.title=L}function Y(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function B(L){const J=this.resume(),we=this.stack[this.stack.length-1];we.label=J,we.identifier=rn(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function z(L){this.data.characterReferenceType=L.type}function K(L){const J=this.sliceSerialize(L),we=this.data.characterReferenceType;let Re;we?(Re=Np(J,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Al(J);const $e=this.stack[this.stack.length-1];$e.value+=Re}function q(L){const J=this.stack.pop();J.position.end=Tn(L.end)}function me(L){b.call(this,L);const J=this.stack[this.stack.length-1];J.url=this.sliceSerialize(L)}function Q(L){b.call(this,L);const J=this.stack[this.stack.length-1];J.url="mailto:"+this.sliceSerialize(L)}function le(){return{type:"blockquote",children:[]}}function he(){return{type:"code",lang:null,meta:null,value:""}}function G(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Z(){return{type:"emphasis",children:[]}}function te(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function ae(){return{type:"html",value:""}}function ve(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function _e(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function Ce(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function bt(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function je(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function Tn(e){return{line:e.line,column:e.column,offset:e.offset}}function jp(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jp(e,r):dS(e,r)}}function dS(e,t){let n;for(n in t)if(Bp.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 nd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qr({start:t.start,end:t.end})+") is still open")}function fS(e){const t=this;t.parser=n;function n(r){return cS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function hS(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 pS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
33
+ `}]}function mS(e,t){const n=t.value?t.value+`
34
+ `:"",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 gS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Dr(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+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(s)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function xS(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 wS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function $p(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),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function vS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $p(e,t);const i={src:Dr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function ES(e,t){const n={src:Dr(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 kS(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 SS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return $p(e,t);const i={href:Dr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function CS(e,t){const n={href:Dr(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 _S(e,t,n){const r=e.all(t),i=n?TS(n):Vp(t),o={},s=[];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:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
35
+ `}),u.type==="element"&&u.tagName==="p"&&!i?s.push(...u.children):s.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
36
+ `});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function TS(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=Vp(n[r])}return t}function Vp(e){const t=e.spread;return t??e.children.length>1}function NS(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function AS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function MS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Sl(t.children[1]),l=wp(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function OS(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const c=[];for(;++l<a;){const d=t.children[l],f={},p=s?s[l]:void 0;p&&(f.align=p);let g={type:"element",tagName:o,properties:f,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 PS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const rd=9,id=32;function DS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(od(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(od(t.slice(i),i>0,!1)),o.join("")}function od(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===rd||o===id;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===rd||o===id;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function LS(e,t){const n={type:"text",value:DS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BS={blockquote:hS,break:pS,code:mS,delete:gS,emphasis:bS,footnoteReference:yS,heading:xS,html:wS,imageReference:vS,image:ES,inlineCode:kS,linkReference:SS,link:CS,listItem:_S,list:NS,paragraph:AS,root:RS,strong:MS,table:IS,tableCell:PS,tableRow:OS,text:LS,thematicBreak:FS,toml:Li,yaml:Li,definition:Li,footnoteDefinition:Li};function Li(){}const zp=-1,Oo=0,ei=1,mo=2,Ml=3,Il=4,Ol=5,Pl=6,Up=7,Hp=8,sd=typeof self=="object"?self:globalThis,jS=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Oo:case zp:return n(s,i);case ei:{const a=n([],i);for(const l of s)a.push(r(l));return a}case mo:{const a=n({},i);for(const[l,c]of s)a[r(l)]=r(c);return a}case Ml:return n(new Date(s),i);case Il:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case Ol:{const a=n(new Map,i);for(const[l,c]of s)a.set(r(l),r(c));return a}case Pl:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case Up:{const{name:a,message:l}=s;return n(new sd[a](l),i)}case Hp:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new sd[o](s),i)};return r},ad=e=>jS(new Map,e)(0),or="",{toString:$S}={},{keys:VS}=Object,zr=e=>{const t=typeof e;if(t!=="object"||!e)return[Oo,t];const n=$S.call(e).slice(8,-1);switch(n){case"Array":return[ei,or];case"Object":return[mo,or];case"Date":return[Ml,or];case"RegExp":return[Il,or];case"Map":return[Ol,or];case"Set":return[Pl,or];case"DataView":return[ei,n]}return n.includes("Array")?[ei,n]:n.includes("Error")?[Up,n]:[mo,n]},Fi=([e,t])=>e===Oo&&(t==="function"||t==="symbol"),zS=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=zr(s);switch(a){case Oo:{let u=s;switch(l){case"bigint":a=Hp,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([zp],s)}return i([a,u],s)}case ei:{if(l){let f=s;return l==="DataView"?f=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(s)),i([l,[...f]],s)}const u=[],d=i([a,u],s);for(const f of s)u.push(o(f));return d}case mo:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const u=[],d=i([a,u],s);for(const f of VS(s))(e||!Fi(zr(s[f])))&&u.push([o(f),o(s[f])]);return d}case Ml:return i([a,s.toISOString()],s);case Il:{const{source:u,flags:d}=s;return i([a,{source:u,flags:d}],s)}case Ol:{const u=[],d=i([a,u],s);for(const[f,p]of s)(e||!(Fi(zr(f))||Fi(zr(p))))&&u.push([o(f),o(p)]);return d}case Pl:{const u=[],d=i([a,u],s);for(const f of s)(e||!Fi(zr(f)))&&u.push(o(f));return d}}const{message:c}=s;return i([a,{name:l,message:c}],s)};return o},ld=(e,{json:t,lossy:n}={})=>{const r=[];return zS(!(t||n),!!t,new Map,r)(e),r},go=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ad(ld(e,t)):structuredClone(e):(e,t)=>ad(ld(e,t));function US(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 HS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function WS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||US,r=e.options.footnoteBackLabel||HS,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=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(),f=Dr(d.toLowerCase());let p=0;const g=[],m=e.footnoteCounts.get(d);for(;m!==void 0&&++p<=m;){g.length>0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(l,p);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const x=u[u.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const k=x.children[x.children.length-1];k&&k.type==="text"?k.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else u.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...go(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
37
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
38
+ `}]}}const xi=function(e){if(e==null)return YS;if(typeof e=="function")return Po(e);if(typeof e=="object")return Array.isArray(e)?GS(e):KS(e);if(typeof e=="string")return qS(e);throw new Error("Expected function, string, or object as test")};function GS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xi(e[n]);return Po(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function KS(e){const t=e;return Po(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function qS(e){return Po(t);function t(n){return n&&n.type===e}}function Po(e){return t;function t(n,r,i){return!!(ZS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function YS(){return!0}function ZS(e){return e!==null&&typeof e=="object"&&"type"in e}const Wp=[],XS=!0,Ta=!1,QS="skip";function Gp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=xi(i),s=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 p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Wp,g,m,x;if((!t||o(l,c,u[u.length-1]||void 0))&&(p=JS(n(l,u)),p[0]===Ta))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==QS)for(m=(r?y.children.length:-1)+s,x=u.concat(y);m>-1&&m<y.children.length;){const k=y.children[m];if(g=a(k,m,x)(),g[0]===Ta)return g;m=typeof g[1]=="number"?g[1]:m+s}}return p}}}function JS(e){return Array.isArray(e)?e:typeof e=="number"?[XS,e]:e==null?Wp:[e]}function Do(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Gp(e,o,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return s(l,d,u)}}const Na={}.hasOwnProperty,eC={};function tC(e,t){const n=t||eC,r=new Map,i=new Map,o=new Map,s={...BS,...n.handlers},a={all:c,applyData:rC,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:n,patch:nC,wrap:oC};return Do(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const d=u.type==="definition"?r:i,f=String(u.identifier).toUpperCase();d.has(f)||d.set(f,u)}}),a;function l(u,d){const f=u.type,p=a.handlers[f];if(Na.call(a.handlers,f)&&p)return p(a,u,d);if(a.options.passThrough&&a.options.passThrough.includes(f)){if("children"in u){const{children:m,...x}=u,y=go(x);return y.children=a.all(u),y}return go(u)}return(a.options.unknownHandler||iC)(a,u,d)}function c(u){const d=[];if("children"in u){const f=u.children;let p=-1;for(;++p<f.length;){const g=a.one(f[p],u);if(g){if(p&&f[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=cd(g.value)),!Array.isArray(g)&&g.type==="element")){const m=g.children[0];m&&m.type==="text"&&(m.value=cd(m.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function nC(e,t){e.position&&(t.position=Hv(e))}function rC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,go(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function iC(e,t){const n=t.data||{},r="value"in t&&!(Na.call(n,"hProperties")||Na.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 oC(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
39
+ `});++r<e.length;)r&&n.push({type:"text",value:`
40
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
41
+ `}),n}function cd(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ud(e,t){const n=tC(e,t),r=n.one(e,void 0),i=WS(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
42
+ `},i),o}function sC(e,t){return e&&"run"in e?async function(n,r){const i=ud(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ud(n,{file:r,...e||t})}}function dd(e){if(e)throw e}var Es,fd;function aC(){if(fd)return Es;fd=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]"},o=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 f;for(f in c);return typeof f>"u"||e.call(c,f)},s=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 Es=function l(){var c,u,d,f,p,g,m=arguments[0],x=1,y=arguments.length,k=!1;for(typeof m=="boolean"&&(k=m,m=arguments[1]||{},x=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});x<y;++x)if(c=arguments[x],c!=null)for(u in c)d=a(m,u),f=a(c,u),m!==f&&(k&&f&&(o(f)||(p=i(f)))?(p?(p=!1,g=d&&i(d)?d:[]):g=d&&o(d)?d:{},s(m,{name:u,newValue:l(k,g,f)})):typeof f<"u"&&s(m,{name:u,newValue:f}));return m},Es}var lC=aC();const ks=Ro(lC);function Aa(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 cC(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...c){const u=e[++o];let d=-1;if(l){s(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?uC(u,a)(...c):s(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 uC(e,t){let n;return r;function r(...s){const a=e.length>s.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const cn={basename:dC,dirname:fC,extname:hC,join:pC,sep:"/"};function dC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wi(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function fC(e){if(wi(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 hC(e){wi(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function pC(...e){let t=-1,n;for(;++t<e.length;)wi(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":mC(n)}function mC(e){wi(e);const t=e.codePointAt(0)===47;let n=gC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function gC(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===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=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bC={cwd:yC};function yC(){return"/"}function Ra(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function xC(e){if(typeof e=="string")e=new URL(e);else if(!Ra(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 wC(e)}function wC(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 Ss=["history","path","basename","stem","extname","dirname"];class Kp{constructor(t){let n;t?Ra(t)?n={path:t}:typeof t=="string"||vC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":bC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ss.length;){const o=Ss[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Ss.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?cn.basename(this.path):void 0}set basename(t){_s(t,"basename"),Cs(t,"basename"),this.path=cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?cn.dirname(this.path):void 0}set dirname(t){hd(this.basename,"dirname"),this.path=cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?cn.extname(this.path):void 0}set extname(t){if(Cs(t,"extname"),hd(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=cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ra(t)&&(t=xC(t)),_s(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?cn.basename(this.path,this.extname):void 0}set stem(t){_s(t,"stem"),Cs(t,"stem"),this.path=cn.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 Ot(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 Cs(e,t){if(e&&e.includes(cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+cn.sep+"`")}function _s(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function vC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const EC=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},kC={}.hasOwnProperty;class Dl extends EC{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=cC()}copy(){const t=new Dl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ks(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(As("data",this.frozen),this.namespace[t]=n,this):kC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(As("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=Bi(t),r=this.parser||this.Parser;return Ts("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ts("process",this.parser||this.Parser),Ns("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=Bi(t),l=r.parse(a);r.run(l,a,function(u,d,f){if(u||!d||!f)return c(u);const p=d,g=r.stringify(p,f);_C(g)?f.value=g:f.result=g,c(u,f)});function c(u,d){u||!d?s(u):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Ts("processSync",this.parser||this.Parser),Ns("processSync",this.compiler||this.Compiler),this.process(t,i),md("processSync","process",n),r;function i(o,s){n=!0,dd(o),r=s}}run(t,n,r){pd(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const l=Bi(n);i.run(t,l,c);function c(u,d,f){const p=d||t;u?a(u):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),md("runSync","run",r),i;function o(s,a){dd(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=Bi(n),i=this.compiler||this.Compiler;return Ns("stringify",i),pd(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(As("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(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=ks(!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];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...g]=u;const m=r[f][1];Aa(m)&&Aa(p)&&(p=ks(!0,m,p)),r[f]=[c,p,...g]}}}}const SC=new Dl().freeze();function Ts(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ns(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function As(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 pd(e){if(!Aa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function md(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Bi(e){return CC(e)?e:new Kp(e)}function CC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _C(e){return typeof e=="string"||TC(e)}function TC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gd=[],bd={allowDangerousHtml:!0},AC=/^(https?|ircs?|mailto|xmpp)$/i,RC=[{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 MC(e){const t=IC(e),n=OC(e);return PC(t.runSync(t.parse(n),n),e)}function IC(e){const t=e.rehypePlugins||gd,n=e.remarkPlugins||gd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bd}:bd;return SC().use(fS).use(n).use(sC,r).use(t)}function OC(e){const t=e.children||"",n=new Kp;return typeof t=="string"&&(n.value=t),n}function PC(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||DC;for(const u of RC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+NC+u.id,void 0);return Do(e,c),Yv(e,{Fragment:h.Fragment,components:i,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function c(u,d,f){if(u.type==="raw"&&f&&typeof d=="number")return s?f.children.splice(d,1):f.children[d]={type:"text",value:u.value},d;if(u.type==="element"){let p;for(p in xs)if(Object.hasOwn(xs,p)&&Object.hasOwn(u.properties,p)){const g=u.properties[p],m=xs[p];(m===null||m.includes(u.tagName))&&(u.properties[p]=l(String(g||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):o?o.includes(u.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(u,d,f)),p&&f&&typeof d=="number")return a&&u.children?f.children.splice(d,1,...u.children):f.children.splice(d,1),d}}}function DC(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||AC.test(e.slice(0,t))?e:""}function yd(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 LC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FC(e,t,n){const i=xi((n||{}).ignore||[]),o=BC(t);let s=-1;for(;++s<o.length;)Gp(e,"text",a);function a(c,u){let d=-1,f;for(;++d<u.length;){const p=u[d],g=f?f.children:void 0;if(i(p,g?g.indexOf(p):void 0,f))return;f=p}if(f)return l(c,u)}function l(c,u){const d=u[u.length-1],f=o[s][0],p=o[s][1];let g=0;const x=d.children.indexOf(c);let y=!1,k=[];f.lastIndex=0;let v=f.exec(c.value);for(;v;){const _=v.index,S={index:v.index,input:v.input,stack:[...u,c]};let C=p(...v,S);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?f.lastIndex=_+1:(g!==_&&k.push({type:"text",value:c.value.slice(g,_)}),Array.isArray(C)?k.push(...C):C&&k.push(C),g=_+v[0].length,y=!0),!f.global)break;v=f.exec(c.value)}return y?(g<c.value.length&&k.push({type:"text",value:c.value.slice(g)}),d.children.splice(x,1,...k)):k=[c],x+k.length}}function BC(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([jC(i[0]),$C(i[1])])}return t}function jC(e){return typeof e=="string"?new RegExp(LC(e),"g"):e}function $C(e){return typeof e=="function"?e:function(){return e}}const Rs="phrasing",Ms=["autolink","link","image","label"];function VC(){return{transforms:[qC],enter:{literalAutolink:UC,literalAutolinkEmail:Is,literalAutolinkHttp:Is,literalAutolinkWww:Is},exit:{literalAutolink:KC,literalAutolinkEmail:GC,literalAutolinkHttp:HC,literalAutolinkWww:WC}}}function zC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rs,notInConstruct:Ms},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rs,notInConstruct:Ms},{character:":",before:"[ps]",after:"\\/",inConstruct:Rs,notInConstruct:Ms}]}}function UC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Is(e){this.config.enter.autolinkProtocol.call(this,e)}function HC(e){this.config.exit.autolinkProtocol.call(this,e)}function WC(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 GC(e){this.config.exit.autolinkEmail.call(this,e)}function KC(e){this.exit(e)}function qC(e){FC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ZC]],{ignore:["link","linkReference"]})}function YC(e,t,n,r,i){let o="";if(!qp(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!XC(n)))return!1;const s=QC(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function ZC(e,t,n,r){return!qp(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function XC(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 QC(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=yd(e,"(");let o=yd(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function qp(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Zn(n)||Mo(n))&&(!t||n!==47)}Yp.peek=a_;function JC(){this.buffer()}function e_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function t_(){this.buffer()}function n_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function r_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function i_(e){this.exit(e)}function o_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function s_(e){this.exit(e)}function a_(){return"["}function Yp(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function l_(){return{enter:{gfmFootnoteCallString:JC,gfmFootnoteCall:e_,gfmFootnoteDefinitionLabelString:t_,gfmFootnoteDefinition:n_},exit:{gfmFootnoteCallString:r_,gfmFootnoteCall:i_,gfmFootnoteDefinitionLabelString:o_,gfmFootnoteDefinition:s_}}}function c_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const a=o.createTracker(s);let l=a.move("[^");const c=o.enter("footnoteDefinition"),u=o.enter("label");return l+=a.move(o.safe(o.associationId(r),{before:l,after:"]"})),u(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((t?`
43
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?Zp:u_))),c(),l}}function u_(e,t,n){return t===0?e:Zp(e,t,n)}function Zp(e,t,n){return(n?"":" ")+e}const d_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Xp.peek=g_;function f_(){return{canContainEols:["delete"],enter:{strikethrough:p_},exit:{strikethrough:m_}}}function h_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:d_}],handlers:{delete:Xp}}}function p_(e){this.enter({type:"delete",children:[]},e)}function m_(e){this.exit(e)}function Xp(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function g_(){return"~"}function b_(e){return e.length}function y_(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||b_,o=[],s=[],a=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],x=[];let y=-1;for(e[u].length>c&&(c=e[u].length);++y<e[u].length;){const k=x_(e[u][y]);if(n.alignDelimiters!==!1){const v=i(k);x[y]=v,(l[y]===void 0||v>l[y])&&(l[y]=v)}m.push(k)}s[u]=m,a[u]=x}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)o[d]=xd(r[d]);else{const m=xd(r);for(;++d<c;)o[d]=m}d=-1;const f=[],p=[];for(;++d<c;){const m=o[d];let x="",y="";m===99?(x=":",y=":"):m===108?x=":":m===114&&(y=":");let k=n.alignDelimiters===!1?1:Math.max(1,l[d]-x.length-y.length);const v=x+"-".repeat(k)+y;n.alignDelimiters!==!1&&(k=x.length+k+y.length,k>l[d]&&(l[d]=k),p[d]=k),f[d]=v}s.splice(1,0,f),a.splice(1,0,p),u=-1;const g=[];for(;++u<s.length;){const m=s[u],x=a[u];d=-1;const y=[];for(;++d<c;){const k=m[d]||"";let v="",_="";if(n.alignDelimiters!==!1){const S=l[d]-(x[d]||0),C=o[d];C===114?v=" ".repeat(S):C===99?S%2?(v=" ".repeat(S/2+.5),_=" ".repeat(S/2-.5)):(v=" ".repeat(S/2),_=v):_=" ".repeat(S)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(v),y.push(k),n.alignDelimiters!==!1&&y.push(_),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
44
+ `)}function x_(e){return e==null?"":String(e)}function xd(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 w_(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),v_);return i(),s}function v_(e,t,n){return">"+(n?"":" ")+e}function E_(e,t){return wd(e,t.inConstruct,!0)&&!wd(e,t.notInConstruct,!1)}function wd(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 vd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
45
+ `&&E_(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
46
+ `}function k_(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function S_(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 C_(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 __(e,t,n,r){const i=C_(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(S_(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(o,T_);return d(),f}const a=n.createTracker(r),l=i.repeat(Math.max(k_(o,i)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(e.lang){const d=n.enter(`codeFencedLang${s}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:`
47
+ `,encode:["`"],...a.current()})),d()}return u+=a.move(`
48
+ `),o&&(u+=a.move(o+`
49
+ `)),u+=a.move(l),c(),u}function T_(e,t,n){return(n?"":" ")+e}function Ll(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 N_(e,t,n,r){const i=Ll(n),o=i==='"'?"Quote":"Apostrophe",s=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?" ":`
50
+ `,...l.current()}))),a(),e.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),s(),c}function A_(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 di(e){return"&#x"+e.toString(16).toUpperCase()+";"}function bo(e,t,n){const r=_r(e),i=_r(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}}Qp.peek=R_;function Qp(e,t,n,r){const i=A_(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const c=l.charCodeAt(0),u=bo(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=di(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=bo(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+di(d));const p=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},a+l+p}function R_(e,t,n){return n.options.emphasis||"*"}function M_(e,t){let n=!1;return Do(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ta}),!!((!e.depth||e.depth<3)&&Nl(e)&&(t.options.setext||n))}function I_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(M_(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...o.current(),before:`
51
+ `,after:`
52
+ `});return d(),u(),f+`
53
+ `+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
54
+ `))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
55
+ `,...o.current()});return/^[\t ]/.test(c)&&(c=di(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),l(),a(),c}Jp.peek=O_;function Jp(e){return e.value||""}function O_(){return"<"}em.peek=P_;function em(e,t,n,r){const i=Ll(n),o=i==='"'?"Quote":"Apostrophe",s=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${o}`),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(")"),s(),c}function P_(){return"!"}tm.peek=D_;function tm(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=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+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function D_(){return"!"}nm.peek=L_;function nm(e,t,n){let r=e.value||"",i="`",o=-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+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let l;if(s.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 L_(){return"`"}function rm(e,t){const n=Nl(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))}im.peek=F_;function im(e,t,n,r){const i=Ll(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,l;if(rm(e,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),a(),c}function F_(e,t,n){return rm(e,n)?"<":"["}om.peek=B_;function om(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=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+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...a.current()});return s(),n.stack=u,o(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function B_(){return"["}function Fl(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 j_(e){const t=Fl(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 $_(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 sm(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 V_(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?$_(n):Fl(n);const a=e.ordered?s==="."?")":".":j_(n);let l=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&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),sm(n)===s&&u){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c}function z_(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 U_(e,t,n,r){const i=z_(n);let o=n.bulletCurrent||Fl(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,a.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function H_(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const W_=xi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function G_(e,t,n,r){return(e.children.some(function(s){return W_(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function K_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}am.peek=q_;function am(e,t,n,r){const i=K_(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let l=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const c=l.charCodeAt(0),u=bo(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=di(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=bo(r.after.charCodeAt(0),d,i);f.inside&&(l=l.slice(0,-1)+di(d));const p=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},a+l+p}function q_(e,t,n){return n.options.strong||"*"}function Y_(e,t,n,r){return n.safe(e.value,r)}function Z_(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 X_(e,t,n){const r=(sm(n)+(n.options.ruleSpaces?" ":"")).repeat(Z_(n));return n.options.ruleSpaces?r.slice(0,-1):r}const lm={blockquote:w_,break:vd,code:__,definition:N_,emphasis:Qp,hardBreak:vd,heading:I_,html:Jp,image:em,imageReference:tm,inlineCode:nm,link:im,linkReference:om,list:V_,listItem:U_,paragraph:H_,root:G_,strong:am,text:Y_,thematicBreak:X_};function Q_(){return{enter:{table:J_,tableData:Ed,tableHeader:Ed,tableRow:tT},exit:{codeText:nT,table:eT,tableData:Os,tableHeader:Os,tableRow:Os}}}function J_(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 eT(e){this.exit(e),this.data.inTable=void 0}function tT(e){this.enter({type:"tableRow",children:[]},e)}function Os(e){this.exit(e)}function Ed(e){this.enter({type:"tableCell",children:[]},e)}function nT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function rT(e,t){return t==="|"?t:e}function iT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
56
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:l,tableRow:a}};function s(p,g,m,x){return c(u(p,m,x),p.align)}function a(p,g,m,x){const y=d(p,m,x),k=c([y]);return k.slice(0,k.indexOf(`
57
+ `))}function l(p,g,m,x){const y=m.enter("tableCell"),k=m.enter("phrasing"),v=m.containerPhrasing(p,{...x,before:o,after:o});return k(),y(),v}function c(p,g){return y_(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function u(p,g,m){const x=p.children;let y=-1;const k=[],v=g.enter("table");for(;++y<x.length;)k[y]=d(x[y],g,m);return v(),k}function d(p,g,m){const x=p.children;let y=-1;const k=[],v=g.enter("tableRow");for(;++y<x.length;)k[y]=l(x[y],p,g,m);return v(),k}function f(p,g,m){let x=lm.inlineCode(p,g,m);return m.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function oT(){return{exit:{taskListCheckValueChecked:kd,taskListCheckValueUnchecked:kd,paragraph:aT}}}function sT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:lT}}}function kd(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function aT(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 o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===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 lT(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let l=lm.listItem(e,t,n,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function cT(){return[VC(),l_(),f_(),Q_(),oT()]}function uT(e){return{extensions:[zC(),c_(e),h_(),iT(e),sT()]}}const dT={tokenize:bT,partial:!0},cm={tokenize:yT,partial:!0},um={tokenize:xT,partial:!0},dm={tokenize:wT,partial:!0},fT={tokenize:vT,partial:!0},fm={name:"wwwAutolink",tokenize:mT,previous:pm},hm={name:"protocolAutolink",tokenize:gT,previous:mm},kn={name:"emailAutolink",tokenize:pT,previous:gm},fn={};function hT(){return{text:fn}}let Vn=48;for(;Vn<123;)fn[Vn]=kn,Vn++,Vn===58?Vn=65:Vn===91&&(Vn=97);fn[43]=kn;fn[45]=kn;fn[46]=kn;fn[95]=kn;fn[72]=[kn,hm];fn[104]=[kn,hm];fn[87]=[kn,fm];fn[119]=[kn,fm];function pT(e,t,n){const r=this;let i,o;return s;function s(d){return!Ma(d)||!gm.call(r,r.previous)||Bl(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return Ma(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(fT,u,c)(d):d===45||d===95||It(d)?(o=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),i=!0,l}function u(d){return o&&i&&Dt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function mT(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!pm.call(r,r.previous)||Bl(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dT,e.attempt(cm,e.attempt(um,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function gT(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&mm.call(r,r.previous)&&!Bl(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(Dt(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||po(d)||et(d)||Zn(d)||Mo(d)?n(d):e.attempt(cm,e.attempt(um,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function bT(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function yT(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(dm,l,a)(c):c===null||et(c)||Zn(c)||c!==45&&Mo(c)?l(c):(o=!0,e.consume(c),s)}function a(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function l(c){return i||r||!o?n(c):t(c)}}function xT(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(dm,t,o)(s):s===null||et(s)||Zn(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function wT(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),o):a===93?(e.consume(a),i):a===60||a===null||et(a)||Zn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||et(a)||Zn(a)?t(a):r(a)}function o(a){return Dt(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):Dt(a)?(e.consume(a),s):n(a)}}function vT(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return It(o)?n(o):t(o)}}function pm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function mm(e){return!Dt(e)}function gm(e){return!(e===47||Ma(e))}function Ma(e){return e===43||e===45||e===46||e===95||It(e)}function Bl(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 ET={tokenize:RT,partial:!0};function kT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:TT,continuation:{tokenize:NT},exit:AT}},text:{91:{name:"gfmFootnoteCall",tokenize:_T},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ST,resolveTo:CT}}}}function ST(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){s=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(!s||!s._balanced)return n(l);const c=rn(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function CT(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 o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function _T(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;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(o>999||d===93&&!s||d===null||d===91||et(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(rn(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return et(d)||(s=!0),o++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function TT(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=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(s>999||g===93&&!a||g===null||g===91||et(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return o=rn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return et(g)||(a=!0),s++,e.consume(g),g===92?d:u}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,u):u(g)}function f(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),Be(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function NT(e,t,n){return e.check(yi,t,e.attempt(ET,t,n))}function AT(e){e.exit("gfmFootnoteDefinition")}function RT(e,t,n){const r=this;return Be(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function MT(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},f=[["enter",u,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",d,a]],p=a.parser.constructs.insideSpan.null;p&&Gt(f,f.length,0,Io(p,s.slice(c+1,l),a)),Gt(f,f.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",u,a]]),Gt(s,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){const c=this.previous,u=this.events;let d=0;return f;function f(g){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(g):(s.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const m=_r(c);if(g===126)return d>1?l(g):(s.consume(g),d++,p);if(d<2&&!n)return l(g);const x=s.exit("strikethroughSequenceTemporary"),y=_r(g);return x._open=!y||y===2&&!!m,x._close=!m||m===2&&!!y,a(g)}}}class IT{constructor(){this.map=[]}add(t,n,r){OT(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[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 o of i)t.push(o);i=r.pop()}this.map.length=0}}function OT(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 PT(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 o=r.length-1;r[o]=r[o]==="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 DT(){return{flow:{null:{name:"table",tokenize:LT,resolveAll:FT}}}}function LT(e,t,n){const r=this;let i=0,o=0,s;return a;function a(b){let R=r.events.length-1;for(;R>-1;){const $=r.events[R][1].type;if($==="lineEnding"||$==="linePrefix")R--;else break}const O=R>-1?r.events[R][1].type:null,D=O==="tableHead"||O==="tableRow"?C:l;return D===C&&r.parser.lazy[r.now().line]?n(b):D(b)}function l(b){return e.enter("tableHead"),e.enter("tableRow"),c(b)}function c(b){return b===124||(s=!0,o+=1),u(b)}function u(b){return b===null?n(b):xe(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):De(b)?Be(e,u,"whitespace")(b):(o+=1,s&&(s=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),s=!0,u):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||et(b)?(e.exit("data"),u(b)):(e.consume(b),b===92?f:d)}function f(b){return b===92||b===124?(e.consume(b),d):d(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),s=!1,De(b)?Be(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):g(b))}function g(b){return b===45||b===58?x(b):b===124?(s=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),m):S(b)}function m(b){return De(b)?Be(e,x,"whitespace")(b):x(b)}function x(b){return b===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):b===45?(o+=1,y(b)):b===null||xe(b)?_(b):S(b)}function y(b){return b===45?(e.enter("tableDelimiterFiller"),k(b)):S(b)}function k(b){return b===45?(e.consume(b),k):b===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return De(b)?Be(e,_,"whitespace")(b):_(b)}function _(b){return b===124?g(b):b===null||xe(b)?!s||i!==o?S(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):S(b)}function S(b){return n(b)}function C(b){return e.enter("tableRow"),M(b)}function M(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),M):b===null||xe(b)?(e.exit("tableRow"),t(b)):De(b)?Be(e,M,"whitespace")(b):(e.enter("data"),N(b))}function N(b){return b===null||b===124||et(b)?(e.exit("data"),M(b)):(e.consume(b),b===92?I:N)}function I(b){return b===92||b===124?(e.consume(b),N):N(b)}}function FT(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,d;const f=new IT;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(Sd(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},f.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,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=ji(f,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=ji(f,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):g.type==="tableHead"?(a=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,o[1]!==0?(s[0]=s[1],d=ji(f,t,o,i,n,d)):s[1]!==0&&(d=ji(f,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(l!==0&&Sd(f,t,l,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=PT(t.events,n))}return e}function ji(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},dr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=dr(t.events,n[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=dr(t.events,n[2]),u=dr(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 f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},dr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Sd(e,t,n,r,i){const o=[],s=dr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function dr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const BT={name:"tasklistCheck",tokenize:$T};function jT(){return{text:{91:BT}}}function $T(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"),o)}function o(l){return et(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):n(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(l)}function a(l){return xe(l)?t(l):De(l)?e.check({tokenize:VT},t,n)(l):n(l)}}function VT(e,t,n){return Be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function zT(e){return Tp([hT(),kT(),MT(e),DT(),jT()])}const UT={};function HT(e){const t=this,n=e||UT,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(zT(n)),o.push(cT()),s.push(uT(n))}const Cd=function(e,t,n){const r=xi(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},Jn=function(e){if(e==null)return KT;if(typeof e=="string")return GT(e);if(typeof e=="object")return WT(e);if(typeof e=="function")return jl(e);throw new Error("Expected function, string, or array as `test`")};function WT(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Jn(e[n]);return jl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function GT(e){return jl(t);function t(n){return n.tagName===e}}function jl(e){return t;function t(n,r,i){return!!(qT(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function KT(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function qT(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const _d=/\n/g,Td=/[\t ]+/g,Ia=Jn("br"),Nd=Jn(n1),YT=Jn("p"),Ad=Jn("tr"),ZT=Jn(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",t1,r1]),bm=Jn(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function XT(e,t){const n=t||{},r="children"in e?e.children:[],i=bm(e),o=wm(e,{whitespace:n.whitespace||"normal"}),s=[];(e.type==="text"||e.type==="comment")&&s.push(...xm(e,{breakBefore:!0,breakAfter:!0}));let a=-1;for(;++a<r.length;)s.push(...ym(r[a],e,{whitespace:o,breakBefore:a?void 0:i,breakAfter:a<r.length-1?Ia(r[a+1]):i}));const l=[];let c;for(a=-1;++a<s.length;){const u=s[a];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
58
+ `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function ym(e,t,n){return e.type==="element"?QT(e,t,n):e.type==="text"?n.whitespace==="normal"?xm(e,n):JT(e):[]}function QT(e,t,n){const r=wm(e,n),i=e.children||[];let o=-1,s=[];if(ZT(e))return s;let a,l;for(Ia(e)||Ad(e)&&Cd(t,e,Ad)?l=`
59
+ `:YT(e)?(a=2,l=2):bm(e)&&(a=1,l=1);++o<i.length;)s=s.concat(ym(i[o],e,{whitespace:r,breakBefore:o?void 0:a,breakAfter:o<i.length-1?Ia(i[o+1]):l}));return Nd(e)&&Cd(t,e,Nd)&&s.push(" "),a&&s.unshift(a),l&&s.push(l),s}function xm(e,t){const n=String(e.value),r=[],i=[];let o=0;for(;o<=n.length;){_d.lastIndex=o;const l=_d.exec(n),c=l&&"index"in l?l.index:n.length;r.push(e1(n.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,c===n.length?t.breakAfter:!0)),o=c+1}let s=-1,a;for(;++s<r.length;)r[s].charCodeAt(r[s].length-1)===8203||s<r.length-1&&r[s+1].charCodeAt(0)===8203?(i.push(r[s]),a=void 0):r[s]?(typeof a=="number"&&i.push(a),i.push(r[s]),a=0):(s===0||s===r.length-1)&&i.push(0);return i}function JT(e){return[String(e.value)]}function e1(e,t,n){const r=[];let i=0,o;for(;i<e.length;){Td.lastIndex=i;const s=Td.exec(e);o=s?s.index:e.length,!i&&!o&&s&&!t&&r.push(""),i!==o&&r.push(e.slice(i,o)),i=s?o+s[0].length:o}return i!==o&&!n&&r.push(""),r.join(" ")}function wm(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function t1(e){return!!(e.properties||{}).hidden}function n1(e){return e.tagName==="td"||e.tagName==="th"}function r1(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function i1(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:m,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},S={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[S,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:C.concat([{begin:/\(/,end:/\)/,keywords:_,contains:C.concat(["self"]),relevance:0}]),relevance:0},N={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,N,S,C,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function o1(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=i1(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function s1(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},c={className:"string",begin:/'/,end:/'/},u={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],p=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],x=["true","false"],y={match:/(\/[a-z._-]+)+/},k=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],v=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],S=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:x,built_in:[...k,...v,"set","shopt",..._,...S]},contains:[p,e.SHEBANG(),g,d,o,s,y,a,l,c,u,n]}}function a1(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",x={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},y=[d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],k={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:x,contains:y.concat([{begin:/\(/,end:/\)/,keywords:x,contains:y.concat(["self"]),relevance:0}]),relevance:0},v={begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:x,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:x,relevance:0},{begin:p,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:x,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:x,disableAutodetect:!0,illegal:"</",contains:[].concat(k,v,y,[d,{begin:e.IDENT_RE+"::",keywords:x},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:d,strings:c,keywords:x}}}function l1(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",s="(?!struct)("+r+"|"+t.optional(i)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(c,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(i)+e.IDENT_RE,relevance:0},p=t.optional(i)+e.IDENT_RE+"\\s*\\(",g=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],x=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],y=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:m,keyword:g,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:x},S={className:"function.dispatch",relevance:0,keywords:{_hint:y},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},C=[S,d,a,n,e.C_BLOCK_COMMENT_MODE,u,c],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:C.concat([{begin:/\(/,end:/\)/,keywords:_,contains:C.concat(["self"]),relevance:0}]),relevance:0},N={className:"function",begin:"("+s+"[\\*&\\s]+)+"+p,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:p,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[c,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,c,u,a,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,c,u,a]}]},a,n,e.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(M,N,S,C,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",a]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function c1(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],s={keyword:i.concat(o),built_in:t,literal:r},a=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},u={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=e.inherit(u,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:s},p=e.inherit(f,{illegal:/\n/}),g={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,p]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},x=e.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},p]});f.contains=[m,g,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.C_BLOCK_COMMENT_MODE],p.contains=[x,g,d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const y={variants:[c,m,g,u,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},k={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},v=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:s,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},y,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,k,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,k,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+v+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:s,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,k],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,relevance:0,contains:[y,l,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const u1=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),d1=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],f1=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],h1=[...d1,...f1],p1=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),m1=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),g1=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),b1=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function y1(e){const t=e.regex,n=u1(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",o=/@-?\w[\w]*(-\w+)*/,s="[a-zA-Z-][a-zA-Z0-9_-]*",a=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+s,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+m1.join("|")+")"},{begin:":(:)?("+g1.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+b1.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:p1.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+h1.join("|")+")\\b"}]}}function x1(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function w1(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function v1(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function E1(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,o,i,s,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,c=/"(\\"|[^"])*"/,u=/'[^']*'/,d=t.either(l,c,u),f=t.concat(d,"(\\s*\\.\\s*",d,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:f,className:"attr",starts:{end:/$/,contains:[r,a,o,i,s,n]}}]}}var fr="[0-9](_*[0-9])*",$i=`\\.(${fr})`,Vi="[0-9a-fA-F](_*[0-9a-fA-F])*",Rd={className:"number",variants:[{begin:`(\\b(${fr})((${$i})|\\.)?|(${$i}))[eE][+-]?(${fr})[fFdD]?\\b`},{begin:`\\b(${fr})((${$i})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${$i})[fFdD]?\\b`},{begin:`\\b(${fr})[fFdD]\\b`},{begin:`\\b0[xX]((${Vi})\\.?|(${Vi})?\\.(${Vi}))[pP][+-]?(${fr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Vi})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function vm(e,t,n){return n===-1?"":e.replace(t,r=>vm(e,t,n-1))}function k1(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+vm("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},c={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},u={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[c,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Rd,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Rd,c]}}const Md="[A-Za-z$_][0-9A-Za-z$_]*",S1=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],C1=["true","false","null","undefined","NaN","Infinity"],Em=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],km=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Sm=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_1=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],T1=[].concat(Sm,Em,km);function N1(e){const t=e.regex,n=(j,{after:W})=>{const w="</"+j[0].slice(1);return j.input.indexOf(w,W)!==-1},r=Md,i={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,W)=>{const w=j[0].length+j.index,F=j.input[w];if(F==="<"||F===","){W.ignoreMatch();return}F===">"&&(n(j,{after:w})||W.ignoreMatch());let Y;const E=j.input.substring(w);if(Y=E.match(/^\s*=/)){W.ignoreMatch();return}if((Y=E.match(/^\s+extends\s+/))&&Y.index===0){W.ignoreMatch();return}}},a={$pattern:Md,keyword:S1,literal:C1,built_in:T1,"variable.language":_1},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},k={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,x,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const _=[].concat(k,f.contains),S=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(_)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},N={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Em,...km]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},b={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},R={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function O(j){return t.concat("(?!",j.join("|"),")")}const D={match:t.concat(/\b/,O([...Sm,"super","import"].map(j=>`${j}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},re="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:N},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,x,k,{match:/\$\d+/},d,N,{scope:"attr",match:r+t.lookahead(":"),relevance:0},ne,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,e.REGEXP_MODE,{className:"function",begin:re,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},b,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},D,R,M,U,{match:/\$[(.]/}]}}function A1(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,i,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var hr="[0-9](_*[0-9])*",zi=`\\.(${hr})`,Ui="[0-9a-fA-F](_*[0-9a-fA-F])*",R1={className:"number",variants:[{begin:`(\\b(${hr})((${zi})|\\.)?|(${zi}))[eE][+-]?(${hr})[fFdD]?\\b`},{begin:`\\b(${hr})((${zi})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${zi})[fFdD]?\\b`},{begin:`\\b(${hr})[fFdD]\\b`},{begin:`\\b0[xX]((${Ui})\\.?|(${Ui})?\\.(${Ui}))[pP][+-]?(${hr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ui})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function M1(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},s={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,i]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,i]}]};i.contains.push(s);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(s,{className:"string"}),"self"]}]},c=R1,u=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,u,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,u],relevance:0},e.C_LINE_COMMENT_MODE,u,a,l,s,e.C_NUMBER_MODE]},u]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},s,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
60
+ `},c]}}const I1=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),O1=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],P1=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],D1=[...O1,...P1],L1=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Cm=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),_m=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),F1=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),B1=Cm.concat(_m).sort().reverse();function j1(e){const t=I1(e),n=B1,r="and or not only",i="[\\w-]+",o="("+i+"|@\\{"+i+"\\})",s=[],a=[],l=function(v){return{className:"string",begin:"~?"+v+".*?"+v}},c=function(v,_,S){return{className:v,begin:_,relevance:S}},u={$pattern:/[a-z-]+/,keyword:r,attribute:L1.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:u,relevance:0};a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,c("variable","@@?"+i,10),c("variable","@\\{"+i+"\\}"),c("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const f=a.concat({begin:/\{/,end:/\}/,contains:s}),p={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},g={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+F1.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:u,returnEnd:!0,contains:a,relevance:0}},x={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,c("keyword","all\\b"),c("variable","@\\{"+i+"\\}"),{begin:"\\b("+D1.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,c("selector-tag",o,0),c("selector-id","#"+o),c("selector-class","\\."+o,0),c("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Cm.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+_m.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},t.FUNCTION_DISPATCH]},k={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[y]};return s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,x,k,g,y,p,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:s}}function $1(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}function V1(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},i={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},s={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,r,i,o,s]}}function z1(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},s={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},c={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=e.inherit(c,{contains:[]}),f=e.inherit(u,{contains:[]});c.contains.push(f),u.contains.push(d);let p=[n,l];return[c,u,d,f].forEach(y=>{y.contains=y.contains.concat(p)}),p=p.concat(c,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:p},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:p}]}]},n,o,c,u,{className:"quote",begin:"^>\\s+",contains:p,end:"$"},i,r,l,s,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function U1(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function H1(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},s={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},c={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},u=[e.BACKSLASH_ESCAPE,o,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,x,y="\\1")=>{const k=y==="\\1"?y:t.concat(y,x);return t.concat(t.concat("(?:",m,")"),x,/(?:\\.|[^\\\/])*?/,k,/(?:\\.|[^\\\/])*?/,y,r)},p=(m,x,y)=>t.concat(t.concat("(?:",m,")"),x,/(?:\\.|[^\\\/])*?/,y,r),g=[l,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),s,{className:"string",contains:u,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},c,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",t.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:p("(?:m|qr)?",/\//,/\//)},{begin:p("m|qr",t.either(...d,{capture:!0}),/\1/)},{begin:p("m|qr",/\(/,/\)/)},{begin:p("m|qr",/\[/,/\]/)},{begin:p("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,a,c]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=g,s.contains=g,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:g}}function W1(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),s={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},c=e.inherit(e.APOS_STRING_MODE,{illegal:null}),u=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(l),"on:begin":($,U)=>{U.data._beginMatch=$[1]||$[2]},"on:end":($,U)=>{U.data._beginMatch!==$[1]&&U.ignoreMatch()}},f=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),p=`[
61
+ ]`,g={scope:"string",variants:[u,c,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},x=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],k=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],_={keyword:y,literal:($=>{const U=[];return $.forEach(re=>{U.push(re),re.toLowerCase()===re?U.push(re.toUpperCase()):U.push(re.toLowerCase())}),U})(x),built_in:k},S=$=>$.map(U=>U.replace(/\|\d+$/,"")),C={variants:[{match:[/new/,t.concat(p,"+"),t.concat("(?!",S(k).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},M=t.concat(r,"\\b(?!\\()"),N={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},I={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},b={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[I,s,N,e.C_BLOCK_COMMENT_MODE,g,m,C]},R={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",S(y).join("\\b|"),"|",S(k).join("\\b|"),"\\b)"),r,t.concat(p,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[b]};b.contains.push(R);const O=[I,N,e.C_BLOCK_COMMENT_MODE,g,m,C],D={begin:t.concat(/#\[\s*\\?/,t.either(i,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:x,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:x,keyword:["new","array"]},contains:["self",...O]},...O,{scope:"meta",variants:[{match:i},{match:o}]}]};return{case_insensitive:!1,keywords:_,contains:[D,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},s,R,N,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},C,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",D,s,N,e.C_BLOCK_COMMENT_MODE,g,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},g,m]}}function G1(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function K1(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function q1(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},c={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},u={begin:/\{\{/,relevance:0},d={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,c]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,c]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,c]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",p=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,g=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${p}))[eE][+-]?(${f})[jJ]?(?=${g})`},{begin:`(${p})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${f})[jJ](?=${g})`}]},x={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,e.HASH_COMMENT_MODE]}]};return c.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,x,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,y,d]}]}}function Y1(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Z1(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function X1(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(r,/(::\w+)*/),s={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},c=[e.COMMENT("#","$",{contains:[a]}),e.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],u={className:"subst",begin:/#\{/,end:/\}/,keywords:s},d={className:"string",contains:[e.BACKSLASH_ESCAPE,u],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,u]})]}]},f="[1-9](_?[0-9])*|0",p="[0-9](_?[0-9])*",g={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${p}))?([eE][+-]?(${p})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:s}]},C=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:s},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:s},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},g,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:s},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,u],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,c),relevance:0}].concat(l,c);u.contains=C,m.contains=C;const b=[{begin:/^\s*=>/,starts:{end:"$",contains:C}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:s,contains:C}}];return c.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(b).concat(c).concat(C)}}function Q1(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),i=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,t.lookahead(/\s*\(/))},s="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],c=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:a,literal:l,built_in:c},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+s},{begin:"\\b0o([0-7_]+)"+s},{begin:"\\b0x([A-Fa-f0-9_]+)"+s},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+s}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:c,type:u}},{className:"punctuation",begin:"->"},o]}}const J1=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),eN=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],tN=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],nN=[...eN,...tN],rN=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),iN=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),oN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),sN=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function aN(e){const t=J1(e),n=oN,r=iN,i="@[a-z-]+",o="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+nN.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+sN.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,a,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:rN.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function lN(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function cN(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],s=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],p=u,g=[...c,...l].filter(S=>!u.includes(S)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},x={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:t.concat(/\b/,t.either(...p),/\s*\(/),relevance:0,keywords:{built_in:p}};function k(S){return t.concat(/\b/,t.either(...S.map(C=>C.replace(/\s+/,"\\s+"))),/\b/)}const v={scope:"keyword",match:k(f),relevance:0};function _(S,{exceptions:C,when:M}={}){const N=M;return C=C||[],S.map(I=>I.match(/\|\d+$/)||C.includes(I)?I:N(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(g,{when:S=>S.length<3}),literal:o,type:a,built_in:d},contains:[{scope:"type",match:k(s)},v,y,m,r,i,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,x]}}function Tm(e){return e?typeof e=="string"?e:e.source:null}function Ur(e){return Ze("(?=",e,")")}function Ze(...e){return e.map(n=>Tm(n)).join("")}function uN(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Pt(...e){return"("+(uN(e).capture?"":"?:")+e.map(r=>Tm(r)).join("|")+")"}const $l=e=>Ze(/\b/,e,/\w$/.test(e)?/\b/:/\B/),dN=["Protocol","Type"].map($l),Id=["init","self"].map($l),fN=["Any","Self"],Ps=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Od=["false","nil","true"],hN=["assignment","associativity","higherThan","left","lowerThan","none","right"],pN=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Pd=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Nm=Pt(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Am=Pt(Nm,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Ds=Ze(Nm,Am,"*"),Rm=Pt(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),yo=Pt(Rm,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),ln=Ze(Rm,yo,"*"),Hi=Ze(/[A-Z]/,yo,"*"),mN=["attached","autoclosure",Ze(/convention\(/,Pt("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ze(/objc\(/,ln,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],gN=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function bN(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],i={match:[/\./,Pt(...dN,...Id)],className:{2:"keyword"}},o={match:Ze(/\./,Pt(...Ps)),relevance:0},s=Ps.filter(ye=>typeof ye=="string").concat(["_|0"]),a=Ps.filter(ye=>typeof ye!="string").concat(fN).map($l),l={variants:[{className:"keyword",match:Pt(...a,...Id)}]},c={$pattern:Pt(/\b\w+/,/#\w+/),keyword:s.concat(pN),literal:Od},u=[i,o,l],d={match:Ze(/\./,Pt(...Pd)),relevance:0},f={className:"built_in",match:Ze(/\b/,Pt(...Pd),/(?=\()/)},p=[d,f],g={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:Ds},{match:`\\.(\\.|${Am})+`}]},x=[g,m],y="([0-9]_*)+",k="([0-9a-fA-F]_*)+",v={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${k})(\\.(${k}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(ye="")=>({className:"subst",variants:[{match:Ze(/\\/,ye,/[0\\tnr"']/)},{match:Ze(/\\/,ye,/u\{[0-9a-fA-F]{1,8}\}/)}]}),S=(ye="")=>({className:"subst",match:Ze(/\\/,ye,/[\t ]*(?:[\r\n]|\r\n)/)}),C=(ye="")=>({className:"subst",label:"interpol",begin:Ze(/\\/,ye,/\(/),end:/\)/}),M=(ye="")=>({begin:Ze(ye,/"""/),end:Ze(/"""/,ye),contains:[_(ye),S(ye),C(ye)]}),N=(ye="")=>({begin:Ze(ye,/"/),end:Ze(/"/,ye),contains:[_(ye),C(ye)]}),I={className:"string",variants:[M(),M("#"),M("##"),M("###"),N(),N("#"),N("##"),N("###")]},b=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],R={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:b},O=ye=>{const ae=Ze(ye,/\//),ve=Ze(/\//,ye);return{begin:ae,end:ve,contains:[...b,{scope:"comment",begin:`#(?!.*${ve})`,end:/$/}]}},D={scope:"regexp",variants:[O("###"),O("##"),O("#"),R]},$={match:Ze(/`/,ln,/`/)},U={className:"variable",match:/\$\d+/},re={className:"variable",match:`\\$${yo}+`},ne=[$,U,re],j={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:gN,contains:[...x,v,I]}]}},W={scope:"keyword",match:Ze(/@/,Pt(...mN),Ur(Pt(/\(/,/\s+/)))},w={scope:"meta",match:Ze(/@/,ln)},F=[j,W,w],Y={match:Ur(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ze(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,yo,"+")},{className:"type",match:Hi,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ze(/\s+&\s+/,Ur(Hi)),relevance:0}]},E={begin:/</,end:/>/,keywords:c,contains:[...r,...u,...F,g,Y]};Y.contains.push(E);const B={match:Ze(ln,/\s*:/),keywords:"_|0",relevance:0},z={begin:/\(/,end:/\)/,relevance:0,keywords:c,contains:["self",B,...r,D,...u,...p,...x,v,I,...ne,...F,Y]},K={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,Y]},q={begin:Pt(Ur(Ze(ln,/\s*:/)),Ur(Ze(ln,/\s+/,ln,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:ln}]},me={begin:/\(/,end:/\)/,keywords:c,contains:[q,...r,...u,...x,v,I,...F,Y,z],endsParent:!0,illegal:/["']/},Q={match:[/(func|macro)/,/\s+/,Pt($.match,ln,Ds)],className:{1:"keyword",3:"title.function"},contains:[K,me,t],illegal:[/\[/,/%/]},le={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[K,me,t],illegal:/\[|%/},he={match:[/operator/,/\s+/,Ds],className:{1:"keyword",3:"title"}},G={begin:[/precedencegroup/,/\s+/,Hi],className:{1:"keyword",3:"title"},contains:[Y],keywords:[...hN,...Od],end:/}/},Se={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Z={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},te={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,ln,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:c,contains:[K,...u,{begin:/:/,end:/\{/,keywords:c,contains:[{scope:"title.class.inherited",match:Hi},...u],relevance:0}]};for(const ye of I.variants){const ae=ye.contains.find(Ne=>Ne.label==="interpol");ae.keywords=c;const ve=[...u,...p,...x,v,I,...ne];ae.contains=[...ve,{begin:/\(/,end:/\)/,contains:["self",...ve]}]}return{name:"Swift",keywords:c,contains:[...r,Q,le,Se,Z,te,he,G,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},D,...u,...p,...x,v,I,...ne,...F,Y,z]}}const xo="[A-Za-z$_][0-9A-Za-z$_]*",Mm=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Im=["true","false","null","undefined","NaN","Infinity"],Om=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Pm=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Dm=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lm=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Fm=[].concat(Dm,Om,Pm);function yN(e){const t=e.regex,n=(j,{after:W})=>{const w="</"+j[0].slice(1);return j.input.indexOf(w,W)!==-1},r=xo,i={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,s={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,W)=>{const w=j[0].length+j.index,F=j.input[w];if(F==="<"||F===","){W.ignoreMatch();return}F===">"&&(n(j,{after:w})||W.ignoreMatch());let Y;const E=j.input.substring(w);if(Y=E.match(/^\s*=/)){W.ignoreMatch();return}if((Y=E.match(/^\s+extends\s+/))&&Y.index===0){W.ignoreMatch();return}}},a={$pattern:xo,keyword:Mm,literal:Im,built_in:Fm,"variable.language":Lm},l="[0-9](_?[0-9])*",c=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${u})((${c})|\\.)?|(${c}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},p={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},x={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},k={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,x,{match:/\$\d+/},d];f.contains=v.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(v)});const _=[].concat(k,f.contains),S=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(_)}]),C={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S},M={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},N={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Om,...Pm]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},b={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[C],illegal:/%/},R={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function O(j){return t.concat("(?!",j.join("|"),")")}const D={match:t.concat(/\b/,O([...Dm,"super","import"].map(j=>`${j}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},$={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},U={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},C]},re="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(re)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[C]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:S,CLASS_REFERENCE:N},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,g,m,x,k,{match:/\$\d+/},d,N,{scope:"attr",match:r+t.lookahead(":"),relevance:0},ne,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[k,e.REGEXP_MODE,{className:"function",begin:re,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:o},{begin:s.begin,"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},b,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[C,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},$,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[C]},D,R,M,U,{match:/\$[(.]/}]}}function xN(e){const t=e.regex,n=yN(e),r=xo,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},s={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],c={$pattern:xo,keyword:Mm.concat(l),literal:Im,built_in:Fm.concat(i),"variable.language":Lm},u={className:"meta",begin:"@"+r},d=(m,x,y)=>{const k=m.contains.findIndex(v=>v.label===x);if(k===-1)throw new Error("can not find mode to replace");m.contains.splice(k,1,y)};Object.assign(n.keywords,c),n.exports.PARAMS_CONTAINS.push(u);const f=n.contains.find(m=>m.scope==="attr"),p=Object.assign({},f,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,p]),n.contains=n.contains.concat([u,o,s,p]),d(n,"shebang",e.SHEBANG()),d(n,"use_strict",a);const g=n.contains.find(m=>m.label==="func.def");return g.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function wN(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,i),/ *#/)},{begin:t.concat(/# */,a,/ *#/)},{begin:t.concat(/# */,s,/ *#/)},{begin:t.concat(/# */,t.either(o,i),/ +/,t.either(s,a),/ *#/)}]},c={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},u={className:"label",begin:/^\w+:/},d=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,c,u,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function vN(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},s={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},c={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,s,i,e.QUOTE_STRING_MODE,l,c,a]}}function EN(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},s=e.inherit(o,{begin:/\(/,end:/\)/}),a=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,l,a,s,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,s,l,a]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:c}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function kN(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},s={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},a=e.inherit(s,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},p={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},g={begin:/\{/,end:/\}/,contains:[p],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[p],illegal:"\\n",relevance:0},x=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},f,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,m,o,s],y=[...x];return y.pop(),y.push(a),p.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:x}}const SN={arduino:o1,bash:s1,c:a1,cpp:l1,csharp:c1,css:y1,diff:x1,go:w1,graphql:v1,ini:E1,java:k1,javascript:N1,json:A1,kotlin:M1,less:j1,lua:$1,makefile:V1,markdown:z1,objectivec:U1,perl:H1,php:W1,"php-template":G1,plaintext:K1,python:q1,"python-repl":Y1,r:Z1,ruby:X1,rust:Q1,scss:aN,shell:lN,sql:cN,swift:bN,typescript:xN,vbnet:wN,wasm:vN,xml:EN,yaml:kN};var Ls,Dd;function CN(){if(Dd)return Ls;Dd=1;function e(T){return T instanceof Map?T.clear=T.delete=T.set=function(){throw new Error("map is read-only")}:T instanceof Set&&(T.add=T.clear=T.delete=function(){throw new Error("set is read-only")}),Object.freeze(T),Object.getOwnPropertyNames(T).forEach(H=>{const ie=T[H],Te=typeof ie;(Te==="object"||Te==="function")&&!Object.isFrozen(ie)&&e(ie)}),T}class t{constructor(H){H.data===void 0&&(H.data={}),this.data=H.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(T){return T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(T,...H){const ie=Object.create(null);for(const Te in T)ie[Te]=T[Te];return H.forEach(function(Te){for(const ht in Te)ie[ht]=Te[ht]}),ie}const i="</span>",o=T=>!!T.scope,s=(T,{prefix:H})=>{if(T.startsWith("language:"))return T.replace("language:","language-");if(T.includes(".")){const ie=T.split(".");return[`${H}${ie.shift()}`,...ie.map((Te,ht)=>`${Te}${"_".repeat(ht+1)}`)].join(" ")}return`${H}${T}`};class a{constructor(H,ie){this.buffer="",this.classPrefix=ie.classPrefix,H.walk(this)}addText(H){this.buffer+=n(H)}openNode(H){if(!o(H))return;const ie=s(H.scope,{prefix:this.classPrefix});this.span(ie)}closeNode(H){o(H)&&(this.buffer+=i)}value(){return this.buffer}span(H){this.buffer+=`<span class="${H}">`}}const l=(T={})=>{const H={children:[]};return Object.assign(H,T),H};class c{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(H){this.top.children.push(H)}openNode(H){const ie=l({scope:H});this.add(ie),this.stack.push(ie)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(H){return this.constructor._walk(H,this.rootNode)}static _walk(H,ie){return typeof ie=="string"?H.addText(ie):ie.children&&(H.openNode(ie),ie.children.forEach(Te=>this._walk(H,Te)),H.closeNode(ie)),H}static _collapse(H){typeof H!="string"&&H.children&&(H.children.every(ie=>typeof ie=="string")?H.children=[H.children.join("")]:H.children.forEach(ie=>{c._collapse(ie)}))}}class u extends c{constructor(H){super(),this.options=H}addText(H){H!==""&&this.add(H)}startScope(H){this.openNode(H)}endScope(){this.closeNode()}__addSublanguage(H,ie){const Te=H.root;ie&&(Te.scope=`language:${ie}`),this.add(Te)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(T){return T?typeof T=="string"?T:T.source:null}function f(T){return m("(?=",T,")")}function p(T){return m("(?:",T,")*")}function g(T){return m("(?:",T,")?")}function m(...T){return T.map(ie=>d(ie)).join("")}function x(T){const H=T[T.length-1];return typeof H=="object"&&H.constructor===Object?(T.splice(T.length-1,1),H):{}}function y(...T){return"("+(x(T).capture?"":"?:")+T.map(Te=>d(Te)).join("|")+")"}function k(T){return new RegExp(T.toString()+"|").exec("").length-1}function v(T,H){const ie=T&&T.exec(H);return ie&&ie.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function S(T,{joinWith:H}){let ie=0;return T.map(Te=>{ie+=1;const ht=ie;let pt=d(Te),pe="";for(;pt.length>0;){const ue=_.exec(pt);if(!ue){pe+=pt;break}pe+=pt.substring(0,ue.index),pt=pt.substring(ue.index+ue[0].length),ue[0][0]==="\\"&&ue[1]?pe+="\\"+String(Number(ue[1])+ht):(pe+=ue[0],ue[0]==="("&&ie++)}return pe}).map(Te=>`(${Te})`).join(H)}const C=/\b\B/,M="[a-zA-Z]\\w*",N="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",b="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",R="\\b(0b[01]+)",O="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",D=(T={})=>{const H=/^#![ ]*\//;return T.binary&&(T.begin=m(H,/.*\b/,T.binary,/\b.*/)),r({scope:"meta",begin:H,end:/$/,relevance:0,"on:begin":(ie,Te)=>{ie.index!==0&&Te.ignoreMatch()}},T)},$={begin:"\\\\[\\s\\S]",relevance:0},U={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[$]},re={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[$]},ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},j=function(T,H,ie={}){const Te=r({scope:"comment",begin:T,end:H,contains:[]},ie);Te.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ht=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Te.contains.push({begin:m(/[ ]+/,"(",ht,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Te},W=j("//","$"),w=j("/\\*","\\*/"),F=j("#","$"),Y={scope:"number",begin:I,relevance:0},E={scope:"number",begin:b,relevance:0},B={scope:"number",begin:R,relevance:0},z={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[$,{begin:/\[/,end:/\]/,relevance:0,contains:[$]}]},K={scope:"title",begin:M,relevance:0},q={scope:"title",begin:N,relevance:0},me={begin:"\\.\\s*"+N,relevance:0};var le=Object.freeze({__proto__:null,APOS_STRING_MODE:U,BACKSLASH_ESCAPE:$,BINARY_NUMBER_MODE:B,BINARY_NUMBER_RE:R,COMMENT:j,C_BLOCK_COMMENT_MODE:w,C_LINE_COMMENT_MODE:W,C_NUMBER_MODE:E,C_NUMBER_RE:b,END_SAME_AS_BEGIN:function(T){return Object.assign(T,{"on:begin":(H,ie)=>{ie.data._beginMatch=H[1]},"on:end":(H,ie)=>{ie.data._beginMatch!==H[1]&&ie.ignoreMatch()}})},HASH_COMMENT_MODE:F,IDENT_RE:M,MATCH_NOTHING_RE:C,METHOD_GUARD:me,NUMBER_MODE:Y,NUMBER_RE:I,PHRASAL_WORDS_MODE:ne,QUOTE_STRING_MODE:re,REGEXP_MODE:z,RE_STARTERS_RE:O,SHEBANG:D,TITLE_MODE:K,UNDERSCORE_IDENT_RE:N,UNDERSCORE_TITLE_MODE:q});function he(T,H){T.input[T.index-1]==="."&&H.ignoreMatch()}function G(T,H){T.className!==void 0&&(T.scope=T.className,delete T.className)}function Se(T,H){H&&T.beginKeywords&&(T.begin="\\b("+T.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",T.__beforeBegin=he,T.keywords=T.keywords||T.beginKeywords,delete T.beginKeywords,T.relevance===void 0&&(T.relevance=0))}function Z(T,H){Array.isArray(T.illegal)&&(T.illegal=y(...T.illegal))}function te(T,H){if(T.match){if(T.begin||T.end)throw new Error("begin & end are not supported with match");T.begin=T.match,delete T.match}}function ye(T,H){T.relevance===void 0&&(T.relevance=1)}const ae=(T,H)=>{if(!T.beforeMatch)return;if(T.starts)throw new Error("beforeMatch cannot be used with starts");const ie=Object.assign({},T);Object.keys(T).forEach(Te=>{delete T[Te]}),T.keywords=ie.keywords,T.begin=m(ie.beforeMatch,f(ie.begin)),T.starts={relevance:0,contains:[Object.assign(ie,{endsParent:!0})]},T.relevance=0,delete ie.beforeMatch},ve=["of","and","for","in","not","or","if","then","parent","list","value"],Ne="keyword";function _e(T,H,ie=Ne){const Te=Object.create(null);return typeof T=="string"?ht(ie,T.split(" ")):Array.isArray(T)?ht(ie,T):Object.keys(T).forEach(function(pt){Object.assign(Te,_e(T[pt],H,pt))}),Te;function ht(pt,pe){H&&(pe=pe.map(ue=>ue.toLowerCase())),pe.forEach(function(ue){const ke=ue.split("|");Te[ke[0]]=[pt,Ce(ke[0],ke[1])]})}}function Ce(T,H){return H?Number(H):bt(T)?0:1}function bt(T){return ve.includes(T.toLowerCase())}const vt={},je=T=>{console.error(T)},ut=(T,...H)=>{console.log(`WARN: ${T}`,...H)},L=(T,H)=>{vt[`${T}/${H}`]||(console.log(`Deprecated as of ${T}. ${H}`),vt[`${T}/${H}`]=!0)},J=new Error;function we(T,H,{key:ie}){let Te=0;const ht=T[ie],pt={},pe={};for(let ue=1;ue<=H.length;ue++)pe[ue+Te]=ht[ue],pt[ue+Te]=!0,Te+=k(H[ue-1]);T[ie]=pe,T[ie]._emit=pt,T[ie]._multi=!0}function Re(T){if(Array.isArray(T.begin)){if(T.skip||T.excludeBegin||T.returnBegin)throw je("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),J;if(typeof T.beginScope!="object"||T.beginScope===null)throw je("beginScope must be object"),J;we(T,T.begin,{key:"beginScope"}),T.begin=S(T.begin,{joinWith:""})}}function $e(T){if(Array.isArray(T.end)){if(T.skip||T.excludeEnd||T.returnEnd)throw je("skip, excludeEnd, returnEnd not compatible with endScope: {}"),J;if(typeof T.endScope!="object"||T.endScope===null)throw je("endScope must be object"),J;we(T,T.end,{key:"endScope"}),T.end=S(T.end,{joinWith:""})}}function _t(T){T.scope&&typeof T.scope=="object"&&T.scope!==null&&(T.beginScope=T.scope,delete T.scope)}function Ft(T){_t(T),typeof T.beginScope=="string"&&(T.beginScope={_wrap:T.beginScope}),typeof T.endScope=="string"&&(T.endScope={_wrap:T.endScope}),Re(T),$e(T)}function Bt(T){function H(pe,ue){return new RegExp(d(pe),"m"+(T.case_insensitive?"i":"")+(T.unicodeRegex?"u":"")+(ue?"g":""))}class ie{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ue,ke){ke.position=this.position++,this.matchIndexes[this.matchAt]=ke,this.regexes.push([ke,ue]),this.matchAt+=k(ue)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ue=this.regexes.map(ke=>ke[1]);this.matcherRe=H(S(ue,{joinWith:"|"}),!0),this.lastIndex=0}exec(ue){this.matcherRe.lastIndex=this.lastIndex;const ke=this.matcherRe.exec(ue);if(!ke)return null;const St=ke.findIndex((Lr,qo)=>qo>0&&Lr!==void 0),yt=this.matchIndexes[St];return ke.splice(0,St),Object.assign(ke,yt)}}class Te{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ue){if(this.multiRegexes[ue])return this.multiRegexes[ue];const ke=new ie;return this.rules.slice(ue).forEach(([St,yt])=>ke.addRule(St,yt)),ke.compile(),this.multiRegexes[ue]=ke,ke}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ue,ke){this.rules.push([ue,ke]),ke.type==="begin"&&this.count++}exec(ue){const ke=this.getMatcher(this.regexIndex);ke.lastIndex=this.lastIndex;let St=ke.exec(ue);if(this.resumingScanAtSamePosition()&&!(St&&St.index===this.lastIndex)){const yt=this.getMatcher(0);yt.lastIndex=this.lastIndex+1,St=yt.exec(ue)}return St&&(this.regexIndex+=St.position+1,this.regexIndex===this.count&&this.considerAll()),St}}function ht(pe){const ue=new Te;return pe.contains.forEach(ke=>ue.addRule(ke.begin,{rule:ke,type:"begin"})),pe.terminatorEnd&&ue.addRule(pe.terminatorEnd,{type:"end"}),pe.illegal&&ue.addRule(pe.illegal,{type:"illegal"}),ue}function pt(pe,ue){const ke=pe;if(pe.isCompiled)return ke;[G,te,Ft,ae].forEach(yt=>yt(pe,ue)),T.compilerExtensions.forEach(yt=>yt(pe,ue)),pe.__beforeBegin=null,[Se,Z,ye].forEach(yt=>yt(pe,ue)),pe.isCompiled=!0;let St=null;return typeof pe.keywords=="object"&&pe.keywords.$pattern&&(pe.keywords=Object.assign({},pe.keywords),St=pe.keywords.$pattern,delete pe.keywords.$pattern),St=St||/\w+/,pe.keywords&&(pe.keywords=_e(pe.keywords,T.case_insensitive)),ke.keywordPatternRe=H(St,!0),ue&&(pe.begin||(pe.begin=/\B|\b/),ke.beginRe=H(ke.begin),!pe.end&&!pe.endsWithParent&&(pe.end=/\B|\b/),pe.end&&(ke.endRe=H(ke.end)),ke.terminatorEnd=d(ke.end)||"",pe.endsWithParent&&ue.terminatorEnd&&(ke.terminatorEnd+=(pe.end?"|":"")+ue.terminatorEnd)),pe.illegal&&(ke.illegalRe=H(pe.illegal)),pe.contains||(pe.contains=[]),pe.contains=[].concat(...pe.contains.map(function(yt){return tt(yt==="self"?pe:yt)})),pe.contains.forEach(function(yt){pt(yt,ke)}),pe.starts&&pt(pe.starts,ue),ke.matcher=ht(ke),ke}if(T.compilerExtensions||(T.compilerExtensions=[]),T.contains&&T.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return T.classNameAliases=r(T.classNameAliases||{}),pt(T)}function oe(T){return T?T.endsWithParent||oe(T.starts):!1}function tt(T){return T.variants&&!T.cachedVariants&&(T.cachedVariants=T.variants.map(function(H){return r(T,{variants:null},H)})),T.cachedVariants?T.cachedVariants:oe(T)?r(T,{starts:T.starts?r(T.starts):null}):Object.isFrozen(T)?r(T):T}var Fe="11.11.1";class Ge extends Error{constructor(H,ie){super(H),this.name="HTMLInjectionError",this.html=ie}}const At=n,ic=r,oc=Symbol("nomatch"),kg=7,sc=function(T){const H=Object.create(null),ie=Object.create(null),Te=[];let ht=!0;const pt="Could not find the language '{}', did you forget to load/include a language module?",pe={disableAutodetect:!0,name:"Plain text",contains:[]};let ue={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function ke(ee){return ue.noHighlightRe.test(ee)}function St(ee){let be=ee.className+" ";be+=ee.parentNode?ee.parentNode.className:"";const Le=ue.languageDetectRe.exec(be);if(Le){const nt=Sn(Le[1]);return nt||(ut(pt.replace("{}",Le[1])),ut("Falling back to no-highlight mode for this block.",ee)),nt?Le[1]:"no-highlight"}return be.split(/\s+/).find(nt=>ke(nt)||Sn(nt))}function yt(ee,be,Le){let nt="",Et="";typeof be=="object"?(nt=ee,Le=be.ignoreIllegals,Et=be.language):(L("10.7.0","highlight(lang, code, ...args) has been deprecated."),L("10.7.0",`Please use highlight(code, options) instead.
62
+ https://github.com/highlightjs/highlight.js/issues/2277`),Et=ee,nt=be),Le===void 0&&(Le=!0);const en={code:nt,language:Et};_i("before:highlight",en);const Cn=en.result?en.result:Lr(en.language,en.code,Le);return Cn.code=en.code,_i("after:highlight",Cn),Cn}function Lr(ee,be,Le,nt){const Et=Object.create(null);function en(se,ge){return se.keywords[ge]}function Cn(){if(!Ae.keywords){Tt.addText(rt);return}let se=0;Ae.keywordPatternRe.lastIndex=0;let ge=Ae.keywordPatternRe.exec(rt),Oe="";for(;ge;){Oe+=rt.substring(se,ge.index);const He=sn.case_insensitive?ge[0].toLowerCase():ge[0],Rt=en(Ae,He);if(Rt){const[pn,$g]=Rt;if(Tt.addText(Oe),Oe="",Et[He]=(Et[He]||0)+1,Et[He]<=kg&&(Ai+=$g),pn.startsWith("_"))Oe+=ge[0];else{const Vg=sn.classNameAliases[pn]||pn;on(ge[0],Vg)}}else Oe+=ge[0];se=Ae.keywordPatternRe.lastIndex,ge=Ae.keywordPatternRe.exec(rt)}Oe+=rt.substring(se),Tt.addText(Oe)}function Ti(){if(rt==="")return;let se=null;if(typeof Ae.subLanguage=="string"){if(!H[Ae.subLanguage]){Tt.addText(rt);return}se=Lr(Ae.subLanguage,rt,!0,pc[Ae.subLanguage]),pc[Ae.subLanguage]=se._top}else se=Yo(rt,Ae.subLanguage.length?Ae.subLanguage:null);Ae.relevance>0&&(Ai+=se.relevance),Tt.__addSublanguage(se._emitter,se.language)}function Ut(){Ae.subLanguage!=null?Ti():Cn(),rt=""}function on(se,ge){se!==""&&(Tt.startScope(ge),Tt.addText(se),Tt.endScope())}function uc(se,ge){let Oe=1;const He=ge.length-1;for(;Oe<=He;){if(!se._emit[Oe]){Oe++;continue}const Rt=sn.classNameAliases[se[Oe]]||se[Oe],pn=ge[Oe];Rt?on(pn,Rt):(rt=pn,Cn(),rt=""),Oe++}}function dc(se,ge){return se.scope&&typeof se.scope=="string"&&Tt.openNode(sn.classNameAliases[se.scope]||se.scope),se.beginScope&&(se.beginScope._wrap?(on(rt,sn.classNameAliases[se.beginScope._wrap]||se.beginScope._wrap),rt=""):se.beginScope._multi&&(uc(se.beginScope,ge),rt="")),Ae=Object.create(se,{parent:{value:Ae}}),Ae}function fc(se,ge,Oe){let He=v(se.endRe,Oe);if(He){if(se["on:end"]){const Rt=new t(se);se["on:end"](ge,Rt),Rt.isMatchIgnored&&(He=!1)}if(He){for(;se.endsParent&&se.parent;)se=se.parent;return se}}if(se.endsWithParent)return fc(se.parent,ge,Oe)}function Dg(se){return Ae.matcher.regexIndex===0?(rt+=se[0],1):(Jo=!0,0)}function Lg(se){const ge=se[0],Oe=se.rule,He=new t(Oe),Rt=[Oe.__beforeBegin,Oe["on:begin"]];for(const pn of Rt)if(pn&&(pn(se,He),He.isMatchIgnored))return Dg(ge);return Oe.skip?rt+=ge:(Oe.excludeBegin&&(rt+=ge),Ut(),!Oe.returnBegin&&!Oe.excludeBegin&&(rt=ge)),dc(Oe,se),Oe.returnBegin?0:ge.length}function Fg(se){const ge=se[0],Oe=be.substring(se.index),He=fc(Ae,se,Oe);if(!He)return oc;const Rt=Ae;Ae.endScope&&Ae.endScope._wrap?(Ut(),on(ge,Ae.endScope._wrap)):Ae.endScope&&Ae.endScope._multi?(Ut(),uc(Ae.endScope,se)):Rt.skip?rt+=ge:(Rt.returnEnd||Rt.excludeEnd||(rt+=ge),Ut(),Rt.excludeEnd&&(rt=ge));do Ae.scope&&Tt.closeNode(),!Ae.skip&&!Ae.subLanguage&&(Ai+=Ae.relevance),Ae=Ae.parent;while(Ae!==He.parent);return He.starts&&dc(He.starts,se),Rt.returnEnd?0:ge.length}function Bg(){const se=[];for(let ge=Ae;ge!==sn;ge=ge.parent)ge.scope&&se.unshift(ge.scope);se.forEach(ge=>Tt.openNode(ge))}let Ni={};function hc(se,ge){const Oe=ge&&ge[0];if(rt+=se,Oe==null)return Ut(),0;if(Ni.type==="begin"&&ge.type==="end"&&Ni.index===ge.index&&Oe===""){if(rt+=be.slice(ge.index,ge.index+1),!ht){const He=new Error(`0 width match regex (${ee})`);throw He.languageName=ee,He.badRule=Ni.rule,He}return 1}if(Ni=ge,ge.type==="begin")return Lg(ge);if(ge.type==="illegal"&&!Le){const He=new Error('Illegal lexeme "'+Oe+'" for mode "'+(Ae.scope||"<unnamed>")+'"');throw He.mode=Ae,He}else if(ge.type==="end"){const He=Fg(ge);if(He!==oc)return He}if(ge.type==="illegal"&&Oe==="")return rt+=`
63
+ `,1;if(Qo>1e5&&Qo>ge.index*3)throw new Error("potential infinite loop, way more iterations than matches");return rt+=Oe,Oe.length}const sn=Sn(ee);if(!sn)throw je(pt.replace("{}",ee)),new Error('Unknown language: "'+ee+'"');const jg=Bt(sn);let Xo="",Ae=nt||jg;const pc={},Tt=new ue.__emitter(ue);Bg();let rt="",Ai=0,Bn=0,Qo=0,Jo=!1;try{if(sn.__emitTokens)sn.__emitTokens(be,Tt);else{for(Ae.matcher.considerAll();;){Qo++,Jo?Jo=!1:Ae.matcher.considerAll(),Ae.matcher.lastIndex=Bn;const se=Ae.matcher.exec(be);if(!se)break;const ge=be.substring(Bn,se.index),Oe=hc(ge,se);Bn=se.index+Oe}hc(be.substring(Bn))}return Tt.finalize(),Xo=Tt.toHTML(),{language:ee,value:Xo,relevance:Ai,illegal:!1,_emitter:Tt,_top:Ae}}catch(se){if(se.message&&se.message.includes("Illegal"))return{language:ee,value:At(be),illegal:!0,relevance:0,_illegalBy:{message:se.message,index:Bn,context:be.slice(Bn-100,Bn+100),mode:se.mode,resultSoFar:Xo},_emitter:Tt};if(ht)return{language:ee,value:At(be),illegal:!1,relevance:0,errorRaised:se,_emitter:Tt,_top:Ae};throw se}}function qo(ee){const be={value:At(ee),illegal:!1,relevance:0,_top:pe,_emitter:new ue.__emitter(ue)};return be._emitter.addText(ee),be}function Yo(ee,be){be=be||ue.languages||Object.keys(H);const Le=qo(ee),nt=be.filter(Sn).filter(cc).map(Ut=>Lr(Ut,ee,!1));nt.unshift(Le);const Et=nt.sort((Ut,on)=>{if(Ut.relevance!==on.relevance)return on.relevance-Ut.relevance;if(Ut.language&&on.language){if(Sn(Ut.language).supersetOf===on.language)return 1;if(Sn(on.language).supersetOf===Ut.language)return-1}return 0}),[en,Cn]=Et,Ti=en;return Ti.secondBest=Cn,Ti}function Sg(ee,be,Le){const nt=be&&ie[be]||Le;ee.classList.add("hljs"),ee.classList.add(`language-${nt}`)}function Zo(ee){let be=null;const Le=St(ee);if(ke(Le))return;if(_i("before:highlightElement",{el:ee,language:Le}),ee.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ee);return}if(ee.children.length>0&&(ue.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ee)),ue.throwUnescapedHTML))throw new Ge("One of your code blocks includes unescaped HTML.",ee.innerHTML);be=ee;const nt=be.textContent,Et=Le?yt(nt,{language:Le,ignoreIllegals:!0}):Yo(nt);ee.innerHTML=Et.value,ee.dataset.highlighted="yes",Sg(ee,Le,Et.language),ee.result={language:Et.language,re:Et.relevance,relevance:Et.relevance},Et.secondBest&&(ee.secondBest={language:Et.secondBest.language,relevance:Et.secondBest.relevance}),_i("after:highlightElement",{el:ee,result:Et,text:nt})}function Cg(ee){ue=ic(ue,ee)}const _g=()=>{Ci(),L("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Tg(){Ci(),L("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ac=!1;function Ci(){function ee(){Ci()}if(document.readyState==="loading"){ac||window.addEventListener("DOMContentLoaded",ee,!1),ac=!0;return}document.querySelectorAll(ue.cssSelector).forEach(Zo)}function Ng(ee,be){let Le=null;try{Le=be(T)}catch(nt){if(je("Language definition for '{}' could not be registered.".replace("{}",ee)),ht)je(nt);else throw nt;Le=pe}Le.name||(Le.name=ee),H[ee]=Le,Le.rawDefinition=be.bind(null,T),Le.aliases&&lc(Le.aliases,{languageName:ee})}function Ag(ee){delete H[ee];for(const be of Object.keys(ie))ie[be]===ee&&delete ie[be]}function Rg(){return Object.keys(H)}function Sn(ee){return ee=(ee||"").toLowerCase(),H[ee]||H[ie[ee]]}function lc(ee,{languageName:be}){typeof ee=="string"&&(ee=[ee]),ee.forEach(Le=>{ie[Le.toLowerCase()]=be})}function cc(ee){const be=Sn(ee);return be&&!be.disableAutodetect}function Mg(ee){ee["before:highlightBlock"]&&!ee["before:highlightElement"]&&(ee["before:highlightElement"]=be=>{ee["before:highlightBlock"](Object.assign({block:be.el},be))}),ee["after:highlightBlock"]&&!ee["after:highlightElement"]&&(ee["after:highlightElement"]=be=>{ee["after:highlightBlock"](Object.assign({block:be.el},be))})}function Ig(ee){Mg(ee),Te.push(ee)}function Og(ee){const be=Te.indexOf(ee);be!==-1&&Te.splice(be,1)}function _i(ee,be){const Le=ee;Te.forEach(function(nt){nt[Le]&&nt[Le](be)})}function Pg(ee){return L("10.7.0","highlightBlock will be removed entirely in v12.0"),L("10.7.0","Please use highlightElement now."),Zo(ee)}Object.assign(T,{highlight:yt,highlightAuto:Yo,highlightAll:Ci,highlightElement:Zo,highlightBlock:Pg,configure:Cg,initHighlighting:_g,initHighlightingOnLoad:Tg,registerLanguage:Ng,unregisterLanguage:Ag,listLanguages:Rg,getLanguage:Sn,registerAliases:lc,autoDetection:cc,inherit:ic,addPlugin:Ig,removePlugin:Og}),T.debugMode=function(){ht=!1},T.safeMode=function(){ht=!0},T.versionString=Fe,T.regex={concat:m,lookahead:f,either:y,optional:g,anyNumberOfTimes:p};for(const ee in le)typeof le[ee]=="object"&&e(le[ee]);return Object.assign(T,le),T},tr=sc({});return tr.newInstance=()=>sc({}),Ls=tr,tr.HighlightJS=tr,tr.default=tr,Ls}var _N=CN();const TN=Ro(_N),Ld={},NN="hljs-";function AN(e){const t=TN.newInstance();return e&&o(e),{highlight:n,highlightAuto:r,listLanguages:i,register:o,registerAlias:s,registered:a};function n(l,c,u){const d=u||Ld,f=typeof d.prefix=="string"?d.prefix:NN;if(!t.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");t.configure({__emitter:RN,classPrefix:f});const p=t.highlight(c,{ignoreIllegals:!0,language:l});if(p.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:p.errorRaised});const g=p._emitter.root,m=g.data;return m.language=p.language,m.relevance=p.relevance,g}function r(l,c){const d=(c||Ld).subset||i();let f=-1,p=0,g;for(;++f<d.length;){const m=d[f];if(!t.getLanguage(m))continue;const x=n(m,l,c);x.data&&x.data.relevance!==void 0&&x.data.relevance>p&&(p=x.data.relevance,g=x)}return g||{type:"root",children:[],data:{language:void 0,relevance:p}}}function i(){return t.listLanguages()}function o(l,c){if(typeof l=="string")t.registerLanguage(l,c);else{let u;for(u in l)Object.hasOwn(l,u)&&t.registerLanguage(u,l[u])}}function s(l,c){if(typeof l=="string")t.registerAliases(typeof c=="string"?c:[...c],{languageName:l});else{let u;for(u in l)if(Object.hasOwn(l,u)){const d=l[u];t.registerAliases(typeof d=="string"?d:[...d],{languageName:u})}}}function a(l){return!!t.getLanguage(l)}}class RN{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],i=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(t){const n=this,r=t.split(".").map(function(s,a){return a?s+"_".repeat(a):n.options.classPrefix+s}),i=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const MN={};function IN(e){const t=e||MN,n=t.aliases,r=t.detect||!1,i=t.languages||SN,o=t.plainText,s=t.prefix,a=t.subset;let l="hljs";const c=AN(i);if(n&&c.registerAlias(n),s){const u=s.indexOf("-");l=u===-1?s:s.slice(0,u)}return function(u,d){Do(u,"element",function(f,p,g){if(f.tagName!=="code"||!g||g.type!=="element"||g.tagName!=="pre")return;const m=ON(f);if(m===!1||!m&&!r||m&&o&&o.includes(m))return;Array.isArray(f.properties.className)||(f.properties.className=[]),f.properties.className.includes(l)||f.properties.className.unshift(l);const x=XT(f,{whitespace:"pre"});let y;try{y=m?c.highlight(m,x,{prefix:s}):c.highlightAuto(x,{prefix:s,subset:a})}catch(k){const v=k;if(m&&/Unknown language/.test(v.message)){d.message("Cannot highlight as `"+m+"`, it’s not registered",{ancestors:[g,f],cause:v,place:f.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw v}!m&&y.data&&y.data.language&&f.properties.className.push("language-"+y.data.language),y.children.length>0&&(f.children=y.children)})}}function ON(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const i=String(t[n]);if(i==="no-highlight"||i==="nohighlight")return!1;!r&&i.slice(0,5)==="lang-"&&(r=i.slice(5)),!r&&i.slice(0,9)==="language-"&&(r=i.slice(9))}return r}function PN({onSendMessage:e,onSendAttachments:t,disabled:n,theme:r,onEndChat:i,attachmentsEnabled:o=!0}){const[s,a]=P.useState(""),[l,c]=P.useState(!1),u=P.useRef(null),d=P.useRef(null),[f,p]=P.useState(!1),g=Ct(r);P.useEffect(()=>{const S=()=>{const C=navigator.userAgent.toLowerCase(),N=["android","iphone","ipad","mobile","tablet"].some(R=>C.includes(R)),I="ontouchstart"in window||navigator.maxTouchPoints>0,b=window.innerWidth<=768;p(N||I&&b)};return S(),window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const m=S=>{S.preventDefault(),s.trim()&&!n&&(e(s.trim()),a(""))},x=S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),m(S))},y=S=>{const C=S.target.files;if(C&&C.length>0){const M=Array.from(C),N=M.filter(I=>I.type.startsWith("image/"));if(N.length===0){console.warn("No valid image files selected");return}N.length!==M.length&&console.warn("Some non-image files were filtered out"),t(N),u.current&&(u.current.value="")}},k=()=>{!n&&u.current&&u.current.click()},v=()=>{!n&&f&&d.current&&d.current.click()},_=S=>{const C=S.target.files;if(C&&C.length>0){const M=C[0];M.type.startsWith("image/")?t([M]):console.warn("Selected file is not an image"),d.current&&(d.current.value="")}};return h.jsx("div",{className:"px-4 py-3 !w-full backdrop-blur-xl border-0 shadow-lg ",children:h.jsx("form",{onSubmit:m,className:"flex items-center !w-full",children:h.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":g.chatInput.container}`,children:[o&&h.jsx(Ie.button,{type:"button",onClick:k,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Attach file",children:h.jsx(We.Paperclip,{className:"w-4 h-4"})}),o&&f&&h.jsx(Ie.button,{type:"button",onClick:v,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-1 rounded-full transition-all duration-200 border-0 ${g.chatInput.attachButton}`,disabled:n,"aria-label":"Take photo",children:h.jsx(We.Camera,{className:"w-4 h-4"})}),o&&h.jsx("input",{ref:u,type:"file",multiple:!0,onChange:y,className:"hidden",accept:"image/*"}),o&&h.jsx("input",{ref:d,type:"file",onChange:_,className:"hidden",accept:"image/*",capture:"environment"}),h.jsx("textarea",{value:s,onChange:S=>a(S.target.value),onKeyDown:x,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 ${g.chatInput.textarea}`,rows:1,style:{height:"auto",minHeight:"32px"},onInput:S=>{const C=S.target;C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,80)}px`}}),h.jsx(Ie.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?g.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:h.jsx(We.SendHorizontal,{className:"w-4 h-4"})}),i&&h.jsx(Ie.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 ${g.chatInput.endButton}`,"aria-label":"End chat",children:h.jsx(We.PhoneOff,{className:"w-4 h-4"})})]})})})}function DN({text:e,isComplete:t,isRealTimeStream:n=!1,speed:r=50}){const[i,o]=P.useState(""),[s,a]=P.useState(0);return P.useEffect(()=>{if(n){o(e);return}if(t){o(e);return}if(s<e.length){const l=setTimeout(()=>{o(e.slice(0,s+1)),a(s+1)},r);return()=>clearTimeout(l)}},[e,s,t,r,n]),P.useEffect(()=>{n||(a(0),o(""))},[e,n]),h.jsxs("span",{className:"relative",children:[h.jsx("span",{className:"inline-block",children:i}),!t&&h.jsx("span",{className:"inline-flex items-center ml-1",children:[0,1,2].map(l=>h.jsx(Ie.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 LN({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var u,d,f,p;const i=Ct(t),o=e.sender.name?e.sender.name.split(" ").map(g=>g[0]).join("").toUpperCase().slice(0,2):"U",s=((u=e==null?void 0:e.metadata)==null?void 0:u.format)==="markdown"||((d=e==null?void 0:e.metadata)==null?void 0:d.markdown)===!0||/(\n|^)#\s|\n##\s|```|\*\s|\-\s|\d+\.\s|>\s|!\[|\]\(https?:\/\//.test(e.content)||/^```markdown\s[\s\S]*```$/.test(e.content.trim())||/^``markdown\s[\s\S]*``?$/.test(e.content.trim())||/^``markdown\s[\s\S]*$/.test(e.content.trim())||/^`markdown\s[\s\S]*`$/.test(e.content.trim())||/\[.*\]\(.*\)/.test(e.content)||/\|.*\|/.test(e.content)||/^-\s/.test(e.content)||/^\*\s/.test(e.content)||/^\d+\.\s/.test(e.content)||/(^|\n)#.*\n#/.test(e.content)||/```[\s\S]*?```[\s\S]*?```/.test(e.content)||/#.*\n/.test(e.content)&&(/```/.test(e.content)||/^\s*[\-\*]\s/m.test(e.content))||e.content.includes("README")&&/#/.test(e.content)||/^`+markdown\s/.test(e.content.trim()),a=P.useMemo(()=>{if(!s)return e.content;const g=e.content.trim(),m=g.match(/^```markdown\s?([\s\S]*?)```$/);if(m)return m[1].trim();let x=g.match(/^``markdown\s?([\s\S]*?)``$/);if(x)return x[1].trim();if(g.startsWith("``markdown"))return g.replace(/^``markdown\s*\n?/,"").replace(/``?$/,"").trim();const y=g.match(/^`markdown\s?([\s\S]*?)`$/);return y?y[1].trim():e.content},[e.content,s]),l=g=>{const m=/(https?:\/\/[^\s<>"{}|\\^`[\]]*)/g;return g.split(m).map((y,k)=>m.test(y)?h.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:`underline font-medium transition-colors hover:opacity-80 cursor-pointer ${t==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800"}`,onClick:v=>{v.preventDefault(),window.open(y,"_blank","noopener,noreferrer")},children:y},k):y)},c={h1:g=>h.jsx("h1",{className:`text-lg font-bold mt-4 mb-2 pb-1 border-b ${t==="dark"?"border-gray-600 text-gray-100":"border-gray-200 text-gray-900"}`,...g}),h2:g=>h.jsx("h2",{className:`text-base font-semibold mt-3 mb-2 ${t==="dark"?"text-gray-200":"text-gray-800"}`,...g}),h3:g=>h.jsx("h3",{className:`text-sm font-semibold mt-2 mb-1 ${t==="dark"?"text-gray-300":"text-gray-700"}`,...g}),p:g=>h.jsx("p",{className:"my-2 leading-relaxed",...g}),a:({href:g,children:m,...x})=>{const y=g||(typeof m=="string"&&m.startsWith("http")?m:"#");return h.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:`underline font-medium transition-colors hover:opacity-80 cursor-pointer ${t==="dark"?"text-blue-400 hover:text-blue-300":"text-blue-600 hover:text-blue-800"}`,onClick:k=>{if(!y||y==="#"){k.preventDefault();return}},...x,children:m})},code:({inline:g,className:m,children:x,...y})=>{const k=/language-(\w+)/.exec(m||""),v=k?k[1]:"";return g?h.jsx("code",{className:`px-1.5 py-0.5 rounded text-[0.85em] font-mono ${t==="dark"?"bg-gray-700 text-gray-200":"bg-gray-100 text-gray-800"}`,...y,children:x}):h.jsxs("div",{className:"my-3",children:[v&&h.jsx("div",{className:`px-3 py-1 text-xs font-medium rounded-t-md ${t==="dark"?"bg-gray-900 text-gray-300 border-b border-gray-700":"bg-gray-50 text-gray-600 border-b border-gray-200"}`,children:v}),h.jsx("pre",{className:`overflow-x-auto text-sm ${v?"rounded-t-none":""} rounded-md ${t==="dark"?"bg-gray-900 border border-gray-700 text-gray-100":"bg-gray-50 border border-gray-200 text-gray-900"}`,style:{margin:0},children:h.jsx("code",{className:`block p-3 font-mono ${t==="dark"?"text-gray-100":"text-gray-900"} ${m||""}`,...y,children:x})})]})},pre:({children:g,...m})=>h.jsx(h.Fragment,{children:g}),ul:g=>h.jsx("ul",{className:"list-disc pl-5 my-2 space-y-1",...g}),ol:g=>h.jsx("ol",{className:"list-decimal pl-5 my-2 space-y-1",...g}),li:g=>h.jsx("li",{className:"leading-relaxed",...g}),blockquote:g=>h.jsx("blockquote",{className:`border-l-4 pl-4 italic my-3 ${t==="dark"?"border-gray-600 text-gray-300 bg-gray-800/30":"border-gray-300 text-gray-600 bg-gray-50/50"}`,...g}),img:g=>h.jsx("img",{className:"max-w-full h-auto rounded-md my-2 shadow-sm",loading:"lazy",...g}),table:g=>h.jsx("div",{className:"overflow-x-auto my-3",children:h.jsx("table",{className:`min-w-full text-left text-sm border rounded-md ${t==="dark"?"border-gray-600":"border-gray-200"}`,...g})}),th:g=>h.jsx("th",{className:`px-3 py-2 font-semibold border-b ${t==="dark"?"bg-gray-800 border-gray-600 text-gray-200":"bg-gray-50 border-gray-200 text-gray-700"}`,...g}),td:g=>h.jsx("td",{className:`px-3 py-2 border-b ${t==="dark"?"border-gray-700":"border-gray-200"}`,...g}),hr:g=>h.jsx("hr",{className:`my-4 border-0 h-px ${t==="dark"?"bg-gray-600":"bg-gray-300"}`,...g}),strong:g=>h.jsx("strong",{className:"font-semibold",...g}),em:g=>h.jsx("em",{className:"italic",...g})};return h.jsx("div",{className:`flex w-full ${n?"justify-end":"justify-start"} mb-4 px-1`,children:h.jsxs("div",{className:`relative group ${n?"flex-row-reverse":"flex-row"} flex items-end gap-3 max-w-[85%] min-w-0`,children:[h.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:o}),h.jsxs("div",{className:`
64
+ 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
65
+ ${n?`${i.chatMessage.own} rounded-br-md`:`${i.chatMessage.other} rounded-bl-md`}
66
+ ${r?"shimmer":""}
67
+ transition-all duration-200 group-hover:scale-[1.02]
68
+ `,style:{wordWrap:"break-word",overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[h.jsx("div",{className:"leading-relaxed text-sm overflow-hidden",children:((f=e.metadata)==null?void 0:f.type)==="attachment"?h.jsx(jN,{message:e,theme:t,isOwn:n}):r&&!n?h.jsx(DN,{text:e.content,isComplete:!r,isRealTimeStream:((p=e.metadata)==null?void 0:p.streaming)===!0,speed:35}):s?h.jsx(MC,{remarkPlugins:[HT],rehypePlugins:[IN],components:c,children:a}):h.jsx("span",{className:"whitespace-pre-wrap break-words",children:l(e.content)})}),h.jsx("div",{className:"text-xs",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})})}function FN(e,t){return e.startsWith("image/")?We.Image:e.startsWith("video/")?We.Video:e.startsWith("audio/")?We.Music:e.includes("zip")||e.includes("rar")||e.includes("archive")?We.Archive:We.FileText}function BN(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 jN({message:e,theme:t,isOwn:n}){const r=Ct(t),i=e.metadata,o=(i==null?void 0:i.fileName)||"Unknown file",s=(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,f=i==null?void 0:i.downloadUrl,p=i==null?void 0:i.file,g=FN(a),m=l||c,x=l?u:d,y=l?"Downloading...":c?"Uploading...":"Complete",[k,v]=P.useState(null);P.useEffect(()=>{if(f)v(f);else if(p&&a.startsWith("image/")){const M=URL.createObjectURL(p);return v(M),()=>URL.revokeObjectURL(M)}else v(null)},[f,p,a]);const _=()=>{if(f){const M=document.createElement("a");M.href=f,M.download=o,M.click()}},C=a.startsWith("image/")&&k;return h.jsxs("div",{className:"flex flex-col gap-2 max-w-full sm:max-w-sm",children:[C&&h.jsxs("div",{className:"relative rounded-lg overflow-hidden",children:[h.jsx("img",{src:k,alt:o,className:"max-w-full h-auto max-h-48 object-cover rounded-lg cursor-pointer",onClick:_}),h.jsx("div",{className:"absolute inset-0 bg-black/0 hover:bg-black/10 transition-colors duration-200 cursor-pointer"})]}),h.jsxs("div",{className:`
69
+ flex items-center gap-3 p-3 rounded-lg border transition-all duration-200
70
+ ${t==="light"?"bg-gray-50 border-gray-200 hover:bg-gray-100":"bg-gray-800/50 border-gray-700 hover:bg-gray-700/50"}
71
+ `,children:[h.jsx("div",{className:`
72
+ p-2 rounded-lg flex-shrink-0
73
+ ${t==="light"?"bg-blue-100 text-blue-600":"bg-blue-900/50 text-blue-400"}
74
+ `,children:h.jsx(g,{className:"w-5 h-5"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:`font-medium text-sm truncate ${r.text.primary}`,children:o}),h.jsxs("div",{className:`text-xs ${r.text.muted}`,children:[s>0&&BN(s),m&&h.jsxs(h.Fragment,{children:[s>0&&" • ",y," ",Math.round(x*100),"%"]})]}),m&&h.jsx("div",{className:`
75
+ w-full h-1 rounded-full mt-1 overflow-hidden
76
+ ${t==="light"?"bg-gray-200":"bg-gray-700"}
77
+ `,children:h.jsx(Ie.div,{className:`h-full ${t==="light"?"bg-blue-500":"bg-blue-400"}`,initial:{width:0},animate:{width:`${x*100}%`},transition:{duration:.3}})})]}),f&&!m&&h.jsx(Ie.button,{onClick:_,whileHover:{scale:1.05},whileTap:{scale:.95},className:`
78
+ p-2 rounded-lg transition-colors duration-200
79
+ ${t==="light"?"hover:bg-gray-200 text-gray-600 hover:text-gray-800":"hover:bg-gray-600 text-gray-400 hover:text-gray-200"}
80
+ `,"aria-label":"Download file",children:h.jsx(We.Download,{className:"w-4 h-4"})})]})]})}function $N(){return h.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:[h.jsx("div",{className:"text-2xl mb-2",children:"✅"}),h.jsx("div",{className:"text-green-700 font-semibold text-sm mb-1",children:"Success!"}),h.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"Your action was completed successfully."})]})}function VN(){return h.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:[h.jsx("div",{className:"text-2xl mb-2",children:"⏰"}),h.jsx("div",{className:"text-yellow-700 font-semibold text-sm mb-1",children:"Interaction timed out"}),h.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:"No response was provided in time."})]})}function Vl({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:i="widget",onEndChat:o,showTimer:s=!0}){const a=P.useMemo(()=>{const Z=e.getCurrentAgentInfo();return No(Z)},[e]),{suggestedReplyEnabled:l,attachmentsEnabled:c}=P.useMemo(()=>lp(a),[a]),u=P.useMemo(()=>Ao(a),[a]),[d,f]=P.useState(()=>e&&typeof e.getChatMessages=="function"?e.getChatMessages():[]),[p,g]=P.useState(!0),[m,x]=P.useState(()=>{const Z=e&&typeof e.getCurrentSession=="function"&&!!e.getCurrentSession(),te=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!Z&&!te}),[y,k]=P.useState(new Set),[v,_]=P.useState([]),[S,C]=P.useState(!1),[M,N]=P.useState(!1),[I,b]=P.useState(()=>e.getCurrentInteraction()),R=P.useRef(null),O=P.useRef(null),[D,$]=P.useState(!0),U=Ct(t);P.useEffect(()=>{const Z=()=>{const te=navigator.userAgent.toLowerCase(),ae=["android","iphone","ipad","mobile","tablet"].some(Ce=>te.includes(Ce)),ve="ontouchstart"in window||navigator.maxTouchPoints>0,Ne=window.innerWidth<=768,_e=ae||ve&&Ne;C(_e),_e&&i==="widget"&&N(!0)};return Z(),window.addEventListener("resize",Z),()=>window.removeEventListener("resize",Z)},[i]),P.useEffect(()=>(M&&S&&(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)),()=>{M&&S&&(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))}),[M,S]);const re=e.getCurrentAgentInfo(),ne=(re==null?void 0:re.name)||"AI Assistant",j=ne.split(" ").map(Z=>Z[0]).join("").toUpperCase().slice(0,2),W=P.useCallback(Z=>{const te={id:`local_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:Z,timestamp:new Date,sender:{id:"participant",name:"You",type:"participant"},metadata:{isLocal:!0}};f(ye=>[...ye,te])},[]),w=P.useCallback((Z=!1)=>{if(O.current){const te=O.current;Z?te.scrollTop=te.scrollHeight:te.scrollTo({top:te.scrollHeight,behavior:"smooth"})}},[]),F=P.useCallback(()=>{if(O.current){const{scrollTop:Z,scrollHeight:te,clientHeight:ye}=O.current;return te-Z-ye<100}return!0},[]),Y=P.useCallback(()=>{const Z=F();$(Z)},[F]),E=P.useCallback((Z=!1)=>{D&&w(Z)},[D,w]);P.useEffect(()=>{if(D&&d.length>0){E(!0);const Z=setTimeout(()=>{D&&E(!1)},10);return()=>clearTimeout(Z)}},[d.length,E,D]),P.useEffect(()=>{if(I&&D){E(!0);const Z=setTimeout(()=>{D&&E(!1)},50);return()=>clearTimeout(Z)}},[I,E,D]),P.useEffect(()=>{const Z=ae=>{if(console.log("ChatView: Received message:",ae),x(!1),I&&ae.sender.type==="agent"){console.log("ChatView: Queuing agent message due to active interaction:",I.methodName),_(ve=>[...ve,ae]);return}ae.sender.type==="agent"&&g(!1),f(ve=>{var _e;if(ve.some(Ce=>Ce.id===ae.id))return console.log("ChatView: Message already exists, skipping:",ae.id),ve;if(console.log("ChatView: Adding new message:",ae.id),ae.sender.type==="agent"&&(k(Ce=>new Set(Ce).add(ae.id)),!((_e=ae.metadata)!=null&&_e.streaming))){const Ce=ae.content.length*35+1e3;setTimeout(()=>{k(bt=>{const vt=new Set(bt);return vt.delete(ae.id),vt})},Ce)}return[...ve,ae]}),setTimeout(()=>{D&&E(!0)},0)},te=ae=>{var ve;if(console.log("ChatView: Updated message:",ae),I&&ae.sender.type==="agent"){console.log("ChatView: Queuing agent message update due to active interaction:",I.methodName),_(Ne=>{const _e=Ne.findIndex(Ce=>Ce.id===ae.id);if(_e>=0){const Ce=[...Ne];return Ce[_e]=ae,Ce}else return[...Ne,ae]});return}f(Ne=>Ne.map(_e=>_e.id===ae.id?{...ae}:_e)),setTimeout(()=>{D&&E(!0)},0),(ve=ae.metadata)!=null&&ve.streaming||k(Ne=>{const _e=new Set(Ne);return _e.delete(ae.id),_e})},ye=ae=>{console.log("ChatView: Sent message:",ae),x(!1),f(ve=>ve.some(_e=>_e.id===ae.id)?(console.log("ChatView: Sent message already exists, skipping:",ae.id),ve):(console.log("ChatView: Adding sent message:",ae.id),[...ve,ae])),setTimeout(()=>{D&&E(!0)},0)};return e.on("chat.message.received",Z),e.on("chat.message.updated",te),e.on("chat.message.sent",ye),()=>{e.off("chat.message.received",Z),e.off("chat.message.updated",te),e.off("chat.message.sent",ye)}},[e,I,D,E]),P.useEffect(()=>{const Z=ve=>{console.log("ChatView: RPC interaction started:",ve);const Ne=e.getCurrentInteraction();console.log("ChatView: Got interaction from client:",Ne==null?void 0:Ne.methodName),b(Ne),g(!1),D&&(E(!0),setTimeout(()=>{D&&E(!1)},100))},te=ve=>{if(console.log("ChatView: RPC interaction completed:",ve),b(null),v.length>0&&(console.log("ChatView: Processing",v.length,"queued messages"),f(Ne=>{const _e=[...Ne];return v.forEach(Ce=>{var vt;if(!_e.some(je=>je.id===Ce.id)&&(console.log("ChatView: Adding queued message:",Ce.id),_e.push(Ce),Ce.sender.type==="agent"&&(k(je=>new Set(je).add(Ce.id)),!((vt=Ce.metadata)!=null&&vt.streaming)))){const je=Ce.content.length*35+1e3;setTimeout(()=>{k(ut=>{const L=new Set(ut);return L.delete(Ce.id),L})},je)}}),_e}),_([]),setTimeout(()=>{D&&E(!0)},0)),ve&&ve.response&&ve.response.success){let Ne=null;ve.response.successView?Ne=ve.response.successView:ve.successView&&(Ne=ve.successView),f(_e=>{const Ce=[..._e].reverse().findIndex(ut=>ut.sender.type==="participant");let bt=_e.length;Ce!==-1&&(bt=_e.length-Ce);const vt={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||h.jsx($N,{})}};e&&typeof e.addChatMessage=="function"&&e.addChatMessage(vt);const je=[..._e];return je.splice(bt,0,vt),je})}},ye=async ve=>{I&&(console.log("ChatView: Dismissing active interaction due to timeout"),e.dismissCurrentInteraction()),b(null),v.length>0&&(console.log("ChatView: Processing",v.length,"queued messages after timeout"),f(_e=>{const Ce=[..._e];return v.forEach(bt=>{var je;if(!Ce.some(ut=>ut.id===bt.id)&&(Ce.push(bt),bt.sender.type==="agent"&&(k(ut=>new Set(ut).add(bt.id)),!((je=bt.metadata)!=null&&je.streaming)))){const ut=bt.content.length*35+1e3;setTimeout(()=>{k(L=>{const J=new Set(L);return J.delete(bt.id),J})},ut)}}),Ce}),_([]),setTimeout(()=>{D&&E(!0)},0));let Ne=null;ve&&ve.response&&ve.response.timeoutView?Ne=ve.response.timeoutView:ve&&ve.timeoutView&&(Ne=ve.timeoutView),f(_e=>{const Ce={id:`timeout_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,content:"",timestamp:new Date,sender:{id:"agent",name:ne,type:"agent"},metadata:{type:"timeoutView",view:Ne||h.jsx(VN,{})}};return e&&typeof e.addChatMessage=="function"&&e.addChatMessage(Ce),[..._e,Ce]}),setTimeout(()=>{e.getCurrentInteraction()||b(null)},100)},ae=async ve=>{console.log("ChatView: RPC interaction dismissed:",ve),console.log("ChatView: Current interaction before dismiss:",I==null?void 0:I.methodName),b(null),v.length>0&&(console.log("ChatView: Processing",v.length,"queued messages after dismissal"),f(Ne=>{const _e=[...Ne];return v.forEach(Ce=>{var vt;if(!_e.some(je=>je.id===Ce.id)&&(_e.push(Ce),Ce.sender.type==="agent"&&(k(je=>new Set(je).add(Ce.id)),!((vt=Ce.metadata)!=null&&vt.streaming)))){const je=Ce.content.length*35+1e3;setTimeout(()=>{k(ut=>{const L=new Set(ut);return L.delete(Ce.id),L})},je)}}),_e}),_([]),setTimeout(()=>{D&&E(!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&&b(null)},50),console.log("ChatView: Set currentInteraction to null after dismiss")};return e.on("rpc.interaction.started",Z),e.on("rpc.interaction.completed",te),e.on("rpc.interaction.timeout",ye),e.on("rpc.interaction.dismissed",ae),()=>{e.off("rpc.interaction.started",Z),e.off("rpc.interaction.completed",te),e.off("rpc.interaction.timeout",ye),e.off("rpc.interaction.dismissed",ae)}},[e,D,E,ne,v]),P.useEffect(()=>{const Z=()=>{if(console.log("ChatView: Agent is thinking"),I){console.log("ChatView: Suppressing thinking indicator due to active interaction:",I.methodName);return}g(!0)},te=()=>{console.log("ChatView: Agent is speaking"),g(!1)};return e.on("agent.thinking",Z),e.on("agent.speaking",te),()=>{e.off("agent.thinking",Z),e.off("agent.speaking",te)}},[e,I]),P.useEffect(()=>{const Z=e.getCurrentInteraction();Z?(console.log("ChatView: Restoring interaction state on mount/client change:",Z.methodName),b(Z)):b(null)},[e]),P.useEffect(()=>{console.log("ChatView: Display type changed to:",i,"Current interaction:",(I==null?void 0:I.methodName)||"none")},[i,I]);const B=async Z=>{try{I&&(console.log("ChatView: Dismissing active interaction due to user message send"),e.dismissCurrentInteraction(),b(null)),await e.sendChatMessage(Z)}catch(te){console.error("Failed to send message:",te)}},z=async Z=>{try{I&&(console.log("ChatView: Dismissing active interaction due to user attachment send"),e.dismissCurrentInteraction(),b(null)),await e.sendAttachments(Z),console.log("Attachments sent successfully:",Z.map(te=>te.name))}catch(te){console.error("Failed to send attachments:",te)}},[K,q]=P.useState([]);P.useEffect(()=>{const Z=te=>{q(Array.isArray(te)?te:["tes","hello how are you","algebra make me learn that ","what is the meaning of life"])};return e.on("suggested.response",Z),()=>{e.off("suggested.response",Z)}},[e]);const me=M&&S?"fullscreen":i,Q=me==="fullscreen"?M&&S?"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",le=me==="fullscreen"?M&&S?"flex items-center w-full justify-between px-3 h-11 bg-black/80 text-white border-b border-gray-700":`flex items-center w-full justify-between px-5 h-12 border-b ${U.chatHeader.container}`:`flex items-center w-full justify-between px-4 h-12 border-b ${U.chatHeader.container}`,he=me==="fullscreen"?M&&S?"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",G="flex-shrink-0 !w-full",Se=()=>{N(!1),n&&n()};return h.jsxs("div",{className:`${Q} relative`,children:[h.jsx("div",{className:le,children:h.jsxs("div",{className:"flex items-center justify-between w-full",children:[h.jsx("div",{className:"flex items-center gap-2",children:h.jsx("h3",{className:`font-semibold text-sm leading-tight ${M&&S?"text-white":U.text.primary}`,children:ne})}),s&&u&&h.jsx("div",{className:"flex-1 flex justify-center",children:h.jsx(ci,{duration:u,theme:t,onTimerExpired:()=>{console.log("Session timer expired")},showIcon:!1,className:"text-xs"})}),n&&h.jsx(Ie.button,{onClick:Se,whileHover:{scale:1.05},whileTap:{scale:.95},className:`p-2 rounded-full transition-colors ml-1 ${M&&S?"bg-white/20 hover:bg-white/30 text-white":t==="light"?"bg-gray-100 hover:bg-gray-200 text-gray-600":"bg-gray-700/60 hover:bg-gray-600/60 text-gray-200"}`,"aria-label":"Close chat",children:"✕"})]})}),h.jsxs("div",{ref:O,className:`${he} flex flex-col`,style:{scrollBehavior:"smooth",scrollbarWidth:"none",contain:"layout style paint",overscrollBehavior:"contain"},onScroll:Y,children:[" ",d.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center py-12",children:[h.jsx(Ie.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:j}),h.jsxs("p",{className:`text-base mb-2 ${M&&S?"text-white":U.text.secondary}`,children:[ne," is joining..."]}),h.jsx("p",{className:`text-xs ${M&&S?"text-gray-300":U.text.muted}`,children:"Your conversation will begin shortly"})]}):h.jsx("div",{className:"w-full space-y-3 py-4 flex-1 flex flex-col justify-end",children:h.jsxs("div",{className:"space-y-3",children:[d.map((Z,te)=>{var ye,ae;return h.jsx("div",{children:((ye=Z.metadata)==null?void 0:ye.type)==="successView"?h.jsx("div",{className:"flex w-full justify-end mb-4 px-1",children:h.jsxs("div",{className:"relative group flex-row-reverse flex items-end gap-3 max-w-[85%] min-w-0",children:[h.jsx(Ie.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"}),h.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 ${U.chatMessage.own} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[Z.metadata.view,h.jsx("div",{className:`text-xs ${U.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:Z.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):((ae=Z.metadata)==null?void 0:ae.type)==="timeoutView"?h.jsx("div",{className:"flex w-full justify-start mb-4 px-1",children:h.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[h.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:j}),h.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 ${U.chatMessage.other} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[Z.metadata.view,h.jsx("div",{className:`text-xs ${U.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:Z.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}):h.jsx(LN,{message:Z,theme:t,isOwn:Z.sender.type==="participant",isStreaming:y.has(Z.id)})},Z.id)}),p&&!I&&h.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:d.length*.1},className:"flex w-full justify-start mb-4 px-1",children:h.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[h.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:j}),h.jsx("div",{className:`relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover ${U.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:h.jsx("span",{className:"inline-flex items-center",children:[0,1,2].map(Z=>h.jsx(Ie.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))})})]})}),I&&I.presentationMode==="embedded"&&h.jsxs("div",{className:"relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0",children:[h.jsx(Ie.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:j}),h.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 ${U.chatMessage.other} min-w-0 max-w-full break-words overflow-hidden`,style:{overflowWrap:"anywhere",wordBreak:"break-word",hyphens:"auto"},children:[h.jsx(li,{interaction:I,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:W},I.methodName),h.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:`text-xs ${U.text.muted} mt-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 `,children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),h.jsx("div",{ref:R})]})})]}),!D&&h.jsx(Ie.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},onClick:()=>{$(!0),w(!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:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 14l-7 7m0 0l-7-7m7 7V3"})})}),l&&K.length>0&&h.jsx("div",{className:"w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide",children:K.map((Z,te)=>{var ye;return h.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
81
+ ${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":((ye=U.suggestedResponse)==null?void 0:ye.container)||"bg-gradient-to-br from-blue-500 to-purple-600 text-white border-blue-400 hover:from-blue-600 hover:to-purple-700"}
82
+ `,style:{boxShadow:t==="vox"?"0 2px 8px 0 rgba(80,60,200,0.10)":void 0,borderWidth:1},onClick:()=>{B(Z),q([])},children:Z},Z+te)})}),I&&I.presentationMode!=="embedded"&&h.jsx(li,{interaction:I,theme:t,onDismiss:()=>e.dismissCurrentInteraction(),client:e,addLocalMessage:W},I.methodName),h.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:G,children:h.jsx(PN,{onSendMessage:B,onSendAttachments:z,disabled:r,theme:t,onEndChat:o,attachmentsEnabled:c})})]})}const Bm=A.forwardRef(({disabled:e,sessionStarted:t,participantName:n="User",loadingText:r="Waiting for agent to connect...",theme:i="vox",client:o,displayType:s="widget",onBack:a},l)=>{var W,w,F,Y,E;const[c,u]=A.useState(!1),[d,f]=A.useState(!1),[p,g]=A.useState(!1),[m,x]=A.useState(()=>{var B;return((B=o==null?void 0:o.getCurrentInteraction)==null?void 0:B.call(o))||null}),[y,k]=A.useState(()=>t),v=A.useRef(null),_=A.useMemo(()=>{var z;const B=(z=o==null?void 0:o.getCurrentAgentInfo)==null?void 0:z.call(o);return No(B)},[o]),S=A.useMemo(()=>Ao(_),[_]);A.useMemo(()=>cp(_),[_]);const C=A.useRef(null),[M,N]=A.useState(64);A.useLayoutEffect(()=>{const B=C.current;if(!B)return;const z=()=>N(B.offsetHeight||64);z();const K=new ResizeObserver(()=>z());return K.observe(B),window.addEventListener("resize",z),()=>{K.disconnect(),window.removeEventListener("resize",z)}},[]),xv();const{agent:{isActive:I=!1}={}}=o?xl(o):{agent:{isActive:!1}},b=to(o,"microphone"),R=Ct(i),O=A.useMemo(()=>o!=null&&o.getCurrentSession?!!o.getCurrentSession():!1,[o]),D=A.useMemo(()=>o!=null&&o.getIsAgentConnected&&o.getIsAgentConnected()||p,[o,p]),$=I||D;A.useEffect(()=>{$&&y&&k(!1)},[$,y]),A.useEffect(()=>{if(t&&!$){const B=setTimeout(()=>{O&&!$&&(g(!0),f(!1))},5e3),z=setTimeout(()=>{$||f(!0)},3e4);return()=>{clearTimeout(B),clearTimeout(z)}}else $&&f(!1)},[t,$,O]),A.useEffect(()=>{if(!o)return;const B=()=>{x(null),u(!1),f(!1)};return o.on("connection.disconnected",B),()=>o.off("connection.disconnected",B)},[o]),A.useEffect(()=>{if(!o)return;const B=()=>{g(!0),f(!1),k(!1)},z=B,K=B,q=()=>{g(!1),t&&k(!0)};return o.on("agent.connected",B),o.on("agent.speaking",z),o.on("agent.thinking",K),o.on("connection.disconnected",q),()=>{o.off("agent.connected",B),o.off("agent.speaking",z),o.off("agent.thinking",K),o.off("connection.disconnected",q)}},[o,t]),A.useEffect(()=>{if(!o)return;const B=()=>x(o.getCurrentInteraction()),z=()=>x(null);return o.on("rpc.interaction.started",B),o.on("rpc.interaction.completed",z),o.on("rpc.interaction.timeout",z),o.on("rpc.interaction.dismissed",z),()=>{o.off("rpc.interaction.started",B),o.off("rpc.interaction.completed",z),o.off("rpc.interaction.timeout",z),o.off("rpc.interaction.dismissed",z)}},[o]),A.useEffect(()=>{var z;if(!o)return;const B=(z=o.getCurrentInteraction)==null?void 0:z.call(o);x(B||null)},[o]),A.useEffect(()=>{var z,K;const B=((K=(z=o==null?void 0:o.getCurrentSession)==null?void 0:z.call(o))==null?void 0:K.id)||null;v.current,v.current=B},[o]),A.useEffect(()=>{m&&c&&u(!1)},[m,c]);const U=A.useCallback(B=>{},[]),re=A.useCallback(()=>{var B,z,K;try{m&&(x(null),(B=o==null?void 0:o.dismissCurrentInteraction)==null||B.call(o)),u(!1),f(!1),(z=o==null?void 0:o.endSession)==null||z.call(o),(K=o==null?void 0:o.disconnect)==null||K.call(o),a==null||a()}catch(q){console.error("Failed to end call:",q),x(null),u(!1),f(!1),a==null||a()}},[o,m,a]),ne=Je("w-full flex flex-col items-center justify-center",s==="fullscreen"?"w-full max-w-none mx-0 h-full":"w-full mx-auto",R.main,s==="fullscreen"?"max-w-none":"","overflow-hidden h-full"),j=a&&(s==="popup"||s==="fullscreen");return y?h.jsx("main",{ref:l,className:Je(ne,"relative",e&&"pointer-events-none opacity-50"),children:(j||S)&&h.jsxs("div",{className:`flex items-center justify-between w-full p-4 border-b ${((W=R.chatHeader)==null?void 0:W.container)||"border-gray-200"}`,children:[h.jsx("div",{children:h.jsx("h3",{className:`font-semibold ${R.text.primary}`,children:"Voice Session"})}),S&&h.jsx(ci,{duration:S,theme:i,onTimerExpired:()=>{console.log("Session timer expired")}})]})}):h.jsxs("main",{ref:l,className:Je(ne,"relative",e&&"pointer-events-none opacity-50"),style:{minHeight:0},children:[(j||S)&&h.jsxs("div",{className:`flex items-center justify-between w-full p-4 border-b ${((w=R.chatHeader)==null?void 0:w.container)||"border-gray-200"}`,children:[h.jsx("div",{children:h.jsx("h3",{className:`font-semibold ${R.text.primary}`,children:"Voice Session"})}),S&&h.jsx(ci,{duration:S,theme:i,onTimerExpired:()=>{console.log("Session timer expired")}})]}),h.jsxs("div",{className:"w-full flex-1 flex flex-col items-center px-0 min-h-0 overflow-hidden",children:[!$&&h.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full min-h-[180px]",children:[h.jsx(Ie.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:h.jsx(vl,{className:R.spinner,weight:"bold"})}),h.jsx(Ie.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-sm opacity-80 ${R.text.muted} text-center max-w-xs`,children:d?"Agent is taking longer than expected...":r}),h.jsx(Ie.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${R.text.muted} mt-2 text-center opacity-60`,children:d?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),d&&a&&h.jsx(Ie.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:a,className:`mt-4 px-4 py-2 rounded-lg ${((F=R.chatHeader)==null?void 0:F.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]}),$&&h.jsxs(h.Fragment,{children:[c&&h.jsx("div",{className:Je("absolute left-0 right-0 top-0 flex flex-col transition-[opacity,translate] duration-300 ease-out z-10",i==="light"?"bg-white":"bg-gray-900/95 backdrop-blur-sm","translate-y-0 opacity-100 delay-200"),style:{bottom:`${M}px`},children:h.jsx(Vl,{client:o,theme:i,displayType:s==="fullscreen"?"fullscreen":"widget",disabled:e,onBack:()=>u(!1),showTimer:!1})}),!c&&h.jsxs("div",{className:Je("flex-1 flex flex-col items-center w-full h-full min-h-0",(m==null?void 0:m.presentationMode)==="embedded"?"justify-end":"justify-center"),children:[h.jsx(Ie.div,{className:"w-full flex justify-center",animate:{y:(m==null?void 0:m.presentationMode)==="embedded"?-8:0},transition:{duration:.3,ease:"easeOut"},children:h.jsx(mv,{chatOpen:c,client:o},`media-tiles-${((E=(Y=o==null?void 0:o.getCurrentSession)==null?void 0:Y.call(o))==null?void 0:E.id)||"no-session"}`)}),h.jsx(Sr,{mode:"wait",children:m&&m.presentationMode==="embedded"&&h.jsx(Ie.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:Je("w-full relative mt-4 flex justify-center",s==="fullscreen"?"max-w-4xl":"max-w-md"),children:h.jsx("div",{className:"bg-white/10 backdrop-blur-sm rounded-xl border border-white/20 shadow-lg overflow-hidden",children:h.jsx(li,{interaction:m,theme:i,onDismiss:()=>{var B;return(B=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:B.call(o)},client:o,addLocalMessage:U})})},`embedded-${m.methodName}`)})]})]})]}),h.jsx(Sr,{mode:"wait",children:m&&m.presentationMode!=="embedded"&&!c&&h.jsx("div",{className:Je("absolute inset-0 z-50 flex items-center justify-center backdrop-blur-sm",s==="fullscreen"?"bg-black/70":"bg-black/50"),children:h.jsx(Ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2,ease:"easeOut"},className:Je("relative w-full overflow-hidden",s==="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:h.jsx(li,{interaction:m,theme:i,onDismiss:()=>{var B;return(B=o==null?void 0:o.dismissCurrentInteraction)==null?void 0:B.call(o)},client:o,addLocalMessage:U})},`modal-${m.methodName}`)})}),h.jsx("div",{ref:C,className:"relative z-30 mt-auto w-full",children:h.jsx(zN,{onToggleMicrophone:()=>b.toggle(),onToggleChat:()=>u(!c),onEndCall:re,theme:i,microphoneEnabled:b.enabled,chatOpen:c,isMicrophoneLoading:b.pending,disabled:e})})]})});Bm.displayName="SessionView";function zN({onToggleMicrophone:e,onToggleChat:t,onEndCall:n,theme:r,microphoneEnabled:i=!0,chatOpen:o,isMicrophoneLoading:s=!1,disabled:a}){var c,u,d,f,p;const l=Ct(r);return h.jsxs("div",{className:Je("flex items-center justify-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",r==="light"?"bg-white/95 border-gray-200":"bg-gray-900/90 border-gray-700"),children:[e&&h.jsx("button",{onClick:e,disabled:a||s,className:`p-3 rounded-full transition-all duration-200 ${i?((c=l.video)==null?void 0:c.controlEnabled)||"bg-green-500 text-white":((u=l.video)==null?void 0:u.controlDisabled)||"bg-red-500 text-white"} ${a?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:i?"Mute microphone":"Unmute microphone",children:s?h.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):i?h.jsx(We.Mic,{className:"w-5 h-5"}):h.jsx(We.MicOff,{className:"w-5 h-5"})}),h.jsx("button",{onClick:t,disabled:a,className:`relative p-3 rounded-full transition-all duration-200 ${o?((d=l.video)==null?void 0:d.controlEnabled)||"bg-blue-500 text-white":((f=l.video)==null?void 0:f.controlDisabled)||"bg-gray-500 text-white"} ${a?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:o?"Hide transcription":"Show transcription",children:h.jsx(We.MessageCircle,{className:"w-5 h-5"})}),n&&h.jsx("button",{onClick:n,disabled:a,className:`p-3 rounded-full transition-all duration-200 ${((p=l.video)==null?void 0:p.endCall)||"bg-red-500 text-white hover:bg-red-600"} ${a?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:h.jsx(We.PhoneOff,{className:"w-5 h-5"})})]})}function UN({onToggleMicrophone:e,onToggleCamera:t,onToggleScreenShare:n,onToggleChat:r,onEndCall:i,theme:o,microphoneEnabled:s,cameraEnabled:a,screenShareEnabled:l,chatOpen:c,isMicrophoneLoading:u,isCameraLoading:d,isScreenShareLoading:f,disabled:p,userVideoEnabled:g=!0,screenshareEnabled:m=!0}){const x=Ct(o);return h.jsxs("div",{className:Je("flex items-center justify-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",o==="light"?"bg-white/95 border-gray-200":"bg-gray-900/90 border-gray-700"),children:[h.jsx("button",{onClick:e,disabled:p||u,className:`p-3 rounded-full transition-all duration-200 ${s?x.video.controlEnabled:x.video.controlDisabled} ${p?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:s?"Mute microphone":"Unmute microphone",children:u?h.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):s?h.jsx(We.Mic,{className:"w-5 h-5"}):h.jsx(We.MicOff,{className:"w-5 h-5"})}),g&&h.jsx("button",{onClick:t,disabled:p||d,className:`p-3 rounded-full transition-all duration-200 ${a?x.video.controlEnabled:x.video.controlDisabled} ${p?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:a?"Turn off camera":"Turn on camera",children:d?h.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):a?h.jsx(We.Camera,{className:"w-5 h-5"}):h.jsx(We.CameraOff,{className:"w-5 h-5"})}),m&&h.jsx("button",{onClick:n,disabled:p||f,className:`p-3 rounded-full transition-all duration-200 ${l?x.video.controlEnabled:x.video.controlDisabled} ${p?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:l?"Stop screen share":"Share screen",children:f?h.jsx("div",{className:"w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent"}):h.jsx(We.Monitor,{className:"w-5 h-5"})}),h.jsx("button",{onClick:r,disabled:p,className:`relative p-3 rounded-full transition-all duration-200 ${c?x.video.controlEnabled:x.video.controlDisabled} ${p?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:c?"Hide chat":"Show chat & transcription",children:h.jsx(We.MessageCircle,{className:"w-5 h-5"})}),i&&h.jsx("button",{onClick:i,disabled:p,className:`p-3 rounded-full transition-all duration-200 ${x.video.endCall} ${p?"opacity-50 cursor-not-allowed":"hover:scale-105"}`,title:"End call",children:h.jsx(We.PhoneOff,{className:"w-5 h-5"})})]})}function Fd({trackRef:e,participant:t,isLocal:n=!1,className:r="",theme:i}){var l;const o=Ct(i),s=(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 h.jsxs("div",{className:`relative rounded-lg overflow-hidden ${o.video.tile} ${r}`,children:[a?h.jsx($t.VideoTrack,{trackRef:e,className:"w-full h-full object-cover"}):h.jsx("div",{className:`w-full h-full flex items-center justify-center ${o.video.placeholder}`,children:h.jsx("div",{className:"text-center",children:h.jsx("div",{className:`w-16 h-16 mx-auto mb-2 rounded-full flex items-center justify-center ${o.video.avatar}`,children:h.jsx(We.User,{className:"w-8 h-8"})})})}),h.jsx("div",{className:`absolute bottom-2 left-2 px-2 py-1 rounded text-xs ${o.video.nameOverlay}`,children:s}),((l=e==null?void 0:e.publication)==null?void 0:l.isMuted)&&h.jsx("div",{className:`absolute top-2 right-2 p-1 rounded ${o.video.mutedIndicator}`,children:h.jsx(We.CameraOff,{className:"w-4 h-4"})})]})}function HN({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:i,onEndCall:o}){var B;const s=Ct(t),[a,l]=P.useState(!1),[c,u]=P.useState(!1),d=P.useMemo(()=>{const z=e.getCurrentAgentInfo();return No(z)},[e]),{userVideoEnabled:f,agentAvatarEnabled:p,screenshareEnabled:g}=P.useMemo(()=>ap(d),[d]),m=P.useMemo(()=>Ao(d),[d]),x=P.useRef(null),[y,k]=P.useState(64);P.useLayoutEffect(()=>{const z=x.current;if(!z)return;const K=()=>k(z.offsetHeight||64);K();const q=new ResizeObserver(()=>K());return q.observe(z),window.addEventListener("resize",K),()=>{q.disconnect(),window.removeEventListener("resize",K)}},[]);const[v,_]=P.useState(null),S=_w(e),{videoTrackRefs:C,screenShareTrackRefs:M}=Tw(e),{agent:{isActive:N=!1}={},state:I="idle",audioTrack:b}=e?xl(e):{agent:{isActive:!1},state:"idle",audioTrack:null},R=P.useMemo(()=>e.getRemoteParticipants(),[e,S]),O=to(e,"microphone"),D=to(e,"camera"),$=to(e,"screenShare"),U=P.useCallback(async()=>{D.pending||await D.toggle()},[D]),re=P.useCallback(async()=>{$.pending||await $.toggle()},[$]),ne=P.useCallback(()=>{l(z=>!z)},[]),j=P.useCallback(()=>{o?o():n&&n()},[o,n]);P.useEffect(()=>{if(!e)return;const z=K=>{console.log("📺 Video: Interactive UI state updated:",K),_(K)};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]),P.useEffect(()=>{if(N)u(!1);else{const z=setTimeout(()=>{N||u(!0)},3e4);return()=>{clearTimeout(z)}}},[N]);const W=S==null?void 0:S.localParticipant,w=P.useMemo(()=>(e?e.getCameraTrackRefs():[]).find(z=>z.participant===W),[e,W]),Y=C.filter(z=>z.participant!==W)[0],E=P.useMemo(()=>(M||[]).find(z=>z.participant===W),[M,W]);return h.jsxs("div",{className:`flex flex-col h-full ${s.video.container} relative`,children:[h.jsxs("div",{className:`flex items-center justify-between p-4 border-b ${s.video.header}`,children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:`w-3 h-3 rounded-full ${s.video.statusDot}`}),h.jsx("span",{className:"font-medium",children:"Video Call"}),h.jsxs("span",{className:"text-sm opacity-70",children:[R.length+1," participant",R.length!==0?"s":""]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[m&&h.jsx(ci,{duration:m,theme:t,onTimerExpired:()=>{console.log("Session timer expired")}}),h.jsx("button",{className:`p-2 rounded-lg transition-colors ${s.video.headerButton}`,title:"Layout options",children:h.jsx(We.LayoutGrid,{className:"w-4 h-4"})})]})]}),h.jsxs("div",{className:"relative flex-1 min-h-0",children:[!N&&h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsxs("div",{className:"text-center",children:[h.jsx(Ie.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 mx-auto",children:h.jsx(vl,{className:s.spinner,weight:"bold"})}),h.jsx(Ie.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`text-lg opacity-70 ${s.text.muted}`,children:c?"Agent is taking longer than expected...":"Waiting for agent to join..."}),h.jsx(Ie.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:2},className:`text-xs ${s.text.muted} mt-2 opacity-60`,children:c?"Please check your connection or try again.":"Agent is connecting... This may take a moment."}),c&&n&&h.jsx(Ie.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.5},onClick:n,className:`mt-4 px-4 py-2 rounded-lg ${((B=s.chatHeader)==null?void 0:B.backButton)||"bg-gray-100 hover:bg-gray-200"} transition-colors`,children:"Go Back"})]})}),N&&!a&&h.jsx("div",{className:"p-4 min-h-0 h-full",children:h.jsxs("div",{className:"relative w-full h-full rounded-lg overflow-hidden",children:[p?Y?h.jsx(Fd,{trackRef:Y,participant:Y.participant,isLocal:!1,theme:t,className:"w-full h-full"}):h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsxs("div",{className:"text-center",children:[h.jsx(We.Users,{className:"w-12 h-12 mx-auto mb-4 opacity-50"}),h.jsx("p",{className:"text-lg opacity-70",children:"Waiting for agent video..."})]})}):h.jsx("div",{className:"w-full h-full flex items-center justify-center",children:h.jsx("div",{className:"text-center",children:h.jsxs("div",{className:"mb-4",children:[h.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-[#6721a4] to-[#5c64f6] flex items-center justify-center",children:h.jsx(We.User,{className:"w-8 h-8 text-white"})}),N&&(b?h.jsx($t.BarVisualizer,{barCount:5,state:I,options:{minHeight:5},trackRef:b,className:"flex items-center justify-center gap-1",children:h.jsx("span",{className:Je(["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]"])})}):h.jsx("div",{className:"flex items-center justify-center gap-1",children:Array.from({length:5}).map((z,K)=>h.jsx("span",{className:Je(["bg-[#6721a4] min-h-2 w-2 rounded-full","origin-center transition-colors duration-250 ease-linear",I==="speaking"&&"bg-[#5c64f6]",I==="thinking"&&"animate-pulse bg-yellow-500"])},K))}))]})})}),E&&h.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:h.jsxs("div",{className:"relative w-full h-full bg-black/40",children:[h.jsx($t.VideoTrack,{trackRef:E,className:"w-full h-full object-contain"}),h.jsx("div",{className:`absolute top-1 left-1 px-1.5 py-0.5 rounded text-xs ${s.video.nameOverlay}`,children:h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx(We.Monitor,{className:"w-3 h-3"}),h.jsx("span",{className:"text-xs",children:"Sharing"})]})})]})}),w&&f&&h.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:h.jsx(Fd,{trackRef:w,participant:W||void 0,isLocal:!0,theme:t,className:"w-full h-full"})})]})})]}),h.jsx(Sr,{mode:"wait",children:a&&h.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.3,ease:"easeOut"},className:Je("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:`${y}px`},children:h.jsx(Vl,{client:e,theme:t,displayType:i==="fullscreen"?"fullscreen":"widget",disabled:r,onBack:()=>l(!1),showTimer:!1})})}),h.jsx("div",{ref:x,className:"relative z-30 mt-auto",children:h.jsx(UN,{onToggleMicrophone:()=>O.toggle(),onToggleCamera:U,onToggleScreenShare:re,onToggleChat:ne,onEndCall:j,theme:t,microphoneEnabled:O.enabled,cameraEnabled:D.enabled,screenShareEnabled:$.enabled,chatOpen:a,isMicrophoneLoading:O.pending,isCameraLoading:D.pending,isScreenShareLoading:$.pending,disabled:r,userVideoEnabled:f,screenshareEnabled:g})})]})}const Bd=e=>e,WN=()=>{let e=Bd;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Bd}}},GN=WN();function On(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 Xn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":On(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Wi={exports:{}},Gi={exports:{}},ze={};/** @license React v16.13.1
30
83
  * react-is.production.min.js
31
84
  *
32
85
  * Copyright (c) Facebook, Inc. and its affiliates.
33
86
  *
34
87
  * This source code is licensed under the MIT license found in the
35
88
  * LICENSE file in the root directory of this source tree.
36
- */var Ac;function X1(){if(Ac)return Pe;Ac=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
89
+ */var jd;function KN(){if(jd)return ze;jd=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,o=e?Symbol.for("react.profiler"):60114,s=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function v(S){if(typeof S=="object"&&S!==null){var C=S.$$typeof;switch(C){case t:switch(S=S.type,S){case l:case c:case r:case o:case i:case d:return S;default:switch(S=S&&S.$$typeof,S){case a:case u:case g:case p:case s:return S;default:return C}}case n:return C}}}function _(S){return v(S)===c}return ze.AsyncMode=l,ze.ConcurrentMode=c,ze.ContextConsumer=a,ze.ContextProvider=s,ze.Element=t,ze.ForwardRef=u,ze.Fragment=r,ze.Lazy=g,ze.Memo=p,ze.Portal=n,ze.Profiler=o,ze.StrictMode=i,ze.Suspense=d,ze.isAsyncMode=function(S){return _(S)||v(S)===l},ze.isConcurrentMode=_,ze.isContextConsumer=function(S){return v(S)===a},ze.isContextProvider=function(S){return v(S)===s},ze.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ze.isForwardRef=function(S){return v(S)===u},ze.isFragment=function(S){return v(S)===r},ze.isLazy=function(S){return v(S)===g},ze.isMemo=function(S){return v(S)===p},ze.isPortal=function(S){return v(S)===n},ze.isProfiler=function(S){return v(S)===o},ze.isStrictMode=function(S){return v(S)===i},ze.isSuspense=function(S){return v(S)===d},ze.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===o||S===i||S===d||S===f||typeof S=="object"&&S!==null&&(S.$$typeof===g||S.$$typeof===p||S.$$typeof===s||S.$$typeof===a||S.$$typeof===u||S.$$typeof===x||S.$$typeof===y||S.$$typeof===k||S.$$typeof===m)},ze.typeOf=v,ze}var Ue={};/** @license React v16.13.1
37
90
  * react-is.development.js
38
91
  *
39
92
  * Copyright (c) Facebook, Inc. and its affiliates.
40
93
  *
41
94
  * This source code is licensed under the MIT license found in the
42
95
  * LICENSE file in the root directory of this source tree.
43
- */var jc;function Q1(){return jc||(jc=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,K=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 X(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=K,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=X,Me.isSuspense=fe,Me.isValidElementType=S,Me.typeOf=A}()),Me}var Pc;function Qf(){return Pc||(Pc=1,process.env.NODE_ENV==="production"?Gr.exports=X1():Gr.exports=Q1()),Gr.exports}/*
96
+ */var $d;function qN(){return $d||($d=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,o=e?Symbol.for("react.profiler"):60114,s=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,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function v(G){return typeof G=="string"||typeof G=="function"||G===r||G===c||G===o||G===i||G===d||G===f||typeof G=="object"&&G!==null&&(G.$$typeof===g||G.$$typeof===p||G.$$typeof===s||G.$$typeof===a||G.$$typeof===u||G.$$typeof===x||G.$$typeof===y||G.$$typeof===k||G.$$typeof===m)}function _(G){if(typeof G=="object"&&G!==null){var Se=G.$$typeof;switch(Se){case t:var Z=G.type;switch(Z){case l:case c:case r:case o:case i:case d:return Z;default:var te=Z&&Z.$$typeof;switch(te){case a:case u:case g:case p:case s:return te;default:return Se}}case n:return Se}}}var S=l,C=c,M=a,N=s,I=t,b=u,R=r,O=g,D=p,$=n,U=o,re=i,ne=d,j=!1;function W(G){return j||(j=!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(G)||_(G)===l}function w(G){return _(G)===c}function F(G){return _(G)===a}function Y(G){return _(G)===s}function E(G){return typeof G=="object"&&G!==null&&G.$$typeof===t}function B(G){return _(G)===u}function z(G){return _(G)===r}function K(G){return _(G)===g}function q(G){return _(G)===p}function me(G){return _(G)===n}function Q(G){return _(G)===o}function le(G){return _(G)===i}function he(G){return _(G)===d}Ue.AsyncMode=S,Ue.ConcurrentMode=C,Ue.ContextConsumer=M,Ue.ContextProvider=N,Ue.Element=I,Ue.ForwardRef=b,Ue.Fragment=R,Ue.Lazy=O,Ue.Memo=D,Ue.Portal=$,Ue.Profiler=U,Ue.StrictMode=re,Ue.Suspense=ne,Ue.isAsyncMode=W,Ue.isConcurrentMode=w,Ue.isContextConsumer=F,Ue.isContextProvider=Y,Ue.isElement=E,Ue.isForwardRef=B,Ue.isFragment=z,Ue.isLazy=K,Ue.isMemo=q,Ue.isPortal=me,Ue.isProfiler=Q,Ue.isStrictMode=le,Ue.isSuspense=he,Ue.isValidElementType=v,Ue.typeOf=_}()),Ue}var Vd;function jm(){return Vd||(Vd=1,process.env.NODE_ENV==="production"?Gi.exports=KN():Gi.exports=qN()),Gi.exports}/*
44
97
  object-assign
45
98
  (c) Sindre Sorhus
46
99
  @license MIT
47
- */var fo,Mc;function J1(){if(Mc)return fo;Mc=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 fo=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},fo}var ho,Nc;function ya(){if(Nc)return ho;Nc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ho=e,ho}var mo,Ic;function Jf(){return Ic||(Ic=1,mo=Function.call.bind(Object.prototype.hasOwnProperty)),mo}var po,Rc;function eb(){if(Rc)return po;Rc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ya(),n={},r=Jf();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={})},po=i,po}var go,Vc;function tb(){if(Vc)return go;Vc=1;var e=Qf(),t=J1(),n=ya(),r=Jf(),i=eb(),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 go=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,X,fe){if(Q=Q||h,X=X||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 `"+X+"` 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+" `"+X+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new p("The "+V+" `"+X+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:w($,ee,Q,V,X)}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 X=ie(Q);return new p("Invalid "+se+" `"+$+"` of type "+("`"+X+"` 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 X=w(ee,V,U,se,$+"["+V+"]",n);if(X instanceof Error)return X}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 X=w(ee,V,U,se,$+"."+V,n);if(X instanceof Error)return X}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=[],X=0;X<w.length;X++){var fe=w[X],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 X=w[V];if(typeof X!="function")return M(U,se,$,V,ie(X));var fe=X(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 X in V){var fe=w[X];if(r(w,X)&&typeof fe!="function")return M(U,se,$,X,ie(fe));if(!fe)return new p("Invalid "+se+" `"+$+"` key `"+X+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify(oe[E],null," ")+`
48
- Valid keys: `+JSON.stringify(Object.keys(w),null," "));var R=fe(ee,X,U,se,$+"."+X,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 K(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":K(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},go}var yo,Dc;function nb(){if(Dc)return yo;Dc=1;var e=ya();function t(){}function n(){}return n.resetWarningCache=t,yo=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},yo}var Fc;function rb(){if(Fc)return qr.exports;if(Fc=1,process.env.NODE_ENV!=="production"){var e=Qf(),t=!0;qr.exports=tb()(e.isElement,t)}else qr.exports=nb()();return qr.exports}var ib=rb();const Te=ga(ib);function ob(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 Kr={exports:{}},Ie={};/**
100
+ */var Fs,zd;function YN(){if(zd)return Fs;zd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[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 Fs=i()?Object.assign:function(o,s){for(var a,l=r(o),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 f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Fs}var Bs,Ud;function zl(){if(Ud)return Bs;Ud=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Bs=e,Bs}var js,Hd;function $m(){return Hd||(Hd=1,js=Function.call.bind(Object.prototype.hasOwnProperty)),js}var $s,Wd;function ZN(){if(Wd)return $s;Wd=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=zl(),n={},r=$m();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var d;try{if(typeof o[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=o[u](s,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 p=c?c():"";e("Failed "+a+" type: "+d.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},$s=i,$s}var Vs,Gd;function XN(){if(Gd)return Vs;Gd=1;var e=jm(),t=YN(),n=zl(),r=$m(),i=ZN(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Vs=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(w){var F=w&&(c&&w[c]||w[u]);if(typeof F=="function")return F}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:k(),arrayOf:v,element:_(),elementType:S(),instanceOf:C,node:b(),objectOf:N,oneOf:M,oneOfType:I,shape:O,exact:D};function g(w,F){return w===F?w!==0||1/w===1/F:w!==w&&F!==F}function m(w,F){this.message=w,this.data=F&&typeof F=="object"?F:{},this.stack=""}m.prototype=Error.prototype;function x(w){if(process.env.NODE_ENV!=="production")var F={},Y=0;function E(z,K,q,me,Q,le,he){if(me=me||f,le=le||q,he!==n){if(l){var G=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 G.name="Invariant Violation",G}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Se=me+":"+q;!F[Se]&&Y<3&&(o("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+me+"`. 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."),F[Se]=!0,Y++)}}return K[q]==null?z?K[q]===null?new m("The "+Q+" `"+le+"` is marked as required "+("in `"+me+"`, but its value is `null`.")):new m("The "+Q+" `"+le+"` is marked as required in "+("`"+me+"`, but its value is `undefined`.")):null:w(K,q,me,Q,le)}var B=E.bind(null,!1);return B.isRequired=E.bind(null,!0),B}function y(w){function F(Y,E,B,z,K,q){var me=Y[E],Q=re(me);if(Q!==w){var le=ne(me);return new m("Invalid "+z+" `"+K+"` of type "+("`"+le+"` supplied to `"+B+"`, expected ")+("`"+w+"`."),{expectedType:w})}return null}return x(F)}function k(){return x(s)}function v(w){function F(Y,E,B,z,K){if(typeof w!="function")return new m("Property `"+K+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var q=Y[E];if(!Array.isArray(q)){var me=re(q);return new m("Invalid "+z+" `"+K+"` of type "+("`"+me+"` supplied to `"+B+"`, expected an array."))}for(var Q=0;Q<q.length;Q++){var le=w(q,Q,B,z,K+"["+Q+"]",n);if(le instanceof Error)return le}return null}return x(F)}function _(){function w(F,Y,E,B,z){var K=F[Y];if(!a(K)){var q=re(K);return new m("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+E+"`, expected a single ReactElement."))}return null}return x(w)}function S(){function w(F,Y,E,B,z){var K=F[Y];if(!e.isValidElementType(K)){var q=re(K);return new m("Invalid "+B+" `"+z+"` of type "+("`"+q+"` supplied to `"+E+"`, expected a single ReactElement type."))}return null}return x(w)}function C(w){function F(Y,E,B,z,K){if(!(Y[E]instanceof w)){var q=w.name||f,me=W(Y[E]);return new m("Invalid "+z+" `"+K+"` of type "+("`"+me+"` supplied to `"+B+"`, expected ")+("instance of `"+q+"`."))}return null}return x(F)}function M(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("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])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function F(Y,E,B,z,K){for(var q=Y[E],me=0;me<w.length;me++)if(g(q,w[me]))return null;var Q=JSON.stringify(w,function(he,G){var Se=ne(G);return Se==="symbol"?String(G):G});return new m("Invalid "+z+" `"+K+"` of value `"+String(q)+"` "+("supplied to `"+B+"`, expected one of "+Q+"."))}return x(F)}function N(w){function F(Y,E,B,z,K){if(typeof w!="function")return new m("Property `"+K+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var q=Y[E],me=re(q);if(me!=="object")return new m("Invalid "+z+" `"+K+"` of type "+("`"+me+"` supplied to `"+B+"`, expected an object."));for(var Q in q)if(r(q,Q)){var le=w(q,Q,B,z,K+"."+Q,n);if(le instanceof Error)return le}return null}return x(F)}function I(w){if(!Array.isArray(w))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var F=0;F<w.length;F++){var Y=w[F];if(typeof Y!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(Y)+" at index "+F+"."),s}function E(B,z,K,q,me){for(var Q=[],le=0;le<w.length;le++){var he=w[le],G=he(B,z,K,q,me,n);if(G==null)return null;G.data&&r(G.data,"expectedType")&&Q.push(G.data.expectedType)}var Se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new m("Invalid "+q+" `"+me+"` supplied to "+("`"+K+"`"+Se+"."))}return x(E)}function b(){function w(F,Y,E,B,z){return $(F[Y])?null:new m("Invalid "+B+" `"+z+"` supplied to "+("`"+E+"`, expected a ReactNode."))}return x(w)}function R(w,F,Y,E,B){return new m((w||"React class")+": "+F+" type `"+Y+"."+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function O(w){function F(Y,E,B,z,K){var q=Y[E],me=re(q);if(me!=="object")return new m("Invalid "+z+" `"+K+"` of type `"+me+"` "+("supplied to `"+B+"`, expected `object`."));for(var Q in w){var le=w[Q];if(typeof le!="function")return R(B,z,K,Q,ne(le));var he=le(q,Q,B,z,K+"."+Q,n);if(he)return he}return null}return x(F)}function D(w){function F(Y,E,B,z,K){var q=Y[E],me=re(q);if(me!=="object")return new m("Invalid "+z+" `"+K+"` of type `"+me+"` "+("supplied to `"+B+"`, expected `object`."));var Q=t({},Y[E],w);for(var le in Q){var he=w[le];if(r(w,le)&&typeof he!="function")return R(B,z,K,le,ne(he));if(!he)return new m("Invalid "+z+" `"+K+"` key `"+le+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(Y[E],null," ")+`
101
+ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var G=he(q,le,B,z,K+"."+le,n);if(G)return G}return null}return x(F)}function $(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($);if(w===null||a(w))return!0;var F=d(w);if(F){var Y=F.call(w),E;if(F!==w.entries){for(;!(E=Y.next()).done;)if(!$(E.value))return!1}else for(;!(E=Y.next()).done;){var B=E.value;if(B&&!$(B[1]))return!1}}else return!1;return!0;default:return!1}}function U(w,F){return w==="symbol"?!0:F?F["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&F instanceof Symbol:!1}function re(w){var F=typeof w;return Array.isArray(w)?"array":w instanceof RegExp?"object":U(F,w)?"symbol":F}function ne(w){if(typeof w>"u"||w===null)return""+w;var F=re(w);if(F==="object"){if(w instanceof Date)return"date";if(w instanceof RegExp)return"regexp"}return F}function j(w){var F=ne(w);switch(F){case"array":case"object":return"an "+F;case"boolean":case"date":case"regexp":return"a "+F;default:return F}}function W(w){return!w.constructor||!w.constructor.name?f:w.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},Vs}var zs,Kd;function QN(){if(Kd)return zs;Kd=1;var e=zl();function t(){}function n(){}return n.resetWarningCache=t,zs=function(){function r(s,a,l,c,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var o={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 o.PropTypes=o,o},zs}var qd;function JN(){if(qd)return Wi.exports;if(qd=1,process.env.NODE_ENV!=="production"){var e=jm(),t=!0;Wi.exports=XN()(e.isElement,t)}else Wi.exports=QN()();return Wi.exports}var eA=JN();const Ve=Ro(eA);function tA(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let s="",a=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[i]=s}return r}var Ki={exports:{}},Ke={};/**
49
102
  * @license React
50
103
  * react-is.production.js
51
104
  *
@@ -53,7 +106,7 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var R=fe(ee,X,U,se,$+"."
53
106
  *
54
107
  * This source code is licensed under the MIT license found in the
55
108
  * LICENSE file in the root directory of this source tree.
56
- */var Lc;function sb(){if(Lc)return Ie;Lc=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={};/**
109
+ */var Yd;function nA(){if(Yd)return Ke;Yd=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"),o=Symbol.for("react.consumer"),s=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"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var x=m.$$typeof;switch(x){case e:switch(m=m.type,m){case n:case i:case r:case l:case c:case f:return m;default:switch(m=m&&m.$$typeof,m){case s:case a:case d:case u:return m;case o:return m;default:return x}}case t:return x}}}return Ke.ContextConsumer=o,Ke.ContextProvider=s,Ke.Element=e,Ke.ForwardRef=a,Ke.Fragment=n,Ke.Lazy=d,Ke.Memo=u,Ke.Portal=t,Ke.Profiler=i,Ke.StrictMode=r,Ke.Suspense=l,Ke.SuspenseList=c,Ke.isContextConsumer=function(m){return g(m)===o},Ke.isContextProvider=function(m){return g(m)===s},Ke.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Ke.isForwardRef=function(m){return g(m)===a},Ke.isFragment=function(m){return g(m)===n},Ke.isLazy=function(m){return g(m)===d},Ke.isMemo=function(m){return g(m)===u},Ke.isPortal=function(m){return g(m)===t},Ke.isProfiler=function(m){return g(m)===i},Ke.isStrictMode=function(m){return g(m)===r},Ke.isSuspense=function(m){return g(m)===l},Ke.isSuspenseList=function(m){return g(m)===c},Ke.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===i||m===r||m===l||m===c||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===u||m.$$typeof===s||m.$$typeof===o||m.$$typeof===a||m.$$typeof===p||m.getModuleId!==void 0)},Ke.typeOf=g,Ke}var qe={};/**
57
110
  * @license React
58
111
  * react-is.development.js
59
112
  *
@@ -61,23 +114,23 @@ Valid keys: `+JSON.stringify(Object.keys(w),null," "));var R=fe(ee,X,U,se,$+"."
61
114
  *
62
115
  * This source code is licensed under the MIT license found in the
63
116
  * LICENSE file in the root directory of this source tree.
64
- */var Oc;function ab(){return Oc||(Oc=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 $c;function lb(){return $c||($c=1,process.env.NODE_ENV==="production"?Kr.exports=sb():Kr.exports=ab()),Kr.exports}var xi=lb();function _t(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 eh(e){if(x.isValidElement(e)||xi.isValidElementType(e)||!_t(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=eh(e[n])}),t}function gt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return _t(e)&&_t(t)&&Object.keys(t).forEach(i=>{x.isValidElement(t[i])||xi.isValidElementType(t[i])?r[i]=t[i]:_t(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&_t(e[i])?r[i]=gt(e[i],t[i],n):n.clone?r[i]=_t(t[i])?eh(t[i]):t[i]:r[i]=t[i]}),r}function gr(e,t){return t?gt(e,t,{clone:!1}):e}const on=process.env.NODE_ENV!=="production"?Te.oneOfType([Te.number,Te.string,Te.object,Te.array]):{};function _c(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 cb(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function ub(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\`.`:tn(18,`(${t})`));return null}const[,r,i]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(s)}function db(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 Mi={xs:0,sm:600,md:900,lg:1200,xl:1536},Bc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Mi[e]}px)`},fb={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Mi[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ut(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||Bc;return t.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(t[l]),o),{})}if(typeof t=="object"){const s=r.breakpoints||Bc;return Object.keys(t).reduce((o,a)=>{if(cb(s.keys,a)){const l=ub(r.containerQueries?r:fb,a);l&&(o[l]=n(t[a],a))}else if(Object.keys(s.values||Mi).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 hb(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const s=e.up(i);return r[s]={},r},{}))||{}}function zc(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Ni(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 bi(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Ni(e,n)||r,t&&(i=t(i,r,e)),i}function Xe(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=Ni(l,r)||{};return Ut(o,a,d=>{let h=bi(c,i,d);return d===h&&typeof d=="string"&&(h=bi(c,i,`${t}${d==="default"?"":bn(d)}`,d)),n===!1?h:{[n]:h}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:on}:{},s.filterProps=[t],s}function mb(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const pb={m:"margin",p:"padding"},gb={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Hc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yb=mb(e=>{if(e.length>2)if(Hc[e])e=Hc[e];else return[e];const[t,n]=e.split(""),r=pb[t],i=gb[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),Ii=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ri=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],xb=[...Ii,...Ri];function Vr(e,t,n,r){const i=Ni(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(`
117
+ */var Zd;function rA(){return Zd||(Zd=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var x=m.$$typeof;switch(x){case t:switch(m=m.type,m){case r:case o:case i:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case f:case d:return m;case s:return m;default:return x}}case n:return x}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=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"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");qe.ContextConsumer=s,qe.ContextProvider=a,qe.Element=t,qe.ForwardRef=l,qe.Fragment=r,qe.Lazy=f,qe.Memo=d,qe.Portal=n,qe.Profiler=o,qe.StrictMode=i,qe.Suspense=c,qe.SuspenseList=u,qe.isContextConsumer=function(m){return e(m)===s},qe.isContextProvider=function(m){return e(m)===a},qe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},qe.isForwardRef=function(m){return e(m)===l},qe.isFragment=function(m){return e(m)===r},qe.isLazy=function(m){return e(m)===f},qe.isMemo=function(m){return e(m)===d},qe.isPortal=function(m){return e(m)===n},qe.isProfiler=function(m){return e(m)===o},qe.isStrictMode=function(m){return e(m)===i},qe.isSuspense=function(m){return e(m)===c},qe.isSuspenseList=function(m){return e(m)===u},qe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===i||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===d||m.$$typeof===a||m.$$typeof===s||m.$$typeof===l||m.$$typeof===g||m.getModuleId!==void 0)},qe.typeOf=e}()),qe}var Xd;function iA(){return Xd||(Xd=1,process.env.NODE_ENV==="production"?Ki.exports=nA():Ki.exports=rA()),Ki.exports}var wo=iA();function yn(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 Vm(e){if(P.isValidElement(e)||wo.isValidElementType(e)||!yn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Vm(e[n])}),t}function Kt(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return yn(e)&&yn(t)&&Object.keys(t).forEach(i=>{P.isValidElement(t[i])||wo.isValidElementType(t[i])?r[i]=t[i]:yn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&yn(e[i])?r[i]=Kt(e[i],t[i],n):n.clone?r[i]=yn(t[i])?Vm(t[i]):t[i]:r[i]=t[i]}),r}function ti(e,t){return t?Kt(e,t,{clone:!1}):e}const Fn=process.env.NODE_ENV!=="production"?Ve.oneOfType([Ve.number,Ve.string,Ve.object,Ve.array]):{};function Qd(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{var s,a;const o=/min-width:\s*([0-9.]+)/;return+(((s=r.match(o))==null?void 0:s[1])||0)-+(((a=i.match(o))==null?void 0:a[1])||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},{...t}):t}function oA(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function sA(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>\`.
118
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:On(18,`(${t})`));return null}const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function aA(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function n(o,s){o.up=(...a)=>t(e.breakpoints.up(...a),s),o.down=(...a)=>t(e.breakpoints.down(...a),s),o.between=(...a)=>t(e.breakpoints.between(...a),s),o.only=(...a)=>t(e.breakpoints.only(...a),s),o.not=(...a)=>{const l=t(e.breakpoints.not(...a),s);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=o=>(n(r,o),r);return n(i),{...e,containerQueries:i}}const Lo={xs:0,sm:600,md:900,lg:1200,xl:1536},Jd={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Lo[e]}px)`},lA={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:Lo[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function En(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Jd;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||Jd;return Object.keys(t).reduce((s,a)=>{if(oA(o.keys,a)){const l=sA(r.containerQueries?r:lA,a);l&&(s[l]=n(t[a],a))}else if(Object.keys(o.values||Lo).includes(a)){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function cA(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function ef(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Fo(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function vo(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=Fo(e,n)||r,t&&(i=t(i,r,e)),i}function gt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=Fo(l,r)||{};return En(s,a,d=>{let f=vo(c,i,d);return d===f&&typeof d=="string"&&(f=vo(c,i,`${t}${d==="default"?"":Xn(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Fn}:{},o.filterProps=[t],o}function uA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const dA={m:"margin",p:"padding"},fA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},tf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},hA=uA(e=>{if(e.length>2)if(tf[e])e=tf[e];else return[e];const[t,n]=e.split(""),r=dA[t],i=fA[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Bo=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],jo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],pA=[...Bo,...jo];function vi(e,t,n,r){const i=Fo(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof i=="string"?i.startsWith("var(")&&o===0?0:i.startsWith("var(")&&o===1?i:`calc(${o} * ${i})`:i*o):Array.isArray(i)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
66
119
  `)):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(`
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 xa(e){return Vr(e,"spacing",8,"spacing")}function Dr(e,t){return typeof t=="string"||t==null?t:e(t)}function bb(e,t){return n=>e.reduce((r,i)=>(r[i]=Dr(t,n),r),{})}function vb(e,t,n,r){if(!t.includes(n))return null;const i=yb(n),s=bb(i,r),o=e[n];return Ut(e,o,s)}function th(e,t){const n=xa(e.theme);return Object.keys(e).map(r=>vb(e,t,r,n)).reduce(gr,{})}function Ge(e){return th(e,Ii)}Ge.propTypes=process.env.NODE_ENV!=="production"?Ii.reduce((e,t)=>(e[t]=on,e),{}):{};Ge.filterProps=Ii;function Ke(e){return th(e,Ri)}Ke.propTypes=process.env.NODE_ENV!=="production"?Ri.reduce((e,t)=>(e[t]=on,e),{}):{};Ke.filterProps=Ri;process.env.NODE_ENV!=="production"&&xb.reduce((e,t)=>(e[t]=on,e),{});function Vi(...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]?gr(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 vt(e){return typeof e!="number"?e:`${e}px solid`}function Ct(e,t){return Xe({prop:e,themeKey:"borders",transform:t})}const wb=Ct("border",vt),kb=Ct("borderTop",vt),Sb=Ct("borderRight",vt),Cb=Ct("borderBottom",vt),Eb=Ct("borderLeft",vt),Tb=Ct("borderColor"),Ab=Ct("borderTopColor"),jb=Ct("borderRightColor"),Pb=Ct("borderBottomColor"),Mb=Ct("borderLeftColor"),Nb=Ct("outline",vt),Ib=Ct("outlineColor"),Di=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Vr(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Dr(t,r)});return Ut(e,e.borderRadius,n)}return null};Di.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:on}:{};Di.filterProps=["borderRadius"];Vi(wb,kb,Sb,Cb,Eb,Tb,Ab,jb,Pb,Mb,Di,Nb,Ib);const Fi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Vr(e.theme,"spacing",8,"gap"),n=r=>({gap:Dr(t,r)});return Ut(e,e.gap,n)}return null};Fi.propTypes=process.env.NODE_ENV!=="production"?{gap:on}:{};Fi.filterProps=["gap"];const Li=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Vr(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Dr(t,r)});return Ut(e,e.columnGap,n)}return null};Li.propTypes=process.env.NODE_ENV!=="production"?{columnGap:on}:{};Li.filterProps=["columnGap"];const Oi=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Vr(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Dr(t,r)});return Ut(e,e.rowGap,n)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{rowGap:on}:{};Oi.filterProps=["rowGap"];const Rb=Xe({prop:"gridColumn"}),Vb=Xe({prop:"gridRow"}),Db=Xe({prop:"gridAutoFlow"}),Fb=Xe({prop:"gridAutoColumns"}),Lb=Xe({prop:"gridAutoRows"}),Ob=Xe({prop:"gridTemplateColumns"}),$b=Xe({prop:"gridTemplateRows"}),_b=Xe({prop:"gridTemplateAreas"}),Bb=Xe({prop:"gridArea"});Vi(Fi,Li,Oi,Rb,Vb,Db,Fb,Lb,Ob,$b,_b,Bb);function Bn(e,t){return t==="grey"?t:e}const zb=Xe({prop:"color",themeKey:"palette",transform:Bn}),Hb=Xe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Bn}),Ub=Xe({prop:"backgroundColor",themeKey:"palette",transform:Bn});Vi(zb,Hb,Ub);function pt(e){return e<=1&&e!==0?`${e*100}%`:e}const Wb=Xe({prop:"width",transform:pt}),ba=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])||Mi[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:pt(n)}};return Ut(e,e.maxWidth,t)}return null};ba.filterProps=["maxWidth"];const Zb=Xe({prop:"minWidth",transform:pt}),qb=Xe({prop:"height",transform:pt}),Gb=Xe({prop:"maxHeight",transform:pt}),Kb=Xe({prop:"minHeight",transform:pt});Xe({prop:"size",cssProperty:"width",transform:pt});Xe({prop:"size",cssProperty:"height",transform:pt});const Yb=Xe({prop:"boxSizing"});Vi(Wb,ba,Zb,qb,Gb,Kb,Yb);const $i={border:{themeKey:"borders",transform:vt},borderTop:{themeKey:"borders",transform:vt},borderRight:{themeKey:"borders",transform:vt},borderBottom:{themeKey:"borders",transform:vt},borderLeft:{themeKey:"borders",transform:vt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Di},color:{themeKey:"palette",transform:Bn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Bn},backgroundColor:{themeKey:"palette",transform:Bn},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:Fi},rowGap:{style:Oi},columnGap:{style:Li},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:pt},maxWidth:{style:ba},minWidth:{transform:pt},height:{transform:pt},maxHeight:{transform:pt},minHeight:{transform:pt},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 Xb(...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 Qb(e,t){return typeof e=="function"?e(t):e}function Jb(){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=Ni(i,c)||{};return d?d(o):Ut(o,r,g=>{let p=bi(h,u,g);return g===p&&typeof g=="string"&&(p=bi(h,u,`${n}${g==="default"?"":bn(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??$i;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=hb(i.breakpoints),d=Object.keys(u);let h=u;return Object.keys(c).forEach(m=>{const g=Qb(c[m],i);if(g!=null)if(typeof g=="object")if(o[m])h=gr(h,e(m,g,i,o));else{const p=Ut({theme:i},g,b=>({[m]:b}));Xb(p,g)?h[m]=t({sx:g,theme:i,nested:!0}):h=gr(h,p)}else h=gr(h,e(m,g,i,o))}),!s&&i.modularCssLayers?{"@layer sx":_c(i,zc(d,h))}:_c(i,zc(d,h))}return Array.isArray(r)?r.map(a):a(r)}return t}const Wn=Jb();Wn.filterProps=["sx"];function ev(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 tv={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 nv(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var rv=/[A-Z]|^ms/g,iv=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nh=function(t){return t.charCodeAt(1)===45},Uc=function(t){return t!=null&&typeof t!="boolean"},xo=nv(function(e){return nh(e)?e:e.replace(rv,"-$&").toLowerCase()}),Wc=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(iv,function(r,i,s){return Xt={name:i,styles:s,next:Xt},i})}return tv[t]!==1&&!nh(t)&&typeof n=="number"&&n!==0?n+"px":n};function vi(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 Xt={name:i.name,styles:i.styles,next:Xt},i.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)Xt={name:o.name,styles:o.styles,next:Xt},o=o.next;var a=s.styles+";";return a}return ov(e,t,n)}}var l=n;return l}function ov(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=vi(e,t,n[i])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;Uc(a)&&(r+=xo(s)+":"+Wc(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&t==null)for(var l=0;l<o.length;l++)Uc(o[l])&&(r+=xo(s)+":"+Wc(s,o[l])+";");else{var c=vi(e,t,o);switch(s){case"animation":case"animationName":{r+=xo(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Zc=/label:\s*([^\s;{]+)\s*(;|$)/g,Xt;function sv(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="";Xt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,i+=vi(n,t,s);else{var o=s;i+=o[0]}for(var a=1;a<e.length;a++)if(i+=vi(n,t,e[a]),r){var l=s;i+=l[a]}Zc.lastIndex=0;for(var c="",u;(u=Zc.exec(i))!==null;)c+="-"+u[1];var d=ev(i)+c;return{name:d,styles:i,next:Xt}}/**
120
+ `)));const a=i[s];return o>=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(`
121
+ `)),()=>{})}function Ul(e){return vi(e,"spacing",8,"spacing")}function Ei(e,t){return typeof t=="string"||t==null?t:e(t)}function mA(e,t){return n=>e.reduce((r,i)=>(r[i]=Ei(t,n),r),{})}function gA(e,t,n,r){if(!t.includes(n))return null;const i=hA(n),o=mA(i,r),s=e[n];return En(e,s,o)}function zm(e,t){const n=Ul(e.theme);return Object.keys(e).map(r=>gA(e,t,r,n)).reduce(ti,{})}function dt(e){return zm(e,Bo)}dt.propTypes=process.env.NODE_ENV!=="production"?Bo.reduce((e,t)=>(e[t]=Fn,e),{}):{};dt.filterProps=Bo;function ft(e){return zm(e,jo)}ft.propTypes=process.env.NODE_ENV!=="production"?jo.reduce((e,t)=>(e[t]=Fn,e),{}):{};ft.filterProps=jo;process.env.NODE_ENV!=="production"&&pA.reduce((e,t)=>(e[t]=Fn,e),{});function $o(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?ti(i,t[o](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 Xt(e){return typeof e!="number"?e:`${e}px solid`}function Jt(e,t){return gt({prop:e,themeKey:"borders",transform:t})}const bA=Jt("border",Xt),yA=Jt("borderTop",Xt),xA=Jt("borderRight",Xt),wA=Jt("borderBottom",Xt),vA=Jt("borderLeft",Xt),EA=Jt("borderColor"),kA=Jt("borderTopColor"),SA=Jt("borderRightColor"),CA=Jt("borderBottomColor"),_A=Jt("borderLeftColor"),TA=Jt("outline",Xt),NA=Jt("outlineColor"),Vo=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=vi(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Ei(t,r)});return En(e,e.borderRadius,n)}return null};Vo.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Fn}:{};Vo.filterProps=["borderRadius"];$o(bA,yA,xA,wA,vA,EA,kA,SA,CA,_A,Vo,TA,NA);const zo=e=>{if(e.gap!==void 0&&e.gap!==null){const t=vi(e.theme,"spacing",8,"gap"),n=r=>({gap:Ei(t,r)});return En(e,e.gap,n)}return null};zo.propTypes=process.env.NODE_ENV!=="production"?{gap:Fn}:{};zo.filterProps=["gap"];const Uo=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=vi(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Ei(t,r)});return En(e,e.columnGap,n)}return null};Uo.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Fn}:{};Uo.filterProps=["columnGap"];const Ho=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=vi(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Ei(t,r)});return En(e,e.rowGap,n)}return null};Ho.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Fn}:{};Ho.filterProps=["rowGap"];const AA=gt({prop:"gridColumn"}),RA=gt({prop:"gridRow"}),MA=gt({prop:"gridAutoFlow"}),IA=gt({prop:"gridAutoColumns"}),OA=gt({prop:"gridAutoRows"}),PA=gt({prop:"gridTemplateColumns"}),DA=gt({prop:"gridTemplateRows"}),LA=gt({prop:"gridTemplateAreas"}),FA=gt({prop:"gridArea"});$o(zo,Uo,Ho,AA,RA,MA,IA,OA,PA,DA,LA,FA);function Er(e,t){return t==="grey"?t:e}const BA=gt({prop:"color",themeKey:"palette",transform:Er}),jA=gt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Er}),$A=gt({prop:"backgroundColor",themeKey:"palette",transform:Er});$o(BA,jA,$A);function Wt(e){return e<=1&&e!==0?`${e*100}%`:e}const VA=gt({prop:"width",transform:Wt}),Hl=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var i,o,s,a,l;const r=((s=(o=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:o.values)==null?void 0:s[n])||Lo[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:Wt(n)}};return En(e,e.maxWidth,t)}return null};Hl.filterProps=["maxWidth"];const zA=gt({prop:"minWidth",transform:Wt}),UA=gt({prop:"height",transform:Wt}),HA=gt({prop:"maxHeight",transform:Wt}),WA=gt({prop:"minHeight",transform:Wt});gt({prop:"size",cssProperty:"width",transform:Wt});gt({prop:"size",cssProperty:"height",transform:Wt});const GA=gt({prop:"boxSizing"});$o(VA,Hl,zA,UA,HA,WA,GA);const Wo={border:{themeKey:"borders",transform:Xt},borderTop:{themeKey:"borders",transform:Xt},borderRight:{themeKey:"borders",transform:Xt},borderBottom:{themeKey:"borders",transform:Xt},borderLeft:{themeKey:"borders",transform:Xt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Xt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Vo},color:{themeKey:"palette",transform:Er},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Er},backgroundColor:{themeKey:"palette",transform:Er},p:{style:ft},pt:{style:ft},pr:{style:ft},pb:{style:ft},pl:{style:ft},px:{style:ft},py:{style:ft},padding:{style:ft},paddingTop:{style:ft},paddingRight:{style:ft},paddingBottom:{style:ft},paddingLeft:{style:ft},paddingX:{style:ft},paddingY:{style:ft},paddingInline:{style:ft},paddingInlineStart:{style:ft},paddingInlineEnd:{style:ft},paddingBlock:{style:ft},paddingBlockStart:{style:ft},paddingBlockEnd:{style:ft},m:{style:dt},mt:{style:dt},mr:{style:dt},mb:{style:dt},ml:{style:dt},mx:{style:dt},my:{style:dt},margin:{style:dt},marginTop:{style:dt},marginRight:{style:dt},marginBottom:{style:dt},marginLeft:{style:dt},marginX:{style:dt},marginY:{style:dt},marginInline:{style:dt},marginInlineStart:{style:dt},marginInlineEnd:{style:dt},marginBlock:{style:dt},marginBlockStart:{style:dt},marginBlockEnd:{style:dt},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:zo},rowGap:{style:Ho},columnGap:{style:Uo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wt},maxWidth:{style:Hl},minWidth:{transform:Wt},height:{transform:Wt},maxHeight:{transform:Wt},minHeight:{transform:Wt},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 KA(...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 qA(e,t){return typeof e=="function"?e(t):e}function YA(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[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 f=Fo(i,c)||{};return d?d(s):En(s,r,g=>{let m=vo(f,u,g);return g===m&&typeof g=="string"&&(m=vo(f,u,`${n}${g==="default"?"":Xn(g)}`,g)),l===!1?m:{[l]:m}})}function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const s=i.unstable_sxConfig??Wo;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=cA(i.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const g=qA(c[p],i);if(g!=null)if(typeof g=="object")if(s[p])f=ti(f,e(p,g,i,s));else{const m=En({theme:i},g,x=>({[p]:x}));KA(m,g)?f[p]=t({sx:g,theme:i,nested:!0}):f=ti(f,m)}else f=ti(f,e(p,g,i,s))}),!o&&i.modularCssLayers?{"@layer sx":Qd(i,ef(d,f))}:Qd(i,ef(d,f))}return Array.isArray(r)?r.map(a):a(r)}return t}const Tr=YA();Tr.filterProps=["sx"];function ZA(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 XA={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 QA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var JA=/[A-Z]|^ms/g,eR=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Um=function(t){return t.charCodeAt(1)===45},nf=function(t){return t!=null&&typeof t!="boolean"},Us=QA(function(e){return Um(e)?e:e.replace(JA,"-$&").toLowerCase()}),rf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(eR,function(r,i,o){return Rn={name:i,styles:o,next:Rn},i})}return XA[t]!==1&&!Um(t)&&typeof n=="number"&&n!==0?n+"px":n};function Eo(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 Rn={name:i.name,styles:i.styles,next:Rn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Rn={name:s.name,styles:s.styles,next:Rn},s=s.next;var a=o.styles+";";return a}return tR(e,t,n)}}var l=n;return l}function tR(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Eo(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;nf(a)&&(r+=Us(o)+":"+rf(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)nf(s[l])&&(r+=Us(o)+":"+rf(o,s[l])+";");else{var c=Eo(e,t,s);switch(o){case"animation":case"animationName":{r+=Us(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var of=/label:\s*([^\s;{]+)\s*(;|$)/g,Rn;function nR(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="";Rn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=Eo(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=Eo(n,t,e[a]),r){var l=o;i+=l[a]}of.lastIndex=0;for(var c="",u;(u=of.exec(i))!==null;)c+="-"+u[1];var d=ZA(i)+c;return{name:d,styles:i,next:Rn}}/**
69
122
  * @mui/styled-engine v7.2.0
70
123
  *
71
124
  * @license MIT
72
125
  * This source code is licensed under the MIT license found in the
73
126
  * LICENSE file in the root directory of this source tree.
74
- */function av(e,t){const n=Wm(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 lv(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const qc=[];function yn(e){return qc[0]=e,sv(qc)}const cv=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 uv(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,s=cv(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 dv={borderRadius:4};function rh(e=8,t=xa({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 fv(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 ih(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={},...o}=e,a=uv(n),l=rh(i);let c=gt({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...dv,...s}},o);return c=db(c),c.applyStyles=fv,c=t.reduce((u,d)=>gt(u,d),c),c.unstable_sxConfig={...$i,...o==null?void 0:o.unstable_sxConfig},c.unstable_sx=function(d){return Wn({sx:d,theme:this})},c}const hv={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 va(e,t,n="Mui"){const r=hv[t];return r?`${n}-${r}`:`${Y1.generate(e)}-${t}`}function mv(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=va(e,i,n)}),r}function oh(e,t=""){return e.displayName||e.name||t}function Gc(e,t,n){const r=oh(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function pv(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return oh(e,"Component");if(typeof e=="object")switch(e.$$typeof){case xi.ForwardRef:return Gc(e,e.render,"ForwardRef");case xi.Memo:return Gc(e,e.type,"memo");default:return}}}function sh(e){const{variants:t,...n}=e,r={variants:t,style:yn(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=yn(i.style))}),r}const gv=ih();function bo(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function mn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function yv(e){return e?(t,n)=>n[e]:null}function xv(e,t,n){e.theme=kv(e.theme)?n:e.theme[t]||e.theme}function ai(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>ai(e,i,n));if(Array.isArray(r==null?void 0:r.variants)){let i;if(r.isProcessed)i=n?mn(r.style,n):r.style;else{const{variants:s,...o}=r;i=n?mn(yn(o),n):o}return ah(e,r.variants,[i],n)}return r!=null&&r.isProcessed?n?mn(yn(r.style),n):r.style:n?mn(yn(r),n):r}function ah(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?mn(yn(a.style(i)),r):a.style(i))):n.push(r?mn(yn(a.style),r):a.style)}return n}function bv(e={}){const{themeId:t,defaultTheme:n=gv,rootShouldForwardProp:r=bo,slotShouldForwardProp:i=bo}=e;function s(a){xv(a,t,n)}return(a,l={})=>{lv(a,C=>C.filter(N=>N!==Wn));const{name:c,slot:u,skipVariantsResolver:d,skipSx:h,overridesResolver:m=yv(lh(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=bo;u==="Root"||u==="root"?k=r:u?k=i:Sv(a)&&(k=void 0);const S=av(a,{shouldForwardProp:k,label:wv(c,u),...g}),A=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(P){return ai(P,C,P.theme.modularCssLayers?p:void 0)};if(_t(C)){const N=sh(C);return function(L){return N.variants?ai(L,N,L.theme.modularCssLayers?p:void 0):L.theme.modularCssLayers?mn(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 K=(F=(ie=B.theme.components)==null?void 0:ie[c])==null?void 0:F.styleOverrides;if(!K)return null;const de={};for(const W in K)de[W]=ai(B,K[W],B.theme.modularCssLayers?"theme":void 0);return m(B,de)}),c&&!b&&L.push(function(B){var de,ie;const H=B.theme,K=(ie=(de=H==null?void 0:H.components)==null?void 0:de[c])==null?void 0:ie.variants;return K?ah(B,K,[],B.theme.modularCssLayers?"theme":void 0):null}),v||L.push(Wn),Array.isArray(P[0])){const D=P.shift(),B=new Array(N.length).fill(""),H=new Array(L.length).fill("");let K;K=[...B,...D,...H],K.raw=[...B,...D.raw,...H],N.unshift(K)}const y=[...N,...P,...L],M=S(...y);return a.muiName&&(M.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(M.displayName=vv(c,u,a)),M};return S.withConfig&&(T.withConfig=S.withConfig),T}}function vv(e,t,n){return e?`${e}${bn(t||"")}`:`Styled(${pv(n)})`}function wv(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${lh(t||"Root")}`),n}function kv(e){for(const t in e)return!1;return!0}function Sv(e){return typeof e=="string"&&e.charCodeAt(0)>96}function lh(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function hs(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]=hs(o[c],a[c],n)}}}else s==="className"&&n&&t.className?r.className=Ns(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 Cv(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function wa(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}].`),Cv(e,t,n)}function Ev(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 nn(e){if(e.type)return e;if(e.charAt(0)==="#")return nn(Ev(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().`:tn(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.`:tn(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const Tv=e=>{const t=nn(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},ur=(e,t)=>{try{return Tv(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _i(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 ch(e){e=nn(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])),_i({type:a,values:l})}function ms(e){e=nn(e);let t=e.type==="hsl"||e.type==="hsla"?nn(ch(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 Kc(e,t){const n=ms(e),r=ms(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Av(e,t){return e=nn(e),t=wa(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_i(e)}function Yr(e,t,n){try{return Av(e,t)}catch{return e}}function ka(e,t){if(e=nn(e),t=wa(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 _i(e)}function De(e,t,n){try{return ka(e,t)}catch{return e}}function Sa(e,t){if(e=nn(e),t=wa(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 _i(e)}function Fe(e,t,n){try{return Sa(e,t)}catch{return e}}function jv(e,t=.15){return ms(e)>.5?ka(e,t):Sa(e,t)}function Xr(e,t,n){try{return jv(e,t)}catch{return e}}const Pv=x.createContext(void 0);process.env.NODE_ENV!=="production"&&(Te.node,Te.object);function Mv(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?hs(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?hs(i,r,t.components.mergeClassNameAndStyle):r}function Nv({props:e,name:t}){const n=x.useContext(Pv);return Mv({props:e,name:t,theme:{components:n}})}const Yc={theme:void 0};function Iv(e){let t,n;return function(i){let s=t;return(s===void 0||i.theme!==n)&&(Yc.theme=i.theme,s=sh(e(Yc)),t=s,n=i.theme),s}}function Rv(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 Xc=(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])})},Vv=(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)},Dv=(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 vo(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},s={},o={};return Vv(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,d=Dv(a,l);Object.assign(i,{[u]:d}),Xc(s,a,`var(${u})`,c),Xc(o,a,`var(${u}, ${d})`,c)}},a=>a[0]==="vars"),{css:i,vars:s,varsWithDefaults:o}}function Fv(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}=vo(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}=vo(A,t);h=gt(h,N),m[S]={css:C,vars:T}}),g){const{css:S,vars:A,varsWithDefaults:T}=vo(g,t);h=gt(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=gt(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,K;const D=(K=(H=s[y])==null?void 0:H.palette)==null?void 0:K.mode,B=!r&&D?{colorScheme:D,...M}:{...M};T(n(y,{...B}),B)}),S}}}function Lv(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 Ar={black:"#000",white:"#fff"},Ov={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"},En={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Tn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ir={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},An={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},jn={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Pn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function uh(){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:Ar.white,default:Ar.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 $v=uh();function dh(){return{text:{primary:Ar.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:Ar.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 Qc=dh();function Jc(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=Sa(e.main,i):t==="dark"&&(e.dark=ka(e.main,s)))}function _v(e="light"){return e==="dark"?{main:An[200],light:An[50],dark:An[400]}:{main:An[700],light:An[400],dark:An[800]}}function Bv(e="light"){return e==="dark"?{main:En[200],light:En[50],dark:En[400]}:{main:En[500],light:En[300],dark:En[700]}}function zv(e="light"){return e==="dark"?{main:Tn[500],light:Tn[300],dark:Tn[700]}:{main:Tn[700],light:Tn[400],dark:Tn[800]}}function Hv(e="light"){return e==="dark"?{main:jn[400],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[500],dark:jn[900]}}function Uv(e="light"){return e==="dark"?{main:Pn[400],light:Pn[300],dark:Pn[700]}:{main:Pn[800],light:Pn[500],dark:Pn[900]}}function Wv(e="light"){return e==="dark"?{main:ir[400],light:ir[300],dark:ir[700]}:{main:"#ed6c02",light:ir[500],dark:ir[900]}}function Ca(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,s=e.primary||_v(t),o=e.secondary||Bv(t),a=e.error||zv(t),l=e.info||Hv(t),c=e.success||Uv(t),u=e.warning||Wv(t);function d(p){const b=Kc(p,Qc.text.primary)>=n?Qc.text.primary:$v.text.primary;if(process.env.NODE_ENV!=="production"){const v=Kc(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.`:tn(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.
127
+ */function rR(e,t){const n=Hg(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(`
128
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function iR(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const sf=[];function qn(e){return sf[0]=e,nR(sf)}const oR=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 sR(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=oR(t),s=Object.keys(o);function a(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const g=s.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(g!==-1&&typeof t[s[g]]=="number"?t[s[g]]:p)-r/100}${n})`}function u(f){return s.indexOf(f)+1<s.length?c(f,s[s.indexOf(f)+1]):a(f)}function d(f){const p=s.indexOf(f);return p===0?a(s[1]):p===s.length-1?l(s[p]):c(f,s[s.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:a,down:l,between:c,only:u,not:d,unit:n,...i}}const aR={borderRadius:4};function Hm(e=8,t=Ul({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(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function lR(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 Wm(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...s}=e,a=sR(n),l=Hm(i);let c=Kt({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...aR,...o}},s);return c=aA(c),c.applyStyles=lR,c=t.reduce((u,d)=>Kt(u,d),c),c.unstable_sxConfig={...Wo,...s==null?void 0:s.unstable_sxConfig},c.unstable_sx=function(d){return Tr({sx:d,theme:this})},c}const cR={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 Wl(e,t,n="Mui"){const r=cR[t];return r?`${n}-${r}`:`${GN.generate(e)}-${t}`}function uR(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Wl(e,i,n)}),r}function Gm(e,t=""){return e.displayName||e.name||t}function af(e,t,n){const r=Gm(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function dR(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Gm(e,"Component");if(typeof e=="object")switch(e.$$typeof){case wo.ForwardRef:return af(e,e.render,"ForwardRef");case wo.Memo:return af(e,e.type,"memo");default:return}}}function Km(e){const{variants:t,...n}=e,r={variants:t,style:qn(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=qn(i.style))}),r}const fR=Wm();function Hs(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Wn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function hR(e){return e?(t,n)=>n[e]:null}function pR(e,t,n){e.theme=yR(e.theme)?n:e.theme[t]||e.theme}function ro(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>ro(e,i,n));if(Array.isArray(r==null?void 0:r.variants)){let i;if(r.isProcessed)i=n?Wn(r.style,n):r.style;else{const{variants:o,...s}=r;i=n?Wn(qn(s),n):s}return qm(e,r.variants,[i],n)}return r!=null&&r.isProcessed?n?Wn(qn(r.style),n):r.style:n?Wn(qn(r),n):r}function qm(e,t,n=[],r=void 0){var o;let i;e:for(let s=0;s<t.length;s+=1){const a=t[s];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]&&((o=e.ownerState)==null?void 0:o[l])!==a.props[l])continue e;typeof a.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),n.push(r?Wn(qn(a.style(i)),r):a.style(i))):n.push(r?Wn(qn(a.style),r):a.style)}return n}function mR(e={}){const{themeId:t,defaultTheme:n=fR,rootShouldForwardProp:r=Hs,slotShouldForwardProp:i=Hs}=e;function o(a){pR(a,t,n)}return(a,l={})=>{iR(a,C=>C.filter(M=>M!==Tr));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=hR(Ym(u)),...g}=l,m=c&&c.startsWith("Mui")||u?"components":"custom",x=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let k=Hs;u==="Root"||u==="root"?k=r:u?k=i:xR(a)&&(k=void 0);const v=rR(a,{shouldForwardProp:k,label:bR(c,u),...g}),_=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(N){return ro(N,C,N.theme.modularCssLayers?m:void 0)};if(yn(C)){const M=Km(C);return function(I){return M.variants?ro(I,M,I.theme.modularCssLayers?m:void 0):I.theme.modularCssLayers?Wn(M.style,m):M.style}}return C},S=(...C)=>{const M=[],N=C.map(_),I=[];if(M.push(o),c&&p&&I.push(function(D){var ne,j;const U=(j=(ne=D.theme.components)==null?void 0:ne[c])==null?void 0:j.styleOverrides;if(!U)return null;const re={};for(const W in U)re[W]=ro(D,U[W],D.theme.modularCssLayers?"theme":void 0);return p(D,re)}),c&&!x&&I.push(function(D){var re,ne;const $=D.theme,U=(ne=(re=$==null?void 0:$.components)==null?void 0:re[c])==null?void 0:ne.variants;return U?qm(D,U,[],D.theme.modularCssLayers?"theme":void 0):null}),y||I.push(Tr),Array.isArray(N[0])){const O=N.shift(),D=new Array(M.length).fill(""),$=new Array(I.length).fill("");let U;U=[...D,...O,...$],U.raw=[...D,...O.raw,...$],M.unshift(U)}const b=[...M,...N,...I],R=v(...b);return a.muiName&&(R.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(R.displayName=gR(c,u,a)),R};return v.withConfig&&(S.withConfig=v.withConfig),S}}function gR(e,t,n){return e?`${e}${Xn(t||"")}`:`Styled(${dR(n)})`}function bR(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Ym(t||"Root")}`),n}function yR(e){for(const t in e)return!1;return!0}function xR(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ym(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Oa(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],a=t[o];if(!a)r[o]=s||{};else if(!s)r[o]=a;else{r[o]={...a};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;r[o][c]=Oa(s[c],a[c],n)}}}else o==="className"&&n&&t.className?r.className=Ba(e==null?void 0:e.className,t==null?void 0:t.className):o==="style"&&n&&t.style?r.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:r[o]===void 0&&(r[o]=e[o])}return r}function wR(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Gl(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}].`),wR(e,t,n)}function vR(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 Pn(e){if(e.type)return e;if(e.charAt(0)==="#")return Pn(vR(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.
129
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:On(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.
130
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:On(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const ER=e=>{const t=Pn(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Gr=(e,t)=>{try{return ER(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Go(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<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 Zm(e){e=Pn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Go({type:a,values:l})}function Pa(e){e=Pn(e);let t=e.type==="hsl"||e.type==="hsla"?Pn(Zm(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 lf(e,t){const n=Pa(e),r=Pa(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function kR(e,t){return e=Pn(e),t=Gl(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Go(e)}function qi(e,t,n){try{return kR(e,t)}catch{return e}}function Kl(e,t){if(e=Pn(e),t=Gl(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 Go(e)}function Xe(e,t,n){try{return Kl(e,t)}catch{return e}}function ql(e,t){if(e=Pn(e),t=Gl(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 Go(e)}function Qe(e,t,n){try{return ql(e,t)}catch{return e}}function SR(e,t=.15){return Pa(e)>.5?Kl(e,t):ql(e,t)}function Yi(e,t,n){try{return SR(e,t)}catch{return e}}const CR=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ve.node,Ve.object);function _R(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?Oa(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Oa(i,r,t.components.mergeClassNameAndStyle):r}function TR({props:e,name:t}){const n=P.useContext(CR);return _R({props:e,name:t,theme:{components:n}})}const cf={theme:void 0};function NR(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(cf.theme=i.theme,o=Km(e(cf)),t=o,n=i.theme),o}}function AR(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 uf=(e,t,n,r=[])=>{let i=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},RR=(e,t,n)=>{function r(i,o=[],s=[]){Object.entries(i).forEach(([a,l])=>{(!n||n&&!n([...o,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,a],Array.isArray(l)?[...s,a]:s):t([...o,a],l,s))})}r(e)},MR=(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 Ws(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},s={};return RR(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,d=MR(a,l);Object.assign(i,{[u]:d}),uf(o,a,`var(${u})`,c),uf(s,a,`var(${u}, ${d})`,c)}},a=>a[0]==="vars"),{css:i,vars:o,varsWithDefaults:s}}function IR(e,t={}){const{getSelector:n=x,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:o={},components:s,defaultColorScheme:a="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=Ws(l,t);let f=d;const p={},{[a]:g,...m}=o;if(Object.entries(m||{}).forEach(([v,_])=>{const{vars:S,css:C,varsWithDefaults:M}=Ws(_,t);f=Kt(f,M),p[v]={css:C,vars:S}}),g){const{css:v,vars:_,varsWithDefaults:S}=Ws(g,t);f=Kt(f,S),p[a]={css:v,vars:_}}function x(v,_){var C,M;let S=i;if(i==="class"&&(S=".%s"),i==="data"&&(S="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(S=`[${i}="%s"]`),v){if(S==="media")return e.defaultColorScheme===v?":root":{[`@media (prefers-color-scheme: ${((M=(C=o[v])==null?void 0:C.palette)==null?void 0:M.mode)||v})`]:{":root":_}};if(S)return e.defaultColorScheme===v?`:root, ${S.replace("%s",String(v))}`:S.replace("%s",String(v))}return":root"}return{vars:f,generateThemeVars:()=>{let v={...c};return Object.entries(p).forEach(([,{vars:_}])=>{v=Kt(v,_)}),v},generateStyleSheets:()=>{var N,I;const v=[],_=e.defaultColorScheme||"light";function S(b,R){Object.keys(R).length&&v.push(typeof b=="string"?{[b]:{...R}}:b)}S(n(void 0,{...u}),u);const{[_]:C,...M}=p;if(C){const{css:b}=C,R=(I=(N=o[_])==null?void 0:N.palette)==null?void 0:I.mode,O=!r&&R?{colorScheme:R,...b}:{...b};S(n(_,{...O}),O)}return Object.entries(M).forEach(([b,{css:R}])=>{var $,U;const O=(U=($=o[b])==null?void 0:$.palette)==null?void 0:U.mode,D=!r&&O?{colorScheme:O,...R}:{...R};S(n(b,{...D}),D)}),v}}}function OR(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 fi={black:"#000",white:"#fff"},PR={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"},sr={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ar={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Hr={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},lr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},cr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},ur={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Xm(){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:fi.white,default:fi.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 DR=Xm();function Qm(){return{text:{primary:fi.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:fi.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 df=Qm();function ff(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=ql(e.main,i):t==="dark"&&(e.dark=Kl(e.main,o)))}function LR(e="light"){return e==="dark"?{main:lr[200],light:lr[50],dark:lr[400]}:{main:lr[700],light:lr[400],dark:lr[800]}}function FR(e="light"){return e==="dark"?{main:sr[200],light:sr[50],dark:sr[400]}:{main:sr[500],light:sr[300],dark:sr[700]}}function BR(e="light"){return e==="dark"?{main:ar[500],light:ar[300],dark:ar[700]}:{main:ar[700],light:ar[400],dark:ar[800]}}function jR(e="light"){return e==="dark"?{main:cr[400],light:cr[300],dark:cr[700]}:{main:cr[700],light:cr[500],dark:cr[900]}}function $R(e="light"){return e==="dark"?{main:ur[400],light:ur[300],dark:ur[700]}:{main:ur[800],light:ur[500],dark:ur[900]}}function VR(e="light"){return e==="dark"?{main:Hr[400],light:Hr[300],dark:Hr[700]}:{main:"#ed6c02",light:Hr[500],dark:Hr[900]}}function Yl(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...i}=e,o=e.primary||LR(t),s=e.secondary||FR(t),a=e.error||BR(t),l=e.info||jR(t),c=e.success||$R(t),u=e.warning||VR(t);function d(m){const x=lf(m,df.text.primary)>=n?df.text.primary:DR.text.primary;if(process.env.NODE_ENV!=="production"){const y=lf(m,x);y<3&&console.error([`MUI: The contrast ratio of ${y}:1 for ${x} 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(`
131
+ `))}return x}const f=({color:m,name:x,mainShade:y=500,lightShade:k=300,darkShade:v=700})=>{if(m={...m},!m.main&&m[y]&&(m.main=m[y]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
132
+ The color object needs to have a \`main\` property or a \`${y}\` property.`:On(11,x?` (${x})`:"",y));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${x?` (${x})`:""} provided to augmentColor(color) is invalid.
133
+ \`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
81
134
 
82
135
  Did you intend to use one of the following approaches?
83
136
 
@@ -89,78 +142,21 @@ const theme1 = createTheme({ palette: {
89
142
 
90
143
  const theme2 = createTheme({ palette: {
91
144
  primary: { main: green[500] },
92
- } });`:tn(12,b?` (${b})`:"",JSON.stringify(p.main)));return Jc(p,"light",k,r),Jc(p,"dark",S,r),p.contrastText||(p.contrastText=d(p.main)),p};let m;return t==="light"?m=uh():t==="dark"&&(m=dh()),process.env.NODE_ENV!=="production"&&(m||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),gt({common:{...Ar},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:Ov,contrastThreshold:n,getContrastText:d,augmentColor:h,tonalOffset:r,...m},i)}function Zv(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 qv(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Gv(e){return Math.round(e*1e5)/1e5}const eu={textTransform:"uppercase"},tu='"Roboto", "Helvetica", "Arial", sans-serif';function Kv(e,t){const{fontFamily:n=tu,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===tu?{letterSpacing:`${Gv(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,eu),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,eu),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return gt({htmlFontSize:l,pxToRem:m,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:o,fontWeightBold:a,...p},d,{clone:!1})}const Yv=.2,Xv=.14,Qv=.12;function _e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Yv})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Xv})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Qv})`].join(",")}const Jv=["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)],ew={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)"},tw={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function nu(e){return`${Math.round(e)}ms`}function nw(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function rw(e){const t={...ew,...e.easing},n={...tw,...e.duration};return{getAutoHeightDuration:nw,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:nu(o)} ${a} ${typeof l=="string"?l:nu(l)}`).join(",")},...e,easing:t,duration:n}}const iw={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ow(e){return _t(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function fh(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];!ow(a)||o.startsWith("unstable_")?delete r[o]:_t(a)&&(r[o]={...a},n(r[o]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
145
+ } });`:On(12,x?` (${x})`:"",JSON.stringify(m.main)));return ff(m,"light",k,r),ff(m,"dark",v,r),m.contrastText||(m.contrastText=d(m.main)),m};let p;return t==="light"?p=Xm():t==="dark"&&(p=Qm()),process.env.NODE_ENV!=="production"&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Kt({common:{...fi},mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:a,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:PR,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},i)}function zR(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function UR(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function HR(e){return Math.round(e*1e5)/1e5}const hf={textTransform:"uppercase"},pf='"Roboto", "Helvetica", "Arial", sans-serif';function WR(e,t){const{fontFamily:n=pf,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:s=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 f=r/14,p=u||(x=>`${x/l*f}rem`),g=(x,y,k,v,_)=>({fontFamily:n,fontWeight:x,fontSize:p(y),lineHeight:k,...n===pf?{letterSpacing:`${HR(v/y)}em`}:{},..._,...c}),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(o,48,1.167,0),h4:g(o,34,1.235,.25),h5:g(o,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(o,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(o,16,1.5,.15),body2:g(o,14,1.43,.15),button:g(s,14,1.75,.4,hf),caption:g(o,12,1.66,.4),overline:g(o,12,2.66,1,hf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Kt({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:a,...m},d,{clone:!1})}const GR=.2,KR=.14,qR=.12;function ot(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${GR})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${KR})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${qR})`].join(",")}const YR=["none",ot(0,2,1,-1,0,1,1,0,0,1,3,0),ot(0,3,1,-2,0,2,2,0,0,1,5,0),ot(0,3,3,-2,0,3,4,0,0,1,8,0),ot(0,2,4,-1,0,4,5,0,0,1,10,0),ot(0,3,5,-1,0,5,8,0,0,1,14,0),ot(0,3,5,-1,0,6,10,0,0,1,18,0),ot(0,4,5,-2,0,7,10,1,0,2,16,1),ot(0,5,5,-3,0,8,10,1,0,3,14,2),ot(0,5,6,-3,0,9,12,1,0,3,16,2),ot(0,6,6,-3,0,10,14,1,0,4,18,3),ot(0,6,7,-4,0,11,15,1,0,4,20,3),ot(0,7,8,-4,0,12,17,2,0,5,22,4),ot(0,7,8,-4,0,13,19,2,0,5,24,4),ot(0,7,9,-4,0,14,21,2,0,5,26,4),ot(0,8,9,-5,0,15,22,2,0,6,28,5),ot(0,8,10,-5,0,16,24,2,0,6,30,5),ot(0,8,11,-5,0,17,26,2,0,6,32,5),ot(0,9,11,-5,0,18,28,2,0,7,34,6),ot(0,9,12,-6,0,19,29,2,0,7,36,6),ot(0,10,13,-6,0,20,31,3,0,8,38,7),ot(0,10,13,-6,0,21,33,3,0,8,40,7),ot(0,10,14,-6,0,22,35,3,0,8,42,7),ot(0,11,14,-7,0,23,36,3,0,9,44,8),ot(0,11,15,-7,0,24,38,3,0,9,46,8)],ZR={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)"},XR={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function mf(e){return`${Math.round(e)}ms`}function QR(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function JR(e){const t={...ZR,...e.easing},n={...XR,...e.duration};return{getAutoHeightDuration:QR,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=f=>typeof f=="string",d=f=>!Number.isNaN(parseFloat(f));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!d(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),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 o!="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(`
146
+ `)),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 s=="string"?s:mf(s)} ${a} ${typeof l=="string"?l:mf(l)}`).join(",")},...e,easing:t,duration:n}}const eM={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function tM(e){return yn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Jm(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[s,a]=i[o];!tM(a)||s.startsWith("unstable_")?delete r[s]:yn(a)&&(r[s]={...a},n(r[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
94
147
 
95
148
  const theme = ${JSON.stringify(t,null,2)};
96
149
 
97
150
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
98
151
  theme.transitions = createTransitions(theme.transitions || {});
99
152
 
100
- export default theme;`}function ps(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.":tn(20));const u=Ca(s),d=ih(e);let h=gt(d,{mixins:qv(d.breakpoints,r),palette:u,shadows:Jv.slice(),typography:Kv(u,a),transitions:rw(o),zIndex:{...iw}});if(h=gt(h,c),h=t.reduce((m,g)=>gt(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=va("",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={...$i,...c==null?void 0:c.unstable_sxConfig},h.unstable_sx=function(g){return Wn({sx:g,theme:this})},h.toRuntimeSource=fh,h}function sw(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 aw=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=sw(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function hh(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function mh(e){return e==="dark"?aw:[]}function lw(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,s=Ca(t);return{palette:s,opacity:{...hh(s.mode),...n},overlays:r||mh(s.mode),...i}}function cw(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 uw=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],dw=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 uw(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 fw(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function O(e,t,n){!e[t]&&n&&(e[t]=n)}function dr(e){return typeof e!="string"||!e.startsWith("hsl")?e:ch(e)}function $t(e,t){`${t}Channel`in e||(e[`${t}Channel`]=ur(dr(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 hw(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Mt=e=>{try{return e()}catch{}},mw=(e="mui")=>Rv(e);function wo(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=lw({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:s,...o}=ps({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:s,opacity:{...hh(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||mh(i)},o}function pw(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",shouldSkipGeneratingVar:o=cw,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=mw(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.`:tn(21,d));const S=wo(v,k,c,d);g&&!v.light&&wo(v,g,void 0,"light"),p&&!v.dark&&wo(v,p,void 0,"dark");let A={defaultColorScheme:d,...S,cssVarPrefix:s,colorSchemeSelector:a,rootSelector:l,getCssVar:h,colorSchemes:v,font:{...Zv(S.typography),...S.font},spacing:hw(c.spacing)};Object.keys(A.colorSchemes).forEach(L=>{const y=A.colorSchemes[L].palette,M=D=>{const B=D.split("-"),H=B[1],K=B[2];return h(D,y[H][K])};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")),fw(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",Mt(()=>y.getContrastText(y.error.main))),O(y.Alert,"infoFilledColor",Mt(()=>y.getContrastText(y.info.main))),O(y.Alert,"successFilledColor",Mt(()=>y.getContrastText(y.success.main))),O(y.Alert,"warningFilledColor",Mt(()=>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=Xr(y.background.default,.8);O(y.SnackbarContent,"bg",D),O(y.SnackbarContent,"color",Mt(()=>y.getContrastText(D))),O(y.SpeedDialAction,"fabHoverBg",Xr(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(Yr(y.divider,1),.88)),O(y.Tooltip,"bg",Yr(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",Mt(()=>y.getContrastText(y.error.dark))),O(y.Alert,"infoFilledColor",Mt(()=>y.getContrastText(y.info.dark))),O(y.Alert,"successFilledColor",Mt(()=>y.getContrastText(y.success.dark))),O(y.Alert,"warningFilledColor",Mt(()=>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=Xr(y.background.default,.98);O(y.SnackbarContent,"bg",D),O(y.SnackbarContent,"color",Mt(()=>y.getContrastText(D))),O(y.SpeedDialAction,"fabHoverBg",Xr(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(Yr(y.divider,1),.68)),O(y.Tooltip,"bg",Yr(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",ur(dr(B.main))),B.light&&O(y[D],"lightChannel",ur(dr(B.light))),B.dark&&O(y[D],"darkChannel",ur(dr(B.dark))),B.contrastText&&O(y[D],"contrastTextChannel",ur(dr(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)=>gt(L,y),A);const T={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:dw(A)},{vars:C,generateThemeVars:N,generateStyleSheets:P}=Fv(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 rh(c.spacing,xa(this))},A.getColorSchemeSelector=Lv(a),A.spacing=A.generateSpacing(),A.shouldSkipGeneratingVar=o,A.unstable_sxConfig={...$i,...c==null?void 0:c.unstable_sxConfig},A.unstable_sx=function(y){return Wn({sx:y,theme:this})},A.toRuntimeSource=fh,A}function ru(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ca({...n===!0?{}:n.palette,mode:t})})}function gw(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 ps(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const d=ps({...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},ru(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},ru(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),pw({...o,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const yw=gw(),xw="$$material";function bw(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const vw=e=>bw(e)&&e!=="classes",ww=bv({themeId:xw,defaultTheme:yw,rootShouldForwardProp:vw}),kw=Iv;process.env.NODE_ENV!=="production"&&(Te.node,Te.object.isRequired);function Sw(e){return Nv(e)}function Cw(e){return va("MuiSvgIcon",e)}mv("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ew=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${bn(t)}`,`fontSize${bn(n)}`]};return ob(i,Cw,r)},Tw=ww("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${bn(n.color)}`],t[`fontSize${bn(n.fontSize)}`]]}})(kw(({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}}]}})),wi=x.forwardRef(function(t,n){const r=Sw({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=Ew(p);return f.jsxs(Tw,{as:a,className:Ns(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"&&(wi.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});wi.muiName="SvgIcon";function Jn(e,t){function n(r,i){return f.jsx(wi,{"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=wi.muiName,x.memo(x.forwardRef(n))}const Aw=Jn(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"),jw=Jn(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"),Pw=Jn([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"),ph=Jn(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"),gh=Jn(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"),yh=Jn(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 Mw({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 Nw({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var o,a,l;const i=et(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:`
103
- relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
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":""}
106
- transition-all duration-200 group-hover:scale-[1.02]
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(Mw,{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 xh=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,nt,Zt,Ft,_;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,K]=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();K(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,G,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:(G=J.sender)==null?void 0:G.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 ht;if($e.some(an=>an.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(an=>new Set(an).add(J.id)),!((ht=J.metadata)!=null&&ht.streaming))){const an=J.content.length*35+1e3;setTimeout(()=>{L(_m=>{const Ya=new Set(_m);return Ya.delete(J.id),Ya})},an)}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(G=>{const be=G.findIndex(Ce=>Ce.id===J.id);if(be>=0){const Ce=[...G];return Ce[be]=J,Ce}else return[...G,J]});return}S(G=>G.map(be=>be.id===J.id?{...J}:be)),setTimeout(()=>{H&&U(!0)},0),(ke=J.metadata)!=null&&ke.streaming||L(G=>{const be=new Set(G);return be.delete(J.id),be})},ue=J=>{var ke,G,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:(G=J.sender)==null?void 0:G.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(Et=>Et.some(an=>an.id===J.id)?(console.log("SessionView: Sent message already exists, skipping:",J.id),Et):(console.log("SessionView: Adding sent message:",J.id),[...Et,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?Yf(o):{agent:{isActive:!1}},$=et(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 G=o.getCurrentInteraction();G&&(console.log("📱 SessionView: Setting current interaction:",G.methodName,"mode:",G.presentationMode),v(G))},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]),G1(),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 X(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(ma,{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",((nt=$.text)==null?void 0:nt.primary)||"text-gray-900 dark:text-white"),children:"Start Speaking"}),f.jsx("p",{className:ce("text-sm",((Zt=$.text)==null?void 0:Zt.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(Qt,{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(Nw,{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:()=>{K(!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(q1,{chatOpen:u,client:o},`media-tiles-${((_=(Ft=o==null?void 0:o.getCurrentSession)==null?void 0:Ft.call(o))==null?void 0:_.id)||"no-session"}`)}),f.jsx(Qt,{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(Tr,{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(Qt,{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(Tr,{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(Iw,{capabilities:t,onSendMessage:X,onSendAttachments:R,onEndCall:re,onChatOpenChange:d,disabled:e,theme:s,client:o,sessionStarted:n})})]})});xh.displayName="SessionView";function Iw({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=navigator.userAgent.toLowerCase(),T=["android","iphone","ipad","mobile","tablet"].some(P=>S.includes(P)),C="ontouchstart"in window||navigator.maxTouchPoints>0,N=window.innerWidth<=768;u(T||C&&N)};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("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(Aw,{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(Pw,{className:"w-4 h-4"})})]}),f.jsx("div",{className:"flex-1 flex justify-center px-2",children:f.jsx(_1,{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(jw,{className:"w-4 h-4"})})})]})})}function Rw(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Vw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fw={};function iu(e,t){return(Fw.jsx?Dw:Vw).test(e)}const Lw=/[ \t\n\f\r]/g;function Ow(e){return typeof e=="object"?e.type==="text"?ou(e.value):!1:ou(e)}function ou(e){return e.replace(Lw,"")===""}class Fr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Fr.prototype.normal={};Fr.prototype.property={};Fr.prototype.space=void 0;function bh(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Fr(n,r,t)}function gs(e){return e.toLowerCase()}class ft{constructor(t,n){this.attribute=n,this.property=t}}ft.prototype.attribute="";ft.prototype.booleanish=!1;ft.prototype.boolean=!1;ft.prototype.commaOrSpaceSeparated=!1;ft.prototype.commaSeparated=!1;ft.prototype.defined=!1;ft.prototype.mustUseProperty=!1;ft.prototype.number=!1;ft.prototype.overloadedBoolean=!1;ft.prototype.property="";ft.prototype.spaceSeparated=!1;ft.prototype.space=void 0;let $w=0;const ve=wn(),Qe=wn(),ys=wn(),Y=wn(),Oe=wn(),zn=wn(),mt=wn();function wn(){return 2**++$w}const xs=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:Qe,commaOrSpaceSeparated:mt,commaSeparated:zn,number:Y,overloadedBoolean:ys,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),ko=Object.keys(xs);class Ea extends ft{constructor(t,n,r,i){let s=-1;if(super(t,n),su(this,"space",i),typeof r=="number")for(;++s<ko.length;){const o=ko[s];su(this,ko[s],(r&xs[o])===xs[o])}}}Ea.prototype.defined=!0;function su(e,t,n){n&&(e[t]=n)}function er(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Ea(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[gs(r)]=r,n[gs(s.attribute)]=r}return new Fr(t,n,e.space)}const vh=er({properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:Oe,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:Y,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:Oe,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:Qe,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wh(e,t){return t in e?e[t]:t}function kh(e,t){return wh(e,t.toLowerCase())}const _w=er({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zn,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:Y,colSpan:null,content:null,contentEditable:Qe,controls:ve,controlsList:Oe,coords:Y|zn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:ys,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Oe,height:Y,hidden:ys,high:Y,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:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,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:Y,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:Y,rowSpan:Y,sandbox:Oe,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Qe,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,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:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:kh}),Bw=er({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:mt,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:zn,g2:zn,glyphName:zn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:mt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mt,rev:mt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mt,requiredFeatures:mt,requiredFonts:mt,requiredFormats:mt,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:mt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mt,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wh}),Sh=er({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()}}),Ch=er({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kh}),Eh=er({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zw={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"},Hw=/[A-Z]/g,au=/-[a-z]/g,Uw=/^data[-\w.:]+$/i;function Ww(e,t){const n=gs(t);let r=t,i=ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uw.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(au,qw);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!au.test(s)){let o=s.replace(Hw,Zw);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=Ea}return new i(r,t)}function Zw(e){return"-"+e.toLowerCase()}function qw(e){return e.charAt(1).toUpperCase()}const Gw=bh([vh,_w,Sh,Ch,Eh],"html"),Ta=bh([vh,Bw,Sh,Ch,Eh],"svg");function Kw(e){return e.join(" ").trim()}var Mn={},So,lu;function Yw(){if(lu)return So;lu=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";So=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 K=B.lastIndexOf(l);k=~K?B.length-K: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 K=H[0];return S(K),p=p.slice(K.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 K=p.slice(2,H-2);return k+=2,S(K),p=p.slice(H),k+=2,B({type:h,comment:K})}}function M(){var B=A(),H=N(r);if(H){if(y(),!N(i))return C("property missing ':'");var K=N(s),de=B({type:m,property:g(H[0].replace(e,d)),value:K?g(K[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 So}var cu;function Xw(){if(cu)return Mn;cu=1;var e=Mn&&Mn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.default=n;var t=e(Yw());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 Mn}var or={},uu;function Qw(){if(uu)return or;uu=1,Object.defineProperty(or,"__esModule",{value:!0}),or.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 or.camelCase=l,or}var sr,du;function Jw(){if(du)return sr;du=1;var e=sr&&sr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Xw()),n=Qw();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,sr=r,sr}var e2=Jw();const t2=ga(e2),Th=Ah("end"),Aa=Ah("start");function Ah(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 n2(e){const t=Aa(e),n=Th(e);if(t&&n)return{start:t,end:n}}function yr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fu(e.position):"start"in e||"end"in e?fu(e):"line"in e||"column"in e?bs(e):""}function bs(e){return hu(e&&e.line)+":"+hu(e&&e.column)}function fu(e){return bs(e&&e.start)+"-"+bs(e&&e.end)}function hu(e){return e&&typeof e=="number"?e:1}class st 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=yr(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}}st.prototype.file="";st.prototype.name="";st.prototype.reason="";st.prototype.message="";st.prototype.stack="";st.prototype.column=void 0;st.prototype.line=void 0;st.prototype.ancestors=void 0;st.prototype.cause=void 0;st.prototype.fatal=void 0;st.prototype.place=void 0;st.prototype.ruleId=void 0;st.prototype.source=void 0;const ja={}.hasOwnProperty,r2=new Map,i2=/[A-Z]/g,o2=new Set(["table","tbody","thead","tfoot","tr"]),s2=new Set(["td","th"]),jh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function a2(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=p2(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=m2(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"?Ta:Gw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Ph(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Ph(e,t,n){if(t.type==="element")return l2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return c2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return d2(e,t,n);if(t.type==="mdxjsEsm")return u2(e,t);if(t.type==="root")return f2(e,t,n);if(t.type==="text")return h2(e,t)}function l2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ta,e.schema=i),e.ancestors.push(t);const s=Nh(e,t.tagName,!1),o=g2(e,t);let a=Ma(e,t);return o2.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Ow(l):!0})),Mh(e,o,s,t),Pa(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function c2(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)}jr(e,t.position)}function u2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jr(e,t.position)}function d2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ta,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Nh(e,t.name,!0),o=y2(e,t),a=Ma(e,t);return Mh(e,o,s,t),Pa(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function f2(e,t,n){const r={};return Pa(r,Ma(e,t)),e.create(t,e.Fragment,r,n)}function h2(e,t){return t.value}function Mh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pa(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function m2(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 p2(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Aa(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 g2(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ja.call(t.properties,i)){const s=x2(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&s2.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 y2(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 jr(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 jr(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Ma(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:r2;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=Ph(e,s,o);a!==void 0&&n.push(a)}return n}function x2(e,t,n){const r=Ww(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Rw(n):Kw(n)),r.property==="style"){let i=typeof n=="object"?n:b2(e,String(n));return e.stylePropertyNameCase==="css"&&(i=v2(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?zw[r.property]||r.property:r.attribute,n]}}function b2(e,t){try{return t2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new st("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=jh+"#cannot-parse-style-attribute",i}}function Nh(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=iu(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=iu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return ja.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);jr(e)}function jr(e,t){const n=new st("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=jh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function v2(e){const t={};let n;for(n in e)ja.call(e,n)&&(t[w2(n)]=e[n]);return t}function w2(e){let t=e.replace(i2,k2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function k2(e){return"-"+e.toLowerCase()}const Co={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"]},S2={};function Na(e,t){const n=S2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ih(e,r,i)}function Ih(e,t,n){if(C2(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 mu(e.children,t,n)}return Array.isArray(e)?mu(e,t,n):""}function mu(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Ih(e[i],t,n);return r.join("")}function C2(e){return!!(e&&typeof e=="object")}const pu=document.createElement("i");function Ia(e){const t="&"+e+";";pu.innerHTML=t;const n=pu.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function yt(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 wt(e,t){return e.length>0?(yt(e,e.length,0,t),e):t}const gu={}.hasOwnProperty;function Rh(e){const t={};let n=-1;for(;++n<e.length;)E2(t,e[n]);return t}function E2(e,t){let n;for(n in t){const i=(gu.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){gu.call(i,o)||(i[o]=[]);const a=s[o];T2(i[o],Array.isArray(a)?a:a?[a]:[])}}}function T2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);yt(e,0,0,r)}function Vh(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 jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const at=sn(/[A-Za-z]/),ot=sn(/[\dA-Za-z]/),A2=sn(/[#-'*+\--9=?A-Z^-~]/);function ki(e){return e!==null&&(e<32||e===127)}const vs=sn(/\d/),j2=sn(/[\dA-Fa-f]/),P2=sn(/[!-/:-@[-`{-~]/);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 Bi=sn(new RegExp("\\p{P}|\\p{S}","u")),vn=sn(/\s/);function sn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function tr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&ot(e.charCodeAt(n+1))&&ot(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 M2={tokenize:N2};function N2(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 I2={tokenize:R2},yu={tokenize:V2};function R2(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 yt(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(yu,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(yu,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++;yt(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 V2(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 Zn(e){if(e===null||Le(e)||vn(e))return 1;if(Bi(e))return 2}function zi(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 ws={name:"attention",resolveAll:D2,tokenize:F2};function D2(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};xu(d,-l),xu(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=wt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=wt(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),c=wt(c,zi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=wt(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=wt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,yt(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 F2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zn(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=Zn(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 xu(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const L2={name:"autolink",tokenize:O2};function O2(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 at(m)?(e.consume(m),o):m===64?n(m):c(m)}function o(m){return m===43||m===45||m===46||ot(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||ot(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||ki(m)?n(m):(e.consume(m),l)}function c(m){return m===64?(e.consume(m),u):A2(m)?(e.consume(m),c):n(m)}function u(m){return ot(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||ot(m))&&r++<63){const g=m===45?h:d;return e.consume(m),g}return n(m)}}const Lr={partial:!0,tokenize:$2};function $2(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 Dh={continuation:{tokenize:B2},exit:z2,name:"blockQuote",tokenize:_2};function _2(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 B2(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(Dh,t,n)(o)}}function z2(e){e.exit("blockQuote")}const Fh={name:"characterEscape",tokenize:H2};function H2(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 P2(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Lh={name:"characterReference",tokenize:U2};function U2(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=ot,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=j2,u):(e.enter("characterReferenceValue"),s=7,o=vs,u(d))}function u(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return o===ot&&!Ia(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 bu={partial:!0,tokenize:Z2},vu={concrete:!0,name:"codeFenced",tokenize:W2};function W2(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(bu,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(bu,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(K){return C.enter("lineEnding"),C.consume(K),C.exit("lineEnding"),M}function M(K){return C.enter("codeFencedFence"),Se(K)?Ee(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):D(K)}function D(K){return K===a?(C.enter("codeFencedFenceSequence"),B(K)):P(K)}function B(K){return K===a?(L++,C.consume(K),B):L>=o?(C.exit("codeFencedFenceSequence"),Se(K)?Ee(C,H,"whitespace")(K):H(K)):P(K)}function H(K){return K===null||he(K)?(C.exit("codeFencedFence"),N(K)):P(K)}}}function Z2(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 Eo={name:"codeIndented",tokenize:G2},q2={partial:!0,tokenize:K2};function G2(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(q2,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 K2(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 Y2={name:"codeText",previous:Q2,resolve:X2,tokenize:J2};function X2(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 Q2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function J2(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 ek{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&&ar(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),ar(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ar(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);ar(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ar(this.left,n.reverse())}}}function ar(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 Oh(e){const t={};let n=-1,r,i,s,o,a,l,c;const u=new ek(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,tk(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 yt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function tk(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 nk={resolve:ik,tokenize:ok},rk={partial:!0,tokenize:sk};function ik(e){return Oh(e),e}function ok(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(rk,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 sk(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 $h(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||ki(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||ki(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 _h(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 Bh(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 xr(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 ak={name:"definition",tokenize:ck},lk={partial:!0,tokenize:uk};function ck(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),o(m)}function o(m){return _h.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function a(m){return i=jt(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)?xr(e,c)(m):c(m)}function c(m){return $h(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function u(m){return e.attempt(lk,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 uk(e,t,n){return r;function r(a){return Le(a)?xr(e,i)(a):n(a)}function i(a){return Bh(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 dk={name:"hardBreakEscape",tokenize:fk};function fk(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 hk={name:"headingAtx",resolve:mk,tokenize:pk};function mk(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"},yt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function pk(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 gk=["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"],wu=["pre","script","style","textarea"],yk={concrete:!0,name:"htmlFlow",resolveTo:vk,tokenize:wk},xk={partial:!0,tokenize:Sk},bk={partial:!0,tokenize:kk};function vk(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 wk(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):at(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):at(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 at(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&&wu.includes(se)?(i=1,r.interrupt?t(E):D(E)):gk.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||ot(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||at(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||ot(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(xk,oe,B)(E)):E===null||he(E)?(e.exit("htmlFlowData"),B(E)):(e.consume(E),D)}function B(E){return e.check(bk,H,oe)(E)}function H(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),K}function K(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 wu.includes(U)?(e.consume(E),z):D(E)}return at(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 kk(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 Sk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Lr,t,n)}}const Ck={name:"htmlText",tokenize:Ek};function Ek(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):at(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):at(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 at(w)?(e.consume(w),C):n(w)}function C(w){return w===45||ot(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||ot(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||at(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||ot(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,K):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 K(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 Ra={name:"labelEnd",resolveAll:Pk,resolveTo:Mk,tokenize:Nk},Tk={tokenize:Ik},Ak={tokenize:Rk},jk={tokenize:Vk};function Pk(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&&yt(e,0,e.length,n),e}function Mk(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=wt(a,e.slice(s+1,s+r+3)),a=wt(a,[["enter",u,t]]),a=wt(a,zi(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=wt(a,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),a=wt(a,e.slice(o+1)),a=wt(a,[["exit",l,t]]),yt(e,s,e.length,a),e}function Nk(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(jt(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(Tk,u,o?u:d)(h):h===91?e.attempt(Ak,u,o?c:d)(h):o?u(h):d(h)}function c(h){return e.attempt(jk,u,d)(h)}function u(h){return t(h)}function d(h){return s._balanced=!0,n(h)}}function Ik(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)?xr(e,s)(d):s(d)}function s(d){return d===41?u(d):$h(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Le(d)?xr(e,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Bh(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Le(d)?xr(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 Rk(e,t,n){const r=this;return i;function i(a){return _h.call(r,e,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function Vk(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 Dk={name:"labelStartImage",resolveAll:Ra.resolveAll,tokenize:Fk};function Fk(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 Lk={name:"labelStartLink",resolveAll:Ra.resolveAll,tokenize:Ok};function Ok(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 To={name:"lineEnding",tokenize:$k};function $k(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ee(e,t,"linePrefix")}}const li={name:"thematicBreak",tokenize:_k};function _k(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 ct={continuation:{tokenize:Uk},exit:Zk,name:"list",tokenize:Hk},Bk={partial:!0,tokenize:qk},zk={partial:!0,tokenize:Wk};function Hk(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:vs(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(li,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 vs(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(Lr,r.interrupt?n:u,e.attempt(Bk,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 Uk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Lr,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(zk,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ee(e,e.attempt(ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Wk(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 Zk(e){e.exit(this.containerState.type)}function qk(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 ku={name:"setextUnderline",resolveTo:Gk,tokenize:Kk};function Gk(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 Kk(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 Yk={tokenize:Xk};function Xk(e){const t=this,n=e.attempt(Lr,r,e.attempt(this.parser.constructs.flowInitial,i,Ee(e,e.attempt(this.parser.constructs.flow,i,e.attempt(nk,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 Qk={resolveAll:Hh()},Jk=zh("string"),eS=zh("text");function zh(e){return{resolveAll:Hh(e==="text"?tS: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 Hh(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 tS(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 nS={42:ct,43:ct,45:ct,48:ct,49:ct,50:ct,51:ct,52:ct,53:ct,54:ct,55:ct,56:ct,57:ct,62:Dh},rS={91:ak},iS={[-2]:Eo,[-1]:Eo,32:Eo},oS={35:hk,42:li,45:[ku,li],60:yk,61:ku,95:li,96:vu,126:vu},sS={38:Lh,92:Fh},aS={[-5]:To,[-4]:To,[-3]:To,33:Dk,38:Lh,42:ws,60:[L2,Ck],91:Lk,92:[dk,Fh],93:Ra,95:ws,96:Y2},lS={null:[ws,Qk]},cS={null:[42,95]},uS={null:[]},dS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:cS,contentInitial:rS,disable:uS,document:nS,flow:oS,flowInitial:iS,insideSpan:lS,string:sS,text:aS},Symbol.toStringTag,{value:"Module"}));function fS(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=wt(o,M),b(),o[o.length-1]!==null?[]:(P(t,0),c.events=zi(s,c.events,c),c.events)}function h(M,D){return mS(m(M),D)}function m(M){return hS(o,M)}function g(){const{_bufferIndex:M,_index:D,line:B,column:H,offset:K}=r;return{_bufferIndex:M,_index:D,line:B,column:H,offset:K}}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,K,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],X=Q!==null&&$.null,fe=[...Array.isArray(V)?V:V?[V]:[],...Array.isArray(X)?X:X?[X]:[]];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),K}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&&yt(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,K=Array.from(a);return{from:H,restore:de};function de(){r=M,c.previous=D,c.currentConstruct=B,c.events.length=H,a=K,y()}}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hS(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 mS(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 pS(e){const r={constructs:Rh([dS,...(e||{}).extensions||[]]),content:i(M2),defined:[],document:i(I2),flow:i(Yk),lazy:{},string:i(Jk),text:i(eS)};return r;function i(s){return o;function o(a){return fS(r,s,a)}}}function gS(e){for(;!Oh(e););return e}const Su=/[\0\t\n\r]/g;function yS(){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(Su.lastIndex=d,c=Su.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 xS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bS(e){return e.replace(xS,vS)}function vS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Vh(n.slice(s?2:1),s?16:10)}return Ia(n)||e}const Uh={}.hasOwnProperty;function wS(e,t,n){return typeof t!="string"&&(n=t,t=void 0),kS(n)(gS(pS(n).document().write(yS()(e,t,!0))))}function kS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(xe),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(me),blockQuote:s(X),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(nt),thematicBreak:s(Ft)},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(K),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()}};Wh(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]];Uh.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]||Cu).call(q,void 0,ke[0])}for(I.position={start:Gt(_.length>0?_[0][1].start:{line:1,column:1,offset:0}),end:Gt(_.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,G,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"&&(G&&!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(G){let Et=ue;for(be=void 0;Et--;){const ht=_[Et];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;be&&(_[be][1].type="lineEndingBlank",ke=!0),ht[1].type="lineEnding",be=Et}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}Ce&&(!be||Ce<be)&&(G._spread=!0),G.end=Object.assign({},be?_[be][1].start:$e[1].end),_.splice(be||ue,0,["exit",G,$e[2]]),ue++,q++}if($e[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};G=Et,_.splice(ue,0,["enter",Et,$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:Gt(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]||Cu).call(this,_,ue[0]));else throw new Error("Cannot close `"+_.type+"` ("+yr({start:_.start,end:_.end})+"): it’s not open");q.position.end=Gt(_.end)}function u(){return Na(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=jt(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=Zt(),ue.position={start:Gt(_.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=Gt(_.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=Gt(_.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 K(){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=bS(I),q.identifier=jt(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=jt(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=Vh(I,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=Ia(I);const J=this.stack[this.stack.length-1];J.value+=ue}function ee(_){const I=this.stack.pop();I.position.end=Gt(_.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 X(){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 nt(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function Ft(){return{type:"thematicBreak"}}}function Gt(e){return{line:e.line,column:e.column,offset:e.offset}}function Wh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Wh(e,r):SS(e,r)}}function SS(e,t){let n;for(n in t)if(Uh.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 Cu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function CS(e){const t=this;t.parser=n;function n(r){return wS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ES(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 TS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
111
- `}]}function AS(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 jS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=tr(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 NS(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 IS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Zh(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 RS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zh(e,t);const i={src:tr(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 VS(e,t){const n={src:tr(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 DS(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 FS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Zh(e,t);const i={href:tr(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 LS(e,t){const n={href:tr(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 OS(e,t,n){const r=e.all(t),i=n?$S(n):qh(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 $S(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=qh(n[r])}return t}function qh(e){const t=e.spread;return t??e.children.length>1}function _S(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 BS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function HS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function US(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=Aa(t.children[1]),l=Th(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 WS(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 ZS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Eu=9,Tu=32;function qS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Au(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Au(t.slice(i),i>0,!1)),s.join("")}function Au(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Eu||s===Tu;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Eu||s===Tu;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function GS(e,t){const n={type:"text",value:qS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function KS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const YS={blockquote:ES,break:TS,code:AS,delete:jS,emphasis:PS,footnoteReference:MS,heading:NS,html:IS,imageReference:RS,image:VS,inlineCode:DS,linkReference:FS,link:LS,listItem:OS,list:_S,paragraph:BS,root:zS,strong:HS,table:US,tableCell:ZS,tableRow:WS,text:GS,thematicBreak:KS,toml:Qr,yaml:Qr,definition:Qr,footnoteDefinition:Qr};function Qr(){}const Gh=-1,Hi=0,br=1,Si=2,Va=3,Da=4,Fa=5,La=6,Kh=7,Yh=8,ju=typeof self=="object"?self:globalThis,XS=(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 Hi:case Gh:return n(o,i);case br:{const a=n([],i);for(const l of o)a.push(r(l));return a}case Si:{const a=n({},i);for(const[l,c]of o)a[r(l)]=r(c);return a}case Va:return n(new Date(o),i);case Da:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case Fa:{const a=n(new Map,i);for(const[l,c]of o)a.set(r(l),r(c));return a}case La:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case Kh:{const{name:a,message:l}=o;return n(new ju[a](l),i)}case Yh: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 ju[s](o),i)};return r},Pu=e=>XS(new Map,e)(0),Nn="",{toString:QS}={},{keys:JS}=Object,lr=e=>{const t=typeof e;if(t!=="object"||!e)return[Hi,t];const n=QS.call(e).slice(8,-1);switch(n){case"Array":return[br,Nn];case"Object":return[Si,Nn];case"Date":return[Va,Nn];case"RegExp":return[Da,Nn];case"Map":return[Fa,Nn];case"Set":return[La,Nn];case"DataView":return[br,n]}return n.includes("Array")?[br,n]:n.includes("Error")?[Kh,n]:[Si,n]},Jr=([e,t])=>e===Hi&&(t==="function"||t==="symbol"),eC=(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]=lr(o);switch(a){case Hi:{let u=o;switch(l){case"bigint":a=Yh,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([Gh],o)}return i([a,u],o)}case br:{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 Si:{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 JS(o))(e||!Jr(lr(o[h])))&&u.push([s(h),s(o[h])]);return d}case Va:return i([a,o.toISOString()],o);case Da:{const{source:u,flags:d}=o;return i([a,{source:u,flags:d}],o)}case Fa:{const u=[],d=i([a,u],o);for(const[h,m]of o)(e||!(Jr(lr(h))||Jr(lr(m))))&&u.push([s(h),s(m)]);return d}case La:{const u=[],d=i([a,u],o);for(const h of o)(e||!Jr(lr(h)))&&u.push(s(h));return d}}const{message:c}=o;return i([a,{name:l,message:c}],o)};return s},Mu=(e,{json:t,lossy:n}={})=>{const r=[];return eC(!(t||n),!!t,new Map,r)(e),r},Ci=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Pu(Mu(e,t)):structuredClone(e):(e,t)=>Pu(Mu(e,t));function tC(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 nC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function rC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tC,r=e.options.footnoteBackLabel||nC,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=tr(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:{...Ci(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 Ui=function(e){if(e==null)return aC;if(typeof e=="function")return Wi(e);if(typeof e=="object")return Array.isArray(e)?iC(e):oC(e);if(typeof e=="string")return sC(e);throw new Error("Expected function, string, or object as test")};function iC(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ui(e[n]);return Wi(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function oC(e){const t=e;return Wi(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function sC(e){return Wi(t);function t(n){return n&&n.type===e}}function Wi(e){return t;function t(n,r,i){return!!(lC(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function aC(){return!0}function lC(e){return e!==null&&typeof e=="object"&&"type"in e}const Xh=[],cC=!0,ks=!1,uC="skip";function Qh(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Ui(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=Xh,g,p,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(m=dC(n(l,u)),m[0]===ks))return m;if("children"in l&&l.children){const v=l;if(v.children&&m[0]!==uC)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]===ks)return g;p=typeof g[1]=="number"?g[1]:p+o}}return m}}}function dC(e){return Array.isArray(e)?e:typeof e=="number"?[cC,e]:e==null?Xh:[e]}function Oa(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),Qh(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 Ss={}.hasOwnProperty,fC={};function hC(e,t){const n=t||fC,r=new Map,i=new Map,s=new Map,o={...YS,...n.handlers},a={all:c,applyData:pC,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:mC,wrap:yC};return Oa(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(Ss.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=Ci(b);return v.children=a.all(u),v}return Ci(u)}return(a.options.unknownHandler||gC)(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=Nu(g.value)),!Array.isArray(g)&&g.type==="element")){const p=g.children[0];p&&p.type==="text"&&(p.value=Nu(p.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function mC(e,t){e.position&&(t.position=n2(e))}function pC(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,Ci(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function gC(e,t){const n=t.data||{},r="value"in t&&!(Ss.call(n,"hProperties")||Ss.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 yC(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 Nu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Iu(e,t){const n=hC(e,t),r=n.one(e,void 0),i=rC(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 xC(e,t){return e&&"run"in e?async function(n,r){const i=Iu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Iu(n,{file:r,...e||t})}}function Ru(e){if(e)throw e}var Ao,Vu;function bC(){if(Vu)return Ao;Vu=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 Ao=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},Ao}var vC=bC();const jo=ga(vC);function Cs(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 wC(){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?kC(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 kC(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 Nt={basename:SC,dirname:CC,extname:EC,join:TC,sep:"/"};function SC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Or(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 CC(e){if(Or(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 EC(e){Or(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 TC(...e){let t=-1,n;for(;++t<e.length;)Or(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":AC(n)}function AC(e){Or(e);const t=e.codePointAt(0)===47;let n=jC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function jC(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 Or(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const PC={cwd:MC};function MC(){return"/"}function Es(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function NC(e){if(typeof e=="string")e=new URL(e);else if(!Es(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 IC(e)}function IC(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 Po=["history","path","basename","stem","extname","dirname"];class Jh{constructor(t){let n;t?Es(t)?n={path:t}:typeof t=="string"||RC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":PC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Po.length;){const s=Po[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)Po.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Nt.basename(this.path):void 0}set basename(t){No(t,"basename"),Mo(t,"basename"),this.path=Nt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nt.dirname(this.path):void 0}set dirname(t){Du(this.basename,"dirname"),this.path=Nt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nt.extname(this.path):void 0}set extname(t){if(Mo(t,"extname"),Du(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=Nt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Es(t)&&(t=NC(t)),No(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nt.basename(this.path,this.extname):void 0}set stem(t){No(t,"stem"),Mo(t,"stem"),this.path=Nt.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 st(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 Mo(e,t){if(e&&e.includes(Nt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nt.sep+"`")}function No(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Du(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function RC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VC=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},DC={}.hasOwnProperty;class $a extends VC{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=wC()}copy(){const t=new $a;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(jo(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Vo("data",this.frozen),this.namespace[t]=n,this):DC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Vo("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=ei(t),r=this.parser||this.Parser;return Io("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Io("process",this.parser||this.Parser),Ro("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=ei(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);OC(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(),Io("processSync",this.parser||this.Parser),Ro("processSync",this.compiler||this.Compiler),this.process(t,i),Lu("processSync","process",n),r;function i(s,o){n=!0,Ru(s),r=o}}run(t,n,r){Fu(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=ei(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),Lu("runSync","run",r),i;function s(o,a){Ru(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=ei(n),i=this.compiler||this.Compiler;return Ro("stringify",i),Fu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Vo("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=jo(!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];Cs(p)&&Cs(m)&&(m=jo(!0,p,m)),r[h]=[c,m,...g]}}}}const FC=new $a().freeze();function Io(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ro(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Vo(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 Fu(e){if(!Cs(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Lu(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ei(e){return LC(e)?e:new Jh(e)}function LC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function OC(e){return typeof e=="string"||$C(e)}function $C(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _C="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ou=[],$u={allowDangerousHtml:!0},BC=/^(https?|ircs?|mailto|xmpp)$/i,zC=[{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 HC(e){const t=UC(e),n=WC(e);return ZC(t.runSync(t.parse(n),n),e)}function UC(e){const t=e.rehypePlugins||Ou,n=e.remarkPlugins||Ou,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...$u}:$u;return FC().use(CS).use(n).use(xC,r).use(t)}function WC(e){const t=e.children||"",n=new Jh;return typeof t=="string"&&(n.value=t),n}function ZC(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,a=t.unwrapDisallowed,l=t.urlTransform||qC;for(const u of zC)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+_C+u.id,void 0);return Oa(e,c),a2(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 Co)if(Object.hasOwn(Co,m)&&Object.hasOwn(u.properties,m)){const g=u.properties[m],p=Co[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 qC(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||BC.test(e.slice(0,t))?e:""}function _u(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 GC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function KC(e,t,n){const i=Ui((n||{}).ignore||[]),s=YC(t);let o=-1;for(;++o<s.length;)Qh(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 YC(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([XC(i[0]),QC(i[1])])}return t}function XC(e){return typeof e=="string"?new RegExp(GC(e),"g"):e}function QC(e){return typeof e=="function"?e:function(){return e}}const Do="phrasing",Fo=["autolink","link","image","label"];function JC(){return{transforms:[s4],enter:{literalAutolink:t4,literalAutolinkEmail:Lo,literalAutolinkHttp:Lo,literalAutolinkWww:Lo},exit:{literalAutolink:o4,literalAutolinkEmail:i4,literalAutolinkHttp:n4,literalAutolinkWww:r4}}}function e4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Do,notInConstruct:Fo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Do,notInConstruct:Fo},{character:":",before:"[ps]",after:"\\/",inConstruct:Do,notInConstruct:Fo}]}}function t4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lo(e){this.config.enter.autolinkProtocol.call(this,e)}function n4(e){this.config.exit.autolinkProtocol.call(this,e)}function r4(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 i4(e){this.config.exit.autolinkEmail.call(this,e)}function o4(e){this.exit(e)}function s4(e){KC(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),l4]],{ignore:["link","linkReference"]})}function a4(e,t,n,r,i){let s="";if(!em(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!c4(n)))return!1;const o=u4(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 l4(e,t,n,r){return!em(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function c4(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 u4(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=_u(e,"(");let s=_u(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 em(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||vn(n)||Bi(n))&&(!t||n!==47)}tm.peek=b4;function d4(){this.buffer()}function f4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function h4(){this.buffer()}function m4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function p4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function g4(e){this.exit(e)}function y4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function x4(e){this.exit(e)}function b4(){return"["}function tm(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 v4(){return{enter:{gfmFootnoteCallString:d4,gfmFootnoteCall:f4,gfmFootnoteDefinitionLabelString:h4,gfmFootnoteDefinition:m4},exit:{gfmFootnoteCallString:p4,gfmFootnoteCall:g4,gfmFootnoteDefinitionLabelString:y4,gfmFootnoteDefinition:x4}}}function w4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tm},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?nm:k4))),c(),l}}function k4(e,t,n){return t===0?e:nm(e,t,n)}function nm(e,t,n){return(n?"":" ")+e}const S4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rm.peek=j4;function C4(){return{canContainEols:["delete"],enter:{strikethrough:T4},exit:{strikethrough:A4}}}function E4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:S4}],handlers:{delete:rm}}}function T4(e){this.enter({type:"delete",children:[]},e)}function A4(e){this.exit(e)}function rm(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 j4(){return"~"}function P4(e){return e.length}function M4(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||P4,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=N4(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]=Bu(r[d]);else{const p=Bu(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 N4(e){return e==null?"":String(e)}function Bu(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 I4(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()),R4);return i(),o}function R4(e,t,n){return">"+(n?"":" ")+e}function V4(e,t){return zu(e,t.inConstruct,!0)&&!zu(e,t.notInConstruct,!1)}function zu(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 Hu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
123
- `&&V4(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
124
- `}function D4(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 F4(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 L4(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 O4(e,t,n,r){const i=L4(n),s=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(F4(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(s,$4);return d(),h}const a=n.createTracker(r),l=i.repeat(Math.max(D4(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 $4(e,t,n){return(n?"":" ")+e}function _a(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 _4(e,t,n,r){const i=_a(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 B4(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 Pr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ei(e,t,n){const r=Zn(e),i=Zn(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}}im.peek=z4;function im(e,t,n,r){const i=B4(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=Ei(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Pr(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ei(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Pr(d));const m=o.move(i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+m}function z4(e,t,n){return n.options.emphasis||"*"}function H4(e,t){let n=!1;return Oa(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ks}),!!((!e.depth||e.depth<3)&&Na(e)&&(t.options.setext||n))}function U4(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(H4(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=Pr(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),a(),c}om.peek=W4;function om(e){return e.value||""}function W4(){return"<"}sm.peek=Z4;function sm(e,t,n,r){const i=_a(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 Z4(){return"!"}am.peek=q4;function am(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 q4(){return"!"}lm.peek=G4;function lm(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 G4(){return"`"}function cm(e,t){const n=Na(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))}um.peek=K4;function um(e,t,n,r){const i=_a(n),s=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let a,l;if(cm(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 K4(e,t,n){return cm(e,n)?"<":"["}dm.peek=Y4;function dm(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 Y4(){return"["}function Ba(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 X4(e){const t=Ba(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 Q4(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 fm(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 J4(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let o=e.ordered?Q4(n):Ba(n);const a=e.ordered?o==="."?")":".":X4(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),fm(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 e6(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 t6(e,t,n,r){const i=e6(n);let s=n.bulletCurrent||Ba(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 n6(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(e,r);return s(),i(),o}const r6=Ui(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i6(e,t,n,r){return(e.children.some(function(o){return r6(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function o6(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hm.peek=s6;function hm(e,t,n,r){const i=o6(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=Ei(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Pr(c)+l.slice(1));const d=l.charCodeAt(l.length-1),h=Ei(r.after.charCodeAt(0),d,i);h.inside&&(l=l.slice(0,-1)+Pr(d));const m=o.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:u.outside},a+l+m}function s6(e,t,n){return n.options.strong||"*"}function a6(e,t,n,r){return n.safe(e.value,r)}function l6(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 c6(e,t,n){const r=(fm(n)+(n.options.ruleSpaces?" ":"")).repeat(l6(n));return n.options.ruleSpaces?r.slice(0,-1):r}const mm={blockquote:I4,break:Hu,code:O4,definition:_4,emphasis:im,hardBreak:Hu,heading:U4,html:om,image:sm,imageReference:am,inlineCode:lm,link:um,linkReference:dm,list:J4,listItem:t6,paragraph:n6,root:i6,strong:hm,text:a6,thematicBreak:c6};function u6(){return{enter:{table:d6,tableData:Uu,tableHeader:Uu,tableRow:h6},exit:{codeText:m6,table:f6,tableData:Oo,tableHeader:Oo,tableRow:Oo}}}function d6(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 f6(e){this.exit(e),this.data.inTable=void 0}function h6(e){this.enter({type:"tableRow",children:[]},e)}function Oo(e){this.exit(e)}function Uu(e){this.enter({type:"tableCell",children:[]},e)}function m6(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,p6));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function p6(e,t){return t==="|"?t:e}function g6(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 M4(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=mm.inlineCode(m,g,p);return p.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function y6(){return{exit:{taskListCheckValueChecked:Wu,taskListCheckValueUnchecked:Wu,paragraph:b6}}}function x6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v6}}}function Wu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b6(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 v6(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=mm.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 w6(){return[JC(),v4(),C4(),u6(),y6()]}function k6(e){return{extensions:[e4(),w4(e),E4(),g6(e),x6()]}}const S6={tokenize:P6,partial:!0},pm={tokenize:M6,partial:!0},gm={tokenize:N6,partial:!0},ym={tokenize:I6,partial:!0},C6={tokenize:R6,partial:!0},xm={name:"wwwAutolink",tokenize:A6,previous:vm},bm={name:"protocolAutolink",tokenize:j6,previous:wm},Wt={name:"emailAutolink",tokenize:T6,previous:km},Vt={};function E6(){return{text:Vt}}let un=48;for(;un<123;)Vt[un]=Wt,un++,un===58?un=65:un===91&&(un=97);Vt[43]=Wt;Vt[45]=Wt;Vt[46]=Wt;Vt[95]=Wt;Vt[72]=[Wt,bm];Vt[104]=[Wt,bm];Vt[87]=[Wt,xm];Vt[119]=[Wt,xm];function T6(e,t,n){const r=this;let i,s;return o;function o(d){return!Ts(d)||!km.call(r,r.previous)||za(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return Ts(d)?(e.consume(d),a):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(C6,u,c)(d):d===45||d===95||ot(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&&at(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function A6(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!vm.call(r,r.previous)||za(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(S6,e.attempt(pm,e.attempt(gm,s),n),n)(o))}function s(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function j6(e,t,n){const r=this;let i="",s=!1;return o;function o(d){return(d===72||d===104)&&wm.call(r,r.previous)&&!za(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(at(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||ki(d)||Le(d)||vn(d)||Bi(d)?n(d):e.attempt(pm,e.attempt(gm,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function P6(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 M6(e,t,n){let r,i,s;return o;function o(c){return c===46||c===95?e.check(ym,l,a)(c):c===null||Le(c)||vn(c)||c!==45&&Bi(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 N6(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(ym,t,s)(o):o===null||Le(o)||vn(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function I6(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)||vn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Le(a)||vn(a)?t(a):r(a)}function s(a){return at(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):at(a)?(e.consume(a),o):n(a)}}function R6(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return ot(s)?n(s):t(s)}}function vm(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Le(e)}function wm(e){return!at(e)}function km(e){return!(e===47||Ts(e))}function Ts(e){return e===43||e===45||e===46||e===95||ot(e)}function za(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 V6={tokenize:z6,partial:!0};function D6(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$6,continuation:{tokenize:_6},exit:B6}},text:{91:{name:"gfmFootnoteCall",tokenize:O6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:F6,resolveTo:L6}}}}function F6(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=jt(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 L6(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 O6(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(jt(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 $6(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=jt(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 _6(e,t,n){return e.check(Lr,t,e.attempt(V6,t,n))}function B6(e){e.exit("gfmFootnoteDefinition")}function z6(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 H6(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&&yt(h,h.length,0,zi(m,o.slice(c+1,l),a)),yt(h,h.length,0,[["exit",d,a],["enter",o[l][1],a],["exit",o[l][1],a],["exit",u,a]]),yt(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=Zn(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=Zn(g);return b._open=!v||v===2&&!!p,b._close=!p||p===2&&!!v,a(g)}}}class U6{constructor(){this.map=[]}add(t,n,r){W6(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 W6(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 Z6(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 q6(){return{flow:{null:{name:"table",tokenize:G6,resolveAll:K6}}}}function G6(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 K6(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 U6;for(;++n<e.length;){const m=e[n],g=m[1];m[0]==="enter"?g.type==="tableHead"?(a=!1,l!==0&&(Zu(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=ti(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=ti(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=ti(h,t,s,i,n,d)):o[1]!==0&&(d=ti(h,t,o,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&Zu(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=Z6(t.events,n))}return e}function ti(e,t,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},In(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=In(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=In(t.events,n[2]),u=In(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({},In(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Zu(e,t,n,r,i){const s=[],o=In(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 In(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Y6={name:"tasklistCheck",tokenize:Q6};function X6(){return{text:{91:Y6}}}function Q6(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:J6},t,n)(l):n(l)}}function J6(e,t,n){return Ee(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function eE(e){return Rh([E6(),D6(),H6(e),q6(),X6()])}const tE={};function nE(e){const t=this,n=e||tE,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(eE(n)),s.push(w6()),o.push(k6(n))}function rE({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=et(r);x.useEffect(()=>{const A=()=>{const T=navigator.userAgent.toLowerCase(),N=["android","iphone","ipad","mobile","tablet"].some(y=>T.includes(y)),P="ontouchstart"in window||navigator.maxTouchPoints>0,L=window.innerWidth<=768;h(N||P&&L)};return A(),window.addEventListener("resize",A),()=>window.removeEventListener("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 iE({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 oE({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var l,c,u,d;const i=et(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":""}
139
- transition-all duration-200 group-hover:scale-[1.02]
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(lE,{message:e,theme:t,isOwn:n}):r&&!n?f.jsx(iE,{text:e.content,isComplete:!r,isRealTimeStream:((d=e.metadata)==null?void 0:d.streaming)===!0,speed:35}):o?f.jsx(HC,{remarkPlugins:[nE],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 sE(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 aE(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 lE({message:e,theme:t,isOwn:n}){const r=et(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=sE(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=document.createElement("a");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:`
141
- flex items-center gap-3 p-3 rounded-lg border transition-all duration-200
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"}
143
- `,children:[f.jsx("div",{className:`
144
- p-2 rounded-lg flex-shrink-0
145
- ${t==="light"?"bg-blue-100 text-blue-600":"bg-blue-900/50 text-blue-400"}
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&&aE(o),p&&f.jsxs(f.Fragment,{children:[o>0&&" • ",v," ",Math.round(b*100),"%"]})]}),p&&f.jsx("div",{className:`
147
- w-full h-1 rounded-full mt-1 overflow-hidden
148
- ${t==="light"?"bg-gray-200":"bg-gray-700"}
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:`
150
- p-2 rounded-lg transition-colors duration-200
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"}
152
- `,"aria-label":"Download file",children:f.jsx(Ze.Download,{className:"w-4 h-4"})})]})]})}function cE(){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 uE(){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 dE({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(),X=e&&typeof e.getChatMessages=="function"&&e.getChatMessages().length>0;return!V&&!X}),[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=et(t);x.useEffect(()=>{const V=()=>{const X=navigator.userAgent.toLowerCase(),R=["android","iphone","ipad","mobile","tablet"].some(Z=>X.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(()=>(k&&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)),()=>{k&&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))}),[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 X={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,X])},[]),K=x.useCallback((V=!1)=>{if(N.current){const X=N.current;V?X.scrollTop=X.scrollHeight:X.scrollTo({top:X.scrollHeight,behavior:"smooth"})}},[]),de=x.useCallback(()=>{if(N.current){const{scrollTop:V,scrollHeight:X,clientHeight:fe}=N.current;return X-V-fe<100}return!0},[]),ie=x.useCallback(()=>{const V=de();L(V)},[de]),F=x.useCallback((V=!1)=>{P&&K(V)},[P,K]);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)},X=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",X),e.on("chat.message.sent",fe),()=>{e.off("chat.message.received",V),e.off("chat.message.updated",X),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))},X=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(cE,{})}};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(uE,{})}};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",X),e.on("rpc.interaction.timeout",fe),e.on("rpc.interaction.dismissed",R),()=>{e.off("rpc.interaction.started",V),e.off("rpc.interaction.completed",X),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)},X=()=>{console.log("ChatView: Agent is speaking"),c(!1)};return e.on("agent.thinking",V),e.on("agent.speaking",X),()=>{e.off("agent.thinking",V),e.off("agent.speaking",X)}},[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(X){console.error("Failed to send message:",X)}},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(X=>X.name))}catch(X){console.error("Failed to send attachments:",X)}},[z,oe]=x.useState([]);x.useEffect(()=>{const V=X=>{oe(Array.isArray(X)?X:["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,X)=>{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(oE,{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(Tr,{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),K(!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,X)=>{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+X)})}),A&&A.presentationMode!=="embedded"&&f.jsx(Tr,{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(rE,{onSendMessage:W,onSendAttachments:w,disabled:r,theme:t,onEndChat:s})})]})}function fE({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 hE({message:e,theme:t,isOwn:n,isStreaming:r=!1}){var o,a,l;const i=et(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:`
155
- relative px-3 py-2 rounded-2xl break-words shadow-lg backdrop-blur-sm message-bubble message-hover
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":""}
158
- transition-all duration-200 group-hover:scale-[1.02]
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(fE,{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 mE({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=et(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 qu({trackRef:e,participant:t,isLocal:n=!1,className:r="",theme:i}){var l;const s=et(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(ut.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 pE({client:e,theme:t="vox",onBack:n,disabled:r=!1,displayType:i,onEndCall:s}){var X,fe,R,re,ne,me;const o=et(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),window.addEventListener("resize",pe),()=>{Ae.disconnect(),window.removeEventListener("resize",pe)}},[]);const C=Kf(e),{screenShareTrackRefs:N}=M1(e),P=x.useMemo(()=>e.getRemoteParticipants(),[e,C]),L=_n(e,"microphone"),y=_n(e,"camera"),M=_n(e,"screenShare"),[D,B]=x.useState(null),H=(X=e==null?void 0:e.getCurrentAgentInfo)==null?void 0:X.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(nt=>nt.id===xe.id))return Ne;if(xe.sender.type==="agent"&&(g(nt=>new Set(nt).add(xe.id)),!((He=xe.metadata)!=null&&He.streaming))){const nt=xe.content.length*35+1e3;setTimeout(()=>{g(Zt=>{const Ft=new Set(Zt);return Ft.delete(xe.id),Ft})},nt)}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(nt=>nt.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(qu,{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(ut.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(qu,{trackRef:$,participant:se||void 0,isLocal:!0,theme:t,className:"w-full h-full"})})]})})}),f.jsx(Qt,{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(Qt,{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(hE,{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(mE,{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 ni({onClick:e,disabled:t,theme:n}){const r=et(n);return f.jsx("button",{className:r.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:f.jsx(gh,{})})}function $o({onClick:e,disabled:t,theme:n}){const r=et(n);return f.jsx("button",{className:r.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:f.jsx(ph,{})})}function _o({onClick:e,disabled:t,theme:n}){const r=et(n);return f.jsx("button",{className:r.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:f.jsx(yh,{})})}function gE({prompts:e,theme:t}){const n=et(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:`
153
+ export default theme;`}function Da(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:s={},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.":On(20));const u=Yl(o),d=Wm(e);let f=Kt(d,{mixins:UR(d.breakpoints,r),palette:u,shadows:YR.slice(),typography:WR(u,a),transitions:JR(s),zIndex:{...eM}});if(f=Kt(f,c),f=t.reduce((p,g)=>Kt(p,g),f),process.env.NODE_ENV!=="production"){const p=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],g=(m,x)=>{let y;for(y in m){const k=m[y];if(p.includes(y)&&Object.keys(k).length>0){if(process.env.NODE_ENV!=="production"){const v=Wl("",y);console.error([`MUI: The \`${x}\` component increases the CSS specificity of the \`${y}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${v}' syntax:`,JSON.stringify({root:{[`&.${v}`]:k}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
154
+ `))}m[y]={}}}};Object.keys(f.components).forEach(m=>{const x=f.components[m].styleOverrides;x&&m.startsWith("Mui")&&g(x,m)})}return f.unstable_sxConfig={...Wo,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(g){return Tr({sx:g,theme:this})},f.toRuntimeSource=Jm,f}function nM(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 rM=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=nM(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function eg(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function tg(e){return e==="dark"?rM:[]}function iM(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...i}=e,o=Yl(t);return{palette:o,opacity:{...eg(o.mode),...n},overlays:r||tg(o.mode),...i}}function oM(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 sM=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],aM=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return sM(e.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:o?{[o.replace("%s",t)]:s,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...s}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function lM(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function V(e,t,n){!e[t]&&n&&(e[t]=n)}function Kr(e){return typeof e!="string"||!e.startsWith("hsl")?e:Zm(e)}function bn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Gr(Kr(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().
155
+ 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 cM(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const an=e=>{try{return e()}catch{}},uM=(e="mui")=>AR(e);function Gs(e,t,n,r){if(!t)return;t=t===!0?{}:t;const i=r==="dark"?"dark":"light";if(!n){e[r]=iM({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:o,...s}=Da({...n,palette:{mode:i,...t==null?void 0:t.palette}});return e[r]={...t,palette:o,opacity:{...eg(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||tg(i)},s}function dM(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",shouldSkipGeneratingVar:s=oM,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),f=uM(o),{[d]:p,light:g,dark:m,...x}=n,y={...x};let k=p;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.`:On(21,d));const v=Gs(y,k,c,d);g&&!y.light&&Gs(y,g,void 0,"light"),m&&!y.dark&&Gs(y,m,void 0,"dark");let _={defaultColorScheme:d,...v,cssVarPrefix:o,colorSchemeSelector:a,rootSelector:l,getCssVar:f,colorSchemes:y,font:{...zR(v.typography),...v.font},spacing:cM(c.spacing)};Object.keys(_.colorSchemes).forEach(I=>{const b=_.colorSchemes[I].palette,R=O=>{const D=O.split("-"),$=D[1],U=D[2];return f(O,b[$][U])};if(b.mode==="light"&&(V(b.common,"background","#fff"),V(b.common,"onBackground","#000")),b.mode==="dark"&&(V(b.common,"background","#000"),V(b.common,"onBackground","#fff")),lM(b,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),b.mode==="light"){V(b.Alert,"errorColor",Xe(b.error.light,.6)),V(b.Alert,"infoColor",Xe(b.info.light,.6)),V(b.Alert,"successColor",Xe(b.success.light,.6)),V(b.Alert,"warningColor",Xe(b.warning.light,.6)),V(b.Alert,"errorFilledBg",R("palette-error-main")),V(b.Alert,"infoFilledBg",R("palette-info-main")),V(b.Alert,"successFilledBg",R("palette-success-main")),V(b.Alert,"warningFilledBg",R("palette-warning-main")),V(b.Alert,"errorFilledColor",an(()=>b.getContrastText(b.error.main))),V(b.Alert,"infoFilledColor",an(()=>b.getContrastText(b.info.main))),V(b.Alert,"successFilledColor",an(()=>b.getContrastText(b.success.main))),V(b.Alert,"warningFilledColor",an(()=>b.getContrastText(b.warning.main))),V(b.Alert,"errorStandardBg",Qe(b.error.light,.9)),V(b.Alert,"infoStandardBg",Qe(b.info.light,.9)),V(b.Alert,"successStandardBg",Qe(b.success.light,.9)),V(b.Alert,"warningStandardBg",Qe(b.warning.light,.9)),V(b.Alert,"errorIconColor",R("palette-error-main")),V(b.Alert,"infoIconColor",R("palette-info-main")),V(b.Alert,"successIconColor",R("palette-success-main")),V(b.Alert,"warningIconColor",R("palette-warning-main")),V(b.AppBar,"defaultBg",R("palette-grey-100")),V(b.Avatar,"defaultBg",R("palette-grey-400")),V(b.Button,"inheritContainedBg",R("palette-grey-300")),V(b.Button,"inheritContainedHoverBg",R("palette-grey-A100")),V(b.Chip,"defaultBorder",R("palette-grey-400")),V(b.Chip,"defaultAvatarColor",R("palette-grey-700")),V(b.Chip,"defaultIconColor",R("palette-grey-700")),V(b.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(b.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(b.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(b.LinearProgress,"primaryBg",Qe(b.primary.main,.62)),V(b.LinearProgress,"secondaryBg",Qe(b.secondary.main,.62)),V(b.LinearProgress,"errorBg",Qe(b.error.main,.62)),V(b.LinearProgress,"infoBg",Qe(b.info.main,.62)),V(b.LinearProgress,"successBg",Qe(b.success.main,.62)),V(b.LinearProgress,"warningBg",Qe(b.warning.main,.62)),V(b.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),V(b.Slider,"primaryTrack",Qe(b.primary.main,.62)),V(b.Slider,"secondaryTrack",Qe(b.secondary.main,.62)),V(b.Slider,"errorTrack",Qe(b.error.main,.62)),V(b.Slider,"infoTrack",Qe(b.info.main,.62)),V(b.Slider,"successTrack",Qe(b.success.main,.62)),V(b.Slider,"warningTrack",Qe(b.warning.main,.62));const O=Yi(b.background.default,.8);V(b.SnackbarContent,"bg",O),V(b.SnackbarContent,"color",an(()=>b.getContrastText(O))),V(b.SpeedDialAction,"fabHoverBg",Yi(b.background.paper,.15)),V(b.StepConnector,"border",R("palette-grey-400")),V(b.StepContent,"border",R("palette-grey-400")),V(b.Switch,"defaultColor",R("palette-common-white")),V(b.Switch,"defaultDisabledColor",R("palette-grey-100")),V(b.Switch,"primaryDisabledColor",Qe(b.primary.main,.62)),V(b.Switch,"secondaryDisabledColor",Qe(b.secondary.main,.62)),V(b.Switch,"errorDisabledColor",Qe(b.error.main,.62)),V(b.Switch,"infoDisabledColor",Qe(b.info.main,.62)),V(b.Switch,"successDisabledColor",Qe(b.success.main,.62)),V(b.Switch,"warningDisabledColor",Qe(b.warning.main,.62)),V(b.TableCell,"border",Qe(qi(b.divider,1),.88)),V(b.Tooltip,"bg",qi(b.grey[700],.92))}if(b.mode==="dark"){V(b.Alert,"errorColor",Qe(b.error.light,.6)),V(b.Alert,"infoColor",Qe(b.info.light,.6)),V(b.Alert,"successColor",Qe(b.success.light,.6)),V(b.Alert,"warningColor",Qe(b.warning.light,.6)),V(b.Alert,"errorFilledBg",R("palette-error-dark")),V(b.Alert,"infoFilledBg",R("palette-info-dark")),V(b.Alert,"successFilledBg",R("palette-success-dark")),V(b.Alert,"warningFilledBg",R("palette-warning-dark")),V(b.Alert,"errorFilledColor",an(()=>b.getContrastText(b.error.dark))),V(b.Alert,"infoFilledColor",an(()=>b.getContrastText(b.info.dark))),V(b.Alert,"successFilledColor",an(()=>b.getContrastText(b.success.dark))),V(b.Alert,"warningFilledColor",an(()=>b.getContrastText(b.warning.dark))),V(b.Alert,"errorStandardBg",Xe(b.error.light,.9)),V(b.Alert,"infoStandardBg",Xe(b.info.light,.9)),V(b.Alert,"successStandardBg",Xe(b.success.light,.9)),V(b.Alert,"warningStandardBg",Xe(b.warning.light,.9)),V(b.Alert,"errorIconColor",R("palette-error-main")),V(b.Alert,"infoIconColor",R("palette-info-main")),V(b.Alert,"successIconColor",R("palette-success-main")),V(b.Alert,"warningIconColor",R("palette-warning-main")),V(b.AppBar,"defaultBg",R("palette-grey-900")),V(b.AppBar,"darkBg",R("palette-background-paper")),V(b.AppBar,"darkColor",R("palette-text-primary")),V(b.Avatar,"defaultBg",R("palette-grey-600")),V(b.Button,"inheritContainedBg",R("palette-grey-800")),V(b.Button,"inheritContainedHoverBg",R("palette-grey-700")),V(b.Chip,"defaultBorder",R("palette-grey-700")),V(b.Chip,"defaultAvatarColor",R("palette-grey-300")),V(b.Chip,"defaultIconColor",R("palette-grey-300")),V(b.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(b.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(b.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(b.LinearProgress,"primaryBg",Xe(b.primary.main,.5)),V(b.LinearProgress,"secondaryBg",Xe(b.secondary.main,.5)),V(b.LinearProgress,"errorBg",Xe(b.error.main,.5)),V(b.LinearProgress,"infoBg",Xe(b.info.main,.5)),V(b.LinearProgress,"successBg",Xe(b.success.main,.5)),V(b.LinearProgress,"warningBg",Xe(b.warning.main,.5)),V(b.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),V(b.Slider,"primaryTrack",Xe(b.primary.main,.5)),V(b.Slider,"secondaryTrack",Xe(b.secondary.main,.5)),V(b.Slider,"errorTrack",Xe(b.error.main,.5)),V(b.Slider,"infoTrack",Xe(b.info.main,.5)),V(b.Slider,"successTrack",Xe(b.success.main,.5)),V(b.Slider,"warningTrack",Xe(b.warning.main,.5));const O=Yi(b.background.default,.98);V(b.SnackbarContent,"bg",O),V(b.SnackbarContent,"color",an(()=>b.getContrastText(O))),V(b.SpeedDialAction,"fabHoverBg",Yi(b.background.paper,.15)),V(b.StepConnector,"border",R("palette-grey-600")),V(b.StepContent,"border",R("palette-grey-600")),V(b.Switch,"defaultColor",R("palette-grey-300")),V(b.Switch,"defaultDisabledColor",R("palette-grey-600")),V(b.Switch,"primaryDisabledColor",Xe(b.primary.main,.55)),V(b.Switch,"secondaryDisabledColor",Xe(b.secondary.main,.55)),V(b.Switch,"errorDisabledColor",Xe(b.error.main,.55)),V(b.Switch,"infoDisabledColor",Xe(b.info.main,.55)),V(b.Switch,"successDisabledColor",Xe(b.success.main,.55)),V(b.Switch,"warningDisabledColor",Xe(b.warning.main,.55)),V(b.TableCell,"border",Xe(qi(b.divider,1),.68)),V(b.Tooltip,"bg",qi(b.grey[700],.92))}bn(b.background,"default"),bn(b.background,"paper"),bn(b.common,"background"),bn(b.common,"onBackground"),bn(b,"divider"),Object.keys(b).forEach(O=>{const D=b[O];O!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&V(b[O],"mainChannel",Gr(Kr(D.main))),D.light&&V(b[O],"lightChannel",Gr(Kr(D.light))),D.dark&&V(b[O],"darkChannel",Gr(Kr(D.dark))),D.contrastText&&V(b[O],"contrastTextChannel",Gr(Kr(D.contrastText))),O==="text"&&(bn(b[O],"primary"),bn(b[O],"secondary")),O==="action"&&(D.active&&bn(b[O],"active"),D.selected&&bn(b[O],"selected")))})}),_=t.reduce((I,b)=>Kt(I,b),_);const S={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:aM(_)},{vars:C,generateThemeVars:M,generateStyleSheets:N}=IR(_,S);return _.vars=C,Object.entries(_.colorSchemes[_.defaultColorScheme]).forEach(([I,b])=>{_[I]=b}),_.generateThemeVars=M,_.generateStyleSheets=N,_.generateSpacing=function(){return Hm(c.spacing,Ul(this))},_.getColorSchemeSelector=OR(a),_.spacing=_.generateSpacing(),_.shouldSkipGeneratingVar=s,_.unstable_sxConfig={...Wo,...c==null?void 0:c.unstable_sxConfig},_.unstable_sx=function(b){return Tr({sx:b,theme:this})},_.toRuntimeSource=Jm,_}function gf(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Yl({...n===!0?{}:n.palette,mode:t})})}function fM(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n==null?void 0:n.mode,...s}=e,a=o||"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 Da(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const d=Da({...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},gf(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},gf(d,"light",c.light)),d}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),dM({...s,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const hM=fM(),pM="$$material";function mM(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gM=e=>mM(e)&&e!=="classes",bM=mR({themeId:pM,defaultTheme:hM,rootShouldForwardProp:gM}),yM=NR;process.env.NODE_ENV!=="production"&&(Ve.node,Ve.object.isRequired);function xM(e){return TR(e)}function wM(e){return Wl("MuiSvgIcon",e)}uR("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const vM=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Xn(t)}`,`fontSize${Xn(n)}`]};return tA(i,wM,r)},EM=bM("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Xn(n.color)}`],t[`fontSize${Xn(n.fontSize)}`]]}})(yM(({theme:e})=>{var t,n,r,i,o,s,a,l,c,u,d,f,p,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:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:s.call(o,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(([,m])=>m&&m.main).map(([m])=>{var x,y;return{props:{color:m},style:{color:(y=(x=(e.vars??e).palette)==null?void 0:x[m])==null?void 0:y.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(g=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:g.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ko=P.forwardRef(function(t,n){const r=xM({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,g=P.isValidElement(i)&&i.type==="svg",m={...r,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:g},x={};u||(x.viewBox=f);const y=vM(m);return h.jsxs(EM,{as:a,className:Ba(y.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...x,...p,...g&&i.props,ownerState:m,children:[g?i.props.children:i,d?h.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(ko.propTypes={children:Ve.node,classes:Ve.object,className:Ve.string,color:Ve.oneOfType([Ve.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ve.string]),component:Ve.elementType,fontSize:Ve.oneOfType([Ve.oneOf(["inherit","large","medium","small"]),Ve.string]),htmlColor:Ve.string,inheritViewBox:Ve.bool,shapeRendering:Ve.string,sx:Ve.oneOfType([Ve.arrayOf(Ve.oneOfType([Ve.func,Ve.object,Ve.bool])),Ve.func,Ve.object]),titleAccess:Ve.string,viewBox:Ve.string});ko.muiName="SvgIcon";function Zl(e,t){function n(r,i){return h.jsx(ko,{"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=ko.muiName,P.memo(P.forwardRef(n))}const ng=Zl(h.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"),rg=Zl(h.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"),ig=Zl(h.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 Zi({onClick:e,disabled:t,theme:n}){const r=Ct(n);return h.jsx("button",{className:r.micButton,onClick:e,disabled:t,"aria-label":"Start Voice Session",type:"button",children:h.jsx(rg,{})})}function Ks({onClick:e,disabled:t,theme:n}){const r=Ct(n);return h.jsx("button",{className:r.chatButton,onClick:e,disabled:t,"aria-label":"Start Chat Session",type:"button",children:h.jsx(ng,{})})}function qs({onClick:e,disabled:t,theme:n}){const r=Ct(n);return h.jsx("button",{className:r.videoButton,onClick:e,disabled:t,"aria-label":"Start Video Session",type:"button",children:h.jsx(ig,{})})}function kM({prompts:e,theme:t}){const n=Ct(t),[r,i]=A.useState(0);return A.useEffect(()=>{const o=setInterval(()=>{i(s=>(s+1)%e.length)},3e3);return()=>clearInterval(o)},[e.length]),h.jsx("div",{className:"w-96 min-h-[3rem] h-12 relative overflow-hidden flex items-center justify-center",children:e.map((o,s)=>h.jsx("div",{className:`
160
156
  ${n.promptSlider}
161
- ${o===r?"opacity-100":"opacity-0"}
157
+ ${s===r?"opacity-100":"opacity-0"}
162
158
  whitespace-pre-line break-words
163
- `,style:{minHeight:"2.5rem",display:o===r?"block":"none"},children:s},o))})}function yE({statusMessage:e,theme:t}){const n=et(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 Sm=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=et(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(ni,{onClick:t,disabled:e,theme:l}),f.jsx($o,{onClick:n,disabled:e,theme:l}),f.jsx(_o,{onClick:r||t,disabled:e,theme:l})]}):p>1?f.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[h&&f.jsx(ni,{onClick:t,disabled:e,theme:l}),m&&f.jsx($o,{onClick:n,disabled:e,theme:l}),g&&r&&f.jsx(_o,{onClick:r,disabled:e,theme:l})]}):f.jsx("div",{className:"flex items-center justify-center",children:h?f.jsx(ni,{onClick:t,disabled:e,theme:l}):m?f.jsx($o,{onClick:n,disabled:e,theme:l}):g&&r?f.jsx(_o,{onClick:r,disabled:e,theme:l}):f.jsx(ni,{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(gh,{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(ph,{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(yh,{className:"w-4 h-4"}),f.jsx("span",{className:d.text.muted,children:"Video"})]})]})]}),f.jsx(gE,{prompts:i,theme:l}),f.jsx(yE,{statusMessage:s,theme:l})]})});Sm.displayName="Welcome";class Ha 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 Cm({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=document.createElement("a");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 Ua{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 As{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 xE(e){return e}function Wa(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 bE={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)})}},vE={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))}},wE={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})})}},Em=j.createContext(null);function ci({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 $r(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])},X=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",X),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",X),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(Em.Provider,{value:F,children:t})}function Dt(){const e=j.useContext(Em);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class Gu extends Ua{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 Kt=new WeakSet,Bo=new WeakSet;class $r extends Ua{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");if(typeof window>"u"){console.warn("VoxketClient: Skipping initialization in server-side environment"),this.config=n,this.pluginManager=new As(this),this.rpcManager=new Gu;return}this.config=n,this.pluginManager=new As(this),this.rpcManager=new Gu,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(){if(typeof window>"u"){console.warn("VoxketClient: Skipping room initialization in server-side environment");return}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..."),typeof window<"u"&&(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;if(typeof window>"u"){console.warn("VoxketClient: Cannot render UI in server-side environment");return}const r=this.resolveTarget(n.target||"body"),i=this.getTargetKey(r);if(Bo.has(r)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(Kt.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(ci,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(ui,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"),Kt.delete(r)}let s=this.renderedComponents.get(i);if(s&&s.target===r&&Kt.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(ci,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(ui,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}Bo.add(r);try{if(s){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{s.root.unmount(),this.renderedComponents.delete(i),Kt.delete(s.target),r.innerHTML=""}catch(v){console.warn("Failed to cleanup existing root:",v)}}if(Kt.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=Zm.createRoot(r);this.renderedComponents.set(i,{root:p,target:r}),Kt.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(ci,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:j.createElement(ui,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{Bo.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),Kt.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),Kt.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)}}),typeof document<"u"&&r===document.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(typeof document>"u")return;document.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 window>"u"||typeof document>"u")throw new Error("VoxketClient: Cannot resolve DOM target in server-side environment");if(typeof n=="string"){const r=document.querySelector(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 kE=ge.create(xh),SE=ge.create(dE),CE=ge.create(pE),EE=ge.create(Sm);function TE({theme:e,mode:t,loadingText:n}){const r=et(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 AE=ge.create(TE);function jE({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=et(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 Ku({children:e,theme:t,displayType:n="widget",onClose:r,popupPosition:i="bottom-right",onExpand:s}){const o=et(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 PE(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,K]=x.useState(!1),[de,ie]=x.useState(null),[F,W]=x.useState(()=>{try{if(D)return!!D.getCurrentSession()}catch(G){console.error("Error checking existing session:",G)}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(G){console.error("Error getting current session:",G)}return null}),[Q,V]=x.useState(()=>{var G,be,Ce;try{if(D){const je=D.getCurrentSession();if((G=je==null?void 0:je.activeModalities)!=null&&G.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"}),[X,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)),K(!0),null}const G={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 $r(G)}catch(G){return console.error("❌ Failed to create VoxketClient:",G),ie(G),K(!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 G=R.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!G,roomState:G==null?void 0:G.state,sessionStarted:F,currentMode:Q}),G||new te.Room}catch(G){return console.error("❌ Error getting room from client:",G),new te.Room}},[R,F,Q]);x.useEffect(()=>{if(ne){const G=()=>{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,G),ne.on(te.RoomEvent.Disconnected,G),ne.on(te.RoomEvent.TrackSubscribed,be),()=>{ne.off(te.RoomEvent.Connected,G),ne.off(te.RoomEvent.Disconnected,G),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}=Cm({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 G=()=>{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",G),R.on("sessionEnded",()=>{console.log("📞 Session ended - returning to welcome"),z(!1),W(!1),ee(null),V("welcome")}),()=>{R.off("connectionStateChanged",G),R.off("sessionEnded",()=>{})}},[R,Q,w,F]),x.useEffect(()=>{const G=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,G),()=>{ne.off(te.RoomEvent.Disconnected,G),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")),K(!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 G=await R.startSession(oe,{participantName:U||"User",modalities:["voice",...p?["video"]:[]]});console.log("✅ Voice session started successfully:",G.id),ee(G),W(!0),z(!1),k&&k(G.id)}catch(G){console.error("❌ Failed to start voice session:",G),z(!1),W(!1),V("welcome")}},Ne=async()=>{try{if(!R){console.error("❌ VoxketClient not available"),ie(new Error("VoxketClient not initialized")),K(!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 G=await R.startSession(oe,{participantName:U||"User",modalities:["chat"]});console.log("✅ Chat session started successfully:",G.id),ee(G),W(!0),z(!1),k&&k(G.id)}catch(G){console.error("❌ Failed to start chat session:",G),z(!1),W(!1),V("welcome")}},ze=async()=>{try{if(!R){console.error("❌ VoxketClient not available"),ie(new Error("VoxketClient not initialized")),K(!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 G=await R.startSession(oe,{participantName:U||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",G.id),ee(G),W(!0),z(!1),k&&k(G.id)}catch(G){console.error("❌ Failed to start video session:",G),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(G=>{console.error("❌ Widget: Error during disconnect:",G)}))):(console.log("📝 Widget: No active session to clean up"),R&&R.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),R.disconnect().catch(G=>{console.error("❌ Widget: Error during force disconnect:",G)}))),P==="popup"&&!X&&fe(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},nt=()=>{const G=!X;fe(G),M&&M(G),!G&&!($&&F)&&(V("welcome"),W(!1),ee(null))},Zt=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):console.warn("⚠️ No onDisplayTypeChange callback provided")},Ft=()=>{if(console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange)e.onDisplayTypeChange("fullscreen");else{console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");const G=document.getElementById("voice-card")||document.querySelector(".voxket-widget-container");G&&G.requestFullscreen&&G.requestFullscreen().catch(be=>{console.warn("⚠️ Fullscreen API not supported or failed:",be)})}};x.useEffect(()=>{var G,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),(G=je.activeModalities)!=null&&G.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"&&!X)return console.log("🟡 Showing popup trigger button"),f.jsx(jE,{onClick:nt,text:y,position:L,theme:v});if(H||!R){const G=(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:G}),f.jsx("button",{onClick:()=>{K(!1),ie(null),window.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(Qt,{mode:"wait",children:[Q==="welcome"&&!w&&f.jsx(EE,{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(AE,{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(ut.RoomContext.Provider,{value:ne,children:[f.jsx(ut.RoomAudioRenderer,{},`audio-${($==null?void 0:$.id)||"no-session"}`),f.jsx(ut.StartAudio,{label:"Start Audio"},`start-audio-${($==null?void 0:$.id)||"no-session"}`),f.jsx(kE,{loadingText:m,participantName:U||"User",capabilities:me,sessionStarted:F,disabled:!1,theme:v,client:R,displayType:P,onBack:P==="popup"?nt: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(SE,{client:R,theme:v,displayType:P,onBack:P==="popup"?nt: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(ut.RoomContext.Provider,{value:ne,children:[f.jsx(ut.RoomAudioRenderer,{},`audio-video-${($==null?void 0:$.id)||"no-session"}`),f.jsx(ut.StartAudio,{label:"Start Audio"},`start-audio-video-${($==null?void 0:$.id)||"no-session"}`),f.jsx(CE,{client:R,theme:v,displayType:P,onBack:P==="popup"?nt: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(Ku,{theme:v,displayType:P,popupPosition:L,onClose:P==="fullscreen"?Zt:nt,children:ke}):f.jsx("div",{className:ue,style:J,children:f.jsx(Ku,{theme:v,displayType:P,popupPosition:L,onExpand:Ft,children:ke})})}function ui(e){return f.jsx(Ha,{children:f.jsx(PE,{...e})})}function ME({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 NE({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 kn(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:r,endSession:i}=Dt(),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 Tm(){const{sessionMetrics:e,currentSession:t}=Dt();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 Am(){const{setMicrophoneEnabled:e,client:t}=Dt(),[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 jm(){const{setCameraEnabled:e}=Dt(),[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 Pm(){const{startScreenShare:e,stopScreenShare:t}=Dt(),[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 IE(){const{client:e}=Dt(),[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 Zi(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=Dt(),[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 RE(){const{send:e,isSending:t,canSend:n}=Zi(),[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 Za(){const{isConnected:e,isConnecting:t,connectionError:n,connect:r,disconnect:i}=Dt(),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 Mm(){const{participants:e}=Dt();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const Nm=j.createContext({}),_r=()=>j.useContext(Nm);function Im({children:e,...t}){return f.jsx(Nm.Provider,{value:t,children:e})}function di({name:e,children:t,fallback:n,className:r}){return f.jsx("div",{className:`voxket-slot voxket-slot--${e} ${r||""}`,children:t||n})}function Rm(e,t={}){return Object.assign(e,t)}function Vm({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:r=!0,customControls:i,className:s=""}){const o=kn(),a=Am(),l=jm(),c=Pm(),u=_r(),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(VE,{})}),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 VE(){kn();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 qa({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:r=""}){const i=kn(),s=Za(),o=_r(),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 Ga({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:r=""}){const i=kn(),s=Zi(),o=_r(),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(DE,{})]}),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 DE(){const e=Zi(),[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 Ka({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:r,className:i=""}){const s=kn(),o=Tm(),a=Mm(),l=_r(),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:FE(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 FE(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 LE({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=kn(),d=Za();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(Im,{variant:s,size:o,theme:a,className:l,children:f.jsx("div",{className:h,children:c||f.jsxs(f.Fragment,{children:[f.jsx(di,{name:"header",fallback:f.jsx(qa,{})}),f.jsx(di,{name:"content",fallback:f.jsx(Ga,{})}),f.jsx(di,{name:"footer",fallback:f.jsx(Ka,{})})]})})})}const Dm=Rm(LE,{Header:qa,Content:Ga,Footer:Ka,Controls:Vm}),xn={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)"}},js={...xn,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)"}},Ps={...xn,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"}},Fm=j.createContext(null),Lm=()=>{const e=j.useContext(Fm);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function OE({theme:e="default",themes:t={},children:n,cssVariables:r=!0,className:i=""}){const[s,o]=j.useState(()=>{const h={default:xn,dark:js,enterprise:Ps,...t};return typeof e=="string"?h[e]||xn:e}),[a,l]=j.useState(()=>({default:xn,dark:js,enterprise:Ps,...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&&typeof document<"u"){const h=document.documentElement;Object.entries(Om(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(Fm.Provider,{value:d,children:f.jsx("div",{className:`voxket-theme voxket-theme--${s.name} ${i}`,children:n})})}function Om(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 $E(e=xn,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 _E(e){var n;const{theme:t}=Lm();return((n=t.components)==null?void 0:n[e])||{}}const BE=Wa("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&zE(e),t.enableVoiceActivation&&HE(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&UE(e,t)}});function zE(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 HE(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function UE(e,t){console.log("Playing audio response:",t.content)}const WE=Wa("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&ZE(),t.enableFileUpload&&qE(e),t.enableCustomComponents&&GE(),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"?KE(e,t):t.type==="text"&&n.enableRichText&&YE(e,t)}});function ZE(e){console.log("Rich text support enabled")}function qE(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function GE(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",XE),t.set("form",QE),t.set("card",JE),t.set("chart",eT)}function KE(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 YE(e,t){console.log("Processing rich text message:",t.content)}function XE(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function QE(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function JE(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function eT(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function fi({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 tT({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:nT(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(fi,{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(fi,{track:k,participantName:`Participant ${k.participantId}`,showControls:!1,onClick:i,onPin:g},k.id))})]}):d.map(k=>f.jsx(fi,{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 nT(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function rT({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 $m=({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 iT(){const[e,t]=x.useState(null),[n,r]=x.useState([]);x.useEffect(()=>{const a=new $r({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",$m,"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
159
+ `,style:{minHeight:"2.5rem",display:s===r?"block":"none"},children:o},s))})}function SM({statusMessage:e,theme:t}){const n=Ct(t);return h.jsxs("div",{className:"z-10 flex items-center space-x-2 mt-2 pb-2",children:[h.jsx("div",{className:n.statusIndicator}),h.jsx("span",{className:`text-xs ${n.text.muted}`,children:e})]})}const og=A.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:o="Agent is ready",title:s="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=Ct(l),f=c.includes("voice"),p=c.includes("chat"),g=c.includes("video"),m=[f,p,g].filter(Boolean).length;return h.jsxs("div",{className:"flex p-8 flex-col items-center h-full justify-center w-full relative","aria-disabled":e,style:{background:"transparent"},children:[h.jsxs("div",{className:"mt-1 relative flex items-center justify-center mb-8 w-full",style:{minHeight:"120px"},children:[h.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[h.jsx("div",{className:d.pulseRings.ring1}),h.jsx("div",{className:d.pulseRings.ring2,style:{animationDelay:"0.5s"}}),h.jsx("div",{className:d.pulseRings.ring3,style:{animationDelay:"1s"}})]}),h.jsx("div",{className:"relative z-10 flex items-center justify-center",children:f&&p&&g?h.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[h.jsx(Zi,{onClick:t,disabled:e,theme:l}),h.jsx(Ks,{onClick:n,disabled:e,theme:l}),h.jsx(qs,{onClick:r||t,disabled:e,theme:l})]}):m>1?h.jsxs("div",{className:"flex gap-6 items-center justify-center",children:[f&&h.jsx(Zi,{onClick:t,disabled:e,theme:l}),p&&h.jsx(Ks,{onClick:n,disabled:e,theme:l}),g&&r&&h.jsx(qs,{onClick:r,disabled:e,theme:l})]}):h.jsx("div",{className:"flex items-center justify-center",children:f?h.jsx(Zi,{onClick:t,disabled:e,theme:l}):p?h.jsx(Ks,{onClick:n,disabled:e,theme:l}):g&&r?h.jsx(qs,{onClick:r,disabled:e,theme:l}):h.jsx(Zi,{onClick:t,disabled:e,theme:l})})})]}),h.jsxs("div",{className:"text-center flex flex-col items-center gap-y-2 mb-6 w-full",children:[h.jsx("h3",{className:`text-xl font-semibold mb-2 ${d.text.accent}`,children:s}),h.jsx("p",{className:`text-sm leading-relaxed px-4 ${d.text.secondary}`,children:a}),m>1&&h.jsxs("div",{className:"flex gap-6 mt-4 text-xs justify-center",children:[f&&h.jsxs("div",{className:"flex flex-col items-center gap-1",children:[h.jsx(rg,{className:"w-4 h-4"}),h.jsx("span",{className:d.text.muted,children:"Voice"})]}),p&&h.jsxs("div",{className:"flex flex-col items-center gap-1",children:[h.jsx(ng,{className:"w-4 h-4"}),h.jsx("span",{className:d.text.muted,children:"Chat"})]}),g&&h.jsxs("div",{className:"flex flex-col items-center gap-1",children:[h.jsx(ig,{className:"w-4 h-4"}),h.jsx("span",{className:d.text.muted,children:"Video"})]})]})]}),h.jsx(kM,{prompts:i,theme:l}),h.jsx(SM,{statusMessage:o,theme:l})]})});og.displayName="Welcome";class Xl extends P.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 P.createElement(t,{error:this.state.error})}return P.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 sg({room:e,onSessionEnd:t,onSessionStart:n,enableConsoleLogging:r=!0,enableLocalStorage:i=!0,voxketSessionId:o}={}){const[s,a]=P.useState(null),[l,c]=P.useState([]),[u,d]=P.useState(null),[f,p]=P.useState([]),g=P.useCallback((k,v)=>{const _={timestamp:new Date,event:k,data:v,sessionId:s==null?void 0:s.sessionId,participantId:u==null?void 0:u.identity};if(c(S=>[...S,_]),i){const S=JSON.parse(localStorage.getItem("voxket-session-logs")||"[]");S.push(_),localStorage.setItem("voxket-session-logs",JSON.stringify(S))}return _},[s==null?void 0:s.sessionId,u==null?void 0:u.identity,r,i]);P.useEffect(()=>{if(!e)return;const k=()=>{const b=o||`session-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,R=new Date,O={sessionId:b,startTime:R,totalMessages:0,connectionIssues:0,participantCount:f.length,events:[]};a(O),g("SESSION_STARTED",{sessionId:b,startTime:R}),n==null||n(b)},v=()=>{if(s){const b=new Date,R=b.getTime()-s.startTime.getTime(),O={...s,endTime:b,duration:R,events:l};g("SESSION_ENDED",{sessionId:s.sessionId,duration:`${Math.round(R/1e3)}s`,totalMessages:s.totalMessages,connectionIssues:s.connectionIssues}),t==null||t(O),a(null),c([])}},_=b=>{g("CONNECTION_STATE_CHANGED",{state:b}),b===ce.ConnectionState.Reconnecting&&s&&(a(R=>R?{...R,connectionIssues:R.connectionIssues+1}:null),g("CONNECTION_ISSUE",{type:"reconnecting"}))},S=b=>{g("TRACK_PUBLISHED",{trackKind:b.kind,trackSource:b.source})},C=b=>{g("TRACK_UNPUBLISHED",{trackKind:b.kind,trackSource:b.source})},M=(b,R)=>{s&&a(O=>O?{...O,totalMessages:O.totalMessages+1}:null),g("DATA_RECEIVED",{participantId:R==null?void 0:R.identity,dataSize:b.length})},N=b=>{g("PARTICIPANT_CONNECTED",{participantId:b.identity,participantName:b.name}),p(R=>[...R,b]),s&&a(R=>R?{...R,participantCount:R.participantCount+1}:null)},I=b=>{g("PARTICIPANT_DISCONNECTED",{participantId:b.identity,participantName:b.name}),p(R=>R.filter(O=>O.identity!==b.identity))};return e.localParticipant&&d(e.localParticipant),e.on(ce.RoomEvent.Connected,k),e.on(ce.RoomEvent.Disconnected,v),e.on(ce.RoomEvent.ConnectionStateChanged,_),e.on(ce.RoomEvent.TrackPublished,S),e.on(ce.RoomEvent.TrackUnpublished,C),e.on(ce.RoomEvent.DataReceived,M),e.on(ce.RoomEvent.ParticipantConnected,N),e.on(ce.RoomEvent.ParticipantDisconnected,I),()=>{e.off(ce.RoomEvent.Connected,k),e.off(ce.RoomEvent.Disconnected,v),e.off(ce.RoomEvent.ConnectionStateChanged,_),e.off(ce.RoomEvent.TrackPublished,S),e.off(ce.RoomEvent.TrackUnpublished,C),e.off(ce.RoomEvent.DataReceived,M),e.off(ce.RoomEvent.ParticipantConnected,N),e.off(ce.RoomEvent.ParticipantDisconnected,I)}},[e,s,l,f.length,g,t,n]);const m=P.useCallback(()=>i?JSON.parse(localStorage.getItem("voxket-session-logs")||"[]"):l,[l,i]),x=P.useCallback(()=>{i&&localStorage.removeItem("voxket-session-logs"),c([])},[i]),y=P.useCallback(()=>{const k=m(),v=JSON.stringify(k,null,2),_="data:application/json;charset=utf-8,"+encodeURIComponent(v),S=`voxket-session-logs-${new Date().toISOString().split("T")[0]}.json`,C=document.createElement("a");C.setAttribute("href",_),C.setAttribute("download",S),C.click()},[m]);return{sessionMetrics:s,sessionLogs:l,logEvent:g,getSessionLogs:m,clearSessionLogs:x,exportSessionLogs:y}}class Ql{constructor(){at(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 o of i)try{o(...n)}catch(s){console.error(`Error in event listener for ${String(t)}:`,s)}}listenerCount(t){var n;return((n=this.listeners[t])==null?void 0:n.length)??0}eventNames(){return Object.keys(this.listeners)}}class ag{constructor(t){at(this,"plugins",new Map);at(this,"installedPlugins",new Set);at(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 o of r.dependencies)this.installedPlugins.has(o)||await this.install(o);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,o]of this.plugins)if(this.installedPlugins.has(i)&&((r=o.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 CM(e){return e}function Jl(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 _M={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)})}},TM={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))}},NM={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})})}},lg=A.createContext(null);function io({config:e,children:t,autoConnect:n=!1,client:r}){const[i,o]=A.useState(null),[s,a]=A.useState(!1),[l,c]=A.useState(!1),[u,d]=A.useState(null),[f,p]=A.useState(null),[g,m]=A.useState("idle"),[x,y]=A.useState(null),[k,v]=A.useState([]),[_,S]=A.useState([]),[C,M]=A.useState([]);A.useEffect(()=>{const W=r||new ki(e);o(W);const w=N(W);return n&&!r&&I(W),()=>{w(),r||W.disconnect().catch(console.error)}},[e,n,r]);const N=W=>{const w=()=>{c(!0),d(null)},F=()=>{a(!0),c(!1),d(null)},Y=()=>{a(!1),c(!1),p(null),m("idle"),v([]),S([]),M([])},E=Se=>{d(Se),c(!1)},B=Se=>{p(Se),m(Se.state)},z=Se=>{m(Se),f&&p({...f,state:Se})},K=(Se,Z)=>{p(null),m("idle"),y(Z),v([]),S([]),M([])},q=Se=>{v(Z=>[...Z,Se])},me=Se=>{v(Z=>Z.filter(te=>te.id!==Se.id))},Q=Se=>{S(Z=>[...Z,Se])},le=Se=>{S(Z=>[...Z,Se])},he=Se=>{console.log("📝 VoxketProvider: Received transcription:",Se),M(Z=>Z.find(ye=>ye.id===Se.id)?(console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:",Se.id),Z):(console.log("📝 VoxketProvider: Adding new transcription:",Se.id),[...Z,Se]))},G=()=>{console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"),S([]),M([])};return W.on("connection.connecting",w),W.on("connection.connected",F),W.on("connection.disconnected",Y),W.on("connection.error",E),W.on("session.created",B),W.on("session.state.changed",z),W.on("session.ended",K),W.on("participant.joined",q),W.on("participant.left",me),W.on("chat.message.received",Q),W.on("chat.message.sent",le),W.on("transcription.received",he),W.on("chat.history.cleared",G),()=>{console.log("📝 VoxketProvider: Cleaning up event listeners"),W.off("connection.connecting",w),W.off("connection.connected",F),W.off("connection.disconnected",Y),W.off("connection.error",E),W.off("session.created",B),W.off("session.state.changed",z),W.off("session.ended",K),W.off("participant.joined",q),W.off("participant.left",me),W.off("chat.message.received",Q),W.off("chat.message.sent",le),W.off("chat.history.cleared",G),W.off("transcription.received",he)}},I=async W=>{const w=W||i;if(w)try{await w.connect()}catch(F){console.error("Failed to connect:",F)}},j={client:i,isConnected:s,isConnecting:l,connectionError:u,currentSession:f,sessionState:g,sessionMetrics:x,participants:k,chatMessages:_,transcriptions:C,connect:()=>I(),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 F={agentId:W,participantName:w.participantName||"User",metadata:w.metadata,modalities:w.modalities||["voice"]};return await i.createSession(F)},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 h.jsx(lg.Provider,{value:j,children:t})}function hn(){const e=A.useContext(lg);if(!e)throw new Error("useVoxket must be used within a VoxketProvider");return e}class AM extends Ql{constructor(n){super();at(this,"room",null);at(this,"registeredMethods",new Map);at(this,"activeInteractions",new Map);at(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 o={methodName:n,component:r,presentationMode:i};this.registeredMethods.set(n,o);try{this.room.registerRpcMethod(n,async s=>{console.log(`RpcManager: RPC method '${n}' called by ${s.callerIdentity}`),console.log("RpcManager: Payload:",s.payload),this.emit("rpc.method.called",{methodName:n,data:s});let a;console.log(`RpcManager: Current registration for '${n}':`,o);let l=s.responseTimeout||30;try{a=JSON.parse(s.payload)}catch{a=s.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(s){throw console.error(`RpcManager: Failed to register RPC method '${n}':`,s),s}}async awaitUserInteraction(n,r,i,o,s){return new Promise((a,l)=>{const c=`${n}_${Date.now()}`;console.log(`RpcManager: Starting user interaction for method: ${n}, timeout: ${s} seconds`);const u={didSuccess:(f,p)=>{console.log(`RpcManager: User interaction successful for method: ${n}`,f),this.clearInteraction(c),this.currentInteraction=null;const g={success:!0,message:"User interaction completed successfully",data:f,timestamp:new Date,...p?{successView:p}:{}};this.emit("rpc.interaction.completed",{methodName:n,response:g}),a(g)},didFail:f=>{console.log(`RpcManager: User interaction failed for method: ${n}`,f),this.clearInteraction(c);const p={success:!1,message:"User interaction failed",error:f,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(c),this.currentInteraction=null,console.log("RpcManager: Current interaction after dismiss:",this.currentInteraction);const f={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:f}),this.emit("rpc.interaction.completed",{methodName:n,response:f}),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(f)},didTimeout:f=>{console.log(`RpcManager: User interaction timeout for method: ${n}`),this.clearInteraction(c),this.currentInteraction=null;const p={success:!0,message:`User interaction timed out after ${s} seconds, it should be considered as declined, agent don't need to retry`,timestamp:new Date,...f?{timeoutView:f}:{}};this.emit("rpc.interaction.timeout",{methodName:n,response:p}),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(p)}},d=setTimeout(()=>{u.didTimeout&&u.didTimeout()},s);this.activeInteractions.set(c,{resolve:f=>a(JSON.parse(f)),reject:l,timeoutId:d}),this.currentInteraction={isVisible:!0,methodName:n,component:r,presentationMode:i,timeout:s,data:o,handler:u},this.emit("rpc.interaction.started",{methodName:n,presentationMode:i}),setTimeout(async()=>{var f;if((f=this.currentInteraction)!=null&&f.handler)try{console.log(`RpcManager: Component created for method: ${n} with data:`,o)}catch(p){console.error("RpcManager: Error loading data into component:",p),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 Ye extends Error{constructor(t,n,r){super(t),this.code=n,this.details=r,this.name="VoxketError"}}const Nn=new WeakSet,Ys=new WeakSet;class ki extends Ql{constructor(n){super();at(this,"config");at(this,"room",null);at(this,"pluginManager");at(this,"rpcManager");at(this,"isConnected",!1);at(this,"currentSession",null);at(this,"connectionState",ce.ConnectionState.Disconnected);at(this,"renderedComponents",new Map);at(this,"textStreamHandlersRegistered",!1);at(this,"currentAgentInfo",null);at(this,"chatMessages",[]);at(this,"activeTranscriptions",new Map);at(this,"isAgentConnected",!1);at(this,"agentState","idle");this.config=n,this.pluginManager=new ag(this),this.rpcManager=new AM,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,o;(o=(i=this.config).onSessionEnd)==null||o.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 ce.Room,this.setupRoomEventListeners()}setupRoomEventListeners(){this.room&&(this.room.on(ce.RoomEvent.Connected,()=>{var n,r;this.connectionState=ce.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(o){console.warn("VoxketClient: Failed to enable microphone after room connection:",o)}},1e3),this.textStreamHandlersRegistered||this.setupTextStreamHandlers()}),this.room.on(ce.RoomEvent.Disconnected,n=>{var r;console.log("🔴 VoxketClient: Room disconnected, reason:",n),this.connectionState=ce.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(ce.RoomEvent.ConnectionStateChanged,n=>{this.connectionState=n,n===ce.ConnectionState.Connecting&&this.emit("connection.connecting")}),this.room.on(ce.RoomEvent.ParticipantConnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.joined",r)}),this.room.on(ce.RoomEvent.ParticipantDisconnected,n=>{const r={id:n.identity,name:n.name||n.identity,isLocal:!1};this.emit("participant.left",r)}),this.room.on(ce.RoomEvent.LocalTrackPublished,n=>{console.log("🎬 VoxketClient: Local track published:",n.source),n.source===ce.Track.Source.ScreenShare&&this.emit("track.unmuted",{source:"screenShare",enabled:!0})}),this.room.on(ce.RoomEvent.LocalTrackUnpublished,n=>{console.log("🎬 VoxketClient: Local track unpublished:",n.source),n.source===ce.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 o=await r.readAll(),s={id:`msg_${Date.now()}_${i.identity||"user"}_${Math.random().toString(36).substr(2,9)}`,content:o,timestamp:new Date,sender:{id:i.identity||"user",name:i.identity||"User",type:"participant"},metadata:{topic:"lk.chat"}};this.emit("chat.message.received",s)}catch(o){console.error("VoxketClient: Failed to process lk.chat message:",o)}})}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 o,s,a,l,c,u;console.log("📝 VoxketClient: Received transcription stream from:",i.identity);try{console.log("📝 VoxketClient: Processing transcription stream...");const d=i.identity===((s=(o=this.room)==null?void 0:o.localParticipant)==null?void 0:s.identity),f=Date.now(),p=i.identity,g=this.activeTranscriptions.get(p);let m,x=!0;g&&f-g.timestamp<1e3?(m=g.messageId,x=!1,console.log("📝 VoxketClient: Reusing existing transcription message ID:",m)):(m=`msg_${d?"user":"agent"}_${i.identity}_${f}`,this.activeTranscriptions.set(p,{messageId:m,timestamp:f}),console.log("📝 VoxketClient: Created new transcription message ID:",m));let y="";console.log("📝 VoxketClient: Current agent info:",this.currentAgentInfo);const k=((a=this.currentAgentInfo)==null?void 0:a.name)||i.identity||"AI Assistant";console.log("📝 VoxketClient: Using agent name:",k);const v=d?"participant":"agent",_=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:v,senderName:_});const S={id:m,content:"",timestamp:new Date,sender:{id:i.identity||"unknown",name:_,type:v},metadata:{topic:"lk.transcription",streaming:!0}};x&&this.emit("chat.message.received",S),console.log("📝 VoxketClient: Starting to read transcription stream...");for await(const I of r){console.log("📝 VoxketClient: Received chunk:",I.length,"chars"),y+=I;const b=this.convertMarkdownToText(y),R={...S,content:b,metadata:{...S.metadata,streaming:!0}};this.emit("chat.message.updated",R)}const C=this.convertMarkdownToText(y),M={...S,content:C,metadata:{...S.metadata,streaming:!1}};this.emit("chat.message.updated",M);const N={id:m,text:C,isFinal:!0,startTime:S.timestamp.getTime(),participantId:i.identity||"agent"};this.emit("transcription.received",N),console.log("📝 VoxketClient: Emitted transcription event:",N)}catch(d){console.error("VoxketClient: Failed to process lk.transcription message:",d);try{const f=await r.readAll(),p=((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:f,timestamp:new Date,sender:{id:i.identity||"agent",name:p,type:"agent"},metadata:{topic:"lk.transcription"}};this.emit("chat.message.received",g);const m={id:g.id,text:g.content,isFinal:!0,startTime:g.timestamp.getTime(),participantId:i.identity||"agent"};this.emit("transcription.received",m),console.log("📝 VoxketClient: Emitted fallback transcription event:",m)}catch(f){console.error("VoxketClient: Fallback failed for lk.transcription:",f)}}})}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 o=[];try{o=["tes","hello how are you","algebra make me learn that ","what is the meaning of life"]}catch(s){console.warn("VoxketClient: Failed to parse suggested_response:",s,i)}this.emit("suggested.response",o)})}catch(r){console.warn("VoxketClient: suggested_response handler already registered, skipping:",r)}try{this.room.registerTextStreamHandler("agent_state_changed",async(r,i)=>{const o=await r.readAll();console.log("🤖 VoxketClient: agent_state_changed stream received:",o);let s={};try{s=typeof o=="string"?JSON.parse(o.replace(/'/g,'"')):o}catch(a){console.warn("VoxketClient: Failed to parse agent_state_changed:",a,o)}this.isAgentConnected||(this.isAgentConnected=!0,console.log("🤖 VoxketClient: Agent marked as connected (first state change received)"),this.emit("agent.connected",s)),s.new_state==="speaking"?(this.setAgentState("speaking"),this.emit("agent.speaking",s)):s.new_state==="thinking"?(this.setAgentState("thinking"),this.emit("agent.thinking",s)):(s.new_state==="idle"||s.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 o=await r.readAll()}catch(o){console.error("VoxketClient: Error processing images stream:",o)}})}catch(r){console.warn("VoxketClient: images handler already registered, skipping:",r)}try{this.room.registerByteStreamHandler("images",async(r,i)=>{var o,s;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===((s=(o=this.room)==null?void 0:o.localParticipant)==null?void 0:s.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=p=>{const g={...l,metadata:{...l.metadata,downloadProgress:p||0}};this.emit("chat.message.updated",g)});const c=[];for await(const p of r)c.push(p);const u=new Blob(c,{type:a.mimeType||"application/octet-stream"}),d=URL.createObjectURL(u),f={...l,metadata:{...l.metadata,downloading:!1,downloadProgress:1,downloadUrl:d,blob:u}};this.emit("chat.message.updated",f)}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,o)=>{try{const s=await i.readAll();if(console.log(`📝 VoxketClient: Received '${r}' stream:`,s),r==="error"){let a={};try{a=typeof s=="string"?JSON.parse(s):s}catch{a={message:s}}console.warn("� VoxketClient: Agent error:",a),this.emit("agent.error",a)}else this.emit("text.stream.received",{topic:r,data:s,participantInfo:o})}catch(s){console.error(`VoxketClient: Failed to process '${r}' stream:`,s)}})}catch(i){console.warn(`VoxketClient: Handler for '${r}' already registered, skipping:`,i)}});try{this.room.registerTextStreamHandler("*",async(r,i)=>{var o;try{const s=await r.readAll(),a=((o=r.info)==null?void 0:o.topic)||"unknown";console.log(`📝 VoxketClient: Received unhandled text stream for topic '${a}':`,s),this.emit("text.stream.unhandled",{topic:a,data:s,participantInfo:i})}catch(s){console.error("VoxketClient: Failed to process unhandled text stream:",s)}})}catch(r){console.warn("VoxketClient: Generic text stream handler already registered, skipping:",r)}this.textStreamHandlersRegistered=!0}async fetchConnectionDetails(n,r,i){const o=n||this.config.agentId||"default-agent",s=r||this.config.participantName||"User",a=i||this.config.modalities||["voice"];try{const l={agent_id:o,participant_name:s,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 f=`HTTP ${c.status}: Failed to fetch connection details`;try{const p=await c.json();p&&(p.error?f=`API Error: ${p.error}`:p.detail?f=`API Error: ${p.detail}`:p.message&&(f=`API Error: ${p.message}`))}catch{try{const g=await c.text();g&&(f=`API Error: ${g}`)}catch{}}throw new Error(f)}const u=await c.json();let d;return u.agent_info&&(d={id:u.agent_info.agent_info.id,name:u.agent_info.agent_info.name,capabilities:u.agent_info.capabilities,modality_supported:u.agent_info.modality_supported,session_settings:u.agent_info.session_settings||{}},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 Ye(`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 o;try{this.emit("connection.connecting");const s=await this.fetchConnectionDetails(n,r,i);return await((o=this.room)==null?void 0:o.connect(s.serverUrl,s.participantToken)),this.isConnected=!0,s}catch(s){console.error("VoxketClient: Connection failed:",s);const a=new Ye(`Failed to connect to Voxket services: ${s instanceof Error?s.message:"Unknown error"}`,"CONNECTION_FAILED",s);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 ce.Room,this.setupRoomEventListeners(),console.log("✅ VoxketClient: Disconnect completed successfully"),this.emit("connection.disconnected")}catch(r){console.error("❌ VoxketClient: Disconnect failed:",r);const i=new Ye("Failed to disconnect properly","NETWORK_ERROR",r);throw this.emit("connection.error",i),i}}async createSession(n){var r,i,o,s;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((o=n.modalities)!=null&&o.includes("video"))try{await new Promise(c=>setTimeout(c,200)),(s=this.room)!=null&&s.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 Ye?a:a instanceof TypeError&&a.message.includes("fetch")?new Ye("Network connection failed","CONNECTION_FAILED",a):a instanceof Error&&a.message.includes("Failed to fetch connection details")?new Ye(`API connection failed: ${a.message}`,"CONNECTION_FAILED",a):new Ye(`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 Ye("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(ce.Track.Source.Microphone);if(i!=null&&i.track)return{source:ce.Track.Source.Microphone,participant:r,publication:i}}return null}getAgentVideoTrack(){const n=this.getRemoteParticipants();for(const r of n){const i=r.getTrackPublication(ce.Track.Source.Camera);if(i!=null&&i.track)return{source:ce.Track.Source.Camera,participant:r,publication:i}}return null}getVideoTrackRefs(){const n=[],r=this.getLocalParticipant();if(r){const o=r.getTrackPublication(ce.Track.Source.Camera);o!=null&&o.track&&n.push({source:ce.Track.Source.Camera,participant:r,publication:o});const s=r.getTrackPublication(ce.Track.Source.ScreenShare);s!=null&&s.track&&n.push({source:ce.Track.Source.ScreenShare,participant:r,publication:s})}const i=this.getRemoteParticipants();for(const o of i){const s=o.getTrackPublication(ce.Track.Source.Camera);s!=null&&s.track&&n.push({source:ce.Track.Source.Camera,participant:o,publication:s});const a=o.getTrackPublication(ce.Track.Source.ScreenShare);a!=null&&a.track&&n.push({source:ce.Track.Source.ScreenShare,participant:o,publication:a})}return n}getCameraTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===ce.Track.Source.Camera)}getScreenShareTrackRefs(){return this.getVideoTrackRefs().filter(n=>n.source===ce.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 s,a,l,c,u,d,f,p,g;const r=this.resolveTarget(n.target||"body"),i=this.getTargetKey(r);if(Ys.has(r)){console.warn("⚠️ VoxketClient: Target is already being processed, skipping renderUI");return}if(Nn.has(r)){console.log("✋ VoxketClient: Target already has a React root in registry, updating existing props...");const m=this.renderedComponents.get(i);if(m&&m.root){const x={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:((s=n.modality)==null?void 0:s.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{m.root.render(A.createElement(io,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:A.createElement(oo,x)})),console.log("✅ VoxketClient: Successfully updated existing widget with new props");return}catch(y){throw console.error("Error re-rendering existing widget:",y),new Error(`Failed to update existing widget: ${y instanceof Error?y.message:"Unknown error"}`)}}else console.warn("⚠️ Registry inconsistency detected, cleaning up"),Nn.delete(r)}let o=this.renderedComponents.get(i);if(o&&o.target===r&&Nn.has(r)){console.log("🔄 VoxketClient: Reusing existing React root for target:",i);const m=o.root,x={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{m.render(A.createElement(io,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:A.createElement(oo,x)}))}catch(y){throw console.error("Error rendering Voxket widget:",y),new Error(`Failed to render Voxket widget: ${y instanceof Error?y.message:"Unknown error"}`)}return}Ys.add(r);try{if(o){console.log("🧹 VoxketClient: Cleaning up existing component for different target");try{o.root.unmount(),this.renderedComponents.delete(i),Nn.delete(o.target),r.innerHTML=""}catch(y){console.warn("Failed to cleanup existing root:",y)}}if(Nn.has(r)){console.warn("⚠️ VoxketClient: Target already in registry, skipping root creation");return}console.log("🆕 VoxketClient: Creating new React root for target:",i);const m=Wg.createRoot(r);this.renderedComponents.set(i,{root:m,target:r}),Nn.add(r);const x={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:((f=n.modality)==null?void 0:f.includes("chat"))!==!1,suportsVideoInput:((p=n.modality)==null?void 0:p.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(!m||typeof m.render!="function")throw new Error("Invalid React root. Make sure React 18+ is properly installed and configured.");try{m.render(A.createElement(io,{config:this.config,autoConnect:n.autoStart||!1,client:this,children:A.createElement(oo,x)}))}catch(y){throw console.error("Error rendering Voxket widget:",y),new Error(`Failed to render Voxket widget: ${y instanceof Error?y.message:"Unknown error"}`)}}finally{Ys.delete(r)}}removeUI(n){var i;const r=n?this.resolveTarget(n):null;if(r){const o=this.getTargetKey(r),s=this.renderedComponents.get(o);if(s){console.log("🗑️ VoxketClient: Removing UI for target:",o),this.renderedComponents.delete(o),Nn.delete(r);try{const l=s.target;l&&l.isConnected?(typeof((i=s.root)==null?void 0:i.unmount)=="function"&&(s.root.unmount(),console.log("✅ VoxketClient: UI unmounted for target:",o)),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:",o),Nn.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)}}),r===document.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(){document.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=document.querySelector(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 Ye("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new Ye("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new Ye("No local participant","CONNECTION_FAILED");this.dismissCurrentInteraction();try{const o={id:`msg_${Date.now()}`,content:n,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:r||{}},s=await((i=this.room)==null?void 0:i.localParticipant.sendText(n,{topic:"lk.chat",destinationIdentities:[]}));this.emit("chat.message.sent",o)}catch(o){throw console.error("VoxketClient: Failed to send chat message:",o),new Ye("Failed to send message","NETWORK_ERROR",o)}}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 Ye("No active session","SESSION_NOT_FOUND");if(!this.room)throw console.error("VoxketClient: No room instance found"),new Ye("No room connection","CONNECTION_FAILED");if(!this.room.localParticipant)throw console.error("VoxketClient: No local participant found"),new Ye("No local participant","CONNECTION_FAILED");if(!n||n.length===0)throw new Ye("No files provided","INVALID_PARAMETER");this.dismissCurrentInteraction();const i=n.filter(o=>o.type.startsWith("image/"));if(i.length===0)throw new Ye("Only image files are allowed","INVALID_PARAMETER");i.length!==n.length&&console.warn("VoxketClient: Some non-image files were filtered out");try{const o=i.map(async(s,a)=>{const c={id:`att_${Date.now()}_${a}`,content:`📎 ${s.name}`,sender:{id:"user",name:this.config.participantName||"User",type:"participant"},timestamp:new Date,metadata:{...r,type:"attachment",fileName:s.name,fileSize:s.size,mimeType:s.type,uploading:!0}};this.emit("chat.message.sent",c);const u=await this.room.localParticipant.sendFile(s,{mimeType:s.type,topic:"images",onProgress:f=>{const p={...c,metadata:{...c.metadata,uploadProgress:f}};this.emit("chat.message.updated",p)}});try{const f=new FileReader,p=new Promise((x,y)=>{f.onload=()=>{typeof f.result=="string"?x(f.result):y(new Error("Failed to convert to base64"))},f.onerror=y});f.readAsDataURL(s);const m={type:"image",data:await p,filename:s.name,mimeType:s.type,size:s.size};await this.room.localParticipant.sendText(JSON.stringify(m),{topic:"images",destinationIdentities:[]})}catch(f){console.warn("VoxketClient: Failed to send image data to agent:",f);try{const p=`I've shared an image: ${s.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 d={...c,metadata:{...c.metadata,uploading:!1,uploadProgress:1,streamId:u.id}};return this.emit("chat.message.updated",d),u});await Promise.all(o)}catch(o){throw console.error("VoxketClient: Failed to send attachments:",o),new Ye("Failed to send attachments","NETWORK_ERROR",o)}}async sendAttachment(n,r){return this.sendAttachments([n],r)}toggleMicrophone(n){return this.setMicrophoneEnabled(n!==!1)}async setMicrophoneEnabled(n){var r,i;try{const o=(r=this.room)==null?void 0:r.localParticipant.isMicrophoneEnabled,s=n??!o;await((i=this.room)==null?void 0:i.localParticipant.setMicrophoneEnabled(s)),s?this.emit("track.unmuted",{source:"microphone",enabled:!0}):this.emit("track.muted",{source:"microphone",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle microphone:",o),new Ye("Failed to toggle microphone","PERMISSION_DENIED",o)}}toggleCamera(n){return this.setCameraEnabled(n!==!1)}async setCameraEnabled(n){var r,i;try{const o=(r=this.room)==null?void 0:r.localParticipant.isCameraEnabled,s=n??!o;await((i=this.room)==null?void 0:i.localParticipant.setCameraEnabled(s)),s?this.emit("track.unmuted",{source:"camera",enabled:!0}):this.emit("track.muted",{source:"camera",enabled:!1})}catch(o){throw console.error("VoxketClient: Failed to toggle camera:",o),new Ye("Failed to toggle camera","PERMISSION_DENIED",o)}}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 Ye("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 Ye("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 Ye("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 Ye("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 Ye("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 Ye("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=o=>!!r.canPublish&&(r.canPublishSources.length===0||r.canPublishSources.includes(o));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===ce.ConnectionState.Connected}getMicrophoneTrack(){const n=this.getLocalParticipant();if(!n)return null;for(const[,r]of n.trackPublications)if(r.source===ce.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===ce.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===ce.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 Ye("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 Ye("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 o=await i.readAll();r(o)}catch(o){console.error(`Error processing event for topic '${n}':`,o)}})}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 RM=Ie.create(Bm),MM=Ie.create(Vl),IM=Ie.create(HN),OM=Ie.create(og);function PM({theme:e,mode:t,loadingText:n}){const r=Ct(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 h.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8",children:[h.jsxs("div",{className:"text-center",children:[h.jsx("h3",{className:`text-lg font-semibold mb-2 ${r.text.accent}`,children:i()}),h.jsx("p",{className:`text-sm ${r.text.muted}`,children:"Please wait a moment..."})]}),h.jsxs("div",{className:"flex space-x-1 mt-4",children:[h.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"0ms"}}),h.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"150ms"}}),h.jsx("div",{className:"w-2 h-2 rounded-full animate-bounce bg-blue-500",style:{animationDelay:"300ms"}})]})]})}const DM=Ie.create(PM);function LM({onClick:e,text:t="Open Chat",position:n="bottom-right",theme:r}){const i={"top-left":{top:16,left:16},"top-right":{top:16,right:16},"bottom-left":{bottom:16,left:16},"bottom-right":{bottom:16,right:16}},o=Ct(r);return h.jsx(Ie.button,{onClick:e,className:`voxket-popup-trigger fixed z-[2147483647] px-4 py-2 rounded-full shadow-lg ${o.popupTrigger} transition-all duration-200 hover:scale-105`,style:{position:"fixed",...i[n]},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 bf({children:e,theme:t,displayType:n="widget",onClose:r,popupPosition:i="bottom-right",onExpand:o}){const s=Ct(t),a={"top-left":{top:16,left:16},"top-right":{top:16,right:16},"bottom-left":{bottom:16,left:16},"bottom-right":{bottom:16,right:16}};if(n==="fullscreen")return h.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:l=>{l.target===l.currentTarget&&r&&r()},children:h.jsxs("div",{className:"w-full h-full max-w-7xl max-h-[95vh] rounded-2xl relative bg-transparent flex flex-col",onClick:l=>{l.stopPropagation()},children:[r&&h.jsx("button",{onClick:l=>{l.preventDefault(),l.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:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.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"})})}),h.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${s.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:[h.jsx("div",{className:s.cardTopGradient}),h.jsx("div",{className:s.cardPurpleBlur}),h.jsx("div",{className:s.cardPinkBlur}),h.jsx("div",{className:"relative z-10 flex flex-col h-full",children:e}),h.jsx("div",{className:s.cardPulse1}),h.jsx("div",{className:s.cardPulse2,style:{animationDelay:"1s"}})]})]})});if(n==="popup"){const l=h.jsx("div",{className:"voxket-popup-wrapper fixed inset-0 z-[2147483600] pointer-events-none",style:{width:"100vw",height:"100vh"},children:h.jsxs("div",{className:"fixed rounded-2xl pointer-events-auto",style:{...a[i],position:"fixed"},children:[r&&h.jsx("button",{onClick:r,className:"absolute -top-2 -right-2 z-[2147483646] w-8 h-8 rounded-full text-white flex items-center justify-center text-sm shadow-lg border border-gray-700",style:{background:"rgba(31,41,55,0.85)",backdropFilter:"blur(4px)",cursor:"pointer"},children:"×"}),h.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${s.card} rounded-2xl flex flex-col relative overflow-hidden shadow-xl`,"data-theme":t,style:{width:"350px",height:"500px",contain:"layout style paint",overscrollBehavior:"contain",background:"var(--voxket-card-bg, linear-gradient(155deg,#1e2533,#0b0e13))"},children:[h.jsx("div",{className:s.cardTopGradient}),h.jsx("div",{className:s.cardPurpleBlur}),h.jsx("div",{className:s.cardPinkBlur}),h.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),h.jsx("div",{className:s.cardPulse1}),h.jsx("div",{className:s.cardPulse2,style:{animationDelay:"1s"}})]})]})});return yf.createPortal(l,typeof document<"u"?document.body:{})}return h.jsxs("div",{id:"voice-card",className:`voxket-widget-root theme-${t} ${s.card} relative overflow-hidden w-full h-full`,"data-theme":t,style:{height:"100%",maxHeight:"100%",contain:"layout style paint",overscrollBehavior:"contain",background:"var(--voxket-card-bg, linear-gradient(160deg,#1b2130,#0c0f15))"},children:[h.jsx("div",{className:s.cardTopGradient}),h.jsx("div",{className:s.cardPurpleBlur}),h.jsx("div",{className:s.cardPinkBlur}),h.jsx("div",{className:"relative z-10 flex flex-col h-full w-full",children:e}),h.jsx("div",{className:s.cardPulse1}),h.jsx("div",{className:s.cardPulse2,style:{animationDelay:"1s"}})]})}function FM(e){if(typeof window>"u")return null;const{agentId:t,participantName:n,baseUrl:r,appSecret:i,appId:o,prompts:s,statusMessage:a,welcomeTitle:l,welcomeSubTitle:c,className:u,width:d,height:f,loadingText:p,suportsChatInput:g=!0,suportsVideoInput:m=!0,suportsScreenShare:x=!0,theme:y="vox",onSessionStart:k,onSessionEnd:v,enableSessionLogging:_=!0,onSessionLogsUpdate:S,onSessionMetricsUpdate:C,modalities:M=["voice"],displayType:N="widget",popupPosition:I="bottom-right",popupTriggerText:b="Open Chat",onPopupToggle:R,voxketClient:O,onDisplayTypeChange:D}=e,[$,U]=P.useState(N),re=D?N:$,[ne,j]=P.useState(!1),[W,w]=P.useState(null),[F,Y]=P.useState(()=>{try{if(O)return!!O.getCurrentSession()}catch(oe){console.error("Error checking existing session:",oe)}return!1}),[E,B]=P.useState(!1),[z,K]=P.useState(t||""),[q,me]=P.useState(n||"User"),[Q,le]=P.useState(()=>{try{if(O)return O.getCurrentSession()}catch(oe){console.error("Error getting current session:",oe)}return null}),[he,G]=P.useState(()=>{var oe,tt,Fe;try{if(O){const Ge=O.getCurrentSession();if((oe=Ge==null?void 0:Ge.activeModalities)!=null&&oe.includes("chat"))return"chat";if((tt=Ge==null?void 0:Ge.activeModalities)!=null&&tt.includes("voice"))return"voice";if((Fe=Ge==null?void 0:Ge.activeModalities)!=null&&Fe.includes("video"))return"video"}}catch(Ge){console.error("Error determining current mode:",Ge)}return"welcome"}),[Se,Z]=P.useState(!1);P.useEffect(()=>{N==="fullscreen"&&console.log("🎯 Widget: Switched to fullscreen mode")},[N]),P.useEffect(()=>{F&&!E?console.log("📊 Session started:",{currentMode:he,sessionId:Q==null?void 0:Q.id}):!F&&!E&&he==="welcome"&&console.log("📊 Returned to welcome screen")},[F,he,E]);const te=P.useMemo(()=>{try{if(O)return console.log("🔄 Using existing VoxketClient to preserve session state"),O;if(!o||!i||!r){const tt=`Missing required props: ${o?"":"appId "}${i?"":"appSecret "}${r?"":"baseUrl"}`;return console.error("❌ VoxketClient creation failed:",tt),w(new Error(tt)),j(!0),null}const oe={appId:o,appSecret:i,baseUrl:r,agentId:z,participantName:q||"User",modalities:M};return console.log("🔧 Creating new VoxketClient with config:",{appId:o.substring(0,8)+"...",baseUrl:r,agentId:z,participantName:q||"User",modalities:M}),new ki(oe)}catch(oe){return console.error("❌ Failed to create VoxketClient:",oe),w(oe),j(!0),null}},[O,o,i,r,z,q,M]),ye=M,ae=P.useMemo(()=>{try{if(!te)return console.warn("⚠️ No VoxketClient available, creating fallback room"),new ce.Room;const oe=te.getRoom();return console.log("🏠 Widget: Room reference updated:",{roomExists:!!oe,roomState:oe==null?void 0:oe.state,sessionStarted:F,currentMode:he}),oe||new ce.Room}catch(oe){return console.error("❌ Error getting room from client:",oe),new ce.Room}},[te,F,he]);P.useEffect(()=>{if(ae){const oe=()=>{console.log("🏠 Widget: Room state changed:",{state:ae.state,numParticipants:ae.numParticipants,isConnected:ae.state==="connected",sessionId:Q==null?void 0:Q.id})},tt=(Fe,Ge,At)=>{console.log("🎵 Widget: Track subscribed:",{trackKind:Fe.kind,trackSource:Fe.source,participantSid:At.sid,participantIdentity:At.identity,sessionId:Q==null?void 0:Q.id})};return ae.on(ce.RoomEvent.Connected,oe),ae.on(ce.RoomEvent.Disconnected,oe),ae.on(ce.RoomEvent.TrackSubscribed,tt),()=>{ae.off(ce.RoomEvent.Connected,oe),ae.off(ce.RoomEvent.Disconnected,oe),ae.off(ce.RoomEvent.TrackSubscribed,tt)}}},[ae,Q==null?void 0:Q.id]),P.useEffect(()=>{!E&&he==="welcome"?console.log("🎬 Widget: Welcome screen ready"):F&&he!=="welcome"&&console.log("🎬 Widget: Session mode active:",he)},[he,E,F]),P.useEffect(()=>{(he==="voice"||he==="video"||he==="chat")&&!Q&&!F&&!E&&te&&!te.connected&&(console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"),G("welcome"),B(!1))},[he,Q,F,E,te]);const{sessionMetrics:ve,sessionLogs:Ne,logEvent:_e}=sg({room:ae,onSessionStart:k,onSessionEnd:v,enableConsoleLogging:_,enableLocalStorage:_,voxketSessionId:Q==null?void 0:Q.id});P.useEffect(()=>{S&&S(Ne)},[Ne,S]),P.useEffect(()=>{C&&ve&&C(ve)},[ve,C]),P.useEffect(()=>{if(!te)return;const oe=()=>{const tt=te.connected,Fe=te.getCurrentSession();console.log("🔗 Connection state changed:",{isConnected:tt,currentSessionId:Fe==null?void 0:Fe.id,currentMode:he,loading:E,sessionStarted:F}),!tt&&F&&!E&&(console.log("🔴 Connection lost during active session - returning to welcome"),B(!1),Y(!1),le(null),G("welcome")),tt&&Fe&&E&&(console.log("🟢 Connected with active session - removing loader"),B(!1),Y(!0),le(Fe))};return te.on("connectionStateChanged",oe),te.on("sessionEnded",()=>{console.log("📞 Session ended - returning to welcome"),B(!1),Y(!1),le(null),G("welcome")}),()=>{te.off("connectionStateChanged",oe),te.off("sessionEnded",()=>{})}},[te,he,E,F]),P.useEffect(()=>{const oe=Fe=>{console.log("🔴 Widget: Room disconnected:",Fe),console.log("🔍 Widget: Current state on disconnect:",{currentMode:he,sessionStarted:F,currentSessionId:Q==null?void 0:Q.id,loading:E}),B(!1),Y(!1),le(null),G("welcome"),console.log("🏠 Widget: Automatically returning to welcome screen after disconnect")},tt=Fe=>{console.log("📹 Media devices error:",Fe)};return ae.on(ce.RoomEvent.MediaDevicesError,tt),ae.on(ce.RoomEvent.Disconnected,oe),()=>{ae.off(ce.RoomEvent.Disconnected,oe),ae.off(ce.RoomEvent.MediaDevicesError,tt)}},[ae,he,F,Q==null?void 0:Q.id,E]);const Ce=async()=>{try{if(!te){console.error("❌ VoxketClient not available"),w(new Error("VoxketClient not initialized")),j(!0);return}B(!0),G("voice"),console.log("🎤 Starting voice session...",{agentId:z,participantName:q}),console.log("🎤 Pre-start state:",{currentMode:"voice",sessionStarted:!1,loading:!0}),_e("USER_STARTED_VOICE_SESSION",{agentId:z,participantName:q});const oe=await te.startSession(z,{participantName:q||"User",modalities:["voice",...m?["video"]:[]]});console.log("✅ Voice session started successfully:",oe.id),le(oe),Y(!0),B(!1),k&&k(oe.id)}catch(oe){console.error("❌ Failed to start voice session:",oe),B(!1),Y(!1),G("welcome")}},bt=async()=>{try{if(!te){console.error("❌ VoxketClient not available"),w(new Error("VoxketClient not initialized")),j(!0);return}B(!0),G("chat"),console.log("💬 Starting chat session...",{agentId:z,participantName:q}),_e("USER_STARTED_CHAT_SESSION",{agentId:z,participantName:q});const oe=await te.startSession(z,{participantName:q||"User",modalities:["chat"]});console.log("✅ Chat session started successfully:",oe.id),le(oe),Y(!0),B(!1),k&&k(oe.id)}catch(oe){console.error("❌ Failed to start chat session:",oe),B(!1),Y(!1),G("welcome")}},vt=async()=>{try{if(!te){console.error("❌ VoxketClient not available"),w(new Error("VoxketClient not initialized")),j(!0);return}B(!0),G("video"),console.log("📺 Starting video session...",{agentId:z,participantName:q}),console.log("📺 Pre-start state:",{currentMode:"video",sessionStarted:!1,loading:!0}),_e("USER_STARTED_VIDEO_SESSION",{agentId:z,participantName:q});const oe=await te.startSession(z,{participantName:q||"User",modalities:["video","voice"]});console.log("✅ Video session started successfully:",oe.id),le(oe),Y(!0),B(!1),k&&k(oe.id)}catch(oe){console.error("❌ Failed to start video session:",oe),B(!1),Y(!1),G("welcome")}},je=()=>{console.log("🔄 Widget: handleBackToWelcome called",{currentMode:he,sessionStarted:F,currentSessionId:Q==null?void 0:Q.id,displayType:N,loading:E}),G("welcome"),B(!1),D&&D(e.displayType||"widget"),Q&&F?(console.log("🧹 Widget: Cleaning up active session"),Y(!1),le(null),te&&(console.log("🔌 Widget: Disconnecting client and cleaning up room"),te.disconnect().catch(oe=>{console.error("❌ Widget: Error during disconnect:",oe)}))):(console.log("📝 Widget: No active session to clean up"),te&&te.connected&&(console.log("🔌 Widget: Force disconnecting client for fresh state"),te.disconnect().catch(oe=>{console.error("❌ Widget: Error during force disconnect:",oe)}))),N==="popup"&&!Se&&Z(!0),console.log("✅ Widget: handleBackToWelcome completed",{newCurrentMode:"welcome",newLoading:!1,newSessionStarted:!1})},ut=()=>{const oe=!Se;Z(oe),R&&R(oe),!oe&&!(Q&&F)&&(G("welcome"),Y(!1),le(null))},L=()=>{console.log("🔄 Closing fullscreen, switching to widget display type"),e.onDisplayTypeChange?e.onDisplayTypeChange("widget"):U("widget")},J=()=>{console.log("🔄 Expand to fullscreen requested"),e.onDisplayTypeChange?e.onDisplayTypeChange("fullscreen"):U("fullscreen")};P.useEffect(()=>{var oe,tt,Fe;if(O&&te){const Ge=te.getCurrentSession();te.connected,Ge&&(console.log("✅ Restoring session state:",Ge.id),le(Ge),Y(!0),B(!1),(oe=Ge.activeModalities)!=null&&oe.includes("chat")?G("chat"):(tt=Ge.activeModalities)!=null&&tt.includes("voice")?G("voice"):(Fe=Ge.activeModalities)!=null&&Fe.includes("video")&&G("video"))}},[O,te]),P.useEffect(()=>()=>{!O&&te&&te.disconnect()},[te,O]);let we=he==="video"?"w-[32rem]":"w-96",Re=he==="video"?"h-[30rem]":"h-[25rem]",$e={};if(d&&(d.startsWith("w-")?we=d:($e.width=d,we="")),f&&(f.startsWith("h-")?Re=f:($e.height=f,Re="")),re==="popup"&&!Se){console.log("🟡 Showing popup trigger button");const oe=h.jsx(LM,{onClick:ut,text:b,position:I,theme:y});return yf.createPortal(oe,typeof document<"u"?document.body:{})}if(ne||!te){const oe=(W==null?void 0:W.message)||"VoxketWidget encountered an error. Please check your configuration.";return h.jsx("div",{className:`voxket-widget-root theme-${y} flex items-center justify-center p-8 ${u||""}`,style:{width:d||"400px",height:f||"500px",border:"1px solid #ff4444",borderRadius:"8px",background:"#fff5f5",color:"#cc0000"},children:h.jsxs("div",{className:"text-center",children:[h.jsx("div",{className:"text-4xl mb-4",children:"⚠️"}),h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Widget Error"}),h.jsx("p",{className:"text-sm mb-4",children:oe}),h.jsx("button",{onClick:()=>{j(!1),w(null),window.location.reload()},className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Retry"})]})})}let _t=`voxket-widget-root theme-${y}`,Ft={scrollMargin:0,scrollPadding:0,contain:"layout style paint"};re==="widget"?(_t+=` flex min-h-fit ${we} ${Re} ${u}`,Ft={...Ft,...$e}):(_t=`${u||""}`,Ft={});const Bt=h.jsx("div",{className:"h-full w-full flex flex-col overflow-hidden relative z-10",children:h.jsxs(Sr,{mode:"wait",children:[he==="welcome"&&!E&&h.jsx(OM,{agentId:z,participantName:q||"",onAgentIdChange:K,onParticipantNameChange:me,onStartCall:Ce,onStartChat:bt,onStartVideo:vt,disabled:F||E,prompts:s,statusMessage:a,title:l,subTitle:c,theme:y,modalities:ye,initial:{opacity:0,y:0},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{duration:.3,ease:"easeInOut"}},"welcome"),E&&(he==="voice"||he==="chat"||he==="video")&&h.jsx(DM,{theme:y,mode:he,loadingText:p,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3,ease:"easeInOut"}},`loading-${he}`),he==="voice"&&!E&&F&&te&&h.jsxs($t.RoomContext.Provider,{value:ae,children:[h.jsx($t.RoomAudioRenderer,{},`audio-${(Q==null?void 0:Q.id)||"no-session"}`),h.jsx($t.StartAudio,{label:"Start Audio"},`start-audio-${(Q==null?void 0:Q.id)||"no-session"}`),h.jsx(RM,{loadingText:p,participantName:q||"User",sessionStarted:F,disabled:!1,theme:y,client:te,displayType:N,onBack:N==="popup"?ut:je,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"voice-session")]}),he==="chat"&&!E&&F&&te&&h.jsx(MM,{client:te,theme:y,displayType:N,onBack:N==="popup"?ut:je,onEndChat:je,disabled:!1,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.3,ease:"easeInOut"}},"chat-view"),he==="video"&&!E&&F&&te&&h.jsxs($t.RoomContext.Provider,{value:ae,children:[h.jsx($t.RoomAudioRenderer,{},`audio-video-${(Q==null?void 0:Q.id)||"no-session"}`),h.jsx($t.StartAudio,{label:"Start Audio"},`start-audio-video-${(Q==null?void 0:Q.id)||"no-session"}`),h.jsx(IM,{client:te,theme:y,displayType:N,onBack:N==="popup"?ut:je,onEndCall:je,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 re==="fullscreen"||re==="popup"?h.jsx(bf,{theme:y,displayType:re,popupPosition:I,onClose:re==="fullscreen"?L:ut,children:Bt}):h.jsx("div",{className:_t,style:Ft,children:h.jsx(bf,{theme:y,displayType:re,popupPosition:I,onExpand:J,children:Bt})})}function oo(e){return h.jsx(Xl,{children:h.jsx(FM,{...e})})}function BM({logs:e,onClear:t,onExport:n}){const[r,i]=A.useState(!1),[o,s]=A.useState(""),a=e.filter(l=>!o||l.event.toLowerCase().includes(o.toLowerCase()));return r?h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-4xl w-full max-h-[80vh] flex flex-col m-4",children:[h.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[h.jsxs("h2",{className:"text-lg font-semibold",children:["Session Logs (",e.length,")"]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("input",{type:"text",placeholder:"Filter events...",value:o,onChange:l=>s(l.target.value),className:"px-3 py-1 border rounded text-sm"}),h.jsx("button",{onClick:t,className:"px-3 py-1 bg-red-600 text-white rounded text-sm hover:bg-red-700",children:"Clear"}),h.jsx("button",{onClick:n,className:"px-3 py-1 bg-green-600 text-white rounded text-sm hover:bg-green-700",children:"Export"}),h.jsx("button",{onClick:()=>i(!1),className:"px-3 py-1 bg-gray-600 text-white rounded text-sm hover:bg-gray-700",children:"Close"})]})]}),h.jsx("div",{className:"flex-1 overflow-auto p-4",children:a.length===0?h.jsx("p",{className:"text-gray-500 text-center py-8",children:"No logs found"}):h.jsx("div",{className:"space-y-2",children:a.map((l,c)=>h.jsxs("div",{className:"border rounded p-3 text-sm",children:[h.jsxs("div",{className:"flex items-center justify-between mb-1",children:[h.jsx("span",{className:"font-semibold text-blue-600",children:l.event}),h.jsx("span",{className:"text-gray-500 text-xs",children:new Date(l.timestamp).toLocaleTimeString()})]}),l.sessionId&&h.jsxs("div",{className:"text-xs text-gray-600 mb-1",children:["Session: ",l.sessionId]}),l.data&&h.jsx("div",{className:"bg-gray-50 p-2 rounded text-xs",children:h.jsx("pre",{className:"whitespace-pre-wrap overflow-auto",children:JSON.stringify(l.data,null,2)})})]},c))})})]})}):h.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 jM({metrics:e}){return e?h.jsxs("div",{className:"bg-gray-100 p-4 rounded-lg",children:[h.jsx("h3",{className:"font-semibold mb-2",children:"Current Session"}),h.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Session ID:"}),h.jsx("div",{className:"font-mono text-xs",children:e.sessionId})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Start Time:"}),h.jsx("div",{children:new Date(e.startTime).toLocaleString()})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Messages:"}),h.jsx("div",{children:e.totalMessages})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Participants:"}),h.jsx("div",{children:e.participantCount})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Connection Issues:"}),h.jsx("div",{children:e.connectionIssues})]}),h.jsxs("div",{children:[h.jsx("span",{className:"text-gray-600",children:"Duration:"}),h.jsxs("div",{children:[Math.round((Date.now()-new Date(e.startTime).getTime())/1e3),"s"]})]})]})]}):null}function er(){const{currentSession:e,sessionState:t,sessionMetrics:n,createSession:r,endSession:i}=hn(),o=A.useCallback(async(a,l)=>await r(a,l),[r]),s=A.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:o,stop:s}}function cg(){const{sessionMetrics:e,currentSession:t}=hn();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 ug(){const{setMicrophoneEnabled:e,client:t}=hn(),[n,r]=A.useState(!1),[i,o]=A.useState(!1),s=A.useCallback(async()=>{if(!i){o(!0);try{const c=!n;await e(c),r(c)}catch(c){console.error("Failed to toggle microphone:",c)}finally{o(!1)}}},[n,i,e]),a=A.useCallback(async()=>{if(!(n||i)){o(!0);try{await e(!0),r(!0)}catch(c){console.error("Failed to enable microphone:",c)}finally{o(!1)}}},[n,i,e]),l=A.useCallback(async()=>{if(!(!n||i)){o(!0);try{await e(!1),r(!1)}catch(c){console.error("Failed to disable microphone:",c)}finally{o(!1)}}},[n,i,e]);return{isEnabled:n,isLoading:i,toggle:s,enable:a,disable:l}}function dg(){const{setCameraEnabled:e}=hn(),[t,n]=A.useState(!1),[r,i]=A.useState(!1),o=A.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]),s=A.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=A.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:o,enable:s,disable:a}}function fg(){const{startScreenShare:e,stopScreenShare:t}=hn(),[n,r]=A.useState(!1),[i,o]=A.useState(!1),s=A.useCallback(async()=>{if(!(n||i)){o(!0);try{await e(),r(!0)}catch(c){console.error("Failed to start screen share:",c)}finally{o(!1)}}},[n,i,e]),a=A.useCallback(async()=>{if(!(!n||i)){o(!0);try{await t(),r(!1)}catch(c){console.error("Failed to stop screen share:",c)}finally{o(!1)}}},[n,i,t]),l=A.useCallback(async()=>{n?await a():await s()},[n,s,a]);return{isSharing:n,isLoading:i,start:s,stop:a,toggle:l}}function $M(){const{client:e}=hn(),[t,n]=A.useState({tracks:[],layout:{type:"grid",showLocalVideo:!0,aspectRatio:"16:9"},isRecording:!1}),r=A.useMemo(()=>t.tracks.find(m=>m.isLocal),[t.tracks]),i=A.useMemo(()=>t.tracks.filter(m=>!m.isLocal),[t.tracks]),o=A.useCallback(async()=>{try{r!=null&&r.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,r]),s=A.useCallback(async()=>{try{t.tracks.find(x=>x.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=A.useCallback(m=>{n(x=>({...x,layout:m}))},[]),l=A.useCallback(m=>{n(x=>({...x,pinnedTrack:m}))},[]),c=A.useCallback(()=>{n(m=>({...m,pinnedTrack:void 0}))},[]),u=A.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]),d=A.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]),f=A.useCallback(m=>t.tracks.find(x=>x.id===m),[t.tracks]),p=A.useCallback(m=>t.tracks.filter(x=>x.participantId===m),[t.tracks]),g=A.useCallback(m=>m.isEnabled&&t.tracks.includes(m),[t.tracks]);return A.useEffect(()=>{if(!e)return;const m=k=>{n(v=>({...v,tracks:[...v.tracks.filter(_=>_.id!==k.id),k]}))},x=k=>{n(v=>{var _;return{...v,tracks:v.tracks.filter(S=>S.id!==k),pinnedTrack:((_=v.pinnedTrack)==null?void 0:_.id)===k?void 0:v.pinnedTrack}})},y=k=>{n(v=>({...v,tracks:v.tracks.map(_=>_.id===k.id?k:_)}))};return e.on("videoTrackAdded",m),e.on("videoTrackRemoved",x),e.on("videoTrackUpdated",y),()=>{e.off("videoTrackAdded",m),e.off("videoTrackRemoved",x),e.off("videoTrackUpdated",y)}},[e]),{tracks:t.tracks,localTrack:r,remoteTraracks:i,pinnedTrack:t.pinnedTrack,layout:t.layout,isRecording:t.isRecording,toggleCamera:o,toggleScreenShare:s,setLayout:a,pinTrack:l,unpinTrack:c,startRecording:u,stopRecording:d,getTrackById:f,getTracksByParticipant:p,isTrackActive:g}}function Ko(){const{chatMessages:e,sendChatMessage:t,currentSession:n}=hn(),[r,i]=A.useState(!1),o=A.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:s,agentMessages:a,allMessages:l}=A.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:s,agentMessages:a,messageCount:l.length,isSending:r,canSend:!!n&&!r,send:o}}function VM(){const{send:e,isSending:t,canSend:n}=Ko(),[r,i]=A.useState(""),o=A.useCallback(async()=>{if(!(!r.trim()||!n))try{await e(r),i("")}catch(a){throw a}},[r,e,n]),s=A.useCallback(a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),o())},[o]);return{value:r,setValue:i,send:o,handleKeyPress:s,isSending:t,canSend:n&&r.trim().length>0}}function ec(){const{isConnected:e,isConnecting:t,connectionError:n,connect:r,disconnect:i}=hn(),o=A.useCallback(async()=>{if(!(e||t))try{await r()}catch(a){throw console.error("Failed to connect:",a),a}},[r,e,t]),s=A.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:o,disconnect:s}}function hg(){const{participants:e}=hn();return{participants:e,count:e.length,localParticipant:e.find(t=>t.isLocal),remoteParticipants:e.filter(t=>!t.isLocal)}}const pg=A.createContext({}),Si=()=>A.useContext(pg);function mg({children:e,...t}){return h.jsx(pg.Provider,{value:t,children:e})}function so({name:e,children:t,fallback:n,className:r}){return h.jsx("div",{className:`voxket-slot voxket-slot--${e} ${r||""}`,children:t||n})}function gg(e,t={}){return Object.assign(e,t)}function bg({showMicrophoneControl:e=!0,showCameraControl:t=!0,showScreenShareControl:n=!0,showSessionActions:r=!0,customControls:i,className:o=""}){const s=er(),a=ug(),l=dg(),c=fg(),u=Si(),d=["voxket-session-controls",`voxket-session-controls--${u.variant||"default"}`,`voxket-session-controls--${u.size||"md"}`,s.isActive?"voxket-session-controls--active":"voxket-session-controls--inactive",o].filter(Boolean).join(" ");return!s.isActive&&!r?h.jsx("div",{className:d,children:h.jsx("div",{className:"voxket-controls-inactive",children:h.jsx("p",{children:"Controls available during active session"})})}):h.jsxs("div",{className:d,children:[r&&h.jsx("div",{className:"voxket-session-actions",children:s.isActive?h.jsx("button",{onClick:s.stop,className:"voxket-button voxket-button--danger",children:"End Session"}):h.jsx(zM,{})}),s.isActive&&h.jsxs("div",{className:"voxket-media-controls",children:[e&&h.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:[h.jsx("span",{className:"voxket-icon",children:"🎤"}),a.isLoading?"Loading...":a.isEnabled?"Mute":"Unmute"]}),t&&h.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:[h.jsx("span",{className:"voxket-icon",children:"📹"}),l.isLoading?"Loading...":l.isEnabled?"Stop Video":"Start Video"]}),n&&h.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:[h.jsx("span",{className:"voxket-icon",children:"🖥️"}),c.isLoading?"Loading...":c.isSharing?"Stop Share":"Share Screen"]})]}),i&&h.jsx("div",{className:"voxket-custom-controls",children:i})]})}function zM(){er();const[e,t]=A.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 h.jsx("button",{onClick:n,disabled:e,className:"voxket-button voxket-button--primary",children:e?"Starting...":"Start Session"})}function tc({showConnectionStatus:e=!0,showSessionInfo:t=!0,showAgentInfo:n=!0,className:r=""}){const i=er(),o=ec(),s=Si(),a=["voxket-session-header",`voxket-session-header--${s.variant||"default"}`,`voxket-session-header--${s.size||"md"}`,r].filter(Boolean).join(" ");return h.jsxs("div",{className:a,children:[e&&h.jsxs("div",{className:"voxket-connection-status",children:[h.jsx("div",{className:`voxket-status-indicator ${o.isConnected?"connected":"disconnected"}`}),h.jsx("span",{className:"voxket-status-text",children:o.isConnecting?"Connecting...":o.isConnected?"Connected":"Disconnected"})]}),t&&i.session&&h.jsxs("div",{className:"voxket-session-info",children:[h.jsxs("div",{className:"voxket-session-id",children:["Session: ",i.session.id.slice(-8)]}),h.jsxs("div",{className:"voxket-session-state",children:["State: ",i.state]})]}),n&&i.session&&h.jsxs("div",{className:"voxket-agent-info",children:[h.jsxs("div",{className:"voxket-agent-id",children:["Agent: ",i.session.agentId]}),h.jsxs("div",{className:"voxket-modalities",children:["Modalities: ",i.session.activeModalities.join(", ")]})]}),o.error&&h.jsxs("div",{className:"voxket-error-message",children:["Error: ",o.error.message]})]})}function nc({showChat:e=!0,showTranscriptions:t=!1,customContent:n,className:r=""}){const i=er(),o=Ko(),s=Si(),a=["voxket-session-content",`voxket-session-content--${s.variant||"default"}`,`voxket-session-content--${s.size||"md"}`,r].filter(Boolean).join(" ");return i.isActive?h.jsx("div",{className:a,children:n||h.jsxs(h.Fragment,{children:[e&&h.jsxs("div",{className:"voxket-chat-container",children:[h.jsxs("div",{className:"voxket-chat-messages",children:[o.messages.map(l=>h.jsxs("div",{className:`voxket-message voxket-message--${l.sender.type}`,children:[h.jsxs("div",{className:"voxket-message-header",children:[h.jsx("span",{className:"voxket-message-sender",children:l.sender.name}),h.jsx("span",{className:"voxket-message-time",children:l.timestamp.toLocaleTimeString()})]}),h.jsx("div",{className:"voxket-message-content",children:l.content})]},l.id)),o.messages.length===0&&h.jsx("div",{className:"voxket-empty-messages",children:h.jsx("p",{children:"No messages yet. Start the conversation!"})})]}),h.jsx(UM,{})]}),t&&h.jsx("div",{className:"voxket-transcriptions",children:h.jsx("div",{className:"voxket-transcription-placeholder",children:h.jsx("p",{children:"Voice transcriptions will appear here"})})})]})}):h.jsx("div",{className:a,children:h.jsx("div",{className:"voxket-inactive-state",children:h.jsxs("div",{className:"voxket-inactive-message",children:[h.jsx("h3",{children:"Start a conversation"}),h.jsx("p",{children:"Begin a session to start chatting with the AI agent"})]})})})}function UM(){const e=Ko(),[t,n]=A.useState(""),r=async()=>{if(!(!t.trim()||!e.canSend))try{await e.send(t),n("")}catch(o){console.error("Failed to send message:",o)}},i=o=>{o.key==="Enter"&&!o.shiftKey&&(o.preventDefault(),r())};return h.jsxs("div",{className:"voxket-chat-input",children:[h.jsx("input",{type:"text",value:t,onChange:o=>n(o.target.value),onKeyPress:i,placeholder:"Type your message...",disabled:!e.canSend,className:"voxket-input"}),h.jsx("button",{onClick:r,disabled:!e.canSend||!t.trim(),className:"voxket-send-button",children:e.isSending?"Sending...":"Send"})]})}function rc({showMetrics:e=!0,showParticipants:t=!0,showStatus:n=!0,customFooter:r,className:i=""}){const o=er(),s=cg(),a=hg(),l=Si(),c=["voxket-session-footer",`voxket-session-footer--${l.variant||"default"}`,`voxket-session-footer--${l.size||"md"}`,i].filter(Boolean).join(" ");return o.isActive?h.jsx("div",{className:c,children:r||h.jsxs(h.Fragment,{children:[n&&h.jsxs("div",{className:"voxket-session-status",children:[h.jsx("div",{className:"voxket-status-indicator voxket-status-indicator--active"}),h.jsx("span",{className:"voxket-status-text",children:"Session Active"})]}),e&&s.metrics&&h.jsxs("div",{className:"voxket-session-metrics",children:[h.jsxs("div",{className:"voxket-metric",children:[h.jsx("span",{className:"voxket-metric-label",children:"Duration:"}),h.jsx("span",{className:"voxket-metric-value",children:HM(s.duration||0)})]}),h.jsxs("div",{className:"voxket-metric",children:[h.jsx("span",{className:"voxket-metric-label",children:"Messages:"}),h.jsx("span",{className:"voxket-metric-value",children:s.metrics.messageCount})]})]}),t&&h.jsxs("div",{className:"voxket-participants-info",children:[h.jsxs("span",{className:"voxket-participants-count",children:[a.count," participant",a.count!==1?"s":""]}),a.remoteParticipants.length>0&&h.jsx("div",{className:"voxket-participant-list",children:a.remoteParticipants.map(u=>h.jsx("span",{className:"voxket-participant-name",children:u.name},u.id))})]})]})}):h.jsx("div",{className:c,children:h.jsx("div",{className:"voxket-footer-inactive",children:h.jsx("span",{className:"voxket-status-text",children:"Ready to start session"})})})}function HM(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 WM({agentId:e,sessionConfig:t,autoStart:n=!1,onSessionStart:r,onSessionEnd:i,variant:o="default",size:s="md",theme:a,className:l="",children:c}){var p;const u=er(),d=ec();A.useEffect(()=>{n&&e&&d.isConnected&&!u.isActive&&u.start(e,t).catch(console.error)},[n,e,d.isConnected,u.isActive]),A.useEffect(()=>{var g;(g=u.session)!=null&&g.id&&r&&r(u.session.id)},[(p=u.session)==null?void 0:p.id,r]),A.useEffect(()=>()=>{u.isActive&&i&&u.stop().then(i).catch(console.error)},[]);const f=["voxket-session",`voxket-session--${o}`,`voxket-session--${s}`,u.isActive?"voxket-session--active":"voxket-session--inactive",l].filter(Boolean).join(" ");return h.jsx(mg,{variant:o,size:s,theme:a,className:l,children:h.jsx("div",{className:f,children:c||h.jsxs(h.Fragment,{children:[h.jsx(so,{name:"header",fallback:h.jsx(tc,{})}),h.jsx(so,{name:"content",fallback:h.jsx(nc,{})}),h.jsx(so,{name:"footer",fallback:h.jsx(rc,{})})]})})})}const yg=gg(WM,{Header:tc,Content:nc,Footer:rc,Controls:bg}),Yn={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)"}},La={...Yn,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)"}},Fa={...Yn,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"}},xg=A.createContext(null),wg=()=>{const e=A.useContext(xg);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e};function GM({theme:e="default",themes:t={},children:n,cssVariables:r=!0,className:i=""}){const[o,s]=A.useState(()=>{const f={default:Yn,dark:La,enterprise:Fa,...t};return typeof e=="string"?f[e]||Yn:e}),[a,l]=A.useState(()=>({default:Yn,dark:La,enterprise:Fa,...t})),c=f=>{if(typeof f=="string"){const p=a[f];p&&s(p)}else s(f)},u=f=>{l(p=>({...p,[f.name]:f}))};A.useEffect(()=>{if(r&&typeof document<"u"){const f=document.documentElement;Object.entries(vg(o)).forEach(([p,g])=>{f.style.setProperty(`--voxket-${p}`,g)})}},[o,r]);const d={theme:o,setTheme:c,themes:a,registerTheme:u};return h.jsx(xg.Provider,{value:d,children:h.jsx("div",{className:`voxket-theme voxket-theme--${o.name} ${i}`,children:n})})}function vg(e){const t={},n=(r,i="")=>{for(const[o,s]of Object.entries(r)){const a=i?`${i}-${o}`:o;typeof s=="object"&&s!==null&&!Array.isArray(s)?n(s,a):t[a]=String(s)}};return n(e),t}function KM(e=Yn,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 qM(e){var n;const{theme:t}=wg();return((n=t.components)==null?void 0:n[e])||{}}const YM=Jl("voice-modality","voice",{onActivate:async e=>{const t=e.config;t.enableTranscription&&ZM(e),t.enableVoiceActivation&&XM(e,t),console.log("Voice modality activated",t)},onDeactivate:async e=>{console.log("Voice modality deactivated")},onMessage:async(e,t)=>{t.type==="audio"&&QM(e,t)}});function ZM(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 XM(e,t){const n=t.silenceThreshold||-50;console.log("Voice activation setup with threshold:",n)}function QM(e,t){console.log("Playing audio response:",t.content)}const JM=Jl("chat-modality","chat",{onActivate:async e=>{const t=e.config;t.enableRichText&&eI(),t.enableFileUpload&&tI(e),t.enableCustomComponents&&nI(),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"?rI(e,t):t.type==="text"&&n.enableRichText&&iI(e,t)}});function eI(e){console.log("Rich text support enabled")}function tI(e){console.log("File upload enabled"),e.on("chat.file.uploaded",t=>{console.log("File uploaded:",t.name)})}function nI(e){console.log("Custom components enabled");const t=new Map;t.set("quick-actions",oI),t.set("form",sI),t.set("card",aI),t.set("chart",lI)}function rI(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 iI(e,t){console.log("Processing rich text message:",t.content)}function oI(e){return{type:"quick-actions",actions:e.actions||[],layout:e.layout||"horizontal"}}function sI(e){return{type:"form",fields:e.fields||[],submitAction:e.submitAction,validation:e.validation}}function aI(e){return{type:"card",title:e.title,content:e.content,actions:e.actions,variant:e.variant||"default"}}function lI(e){return{type:"chart",chartType:e.chartType||"line",data:e.data,options:e.options}}function ao({track:e,participantName:t,showControls:n=!0,showName:r=!0,showMuteIndicator:i=!0,isPinned:o=!1,className:s="",onClick:a,onPin:l,onUnpin:c}){const u=A.useRef(null),[d,f]=A.useState(!1);A.useEffect(()=>{if(!u.current||!e.isEnabled)return;const x=u.current;return x.srcObject=null,()=>{x.srcObject&&(x.srcObject=null)}},[e]);const p=()=>{a==null||a(e)},g=x=>{x.stopPropagation(),o?c==null||c(e):l==null||l(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",o?"voxket-video-tile--pinned":"",e.isEnabled?"":"voxket-video-tile--disabled",d?"voxket-video-tile--hovered":"",s].filter(Boolean).join(" ");return h.jsxs("div",{className:m,onClick:p,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{aspectRatio:e.dimensions?`${e.dimensions.width} / ${e.dimensions.height}`:"16 / 9"},children:[h.jsx("video",{ref:u,className:"voxket-video-element",autoPlay:!0,playsInline:!0,muted:e.isLocal}),!e.isEnabled&&h.jsxs("div",{className:"voxket-video-placeholder",children:[h.jsx("div",{className:"voxket-video-placeholder-icon",children:e.isScreenShare?"🖥️":"📹"}),h.jsx("p",{className:"voxket-video-placeholder-text",children:e.isScreenShare?"Screen sharing paused":"Camera off"})]}),h.jsxs("div",{className:"voxket-video-overlay",children:[r&&t&&h.jsxs("div",{className:"voxket-video-name",children:[t,e.isLocal&&" (You)"]}),i&&!e.isEnabled&&h.jsx("div",{className:"voxket-video-mute-indicator",children:"🔇"}),n&&(d||o)&&h.jsxs("div",{className:"voxket-video-controls",children:[h.jsx("button",{className:`voxket-video-control-btn ${o?"voxket-video-control-btn--active":""}`,onClick:g,title:o?"Unpin video":"Pin video",children:"📌"}),e.isScreenShare&&h.jsx("div",{className:"voxket-video-indicator",children:"🖥️"}),e.source&&h.jsx("div",{className:"voxket-video-source",children:e.source})]})]}),!e.isEnabled&&h.jsx("div",{className:"voxket-video-loading",children:h.jsx("div",{className:"voxket-spinner"})})]})}function cI({tracks:e,layout:t,className:n="",onLayoutChange:r,onTrackClick:i,maxVisibleTracks:o=9,showPagination:s=!0}){const[a,l]=A.useState(0),[c,u]=A.useState(null),d=A.useMemo(()=>{let k=[...e];t.type==="speaker"&&c&&(k=[c,...e.filter(S=>S.id!==c.id)]);const v=a*o,_=v+o;return k.slice(v,_)},[e,t,c,a,o]),f=Math.ceil(e.length/o),p=A.useMemo(()=>{const k=d.length;switch(t.type){case"grid":const v=Math.ceil(Math.sqrt(k)),_=Math.ceil(k/v);return{display:"grid",gridTemplateColumns:`repeat(${v}, 1fr)`,gridTemplateRows:`repeat(${_}, 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)},m=()=>{u(null)},x=k=>{r==null||r({...t,type:k})},y=["voxket-video-grid",`voxket-video-grid--${t.type}`,`voxket-video-grid--${d.length}-tracks`,n].filter(Boolean).join(" ");return e.length===0?h.jsx("div",{className:"voxket-video-grid-empty",children:h.jsxs("div",{className:"voxket-video-grid-empty-content",children:[h.jsx("div",{className:"voxket-video-grid-empty-icon",children:"📹"}),h.jsx("p",{children:"No video tracks available"})]})}):h.jsxs("div",{className:y,children:[h.jsxs("div",{className:"voxket-video-grid-controls",children:[h.jsx("div",{className:"voxket-video-layout-controls",children:["grid","speaker","sidebar","gallery"].map(k=>h.jsx("button",{className:`voxket-layout-btn ${t.type===k?"voxket-layout-btn--active":""}`,onClick:()=>x(k),title:`Switch to ${k} layout`,children:uI(k)},k))}),h.jsxs("div",{className:"voxket-video-count",children:[e.length," participant",e.length!==1?"s":""]})]}),h.jsx("div",{className:"voxket-video-grid-content",style:p,children:t.type==="speaker"&&c?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"voxket-video-speaker-main",children:h.jsx(ao,{track:c,participantName:`Participant ${c.participantId}`,isPinned:!0,onClick:i,onUnpin:m})}),h.jsx("div",{className:"voxket-video-speaker-sidebar",children:d.filter(k=>k.id!==c.id).map(k=>h.jsx(ao,{track:k,participantName:`Participant ${k.participantId}`,showControls:!1,onClick:i,onPin:g},k.id))})]}):d.map(k=>h.jsx(ao,{track:k,participantName:`Participant ${k.participantId}`,isPinned:(c==null?void 0:c.id)===k.id,onClick:i,onPin:g,onUnpin:m},k.id))}),s&&f>1&&h.jsxs("div",{className:"voxket-video-pagination",children:[h.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.max(0,a-1)),disabled:a===0,children:"←"}),h.jsxs("span",{className:"voxket-pagination-info",children:["Page ",a+1," of ",f]}),h.jsx("button",{className:"voxket-pagination-btn",onClick:()=>l(Math.min(f-1,a+1)),disabled:a===f-1,children:"→"})]})]})}function uI(e){switch(e){case"grid":return"⊞";case"speaker":return"🎤";case"sidebar":return"⫸";case"gallery":return"⊡";case"picture-in-picture":return"⧉";default:return"⊞"}}function dI({localTrack:e,onToggleCamera:t,onToggleScreenShare:n,onLayoutChange:r,showLayoutControls:i=!0,showCameraControls:o=!0,showScreenShareControls:s=!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 h.jsxs("div",{className:l,children:[o&&h.jsxs("div",{className:"voxket-video-controls-section",children:[h.jsx("h4",{className:"voxket-video-controls-title",children:"Camera"}),h.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:[h.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isEnabled?"📹":"📷"}),h.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isEnabled?"Camera On":"Camera Off"})]}),(e==null?void 0:e.dimensions)&&h.jsxs("div",{className:"voxket-video-info",children:[e.dimensions.width," × ",e.dimensions.height]})]}),s&&h.jsxs("div",{className:"voxket-video-controls-section",children:[h.jsx("h4",{className:"voxket-video-controls-title",children:"Screen Share"}),h.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:[h.jsx("span",{className:"voxket-control-icon",children:e!=null&&e.isScreenShare?"🛑":"🖥️"}),h.jsx("span",{className:"voxket-control-label",children:e!=null&&e.isScreenShare?"Stop Sharing":"Share Screen"})]})]}),i&&h.jsxs("div",{className:"voxket-video-controls-section",children:[h.jsx("h4",{className:"voxket-video-controls-title",children:"Layout"}),h.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:f})=>h.jsxs("button",{className:"voxket-layout-control-btn",onClick:()=>c(u),title:`Switch to ${f} layout`,children:[h.jsx("span",{className:"voxket-control-icon",children:d}),h.jsx("span",{className:"voxket-control-label",children:f})]},u))})]}),h.jsxs("div",{className:"voxket-video-controls-section",children:[h.jsx("h4",{className:"voxket-video-controls-title",children:"Video Settings"}),h.jsxs("div",{className:"voxket-video-settings",children:[h.jsxs("div",{className:"voxket-setting-group",children:[h.jsx("label",{className:"voxket-setting-label",children:"Quality"}),h.jsxs("select",{className:"voxket-setting-select",children:[h.jsx("option",{value:"high",children:"High (720p)"}),h.jsx("option",{value:"medium",children:"Medium (480p)"}),h.jsx("option",{value:"low",children:"Low (240p)"})]})]}),h.jsxs("div",{className:"voxket-setting-group",children:[h.jsx("label",{className:"voxket-setting-label",children:"Frame Rate"}),h.jsxs("select",{className:"voxket-setting-select",children:[h.jsx("option",{value:"30",children:"30 fps"}),h.jsx("option",{value:"15",children:"15 fps"}),h.jsx("option",{value:"10",children:"10 fps"})]})]}),h.jsxs("div",{className:"voxket-setting-group",children:[h.jsx("label",{className:"voxket-setting-label",children:"Bandwidth"}),h.jsxs("select",{className:"voxket-setting-select",children:[h.jsx("option",{value:"unlimited",children:"Unlimited"}),h.jsx("option",{value:"1000",children:"1 Mbps"}),h.jsx("option",{value:"500",children:"500 Kbps"}),h.jsx("option",{value:"250",children:"250 Kbps"})]})]})]})]}),h.jsxs("div",{className:"voxket-video-controls-section",children:[h.jsx("h4",{className:"voxket-video-controls-title",children:"Statistics"}),h.jsxs("div",{className:"voxket-video-stats",children:[h.jsxs("div",{className:"voxket-stat-item",children:[h.jsx("span",{className:"voxket-stat-label",children:"Resolution:"}),h.jsx("span",{className:"voxket-stat-value",children:e!=null&&e.dimensions?`${e.dimensions.width}×${e.dimensions.height}`:"N/A"})]}),h.jsxs("div",{className:"voxket-stat-item",children:[h.jsx("span",{className:"voxket-stat-label",children:"Source:"}),h.jsx("span",{className:"voxket-stat-value",children:(e==null?void 0:e.source)||"None"})]}),h.jsxs("div",{className:"voxket-stat-item",children:[h.jsx("span",{className:"voxket-stat-label",children:"Status:"}),h.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 Eg=({handler:e,loadData:t,data:n,client:r,addLocalMessage:i})=>{const[o,s]=P.useState(null),[a,l]=P.useState(!0),[c,u]=P.useState(!1),[d]=P.useState(Date.now());P.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 x={title:n.title||"Untitled Assignment",description:n.description||"No description provided",estimated_time_of_completion:n.estimated_time_of_completion||"Unknown"};s(x),console.log("📋 AssignmentView: Assignment loaded from RPC data:",x)}}catch(x){console.error("📋 AssignmentView: Error loading assignment:",x),s({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 f=({message:m,assignment:x})=>{const y=m.toLowerCase().includes("declined"),k=y?"bg-red-50 border-red-200":"bg-green-50 border-green-200",v=y?"text-red-700":"text-green-700",_=y?"❌":"🎉";return h.jsxs("div",{className:`max-w-sm mx-auto ${k} border rounded-lg shadow p-3 flex flex-col items-center`,children:[h.jsx("div",{className:"text-2xl mb-2",children:_}),h.jsx("div",{className:`${v} font-semibold text-sm mb-1`,children:m}),h.jsx("div",{className:"text-xs text-gray-600 text-center mb-1",children:x.title}),h.jsx("div",{className:"text-xs text-gray-500",children:"Thank you for your response!"})]})},p=async()=>{if(!(!o||!e)){u(!0);try{const m={message:"accepted"};console.log("📋 AssignmentView: Assignment accepted:",m),e.didSuccess(m,h.jsx(f,{message:"Assignment accepted!",assignment:o}))}catch(m){console.error("📋 AssignmentView: Error accepting assignment:",m),e.didFail({error:"Failed to accept assignment"})}finally{u(!1)}}},g=async()=>{if(!(!o||!e)){u(!0);try{const m={message:"declined"};console.log("📋 AssignmentView: Assignment declined:",m),e.didSuccess(m,h.jsx(f,{message:"Assignment declined",assignment:o}))}catch(m){console.error("📋 AssignmentView: Error declining assignment:",m),e.didFail({error:"Failed to decline assignment"})}finally{u(!1)}}};return a?h.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:h.jsxs("div",{className:"flex items-center justify-center py-4",children:[h.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"}),h.jsx("span",{className:"ml-2 text-xs text-gray-600",children:"Loading assignment..."})]})}):o?h.jsxs("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg overflow-hidden",children:[h.jsx("div",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white p-3",children:h.jsx("div",{className:"flex items-center justify-between",children:h.jsx("h3",{className:"text-xs font-semibold text-white truncate",children:o.title})})}),h.jsxs("div",{className:"p-3 text-black",children:[h.jsx("div",{className:"bg-gray-50 rounded p-2 mb-3",children:h.jsx("p",{className:"text-xs text-black leading-snug",children:o.description})}),h.jsx("div",{className:"mb-3 text-black",children:h.jsxs("div",{className:"flex items-center text-xs text-gray-600",children:[h.jsx("span",{className:"text-xs mr-1",children:"📅"}),h.jsxs("span",{children:["Est: ",o.estimated_time_of_completion]})]})}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:p,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?h.jsxs("span",{className:"flex items-center justify-center",children:[h.jsx("div",{className:"animate-spin rounded-full h-2 w-2 border-b-2 border-white mr-1"}),h.jsx("span",{className:"text-xs",children:"Processing..."})]}):"Accept"}),h.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"})]})]})]}):h.jsx("div",{className:"max-w-sm mx-auto bg-white rounded-lg shadow-lg p-3",children:h.jsxs("div",{className:"text-center py-4",children:[h.jsx("div",{className:"text-red-600 text-sm font-semibold mb-2",children:"⚠️ Assignment Error"}),h.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Failed to load assignment details."})]})})};function fI(){const[e,t]=P.useState(null),[n,r]=P.useState([]);P.useEffect(()=>{const a=new ki({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",Eg,"embedded");const a=e.getRegisteredRpcMethods();r(a),console.log("✅ Assignment RPC registered successfully")}catch(a){console.error("❌ Failed to register assignment RPC:",a)}},o=async()=>{if(!e)return;const a=({handler:l,timeout:c})=>{const[u,d]=P.useState(""),f=[{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=>{d(m)},g=()=>{const m=f.find(x=>x.id===u);l==null||l.didSuccess({selectedProduct:u,productName:m==null?void 0:m.name,price:m==null?void 0:m.price,timestamp:new Date().toISOString()})};return h.jsxs("div",{className:"p-6 bg-white rounded-lg",children:[h.jsx("h3",{className:"text-xl font-bold mb-4",children:"Choose Your Plan"}),h.jsx("p",{className:"text-gray-600 mb-4",children:"Select the plan that best fits your needs:"}),h.jsx("div",{className:"space-y-3 mb-6",children:f.map(m=>h.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:h.jsxs("div",{className:"flex justify-between items-center",children:[h.jsxs("div",{children:[h.jsx("h4",{className:"font-medium",children:m.name}),h.jsx("p",{className:"text-gray-600 text-sm",children:m.price})]}),h.jsx("div",{className:`w-4 h-4 rounded-full ${u===m.id?"bg-blue-500":"border-2 border-gray-300"}`})]})},m.id))}),h.jsxs("div",{className:"flex justify-end space-x-3",children:[h.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"}),h.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&&h.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)}},s=async()=>{if(!e)return;const a=({handler:l})=>{const[c,u]=P.useState(0),[d,f]=P.useState(""),p=()=>{l==null||l.didSuccess({rating:c,comment:d,timestamp:new Date().toISOString()})};return h.jsxs("div",{className:"p-4 bg-white rounded-lg",children:[h.jsx("h3",{className:"text-lg font-semibold mb-3",children:"How was your experience?"}),h.jsxs("div",{className:"mb-4",children:[h.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Rate your experience:"}),h.jsx("div",{className:"flex space-x-1",children:[1,2,3,4,5].map(g=>h.jsx("button",{onClick:()=>u(g),className:`text-2xl ${g<=c?"text-yellow-400":"text-gray-300"}`,children:"⭐"},g))})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Additional comments:"}),h.jsx("textarea",{value:d,onChange:g=>f(g.target.value),className:"w-full p-2 border border-gray-300 rounded text-sm",rows:3,placeholder:"Tell us more about your experience..."})]}),h.jsxs("div",{className:"flex justify-end space-x-2",children:[h.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"}),h.jsx("button",{onClick:p,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 h.jsxs("div",{className:"p-6",children:[h.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frontend RPC Examples"}),h.jsxs("div",{className:"space-y-4 mb-6",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Register RPC Methods"}),h.jsxs("div",{className:"space-x-2",children:[h.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Register Assignment RPC"}),h.jsx("button",{onClick:o,className:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600",children:"Register Product Recommendation RPC"}),h.jsx("button",{onClick:s,className:"px-4 py-2 bg-purple-500 text-white rounded hover:bg-purple-600",children:"Register Feedback RPC"})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Registered Methods"}),n.length>0?h.jsx("ul",{className:"list-disc list-inside space-y-1",children:n.map(a=>h.jsx("li",{className:"text-gray-700",children:h.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:a})},a))}):h.jsx("p",{className:"text-gray-500",children:"No methods registered yet"})]})]}),h.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[h.jsx("h3",{className:"text-lg font-semibold mb-2",children:"How it works"}),h.jsxs("ol",{className:"list-decimal list-inside space-y-2 text-sm text-gray-700",children:[h.jsxs("li",{children:["Register RPC methods with React components using ",h.jsx("code",{children:"client.registerFrontendRPC()"})]}),h.jsx("li",{children:"When the agent calls an RPC method, the corresponding component will be displayed"}),h.jsx("li",{children:"Users interact with the component, and the response is sent back to the agent"}),h.jsx("li",{children:"Components can be displayed in different modes: embedded, modal, or fullscreen"}),h.jsx("li",{children:"Each component has a timeout and can handle success/failure scenarios"})]})]}),h.jsxs("div",{className:"mt-6 bg-blue-50 p-4 rounded-lg",children:[h.jsx("h3",{className:"text-lg font-semibold mb-2 text-blue-800",children:"Agent Side"}),h.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"On the agent side, you can call these RPC methods like this:"}),h.jsx("pre",{className:"bg-white p-3 rounded text-xs text-gray-800 overflow-x-auto",children:`// Agent calls RPC method
164
160
  const response = await participant.performRpc({
165
161
  method: 'give_assignment',
166
162
  data: JSON.stringify({
@@ -171,4 +167,4 @@ const response = await participant.performRpc({
171
167
  })
172
168
  });
173
169
 
174
- console.log('User response:', response);`})]})]})}const oT={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"}}}};typeof window<"u"&&Promise.resolve().then(()=>require("./index-Dyvby5gX.cjs"));const sT=e=>typeof window>"u"?null:x.createElement(Ha,{children:x.createElement(ui,e)}),aT=e=>{if(typeof window>"u")return console.warn("VoxketClient: Cannot create client in server-side environment"),null;const{VoxketClient:t}=require("./core/client");return new t(e)};exports.AssignmentView=$m;exports.CompoundProvider=Im;exports.InteractiveComponent=Tr;exports.PluginManager=As;exports.RpcExamples=iT;exports.SessionContainer=Dm;exports.SessionContent=Ga;exports.SessionControls=Vm;exports.SessionFooter=Ka;exports.SessionHeader=qa;exports.SessionLogViewer=ME;exports.SessionMetricsComponent=NE;exports.Slot=di;exports.ThemeProvider=OE;exports.VideoControls=rT;exports.VideoGrid=tT;exports.VideoTile=fi;exports.VoxketClient=$r;exports.VoxketErrorBoundary=Ha;exports.VoxketEventEmitter=Ua;exports.VoxketProvider=ci;exports.VoxketSDK=$r;exports.VoxketSessionComponent=Dm;exports.agentRpcExample=oT;exports.analyticsPlugin=bE;exports.chatModalityPlugin=WE;exports.createCustomTheme=$E;exports.createModalityPlugin=Wa;exports.createPlugin=xE;exports.createVoxketClient=aT;exports.darkTheme=js;exports.debugPlugin=vE;exports.default=sT;exports.defaultTheme=xn;exports.enterpriseTheme=Ps;exports.flattenTheme=Om;exports.metricsPlugin=wE;exports.useComponentTheme=_E;exports.useCompoundContext=_r;exports.useSessionLogging=Cm;exports.useTheme=Lm;exports.useVoxket=Dt;exports.useVoxketCamera=jm;exports.useVoxketChat=Zi;exports.useVoxketChatInput=RE;exports.useVoxketConnection=Za;exports.useVoxketMetrics=Tm;exports.useVoxketMicrophone=Am;exports.useVoxketParticipants=Mm;exports.useVoxketScreenShare=Pm;exports.useVoxketSession=kn;exports.useVoxketVideo=IE;exports.voiceModalityPlugin=BE;exports.withCompoundComponent=Rm;
170
+ console.log('User response:', response);`})]})]})}const hI={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"}}}},pI=e=>typeof window>"u"?null:P.createElement(Xl,{children:P.createElement(oo,e)});exports.AssignmentView=Eg;exports.CompoundProvider=mg;exports.InteractiveComponent=li;exports.PluginManager=ag;exports.RpcExamples=fI;exports.SessionContainer=yg;exports.SessionContent=nc;exports.SessionControls=bg;exports.SessionFooter=rc;exports.SessionHeader=tc;exports.SessionLogViewer=BM;exports.SessionMetricsComponent=jM;exports.SessionTimer=ci;exports.Slot=so;exports.ThemeProvider=GM;exports.VideoControls=dI;exports.VideoGrid=cI;exports.VideoTile=ao;exports.VoxketClient=ki;exports.VoxketErrorBoundary=Xl;exports.VoxketEventEmitter=Ql;exports.VoxketProvider=io;exports.VoxketSDK=ki;exports.VoxketSessionComponent=yg;exports.agentRpcExample=hI;exports.analyticsPlugin=_M;exports.chatModalityPlugin=JM;exports.createCustomTheme=KM;exports.createModalityPlugin=Jl;exports.createPlugin=CM;exports.createSessionFixture=No;exports.darkTheme=La;exports.debugPlugin=TM;exports.default=pI;exports.defaultTheme=Yn;exports.enterpriseTheme=Fa;exports.flattenTheme=vg;exports.formatSessionTimer=up;exports.getChatCapabilities=lp;exports.getSessionTimer=Ao;exports.getVideoCapabilities=ap;exports.getVoiceCapabilities=cp;exports.isCapabilityEnabled=lv;exports.metricsPlugin=NM;exports.useComponentTheme=qM;exports.useCompoundContext=Si;exports.useSessionLogging=sg;exports.useTheme=wg;exports.useVoxket=hn;exports.useVoxketCamera=dg;exports.useVoxketChat=Ko;exports.useVoxketChatInput=VM;exports.useVoxketConnection=ec;exports.useVoxketMetrics=cg;exports.useVoxketMicrophone=ug;exports.useVoxketParticipants=hg;exports.useVoxketScreenShare=fg;exports.useVoxketSession=er;exports.useVoxketVideo=$M;exports.voiceModalityPlugin=YM;exports.withCompoundComponent=gg;