@moveo-ai/web-client 0.108.0 → 0.109.0

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.
Files changed (44) hide show
  1. package/README.md +164 -69
  2. package/dist/63.min.js +2 -0
  3. package/dist/{329.min.js.LICENSE.txt → 63.min.js.LICENSE.txt} +1 -1
  4. package/dist/752.min.js +2 -0
  5. package/dist/{147.min.js.LICENSE.txt → 752.min.js.LICENSE.txt} +1 -1
  6. package/dist/882.min.js +1 -1
  7. package/dist/882.min.js.LICENSE.txt +1 -1
  8. package/dist/929.min.js +1 -1
  9. package/dist/929.min.js.LICENSE.txt +1 -1
  10. package/dist/audio-client.min.js +1 -1
  11. package/dist/audio-client.min.js.LICENSE.txt +20 -10
  12. package/dist/iframe.min.js +1 -1
  13. package/dist/iframe.min.js.LICENSE.txt +24 -27
  14. package/dist/index.html +1 -7
  15. package/dist/preview/index.html +16 -14
  16. package/dist/preview-telnyx/index.html +79 -0
  17. package/dist/preview.css.min.js +1 -1
  18. package/dist/preview.css.min.js.LICENSE.txt +1 -1
  19. package/dist/telnyx-client.min.js +1 -1
  20. package/dist/telnyx-client.min.js.LICENSE.txt +20 -10
  21. package/dist/web-client.min.js +1 -1
  22. package/dist/web-client.min.js.LICENSE.txt +1 -1
  23. package/dist/webrtc-client.min.js +1 -1
  24. package/dist/webrtc-client.min.js.LICENSE.txt +20 -10
  25. package/package.json +108 -99
  26. package/web-client.d.ts +152 -0
  27. package/dist/147.min.js +0 -2
  28. package/dist/147.min.js.map +0 -1
  29. package/dist/329.min.js +0 -2
  30. package/dist/329.min.js.map +0 -1
  31. package/dist/882.min.js.map +0 -1
  32. package/dist/929.min.js.map +0 -1
  33. package/dist/954.min.js +0 -2
  34. package/dist/954.min.js.LICENSE.txt +0 -6
  35. package/dist/954.min.js.map +0 -1
  36. package/dist/audio-client.min.js.map +0 -1
  37. package/dist/iframe.min.js.map +0 -1
  38. package/dist/iframe.v2.min.js +0 -2
  39. package/dist/iframe.v2.min.js.LICENSE.txt +0 -63
  40. package/dist/iframe.v2.min.js.map +0 -1
  41. package/dist/preview.css.min.js.map +0 -1
  42. package/dist/telnyx-client.min.js.map +0 -1
  43. package/dist/web-client.min.js.map +0 -1
  44. package/dist/webrtc-client.min.js.map +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see telnyx-client.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoTelnyx",[],t):"object"==typeof exports?exports.MoveoTelnyx=t():e.MoveoTelnyx=t()}(this,function(){return function(){var e={4511:function(e,t,r){"use strict";var n=r(5516),o=r.n(n),i=r(1364),a=r.n(i)()(o());a.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap);"]),a.push([e.id,'/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--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-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--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-900:oklch(37.9% .146 265.522);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-200:oklch(92.8% .006 264.531);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-normal:0em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:Inter, system-ui, -apple-system, sans-serif}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-\\[-4px\\]{inset:-4px}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-3{top:calc(var(--spacing) * -3)}.-top-14{top:calc(var(--spacing) * -14)}.-top-\\[28px\\]{top:-28px}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-\\[50\\%\\]{top:50%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-auto{right:auto}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\\[calc\\(100\\%\\+40px\\)\\]{bottom:calc(100% + 40px)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-1100{z-index:1100}.clear-both{clear:both}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.m-2{margin:calc(var(--spacing) * 2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-5{margin-inline:calc(var(--spacing) * 5)}.mx-8{margin-inline:calc(var(--spacing) * 8)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\\[var\\(--moveo-new-header-height\\)\\]{margin-top:var(--moveo-new-header-height)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing) * 0)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-9{margin-bottom:calc(var(--spacing) * 9)}.mb-20{margin-bottom:calc(var(--spacing) * 20)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-full{width:100%;height:100%}.h-\\(--moveo-chat-height\\){height:var(--moveo-chat-height)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-40{height:calc(var(--spacing) * 40)}.h-45{height:calc(var(--spacing) * 45)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[18px\\]{height:18px}.h-\\[28px\\]{height:28px}.h-\\[42px\\]{height:42px}.h-\\[44px\\]{height:44px}.h-\\[72px\\]{height:72px}.h-\\[78vh\\]{height:78vh}.h-\\[82px\\]{height:82px}.h-\\[222px\\]{height:222px}.h-\\[254px\\]{height:254px}.h-\\[282px\\]{height:282px}.h-\\[386px\\]{height:386px}.h-\\[calc\\(100\\%-44px\\)\\]{height:calc(100% - 44px)}.h-\\[var\\(--moveo-chat-height\\)\\]{height:var(--moveo-chat-height)}.h-\\[var\\(--moveo-modal-tall-height\\)\\]{height:var(--moveo-modal-tall-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-18{max-height:calc(var(--spacing) * 18)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[88px\\]{max-height:88px}.max-h-\\[400px\\]{max-height:400px}.max-h-\\[calc\\(100\\%-68px\\)\\]{max-height:calc(100% - 68px)}.max-h-\\[calc\\(100vh-16px\\)\\]{max-height:calc(100vh - 16px)}.max-h-\\[calc\\(100vh-80px\\)\\]{max-height:calc(100vh - 80px)}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\\[calc\\(100\\%-44px\\)\\]{min-height:calc(100% - 44px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\\(--moveo-expanded-chat-width\\){width:var(--moveo-expanded-chat-width)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3xs{width:var(--container-3xs)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-72{width:calc(var(--spacing) * 72)}.w-\\[2px\\]{width:2px}.w-\\[18px\\]{width:18px}.w-\\[28px\\]{width:28px}.w-\\[42px\\]{width:42px}.w-\\[328px\\]{width:328px}.w-\\[calc\\(100\\%\\+48px\\)\\]{width:calc(100% + 48px)}.w-\\[calc\\(100\\%-24px\\)\\]{width:calc(100% - 24px)}.w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.w-\\[var\\(--moveo-chat-width\\)\\]{width:var(--moveo-chat-width)}.w-\\[var\\(--moveo-expanded-chat-width\\)\\]{width:var(--moveo-expanded-chat-width)}.w-\\[var\\(--moveo-modal-tall-width\\)\\]{width:var(--moveo-modal-tall-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-sm{width:var(--container-sm)}.w-xs{width:var(--container-xs)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-18{max-width:calc(var(--spacing) * 18)}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[200px\\]{max-width:200px}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[260px\\]{min-width:260px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\\[130px\\]{flex-basis:130px}.basis-\\[336px\\]{flex-basis:336px}.basis-\\[400px\\]{flex-basis:400px}.basis-full{flex-basis:100%}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-6{--tw-translate-x:calc(var(--spacing) * -6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-12{--tw-translate-x:calc(var(--spacing) * -12);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-0\\.5{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[fadeIn_0\\.3s_forwards\\]{animation:.3s forwards fadeIn}.animate-\\[slide-in-up_0\\.2s_ease-out\\]{animation:.2s ease-out slide-in-up}.animate-\\[typing_1\\.2s_ease-in-out_infinite\\]{animation:1.2s ease-in-out infinite typing}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[36px_16px_36px\\]{grid-template-columns:36px 16px 36px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-12{gap:calc(var(--spacing) * 12)}.gap-\\[2px\\]{gap:2px}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-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)))}: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)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\(--moveo-border-radius-base\\){border-radius:var(--moveo-border-radius-base)}.rounded-\\(--moveo-new-border-radius-base\\){border-radius:var(--moveo-new-border-radius-base)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--moveo-border-radius-base\\)\\]{border-radius:var(--moveo-border-radius-base)}.rounded-\\[var\\(--moveo-new-border-radius-base\\)\\]{border-radius:var(--moveo-new-border-radius-base)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200\\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab, red, red)){.border-emerald-200\\/60{border-color:color-mix(in oklab, var(--color-emerald-200) 60%, transparent)}}.border-emerald-500\\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/20{border-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-rose-200\\/60{border-color:#ffccd399}@supports (color:color-mix(in lab, red, red)){.border-rose-200\\/60{border-color:color-mix(in oklab, var(--color-rose-200) 60%, transparent)}}.border-sky-200\\/60{border-color:#b8e6fe99}@supports (color:color-mix(in lab, red, red)){.border-sky-200\\/60{border-color:color-mix(in oklab, var(--color-sky-200) 60%, transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-rose-400\\/60{border-top-color:#ff667f99}@supports (color:color-mix(in lab, red, red)){.border-t-rose-400\\/60{border-top-color:color-mix(in oklab, var(--color-rose-400) 60%, transparent)}}.border-t-sky-400\\/60{border-top-color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-400\\/60{border-top-color:color-mix(in oklab, var(--color-sky-400) 60%, transparent)}}.border-t-sky-500\\/60{border-top-color:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-500\\/60{border-top-color:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-r-rose-300\\/30{border-right-color:#ffa2ae4d}@supports (color:color-mix(in lab, red, red)){.border-r-rose-300\\/30{border-right-color:color-mix(in oklab, var(--color-rose-300) 30%, transparent)}}.border-r-sky-300\\/30{border-right-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-300\\/30{border-right-color:color-mix(in oklab, var(--color-sky-300) 30%, transparent)}}.border-r-sky-400\\/30{border-right-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-400\\/30{border-right-color:color-mix(in oklab, var(--color-sky-400) 30%, transparent)}}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){background-color:var(--color-launcher-background,var(--color-accent))}.bg-\\(--color-opening-message-background\\,var\\(--color-accent\\)\\){background-color:var(--color-opening-message-background,var(--color-accent))}.bg-\\(--color-rating-background\\){background-color:var(--color-rating-background)}.bg-\\[var\\(--background\\)\\]{background-color:var(--background)}.bg-\\[var\\(--moveo-header-background\\)\\]{background-color:var(--moveo-header-background)}.bg-\\[var\\(--moveo-header-background\\,var\\(--color-accent\\)\\)\\]{background-color:var(--moveo-header-background,var(--color-accent))}.bg-\\[var\\(--nbg-bg\\)\\]{background-color:var(--nbg-bg)}.bg-\\[var\\(--text-03\\)\\]{background-color:var(--text-03)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\\/90{background-color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\\/90{background-color:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-emerald-50\\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/80{background-color:color-mix(in oklab, var(--color-emerald-50) 80%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-50\\/80{background-color:#fff1f2cc}@supports (color:color-mix(in lab, red, red)){.bg-rose-50\\/80{background-color:color-mix(in oklab, var(--color-rose-50) 80%, transparent)}}.bg-sky-50\\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab, red, red)){.bg-sky-50\\/80{background-color:color-mix(in oklab, var(--color-sky-50) 80%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-transparent{background-color:#0000}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-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))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-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))}.to-white{--tw-gradient-to: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))}.bg-contain{background-size:contain}.bg-right{background-position:100%}.bg-no-repeat{background-repeat:no-repeat}.fill-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){fill:var(--color-launcher-background,var(--color-accent))}.fill-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){fill:var(--color-launcher-foreground,var(--color-background))}.fill-sky-600{fill:var(--color-sky-600)}.fill-white{fill:var(--color-white)}.stroke-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){stroke:var(--color-launcher-foreground,var(--color-background))}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\\[var\\(--moveo-new-header-height\\)\\]{padding-top:var(--moveo-new-header-height)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-14{padding-bottom:calc(var(--spacing) * 14)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pb-\\[40px\\]{padding-bottom:40px}.pl-0{padding-left:calc(var(--spacing) * 0)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.text-\\[10px\\]{font-size:10px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-8{--tw-leading:calc(var(--spacing) * 8);line-height:calc(var(--spacing) * 8)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.25em\\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words,.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){color:var(--color-launcher-foreground,var(--color-background))}.text-\\(--color-link\\){color:var(--color-link)}.text-\\(--color-opening-message-foreground\\,var\\(--color-text-primary-foreground\\)\\){color:var(--color-opening-message-foreground,var(--color-text-primary-foreground))}.text-\\(--color-send-icon\\){color:var(--color-send-icon)}.text-\\[var\\(--color-link\\)\\]{color:var(--color-link)}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-accent\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-accent))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-element-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-element-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-text-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,white\\)\\]{color:var(--moveo-header-text-color,white)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-current{color:currentColor}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(14\\,165\\,233\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0ea5e91f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(16\\,185\\,129\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(244\\,63\\,94\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#f43f5e1f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(16\\,185\\,129\\,0\\.25\\)\\]{--tw-shadow:0 4px 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[var\\(--moveo-shadow-bubble\\)\\]{--tw-shadow:var(--moveo-shadow-bubble);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.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)}.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)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--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)}.shadow-amber-200\\/70{--tw-shadow-color:#fee685b3}@supports (color:color-mix(in lab, red, red)){.shadow-amber-200\\/70{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-200) 70%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);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-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);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-blur-md{--tw-backdrop-blur:blur(var(--blur-md));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-saturate-150{--tw-backdrop-saturate:saturate(150%);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,)}.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,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-500{transition-delay:.5s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.\\[animation-delay\\:0\\.2s\\]{animation-delay:.2s}.\\[animation-delay\\:0\\.4s\\]{animation-delay:.4s}.\\[animation-delay\\:0s\\]{animation-delay:0s}.\\[animation-fill-mode\\:forwards\\]{animation-fill-mode:forwards}.\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]{scrollbar-color:#00000026 transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}@media (hover:hover){.group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}@media (hover:hover){.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)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.05\\]:hover{scale:1.05}.hover\\:border-red-500\\/20:hover{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\\:border-red-500\\/20:hover{border-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.hover\\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab, var(--color-gray-700) 50%, transparent)}}.hover\\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:bg-gradient-to-br:hover{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\\:from-red-500:hover{--tw-gradient-from:var(--color-red-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))}.hover\\:to-red-600:hover{--tw-gradient-to:var(--color-red-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))}.hover\\:text-\\[var\\(--color-accent\\)\\]:hover{color:var(--color-accent)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_6px_20px_rgba\\(16\\,185\\,129\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#10b98159);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-lg:hover{--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)}.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)}.hover\\:shadow-sm:hover{--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)}.hover\\:brightness-\\[0\\.92\\]:hover{--tw-brightness:brightness(.92);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,)}.hover\\:backdrop-blur-sm:hover{--tw-backdrop-blur:blur(var(--blur-sm));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,)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[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)}.focus-visible\\:ring-amber-400:focus-visible{--tw-ring-color:var(--color-amber-400)}.focus-visible\\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-sky-400)}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--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)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.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)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-sm[data-placeholder]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\\[placeholder\\]\\:leading-5[data-placeholder]{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.data-\\[placeholder\\]\\:font-normal[data-placeholder]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.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)}.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)}.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)}.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)}: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}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}.sm\\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (min-width:48rem){.md\\:max-h-\\[70vh\\]{max-height:70vh}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:items-start{align-items:flex-start}.md\\:px-12{padding-inline:calc(var(--spacing) * 12)}.md\\:pb-16{padding-bottom:calc(var(--spacing) * 16)}.md\\:text-left{text-align:left}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\\:gap-16{gap:calc(var(--spacing) * 16)}}.dark\\:border-emerald-500\\/30:is(.dark *){border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-emerald-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.dark\\:border-rose-500\\/30:is(.dark *){border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-rose-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.dark\\:border-sky-500\\/30:is(.dark *){border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-sky-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:border-slate-700\\/50:is(.dark *){border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:border-slate-700\\/50:is(.dark *){border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-amber-500\\/15:is(.dark *){background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.dark\\:bg-amber-500\\/20:is(.dark *){background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.dark\\:bg-rose-500\\/15:is(.dark *){background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.dark\\:bg-sky-500\\/15:is(.dark *){background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.dark\\:bg-sky-500\\/20:is(.dark *){background-color:#00a5ef33}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 20%, transparent)}}.dark\\:bg-slate-700\\/50:is(.dark *){background-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-700\\/50:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-slate-900\\/80:is(.dark *){background-color:#0f172bcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/80:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-900) 80%, transparent)}}.dark\\:from-emerald-600:is(.dark *){--tw-gradient-from:var(--color-emerald-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))}.dark\\:to-emerald-700:is(.dark *){--tw-gradient-to:var(--color-emerald-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))}.dark\\:to-slate-950:is(.dark *){--tw-gradient-to:var(--color-slate-950);--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))}.dark\\:fill-sky-300:is(.dark *){fill:var(--color-sky-300)}.dark\\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\\:text-slate-100:is(.dark *){color:var(--color-slate-100)}.dark\\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:is(.dark *){color:var(--color-slate-300)}.dark\\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\\:shadow-xl:is(.dark *){--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)}.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:#0206184d}@supports (color:color-mix(in lab, red, red)){.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-950) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}@media (hover:hover){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:hover\\:bg-slate-700:is(.dark *):hover{background-color:var(--color-slate-700)}.dark\\:hover\\:from-red-600:is(.dark *):hover{--tw-gradient-from:var(--color-red-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))}.dark\\:hover\\:to-red-700:is(.dark *):hover{--tw-gradient-to:var(--color-red-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))}}.dark\\:focus-visible\\:ring-offset-slate-950:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\:hover\\]\\:underline a:hover{text-decoration-line:underline}.\\[\\&_a\\>\\*\\]\\:pointer-events-none a>*{pointer-events:none}.\\[\\&_p\\]\\:max-w-md p{max-width:var(--container-md)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&_svg\\]\\:h-6 svg{height:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:w-6 svg{width:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:flex-shrink-0 svg,.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}\n',"",{version:3,sources:["webpack://./src/audio.css"],names:[],mappings:"AAAA,gEAAgE,CAC2B,kBAAkB,kIAAoI,4BAA4B,kBAAkB,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,+BAA+B,CAAC,8BAA8B,CAAC,8BAA8B,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,wBAAwB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,+BAA+B,CAAC,4BAA4B,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,6BAA6B,CAAC,gCAAgC,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,2BAA2B,CAAC,iCAAiC,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,gCAAgC,CAAC,8BAA8B,CAAC,+BAA+B,CAAC,gCAAgC,CAAC,4BAA4B,CAAC,6BAA6B,CAAC,8BAA8B,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,YAAY,8GAA8G,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,4CAA4C,CAAC,4CAA4C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,2CAA2C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,6CAA6C,CAAC,uCAAuC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,wCAAwC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,uCAAuC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,4CAA4C,CAAC,wCAAwC,CAAC,uCAAuC,CAAC,yCAAyC,CAAC,uCAAuC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,0CAA0C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,2CAA2C,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,yCAAyC,CAAC,0CAA0C,CAAC,0CAA0C,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,oCAAoC,CAAC,iBAAiB,CAAC,wCAAwC,CAAC,gBAAgB,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,yCAAyC,CAAC,iBAAiB,CAAC,wCAAwC,CAAC,iBAAiB,CAAC,qCAAqC,CAAC,kBAAkB,CAAC,wCAAwC,CAAC,eAAe,CAAC,yBAAyB,CAAC,wBAAwB,CAAC,wBAAwB,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,oCAAoC,CAAC,wCAAwC,CAAC,sCAAsC,CAAC,aAAa,CAAC,cAAc,CAAC,kCAAkC,CAAC,+DAA+D,CAAC,iEAAiE,CAAC,CAAC,iBAAiB,qBAAqB,mBAAmB,CAAC,qBAAqB,mBAAmB,CAAC,WAAW,iBAAiB,CAAC,SAAS,kBAAkB,CAAC,SAAS,oBAAoB,CAAC,kBAAkB,CAAC,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC,eAAe,CAAC,UAAU,iBAAiB,CAAC,OAAO,cAAc,CAAC,UAAU,iBAAiB,CAAC,QAAQ,eAAe,CAAC,QAAQ,eAAe,CAAC,SAAS,8BAA8B,CAAC,gBAAgB,UAAU,CAAC,WAAW,qCAAqC,CAAC,OAAO,iCAAiC,CAAC,KAAK,+BAA+B,CAAC,QAAQ,6BAA6B,CAAC,SAAS,8BAA8B,CAAC,eAAe,SAAS,CAAC,OAAO,4BAA4B,CAAC,UAAU,OAAO,CAAC,OAAO,4BAA4B,CAAC,cAAc,OAAO,CAAC,aAAa,gCAAgC,CAAC,UAAU,+BAA+B,CAAC,SAAS,8BAA8B,CAAC,SAAS,8BAA8B,CAAC,SAAS,8BAA8B,CAAC,YAAY,UAAU,CAAC,WAAW,gCAAgC,CAAC,UAAU,+BAA+B,CAAC,UAAU,+BAA+B,CAAC,UAAU,+BAA+B,CAAC,UAAU,+BAA+B,CAAC,WAAW,gCAAgC,CAAC,gCAAgC,wBAAwB,CAAC,aAAa,WAAW,CAAC,SAAS,8BAA8B,CAAC,QAAQ,6BAA6B,CAAC,WAAW,QAAQ,CAAC,QAAQ,6BAA6B,CAAC,QAAQ,6BAA6B,CAAC,eAAe,QAAQ,CAAC,KAAK,SAAS,CAAC,KAAK,SAAS,CAAC,MAAM,UAAU,CAAC,MAAM,UAAU,CAAC,MAAM,UAAU,CAAC,QAAQ,YAAY,CAAC,YAAY,UAAU,CAAC,WAAW,UAAU,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,yBAAyB,WAAW,eAAe,CAAC,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,OAAO,uCAAuC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,SAAS,kBAAkB,CAAC,MAAM,qCAAqC,CAAC,OAAO,oCAAoC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,SAAS,qCAAqC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,MAAM,mCAAmC,CAAC,yCAAyC,yCAAyC,CAAC,SAAS,eAAe,CAAC,MAAM,qCAAqC,CAAC,SAAS,iBAAiB,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,SAAS,wCAAwC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,OAAO,uCAAuC,CAAC,OAAO,qCAAqC,CAAC,OAAO,qCAAqC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,SAAS,gBAAgB,CAAC,YAAY,qBAAqB,CAAC,aAAa,sBAAsB,CAAC,cAAc,oBAAoB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,eAAe,CAAC,OAAO,aAAa,CAAC,UAAU,gBAAgB,CAAC,MAAM,YAAY,CAAC,MAAM,YAAY,CAAC,QAAQ,YAAY,CAAC,QAAQ,cAAc,CAAC,cAAc,oBAAoB,CAAC,aAAa,mBAAmB,CAAC,OAAO,aAAa,CAAC,WAAW,gCAAgC,CAAC,iCAAiC,CAAC,QAAQ,8BAA8B,CAAC,+BAA+B,CAAC,QAAQ,8BAA8B,CAAC,+BAA+B,CAAC,WAAW,UAAU,CAAC,WAAW,CAAC,2BAA2B,+BAA+B,CAAC,QAAQ,iCAAiC,CAAC,QAAQ,iCAAiC,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,KAAK,+BAA+B,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,MAAM,gCAAgC,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,YAAY,WAAW,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,aAAa,YAAY,CAAC,0BAA0B,wBAAwB,CAAC,kCAAkC,+BAA+B,CAAC,wCAAwC,qCAAqC,CAAC,4CAA4C,yCAAyC,CAAC,QAAQ,WAAW,CAAC,OAAO,uBAAiB,CAAjB,kBAAkB,CAAC,QAAQ,WAAW,CAAC,MAAM,UAAU,CAAC,mDAAmD,uDAAuD,CAAC,UAAU,oCAAoC,CAAC,UAAU,oCAAoC,CAAC,UAAU,oCAAoC,CAAC,gBAAgB,eAAe,CAAC,gBAAgB,eAAe,CAAC,iBAAiB,gBAAgB,CAAC,8BAA8B,4BAA4B,CAAC,8BAA8B,6BAA6B,CAAC,8BAA8B,6BAA6B,CAAC,YAAY,eAAe,CAAC,cAAc,gBAAgB,CAAC,SAAS,mCAAmC,CAAC,SAAS,mCAAmC,CAAC,UAAU,oCAAoC,CAAC,8BAA8B,4BAA4B,CAAC,YAAY,eAAe,CAAC,cAAc,gBAAgB,CAAC,mCAAmC,sCAAsC,CAAC,QAAQ,gCAAgC,CAAC,QAAQ,gCAAgC,CAAC,KAAK,8BAA8B,CAAC,OAAO,0BAA0B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,KAAK,8BAA8B,CAAC,MAAM,+BAA+B,CAAC,MAAM,+BAA+B,CAAC,MAAM,+BAA+B,CAAC,MAAM,+BAA+B,CAAC,MAAM,+BAA+B,CAAC,WAAW,SAAS,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,aAAa,WAAW,CAAC,2BAA2B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,0BAA0B,uBAAuB,CAAC,iCAAiC,6BAA6B,CAAC,0CAA0C,sCAAsC,CAAC,uCAAuC,mCAAmC,CAAC,QAAQ,UAAU,CAAC,OAAO,sBAAgB,CAAhB,iBAAiB,CAAC,QAAQ,UAAU,CAAC,OAAO,sBAAgB,CAAhB,iBAAiB,CAAC,MAAM,yBAAyB,CAAC,MAAM,yBAAyB,CAAC,WAAW,8BAA8B,CAAC,WAAW,8BAA8B,CAAC,UAAU,mCAAmC,CAAC,iBAAiB,eAAe,CAAC,iBAAiB,eAAe,CAAC,WAAW,0BAAoB,CAApB,qBAAqB,CAAC,YAAY,cAAc,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,UAAU,6BAA6B,CAAC,SAAS,kCAAkC,CAAC,SAAS,kCAAkC,CAAC,UAAU,mCAAmC,CAAC,gBAAgB,cAAc,CAAC,iBAAiB,eAAe,CAAC,iBAAiB,eAAe,CAAC,+CAA+C,2CAA2C,CAAC,YAAY,cAAc,CAAC,WAAW,0BAAoB,CAApB,qBAAqB,CAAC,QAAQ,MAAM,CAAC,eAAe,aAAa,CAAC,QAAQ,aAAa,CAAC,UAAU,aAAa,CAAC,iBAAiB,WAAW,CAAC,QAAQ,WAAW,CAAC,iBAAiB,gBAAgB,CAAC,iBAAiB,gBAAgB,CAAC,iBAAiB,gBAAgB,CAAC,YAAY,eAAe,CAAC,qDAAqD,8DAA8D,CAAC,oDAAoD,6DAA6D,CAAC,eAAe,oBAAoB,CAAC,mBAAmB,8CAA8C,CAAC,qDAAqD,CAAC,gBAAgB,0CAA0C,CAAC,qDAAqD,CAAC,iBAAiB,2CAA2C,CAAC,qDAAqD,CAAC,eAAe,yCAAyC,CAAC,qDAAqD,CAAC,uBAAuB,qBAAqB,CAAC,qDAAqD,CAAC,mBAAmB,2CAA2C,CAAC,qDAAqD,CAAC,mBAAmB,8CAA8C,CAAC,qDAAqD,CAAC,eAAe,yCAAyC,CAAC,qDAAqD,CAAC,eAAe,yCAAyC,CAAC,qDAAqD,CAAC,eAAe,yCAAyC,CAAC,qDAAqD,CAAC,uBAAuB,qBAAqB,CAAC,qDAAqD,CAAC,WAAW,yGAAyG,CAAC,mCAAmC,6BAA6B,CAAC,wCAAwC,kCAAkC,CAAC,+CAA+C,0CAA0C,CAAC,cAAc,6BAA6B,CAAC,gBAAgB,cAAc,CAAC,gBAAgB,cAAc,CAAC,YAAY,iBAAiB,CAAC,QAAQ,WAAW,CAAC,aAAa,4CAA4C,CAAC,WAAW,oBAAoB,CAAC,iBAAiB,uBAAc,CAAd,oBAAc,CAAd,eAAe,CAAC,aAAa,6CAA6C,CAAC,aAAa,6CAA6C,CAAC,8BAA8B,oCAAoC,CAAC,UAAU,qBAAqB,CAAC,kBAAkB,6BAA6B,CAAC,WAAW,cAAc,CAAC,cAAc,kBAAkB,CAAC,WAAW,oBAAoB,CAAC,aAAa,sBAAsB,CAAC,eAAe,mBAAmB,CAAC,iBAAiB,6BAA6B,CAAC,gBAAgB,sBAAsB,CAAC,aAAa,wBAAwB,CAAC,OAAO,4BAA4B,CAAC,OAAO,4BAA4B,CAAC,UAAU,8BAA8B,CAAC,OAAO,4BAA4B,CAAC,OAAO,4BAA4B,CAAC,OAAO,4BAA4B,CAAC,QAAQ,6BAA6B,CAAC,aAAa,OAAO,CAAC,qCAAqC,sBAAsB,CAAC,6EAA6E,CAAC,qFAAqF,CAAC,qCAAqC,sBAAsB,CAAC,6EAA6E,CAAC,qFAAqF,CAAC,qCAAqC,sBAAsB,CAAC,8EAA8E,CAAC,sFAAsF,CAAC,YAAY,qBAAqB,CAAC,UAAU,sBAAsB,CAAC,kBAAkB,CAAC,eAAe,CAAC,eAAe,aAAa,CAAC,iBAAiB,eAAe,CAAC,mBAAmB,iBAAiB,CAAC,iBAAiB,eAAe,CAAC,SAAS,oBAAoB,CAAC,wCAAwC,6CAA6C,CAAC,4CAA4C,iDAAiD,CAAC,aAAa,+BAA+B,CAAC,iBAAiB,iBAAiB,CAAC,qBAAqB,qBAAqB,CAAC,+CAA+C,6CAA6C,CAAC,mDAAmD,iDAAiD,CAAC,cAAc,0BAA0B,CAAC,YAAY,8BAA8B,CAAC,YAAY,8BAA8B,CAAC,cAAc,eAAe,CAAC,YAAY,8BAA8B,CAAC,YAAY,8BAA8B,CAAC,cAAc,uCAAuC,CAAC,wCAAwC,CAAC,cAAc,uCAAuC,CAAC,0CAA0C,CAAC,cAAc,wCAAwC,CAAC,2CAA2C,CAAC,QAAQ,mCAAmC,CAAC,gBAAgB,CAAC,UAAU,mCAAmC,CAAC,cAAc,CAAC,UAAU,mCAAmC,CAAC,gBAAgB,CAAC,UAAU,uCAAuC,CAAC,oBAAoB,CAAC,YAAY,uCAAuC,CAAC,oBAAoB,CAAC,UAAU,0CAA0C,CAAC,uBAAuB,CAAC,UAAU,wCAAwC,CAAC,qBAAqB,CAAC,eAAe,wBAAwB,CAAC,mBAAmB,CAAC,aAAa,sBAAsB,CAAC,iBAAiB,CAAC,wBAAwB,sBAAsB,CAAC,8CAA8C,wBAAwB,2EAA2E,CAAC,CAAC,wBAAwB,sBAAsB,CAAC,8CAA8C,wBAAwB,2EAA2E,CAAC,CAAC,iBAAiB,kCAAkC,CAAC,iBAAiB,kCAAkC,CAAC,qBAAqB,sBAAsB,CAAC,8CAA8C,qBAAqB,wEAAwE,CAAC,CAAC,oBAAoB,sBAAsB,CAAC,8CAA8C,oBAAoB,uEAAuE,CAAC,CAAC,kBAAkB,mCAAmC,CAAC,sBAAsB,sBAAsB,CAAC,8CAA8C,sBAAsB,yEAAyE,CAAC,CAAC,oBAAoB,kBAAkB,CAAC,cAAc,+BAA+B,CAAC,uBAAuB,0BAA0B,CAAC,8CAA8C,uBAAuB,4EAA4E,CAAC,CAAC,sBAAsB,0BAA0B,CAAC,8CAA8C,sBAAsB,2EAA2E,CAAC,CAAC,sBAAsB,0BAA0B,CAAC,8CAA8C,sBAAsB,2EAA2E,CAAC,CAAC,sBAAsB,sBAAsB,CAAC,uBAAuB,4BAA4B,CAAC,8CAA8C,uBAAuB,8EAA8E,CAAC,CAAC,sBAAsB,4BAA4B,CAAC,8CAA8C,sBAAsB,6EAA6E,CAAC,CAAC,sBAAsB,4BAA4B,CAAC,8CAA8C,sBAAsB,6EAA6E,CAAC,CAAC,sBAAsB,yBAAyB,CAAC,sBAAsB,uBAAuB,CAAC,2DAA2D,qEAAqE,CAAC,kEAAkE,4EAA4E,CAAC,kCAAkC,+CAA+C,CAAC,4BAA4B,kCAAkC,CAAC,yCAAyC,+CAA+C,CAAC,gEAAgE,mEAAmE,CAAC,wBAAwB,8BAA8B,CAAC,yBAAyB,+BAA+B,CAAC,cAAc,uCAAuC,CAAC,kBAAkB,0BAA0B,CAAC,8CAA8C,kBAAkB,6EAA6E,CAAC,CAAC,UAAU,mCAAmC,CAAC,cAAc,sBAAsB,CAAC,8CAA8C,cAAc,yEAAyE,CAAC,CAAC,cAAc,0BAA0B,CAAC,8CAA8C,cAAc,yEAAyE,CAAC,CAAC,mBAAmB,0BAA0B,CAAC,8CAA8C,mBAAmB,8EAA8E,CAAC,CAAC,gBAAgB,yCAAyC,CAAC,aAAa,sCAAsC,CAAC,cAAc,uCAAuC,CAAC,YAAY,qCAAqC,CAAC,YAAY,qCAAqC,CAAC,gBAAgB,0BAA0B,CAAC,8CAA8C,gBAAgB,2EAA2E,CAAC,CAAC,eAAe,0BAA0B,CAAC,8CAA8C,eAAe,0EAA0E,CAAC,CAAC,YAAY,qCAAqC,CAAC,cAAc,uCAAuC,CAAC,cAAc,uCAAuC,CAAC,gBAAgB,sBAAsB,CAAC,cAAc,sBAAsB,CAAC,8CAA8C,cAAc,yEAAyE,CAAC,CAAC,cAAc,0BAA0B,CAAC,8CAA8C,cAAc,yEAAyE,CAAC,CAAC,kBAAkB,yCAAyC,CAAC,0DAA0D,CAAC,mBAAmB,+CAA+C,CAAC,0DAA0D,CAAC,kBAAkB,2CAA2C,CAAC,4LAA4L,CAAC,gBAAgB,yCAAyC,CAAC,4LAA4L,CAAC,UAAU,mCAAmC,CAAC,4LAA4L,CAAC,YAAY,uBAAuB,CAAC,UAAU,wBAAwB,CAAC,cAAc,2BAA2B,CAAC,6DAA6D,yDAAyD,CAAC,iEAAiE,6DAA6D,CAAC,cAAc,yBAAyB,CAAC,YAAY,uBAAuB,CAAC,mEAAmE,+DAA+D,CAAC,gBAAgB,qBAAiB,CAAjB,kBAAkB,CAAC,cAAc,mBAAe,CAAf,gBAAgB,CAAC,KAAK,gCAAgC,CAAC,QAAQ,iCAAiC,CAAC,KAAK,gCAAgC,CAAC,QAAQ,kCAAkC,CAAC,KAAK,gCAAgC,CAAC,KAAK,gCAAgC,CAAC,KAAK,gCAAgC,CAAC,KAAK,gCAAgC,CAAC,MAAM,WAAW,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,sCAAsC,CAAC,SAAS,wCAAwC,CAAC,MAAM,sCAAsC,CAAC,SAAS,wCAAwC,CAAC,MAAM,sCAAsC,CAAC,SAAS,wCAAwC,CAAC,OAAO,uCAAuC,CAAC,SAAS,sCAAsC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,MAAM,oCAAoC,CAAC,yCAAyC,0CAA0C,CAAC,MAAM,sCAAsC,CAAC,MAAM,sCAAsC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,MAAM,uCAAuC,CAAC,OAAO,wCAAwC,CAAC,OAAO,wCAAwC,CAAC,OAAO,wCAAwC,CAAC,OAAO,wCAAwC,CAAC,aAAa,mBAAmB,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,MAAM,qCAAqC,CAAC,aAAa,iBAAiB,CAAC,WAAW,eAAe,CAAC,cAAc,qBAAqB,CAAC,WAAW,4BAA4B,CAAC,WAAW,oDAAoD,CAAC,UAAU,yBAAyB,CAAC,0DAA0D,CAAC,UAAU,yBAAyB,CAAC,0DAA0D,CAAC,WAAW,0BAA0B,CAAC,2DAA2D,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,SAAS,wBAAwB,CAAC,yDAAyD,CAAC,kBAAkB,eAAe,CAAC,mBAAmB,gBAAgB,CAAC,eAAe,cAAc,CAAC,WAAW,qCAAqC,CAAC,oCAAoC,CAAC,WAAW,qCAAqC,CAAC,oCAAoC,CAAC,WAAW,qCAAqC,CAAC,oCAAoC,CAAC,WAAW,qCAAqC,CAAC,oCAAoC,CAAC,WAAW,qCAAqC,CAAC,oCAAoC,CAAC,cAAc,cAAc,CAAC,aAAa,CAAC,eAAe,iCAAiC,CAAC,gCAAgC,CAAC,aAAa,0CAA0C,CAAC,qCAAqC,CAAC,aAAa,0CAA0C,CAAC,qCAAqC,CAAC,eAAe,4CAA4C,CAAC,uCAAuC,CAAC,sBAAsB,mBAAmB,CAAC,oBAAoB,CAAC,iBAAiB,oCAAoC,CAAC,qCAAqC,CAAC,gBAAgB,mCAAmC,CAAC,oCAAoC,CAAC,iBAAiB,oCAAoC,CAAC,qCAAqC,CAAC,WAAW,cAAc,CAAC,8BAA8B,wBAAwB,CAAC,eAAe,sBAAsB,CAAC,mBAAmB,kBAAkB,CAAC,mBAAmB,kBAAkB,CAAC,qBAAqB,oBAAoB,CAAC,iEAAiE,8DAA8D,CAAC,uBAAuB,uBAAuB,CAAC,qFAAqF,kFAAkF,CAAC,4BAA4B,4BAA4B,CAAC,8BAA8B,uBAAuB,CAAC,kEAAkE,wDAAwD,CAAC,sFAAsF,4EAA4E,CAAC,sEAAsE,4DAA4D,CAAC,mFAAmF,yEAAyE,CAAC,kDAAkD,0CAA0C,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,cAAc,kBAAkB,CAAC,kBAAkB,8BAA8B,CAAC,kBAAkB,8BAA8B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,eAAe,2BAA2B,CAAC,cAAc,0BAA0B,CAAC,cAAc,0BAA0B,CAAC,cAAc,0BAA0B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,gBAAgB,4BAA4B,CAAC,YAAY,wBAAwB,CAAC,YAAY,yBAAyB,CAAC,WAAW,wBAAwB,CAAC,WAAW,wBAAwB,CAAC,QAAQ,iBAAiB,CAAC,cAAc,iCAAiC,CAAC,cAAc,yBAAyB,CAAC,WAAW,8BAA8B,CAAC,aAAa,kCAAkC,CAAC,iCAAiC,CAAC,WAAW,SAAS,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,YAAY,UAAU,CAAC,aAAa,SAAS,CAAC,6CAA6C,sDAAsD,CAAC,qIAAqI,CAAC,kDAAkD,sDAAsD,CAAC,qIAAqI,CAAC,kDAAkD,sDAAsD,CAAC,qIAAqI,CAAC,iDAAiD,sDAAsD,CAAC,qIAAqI,CAAC,mDAAmD,uDAAuD,CAAC,qIAAqI,CAAC,yCAAyC,sCAAsC,CAAC,qIAAqI,CAAC,WAAW,8GAA8G,CAAC,qIAAqI,CAAC,WAAW,4GAA4G,CAAC,qIAAqI,CAAC,WAAW,yGAAyG,CAAC,qIAAqI,CAAC,WAAW,+GAA+G,CAAC,qIAAqI,CAAC,WAAW,wDAAwD,CAAC,qIAAqI,CAAC,cAAc,sHAAsH,CAAC,qIAAqI,CAAC,sBAAsB,2BAA2B,CAAC,8CAA8C,sBAAsB,uIAAuI,CAAC,CAAC,gBAAgB,sCAAsC,CAAC,gBAAgB,uBAAuB,CAAC,kBAAkB,CAAC,8BAA8B,gBAAgB,kBAAkB,CAAC,uBAAuB,CAAC,CAAC,SAAS,qCAAqC,CAAC,iBAAiB,CAAC,QAAQ,yLAAyL,CAAC,eAAe,4BAA4B,CAAyR,+QAA+Q,CAAC,wBAAwB,6BAA6B,CAAyR,+QAA+Q,CAAC,kBAAkB,uCAAuC,CAAyR,+QAA+Q,CAAC,uBAAuB,qCAAqC,CAAyR,+QAA+Q,CAAC,YAAY,0RAAkT,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,kCAAkC,oCAAoC,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,sBAAsB,yBAAyB,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,gBAAgB,uBAAuB,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,mBAAmB,6JAA6J,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,oBAAoB,2BAA2B,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,mBAAmB,8BAA8B,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,sBAAsB,oDAAoD,CAAC,mFAAmF,CAAC,yEAAyE,CAAC,iBAAiB,wBAAwB,CAAC,WAAW,oBAAoB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,kBAAkB,CAAC,wBAAwB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,kBAAkB,CAAC,wBAAwB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,cAAc,iBAAiB,CAAC,uBAAuB,CAAC,eAAe,gBAAgB,CAAC,sBAAsB,CAAC,aAAa,4BAA4B,CAAC,6CAA6C,CAAC,UAAU,yBAAyB,CAAC,0CAA0C,CAAC,uBAAuB,qBAAqB,CAAC,cAAc,uBAAuB,CAAC,kBAAkB,CAAC,aAAa,wBAAwB,CAAC,qBAAe,CAAf,gBAAgB,CAAC,4BAA4B,mBAAmB,CAAC,4BAA4B,mBAAmB,CAAC,yBAAyB,kBAAkB,CAAC,mCAAmC,4BAA4B,CAAC,yDAAyD,qCAAqC,CAAC,2BAA2B,oBAAoB,CAAC,qBAAqB,mDAAmD,SAAS,CAAC,qDAAqD,SAAS,CAAC,CAAC,yCAAyC,mBAAmB,CAAC,iCAAiC,+BAA+B,CAAC,sCAAsC,mCAAmC,CAAC,cAAc,CAAC,4CAA4C,sBAAsB,CAAC,qCAAqC,wBAAwB,CAAC,yDAAyD,CAAC,yCAAyC,0CAA0C,CAAC,qCAAqC,CAAC,qBAAqB,wBAAwB,iBAAiB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,yCAAyC,CAAC,wBAAwB,iBAAiB,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,yCAAyC,CAAC,8BAA8B,UAAU,CAAC,iCAAiC,sBAAsB,CAAC,8CAA8C,iCAAiC,uEAAuE,CAAC,CAAC,2BAA2B,uCAAuC,CAAC,8BAA8B,0BAA0B,CAAC,8CAA8C,8BAA8B,4EAA4E,CAAC,CAAC,0BAA0B,sCAAsC,CAAC,yBAAyB,qCAAqC,CAAC,2BAA2B,uCAAuC,CAAC,2BAA2B,0BAA0B,CAAC,8CAA8C,2BAA2B,yEAAyE,CAAC,CAAC,gCAAgC,+CAA+C,CAAC,0DAA0D,CAAC,2BAA2B,uCAAuC,CAAC,4LAA4L,CAAC,yBAAyB,qCAAqC,CAAC,4LAA4L,CAAC,6CAA6C,yBAAyB,CAAC,yBAAyB,wBAAwB,CAAC,wBAAwB,8BAA8B,CAAC,gEAAgE,uDAAuD,CAAC,qIAAqI,CAAC,+DAA+D,uDAAuD,CAAC,qIAAqI,CAAC,wBAAwB,8GAA8G,CAAC,qIAAqI,CAAC,wBAAwB,4GAA4G,CAAC,qIAAqI,CAAC,wBAAwB,yGAAyG,CAAC,qIAAqI,CAAC,mCAAmC,+BAA+B,CAAC,yLAAyL,CAAC,+BAA+B,uCAAuC,CAAyR,+QAA+Q,CAAC,CAAC,qCAAqC,sHAAsH,CAAC,qIAAqI,CAAC,2CAA2C,sHAAsH,CAAC,qIAAqI,CAAC,6CAA6C,sCAAsC,CAAC,2CAA2C,oCAAoC,CAAC,6CAA6C,sCAAsC,CAAC,4CAA4C,0BAA0B,CAAC,2GAA2G,CAAC,4CAA4C,0BAA0B,CAAC,2GAA2G,CAAC,gDAAgD,yCAAyC,CAAC,wCAAwC,qCAAqC,CAAC,iBAAiB,CAAC,2CAA2C,uBAAuB,CAAC,kBAAkB,CAAC,yBAAyB,gBAAgB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,yCAAyC,CAAC,gCAAgC,SAAS,CAAC,wCAAwC,mBAAmB,CAAC,uCAAuC,kBAAkB,CAAC,+BAA+B,UAAU,CAAC,uDAAuD,mBAAmB,CAAC,8CAA8C,UAAU,CAAC,iDAAiD,wBAAwB,CAAC,yDAAyD,CAAC,mDAAmD,qCAAqC,CAAC,oCAAoC,CAAC,qDAAqD,0CAA0C,CAAC,qCAAqC,CAAC,wDAAwD,yCAAyC,CAAC,qDAAqD,CAAC,qDAAqD,0CAA0C,CAAC,qDAAqD,CAAC,sDAAsD,yCAAyC,CAAC,qDAAqD,CAAC,mDAAmD,0CAA0C,CAAC,qDAAqD,CAAC,8EAA8E,oBAAoB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,eAAe,CAAC,sEAAsE,YAAY,CAAC,8EAA8E,kBAAkB,CAAC,uEAAuE,4BAA4B,CAAC,yBAAyB,WAAW,aAAa,CAAC,cAAc,kBAAkB,CAAC,iBAAiB,wBAAwB,CAAC,eAAe,eAAe,CAAC,cAAc,yBAAyB,CAAC,0DAA0D,CAAC,aAAa,wBAAwB,CAAC,yDAAyD,CAAC,CAAC,yBAAyB,oBAAoB,eAAe,CAAC,cAAc,kBAAkB,CAAC,kBAAkB,kBAAkB,CAAC,iBAAiB,sBAAsB,CAAC,WAAW,wCAAwC,CAAC,WAAW,wCAAwC,CAAC,eAAe,eAAe,CAAC,aAAa,wBAAwB,CAAC,yDAAyD,CAAC,CAAC,yBAAyB,YAAY,6BAA6B,CAAC,CAAC,0CAA0C,sBAAsB,CAAC,8CAA8C,0CAA0C,2EAA2E,CAAC,CAAC,uCAAuC,sBAAsB,CAAC,8CAA8C,uCAAuC,wEAAwE,CAAC,CAAC,sCAAsC,sBAAsB,CAAC,8CAA8C,sCAAsC,uEAAuE,CAAC,CAAC,wCAAwC,sBAAsB,CAAC,8CAA8C,wCAAwC,yEAAyE,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,6EAA6E,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,6EAA6E,CAAC,CAAC,sCAAsC,0BAA0B,CAAC,8CAA8C,sCAAsC,+EAA+E,CAAC,CAAC,mCAAmC,0BAA0B,CAAC,8CAA8C,mCAAmC,4EAA4E,CAAC,CAAC,kCAAkC,0BAA0B,CAAC,8CAA8C,kCAAkC,2EAA2E,CAAC,CAAC,kCAAkC,0BAA0B,CAAC,8CAA8C,kCAAkC,2EAA2E,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,6EAA6E,CAAC,CAAC,oCAAoC,0BAA0B,CAAC,8CAA8C,oCAAoC,6EAA6E,CAAC,CAAC,oCAAoC,2CAA2C,CAAC,4LAA4L,CAAC,kCAAkC,yCAAyC,CAAC,4LAA4L,CAAC,gCAAgC,uCAAuC,CAAC,4LAA4L,CAAC,gCAAgC,yBAAyB,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,oCAAoC,8BAA8B,CAAC,oCAAoC,8BAA8B,CAAC,iCAAiC,2BAA2B,CAAC,iCAAiC,2BAA2B,CAAC,gCAAgC,0BAA0B,CAAC,gCAAgC,0BAA0B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,kCAAkC,4BAA4B,CAAC,6BAA6B,+GAA+G,CAAC,qIAAqI,CAAC,wCAAwC,2BAA2B,CAAC,8CAA8C,wCAAwC,uIAAuI,CAAC,CAAC,sCAAsC,yBAAyB,CAAC,8CAA8C,sCAAsC,4EAA4E,CAAC,CAAC,qBAAqB,iDAAiD,0BAA0B,CAAC,8CAA8C,iDAAiD,6EAA6E,CAAC,CAAC,gDAAgD,0BAA0B,CAAC,8CAA8C,gDAAgD,4EAA4E,CAAC,CAAC,+CAA+C,0BAA0B,CAAC,8CAA8C,+CAA+C,2EAA2E,CAAC,CAAC,6CAA6C,uCAAuC,CAAC,6CAA6C,uCAAuC,CAAC,4LAA4L,CAAC,2CAA2C,qCAAqC,CAAC,4LAA4L,CAAC,CAAC,sEAAsE,6CAA6C,CAAC,4BAA4B,cAAc,CAAC,oCAAoC,8BAA8B,CAAC,uCAAuC,mBAAmB,CAAC,sBAAsB,6BAA6B,CAAC,qCAAqC,mBAAmB,CAAC,wBAAwB,8BAA8B,CAAC,+BAA+B,CAAC,qBAAqB,+BAA+B,CAAC,qBAAqB,8BAA8B,CAAC,yDAAyD,aAAa,CAAC,2EAA2E,8BAA8B,CAAC,+BAA+B,CAAC,qDAAqD,YAAY,CAAC,6DAA6D,kBAAkB,CAAC,sDAAsD,4BAA4B,CAAC,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,6BAA6B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,4BAA4B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,2BAA2B,gBAAgB,CAAC,cAAc,CAAC,mBAAmB,CAAC,8BAA8B,UAAU,CAAC,cAAc,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,sCAAsC,4BAA4B,CAAC,cAAc,CAAC,gBAAgB,CAAC,qCAAqC,4BAA4B,CAAC,cAAc,CAAC,iBAAiB,CAAC,oCAAoC,4BAA4B,CAAC,cAAc,CAAC,kBAAkB,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,4BAA4B,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,4BAA4B,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,kCAAkC,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,iCAAiC,iBAAiB,CAAC,cAAc,CAAC,eAAe,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,kBAAkB,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,uBAAuB,CAAC,6BAA6B,UAAU,CAAC,cAAc,CAAC,mBAAmB,CAAC,oBAAoB,UAAU,CAAC,cAAc,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,yBAAyB,UAAU,CAAC,cAAc,CAAC,0BAA0B,UAAU,CAAC,cAAc,CAAC,sBAAsB,UAAU,CAAC,cAAc,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,qBAAqB,UAAU,CAAC,cAAc,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,iCAAiC,qBAAqB,CAAC,cAAc,CAAC,kBAAkB,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,6BAA6B,UAAU,CAAC,cAAc,CAAC,mCAAmC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,kCAAkC,UAAU,CAAC,cAAc,CAAC,mCAAmC,UAAU,CAAC,cAAc,CAAC,+BAA+B,UAAU,CAAC,cAAc,CAAC,gCAAgC,UAAU,CAAC,cAAc,CAAC,iCAAiC,UAAU,CAAC,cAAc,CAAC,8BAA8B,UAAU,CAAC,cAAc,CAAC,wBAAwB,UAAU,CAAC,cAAc,CAAC,oBAAoB,UAAU,CAAC,cAAc,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,uBAAuB,UAAU,CAAC,cAAc,CAAC,eAAe,CAAC,gBAAgB,GAAG,wBAAwB,CAAC",sourcesContent:['/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */\n@import "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-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-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--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-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--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-900:oklch(37.9% .146 265.522);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-200:oklch(92.8% .006 264.531);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-normal:0em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:Inter, system-ui, -apple-system, sans-serif}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-\\[-4px\\]{inset:-4px}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-3{top:calc(var(--spacing) * -3)}.-top-14{top:calc(var(--spacing) * -14)}.-top-\\[28px\\]{top:-28px}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-\\[50\\%\\]{top:50%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-auto{right:auto}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-1{bottom:calc(var(--spacing) * 1)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\\[calc\\(100\\%\\+40px\\)\\]{bottom:calc(100% + 40px)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-1100{z-index:1100}.clear-both{clear:both}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing) * 0)}.m-2{margin:calc(var(--spacing) * 2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-5{margin-inline:calc(var(--spacing) * 5)}.mx-8{margin-inline:calc(var(--spacing) * 8)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\\[var\\(--moveo-new-header-height\\)\\]{margin-top:var(--moveo-new-header-height)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:calc(var(--spacing) * 0)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-9{margin-bottom:calc(var(--spacing) * 9)}.mb-20{margin-bottom:calc(var(--spacing) * 20)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0{margin-left:calc(var(--spacing) * 0)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-full{width:100%;height:100%}.h-\\(--moveo-chat-height\\){height:var(--moveo-chat-height)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-40{height:calc(var(--spacing) * 40)}.h-45{height:calc(var(--spacing) * 45)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[18px\\]{height:18px}.h-\\[28px\\]{height:28px}.h-\\[42px\\]{height:42px}.h-\\[44px\\]{height:44px}.h-\\[72px\\]{height:72px}.h-\\[78vh\\]{height:78vh}.h-\\[82px\\]{height:82px}.h-\\[222px\\]{height:222px}.h-\\[254px\\]{height:254px}.h-\\[282px\\]{height:282px}.h-\\[386px\\]{height:386px}.h-\\[calc\\(100\\%-44px\\)\\]{height:calc(100% - 44px)}.h-\\[var\\(--moveo-chat-height\\)\\]{height:var(--moveo-chat-height)}.h-\\[var\\(--moveo-modal-tall-height\\)\\]{height:var(--moveo-modal-tall-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-18{max-height:calc(var(--spacing) * 18)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[88px\\]{max-height:88px}.max-h-\\[400px\\]{max-height:400px}.max-h-\\[calc\\(100\\%-68px\\)\\]{max-height:calc(100% - 68px)}.max-h-\\[calc\\(100vh-16px\\)\\]{max-height:calc(100vh - 16px)}.max-h-\\[calc\\(100vh-80px\\)\\]{max-height:calc(100vh - 80px)}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\\[calc\\(100\\%-44px\\)\\]{min-height:calc(100% - 44px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\\(--moveo-expanded-chat-width\\){width:var(--moveo-expanded-chat-width)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3xs{width:var(--container-3xs)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-72{width:calc(var(--spacing) * 72)}.w-\\[2px\\]{width:2px}.w-\\[18px\\]{width:18px}.w-\\[28px\\]{width:28px}.w-\\[42px\\]{width:42px}.w-\\[328px\\]{width:328px}.w-\\[calc\\(100\\%\\+48px\\)\\]{width:calc(100% + 48px)}.w-\\[calc\\(100\\%-24px\\)\\]{width:calc(100% - 24px)}.w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.w-\\[var\\(--moveo-chat-width\\)\\]{width:var(--moveo-chat-width)}.w-\\[var\\(--moveo-expanded-chat-width\\)\\]{width:var(--moveo-expanded-chat-width)}.w-\\[var\\(--moveo-modal-tall-width\\)\\]{width:var(--moveo-modal-tall-width)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-sm{width:var(--container-sm)}.w-xs{width:var(--container-xs)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-18{max-width:calc(var(--spacing) * 18)}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[200px\\]{max-width:200px}.max-w-fit{max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[260px\\]{min-width:260px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\\[130px\\]{flex-basis:130px}.basis-\\[336px\\]{flex-basis:336px}.basis-\\[400px\\]{flex-basis:400px}.basis-full{flex-basis:100%}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-6{--tw-translate-x:calc(var(--spacing) * -6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-12{--tw-translate-x:calc(var(--spacing) * -12);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-0\\.5{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[fadeIn_0\\.3s_forwards\\]{animation:.3s forwards fadeIn}.animate-\\[slide-in-up_0\\.2s_ease-out\\]{animation:.2s ease-out slide-in-up}.animate-\\[typing_1\\.2s_ease-in-out_infinite\\]{animation:1.2s ease-in-out infinite typing}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[36px_16px_36px\\]{grid-template-columns:36px 16px 36px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-12{gap:calc(var(--spacing) * 12)}.gap-\\[2px\\]{gap:2px}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-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)))}: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)))}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\(--moveo-border-radius-base\\){border-radius:var(--moveo-border-radius-base)}.rounded-\\(--moveo-new-border-radius-base\\){border-radius:var(--moveo-new-border-radius-base)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--moveo-border-radius-base\\)\\]{border-radius:var(--moveo-border-radius-base)}.rounded-\\[var\\(--moveo-new-border-radius-base\\)\\]{border-radius:var(--moveo-new-border-radius-base)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200\\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab, red, red)){.border-emerald-200\\/60{border-color:color-mix(in oklab, var(--color-emerald-200) 60%, transparent)}}.border-emerald-500\\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/20{border-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-rose-200\\/60{border-color:#ffccd399}@supports (color:color-mix(in lab, red, red)){.border-rose-200\\/60{border-color:color-mix(in oklab, var(--color-rose-200) 60%, transparent)}}.border-sky-200\\/60{border-color:#b8e6fe99}@supports (color:color-mix(in lab, red, red)){.border-sky-200\\/60{border-color:color-mix(in oklab, var(--color-sky-200) 60%, transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-rose-400\\/60{border-top-color:#ff667f99}@supports (color:color-mix(in lab, red, red)){.border-t-rose-400\\/60{border-top-color:color-mix(in oklab, var(--color-rose-400) 60%, transparent)}}.border-t-sky-400\\/60{border-top-color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-400\\/60{border-top-color:color-mix(in oklab, var(--color-sky-400) 60%, transparent)}}.border-t-sky-500\\/60{border-top-color:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-500\\/60{border-top-color:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-r-rose-300\\/30{border-right-color:#ffa2ae4d}@supports (color:color-mix(in lab, red, red)){.border-r-rose-300\\/30{border-right-color:color-mix(in oklab, var(--color-rose-300) 30%, transparent)}}.border-r-sky-300\\/30{border-right-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-300\\/30{border-right-color:color-mix(in oklab, var(--color-sky-300) 30%, transparent)}}.border-r-sky-400\\/30{border-right-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-400\\/30{border-right-color:color-mix(in oklab, var(--color-sky-400) 30%, transparent)}}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){background-color:var(--color-launcher-background,var(--color-accent))}.bg-\\(--color-opening-message-background\\,var\\(--color-accent\\)\\){background-color:var(--color-opening-message-background,var(--color-accent))}.bg-\\(--color-rating-background\\){background-color:var(--color-rating-background)}.bg-\\[var\\(--background\\)\\]{background-color:var(--background)}.bg-\\[var\\(--moveo-header-background\\)\\]{background-color:var(--moveo-header-background)}.bg-\\[var\\(--moveo-header-background\\,var\\(--color-accent\\)\\)\\]{background-color:var(--moveo-header-background,var(--color-accent))}.bg-\\[var\\(--nbg-bg\\)\\]{background-color:var(--nbg-bg)}.bg-\\[var\\(--text-03\\)\\]{background-color:var(--text-03)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\\/90{background-color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\\/90{background-color:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-emerald-50\\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/80{background-color:color-mix(in oklab, var(--color-emerald-50) 80%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-50\\/80{background-color:#fff1f2cc}@supports (color:color-mix(in lab, red, red)){.bg-rose-50\\/80{background-color:color-mix(in oklab, var(--color-rose-50) 80%, transparent)}}.bg-sky-50\\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab, red, red)){.bg-sky-50\\/80{background-color:color-mix(in oklab, var(--color-sky-50) 80%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-transparent{background-color:#0000}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-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))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-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))}.to-white{--tw-gradient-to: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))}.bg-contain{background-size:contain}.bg-right{background-position:100%}.bg-no-repeat{background-repeat:no-repeat}.fill-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){fill:var(--color-launcher-background,var(--color-accent))}.fill-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){fill:var(--color-launcher-foreground,var(--color-background))}.fill-sky-600{fill:var(--color-sky-600)}.fill-white{fill:var(--color-white)}.stroke-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){stroke:var(--color-launcher-foreground,var(--color-background))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\\[var\\(--moveo-new-header-height\\)\\]{padding-top:var(--moveo-new-header-height)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-14{padding-bottom:calc(var(--spacing) * 14)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pb-\\[40px\\]{padding-bottom:40px}.pl-0{padding-left:calc(var(--spacing) * 0)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.text-\\[10px\\]{font-size:10px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-8{--tw-leading:calc(var(--spacing) * 8);line-height:calc(var(--spacing) * 8)}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.25em\\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words,.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){color:var(--color-launcher-foreground,var(--color-background))}.text-\\(--color-link\\){color:var(--color-link)}.text-\\(--color-opening-message-foreground\\,var\\(--color-text-primary-foreground\\)\\){color:var(--color-opening-message-foreground,var(--color-text-primary-foreground))}.text-\\(--color-send-icon\\){color:var(--color-send-icon)}.text-\\[var\\(--color-link\\)\\]{color:var(--color-link)}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-accent\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-accent))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-element-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-element-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-text-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,white\\)\\]{color:var(--moveo-header-text-color,white)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-current{color:currentColor}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(14\\,165\\,233\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0ea5e91f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(16\\,185\\,129\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(244\\,63\\,94\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#f43f5e1f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(16\\,185\\,129\\,0\\.25\\)\\]{--tw-shadow:0 4px 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[var\\(--moveo-shadow-bubble\\)\\]{--tw-shadow:var(--moveo-shadow-bubble);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.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)}.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)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--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)}.shadow-amber-200\\/70{--tw-shadow-color:#fee685b3}@supports (color:color-mix(in lab, red, red)){.shadow-amber-200\\/70{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-200) 70%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-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,)}.backdrop-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);-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,)}.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,)}.backdrop-saturate-150{--tw-backdrop-saturate:saturate(150%);-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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-500{transition-delay:.5s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[animation-delay\\:0\\.2s\\]{animation-delay:.2s}.\\[animation-delay\\:0\\.4s\\]{animation-delay:.4s}.\\[animation-delay\\:0s\\]{animation-delay:0s}.\\[animation-fill-mode\\:forwards\\]{animation-fill-mode:forwards}.\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]{scrollbar-color:#00000026 transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}@media (hover:hover){.group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}@media (hover:hover){.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)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.05\\]:hover{scale:1.05}.hover\\:border-red-500\\/20:hover{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\\:border-red-500\\/20:hover{border-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.hover\\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab, var(--color-gray-700) 50%, transparent)}}.hover\\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:bg-gradient-to-br:hover{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\\:from-red-500:hover{--tw-gradient-from:var(--color-red-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))}.hover\\:to-red-600:hover{--tw-gradient-to:var(--color-red-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))}.hover\\:text-\\[var\\(--color-accent\\)\\]:hover{color:var(--color-accent)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_6px_20px_rgba\\(16\\,185\\,129\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#10b98159);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-lg:hover{--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)}.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)}.hover\\:shadow-sm:hover{--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)}.hover\\:brightness-\\[0\\.92\\]:hover{--tw-brightness:brightness(.92);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,)}.hover\\:backdrop-blur-sm:hover{--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,)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[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)}.focus-visible\\:ring-amber-400:focus-visible{--tw-ring-color:var(--color-amber-400)}.focus-visible\\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-sky-400)}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--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)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.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)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-sm[data-placeholder]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\\[placeholder\\]\\:leading-5[data-placeholder]{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.data-\\[placeholder\\]\\:font-normal[data-placeholder]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.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)}.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)}.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)}.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)}: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}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}.sm\\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (min-width:48rem){.md\\:max-h-\\[70vh\\]{max-height:70vh}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:items-start{align-items:flex-start}.md\\:px-12{padding-inline:calc(var(--spacing) * 12)}.md\\:pb-16{padding-bottom:calc(var(--spacing) * 16)}.md\\:text-left{text-align:left}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\\:gap-16{gap:calc(var(--spacing) * 16)}}.dark\\:border-emerald-500\\/30:is(.dark *){border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-emerald-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.dark\\:border-rose-500\\/30:is(.dark *){border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-rose-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.dark\\:border-sky-500\\/30:is(.dark *){border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-sky-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:border-slate-700\\/50:is(.dark *){border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:border-slate-700\\/50:is(.dark *){border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-amber-500\\/15:is(.dark *){background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.dark\\:bg-amber-500\\/20:is(.dark *){background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.dark\\:bg-rose-500\\/15:is(.dark *){background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.dark\\:bg-sky-500\\/15:is(.dark *){background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.dark\\:bg-sky-500\\/20:is(.dark *){background-color:#00a5ef33}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 20%, transparent)}}.dark\\:bg-slate-700\\/50:is(.dark *){background-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-700\\/50:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-slate-900\\/80:is(.dark *){background-color:#0f172bcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/80:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-900) 80%, transparent)}}.dark\\:from-emerald-600:is(.dark *){--tw-gradient-from:var(--color-emerald-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))}.dark\\:to-emerald-700:is(.dark *){--tw-gradient-to:var(--color-emerald-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))}.dark\\:to-slate-950:is(.dark *){--tw-gradient-to:var(--color-slate-950);--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))}.dark\\:fill-sky-300:is(.dark *){fill:var(--color-sky-300)}.dark\\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\\:text-slate-100:is(.dark *){color:var(--color-slate-100)}.dark\\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:is(.dark *){color:var(--color-slate-300)}.dark\\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\\:shadow-xl:is(.dark *){--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)}.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:#0206184d}@supports (color:color-mix(in lab, red, red)){.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-950) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}@media (hover:hover){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:hover\\:bg-slate-700:is(.dark *):hover{background-color:var(--color-slate-700)}.dark\\:hover\\:from-red-600:is(.dark *):hover{--tw-gradient-from:var(--color-red-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))}.dark\\:hover\\:to-red-700:is(.dark *):hover{--tw-gradient-to:var(--color-red-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))}}.dark\\:focus-visible\\:ring-offset-slate-950:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\:hover\\]\\:underline a:hover{text-decoration-line:underline}.\\[\\&_a\\>\\*\\]\\:pointer-events-none a>*{pointer-events:none}.\\[\\&_p\\]\\:max-w-md p{max-width:var(--container-md)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&_svg\\]\\:h-6 svg{height:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:w-6 svg{width:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:flex-shrink-0 svg,.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}'],sourceRoot:""}]),t.A=a},1364:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},5516:function(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},1931:function(e,t,r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(4582)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4582:function(e,t,r){e.exports=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r}),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(6151),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},6151:function(e){var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var l,c,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*i;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===d&&isFinite(e))return s.long?(l=e,(c=Math.abs(l))>=o?a(l,c,o,"day"):c>=n?a(l,c,n,"hour"):c>=r?a(l,c,r,"minute"):c>=t?a(l,c,t,"second"):l+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7045:function(e,t,r){"use strict";var n=r(7810),o=r(2328);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),u=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},A={};function g(e,t,r,n,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var f={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){f[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];f[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){f[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){f[e]=new g(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){f[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){f[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){f[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){f[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){f[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function C(e,t,r,n){var o=f.hasOwnProperty(t)?f[t]:null;(null!==o?0!==o.type:n||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,r,n){if(null==t||function(e,t,r,n){if(null!==r&&0===r.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!n&&(null!==r?!r.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,r,n))return!0;if(n)return!1;if(null!==r)switch(r.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,r,o,n)&&(r=null),n||null===o?function(e){return!!u.call(A,e)||!u.call(p,e)&&(h.test(e)?A[e]=!0:(p[e]=!0,!1))}(t)&&(null===r?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=null===r?3!==o.type&&"":r:(t=o.attributeName,n=o.attributeNamespace,null===r?e.removeAttribute(t):(r=3===(o=o.type)||4===o&&!0===r?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,m);f[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,m);f[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,m);f[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){f[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),f.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){f[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=Symbol.for("react.element"),y=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),_=Symbol.for("react.provider"),B=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var O=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var P,M=Object.assign;function U(e){if(void 0===P)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return"\n"+P+e}var F=!1;function j(e,t){if(!e||F)return"";F=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var n=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){n=e}e.call(t.prototype)}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),i=n.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{F=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function z(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return j(e.type,!1);case 11:return j(e.type.render,!1);case 1:return j(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case k:return"Fragment";case y:return"Portal";case S:return"Profiler";case x:return"StrictMode";case I:return"Suspense";case T:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case B:return(e.displayName||"Context")+".Consumer";case _:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:q(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function $(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function V(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function G(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=H(e)?e.checked?"true":"false":e.value),(e=n)!==r&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var r=t.checked;return M({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=r?r:e._wrapperState.initialChecked})}function Q(e,t){var r=null==t.defaultValue?"":t.defaultValue,n=null!=t.checked?t.checked:t.defaultChecked;r=W(null!=t.value?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&C(e,"checked",t,!1)}function X(e,t){J(e,t);var r=W(t.value),n=t.type;if(null!=r)"number"===n?(0===r&&""===e.value||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if("submit"===n||"reset"===n)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,r):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!("submit"!==n&&"reset"!==n||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}""!==(r=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==r&&(e.name=r)}function ee(e,t,r){"number"===t&&Y(e.ownerDocument)===e||(null==r?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var te=Array.isArray;function re(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+W(r),t=null,o=0;o<e.length;o++){if(e[o].value===r)return e[o].selected=!0,void(n&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return M({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:W(r)}}function ie(e,t){var r=W(t.value),n=W(t.defaultValue);null!=r&&((r=""+r)!==e.value&&(e.value=r),null==t.defaultValue&&e.defaultValue!==r&&(e.defaultValue=r)),null!=n&&(e.defaultValue=""+n)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,de,ue=(de=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,r,n){MSApp.execUnsafeLocalFunction(function(){return de(e,t)})}:de);function he(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=["Webkit","ms","Moz","O"];function ge(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function fe(e,t){for(var r in e=e.style,t)if(t.hasOwnProperty(r)){var n=0===r.indexOf("--"),o=ge(r,t[r],n);"float"===r&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}Object.keys(pe).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ye=null,ke=null,xe=null;function Se(e){if(e=wo(e)){if("function"!=typeof ye)throw Error(i(280));var t=e.stateNode;t&&(t=yo(t),ye(e.stateNode,e.type,t))}}function _e(e){ke?xe?xe.push(e):xe=[e]:ke=e}function Be(){if(ke){var e=ke,t=xe;if(xe=ke=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Ee(e,t){return e(t)}function Ie(){}var Te=!1;function Re(e,t,r){if(Te)return e(t,r);Te=!0;try{return Ee(e,t,r)}finally{Te=!1,(null!==ke||null!==xe)&&(Ie(),Be())}}function Ne(e,t){var r=e.stateNode;if(null===r)return null;var n=yo(r);if(null===n)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(n=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!n;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(i(231,t,typeof r));return r}var Oe=!1;if(d)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Oe=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(de){Oe=!1}function De(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(e){this.onError(e)}}var Pe=!1,Me=null,Ue=!1,Fe=null,je={onError:function(e){Pe=!0,Me=e}};function ze(e,t,r,n,o,i,a,s,l){Pe=!1,Me=null,De.apply(je,arguments)}function qe(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(r=t.return),e=t.return}while(e)}return 3===t.tag?r:null}function $e(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(qe(e)!==e)throw Error(i(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=qe(e)))throw Error(i(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(n=o.return)){r=n;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return We(o),e;if(a===n)return We(o),t;a=a.sibling}throw Error(i(188))}if(r.return!==n.return)r=o,n=a;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,n=a;break}if(l===n){s=!0,n=o,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,n=o;break}if(l===n){s=!0,n=a,r=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(r.alternate!==n)throw Error(i(190))}if(3!==r.tag)throw Error(i(188));return r.stateNode.current===r?e:t}(e))?Ve(e):null}function Ve(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Ve(e);if(null!==t)return t;e=e.sibling}return null}var Ge=o.unstable_scheduleCallback,Ye=o.unstable_cancelCallback,Ke=o.unstable_shouldYield,Qe=o.unstable_requestPaint,Je=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,Ze=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,rt=o.unstable_LowPriority,nt=o.unstable_IdlePriority,ot=null,it=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,dt=4194304;function ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var r=e.pendingLanes;if(0===r)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&r;if(0!==a){var s=a&~o;0!==s?n=ut(s):0!==(i&=a)&&(n=ut(i))}else 0!==(a=r&~o)?n=ut(a):0!==i&&(n=ut(i));if(0===n)return 0;if(0!==t&&t!==n&&0===(t&o)&&((o=n&-n)>=(i=t&-t)||16===o&&4194240&i))return t;if(4&n&&(n|=16&r),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=n;0<t;)o=1<<(r=31-at(t)),n|=e[r],t&=~o;return n}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function At(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function ft(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vt(e,t,r){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=r}function mt(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-at(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Ct=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var bt,yt,kt,xt,St,_t=!1,Bt=[],Et=null,It=null,Tt=null,Rt=new Map,Nt=new Map,Ot=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Tt=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function Pt(e,t,r,n,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=wo(t))&&yt(t),e):(e.eventSystemFlags|=n,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Mt(e){var t=Co(e.target);if(null!==t){var r=qe(t);if(null!==r)if(13===(t=r.tag)){if(null!==(t=$e(r)))return e.blockedOn=t,void St(e.priority,function(){kt(r)})}else if(3===t&&r.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===r.tag?r.stateNode.containerInfo:null)}e.blockedOn=null}function Ut(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var r=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==r)return null!==(t=wo(r))&&yt(t),e.blockedOn=r,!1;var n=new(r=e.nativeEvent).constructor(r.type,r);we=n,r.target.dispatchEvent(n),we=null,t.shift()}return!0}function Ft(e,t,r){Ut(e)&&r.delete(t)}function jt(){_t=!1,null!==Et&&Ut(Et)&&(Et=null),null!==It&&Ut(It)&&(It=null),null!==Tt&&Ut(Tt)&&(Tt=null),Rt.forEach(Ft),Nt.forEach(Ft)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,_t||(_t=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,jt)))}function qt(e){function t(t){return zt(t,e)}if(0<Bt.length){zt(Bt[0],e);for(var r=1;r<Bt.length;r++){var n=Bt[r];n.blockedOn===e&&(n.blockedOn=null)}}for(null!==Et&&zt(Et,e),null!==It&&zt(It,e),null!==Tt&&zt(Tt,e),Rt.forEach(t),Nt.forEach(t),r=0;r<Ot.length;r++)(n=Ot[r]).blockedOn===e&&(n.blockedOn=null);for(;0<Ot.length&&null===(r=Ot[0]).blockedOn;)Mt(r),null===r.blockedOn&&Ot.shift()}var $t=w.ReactCurrentBatchConfig,Wt=!0;function Ht(e,t,r,n){var o=Ct,i=$t.transition;$t.transition=null;try{Ct=1,Gt(e,t,r,n)}finally{Ct=o,$t.transition=i}}function Vt(e,t,r,n){var o=Ct,i=$t.transition;$t.transition=null;try{Ct=4,Gt(e,t,r,n)}finally{Ct=o,$t.transition=i}}function Gt(e,t,r,n){if(Wt){var o=Kt(e,t,r,n);if(null===o)Wn(e,t,n,Yt,r),Dt(e,n);else if(function(e,t,r,n,o){switch(t){case"focusin":return Et=Pt(Et,e,t,r,n,o),!0;case"dragenter":return It=Pt(It,e,t,r,n,o),!0;case"mouseover":return Tt=Pt(Tt,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return Rt.set(i,Pt(Rt.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,Nt.set(i,Pt(Nt.get(i)||null,e,t,r,n,o)),!0}return!1}(o,e,t,r,n))n.stopPropagation();else if(Dt(e,n),4&t&&-1<Lt.indexOf(e)){for(;null!==o;){var i=wo(o);if(null!==i&&bt(i),null===(i=Kt(e,t,r,n))&&Wn(e,t,n,Yt,r),i===o)break;o=i}null!==o&&n.stopPropagation()}else Wn(e,t,n,null,r)}}var Yt=null;function Kt(e,t,r,n){if(Yt=null,null!==(e=Co(e=be(n))))if(null===(t=qe(e)))e=null;else if(13===(r=t.tag)){if(null!==(e=$e(t)))return e;e=null}else if(3===r){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function Qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ze:return 1;case et:return 4;case tt:case rt:return 16;case nt:return 536870912;default:return 16}default:return 16}}var Jt=null,Xt=null,Zt=null;function er(){if(Zt)return Zt;var e,t,r=Xt,n=r.length,o="value"in Jt?Jt.value:Jt.textContent,i=o.length;for(e=0;e<n&&r[e]===o[e];e++);var a=n-e;for(t=1;t<=a&&r[n-t]===o[i-t];t++);return Zt=o.slice(e,1<t?1-t:void 0)}function tr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function rr(){return!0}function nr(){return!1}function or(e){function t(t,r,n,o,i){for(var a in this._reactName=t,this._targetInst=n,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?rr:nr,this.isPropagationStopped=nr,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var ir,ar,sr,lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cr=or(lr),dr=M({},lr,{view:0,detail:0}),ur=or(dr),hr=M({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&"mousemove"===e.type?(ir=e.screenX-sr.screenX,ar=e.screenY-sr.screenY):ar=ir=0,sr=e),ir)},movementY:function(e){return"movementY"in e?e.movementY:ar}}),pr=or(hr),Ar=or(M({},hr,{dataTransfer:0})),gr=or(M({},dr,{relatedTarget:0})),fr=or(M({},lr,{animationName:0,elapsedTime:0,pseudoElement:0})),vr=M({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mr=or(vr),Cr=or(M({},lr,{data:0})),wr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},br={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=yr[e])&&!!t[e]}function xr(){return kr}var Sr=M({},dr,{key:function(e){if(e.key){var t=wr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?br[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return"keypress"===e.type?tr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),_r=or(Sr),Br=or(M({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Er=or(M({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr})),Ir=or(M({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Tr=M({},hr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rr=or(Tr),Nr=[9,13,27,32],Or=d&&"CompositionEvent"in window,Lr=null;d&&"documentMode"in document&&(Lr=document.documentMode);var Dr=d&&"TextEvent"in window&&!Lr,Pr=d&&(!Or||Lr&&8<Lr&&11>=Lr),Mr=String.fromCharCode(32),Ur=!1;function Fr(e,t){switch(e){case"keyup":return-1!==Nr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zr=!1,qr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!qr[e.type]:"textarea"===t}function Wr(e,t,r,n){_e(n),0<(t=Vn(t,"onChange")).length&&(r=new cr("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Hr=null,Vr=null;function Gr(e){Un(e,0)}function Yr(e){if(G(bo(e)))return e}function Kr(e,t){if("change"===e)return t}var Qr=!1;if(d){var Jr;if(d){var Xr="oninput"in document;if(!Xr){var Zr=document.createElement("div");Zr.setAttribute("oninput","return;"),Xr="function"==typeof Zr.oninput}Jr=Xr}else Jr=!1;Qr=Jr&&(!document.documentMode||9<document.documentMode)}function en(){Hr&&(Hr.detachEvent("onpropertychange",tn),Vr=Hr=null)}function tn(e){if("value"===e.propertyName&&Yr(Vr)){var t=[];Wr(t,Vr,e,be(e)),Re(Gr,t)}}function rn(e,t,r){"focusin"===e?(en(),Vr=r,(Hr=t).attachEvent("onpropertychange",tn)):"focusout"===e&&en()}function nn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Yr(Vr)}function on(e,t){if("click"===e)return Yr(t)}function an(e,t){if("input"===e||"change"===e)return Yr(t)}var sn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ln(e,t){if(sn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!u.call(t,o)||!sn(e[o],t[o]))return!1}return!0}function cn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var r,n=cn(e);for(e=0;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cn(n)}}function un(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?un(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hn(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var r="string"==typeof t.contentWindow.location.href}catch(e){r=!1}if(!r)break;t=Y((e=t.contentWindow).document)}return t}function pn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function An(e){var t=hn(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&un(r.ownerDocument.documentElement,r)){if(null!==n&&pn(r))if(t=n.start,void 0===(e=n.end)&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if((e=(t=r.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=void 0===n.end?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=dn(r,i);var a=dn(r,n);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=r;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof r.focus&&r.focus(),r=0;r<t.length;r++)(e=t[r]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gn=d&&"documentMode"in document&&11>=document.documentMode,fn=null,vn=null,mn=null,Cn=!1;function wn(e,t,r){var n=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;Cn||null==fn||fn!==Y(n)||(n="selectionStart"in(n=fn)&&pn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},mn&&ln(mn,n)||(mn=n,0<(n=Vn(vn,"onSelect")).length&&(t=new cr("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=fn)))}function bn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var yn={animationend:bn("Animation","AnimationEnd"),animationiteration:bn("Animation","AnimationIteration"),animationstart:bn("Animation","AnimationStart"),transitionend:bn("Transition","TransitionEnd")},kn={},xn={};function Sn(e){if(kn[e])return kn[e];if(!yn[e])return e;var t,r=yn[e];for(t in r)if(r.hasOwnProperty(t)&&t in xn)return kn[e]=r[t];return e}d&&(xn=document.createElement("div").style,"AnimationEvent"in window||(delete yn.animationend.animation,delete yn.animationiteration.animation,delete yn.animationstart.animation),"TransitionEvent"in window||delete yn.transitionend.transition);var _n=Sn("animationend"),Bn=Sn("animationiteration"),En=Sn("animationstart"),In=Sn("transitionend"),Tn=new Map,Rn="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nn(e,t){Tn.set(e,t),l(t,[e])}for(var On=0;On<Rn.length;On++){var Ln=Rn[On];Nn(Ln.toLowerCase(),"on"+(Ln[0].toUpperCase()+Ln.slice(1)))}Nn(_n,"onAnimationEnd"),Nn(Bn,"onAnimationIteration"),Nn(En,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(In,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dn="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pn=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dn));function Mn(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,n,o,a,s,l,c){if(ze.apply(this,arguments),Pe){if(!Pe)throw Error(i(198));var d=Me;Pe=!1,Me=null,Ue||(Ue=!0,Fe=d)}}(n,t,void 0,e),e.currentTarget=null}function Un(e,t){t=!!(4&t);for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Mn(o,s,c),i=l}else for(a=0;a<n.length;a++){if(l=(s=n[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Mn(o,s,c),i=l}}}if(Ue)throw e=Fe,Ue=!1,Fe=null,e}function Fn(e,t){var r=t[fo];void 0===r&&(r=t[fo]=new Set);var n=e+"__bubble";r.has(n)||($n(t,e,2,!1),r.add(n))}function jn(e,t,r){var n=0;t&&(n|=4),$n(r,e,n,t)}var zn="_reactListening"+Math.random().toString(36).slice(2);function qn(e){if(!e[zn]){e[zn]=!0,a.forEach(function(t){"selectionchange"!==t&&(Pn.has(t)||jn(t,!1,e),jn(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zn]||(t[zn]=!0,jn("selectionchange",!1,t))}}function $n(e,t,r,n){switch(Qt(t)){case 1:var o=Ht;break;case 4:o=Vt;break;default:o=Gt}r=o.bind(null,t,r,e),o=void 0,!Oe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),n?void 0!==o?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):void 0!==o?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function Wn(e,t,r,n,o){var i=n;if(!(1&t||2&t||null===n))e:for(;;){if(null===n)return;var a=n.tag;if(3===a||4===a){var s=n.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=n.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=Co(s)))return;if(5===(l=a.tag)||6===l){n=i=a;continue e}s=s.parentNode}}n=n.return}Re(function(){var n=i,o=be(r),a=[];e:{var s=Tn.get(e);if(void 0!==s){var l=cr,c=e;switch(e){case"keypress":if(0===tr(r))break e;case"keydown":case"keyup":l=_r;break;case"focusin":c="focus",l=gr;break;case"focusout":c="blur",l=gr;break;case"beforeblur":case"afterblur":l=gr;break;case"click":if(2===r.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Ar;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Er;break;case _n:case Bn:case En:l=fr;break;case In:l=Ir;break;case"scroll":l=ur;break;case"wheel":l=Rr;break;case"copy":case"cut":case"paste":l=mr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Br}var d=!!(4&t),u=!d&&"scroll"===e,h=d?null!==s?s+"Capture":null:s;d=[];for(var p,A=n;null!==A;){var g=(p=A).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&null!=(g=Ne(A,h))&&d.push(Hn(A,g,p))),u)break;A=A.return}0<d.length&&(s=new l(s,c,null,r,o),a.push({event:s,listeners:d}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||r===we||!(c=r.relatedTarget||r.fromElement)||!Co(c)&&!c[go])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=n,null!==(c=(c=r.relatedTarget||r.toElement)?Co(c):null)&&(c!==(u=qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=n),l!==c)){if(d=pr,g="onMouseLeave",h="onMouseEnter",A="mouse","pointerout"!==e&&"pointerover"!==e||(d=Br,g="onPointerLeave",h="onPointerEnter",A="pointer"),u=null==l?s:bo(l),p=null==c?s:bo(c),(s=new d(g,A+"leave",l,r,o)).target=u,s.relatedTarget=p,g=null,Co(o)===n&&((d=new d(h,A+"enter",c,r,o)).target=p,d.relatedTarget=u,g=d),u=g,l&&c)e:{for(h=c,A=0,p=d=l;p;p=Gn(p))A++;for(p=0,g=h;g;g=Gn(g))p++;for(;0<A-p;)d=Gn(d),A--;for(;0<p-A;)h=Gn(h),p--;for(;A--;){if(d===h||null!==h&&d===h.alternate)break e;d=Gn(d),h=Gn(h)}d=null}else d=null;null!==l&&Yn(a,s,l,d,!1),null!==c&&null!==u&&Yn(a,u,c,d,!0)}if("select"===(l=(s=n?bo(n):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var f=Kr;else if($r(s))if(Qr)f=an;else{f=nn;var v=rn}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(f=on);switch(f&&(f=f(e,n))?Wr(a,f,r,o):(v&&v(e,s,n),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=n?bo(n):window,e){case"focusin":($r(v)||"true"===v.contentEditable)&&(fn=v,vn=n,mn=null);break;case"focusout":mn=vn=fn=null;break;case"mousedown":Cn=!0;break;case"contextmenu":case"mouseup":case"dragend":Cn=!1,wn(a,r,o);break;case"selectionchange":if(gn)break;case"keydown":case"keyup":wn(a,r,o)}var m;if(Or)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else zr?Fr(e,r)&&(C="onCompositionEnd"):"keydown"===e&&229===r.keyCode&&(C="onCompositionStart");C&&(Pr&&"ko"!==r.locale&&(zr||"onCompositionStart"!==C?"onCompositionEnd"===C&&zr&&(m=er()):(Xt="value"in(Jt=o)?Jt.value:Jt.textContent,zr=!0)),0<(v=Vn(n,C)).length&&(C=new Cr(C,e,null,r,o),a.push({event:C,listeners:v}),(m||null!==(m=jr(r)))&&(C.data=m))),(m=Dr?function(e,t){switch(e){case"compositionend":return jr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Mr);case"textInput":return(e=t.data)===Mr&&Ur?null:e;default:return null}}(e,r):function(e,t){if(zr)return"compositionend"===e||!Or&&Fr(e,t)?(e=er(),Zt=Xt=Jt=null,zr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pr&&"ko"!==t.locale?null:t.data}}(e,r))&&0<(n=Vn(n,"onBeforeInput")).length&&(o=new Cr("onBeforeInput","beforeinput",null,r,o),a.push({event:o,listeners:n}),o.data=m)}Un(a,t)})}function Hn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Vn(e,t){for(var r=t+"Capture",n=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ne(e,r))&&n.unshift(Hn(e,i,o)),null!=(i=Ne(e,t))&&n.push(Hn(e,i,o))),e=e.return}return n}function Gn(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yn(e,t,r,n,o){for(var i=t._reactName,a=[];null!==r&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(null!==l&&l===n)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Ne(r,i))&&a.unshift(Hn(r,l,s)):o||null!=(l=Ne(r,i))&&a.push(Hn(r,l,s))),r=r.return}0!==a.length&&e.push({event:t,listeners:a})}var Kn=/\r\n?/g,Qn=/\u0000|\uFFFD/g;function Jn(e){return("string"==typeof e?e:""+e).replace(Kn,"\n").replace(Qn,"")}function Xn(e,t,r){if(t=Jn(t),Jn(e)!==t&&r)throw Error(i(425))}function Zn(){}var eo=null,to=null;function ro(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var no="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,io="function"==typeof Promise?Promise:void 0,ao="function"==typeof queueMicrotask?queueMicrotask:void 0!==io?function(e){return io.resolve(null).then(e).catch(so)}:no;function so(e){setTimeout(function(){throw e})}function lo(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&8===o.nodeType)if("/$"===(r=o.data)){if(0===n)return e.removeChild(o),void qt(t);n--}else"$"!==r&&"$?"!==r&&"$!"!==r||n++;r=o}while(r);qt(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var r=e.data;if("$"===r||"$!"===r||"$?"===r){if(0===t)return e;t--}else"/$"===r&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,Ao="__reactProps$"+ho,go="__reactContainer$"+ho,fo="__reactEvents$"+ho,vo="__reactListeners$"+ho,mo="__reactHandles$"+ho;function Co(e){var t=e[po];if(t)return t;for(var r=e.parentNode;r;){if(t=r[go]||r[po]){if(r=t.alternate,null!==t.child||null!==r&&null!==r.child)for(e=uo(e);null!==e;){if(r=e[po])return r;e=uo(e)}return t}r=(e=r).parentNode}return null}function wo(e){return!(e=e[po]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function yo(e){return e[Ao]||null}var ko=[],xo=-1;function So(e){return{current:e}}function _o(e){0>xo||(e.current=ko[xo],ko[xo]=null,xo--)}function Bo(e,t){xo++,ko[xo]=e.current,e.current=t}var Eo={},Io=So(Eo),To=So(!1),Ro=Eo;function No(e,t){var r=e.type.contextTypes;if(!r)return Eo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in r)i[o]=t[o];return n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oo(e){return null!=e.childContextTypes}function Lo(){_o(To),_o(Io)}function Do(e,t,r){if(Io.current!==Eo)throw Error(i(168));Bo(Io,t),Bo(To,r)}function Po(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,"function"!=typeof n.getChildContext)return r;for(var o in n=n.getChildContext())if(!(o in t))throw Error(i(108,$(e)||"Unknown",o));return M({},r,n)}function Mo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Eo,Ro=Io.current,Bo(Io,e),Bo(To,To.current),!0}function Uo(e,t,r){var n=e.stateNode;if(!n)throw Error(i(169));r?(e=Po(e,t,Ro),n.__reactInternalMemoizedMergedChildContext=e,_o(To),_o(Io),Bo(Io,e)):_o(To),Bo(To,r)}var Fo=null,jo=!1,zo=!1;function qo(e){null===Fo?Fo=[e]:Fo.push(e)}function $o(){if(!zo&&null!==Fo){zo=!0;var e=0,t=Ct;try{var r=Fo;for(Ct=1;e<r.length;e++){var n=r[e];do{n=n(!0)}while(null!==n)}Fo=null,jo=!1}catch(t){throw null!==Fo&&(Fo=Fo.slice(e+1)),Ge(Ze,$o),t}finally{Ct=t,zo=!1}}return null}var Wo=[],Ho=0,Vo=null,Go=0,Yo=[],Ko=0,Qo=null,Jo=1,Xo="";function Zo(e,t){Wo[Ho++]=Go,Wo[Ho++]=Vo,Vo=e,Go=t}function ei(e,t,r){Yo[Ko++]=Jo,Yo[Ko++]=Xo,Yo[Ko++]=Qo,Qo=e;var n=Jo;e=Xo;var o=32-at(n)-1;n&=~(1<<o),r+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Jo=1<<32-at(t)+o|r<<o|n,Xo=i+e}else Jo=1<<i|r<<o|n,Xo=e}function ti(e){null!==e.return&&(Zo(e,1),ei(e,1,0))}function ri(e){for(;e===Vo;)Vo=Wo[--Ho],Wo[Ho]=null,Go=Wo[--Ho],Wo[Ho]=null;for(;e===Qo;)Qo=Yo[--Ko],Yo[Ko]=null,Xo=Yo[--Ko],Yo[Ko]=null,Jo=Yo[--Ko],Yo[Ko]=null}var ni=null,oi=null,ii=!1,ai=null;function si(e,t){var r=Rc(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,null===(t=e.deletions)?(e.deletions=[r],e.flags|=16):t.push(r)}function li(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ni=e,oi=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ni=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(r=null!==Qo?{id:Jo,overflow:Xo}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},(r=Rc(18,null,null,0)).stateNode=t,r.return=e,e.child=r,ni=e,oi=null,!0);default:return!1}}function ci(e){return!(!(1&e.mode)||128&e.flags)}function di(e){if(ii){var t=oi;if(t){var r=t;if(!li(e,t)){if(ci(e))throw Error(i(418));t=co(r.nextSibling);var n=ni;t&&li(e,t)?si(n,r):(e.flags=-4097&e.flags|2,ii=!1,ni=e)}}else{if(ci(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ni=e}}}function ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ni=e}function hi(e){if(e!==ni)return!1;if(!ii)return ui(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ro(e.type,e.memoizedProps)),t&&(t=oi)){if(ci(e))throw pi(),Error(i(418));for(;t;)si(e,t),t=co(t.nextSibling)}if(ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){oi=co(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}oi=null}}else oi=ni?co(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=co(e.nextSibling)}function Ai(){oi=ni=null,ii=!1}function gi(e){null===ai?ai=[e]:ai.push(e)}var fi=w.ReactCurrentBatchConfig;function vi(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(i(309));var n=r.stateNode}if(!n)throw Error(i(147,e));var o=n,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!r._owner)throw Error(i(290,e))}return e}function mi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ci(e){return(0,e._init)(e._payload)}function wi(e){function t(t,r){if(e){var n=t.deletions;null===n?(t.deletions=[r],t.flags|=16):n.push(r)}}function r(r,n){if(!e)return null;for(;null!==n;)t(r,n),n=n.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Oc(e,t)).index=0,e.sibling=null,e}function a(t,r,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<r?(t.flags|=2,r):n:(t.flags|=2,r):(t.flags|=1048576,r)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,r,n){return null===t||6!==t.tag?((t=Mc(r,e.mode,n)).return=e,t):((t=o(t,r)).return=e,t)}function c(e,t,r,n){var i=r.type;return i===k?u(e,t,r.props.children,n,r.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===N&&Ci(i)===t.type)?((n=o(t,r.props)).ref=vi(e,t,r),n.return=e,n):((n=Lc(r.type,r.key,r.props,null,e.mode,n)).ref=vi(e,t,r),n.return=e,n)}function d(e,t,r,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==r.containerInfo||t.stateNode.implementation!==r.implementation?((t=Uc(r,e.mode,n)).return=e,t):((t=o(t,r.children||[])).return=e,t)}function u(e,t,r,n,i){return null===t||7!==t.tag?((t=Dc(r,e.mode,n,i)).return=e,t):((t=o(t,r)).return=e,t)}function h(e,t,r){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Mc(""+t,e.mode,r)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(r=Lc(t.type,t.key,t.props,null,e.mode,r)).ref=vi(e,null,t),r.return=e,r;case y:return(t=Uc(t,e.mode,r)).return=e,t;case N:return h(e,(0,t._init)(t._payload),r)}if(te(t)||D(t))return(t=Dc(t,e.mode,r,null)).return=e,t;mi(e,t)}return null}function p(e,t,r,n){var o=null!==t?t.key:null;if("string"==typeof r&&""!==r||"number"==typeof r)return null!==o?null:l(e,t,""+r,n);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return r.key===o?c(e,t,r,n):null;case y:return r.key===o?d(e,t,r,n):null;case N:return p(e,t,(o=r._init)(r._payload),n)}if(te(r)||D(r))return null!==o?null:u(e,t,r,n,null);mi(e,r)}return null}function A(e,t,r,n,o){if("string"==typeof n&&""!==n||"number"==typeof n)return l(t,e=e.get(r)||null,""+n,o);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return c(t,e=e.get(null===n.key?r:n.key)||null,n,o);case y:return d(t,e=e.get(null===n.key?r:n.key)||null,n,o);case N:return A(e,t,r,(0,n._init)(n._payload),o)}if(te(n)||D(n))return u(t,e=e.get(r)||null,n,o,null);mi(t,n)}return null}function g(o,i,s,l){for(var c=null,d=null,u=i,g=i=0,f=null;null!==u&&g<s.length;g++){u.index>g?(f=u,u=null):f=u.sibling;var v=p(o,u,s[g],l);if(null===v){null===u&&(u=f);break}e&&u&&null===v.alternate&&t(o,u),i=a(v,i,g),null===d?c=v:d.sibling=v,d=v,u=f}if(g===s.length)return r(o,u),ii&&Zo(o,g),c;if(null===u){for(;g<s.length;g++)null!==(u=h(o,s[g],l))&&(i=a(u,i,g),null===d?c=u:d.sibling=u,d=u);return ii&&Zo(o,g),c}for(u=n(o,u);g<s.length;g++)null!==(f=A(u,o,g,s[g],l))&&(e&&null!==f.alternate&&u.delete(null===f.key?g:f.key),i=a(f,i,g),null===d?c=f:d.sibling=f,d=f);return e&&u.forEach(function(e){return t(o,e)}),ii&&Zo(o,g),c}function f(o,s,l,c){var d=D(l);if("function"!=typeof d)throw Error(i(150));if(null==(l=d.call(l)))throw Error(i(151));for(var u=d=null,g=s,f=s=0,v=null,m=l.next();null!==g&&!m.done;f++,m=l.next()){g.index>f?(v=g,g=null):v=g.sibling;var C=p(o,g,m.value,c);if(null===C){null===g&&(g=v);break}e&&g&&null===C.alternate&&t(o,g),s=a(C,s,f),null===u?d=C:u.sibling=C,u=C,g=v}if(m.done)return r(o,g),ii&&Zo(o,f),d;if(null===g){for(;!m.done;f++,m=l.next())null!==(m=h(o,m.value,c))&&(s=a(m,s,f),null===u?d=m:u.sibling=m,u=m);return ii&&Zo(o,f),d}for(g=n(o,g);!m.done;f++,m=l.next())null!==(m=A(g,o,f,m.value,c))&&(e&&null!==m.alternate&&g.delete(null===m.key?f:m.key),s=a(m,s,f),null===u?d=m:u.sibling=m,u=m);return e&&g.forEach(function(e){return t(o,e)}),ii&&Zo(o,f),d}return function e(n,i,a,l){if("object"==typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var c=a.key,d=i;null!==d;){if(d.key===c){if((c=a.type)===k){if(7===d.tag){r(n,d.sibling),(i=o(d,a.props.children)).return=n,n=i;break e}}else if(d.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===N&&Ci(c)===d.type){r(n,d.sibling),(i=o(d,a.props)).ref=vi(n,d,a),i.return=n,n=i;break e}r(n,d);break}t(n,d),d=d.sibling}a.type===k?((i=Dc(a.props.children,n.mode,l,a.key)).return=n,n=i):((l=Lc(a.type,a.key,a.props,null,n.mode,l)).ref=vi(n,i,a),l.return=n,n=l)}return s(n);case y:e:{for(d=a.key;null!==i;){if(i.key===d){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(n,i.sibling),(i=o(i,a.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Uc(a,n.mode,l)).return=n,n=i}return s(n);case N:return e(n,i,(d=a._init)(a._payload),l)}if(te(a))return g(n,i,a,l);if(D(a))return f(n,i,a,l);mi(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,a)).return=n,n=i):(r(n,i),(i=Mc(a,n.mode,l)).return=n,n=i),s(n)):r(n,i)}}var bi=wi(!0),yi=wi(!1),ki=So(null),xi=null,Si=null,_i=null;function Bi(){_i=Si=xi=null}function Ei(e){var t=ki.current;_o(ki),e._currentValue=t}function Ii(e,t,r){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Ti(e,t){xi=e,_i=Si=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Cs=!0),e.firstContext=null)}function Ri(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},null===Si){if(null===xi)throw Error(i(308));Si=e,xi.dependencies={lanes:0,firstContext:e}}else Si=Si.next=e;return t}var Ni=null;function Oi(e){null===Ni?Ni=[e]:Ni.push(e)}function Li(e,t,r,n){var o=t.interleaved;return null===o?(r.next=r,Oi(t)):(r.next=o.next,o.next=r),t.interleaved=r,Di(e,n)}function Di(e,t){e.lanes|=t;var r=e.alternate;for(null!==r&&(r.lanes|=t),r=e,e=e.return;null!==e;)e.childLanes|=t,null!==(r=e.alternate)&&(r.childLanes|=t),r=e,e=e.return;return 3===r.tag?r.stateNode:null}var Pi=!1;function Mi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ji(e,t,r){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,2&El){var o=n.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),n.pending=t,Di(e,r)}return null===(o=n.interleaved)?(t.next=t,Oi(n)):(t.next=o.next,o.next=t),n.interleaved=t,Di(e,r)}function zi(e,t,r){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&r)){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,mt(e,r)}}function qi(e,t){var r=e.updateQueue,n=e.alternate;if(null!==n&&r===(n=n.updateQueue)){var o=null,i=null;if(null!==(r=r.firstBaseUpdate)){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};null===i?o=i=a:i=i.next=a,r=r.next}while(null!==r);null===i?o=i=t:i=i.next=t}else o=i=t;return r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},void(e.updateQueue=r)}null===(e=r.lastBaseUpdate)?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function $i(e,t,r,n){var o=e.updateQueue;Pi=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var d=e.alternate;null!==d&&(s=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l)}if(null!==i){var u=o.baseState;for(a=0,d=c=l=null,s=i;;){var h=s.lane,p=s.eventTime;if((n&h)===h){null!==d&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var A=e,g=s;switch(h=t,p=r,g.tag){case 1:if("function"==typeof(A=g.payload)){u=A.call(p,u,h);break e}u=A;break e;case 3:A.flags=-65537&A.flags|128;case 0:if(null==(h="function"==typeof(A=g.payload)?A.call(p,u,h):A))break e;u=M({},u,h);break e;case 2:Pi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=p,l=u):d=d.next=p,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===d&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Pl|=a,e.lanes=a,e.memoizedState=u}}function Wi(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(null!==o){if(n.callback=null,n=r,"function"!=typeof o)throw Error(i(191,o));o.call(n)}}}var Hi={},Vi=So(Hi),Gi=So(Hi),Yi=So(Hi);function Ki(e){if(e===Hi)throw Error(i(174));return e}function Qi(e,t){switch(Bo(Yi,t),Bo(Gi,e),Bo(Vi,Hi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_o(Vi),Bo(Vi,t)}function Ji(){_o(Vi),_o(Gi),_o(Yi)}function Xi(e){Ki(Yi.current);var t=Ki(Vi.current),r=le(t,e.type);t!==r&&(Bo(Gi,e),Bo(Vi,r))}function Zi(e){Gi.current===e&&(_o(Vi),_o(Gi))}var ea=So(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var r=t.memoizedState;if(null!==r&&(null===(r=r.dehydrated)||"$?"===r.data||"$!"===r.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function na(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=w.ReactCurrentDispatcher,ia=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,da=!1,ua=!1,ha=0,pa=0;function Aa(){throw Error(i(321))}function ga(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sn(e[r],t[r]))return!1;return!0}function fa(e,t,r,n,o,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?Za:es,e=r(n,o),ua){a=0;do{if(ua=!1,ha=0,25<=a)throw Error(i(301));a+=1,ca=la=null,t.updateQueue=null,oa.current=ts,e=r(n,o)}while(ua)}if(oa.current=Xa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,da=!1,t)throw Error(i(300));return e}function va(){var e=0!==ha;return ha=0,e}function ma(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function Ca(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(i(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function ba(e){var t=Ca(),r=t.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=e;var n=la,o=n.baseQueue,a=r.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}n.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,n=n.baseState;var l=s=null,c=null,d=a;do{var u=d.lane;if((aa&u)===u)null!==c&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var h={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};null===c?(l=c=h,s=n):c=c.next=h,sa.lanes|=u,Pl|=u}d=d.next}while(null!==d&&d!==a);null===c?s=n:c.next=l,sn(n,t.memoizedState)||(Cs=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=c,r.lastRenderedState=n}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,sa.lanes|=a,Pl|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ya(e){var t=Ca(),r=t.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sn(a,t.memoizedState)||(Cs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function ka(){}function xa(e,t){var r=sa,n=Ca(),o=t(),a=!sn(n.memoizedState,o);if(a&&(n.memoizedState=o,Cs=!0),n=n.queue,Pa(Ba.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(r.flags|=2048,Ra(9,_a.bind(null,r,n,o,t),void 0,null),null===Il)throw Error(i(349));30&aa||Sa(r,t,o)}return o}function Sa(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(r=t.stores)?t.stores=[e]:r.push(e)}function _a(e,t,r,n){t.value=r,t.getSnapshot=n,Ea(t)&&Ia(e)}function Ba(e,t,r){return r(function(){Ea(t)&&Ia(e)})}function Ea(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!sn(e,r)}catch(e){return!0}}function Ia(e){var t=Di(e,1);null!==t&&rc(t,e,1,-1)}function Ta(e){var t=ma();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[t.memoizedState,e]}function Ra(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(r=t.lastEffect)?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function Na(){return Ca().memoizedState}function Oa(e,t,r,n){var o=ma();sa.flags|=e,o.memoizedState=Ra(1|t,r,void 0,void 0===n?null:n)}function La(e,t,r,n){var o=Ca();n=void 0===n?null:n;var i=void 0;if(null!==la){var a=la.memoizedState;if(i=a.destroy,null!==n&&ga(n,a.deps))return void(o.memoizedState=Ra(t,r,i,n))}sa.flags|=e,o.memoizedState=Ra(1|t,r,i,n)}function Da(e,t){return Oa(8390656,8,e,t)}function Pa(e,t){return La(2048,8,e,t)}function Ma(e,t){return La(4,2,e,t)}function Ua(e,t){return La(4,4,e,t)}function Fa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ja(e,t,r){return r=null!=r?r.concat([e]):null,La(4,4,Fa.bind(null,t,e),r)}function za(){}function qa(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&ga(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function $a(e,t){var r=Ca();t=void 0===t?null:t;var n=r.memoizedState;return null!==n&&null!==t&&ga(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Wa(e,t,r){return 21&aa?(sn(r,t)||(r=gt(),sa.lanes|=r,Pl|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Cs=!0),e.memoizedState=r)}function Ha(e,t){var r=Ct;Ct=0!==r&&4>r?r:4,e(!0);var n=ia.transition;ia.transition={};try{e(!1),t()}finally{Ct=r,ia.transition=n}}function Va(){return Ca().memoizedState}function Ga(e,t,r){var n=tc(e);r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Ka(e)?Qa(t,r):null!==(r=Li(e,t,r,n))&&(rc(r,e,n,ec()),Ja(r,t,n))}function Ya(e,t,r){var n=tc(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ka(e))Qa(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,sn(s,a)){var l=t.interleaved;return null===l?(o.next=o,Oi(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(e){}null!==(r=Li(e,t,o,n))&&(rc(r,e,n,o=ec()),Ja(r,t,n))}}function Ka(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Qa(e,t){ua=da=!0;var r=e.pending;null===r?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ja(e,t,r){if(4194240&r){var n=t.lanes;r|=n&=e.pendingLanes,t.lanes=r,mt(e,r)}}var Xa={readContext:Ri,useCallback:Aa,useContext:Aa,useEffect:Aa,useImperativeHandle:Aa,useInsertionEffect:Aa,useLayoutEffect:Aa,useMemo:Aa,useReducer:Aa,useRef:Aa,useState:Aa,useDebugValue:Aa,useDeferredValue:Aa,useTransition:Aa,useMutableSource:Aa,useSyncExternalStore:Aa,useId:Aa,unstable_isNewReconciler:!1},Za={readContext:Ri,useCallback:function(e,t){return ma().memoizedState=[e,void 0===t?null:t],e},useContext:Ri,useEffect:Da,useImperativeHandle:function(e,t,r){return r=null!=r?r.concat([e]):null,Oa(4194308,4,Fa.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Oa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Oa(4,2,e,t)},useMemo:function(e,t){var r=ma();return t=void 0===t?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ma();return t=void 0!==r?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Ga.bind(null,sa,e),[n.memoizedState,e]},useRef:function(e){return e={current:e},ma().memoizedState=e},useState:Ta,useDebugValue:za,useDeferredValue:function(e){return ma().memoizedState=e},useTransition:function(){var e=Ta(!1),t=e[0];return e=Ha.bind(null,e[1]),ma().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=sa,o=ma();if(ii){if(void 0===r)throw Error(i(407));r=r()}else{if(r=t(),null===Il)throw Error(i(349));30&aa||Sa(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Da(Ba.bind(null,n,a,e),[e]),n.flags|=2048,Ra(9,_a.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ma(),t=Il.identifierPrefix;if(ii){var r=Xo;t=":"+t+"R"+(r=(Jo&~(1<<32-at(Jo)-1)).toString(32)+r),0<(r=ha++)&&(t+="H"+r.toString(32)),t+=":"}else t=":"+t+"r"+(r=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Ri,useCallback:qa,useContext:Ri,useEffect:Pa,useImperativeHandle:ja,useInsertionEffect:Ma,useLayoutEffect:Ua,useMemo:$a,useReducer:ba,useRef:Na,useState:function(){return ba(wa)},useDebugValue:za,useDeferredValue:function(e){return Wa(Ca(),la.memoizedState,e)},useTransition:function(){return[ba(wa)[0],Ca().memoizedState]},useMutableSource:ka,useSyncExternalStore:xa,useId:Va,unstable_isNewReconciler:!1},ts={readContext:Ri,useCallback:qa,useContext:Ri,useEffect:Pa,useImperativeHandle:ja,useInsertionEffect:Ma,useLayoutEffect:Ua,useMemo:$a,useReducer:ya,useRef:Na,useState:function(){return ya(wa)},useDebugValue:za,useDeferredValue:function(e){var t=Ca();return null===la?t.memoizedState=e:Wa(t,la.memoizedState,e)},useTransition:function(){return[ya(wa)[0],Ca().memoizedState]},useMutableSource:ka,useSyncExternalStore:xa,useId:Va,unstable_isNewReconciler:!1};function rs(e,t){if(e&&e.defaultProps){for(var r in t=M({},t),e=e.defaultProps)void 0===t[r]&&(t[r]=e[r]);return t}return t}function ns(e,t,r,n){r=null==(r=r(n,t=e.memoizedState))?t:M({},t,r),e.memoizedState=r,0===e.lanes&&(e.updateQueue.baseState=r)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&qe(e)===e},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ec(),o=tc(e),i=Fi(n,o);i.payload=t,null!=r&&(i.callback=r),null!==(t=ji(e,i,o))&&(rc(t,e,o,n),zi(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ec(),o=tc(e),i=Fi(n,o);i.tag=1,i.payload=t,null!=r&&(i.callback=r),null!==(t=ji(e,i,o))&&(rc(t,e,o,n),zi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ec(),n=tc(e),o=Fi(r,n);o.tag=2,null!=t&&(o.callback=t),null!==(t=ji(e,o,n))&&(rc(t,e,n,r),zi(t,e,n))}};function is(e,t,r,n,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&ln(r,n)&&ln(o,i))}function as(e,t,r){var n=!1,o=Eo,i=t.contextType;return"object"==typeof i&&null!==i?i=Ri(i):(o=Oo(t)?Ro:Io.current,i=(n=null!=(n=t.contextTypes))?No(e,o):Eo),t=new t(r,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,n&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ss(e,t,r,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},Mi(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=Ri(i):(i=Oo(t)?Ro:Io.current,o.context=No(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(ns(e,t,i,r),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&os.enqueueReplaceState(o,o.state,null),$i(e,r,o,n),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var r="",n=t;do{r+=z(n),n=n.return}while(n);var o=r}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function ds(e,t,r){return{value:e,source:null,stack:null!=r?r:null,digest:null!=t?t:null}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,r){(r=Fi(-1,r)).tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Wl||(Wl=!0,Hl=n),us(0,t)},r}function As(e,t,r){(r=Fi(-1,r)).tag=3;var n=e.type.getDerivedStateFromError;if("function"==typeof n){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){us(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(r.callback=function(){us(0,t),"function"!=typeof n&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),r}function gs(e,t,r){var n=e.pingCache;if(null===n){n=e.pingCache=new hs;var o=new Set;n.set(t,o)}else void 0===(o=n.get(t))&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=Sc.bind(null,e,t,r),t.then(e,e))}function fs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,r,n,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,1===r.tag&&(null===r.alternate?r.tag=17:((t=Fi(-1,1)).tag=2,ji(r,t,1))),r.lanes|=1),e)}var ms=w.ReactCurrentOwner,Cs=!1;function ws(e,t,r,n){t.child=null===e?yi(t,null,r,n):bi(t,e.child,r,n)}function bs(e,t,r,n,o){r=r.render;var i=t.ref;return Ti(t,o),n=fa(e,t,r,n,i,o),r=va(),null===e||Cs?(ii&&r&&ti(t),t.flags|=1,ws(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function ys(e,t,r,n,o){if(null===e){var i=r.type;return"function"!=typeof i||Nc(i)||void 0!==i.defaultProps||null!==r.compare||void 0!==r.defaultProps?((e=Lc(r.type,null,n,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,ks(e,t,i,n,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((r=null!==(r=r.compare)?r:ln)(a,n)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Oc(i,n)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,r,n,o){if(null!==e){var i=e.memoizedProps;if(ln(i,n)&&e.ref===t.ref){if(Cs=!1,t.pendingProps=n=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);131072&e.flags&&(Cs=!0)}}return _s(e,t,r,n,o)}function xs(e,t,r){var n=t.pendingProps,o=n.children,i=null!==e?e.memoizedState:null;if("hidden"===n.mode)if(1&t.mode){if(!(1073741824&r))return e=null!==i?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Bo(Ol,Nl),Nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=null!==i?i.baseLanes:r,Bo(Ol,Nl),Nl|=n}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Bo(Ol,Nl),Nl|=r;else null!==i?(n=i.baseLanes|r,t.memoizedState=null):n=r,Bo(Ol,Nl),Nl|=n;return ws(e,t,o,r),t.child}function Ss(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function _s(e,t,r,n,o){var i=Oo(r)?Ro:Io.current;return i=No(t,i),Ti(t,o),r=fa(e,t,r,n,i,o),n=va(),null===e||Cs?(ii&&n&&ti(t),t.flags|=1,ws(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Bs(e,t,r,n,o){if(Oo(r)){var i=!0;Mo(t)}else i=!1;if(Ti(t,o),null===t.stateNode)$s(e,t),as(t,r,n),ls(t,r,n,o),n=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;c="object"==typeof c&&null!==c?Ri(c):No(t,c=Oo(r)?Ro:Io.current);var d=r.getDerivedStateFromProps,u="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate;u||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==n||l!==c)&&ss(t,a,n,c),Pi=!1;var h=t.memoizedState;a.state=h,$i(t,n,a,o),l=t.memoizedState,s!==n||h!==l||To.current||Pi?("function"==typeof d&&(ns(t,r,d,n),l=t.memoizedState),(s=Pi||is(t,r,s,n,h,l,c))?(u||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,Ui(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rs(t.type,s),a.props=c,u=t.pendingProps,h=a.context,l="object"==typeof(l=r.contextType)&&null!==l?Ri(l):No(t,l=Oo(r)?Ro:Io.current);var p=r.getDerivedStateFromProps;(d="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==u||h!==l)&&ss(t,a,n,l),Pi=!1,h=t.memoizedState,a.state=h,$i(t,n,a,o);var A=t.memoizedState;s!==u||h!==A||To.current||Pi?("function"==typeof p&&(ns(t,r,p,n),A=t.memoizedState),(c=Pi||is(t,r,c,n,h,A,l)||!1)?(d||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,A,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,A,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=A),a.props=n,a.state=A,a.context=l,n=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Es(e,t,r,n,i,o)}function Es(e,t,r,n,o,i){Ss(e,t);var a=!!(128&t.flags);if(!n&&!a)return o&&Uo(t,r,!1),Ws(e,t,i);n=t.stateNode,ms.current=t;var s=a&&"function"!=typeof r.getDerivedStateFromError?null:n.render();return t.flags|=1,null!==e&&a?(t.child=bi(t,e.child,null,i),t.child=bi(t,null,s,i)):ws(e,t,s,i),t.memoizedState=n.state,o&&Uo(t,r,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Do(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(0,t.context,!1),Qi(e,t.containerInfo)}function Ts(e,t,r,n,o){return Ai(),gi(o),t.flags|=256,ws(e,t,r,n),t.child}var Rs,Ns,Os,Ls,Ds={dehydrated:null,treeContext:null,retryLane:0};function Ps(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ms(e,t,r){var n,o=t.pendingProps,a=ea.current,s=!1,l=!!(128&t.flags);if((n=l)||(n=(null===e||null!==e.memoizedState)&&!!(2&a)),n?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Bo(ea,1&a),null===e)return di(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Pc(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Dc(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ps(r),t.memoizedState=Ds,e):Us(t,l));if(null!==(a=e.memoizedState)&&null!==(n=a.dehydrated))return function(e,t,r,n,o,a,s){if(r)return 256&t.flags?(t.flags&=-257,Fs(e,t,s,n=ds(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=Pc({mode:"visible",children:n.children},o,0,null),(a=Dc(a,o,s,null)).flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,1&t.mode&&bi(t,e.child,null,s),t.child.memoizedState=Ps(s),t.memoizedState=Ds,a);if(!(1&t.mode))return Fs(e,t,s,null);if("$!"===o.data){if(n=o.nextSibling&&o.nextSibling.dataset)var l=n.dgst;return n=l,Fs(e,t,s,n=ds(a=Error(i(419)),n,void 0))}if(l=0!==(s&e.childLanes),Cs||l){if(null!==(n=Il)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(n.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Di(e,o),rc(n,e,o,-1))}return gc(),Fs(e,t,s,n=ds(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Bc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=co(o.nextSibling),ni=t,ii=!0,ai=null,null!==e&&(Yo[Ko++]=Jo,Yo[Ko++]=Xo,Yo[Ko++]=Qo,Jo=e.id,Xo=e.overflow,Qo=t),(t=Us(t,n.children)).flags|=4096,t)}(e,t,l,o,n,a,r);if(s){s=o.fallback,l=t.mode,n=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===a?(o=Oc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==n?s=Oc(n,s):(s=Dc(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ps(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Ds,o}return e=(s=e.child).sibling,o=Oc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Us(e,t){return(t=Pc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fs(e,t,r,n){return null!==n&&gi(n),bi(t,e.child,null,r),(e=Us(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function js(e,t,r){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Ii(e.return,t,r)}function zs(e,t,r,n,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function qs(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(ws(e,t,n.children,r),2&(n=ea.current))n=1&n|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&js(e,r,t);else if(19===e.tag)js(e,r,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Bo(ea,n),1&t.mode)switch(o){case"forwards":for(r=t.child,o=null;null!==r;)null!==(e=r.alternate)&&null===ta(e)&&(o=r),r=r.sibling;null===(r=o)?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),zs(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ta(e)){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}zs(t,!0,r,null,i);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function $s(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ws(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Pl|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(r=Oc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=Oc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Hs(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;null!==r;)null!==r.alternate&&(n=r),r=r.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Vs(e){var t=null!==e.alternate&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=14680064&o.subtreeFlags,n|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Gs(e,t,r){var n=t.pendingProps;switch(ri(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vs(t),null;case 1:case 17:return Oo(t.type)&&Lo(),Vs(t),null;case 3:return n=t.stateNode,Ji(),_o(To),_o(Io),na(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ai&&(ac(ai),ai=null))),Ns(e,t),Vs(t),null;case 5:Zi(t);var o=Ki(Yi.current);if(r=t.type,null!==e&&null!=t.stateNode)Os(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(null===t.stateNode)throw Error(i(166));return Vs(t),null}if(e=Ki(Vi.current),hi(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[po]=t,n[Ao]=a,e=!!(1&t.mode),r){case"dialog":Fn("cancel",n),Fn("close",n);break;case"iframe":case"object":case"embed":Fn("load",n);break;case"video":case"audio":for(o=0;o<Dn.length;o++)Fn(Dn[o],n);break;case"source":Fn("error",n);break;case"img":case"image":case"link":Fn("error",n),Fn("load",n);break;case"details":Fn("toggle",n);break;case"input":Q(n,a),Fn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Fn("invalid",n);break;case"textarea":oe(n,a),Fn("invalid",n)}for(var l in me(r,a),o=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?n.textContent!==c&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,c,e),o=["children",c]):"number"==typeof c&&n.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Xn(n.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fn("scroll",n)}switch(r){case"input":V(n),Z(n,a,!0);break;case"textarea":V(n),ae(n);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(n.onclick=Zn)}n=o,t.updateQueue=n,null!==n&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof n.is?e=l.createElement(r,{is:n.is}):(e=l.createElement(r),"select"===r&&(l=e,n.multiple?l.multiple=!0:n.size&&(l.size=n.size))):e=l.createElementNS(e,r),e[po]=t,e[Ao]=n,Rs(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ce(r,n),r){case"dialog":Fn("cancel",e),Fn("close",e),o=n;break;case"iframe":case"object":case"embed":Fn("load",e),o=n;break;case"video":case"audio":for(o=0;o<Dn.length;o++)Fn(Dn[o],e);o=n;break;case"source":Fn("error",e),o=n;break;case"img":case"image":case"link":Fn("error",e),Fn("load",e),o=n;break;case"details":Fn("toggle",e),o=n;break;case"input":Q(e,n),o=K(e,n),Fn("invalid",e);break;case"option":default:o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=M({},n,{value:void 0}),Fn("invalid",e);break;case"textarea":oe(e,n),o=ne(e,n),Fn("invalid",e)}for(a in me(r,o),c=o)if(c.hasOwnProperty(a)){var d=c[a];"style"===a?fe(e,d):"dangerouslySetInnerHTML"===a?null!=(d=d?d.__html:void 0)&&ue(e,d):"children"===a?"string"==typeof d?("textarea"!==r||""!==d)&&he(e,d):"number"==typeof d&&he(e,""+d):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=d&&"onScroll"===a&&Fn("scroll",e):null!=d&&C(e,a,d,l))}switch(r){case"input":V(e),Z(e,n,!1);break;case"textarea":V(e),ae(e);break;case"option":null!=n.value&&e.setAttribute("value",""+W(n.value));break;case"select":e.multiple=!!n.multiple,null!=(a=n.value)?re(e,!!n.multiple,a,!1):null!=n.defaultValue&&re(e,!!n.multiple,n.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Zn)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vs(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,n);else{if("string"!=typeof n&&null===t.stateNode)throw Error(i(166));if(r=Ki(Yi.current),Ki(Vi.current),hi(t)){if(n=t.stateNode,r=t.memoizedProps,n[po]=t,(a=n.nodeValue!==r)&&null!==(e=ni))switch(e.tag){case 3:Xn(n.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xn(n.nodeValue,r,!!(1&e.mode))}a&&(t.flags|=4)}else(n=(9===r.nodeType?r:r.ownerDocument).createTextNode(n))[po]=t,t.stateNode=n}return Vs(t),null;case 13:if(_o(ea),n=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&1&t.mode&&!(128&t.flags))pi(),Ai(),t.flags|=98560,a=!1;else if(a=hi(t),null!==n&&null!==n.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[po]=t}else Ai(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vs(t),a=!1}else null!==ai&&(ac(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((n=null!==n)!=(null!==e&&null!==e.memoizedState)&&n&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ea.current?0===Ll&&(Ll=3):gc())),null!==t.updateQueue&&(t.flags|=4),Vs(t),null);case 4:return Ji(),Ns(e,t),null===e&&qn(t.stateNode.containerInfo),Vs(t),null;case 10:return Ei(t.type._context),Vs(t),null;case 19:if(_o(ea),null===(a=t.memoizedState))return Vs(t),null;if(n=!!(128&t.flags),null===(l=a.rendering))if(n)Hs(a,!1);else{if(0!==Ll||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Hs(a,!1),null!==(n=l.updateQueue)&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;null!==r;)e=n,(a=r).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Bo(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>ql&&(t.flags|=128,n=!0,Hs(a,!1),t.lanes=4194304)}else{if(!n)if(null!==(e=ta(l))){if(t.flags|=128,n=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Hs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ii)return Vs(t),null}else 2*Je()-a.renderingStartTime>ql&&1073741824!==r&&(t.flags|=128,n=!0,Hs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=a.last)?r.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,r=ea.current,Bo(ea,n?1&r|2:1&r),t):(Vs(t),null);case 22:case 23:return uc(),n=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==n&&(t.flags|=8192),n&&1&t.mode?!!(1073741824&Nl)&&(Vs(t),6&t.subtreeFlags&&(t.flags|=8192)):Vs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Ys(e,t){switch(ri(t),t.tag){case 1:return Oo(t.type)&&Lo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Ji(),_o(To),_o(Io),na(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zi(t),null;case 13:if(_o(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));Ai()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _o(ea),null;case 4:return Ji(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Rs=function(e,t){for(var r=t.child;null!==r;){if(5===r.tag||6===r.tag)e.appendChild(r.stateNode);else if(4!==r.tag&&null!==r.child){r.child.return=r,r=r.child;continue}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Ns=function(){},Os=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Ki(Vi.current);var i,a=null;switch(r){case"input":o=K(e,o),n=K(e,n),a=[];break;case"select":o=M({},o,{value:void 0}),n=M({},n,{value:void 0}),a=[];break;case"textarea":o=ne(e,o),n=ne(e,n),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof n.onClick&&(e.onclick=Zn)}for(d in me(r,n),r=null,o)if(!n.hasOwnProperty(d)&&o.hasOwnProperty(d)&&null!=o[d])if("style"===d){var l=o[d];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(s.hasOwnProperty(d)?a||(a=[]):(a=a||[]).push(d,null));for(d in n){var c=n[d];if(l=null!=o?o[d]:void 0,n.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(a||(a=[]),a.push(d,r)),r=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(d,c)):"children"===d?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(s.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Fn("scroll",e),a||l===c||(a=[])):(a=a||[]).push(d,c))}r&&(a=a||[]).push("style",r);var d=a;(t.updateQueue=d)&&(t.flags|=4)}},Ls=function(e,t,r,n){r!==n&&(t.flags|=4)};var Ks=!1,Qs=!1,Js="function"==typeof WeakSet?WeakSet:Set,Xs=null;function Zs(e,t){var r=e.ref;if(null!==r)if("function"==typeof r)try{r(null)}catch(r){xc(e,t,r)}else r.current=null}function el(e,t,r){try{r()}catch(r){xc(e,t,r)}}var tl=!1;function rl(e,t,r){var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&el(t,r,i)}o=o.next}while(o!==n)}}function nl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ol(e){var t=e.ref;if(null!==t){var r=e.stateNode;e.tag,e=r,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[po],delete t[Ao],delete t[fo],delete t[vo],delete t[mo]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?8===r.nodeType?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(8===r.nodeType?(t=r.parentNode).insertBefore(e,r):(t=r).appendChild(e),null!=(r=r._reactRootContainer)||null!==t.onclick||(t.onclick=Zn));else if(4!==n&&null!==(e=e.child))for(ll(e,t,r),e=e.sibling;null!==e;)ll(e,t,r),e=e.sibling}function cl(e,t,r){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(4!==n&&null!==(e=e.child))for(cl(e,t,r),e=e.sibling;null!==e;)cl(e,t,r),e=e.sibling}var dl=null,ul=!1;function hl(e,t,r){for(r=r.child;null!==r;)pl(e,t,r),r=r.sibling}function pl(e,t,r){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,r)}catch(e){}switch(r.tag){case 5:Qs||Zs(r,t);case 6:var n=dl,o=ul;dl=null,hl(e,t,r),ul=o,null!==(dl=n)&&(ul?(e=dl,r=r.stateNode,8===e.nodeType?e.parentNode.removeChild(r):e.removeChild(r)):dl.removeChild(r.stateNode));break;case 18:null!==dl&&(ul?(e=dl,r=r.stateNode,8===e.nodeType?lo(e.parentNode,r):1===e.nodeType&&lo(e,r),qt(e)):lo(dl,r.stateNode));break;case 4:n=dl,o=ul,dl=r.stateNode.containerInfo,ul=!0,hl(e,t,r),dl=n,ul=o;break;case 0:case 11:case 14:case 15:if(!Qs&&null!==(n=r.updateQueue)&&null!==(n=n.lastEffect)){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(2&i||4&i)&&el(r,t,a),o=o.next}while(o!==n)}hl(e,t,r);break;case 1:if(!Qs&&(Zs(r,t),"function"==typeof(n=r.stateNode).componentWillUnmount))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(e){xc(r,t,e)}hl(e,t,r);break;case 21:hl(e,t,r);break;case 22:1&r.mode?(Qs=(n=Qs)||null!==r.memoizedState,hl(e,t,r),Qs=n):hl(e,t,r);break;default:hl(e,t,r)}}function Al(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var r=e.stateNode;null===r&&(r=e.stateNode=new Js),t.forEach(function(t){var n=Ec.bind(null,e,t);r.has(t)||(r.add(t),t.then(n,n))})}}function gl(e,t){var r=t.deletions;if(null!==r)for(var n=0;n<r.length;n++){var o=r[n];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:dl=l.stateNode,ul=!1;break e;case 3:case 4:dl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===dl)throw Error(i(160));pl(a,s,o),dl=null,ul=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){xc(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),vl(e),4&n){try{rl(3,e,e.return),nl(3,e)}catch(t){xc(e,e.return,t)}try{rl(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:gl(t,e),vl(e),512&n&&null!==r&&Zs(r,r.return);break;case 5:if(gl(t,e),vl(e),512&n&&null!==r&&Zs(r,r.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(t){xc(e,e.return,t)}}if(4&n&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(o,a),Ce(l,s);var d=Ce(l,a);for(s=0;s<c.length;s+=2){var u=c[s],h=c[s+1];"style"===u?fe(o,h):"dangerouslySetInnerHTML"===u?ue(o,h):"children"===u?he(o,h):C(o,u,h,d)}switch(l){case"input":X(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var A=a.value;null!=A?re(o,!!a.multiple,A,!1):p!==!!a.multiple&&(null!=a.defaultValue?re(o,!!a.multiple,a.defaultValue,!0):re(o,!!a.multiple,a.multiple?[]:"",!1))}o[Ao]=a}catch(t){xc(e,e.return,t)}}break;case 6:if(gl(t,e),vl(e),4&n){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){xc(e,e.return,t)}}break;case 3:if(gl(t,e),vl(e),4&n&&null!==r&&r.memoizedState.isDehydrated)try{qt(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:gl(t,e),vl(e);break;case 13:gl(t,e),vl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(zl=Je())),4&n&&Al(e);break;case 22:if(u=null!==r&&null!==r.memoizedState,1&e.mode?(Qs=(d=Qs)||u,gl(t,e),Qs=d):gl(t,e),vl(e),8192&n){if(d=null!==e.memoizedState,(e.stateNode.isHidden=d)&&!u&&1&e.mode)for(Xs=e,u=e.child;null!==u;){for(h=Xs=u;null!==Xs;){switch(A=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:rl(4,p,p.return);break;case 1:Zs(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){n=p,r=p.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){xc(n,r,e)}}break;case 5:Zs(p,p.return);break;case 22:if(null!==p.memoizedState){bl(h);continue}}null!==A?(A.return=p,Xs=A):bl(h)}u=u.sibling}e:for(u=null,h=e;;){if(5===h.tag){if(null===u){u=h;try{o=h.stateNode,d?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(t){xc(e,e.return,t)}}}else if(6===h.tag){if(null===u)try{h.stateNode.nodeValue=d?"":h.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;u===h&&(u=null),h=h.return}u===h&&(u=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),vl(e),4&n&&Al(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(al(r)){var n=r;break e}r=r.return}throw Error(i(160))}switch(n.tag){case 5:var o=n.stateNode;32&n.flags&&(he(o,""),n.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var a=n.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(i(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ml(e,t,r){Xs=e,Cl(e,t,r)}function Cl(e,t,r){for(var n=!!(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&n){var a=null!==o.memoizedState||Ks;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Qs;s=Ks;var c=Qs;if(Ks=a,(Qs=l)&&!c)for(Xs=o;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?yl(o):null!==l?(l.return=a,Xs=l):yl(o);for(;null!==i;)Xs=i,Cl(i,t,r),i=i.sibling;Xs=o,Ks=s,Qs=c}wl(e)}else 8772&o.subtreeFlags&&null!==i?(i.return=o,Xs=i):wl(e)}}function wl(e){for(;null!==Xs;){var t=Xs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Qs||nl(5,t);break;case 1:var n=t.stateNode;if(4&t.flags&&!Qs)if(null===r)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:rs(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Wi(t,a,n);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}Wi(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var d=t.alternate;if(null!==d){var u=d.memoizedState;if(null!==u){var h=u.dehydrated;null!==h&&qt(h)}}}break;default:throw Error(i(163))}Qs||512&t.flags&&ol(t)}catch(e){xc(t,t.return,e)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function bl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var r=t.sibling;if(null!==r){r.return=t.return,Xs=r;break}Xs=t.return}}function yl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{nl(4,t)}catch(e){xc(t,r,e)}break;case 1:var n=t.stateNode;if("function"==typeof n.componentDidMount){var o=t.return;try{n.componentDidMount()}catch(e){xc(t,o,e)}}var i=t.return;try{ol(t)}catch(e){xc(t,i,e)}break;case 5:var a=t.return;try{ol(t)}catch(e){xc(t,a,e)}}}catch(e){xc(t,t.return,e)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var kl,xl=Math.ceil,Sl=w.ReactCurrentDispatcher,_l=w.ReactCurrentOwner,Bl=w.ReactCurrentBatchConfig,El=0,Il=null,Tl=null,Rl=0,Nl=0,Ol=So(0),Ll=0,Dl=null,Pl=0,Ml=0,Ul=0,Fl=null,jl=null,zl=0,ql=1/0,$l=null,Wl=!1,Hl=null,Vl=null,Gl=!1,Yl=null,Kl=0,Ql=0,Jl=null,Xl=-1,Zl=0;function ec(){return 6&El?Je():-1!==Xl?Xl:Xl=Je()}function tc(e){return 1&e.mode?2&El&&0!==Rl?Rl&-Rl:null!==fi.transition?(0===Zl&&(Zl=gt()),Zl):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:Qt(e.type):1}function rc(e,t,r,n){if(50<Ql)throw Ql=0,Jl=null,Error(i(185));vt(e,r,n),2&El&&e===Il||(e===Il&&(!(2&El)&&(Ml|=r),4===Ll&&sc(e,Rl)),nc(e,n),1===r&&0===El&&!(1&t.mode)&&(ql=Je()+500,jo&&$o()))}function nc(e,t){var r=e.callbackNode;!function(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,l=o[a];-1===l?0!==(s&r)&&0===(s&n)||(o[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var n=ht(e,e===Il?Rl:0);if(0===n)null!==r&&Ye(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(null!=r&&Ye(r),1===t)0===e.tag?function(e){jo=!0,qo(e)}(lc.bind(null,e)):qo(lc.bind(null,e)),ao(function(){!(6&El)&&$o()}),r=null;else{switch(wt(n)){case 1:r=Ze;break;case 4:r=et;break;case 16:default:r=tt;break;case 536870912:r=nt}r=Ic(r,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function oc(e,t){if(Xl=-1,Zl=0,6&El)throw Error(i(327));var r=e.callbackNode;if(yc()&&e.callbackNode!==r)return null;var n=ht(e,e===Il?Rl:0);if(0===n)return null;if(30&n||0!==(n&e.expiredLanes)||t)t=fc(e,n);else{t=n;var o=El;El|=2;var a=Ac();for(Il===e&&Rl===t||($l=null,ql=Je()+500,hc(e,t));;)try{mc();break}catch(t){pc(e,t)}Bi(),Sl.current=a,El=o,null!==Tl?t=0:(Il=null,Rl=0,t=Ll)}if(0!==t){if(2===t&&0!==(o=At(e))&&(n=o,t=ic(e,o)),1===t)throw r=Dl,hc(e,0),sc(e,n),nc(e,Je()),r;if(6===t)sc(e,n);else{if(o=e.current.alternate,!(30&n||function(e){for(var t=e;;){if(16384&t.flags){var r=t.updateQueue;if(null!==r&&null!==(r=r.stores))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!sn(i(),o))return!1}catch(e){return!1}}}if(r=t.child,16384&t.subtreeFlags&&null!==r)r.return=t,t=r;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=fc(e,n),2===t&&(a=At(e),0!==a&&(n=a,t=ic(e,a))),1!==t)))throw r=Dl,hc(e,0),sc(e,n),nc(e,Je()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(i(345));case 2:case 5:bc(e,jl,$l);break;case 3:if(sc(e,n),(130023424&n)===n&&10<(t=zl+500-Je())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&n)!==n){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=no(bc.bind(null,e,jl,$l),t);break}bc(e,jl,$l);break;case 4:if(sc(e,n),(4194240&n)===n)break;for(t=e.eventTimes,o=-1;0<n;){var s=31-at(n);a=1<<s,(s=t[s])>o&&(o=s),n&=~a}if(n=o,10<(n=(120>(n=Je()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xl(n/1960))-n)){e.timeoutHandle=no(bc.bind(null,e,jl,$l),n);break}bc(e,jl,$l);break;default:throw Error(i(329))}}}return nc(e,Je()),e.callbackNode===r?oc.bind(null,e):null}function ic(e,t){var r=Fl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=fc(e,t))&&(t=jl,jl=r,null!==t&&ac(t)),e}function ac(e){null===jl?jl=e:jl.push.apply(jl,e)}function sc(e,t){for(t&=~Ul,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-at(t),n=1<<r;e[r]=-1,t&=~n}}function lc(e){if(6&El)throw Error(i(327));yc();var t=ht(e,0);if(!(1&t))return nc(e,Je()),null;var r=fc(e,t);if(0!==e.tag&&2===r){var n=At(e);0!==n&&(t=n,r=ic(e,n))}if(1===r)throw r=Dl,hc(e,0),sc(e,t),nc(e,Je()),r;if(6===r)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,jl,$l),nc(e,Je()),null}function cc(e,t){var r=El;El|=1;try{return e(t)}finally{0===(El=r)&&(ql=Je()+500,jo&&$o())}}function dc(e){null!==Yl&&0===Yl.tag&&!(6&El)&&yc();var t=El;El|=1;var r=Bl.transition,n=Ct;try{if(Bl.transition=null,Ct=1,e)return e()}finally{Ct=n,Bl.transition=r,!(6&(El=t))&&$o()}}function uc(){Nl=Ol.current,_o(Ol)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(-1!==r&&(e.timeoutHandle=-1,oo(r)),null!==Tl)for(r=Tl.return;null!==r;){var n=r;switch(ri(n),n.tag){case 1:null!=(n=n.type.childContextTypes)&&Lo();break;case 3:Ji(),_o(To),_o(Io),na();break;case 5:Zi(n);break;case 4:Ji();break;case 13:case 19:_o(ea);break;case 10:Ei(n.type._context);break;case 22:case 23:uc()}r=r.return}if(Il=e,Tl=e=Oc(e.current,null),Rl=Nl=t,Ll=0,Dl=null,Ul=Ml=Pl=0,jl=Fl=null,null!==Ni){for(t=0;t<Ni.length;t++)if(null!==(n=(r=Ni[t]).interleaved)){r.interleaved=null;var o=n.next,i=r.pending;if(null!==i){var a=i.next;i.next=o,n.next=a}r.pending=n}Ni=null}return e}function pc(e,t){for(;;){var r=Tl;try{if(Bi(),oa.current=Xa,da){for(var n=sa.memoizedState;null!==n;){var o=n.queue;null!==o&&(o.pending=null),n=n.next}da=!1}if(aa=0,ca=la=sa=null,ua=!1,ha=0,_l.current=null,null===r||null===r.return){Ll=1,Dl=t,Tl=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=Rl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var d=c,u=l,h=u.tag;if(!(1&u.mode||0!==h&&11!==h&&15!==h)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var A=fs(s);if(null!==A){A.flags&=-257,vs(A,s,l,0,t),1&A.mode&&gs(a,d,t),c=d;var g=(t=A).updateQueue;if(null===g){var f=new Set;f.add(c),t.updateQueue=f}else g.add(c);break e}if(!(1&t)){gs(a,d,t),gc();break e}c=Error(i(426))}else if(ii&&1&l.mode){var v=fs(s);if(null!==v){!(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),gi(cs(c,l));break e}}a=c=cs(c,l),4!==Ll&&(Ll=2),null===Fl?Fl=[a]:Fl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,qi(a,ps(0,c,t));break e;case 1:l=c;var m=a.type,C=a.stateNode;if(!(128&a.flags||"function"!=typeof m.getDerivedStateFromError&&(null===C||"function"!=typeof C.componentDidCatch||null!==Vl&&Vl.has(C)))){a.flags|=65536,t&=-t,a.lanes|=t,qi(a,As(a,l,t));break e}}a=a.return}while(null!==a)}wc(r)}catch(e){t=e,Tl===r&&null!==r&&(Tl=r=r.return);continue}break}}function Ac(){var e=Sl.current;return Sl.current=Xa,null===e?Xa:e}function gc(){0!==Ll&&3!==Ll&&2!==Ll||(Ll=4),null===Il||!(268435455&Pl)&&!(268435455&Ml)||sc(Il,Rl)}function fc(e,t){var r=El;El|=2;var n=Ac();for(Il===e&&Rl===t||($l=null,hc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(Bi(),El=r,Sl.current=n,null!==Tl)throw Error(i(261));return Il=null,Rl=0,Ll}function vc(){for(;null!==Tl;)Cc(Tl)}function mc(){for(;null!==Tl&&!Ke();)Cc(Tl)}function Cc(e){var t=kl(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,null===t?wc(e):Tl=t,_l.current=null}function wc(e){var t=e;do{var r=t.alternate;if(e=t.return,32768&t.flags){if(null!==(r=Ys(r,t)))return r.flags&=32767,void(Tl=r);if(null===e)return Ll=6,void(Tl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(r=Gs(r,t,Nl)))return void(Tl=r);if(null!==(t=t.sibling))return void(Tl=t);Tl=t=e}while(null!==t);0===Ll&&(Ll=5)}function bc(e,t,r){var n=Ct,o=Bl.transition;try{Bl.transition=null,Ct=1,function(e,t,r,n){do{yc()}while(null!==Yl);if(6&El)throw Error(i(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-at(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}(e,a),e===Il&&(Tl=Il=null,Rl=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Gl||(Gl=!0,Ic(tt,function(){return yc(),null})),a=!!(15990&r.flags),15990&r.subtreeFlags||a){a=Bl.transition,Bl.transition=null;var s=Ct;Ct=1;var l=El;El|=4,_l.current=null,function(e,t){if(eo=Wt,pn(e=hn())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var n=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(n&&0!==n.rangeCount){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var A;h!==r||0!==o&&3!==h.nodeType||(l=s+o),h!==a||0!==n&&3!==h.nodeType||(c=s+n),3===h.nodeType&&(s+=h.nodeValue.length),null!==(A=h.firstChild);)p=h,h=A;for(;;){if(h===e)break t;if(p===r&&++d===o&&(l=s),p===a&&++u===n&&(c=s),null!==(A=h.nextSibling))break;p=(h=p).parentNode}h=A}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(to={focusedElem:e,selectionRange:r},Wt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var f=g.memoizedProps,v=g.memoizedState,m=t.stateNode,C=m.getSnapshotBeforeUpdate(t.elementType===t.type?f:rs(t.type,f),v);m.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(i(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}g=tl,tl=!1}(e,r),fl(r,e),An(to),Wt=!!eo,to=eo=null,e.current=r,ml(r,e,o),Qe(),El=l,Ct=s,Bl.transition=a}else e.current=r;if(Gl&&(Gl=!1,Yl=e,Kl=o),0===(a=e.pendingLanes)&&(Vl=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),nc(e,Je()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n((o=t[r]).value,{componentStack:o.stack,digest:o.digest});if(Wl)throw Wl=!1,e=Hl,Hl=null,e;!!(1&Kl)&&0!==e.tag&&yc(),1&(a=e.pendingLanes)?e===Jl?Ql++:(Ql=0,Jl=e):Ql=0,$o()}(e,t,r,n)}finally{Bl.transition=o,Ct=n}return null}function yc(){if(null!==Yl){var e=wt(Kl),t=Bl.transition,r=Ct;try{if(Bl.transition=null,Ct=16>e?16:e,null===Yl)var n=!1;else{if(e=Yl,Yl=null,Kl=0,6&El)throw Error(i(331));var o=El;for(El|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(16&Xs.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var d=l[c];for(Xs=d;null!==Xs;){var u=Xs;switch(u.tag){case 0:case 11:case 15:rl(8,u,a)}var h=u.child;if(null!==h)h.return=u,Xs=h;else for(;null!==Xs;){var p=(u=Xs).sibling,A=u.return;if(il(u),u===d){Xs=null;break}if(null!==p){p.return=A,Xs=p;break}Xs=A}}}var g=a.alternate;if(null!==g){var f=g.child;if(null!==f){g.child=null;do{var v=f.sibling;f.sibling=null,f=v}while(null!==f)}}Xs=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(2048&(a=Xs).flags)switch(a.tag){case 0:case 11:case 15:rl(9,a,a.return)}var m=a.sibling;if(null!==m){m.return=a.return,Xs=m;break e}Xs=a.return}}var C=e.current;for(Xs=C;null!==Xs;){var w=(s=Xs).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Xs=w;else e:for(s=C;null!==Xs;){if(2048&(l=Xs).flags)try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(e){xc(l,l.return,e)}if(l===s){Xs=null;break e}var b=l.sibling;if(null!==b){b.return=l.return,Xs=b;break e}Xs=l.return}}if(El=o,$o(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}n=!0}return n}finally{Ct=r,Bl.transition=t}}return!1}function kc(e,t,r){e=ji(e,t=ps(0,t=cs(r,t),1),1),t=ec(),null!==e&&(vt(e,1,t),nc(e,t))}function xc(e,t,r){if(3===e.tag)kc(e,e,r);else for(;null!==t;){if(3===t.tag){kc(t,e,r);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===Vl||!Vl.has(n))){t=ji(t,e=As(t,e=cs(r,e),1),1),e=ec(),null!==t&&(vt(t,1,e),nc(t,e));break}}t=t.return}}function Sc(e,t,r){var n=e.pingCache;null!==n&&n.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&r,Il===e&&(Rl&r)===r&&(4===Ll||3===Ll&&(130023424&Rl)===Rl&&500>Je()-zl?hc(e,0):Ul|=r),nc(e,t)}function _c(e,t){0===t&&(1&e.mode?(t=dt,!(130023424&(dt<<=1))&&(dt=4194304)):t=1);var r=ec();null!==(e=Di(e,t))&&(vt(e,t,r),nc(e,r))}function Bc(e){var t=e.memoizedState,r=0;null!==t&&(r=t.retryLane),_c(e,r)}function Ec(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(i(314))}null!==n&&n.delete(t),_c(e,r)}function Ic(e,t){return Ge(e,t)}function Tc(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rc(e,t,r,n){return new Tc(e,t,r,n)}function Nc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Oc(e,t){var r=e.alternate;return null===r?((r=Rc(e.tag,t,e.key,e.mode)).elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=14680064&e.flags,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Lc(e,t,r,n,o,a){var s=2;if(n=e,"function"==typeof e)Nc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return Dc(r.children,o,a,t);case x:s=8,o|=8;break;case S:return(e=Rc(12,r,t,2|o)).elementType=S,e.lanes=a,e;case I:return(e=Rc(13,r,t,o)).elementType=I,e.lanes=a,e;case T:return(e=Rc(19,r,t,o)).elementType=T,e.lanes=a,e;case O:return Pc(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case _:s=10;break e;case B:s=9;break e;case E:s=11;break e;case R:s=14;break e;case N:s=16,n=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Rc(s,r,t,o)).elementType=e,t.type=n,t.lanes=a,t}function Dc(e,t,r,n){return(e=Rc(7,e,n,t)).lanes=r,e}function Pc(e,t,r,n){return(e=Rc(22,e,n,t)).elementType=O,e.lanes=r,e.stateNode={isHidden:!1},e}function Mc(e,t,r){return(e=Rc(6,e,null,t)).lanes=r,e}function Uc(e,t,r){return(t=Rc(4,null!==e.children?e.children:[],e.key,t)).lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fc(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ft(0),this.expirationTimes=ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function jc(e,t,r,n,o,i,a,s,l){return e=new Fc(e,t,r,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Rc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mi(i),e}function zc(e){if(!e)return Eo;e:{if(qe(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var r=e.type;if(Oo(r))return Po(e,r,t)}return t}function qc(e,t,r,n,o,i,a,s,l){return(e=jc(r,n,!0,e,0,i,0,s,l)).context=zc(null),r=e.current,(i=Fi(n=ec(),o=tc(r))).callback=null!=t?t:null,ji(r,i,o),e.current.lanes=o,vt(e,o,n),nc(e,n),e}function $c(e,t,r,n){var o=t.current,i=ec(),a=tc(o);return r=zc(r),null===t.context?t.context=r:t.pendingContext=r,(t=Fi(i,a)).payload={element:e},null!==(n=void 0===n?null:n)&&(t.callback=n),null!==(e=ji(o,t,a))&&(rc(e,o,a,i),zi(e,o,a)),a}function Wc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var r=e.retryLane;e.retryLane=0!==r&&r<t?r:t}}function Vc(e,t){Hc(e,t),(e=e.alternate)&&Hc(e,t)}kl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||To.current)Cs=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return Cs=!1,function(e,t,r){switch(t.tag){case 3:Is(t),Ai();break;case 5:Xi(t);break;case 1:Oo(t.type)&&Mo(t);break;case 4:Qi(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Bo(ki,n._currentValue),n._currentValue=o;break;case 13:if(null!==(n=t.memoizedState))return null!==n.dehydrated?(Bo(ea,1&ea.current),t.flags|=128,null):0!==(r&t.child.childLanes)?Ms(e,t,r):(Bo(ea,1&ea.current),null!==(e=Ws(e,t,r))?e.sibling:null);Bo(ea,1&ea.current);break;case 19:if(n=0!==(r&t.childLanes),128&e.flags){if(n)return qs(e,t,r);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Bo(ea,ea.current),n)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,r)}return Ws(e,t,r)}(e,t,r);Cs=!!(131072&e.flags)}else Cs=!1,ii&&1048576&t.flags&&ei(t,Go,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;$s(e,t),e=t.pendingProps;var o=No(t,Io.current);Ti(t,r),o=fa(null,t,n,e,o,r);var a=va();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(n)?(a=!0,Mo(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Mi(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,n,e,r),t=Es(null,t,n,!0,a,r)):(t.tag=0,ii&&a&&ti(t),ws(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch($s(e,t),e=t.pendingProps,n=(o=n._init)(n._payload),t.type=n,o=t.tag=function(e){if("function"==typeof e)return Nc(e)?1:0;if(null!=e){if((e=e.$$typeof)===E)return 11;if(e===R)return 14}return 2}(n),e=rs(n,e),o){case 0:t=_s(null,t,n,e,r);break e;case 1:t=Bs(null,t,n,e,r);break e;case 11:t=bs(null,t,n,e,r);break e;case 14:t=ys(null,t,n,rs(n.type,e),r);break e}throw Error(i(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,_s(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 1:return n=t.type,o=t.pendingProps,Bs(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 3:e:{if(Is(t),null===e)throw Error(i(387));n=t.pendingProps,o=(a=t.memoizedState).element,Ui(e,t),$i(t,n,null,r);var s=t.memoizedState;if(n=s.element,a.isDehydrated){if(a={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ts(e,t,n,r,o=cs(Error(i(423)),t));break e}if(n!==o){t=Ts(e,t,n,r,o=cs(Error(i(424)),t));break e}for(oi=co(t.stateNode.containerInfo.firstChild),ni=t,ii=!0,ai=null,r=yi(t,null,n,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(Ai(),n===o){t=Ws(e,t,r);break e}ws(e,t,n,r)}t=t.child}return t;case 5:return Xi(t),null===e&&di(t),n=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,ro(n,o)?s=null:null!==a&&ro(n,a)&&(t.flags|=32),Ss(e,t),ws(e,t,s,r),t.child;case 6:return null===e&&di(t),null;case 13:return Ms(e,t,r);case 4:return Qi(t,t.stateNode.containerInfo),n=t.pendingProps,null===e?t.child=bi(t,null,n,r):ws(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,bs(e,t,n,o=t.elementType===n?o:rs(n,o),r);case 7:return ws(e,t,t.pendingProps,r),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Bo(ki,n._currentValue),n._currentValue=s,null!==a)if(sn(a.value,s)){if(a.children===o.children&&!To.current){t=Ws(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===n){if(1===a.tag){(c=Fi(-1,r&-r)).tag=2;var d=a.updateQueue;if(null!==d){var u=(d=d.shared).pending;null===u?c.next=c:(c.next=u.next,u.next=c),d.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Ii(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Ii(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Ti(t,r),n=n(o=Ri(o)),t.flags|=1,ws(e,t,n,r),t.child;case 14:return o=rs(n=t.type,t.pendingProps),ys(e,t,n,o=rs(n.type,o),r);case 15:return ks(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:rs(n,o),$s(e,t),t.tag=1,Oo(n)?(e=!0,Mo(t)):e=!1,Ti(t,r),as(t,n,o),ls(t,n,o,r),Es(null,t,n,!0,e,r);case 19:return qs(e,t,r);case 22:return xs(e,t,r)}throw Error(i(156,t.tag))};var Gc="function"==typeof reportError?reportError:function(e){console.error(e)};function Yc(e){this._internalRoot=e}function Kc(e){this._internalRoot=e}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xc(){}function Zc(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=Wc(a);s.call(e)}}$c(t,a,e,o)}else a=function(e,t,r,n,o){if(o){if("function"==typeof n){var i=n;n=function(){var e=Wc(a);i.call(e)}}var a=qc(t,n,e,0,null,!1,0,"",Xc);return e._reactRootContainer=a,e[go]=a.current,qn(8===e.nodeType?e.parentNode:e),dc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof n){var s=n;n=function(){var e=Wc(l);s.call(e)}}var l=jc(e,0,!1,null,0,!1,0,"",Xc);return e._reactRootContainer=l,e[go]=l.current,qn(8===e.nodeType?e.parentNode:e),dc(function(){$c(t,l,r,n)}),l}(r,t,e,o,n);return Wc(a)}Kc.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));$c(e,t,null,null)},Kc.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;dc(function(){$c(null,e,null,null)}),t[go]=null}},Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ot.length&&0!==t&&t<Ot[r].priority;r++);Ot.splice(r,0,e),0===r&&Mt(e)}},bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ut(t.pendingLanes);0!==r&&(mt(t,1|r),nc(t,Je()),!(6&El)&&(ql=Je()+500,$o()))}break;case 13:dc(function(){var t=Di(e,1);if(null!==t){var r=ec();rc(t,e,1,r)}}),Vc(e,1)}},yt=function(e){if(13===e.tag){var t=Di(e,134217728);null!==t&&rc(t,e,134217728,ec()),Vc(e,134217728)}},kt=function(e){if(13===e.tag){var t=tc(e),r=Di(e,t);null!==r&&rc(r,e,t,ec()),Vc(e,t)}},xt=function(){return Ct},St=function(e,t){var r=Ct;try{return Ct=e,t()}finally{Ct=r}},ye=function(e,t,r){switch(t){case"input":if(X(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=yo(n);if(!o)throw Error(i(90));G(n),X(n,o)}}}break;case"textarea":ie(e,r);break;case"select":null!=(t=r.value)&&re(e,!!r.multiple,t,!1)}},Ee=cc,Ie=dc;var ed={usingClientEntryPoint:!1,Events:[wo,bo,yo,_e,Be,cc]},td={findFiberByHostInstance:Co,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{ot=nd.inject(rd),it=nd}catch(de){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,t.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qc(t))throw Error(i(200));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:y,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},t.createRoot=function(e,t){if(!Qc(e))throw Error(i(299));var r=!1,n="",o=Gc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(n=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=jc(e,1,!1,null,0,r,0,n,o),e[go]=t.current,qn(8===e.nodeType?e.parentNode:e),new Yc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return dc(e)},t.hydrate=function(e,t,r){if(!Jc(t))throw Error(i(200));return Zc(null,e,t,!0,r)},t.hydrateRoot=function(e,t,r){if(!Qc(e))throw Error(i(405));var n=null!=r&&r.hydratedSources||null,o=!1,a="",s=Gc;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=qc(t,null,e,1,null!=r?r:null,o,0,a,s),e[go]=t.current,qn(e),n)for(e=0;e<n.length;e++)o=(o=(r=n[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Kc(t)},t.render=function(e,t,r){if(!Jc(t))throw Error(i(200));return Zc(null,e,t,!1,r)},t.unmountComponentAtNode=function(e){if(!Jc(e))throw Error(i(40));return!!e._reactRootContainer&&(dc(function(){Zc(null,null,e,!1,function(){e._reactRootContainer=null,e[go]=null})}),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Jc(r))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Zc(e,t,r,!1,n)},t.version="18.3.1-next-f1338f8080-20240426"},4140:function(e,t,r){"use strict";var n=r(2483);t.H=n.createRoot,n.hydrateRoot},2483:function(e,t,r){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(7045)},3394:function(e,t,r){"use strict";var n=r(7810),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var n,i={},c=null,d=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:c,ref:d,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},5677:function(e,t){"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator,A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,f={};function v(e,t,r){this.props=e,this.context=t,this.refs=f,this.updater=r||A}function m(){}function C(e,t,r){this.props=e,this.context=t,this.refs=f,this.updater=r||A}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var w=C.prototype=new m;w.constructor=C,g(w,v.prototype),w.isPureReactComponent=!0;var b=Array.isArray,y=Object.prototype.hasOwnProperty,k={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)y.call(t,o)&&!x.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),d=0;d<l;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:r,type:e,key:a,ref:s,props:i,_owner:k.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var B=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case n:l=!0}}if(l)return a=a(l=e),e=""===i?"."+E(l,0):i,b(a)?(o="",null!=e&&(o=e.replace(B,"$&/")+"/"),I(a,t,o,"",function(e){return e})):null!=a&&(_(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(B,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",b(e))for(var c=0;c<e.length;c++){var d=i+E(s=e[c],c);l+=I(s,t,o,d,a)}else if(d=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof d)for(e=d.call(e),c=0;!(s=e.next()).done;)l+=I(s=s.value,t,o,d=i+E(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function T(e,t,r){if(null==e)return e;var n=[],o=0;return I(e,n,"","",function(e){return t.call(r,e,o++)}),n}function R(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},O={transition:null},L={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:O,ReactCurrentOwner:k};function D(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,r){T(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=C,t.StrictMode=i,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.act=D,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=k.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)y.call(t,c)&&!x.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];o.children=l}return{$$typeof:r,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=D,t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,r){return N.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,r){return N.current.useReducer(e,t,r)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return N.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return N.current.useTransition()},t.version="18.3.1"},7810:function(e,t,r){"use strict";e.exports=r(5677)},4922:function(e,t,r){"use strict";e.exports=r(3394)},1613:function(e,t){"use strict";function r(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(!(0<i(o,t)))break e;e[n]=t,e[r]=o,r=n}}function n(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,a=o>>>1;n<a;){var s=2*(n+1)-1,l=e[s],c=s+1,d=e[c];if(0>i(l,r))c<o&&0>i(d,l)?(e[n]=d,e[c]=r,n=c):(e[n]=l,e[s]=r,n=s);else{if(!(c<o&&0>i(d,r)))break e;e[n]=d,e[c]=r,n=c}}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],d=[],u=1,h=null,p=3,A=!1,g=!1,f=!1,v="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,C="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(d);null!==t;){if(null===t.callback)o(d);else{if(!(t.startTime<=e))break;o(d),t.sortIndex=t.expirationTime,r(c,t)}t=n(d)}}function b(e){if(f=!1,w(e),!g)if(null!==n(c))g=!0,O(y);else{var t=n(d);null!==t&&L(b,t.startTime-e)}}function y(e,r){g=!1,f&&(f=!1,m(_),_=-1),A=!0;var i=p;try{for(w(r),h=n(c);null!==h&&(!(h.expirationTime>r)||e&&!I());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?h.callback=s:h===n(c)&&o(c),w(r)}else o(c);h=n(c)}if(null!==h)var l=!0;else{var u=n(d);null!==u&&L(b,u.startTime-r),l=!1}return l}finally{h=null,p=i,A=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,x=!1,S=null,_=-1,B=5,E=-1;function I(){return!(t.unstable_now()-E<B)}function T(){if(null!==S){var e=t.unstable_now();E=e;var r=!0;try{r=S(!0,e)}finally{r?k():(x=!1,S=null)}}else x=!1}if("function"==typeof C)k=function(){C(T)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,N=R.port2;R.port1.onmessage=T,k=function(){N.postMessage(null)}}else k=function(){v(T,0)};function O(e){S=e,x||(x=!0,k())}function L(e,r){_=v(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||A||(g=!0,O(y))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var r=p;p=t;try{return e()}finally{p=r}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=p;p=e;try{return t()}finally{p=r}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:u++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,r(d,e),null===n(c)&&e===n(d)&&(f?(m(_),_=-1):f=!0,L(b,i-a))):(e.sortIndex=s,r(c,e),g||A||(g=!0,O(y))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},2328:function(e,t,r){"use strict";e.exports=r(1613)},6186:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},a=[],s=0;s<e.length;s++){var l=e[s],c=n.base?l[0]+n.base:l[0],d=i[c]||0,u="".concat(c," ").concat(d);i[c]=d+1;var h=r(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)t[h].references++,t[h].updater(p);else{var A=o(p,n);n.byIndex=s,t.splice(s,0,{identifier:u,updater:A,references:1})}a.push(u)}return a}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var i=n(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=r(i[a]);t[s].references--}for(var l=n(e,o),c=0;c<i.length;c++){var d=r(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},7433:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},8990:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8626:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},2155:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},9827:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},3121:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nc=void 0;var n={};return function(){"use strict";r.d(n,{default:function(){return Io}});var e=r(1931),t=r.n(e),o=r(7810),i=r(4140);function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),c=new Uint8Array(16);function d(){if(!l)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(c)}for(var u=[],h=0;h<256;++h)u[h]=(h+256).toString(16).substr(1);function p(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||d)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[n+i]=o[i];return t||function(e){var t=0,r=u;return[r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],"-",r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]],r[e[t++]]].join("")}(o)}const{SDP_CREATE_OFFER_FAILED:A,SDP_CREATE_ANSWER_FAILED:g,SDP_SET_LOCAL_DESCRIPTION_FAILED:f,SDP_SET_REMOTE_DESCRIPTION_FAILED:v,SDP_SEND_FAILED:m,MEDIA_MICROPHONE_PERMISSION_DENIED:C,MEDIA_DEVICE_NOT_FOUND:w,MEDIA_GET_USER_MEDIA_FAILED:b,HOLD_FAILED:y,INVALID_CALL_PARAMETERS:k,BYE_SEND_FAILED:x,SUBSCRIBE_FAILED:S,PEER_CLOSED_DURING_INIT:_,WEBSOCKET_CONNECTION_FAILED:B,WEBSOCKET_ERROR:E,RECONNECTION_EXHAUSTED:I,GATEWAY_FAILED:T,LOGIN_FAILED:R,INVALID_CREDENTIALS:N,AUTHENTICATION_REQUIRED:O,NETWORK_OFFLINE:L,UNEXPECTED_ERROR:D}={SDP_CREATE_OFFER_FAILED:40001,SDP_CREATE_ANSWER_FAILED:40002,SDP_SET_LOCAL_DESCRIPTION_FAILED:40003,SDP_SET_REMOTE_DESCRIPTION_FAILED:40004,SDP_SEND_FAILED:40005,MEDIA_MICROPHONE_PERMISSION_DENIED:42001,MEDIA_DEVICE_NOT_FOUND:42002,MEDIA_GET_USER_MEDIA_FAILED:42003,HOLD_FAILED:44001,INVALID_CALL_PARAMETERS:44002,BYE_SEND_FAILED:44003,SUBSCRIBE_FAILED:44004,PEER_CLOSED_DURING_INIT:44005,WEBSOCKET_CONNECTION_FAILED:45001,WEBSOCKET_ERROR:45002,RECONNECTION_EXHAUSTED:45003,GATEWAY_FAILED:45004,LOGIN_FAILED:46001,INVALID_CREDENTIALS:46002,AUTHENTICATION_REQUIRED:46003,NETWORK_OFFLINE:48001,UNEXPECTED_ERROR:49001},{HIGH_RTT:P,HIGH_JITTER:M,HIGH_PACKET_LOSS:U,LOW_MOS:F,LOW_BYTES_RECEIVED:j,LOW_BYTES_SENT:z,ICE_CONNECTIVITY_LOST:q,ICE_GATHERING_TIMEOUT:$,ICE_GATHERING_EMPTY:W,PEER_CONNECTION_FAILED:H,ONLY_HOST_ICE_CANDIDATES:V,ANSWER_WHILE_PEER_ACTIVE:G,TOKEN_EXPIRING_SOON:Y,SESSION_NOT_REATTACHED:K}={HIGH_RTT:31001,HIGH_JITTER:31002,HIGH_PACKET_LOSS:31003,LOW_MOS:31004,LOW_BYTES_RECEIVED:32001,LOW_BYTES_SENT:32002,ICE_CONNECTIVITY_LOST:33001,ICE_GATHERING_TIMEOUT:33002,ICE_GATHERING_EMPTY:33003,PEER_CONNECTION_FAILED:33004,ONLY_HOST_ICE_CANDIDATES:33005,ANSWER_WHILE_PEER_ACTIVE:33006,TOKEN_EXPIRING_SOON:34001,SESSION_NOT_REATTACHED:35001},Q=/^a=candidate:.+typ (srflx|prflx|relay)/m,J="wss://rtc.telnyx.com",X={urls:"stun:stun.l.google.com:19302"},Z=[{urls:"stun:stun.telnyx.com:3478"},X,{urls:"turn:turn.telnyx.com:3478?transport=udp",username:"testuser",credential:"testpassword"},{urls:"turn:turn.telnyx.com:3478?transport=tcp",username:"testuser",credential:"testpassword"}],ee=[{urls:"stun:stundev.telnyx.com:3478"},X,{urls:"turn:turndev.telnyx.com:3478?transport=udp",username:"testuser",credential:"testpassword"},{urls:"turn:turndev.telnyx.com:3478?transport=tcp",username:"testuser",credential:"testpassword"}];var te;!function(e){e.SocketOpen="telnyx.socket.open",e.SocketClose="telnyx.socket.close",e.SocketError="telnyx.socket.error",e.SocketMessage="telnyx.socket.message",e.SpeedTest="telnyx.internal.speedtest",e.Ready="telnyx.ready",e.Error="telnyx.error",e.Warning="telnyx.warning",e.Notification="telnyx.notification",e.StatsFrame="telnyx.stats.frame",e.StatsReport="telnyx.stats.report",e.Messages="telnyx.messages",e.Calls="telnyx.calls",e.MediaError="telnyx.rtc.mediaError",e.PeerConnectionFailureError="telnyx.rtc.peerConnectionFailureError",e.PeerConnectionSignalingStateClosed="telnyx.rtc.peerConnectionSignalingStateClosed"}(te||(te={}));const re={40001:{name:"SDP_CREATE_OFFER_FAILED",message:"Failed to create call offer",description:"The browser was unable to generate a local SDP offer. This typically indicates a WebRTC API error or invalid media constraints.",causes:["Browser WebRTC API error","Missing or invalid media constraints"],solutions:["Check getUserMedia permissions","Verify ICE server configuration"]},40002:{name:"SDP_CREATE_ANSWER_FAILED",message:"Failed to answer the call",description:"The browser was unable to generate a local SDP answer. The remote offer may be invalid or the browser state inconsistent.",causes:["Browser WebRTC API error","Invalid remote SDP offer"],solutions:["Retry the call","Check browser WebRTC compatibility"]},40003:{name:"SDP_SET_LOCAL_DESCRIPTION_FAILED",message:"Failed to apply local call settings",description:"setLocalDescription() was rejected by the browser. The generated SDP may be malformed or the browser state may be inconsistent.",causes:["Malformed SDP","Browser state inconsistency"],solutions:["Retry the call"]},40004:{name:"SDP_SET_REMOTE_DESCRIPTION_FAILED",message:"Failed to apply remote call settings",description:"setRemoteDescription() was rejected by the browser. The remote SDP may be malformed or contain unsupported codecs.",causes:["Malformed remote SDP","Browser codec mismatch"],solutions:["Retry the call","Check codec configuration"]},40005:{name:"SDP_SEND_FAILED",message:"Failed to send call data to server",description:"The Invite or Answer message could not be delivered via the signaling WebSocket. The connection may have been lost.",causes:["WebSocket connection lost","Server error"],solutions:["Check network connectivity","Retry the call"]},42001:{name:"MEDIA_MICROPHONE_PERMISSION_DENIED",message:"Microphone access denied",description:"The user or operating system denied microphone permission. The browser permission prompt was dismissed or OS-level access is disabled.",causes:["User denied browser permission prompt","OS-level microphone access disabled"],solutions:["Ask user to grant microphone permission in browser settings"]},42002:{name:"MEDIA_DEVICE_NOT_FOUND",message:"No microphone found",description:"The requested audio input device is not available. No microphone is connected, the device was disconnected, or an invalid deviceId was specified.",causes:["No microphone connected","Device was disconnected","Invalid deviceId"],solutions:["Check that a microphone is connected","Select a valid audio input device"]},42003:{name:"MEDIA_GET_USER_MEDIA_FAILED",message:"Failed to access microphone",description:"getUserMedia() was rejected for an unexpected reason. The device may be in use by another application or the browser encountered an internal error.",causes:["Browser error","Device in use by another application"],solutions:["Close other applications using the microphone","Retry"]},44005:{name:"PEER_CLOSED_DURING_INIT",message:"Call was closed during setup",description:"The PeerConnection was closed (e.g. by hangup()) while peer.init() was still running. This is a race condition: an async operation such as setRemoteDescription, getUserMedia, or the media recovery flow yielded control, and close() ran during that gap. The init() cannot continue because the underlying RTCPeerConnection has been destroyed.",causes:["call.hangup() or call.close() was called while the call was still setting up","A WebSocket Bye message arrived during getUserMedia prompt or SDP negotiation","User clicked hangup/decline before media permissions were granted"],solutions:["This is expected if the user intentionally hung up during setup — no action needed","If this happens frequently without user action, check for automatic hangup triggers that may fire too early"]},44001:{name:"HOLD_FAILED",message:"Failed to hold the call",description:"The server rejected or did not respond to the hold request. The WebSocket connection may have been lost during the operation.",causes:["Server error","WebSocket connection lost during hold"],solutions:["Retry the hold operation","Check network connectivity"]},44002:{name:"INVALID_CALL_PARAMETERS",message:"Invalid call parameters",description:"The call could not be initiated because required parameters are missing or invalid. For example, no destination number was provided to newCall().",causes:["Missing destinationNumber in call options","Invalid or empty call parameters"],solutions:["Provide a valid destinationNumber when calling newCall()","Check the call options object for required fields"]},44003:{name:"BYE_SEND_FAILED",message:"Failed to hang up cleanly",description:"The hangup signal could not be delivered to the server. The call was terminated locally but the server may not be aware.",causes:["WebSocket connection lost before BYE sent"],solutions:["No action needed — call is terminated locally","Check network connectivity"]},44004:{name:"SUBSCRIBE_FAILED",message:"Failed to subscribe to call events",description:"The Verto subscribe request for the call channel failed. This may prevent receiving call state updates from the server.",causes:["WebSocket connection lost during subscribe","Server rejected the subscription request"],solutions:["Check network connectivity","Retry the call"]},45001:{name:"WEBSOCKET_CONNECTION_FAILED",message:"Unable to connect to server",description:"The WebSocket connection to the signaling server could not be established. The server may be unreachable, the URL may be incorrect, or a firewall may be blocking the connection.",causes:["Server unreachable","Incorrect WebSocket URL","Firewall blocking WebSocket connections","Network interruption"],solutions:["Check network connectivity","Verify the signaling server URL","Ensure WebSocket connections are not blocked by a firewall"]},45002:{name:"WEBSOCKET_ERROR",message:"Connection to server lost",description:"An error occurred on the WebSocket connection after it was established. The connection may have been dropped due to network issues or server-side closure.",causes:["Network interruption","Server closed the connection","Idle timeout"],solutions:["Check network connectivity","SDK will attempt automatic reconnection if configured"]},45003:{name:"RECONNECTION_EXHAUSTED",message:"Unable to reconnect to server",description:"All automatic reconnection attempts have been exhausted. The SDK tried to re-establish the WebSocket connection multiple times but failed on every attempt.",causes:["Prolonged network outage","Server unreachable","Firewall or proxy blocking reconnection"],solutions:["Check network connectivity","Call client.disconnect() and client.connect() to manually retry","Notify the user that the connection was lost"]},45004:{name:"GATEWAY_FAILED",message:"Gateway connection failed",description:"The upstream gateway reported a FAILED or FAIL_WAIT state. The signaling server could not establish or maintain a connection to the gateway. When autoReconnect is disabled, this is immediately fatal. When enabled, the SDK will retry until RECONNECTION_EXHAUSTED.",causes:["Gateway down or unreachable","Server-side infrastructure issue","Network partition between signaling server and gateway"],solutions:["Wait for automatic reconnection (if autoReconnect is enabled)","Call client.disconnect() and client.connect() to manually retry","Check Telnyx service status"]},46001:{name:"LOGIN_FAILED",message:"Authentication failed",description:"The login request was rejected by the server. The credentials may be invalid, expired, or the account may be suspended.",causes:["Invalid credentials (username/password or token)","Expired authentication token","Account suspended or disabled"],solutions:["Verify credentials","Generate a new authentication token","Check account status"]},46002:{name:"INVALID_CREDENTIALS",message:"Invalid credential parameters",description:"The SDK rejected the login options before sending any request to the server. This is an internal client-side validation guard — the credentials object is missing required fields or has an invalid structure. No network request was made.",causes:["Missing login and password fields","Missing or malformed authentication token","Invalid combination of credential fields in the options object"],solutions:["Provide valid login/password or a valid authentication token","Check the TelnyxRTC constructor options against the documentation","Ensure the credential object matches one of the supported auth modes (credentials, token, or anonymous)"]},46003:{name:"AUTHENTICATION_REQUIRED",message:"Authentication required",description:"The server rejected a request because the session is not authenticated. This can happen when the client sends a message (e.g. Invite, Subscribe, or Ping) before login completes, after a token expires mid-session, or after the server drops the authenticated state for any reason.",causes:["Message sent before login completed","Authentication token expired during the session","Server-side session was invalidated","WebSocket reconnected but re-authentication did not complete"],solutions:["Ensure the client is fully logged in before sending messages","Re-authenticate using client.login() with fresh credentials","Listen for telnyx.ready before making calls or sending requests"]},48001:{name:"NETWORK_OFFLINE",message:"Device is offline",description:"The browser reported that the device has lost network connectivity (navigator.onLine === false). All WebSocket and media connections will fail until the network is restored.",causes:["Wi-Fi or ethernet disconnected","Airplane mode enabled","Network interface went down"],solutions:["Check network connectivity","Reconnect to Wi-Fi or ethernet","Disable airplane mode"]},49001:{name:"UNEXPECTED_ERROR",message:"An unexpected error occurred",description:"An error was thrown that does not match any known SDK error category. This is a catch-all for unclassified failures.",causes:["Unknown or unhandled error condition"],solutions:["Check the originalError property for the underlying cause","Report the issue if it persists"]}},ne={31001:{name:"HIGH_RTT",message:"High network latency detected",description:"Round-trip time (RTT) exceeded the threshold for multiple consecutive samples. High latency causes perceptible audio delays.",causes:["Poor network connection","Geographic distance to media server","Network congestion"],solutions:["Check network connectivity","Use a wired connection instead of Wi-Fi","Close bandwidth-heavy applications"]},31002:{name:"HIGH_JITTER",message:"High jitter detected",description:"Jitter (variability in packet arrival time) exceeded the threshold for multiple consecutive samples. High jitter causes crackling and choppy audio.",causes:["Network congestion","Unstable Wi-Fi connection","Overloaded network equipment"],solutions:["Use a wired connection instead of Wi-Fi","Close bandwidth-heavy applications","Check network equipment"]},31003:{name:"HIGH_PACKET_LOSS",message:"High packet loss detected",description:"Packet loss exceeded the threshold for multiple consecutive samples. High packet loss causes choppy audio or dropped calls.",causes:["Network congestion","Unstable connection","Firewall or QoS misconfiguration"],solutions:["Check network connectivity","Use a wired connection","Contact network administrator"]},31004:{name:"LOW_MOS",message:"Low call quality score",description:"Mean Opinion Score (MOS) dropped below the acceptable threshold for multiple consecutive samples. This is a composite indicator of overall call quality.",causes:["Combination of high latency, jitter, and/or packet loss","Poor network conditions"],solutions:["Check network connectivity","Use a wired connection","Close bandwidth-heavy applications"]},32001:{name:"LOW_BYTES_RECEIVED",message:"No audio data received",description:"No bytes have been received from the remote party for multiple consecutive seconds. This may indicate a network interruption or remote-side issue.",causes:["Network interruption","Remote party microphone issue","Firewall blocking inbound media"],solutions:["Check network connectivity","Ask remote party to check their microphone","Check firewall rules for media ports"]},32002:{name:"LOW_BYTES_SENT",message:"No audio data being sent",description:"No bytes have been sent for multiple consecutive seconds. This may indicate a local microphone issue or network interruption.",causes:["Microphone muted or disconnected","Network interruption","Local media track ended"],solutions:["Check that the microphone is not muted","Verify the microphone is still connected","Check network connectivity"]},33001:{name:"ICE_CONNECTIVITY_LOST",message:"Connection interrupted",description:"The ICE connection transitioned to the disconnected state. The previously selected connection path was lost and renegotiation may be required. The connection may recover automatically.",causes:["Temporary network interruption","Network interface change (e.g. Wi-Fi to cellular)","NAT rebinding"],solutions:["Wait for automatic recovery","Check network connectivity"]},33002:{name:"ICE_GATHERING_TIMEOUT",message:"ICE gathering timed out",description:"ICE candidate gathering did not complete within the safety timeout. This is typically caused by network restrictions blocking STUN/TURN. The call may still succeed if candidates arrive late.",causes:["Firewall blocking STUN/TURN","Network unreachable","STUN/TURN server not responding"],solutions:["Check STUN/TURN server reachability","Ensure UDP traffic is not blocked","Try forceRelayCandidate option"]},33003:{name:"ICE_GATHERING_EMPTY",message:"No ICE candidates gathered",description:"No ICE candidates were gathered after sending the initial SDP. This may indicate a firewall blocking all STUN/TURN traffic or no available network interface.",causes:["Firewall blocking all STUN/TURN traffic","No network interface available","VPN blocking UDP"],solutions:["Check STUN/TURN server reachability","Ensure UDP traffic is not blocked","Use forceRelayCandidate option"]},33004:{name:"PEER_CONNECTION_FAILED",message:"Connection failed",description:"RTCPeerConnection entered the failed state. This is a recoverable condition — the SDK may attempt ICE restart or the connection may recover. If it does not recover, the call will eventually be terminated.",causes:["ICE failure","DTLS handshake failure","Prolonged network interruption"],solutions:["Wait for automatic recovery","Check network connectivity","Verify TURN server credentials"]},33005:{name:"ONLY_HOST_ICE_CANDIDATES",message:"Only local network candidates available",description:"ICE gathering completed but only host (local network) candidates were collected — no server-reflexive (srflx) or relay (turn) candidates were found. This typically means the STUN/TURN servers are unreachable, which will prevent connections outside the local network.",causes:["STUN/TURN servers unreachable","Firewall blocking UDP traffic to STUN/TURN servers","Incorrect TURN server configuration or credentials","Restrictive corporate network or VPN"],solutions:["Verify STUN/TURN server URLs and credentials","Ensure UDP traffic to STUN/TURN ports is not blocked","Check firewall or VPN settings","Try using TCP-based TURN as a fallback"]},33006:{name:"ANSWER_WHILE_PEER_ACTIVE",message:"Call answer ignored because a peer connection is already active",description:"answer() was called on a call that already has an active or connecting peer connection. Creating a second peer connection for the same call would duplicate media negotiation, confuse the remote party, and break call reporting. This is typically caused by application code invoking answer() multiple times (e.g. from multiple event handlers).",causes:["Application called answer() twice on the same call object","Multiple click handlers or event listeners triggering answer()"],solutions:["Ensure answer() is called only once per call","Disable the answer button after the first click","Check that answer() is not invoked from multiple event handlers"]},34001:{name:"TOKEN_EXPIRING_SOON",message:"Authentication token expiring soon",description:"The authentication token is approaching its expiration time. If the token expires the connection will be lost and calls will fail. A new token should be generated before expiration.",causes:["Token was issued with a limited lifetime"],solutions:["Generate a new authentication token","Reconnect with fresh credentials before the token expires"]},35001:{name:"SESSION_NOT_REATTACHED",message:"Active call lost after reconnect",description:"The WebSocket reconnected successfully but the server returned an empty reattached_sessions list while the SDK still has an active call. The server no longer knows about the call, so any subsequent call-control operation (hangup, hold, etc.) will fail with CALL_DOES_NOT_EXIST.",causes:["Server-side session expired during the disconnection window","Reconnect token was invalidated","Backend restarted or lost in-memory call state"],solutions:["Terminate the local call and notify the user","Start a new call","Investigate why the session was not preserved on the server"]}};function oe(e,t){const r=ne[e];return{code:e,name:r.name,message:t||r.message,description:r.description,causes:[...r.causes],solutions:[...r.solutions]}}class ie extends Error{constructor(e){super(e.message||`[${e.code}] ${e.name}`),this.name=e.name,this.code=e.code,this.description=e.description,this.causes=e.causes,this.solutions=e.solutions,this.originalError=e.originalError,Object.setPrototypeOf(this,ie.prototype)}toJSON(){return{code:this.code,name:this.name,description:this.description,message:this.message,causes:this.causes,solutions:this.solutions,originalError:this.originalError}}}function ae(e){if(e instanceof DOMException){if("NotAllowedError"===e.name)return C;if("NotFoundError"===e.name||"OverconstrainedError"===e.name)return w}return b}function se(e,t,r){const n=re[e],o=t instanceof Error?t:void 0!==t?new Error(String(t)):void 0;return new ie({code:e,name:n.name,description:n.description,message:r||n.message,causes:[...n.causes],solutions:[...n.solutions],originalError:o})}var le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function ce(e,t){return e(t={exports:{}},t.exports),t.exports}var de=ce(function(e){var t,r;t=le,r=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<t?e:this.methodFactory(i,t,r)}this.log=this.debug}function s(e,r,n){return function(){typeof console!==t&&(a.call(this,r,n),this[e].apply(this,arguments))}}function l(n,a,l){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):e)}(n)||s.apply(this,arguments)}function c(e,r,o){var i,s=this;r=null==r?"WARN":r;var c="loglevel";function d(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=o||l,s.getLevel=function(){return i},s.setLevel=function(r,o){if("string"==typeof r&&void 0!==s.levels[r.toUpperCase()]&&(r=s.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),a.call(s,r,e),typeof console===t&&r<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){r=e,d()||s.setLevel(e,!1)},s.resetLevel=function(){s.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var u=d();null==u&&(u=r),s.setLevel(u,!1)}var d=new c,u={};d.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=u[e];return t||(t=u[e]=new c(e,d.getLevel(),d.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return d.noConflict=function(){return typeof window!==t&&window.log===d&&(window.log=h),d},d.getLoggers=function(){return u},d.default=d,d},e.exports?e.exports=r():t.log=r()});const ue={debug:0,info:1,warn:2,error:3};class he{constructor(e={}){var t,r,n;this.buffer=[],this.isCapturing=!1,this.options={enabled:null!==(t=e.enabled)&&void 0!==t&&t,level:null!==(r=e.level)&&void 0!==r?r:"debug",maxEntries:null!==(n=e.maxEntries)&&void 0!==n?n:1e3}}start(){this.options.enabled&&(this.isCapturing=!0,this.buffer=[])}stop(){this.isCapturing=!1}addEntry(e,t,r){if(!this.isCapturing||!this.options.enabled)return;if(ue[e]<ue[this.options.level])return;const n=Object.assign({timestamp:(new Date).toISOString(),level:e,message:t},r&&Object.keys(r).length>0?{context:r}:{});this.buffer.push(n),this.buffer.length>this.options.maxEntries&&this.buffer.shift()}getLogs(){return[...this.buffer]}getLogCount(){return this.buffer.length}drain(){const e=this.buffer;return this.buffer=[],e}clear(){this.buffer=[]}isActive(){return this.isCapturing}isEnabled(){return this.options.enabled}}let pe=null;const Ae=de.getLogger("telnyx"),ge={trace:0,debug:1,info:2,warn:3,error:4};let fe=ge.info;function ve(e){if(null==e)return e;if("object"!=typeof e)return e;try{const t=JSON.stringify(e),r=JSON.parse(t);if("object"==typeof r&&null!==r&&Object.keys(r).length>1)return r}catch(e){}const t={};for(const r in e)try{const n=e[r];if("function"==typeof n)continue;if("object"==typeof n&&null!==n)try{t[r]=JSON.parse(JSON.stringify(n))}catch(e){t[r]=String(n)}else t[r]=n}catch(e){}return Object.keys(t).length>0?t:{value:String(e)}}const me=Ae.methodFactory;Ae.methodFactory=(e,t,r)=>{const n=me(e,t,r);return function(...t){if(ge[e]>=fe){const e=[(new Date).toISOString().replace("T"," ").replace("Z",""),"-"];for(const r of t)e.push(r);n(...e)}const r=pe;if(null==r?void 0:r.isActive()){const[n,...o]=t,i="string"==typeof n?n:JSON.stringify(n);let a;o.length>0&&(a=1===o.length&&"object"==typeof o[0]&&null!==o[0]?ve(o[0]):{args:o.map(ve)}),r.addEntry(e,i,a)}}},Ae.setLevel("debug",!1);const Ce=e=>{const[t,r,n,o,i,a]=e;let s={};try{s=JSON.parse(i.replace(/ID"/g,'Id"'))}catch(e){Ae.warn("Verto LA invalid media JSON string:",i)}return{participantId:Number(t),participantNumber:r,participantName:n,codec:o,media:s,participantData:a}},we=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}},be=e=>e instanceof Function||"function"==typeof e,ye=e=>"object"==typeof document&&"getElementById"in document?"string"==typeof e?document.getElementById(e)||null:"function"==typeof e?e():e instanceof HTMLMediaElement?e:null:null,ke=/^(ws|wss):\/\//,xe=(e,t=null)=>{const{result:r={},error:n}=e;if(n)return{error:n};const{result:o=null}=r;if(null===o)return null!==t&&(r.node_id=t),{result:r};const{code:i=null,node_id:a=null,result:s=null}=o;return i&&"200"!==i?{error:o}:s?xe(s,a):{result:o}},Se=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),_e=({login:e,passwd:t,password:r,login_token:n})=>Boolean(e&&(t||r)||n),Be=({anonymous_login:e})=>Boolean(e)&&Boolean(e.target_id)&&Boolean(e.target_type),Ee=e=>{var t,r,n,o,i,a;let s="",l="";return(null===(r=null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.params)||void 0===r?void 0:r.state)&&(s=null===(o=null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.params)||void 0===o?void 0:o.state),(null===(i=null==e?void 0:e.params)||void 0===i?void 0:i.state)&&(l=null===(a=null==e?void 0:e.params)||void 0===a?void 0:a.state),s||l};function Ie({debounceTime:e}){let t,r;return{promise:new Promise((n,o)=>{t=e?Te(n,e):n,r=o}),resolve:t,reject:r}}const Te=(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=window.setTimeout(()=>{e(...n)},t)}},Re="telnyx-voice-sdk-id";function Ne(){return sessionStorage.getItem(Re)}function Oe(){sessionStorage.removeItem(Re)}var Le,De,Pe;"undefined"!=typeof window&&window.addEventListener("beforeunload",()=>{Oe()}),function(e){e.Offer="offer",e.Answer="answer"}(Le||(Le={})),function(e){e.Inbound="inbound",e.Outbound="outbound"}(De||(De={})),function(e){e.Invite="telnyx_rtc.invite",e.Attach="telnyx_rtc.attach",e.Answer="telnyx_rtc.answer",e.Info="telnyx_rtc.info",e.Candidate="telnyx_rtc.candidate",e.EndOfCandidates="telnyx_rtc.endOfCandidates",e.Display="telnyx_rtc.display",e.Media="telnyx_rtc.media",e.Event="telnyx_rtc.event",e.Bye="telnyx_rtc.bye",e.Punt="telnyx_rtc.punt",e.Broadcast="telnyx_rtc.broadcast",e.Subscribe="telnyx_rtc.subscribe",e.Unsubscribe="telnyx_rtc.unsubscribe",e.ClientReady="telnyx_rtc.clientReady",e.Modify="telnyx_rtc.modify",e.Ringing="telnyx_rtc.ringing",e.GatewayState="telnyx_rtc.gatewayState",e.Ping="telnyx_rtc.ping",e.Pong="telnyx_rtc.pong"}(Pe||(Pe={}));const Me={generic:"event",[Pe.Display]:"participantData",[Pe.Attach]:"participantData",conferenceUpdate:"conferenceUpdate",callUpdate:"callUpdate",vertoClientReady:"vertoClientReady",userMediaError:"userMediaError",peerConnectionFailureError:"peerConnectionFailureError",signalingStateClosed:"signalingStateClosed"},Ue={destinationNumber:"",remoteCallerName:"Outbound Call",remoteCallerNumber:"",callerName:"",callerNumber:"",audio:!0,useStereo:!1,debug:!1,debugOutput:"socket",attach:!1,screenShare:!1,userVariables:{},mediaSettings:{useSdpASBandwidthKbps:!1,sdpASBandwidthKbps:0},mutedMicOnStart:!1,prefetchIceCandidates:!0};var Fe,je,ze,qe,$e;!function(e){e[e.New=0]="New",e[e.Requesting=1]="Requesting",e[e.Trying=2]="Trying",e[e.Recovering=3]="Recovering",e[e.Ringing=4]="Ringing",e[e.Answering=5]="Answering",e[e.Early=6]="Early",e[e.Active=7]="Active",e[e.Held=8]="Held",e[e.Hangup=9]="Hangup",e[e.Destroy=10]="Destroy",e[e.Purge=11]="Purge"}(Fe||(Fe={})),function(e){e.Participant="participant",e.Moderator="moderator"}(je||(je={})),function(e){e.Join="join",e.Leave="leave",e.Bootstrap="bootstrap",e.Add="add",e.Modify="modify",e.Delete="delete",e.Clear="clear",e.ChatMessage="chatMessage",e.LayerInfo="layerInfo",e.LogoInfo="logoInfo",e.LayoutInfo="layoutInfo",e.LayoutList="layoutList",e.ModCmdResponse="modCommandResponse"}(ze||(ze={})),function(e){e.Video="videoinput",e.AudioIn="audioinput",e.AudioOut="audiooutput"}(qe||(qe={})),function(e){e.REGED="REGED",e.UNREGED="UNREGED",e.NOREG="NOREG",e.FAILED="FAILED",e.FAIL_WAIT="FAIL_WAIT",e.REGISTER="REGISTER",e.TRYING="TRYING",e.EXPIRED="EXPIRED",e.UNREGISTER="UNREGISTER"}($e||($e={}));const We="GLOBAL",He={},Ve=(e,t)=>`${e}|${t}`,Ge=(e,t=We)=>Ve(e,t)in He,Ye=(e,t,r=We)=>{const n=Ve(e,r);n in He||(He[n]=[]),He[n].push(t)},Ke=(e,t,r=We)=>{const n=function(o){Qe(e,n,r),t(o)};return n.prototype.targetRef=t,Ye(e,n,r)},Qe=(e,t,r=We)=>{if(!Ge(e,r))return!1;const n=Ve(e,r);if(be(t))for(let e=He[n].length-1;e>=0;e--){const r=He[n][e];(t===r||r.prototype&&t===r.prototype.targetRef)&&He[n].splice(e,1)}else He[n]=[];return 0===He[n].length&&delete He[n],!0},Je=(e,t,r=We,n=!0)=>{const o=n&&r!==We;if(!Ge(e,r))return o&&Je(e,t),!1;const i=Ve(e,r),a=He[i].length;if(!a)return o&&Je(e,t),!1;for(let e=a-1;e>=0;e--)He[i][e](t);return o&&Je(e,t),!0},Xe=e=>{const t=Ve(e,"");Object.keys(He).filter(e=>0===e.indexOf(t)).forEach(e=>delete He[e])};let Ze="undefined"!=typeof WebSocket?WebSocket:null;class et{constructor(e){this.session=e,this.previousGatewayState="",this._wsClient=null,this._host=J,this._timers={},this._useCanaryRtcServer=!1,this._hasCanaryBeenUsed=!1,this._safetyTimeoutId=null,this.upDur=null,this.downDur=null;const{host:t,env:r,region:n,useCanaryRtcServer:o}=e.options;r&&(this._host="development"===r?"wss://rtcdev.telnyx.com":J),t&&(this._host=(e=>`${ke.test(e)?"":"wss://"}${e}`)(t)),n&&(this._host=this._host.replace(/rtc(dev)?/,`${n}.rtc$1`)),o&&(this._useCanaryRtcServer=!0)}get connected(){return!!this._wsClient&&1===this._wsClient.readyState}get connecting(){return!!this._wsClient&&0===this._wsClient.readyState}get closing(){return!!this._wsClient&&2===this._wsClient.readyState}get closed(){return!!this._wsClient&&3===this._wsClient.readyState}get isAlive(){return this.connecting||this.connected}get isDead(){return this.closing||this.closed}get host(){return this._host}connect(){const e=new URL(this._host);let t=Ne();this.session.options.rtcIp&&this.session.options.rtcPort&&(t=null,this._useCanaryRtcServer=!1,e.searchParams.set("rtc_ip",this.session.options.rtcIp),e.searchParams.set("rtc_port",this.session.options.rtcPort.toString())),t&&e.searchParams.set("voice_sdk_id",t),this._useCanaryRtcServer&&(e.searchParams.set("canary","true"),t&&!this._hasCanaryBeenUsed&&(e.searchParams.delete("voice_sdk_id"),Ae.debug("first canary connection. Refreshing voice_sdk_id")),this._hasCanaryBeenUsed=!0),this.session.options.skipLastVoiceSdkId&&e.searchParams.has("voice_sdk_id")&&e.searchParams.set("skip_last_voice_sdk_id","true");try{this._wsClient=new Ze(e.toString()),this._registerSocketEvents(this._wsClient)}catch(e){Ae.error("WebSocket connection failed:",e);const t=se(B,e);Je(te.Error,{error:t,sessionId:this.session.sessionid},this.session.uuid)}}sendRawText(e){var t;null===(t=this._wsClient)||void 0===t||t.send(e)}send(e){var t;const{request:r}=e,n=new Promise((e,t)=>{if(r.hasOwnProperty("result"))return e();Ke(r.id,r=>{const{result:n,error:o}=xe(r);return o?t(o):e(n)})});return Ae.debug("SEND: \n",JSON.stringify(r,null,2),"\n"),null===(t=this._wsClient)||void 0===t||t.send(JSON.stringify(r)),n}close(){if(!this._wsClient||this.closing)return;const e=this._wsClient;be(this._wsClient._beginClose)?this._wsClient._beginClose():this._wsClient.close(),this._safetyTimeoutId||(this._safetyTimeoutId=setTimeout(()=>this._handleCloseTimeout(e),5e3))}_registerSocketEvents(e){e.onopen=e=>Je(te.SocketOpen,e,this.session.uuid),e.onclose=t=>(this._clearSafetyTimeout(),this._safetyCleanupSocket(e,"close"),Je(te.SocketClose,t,this.session.uuid)),e.onerror=t=>{this._clearSafetyTimeout(),this._safetyCleanupSocket(e,"error");const r=se(E);return Je(te.Error,{error:r,sessionId:this.session.sessionid},this.session.uuid),Je(te.SocketError,{error:t,sessionId:this.session.sessionid},this.session.uuid)},e.onmessage=e=>{var t,r;const n=we(e.data);var o;if("string"!=typeof n){if(n.voice_sdk_id&&(o=n.voice_sdk_id,sessionStorage.setItem(Re,o)),this._unsetTimer(n.id),Ae.debug("RECV: \n",JSON.stringify(n,null,2),"\n"),$e[`${null===(r=null===(t=null==n?void 0:n.result)||void 0===t?void 0:t.params)||void 0===r?void 0:r.state}`]||!Je(n.id,n)){const e=Ee(n);Je(te.SocketMessage,n,this.session.uuid),Boolean(e)&&(this.previousGatewayState=e)}}else this._handleStringResponse(n)}}_deregisterSocketEvents(e){e.onopen=null,e.onclose=null,e.onerror=null,e.onmessage=null}_handleCloseTimeout(e){this._safetyTimeoutId=null,e&&3!==e.readyState?(Ae.warn("Socket stuck in CLOSING after 5s — forcefully cleaning up"),this._deregisterSocketEvents(e),this._safetyCleanupSocket(e,"timeout"),this._wsClient&&this._wsClient!==e||Je(te.SocketClose,{code:1006,reason:"STUCK_WS_TIMEOUT: Socket got stuck in CLOSING state and was forcefully cleaned up by safety timeout",wasClean:!1},this.session.uuid)):Ae.warn("Safety timeout fired but socket is already closed or cleaned up")}_clearSafetyTimeout(){this._safetyTimeoutId&&(Ae.debug("Clearing safety timeout"),clearTimeout(this._safetyTimeoutId),this._safetyTimeoutId=null)}_safetyCleanupSocket(e,t){this._wsClient===e?(Ae.debug(`Nulling socket reference (reason: ${t})`),this._wsClient=null):Ae.debug(`Skipping socket cleanup - old socket already replaced (reason: ${t})`)}_unsetTimer(e){clearTimeout(this._timers[e]),delete this._timers[e]}_handleStringResponse(e){if(/^#SP/.test(e))switch(e[3]){case"U":this.upDur=parseInt(e.substring(4));break;case"D":this.downDur=parseInt(e.substring(4)),Je(te.SpeedTest,{upDur:this.upDur,downDur:this.downDur},this.session.uuid)}else Ae.warn("Unknown message from socket",e)}}class tt{buildRequest(e){this.request=Object.assign({jsonrpc:"2.0",id:p()},e)}}const rt={id:"callID",destinationNumber:"destination_number",remoteCallerName:"remote_caller_id_name",remoteCallerNumber:"remote_caller_id_number",callerName:"caller_id_name",callerNumber:"caller_id_number",customHeaders:"custom_headers"};class nt extends tt{constructor(e={}){if(super(),e.hasOwnProperty("dialogParams")){const t=a(e.dialogParams,["remoteSdp","localStream","remoteStream","localElement","remoteElement","onNotification","camId","micId","speakerId"]);for(const e in rt)e&&t.hasOwnProperty(e)&&(t[rt[e]]=t[e],delete t[e]);e.dialogParams=t}this.buildRequest({method:this.toString(),params:e})}}class ot extends nt{constructor(e){super(),this.method=Pe.GatewayState,this.buildRequest({method:this.method,voice_sdk_id:e,params:{}})}}class it{constructor(e){this.pendingRequestId=null,this.onSocketMessage=e=>s(this,void 0,void 0,function*(){e.id===this.pendingRequestId&&this.gatewayStateTask.resolve(Ee(e))}),this.getIsRegistered=()=>s(this,void 0,void 0,function*(){const e=new ot(Ne());this.pendingRequestId=e.request.id,this.gatewayStateTask=Ie({}),this.session.execute(e);const t=yield this.gatewayStateTask.promise;return!!t&&[$e.REGISTER,$e.REGED].includes(t)}),this.session=e,this.gatewayStateTask=Ie({}),this.session.on("telnyx.socket.message",this.onSocketMessage)}}class at extends nt{constructor(e){super(),this.method=Pe.Ping,this.buildRequest({method:this.method,voice_sdk_id:e,params:{}})}}var st="2.26.4",lt=st;class ct extends nt{constructor(e,t,r,n,o={},i){super(),this.method="login";const a={login:e,passwd:t,login_token:r,userVariables:o,reconnection:i,loginParams:{},"User-Agent":{sdkVersion:lt,data:navigator.userAgent}};n&&(a.sessid=n),this.buildRequest({method:this.method,params:a})}}class dt extends nt{constructor(e,t){super(),this.buildRequest({id:e,result:{method:t}})}}class ut extends nt{toString(){return Pe.Invite}}class ht extends nt{toString(){return Pe.Answer}}class pt extends nt{toString(){return Pe.Attach}}class At extends nt{toString(){return Pe.Bye}}class gt extends nt{toString(){return Pe.Candidate}}class ft extends nt{toString(){return Pe.EndOfCandidates}}class vt extends nt{toString(){return Pe.Modify}}class mt extends nt{toString(){return Pe.Info}}class Ct extends nt{toString(){return Pe.Broadcast}}class wt extends nt{toString(){return Pe.Subscribe}}class bt extends nt{toString(){return Pe.Unsubscribe}}class yt extends nt{constructor(e){super(),this.method="anonymous_login";const{target_type:t,target_id:r,target_version_id:n,target_params:o,userVariables:i,sessionId:a,reconnection:s}=e,l={target_type:t,target_id:r,userVariables:i,reconnection:s,"User-Agent":{sdkVersion:lt,data:navigator.userAgent}};a&&(l.sessid=a),n&&(l.target_version_id=n),o&&(l.target_params=o),this.buildRequest({method:this.method,params:l})}}class kt{constructor(e){if(this.options=e,this.uuid=p(),this.sessionid="",this.subscriptions={},this.signature=null,this.relayProtocol=null,this.contexts=[],this.timeoutErrorCode=-32e3,this.invalidMethodErrorCode=-32601,this.authenticationRequiredErrorCode=-32e3,this.callReportId=null,this.dc=null,this.region=null,this.connection=null,this._jwtAuth=!1,this._autoReconnect=!0,this._idle=!1,this._tokenExpiryTimeout=null,this._executeQueue=[],!this.validateOptions())throw new Error("Invalid init options");var t,r;t=e.debug?"debug":"info",fe=null!==(r=ge[t])&&void 0!==r?r:ge.info,this._onSocketOpen=this._onSocketOpen.bind(this),this.onNetworkClose=this.onNetworkClose.bind(this),this._onSocketMessage=this._onSocketMessage.bind(this),this._handleLoginError=this._handleLoginError.bind(this),this._attachListeners(),this.connection=new et(this),this.registerAgent=new it(this)}get __logger(){return Ae}get connected(){return this.connection&&this.connection.connected}getIsRegistered(){return s(this,void 0,void 0,function*(){return this.registerAgent.getIsRegistered()})}get reconnectDelay(){return 1e3*Se(2,6)}execute(e){return this._idle?new Promise(t=>this._executeQueue.push({resolve:t,msg:e})):this.connected?this.connection.send(e).catch(e=>s(this,void 0,void 0,function*(){if((null==e?void 0:e.code)===this.authenticationRequiredErrorCode){if(!this._autoReconnect){const t=se(O,e);Je(te.Error,{error:t,sessionId:this.sessionid},this.uuid)}yield this.login()}throw e})):new Promise(t=>{this._executeQueue.push({resolve:t,msg:e}),Ae.debug("Calling connect from execute since not currently connected."),this.connect()})}executeRaw(e){this._idle?this._executeQueue.push({msg:e}):this.connection.sendRawText(e)}validateOptions(){return _e(this.options)||Be(this.options)}broadcast(e){}disconnect(){return s(this,void 0,void 0,function*(){clearTimeout(this._reconnectTimeout),this._clearTokenExpiryTimeout(),this.subscriptions={},this._autoReconnect=!1,this.relayProtocol=null,this._closeConnection(),yield sessionStorage.removeItem(this.signature),this._executeQueue=[],this._detachListeners(),Ae.debug("Session disconnected. Cleaned up all listeners and subscriptions, closed connection, disabled auto-reconnect.")})}on(e,t){return Ye(e,t,this.uuid),this}off(e,t){return Qe(e,t,this.uuid),this}connect(){return s(this,void 0,void 0,function*(){this.connection||(Ae.debug("No existing connection found, creating a new one."),this.connection=new et(this)),this._attachListeners(),this._autoReconnect=!0,this.connection.isAlive||(Ae.debug("Initiating connection to the server..."),this.connection.connect()),Ae.debug("Connect method called. Connection initiated.")})}_handleLoginError(e){const t=se(R,e);Je(te.Error,{error:t,sessionId:this.sessionid},this.uuid)}clearReconnectToken(){Oe()}_checkTokenExpiry(){this._clearTokenExpiryTimeout();const e=this.options.login_token;if(e&&"string"==typeof e)try{const t=e.split(".");if(3!==t.length)return;const r=JSON.parse(atob(t[1])).exp;if("number"!=typeof r)return;const n=r-Math.floor(Date.now()/1e3);if(n<=0)return;if(n<=kt.TOKEN_EXPIRY_WARNING_SECONDS)this._emitTokenExpiryWarning();else{const e=1e3*(n-kt.TOKEN_EXPIRY_WARNING_SECONDS);this._tokenExpiryTimeout=setTimeout(()=>{this._emitTokenExpiryWarning()},e)}}catch(e){Ae.debug("login_token is not a decodable JWT, skipping expiry check")}}_emitTokenExpiryWarning(){const e=oe(Y);Je(te.Warning,{warning:e,sessionId:this.sessionid},this.uuid)}_clearTokenExpiryTimeout(){null!==this._tokenExpiryTimeout&&(clearTimeout(this._tokenExpiryTimeout),this._tokenExpiryTimeout=null)}login({creds:e,onSuccess:t,onError:r}={}){return s(this,void 0,void 0,function*(){if(this.connection&&this.connection.isAlive){if(e&&(void 0!==e.login&&(this.options.login=e.login),void 0!==e.password&&(this.options.password=e.password),void 0!==e.passwd&&(this.options.passwd=e.passwd),void 0!==e.login_token&&(this.options.login_token=e.login_token),void 0!==e.userVariables&&(this.options.userVariables=e.userVariables),void 0!==e.anonymous_login&&(this.options.anonymous_login=e.anonymous_login)),_e(this.options))return this._login({type:"login",onSuccess:t,onError:r});if(Be(this.options))return this._login({type:"anonymous_login",onSuccess:t,onError:r});{const e="Invalid login options provided for authentication.";Ae.error(e);const t=se(N,void 0,e);return void Je(te.Error,{error:t,type:"InvalidCredentialsOptions",sessionId:this.sessionid},this.uuid)}}})}_login({type:e,onSuccess:t,onError:r}){return s(this,void 0,void 0,function*(){let n;n="login"===e?new ct(this.options.login,this.options.password||this.options.passwd,this.options.login_token,this.sessionid,this.options.userVariables,!!Ne()):new yt({target_id:this.options.anonymous_login.target_id,target_type:this.options.anonymous_login.target_type,target_version_id:this.options.anonymous_login.target_version_id,target_params:this.options.anonymous_login.target_params,sessionId:this.sessionid,userVariables:this.options.userVariables,reconnection:!!Ne()});const o=yield this.execute(n).catch(e=>{this._handleLoginError(e),r&&r(e)});o&&(this.sessionid=o.sessid,this._checkTokenExpiry(),t&&t())})}_onSocketOpen(){return s(this,void 0,void 0,function*(){})}onNetworkClose(){this.relayProtocol&&Xe(this.relayProtocol);for(const e in this.subscriptions)Xe(e);this.subscriptions={},this.contexts=[],clearTimeout(this._keepAliveTimeout),clearTimeout(this._reconnectTimeout),this.connection&&(this.connection.previousGatewayState=""),this._autoReconnect&&(this._reconnectTimeout=setTimeout(()=>{Ae.debug("Calling connect due to network close and auto-reconnect enabled."),this.connect()},this.reconnectDelay))}_onSocketMessage(e){}_removeSubscription(e,t){this._existsSubscription(e,t)&&(t?(delete this.subscriptions[e][t],Qe(e,null,t)):(delete this.subscriptions[e],Xe(e)))}_addSubscription(e,t=null,r){this._existsSubscription(e,r)||(this._existsSubscription(e)||(this.subscriptions[e]={}),this.subscriptions[e][r]={},be(t)&&Ye(e,t,r))}_existsSubscription(e,t){return!(!this.subscriptions.hasOwnProperty(e)||!(!t||t&&this.subscriptions[e].hasOwnProperty(t)))}_attachListeners(){this._detachListeners(),this.on(te.SocketOpen,this._onSocketOpen),this.on(te.SocketClose,this.onNetworkClose),this.on(te.SocketError,this.onNetworkClose),this.on(te.SocketMessage,this._onSocketMessage)}_detachListeners(){this.off(te.SocketOpen,this._onSocketOpen),this.off(te.SocketClose,this.onNetworkClose),this.off(te.SocketError,this.onNetworkClose),this.off(te.SocketMessage,this._onSocketMessage)}_emptyExecuteQueues(){this._executeQueue.forEach(({resolve:e,msg:t})=>{"string"==typeof t?this.executeRaw(t):e(this.execute(t))})}_closeConnection(){this._idle=!0,clearTimeout(this._keepAliveTimeout),this.connection&&this.connection.close()}_resetKeepAlive(){!1===this._pong&&(Ae.warn("No ping/pong received, forcing PING ACK to keep alive"),this.execute(new at(Ne()))),clearTimeout(this._keepAliveTimeout),this._triggerKeepAliveTimeoutCheck()}_triggerKeepAliveTimeoutCheck(){this._pong=!1,this._keepAliveTimeout=setTimeout(()=>this._resetKeepAlive(),35e3)}setPingReceived(){Ae.debug("Ping received"),this._pong=!0}static on(e,t){Ye(e,t)}static off(e){Qe(e)}static uuid(){return p()}clearConnection(){this.connection=null}hasAutoReconnect(){return this._autoReconnect}}kt.TOKEN_EXPIRY_WARNING_SECONDS=120;const xt=e=>navigator.mediaDevices.getUserMedia(e),St=e=>e&&e instanceof MediaStream,_t=(e,t)=>{const r=ye(e);null!==r&&(r.getAttribute("autoplay")||r.setAttribute("autoplay","autoplay"),r.getAttribute("playsinline")||r.setAttribute("playsinline","playsinline"),r.srcObject=t)},Bt=(e,t)=>s(void 0,void 0,void 0,function*(){const r=ye(e);if(null===r)return Ae.info("No HTMLMediaElement to attach the speakerId"),!1;if("string"!=typeof t)return Ae.info(`Invalid speaker deviceId: '${t}'`),!1;try{return yield r.setSinkId(t),!0}catch(e){return!1}}),Et=e=>{e&&"live"===e.readyState&&e.stop()},It=e=>{St(e)&&e.getTracks().forEach(Et),e=null},Tt=e=>s(void 0,void 0,void 0,function*(){Ae.info("RTCService.getUserMedia",e);const{audio:t,video:r}=e;if(!t&&!r)return null;try{return yield xt(e)}catch(t){if(Ae.error("getUserMedia error: ",t),(e=>"NotReadableError"===e.name||"NotFoundError"===e.name||"OverconstrainedError"===e.name)(t)){const r=(e=>{const{audio:t,video:r}=e;let n=!1,o=t,i=r;if("object"==typeof t&&null!==t&&"deviceId"in t){n=!0;const e=a(t,["deviceId"]);o=0===Object.keys(e).length||e}if("object"==typeof r&&null!==r&&"deviceId"in r){n=!0;const e=a(r,["deviceId"]);i=0===Object.keys(e).length||e}return n?{audio:o,video:i}:null})(e);if(r){Ae.warn("Device not found or not readable, falling back to default device");try{return yield xt(r)}catch(e){throw Ae.error("Fallback getUserMedia also failed: ",e),t}}}throw t}}),Rt=(e=null,t=!1)=>s(void 0,void 0,void 0,function*(){let r=[];const n=yield navigator.mediaDevices.getUserMedia(((e=null)=>({audio:!e||e===qe.AudioIn||e===qe.AudioOut,video:!e||e===qe.Video}))(e)).catch(e=>(Ae.error(e),null));if(n){if(It(n),r=yield navigator.mediaDevices.enumerateDevices(),e&&(r=r.filter(t=>t.kind===e)),!0===t)return r;const o=[];r=r.filter(e=>{if(!e.groupId)return!0;const t=`${e.kind}-${e.groupId}`;return!o.includes(t)&&(o.push(t),!0)})}return r}),Nt=[[320,240],[640,360],[640,480],[1280,720],[1920,1080]],Ot=(e,t,r)=>s(void 0,void 0,void 0,function*(){const n=yield Rt(r,!0);for(let r=0;r<n.length;r++){const{deviceId:o,label:i}=n[r];if(e===o||t===i)return o}return null}),Lt=(e,t)=>{if(!e)return!1;const{subscribed:r,alreadySubscribed:n}=Dt(e);return r.includes(t)||n.includes(t)},Dt=e=>{const t={subscribed:[],alreadySubscribed:[],unauthorized:[],unsubscribed:[],notSubscribed:[]};return Object.keys(t).forEach(r=>{t[r]=e[`${r}Channels`]||[]}),t},Pt=(e,t=null,r=null)=>{if(!St(e))return null;let n=[];switch(t){case"audio":n=e.getAudioTracks();break;case"video":n=e.getVideoTracks();break;default:n=e.getTracks()}n.forEach(e=>{switch(r){case"on":case!0:e.enabled=!0;break;case"off":case!1:e.enabled=!1;break;default:e.enabled=!e.enabled}})},Mt=e=>{Pt(e,"audio",!0)},Ut=e=>{Pt(e,"audio",!1)},Ft=e=>{Pt(e,"audio",null)};var jt;function zt(e,t){const r=document.getElementById(t);if(r)return r;if(e&&t){const r=document.createElement("audio");return r.id=t,r.loop=!0,r.src=e,r.preload="auto",r.load(),document.body.appendChild(r),r}return null}function qt(e){e&&(e._playFulfilled=!1,e._promise=e.play(),e._promise.then(()=>{e._playFulfilled=!0}).catch(t=>{Ae.error("playAudio",t),e._playFulfilled=!0}))}function $t(e){e&&(e._playFulfilled?(e.pause(),e.currentTime=0):e._promise&&e._promise.then?e._promise.then(()=>{e.pause(),e.currentTime=0}):setTimeout(()=>{e.pause(),e.currentTime=0},1e3))}!function(e){e.not_supported="not supported",e.full="full",e.partial="partial"}(jt||(jt={}));const Wt=e=>{const t=[],r=[];return e&&0!==e.length?(e.forEach(e=>{const n=e.mimeType.toLocaleLowerCase();n.startsWith("audio/")?t.push(e):n.startsWith("video/")&&r.push(e)}),{audioCodecs:t,videoCodecs:r}):{audioCodecs:t,videoCodecs:r}};class Ht extends tt{constructor(e,t){super(),this.method="ai_conversation",this.buildRequest({method:this.method,params:{type:"conversation.item.create",previous_item_id:null,item:{id:p(),type:"message",role:"user",content:[{type:"input_text",text:e},...null==t?void 0:t.map(e=>({type:"image_url",image_url:{url:e}}))]}}})}}class Vt{constructor(e,t){var r;this.peerConnection=null,this.intervalId=null,this.statsBuffer=[],this.intervalStartTime=null,this.callEndTime=null,this.logCollector=null,this.intervalAudioLevels={outbound:[],inbound:[]},this.intervalJitters=[],this.intervalRTTs=[],this.intervalBitrates={outbound:[],inbound:[]},this.previousStats={},this.previousCandidatePairId=null,this.MAX_BUFFER_SIZE=360,this.onFlushNeeded=null,this.onWarning=null,this._breachCounters={},this._activeWarnings=new Set,this._lastWarningEmitted={},this._prevPacketsReceived=null,this._prevPacketsLost=null,this._segmentIndex=0,this._flushing=!1,this.options=e,this.logCollectorOptions=t||{enabled:!1,level:"debug",maxEntries:1e3},this.callStartTime=new Date,this.logCollectorOptions.enabled&&(this.logCollector=function(e){return new he(e)}(this.logCollectorOptions),this.logCollector.start(),r=this.logCollector,pe=r)}start(e){var t,r;this.options.enabled&&(this.peerConnection=e,this.intervalStartTime=new Date,Ae.info("CallReportCollector: Starting stats collection",{interval:this.options.interval,logCollectorActive:null!==(r=null===(t=this.logCollector)||void 0===t?void 0:t.isActive())&&void 0!==r&&r}),this.intervalId=setInterval(()=>{this._collectStats()},this.options.interval))}stop(){var e,t;return s(this,void 0,void 0,function*(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.callEndTime=new Date,this.peerConnection&&this.intervalStartTime&&(yield this._collectStats(!0));const r=null!==(t=null===(e=this.logCollector)||void 0===e?void 0:e.getLogCount())&&void 0!==t?t:0;this.logCollector&&this.logCollector.stop(),Ae.info("CallReportCollector: Stopped stats collection",{totalIntervals:this.statsBuffer.length,totalLogs:r,duration:this.callEndTime.getTime()-this.callStartTime.getTime()})})}flush(e){var t,r;if(this._flushing||0===this.statsBuffer.length)return null;this._flushing=!0;try{const n=this._segmentIndex++,o=this.statsBuffer;this.statsBuffer=[];const i=null!==(r=null===(t=this.logCollector)||void 0===t?void 0:t.drain())&&void 0!==r?r:[],a=new Date,s=Object.assign(Object.assign({summary:Object.assign(Object.assign({},e),{durationSeconds:(a.getTime()-this.callStartTime.getTime())/1e3,startTimestamp:this.callStartTime.toISOString(),endTimestamp:a.toISOString()}),stats:o},i.length>0?{logs:i}:{}),{segment:n});return Ae.info("CallReportCollector: Flushed intermediate segment",{segment:n,intervals:o.length,logEntries:i.length,callId:e.callId}),s}finally{this._flushing=!1}}postReport(e,t,r,n){var o,i;return s(this,void 0,void 0,function*(){const a=null===(o=this.logCollector)||void 0===o?void 0:o.getLogs(),s=a&&a.length>0;if(!this.options.enabled)return void Ae.info("CallReportCollector: Skipping report — call reports disabled");if(0===this.statsBuffer.length&&!s)return void Ae.info("CallReportCollector: Skipping report — no stats or logs collected");const l=this._segmentIndex>0,c=this._segmentIndex,d=Object.assign(Object.assign({summary:Object.assign(Object.assign({},e),{durationSeconds:this.callEndTime&&this.callStartTime?(this.callEndTime.getTime()-this.callStartTime.getTime())/1e3:void 0,startTimestamp:this.callStartTime.toISOString(),endTimestamp:null===(i=this.callEndTime)||void 0===i?void 0:i.toISOString()}),stats:this.statsBuffer},a&&a.length>0?{logs:a}:{}),l?{segment:c}:{});yield this._sendPayload(d,t,r,n)})}sendPayload(e,t,r,n){return s(this,void 0,void 0,function*(){yield this._sendPayload(e,t,r,n)})}_sendPayload(e,t,r,n){var o,i;return s(this,void 0,void 0,function*(){try{const a=new URL(r),s=`${a.protocol.replace(/^ws/,"http")}//${a.host}/call_report`,l=void 0===e.segment||e.summary.endTimestamp?"final report":`intermediate segment ${e.segment}`;Ae.info(`CallReportCollector: Posting ${l}`,{endpoint:s,intervals:e.stats.length,logEntries:null!==(i=null===(o=e.logs)||void 0===o?void 0:o.length)&&void 0!==i?i:0,callId:e.summary.callId,segment:e.segment});const c={"Content-Type":"application/json","x-call-report-id":t,"x-call-id":e.summary.callId};n&&(c["x-voice-sdk-id"]=n);const d=JSON.stringify(e),u=()=>fetch(s,{method:"POST",headers:c,body:d}),h=yield u();if(h.ok)Ae.info(`CallReportCollector: Successfully posted ${l}`);else{const e=yield h.text();Ae.error(`CallReportCollector: Failed to post ${l}`,{status:h.status,error:e})}}catch(o){Ae.warn(`CallReportCollector: Network error posting call report, retrying in ${Vt.RETRY_DELAY_MS}ms`,{error:o}),yield new Promise(e=>setTimeout(e,Vt.RETRY_DELAY_MS));try{const o=new URL(r),i=`${o.protocol.replace(/^ws/,"http")}//${o.host}/call_report`,a={"Content-Type":"application/json","x-call-report-id":t,"x-call-id":e.summary.callId};n&&(a["x-voice-sdk-id"]=n);const s=yield fetch(i,{method:"POST",headers:a,body:JSON.stringify(e)});if(s.ok)Ae.info("CallReportCollector: Successfully posted call report on retry");else{const e=yield s.text();Ae.error("CallReportCollector: Failed to post call report on retry",{status:s.status,error:e})}}catch(e){Ae.error("CallReportCollector: Retry also failed, giving up",{error:e})}}})}getStatsBuffer(){return this.statsBuffer}getLogs(){var e,t;return null!==(t=null===(e=this.logCollector)||void 0===e?void 0:e.getLogs())&&void 0!==t?t:[]}cleanup(){this.logCollector&&(this.logCollector.clear(),this.logCollector=null)}_collectStats(e=!1){var t,r,n;return s(this,void 0,void 0,function*(){if(this.peerConnection&&this.intervalStartTime)try{const o=yield this.peerConnection.getStats(),i=new Date;let a,s,l=null,c=null,d=null,u=null;if(o.forEach(e=>{switch(e.type){case"outbound-rtp":"audio"===e.kind&&"audio"===e.mediaType&&(l=e);break;case"inbound-rtp":"audio"===e.kind&&"audio"===e.mediaType&&(c=e);break;case"candidate-pair":(e.nominated||"succeeded"===e.state)&&(d=e);break;case"transport":u=e}}),l){const e=this._getOutboundAudioLevel(o,l);if(null!==e&&this.intervalAudioLevels.outbound.push(e),void 0!==this.previousStats.outboundBytes&&void 0!==this.previousStats.timestamp){const e=(l.bytesSent||0)-this.previousStats.outboundBytes,t=(l.timestamp||i.getTime())-this.previousStats.timestamp;if(t>0){const r=8*e*1e3/t;this.intervalBitrates.outbound.push(r)}}this.previousStats.outboundBytes=l.bytesSent}if(c){const e=this._getInboundAudioLevel(o,c);if(null!==e&&this.intervalAudioLevels.inbound.push(e),void 0!==c.jitter&&this.intervalJitters.push(1e3*c.jitter),void 0!==this.previousStats.inboundBytes&&void 0!==this.previousStats.timestamp){const e=(c.bytesReceived||0)-this.previousStats.inboundBytes,t=(c.timestamp||i.getTime())-this.previousStats.timestamp;if(t>0){const r=8*e*1e3/t;this.intervalBitrates.inbound.push(r)}}this.previousStats.inboundBytes=c.bytesReceived}d&&(void 0!==d.currentRoundTripTime&&this.intervalRTTs.push(d.currentRoundTripTime),null!==this.previousCandidatePairId&&d.id!==this.previousCandidatePairId&&Ae.debug("CallReportCollector: ICE candidate pair changed mid-call",{previous:this.previousCandidatePairId,current:d.id}),this.previousCandidatePairId=null!==(t=d.id)&&void 0!==t?t:null),d&&(a=this._resolveCandidate(o,d.localCandidateId),s=this._resolveCandidate(o,d.remoteCandidateId)),this.previousStats.timestamp=i.getTime();const h=i.getTime()-this.intervalStartTime.getTime();if(e||h>=this.options.interval){const e=this._createStatsEntry(this.intervalStartTime,i,l,c,d,a,s,u);if(this.statsBuffer.push(e),this.statsBuffer.length>this.MAX_BUFFER_SIZE&&(this.statsBuffer.shift(),Ae.warn("CallReportCollector: Buffer size limit reached, removing oldest entry")),this.onFlushNeeded&&!this._flushing){const e=this.statsBuffer.length,t=null!==(n=null===(r=this.logCollector)||void 0===r?void 0:r.getLogCount())&&void 0!==n?n:0;if(e>=Vt.STATS_FLUSH_THRESHOLD||t>=Vt.LOGS_FLUSH_THRESHOLD){Ae.info("CallReportCollector: Approaching buffer limits, requesting flush",{statsIntervals:e,logEntries:t});try{this.onFlushNeeded()}catch(e){Ae.error("CallReportCollector: onFlushNeeded callback error",{error:e})}}}this._checkQualityWarnings(e,c),this.intervalStartTime=i,this._resetIntervalAccumulators()}}catch(e){Ae.error("CallReportCollector: Error collecting stats",{error:e})}})}_checkQualityWarnings(e,t){var r,n,o,i,a,s,l,c,d,u,h,p,A,g,f,v,m;if(!this.onWarning)return;const C=null===(r=e.connection)||void 0===r?void 0:r.roundTripTimeAvg,w=null===(o=null===(n=e.audio)||void 0===n?void 0:n.inbound)||void 0===o?void 0:o.jitterAvg;let b;if(t){const e=null!==(i=t.packetsReceived)&&void 0!==i?i:0,r=null!==(a=t.packetsLost)&&void 0!==a?a:0;if(null!==this._prevPacketsReceived&&null!==this._prevPacketsLost){const t=e-this._prevPacketsReceived,n=r-this._prevPacketsLost,o=t+n;o>0&&(b=n/o*100)}this._prevPacketsReceived=e,this._prevPacketsLost=r}if(this._trackBreach(P,void 0!==C&&C>Vt.THRESHOLD_RTT_MS),this._trackBreach(M,void 0!==w&&w>Vt.THRESHOLD_JITTER_MS),this._trackBreach(U,void 0!==b&&b>Vt.THRESHOLD_PACKET_LOSS_PCT),void 0!==C&&void 0!==w&&void 0!==b){const e=93.2-.11*w-2.5*b-1e3*C*.01,t=Math.max(1,Math.min(4.5,1+.035*e+e*(e-60)*(100-e)*7e-6));this._trackBreach(F,t<Vt.THRESHOLD_MOS)}else this._trackBreach(F,!1);if(void 0!==(null===(l=null===(s=e.audio)||void 0===s?void 0:s.inbound)||void 0===l?void 0:l.bytesReceived)&&this.statsBuffer.length>1){const t=this.statsBuffer[this.statsBuffer.length-2],r=null!==(u=null===(d=null===(c=null==t?void 0:t.audio)||void 0===c?void 0:c.inbound)||void 0===d?void 0:d.bytesReceived)&&void 0!==u?u:0,n=null!==(h=e.audio.inbound.bytesReceived)&&void 0!==h?h:0;this._trackBreach(j,n-r==0)}if(void 0!==(null===(A=null===(p=e.audio)||void 0===p?void 0:p.outbound)||void 0===A?void 0:A.bytesSent)&&this.statsBuffer.length>1){const t=this.statsBuffer[this.statsBuffer.length-2],r=null!==(v=null===(f=null===(g=null==t?void 0:t.audio)||void 0===g?void 0:g.outbound)||void 0===f?void 0:f.bytesSent)&&void 0!==v?v:0,n=null!==(m=e.audio.outbound.bytesSent)&&void 0!==m?m:0;this._trackBreach(z,n-r==0)}}_trackBreach(e,t){var r,n,o;if(t){if(this._breachCounters[e]=(null!==(r=this._breachCounters[e])&&void 0!==r?r:0)+1,this._breachCounters[e]>=Vt.CONSECUTIVE_BREACHES_REQUIRED){this._activeWarnings.add(e);const r=Date.now();if(r-(null!==(n=this._lastWarningEmitted[e])&&void 0!==n?n:0)>=Vt.WARNING_THROTTLE_MS){this._lastWarningEmitted[e]=r;try{const t=oe(e);Ae.warn(`CallReportCollector: warning ${t.code}: ${t.message}`),null===(o=this.onWarning)||void 0===o||o.call(this,t)}catch(t){Ae.error(`CallReportCollector: Failed to emit warning ${e}`,{error:t})}}}}else this._breachCounters[e]=0,this._activeWarnings.delete(e),delete this._lastWarningEmitted[e]}_createStatsEntry(e,t,r,n,o,i,a,s){const l={intervalStartUtc:e.toISOString(),intervalEndUtc:t.toISOString(),audio:{}};return r&&(l.audio.outbound={packetsSent:r.packetsSent,bytesSent:r.bytesSent,audioLevelAvg:this._average(this.intervalAudioLevels.outbound),bitrateAvg:this._average(this.intervalBitrates.outbound)}),n&&(l.audio.inbound={packetsReceived:n.packetsReceived,bytesReceived:n.bytesReceived,packetsLost:n.packetsLost,packetsDiscarded:n.packetsDiscarded,jitterBufferDelay:n.jitterBufferDelay,jitterBufferEmittedCount:n.jitterBufferEmittedCount,totalSamplesReceived:n.totalSamplesReceived,concealedSamples:n.concealedSamples,concealmentEvents:n.concealmentEvents,audioLevelAvg:this._average(this.intervalAudioLevels.inbound),jitterAvg:this._average(this.intervalJitters),bitrateAvg:this._average(this.intervalBitrates.inbound)}),o&&(l.connection={roundTripTimeAvg:this._average(this.intervalRTTs),packetsSent:o.packetsSent,packetsReceived:o.packetsReceived,bytesSent:o.bytesSent,bytesReceived:o.bytesReceived},l.ice=Object.assign(Object.assign({id:o.id,state:o.state,nominated:o.nominated,writable:o.writable,requestsSent:o.requestsSent,responsesReceived:o.responsesReceived},i?{local:i}:{}),a?{remote:a}:{})),s&&(l.transport=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},void 0!==s.iceState?{iceState:s.iceState}:{}),void 0!==s.dtlsState?{dtlsState:s.dtlsState}:{}),void 0!==s.srtpCipher?{srtpCipher:s.srtpCipher}:{}),void 0!==s.tlsVersion?{tlsVersion:s.tlsVersion}:{}),void 0!==s.selectedCandidatePairChanges?{selectedCandidatePairChanges:s.selectedCandidatePairChanges}:{})),l}_resolveCandidate(e,t){if(!t)return void Ae.debug("CallReportCollector: candidateId is empty, skipping resolve");const r=e.get(t);if(!r)return void Ae.debug("CallReportCollector: candidate not found in stats report",{candidateId:t});const n={};if(void 0!==r.address&&(n.address=r.address),void 0!==r.port&&(n.port=r.port),void 0!==r.candidateType&&(n.candidateType=r.candidateType),void 0!==r.protocol&&(n.protocol=r.protocol),void 0!==r.networkType&&(n.networkType=r.networkType),0!==Object.keys(n).length)return n;Ae.debug("CallReportCollector: candidate report has no usable fields",{candidateId:t})}_getOutboundAudioLevel(e,t){let r;if(t.mediaSourceId&&(r=e.get(t.mediaSourceId)),r||e.forEach(e=>{r||"media-source"!==e.type||"audio"!==e.kind||(r=e)}),void 0!==(null==r?void 0:r.audioLevel))return r.audioLevel;if(r){const e=this._computeAudioLevelFromEnergy(r.totalAudioEnergy,r.totalSamplesDuration,"outbound");if(null!==e)return e}return this._getTrackAudioLevel(e,t.trackId)}_getInboundAudioLevel(e,t){if(void 0!==t.audioLevel)return t.audioLevel;const r=this._computeAudioLevelFromEnergy(t.totalAudioEnergy,t.totalSamplesDuration,"inbound");return null!==r?r:this._getTrackAudioLevel(e,t.trackId)}_computeAudioLevelFromEnergy(e,t,r){if(void 0===e||void 0===t)return null;const n="inbound"===r?"inboundAudioEnergy":"outboundAudioEnergy",o="inbound"===r?"inboundSamplesDuration":"outboundSamplesDuration",i=this.previousStats[n],a=this.previousStats[o];if(this.previousStats[n]=e,this.previousStats[o]=t,void 0===i||void 0===a)return null;const s=e-i,l=t-a;if(l<=0)return null;const c=Math.sqrt(s/l);return Math.min(1,Math.max(0,c))}_getTrackAudioLevel(e,t){var r;if(!t)return null;const n=e.get(t);return n&&null!==(r=n.audioLevel)&&void 0!==r?r:null}_average(e){if(0===e.length)return;const t=e.reduce((e,t)=>e+t,0);return parseFloat((t/e.length).toFixed(4))}_resetIntervalAccumulators(){this.intervalAudioLevels={outbound:[],inbound:[]},this.intervalJitters=[],this.intervalRTTs=[],this.intervalBitrates={outbound:[],inbound:[]}}}Vt.STATS_FLUSH_THRESHOLD=300,Vt.LOGS_FLUSH_THRESHOLD=800,Vt.CONSECUTIVE_BREACHES_REQUIRED=3,Vt.THRESHOLD_RTT_MS=.4,Vt.THRESHOLD_JITTER_MS=30,Vt.THRESHOLD_PACKET_LOSS_PCT=1,Vt.THRESHOLD_MOS=3.5,Vt.WARNING_THROTTLE_MS=15e3,Vt.RETRY_DELAY_MS=500;var Gt,Yt=ce(function(e,t){var r;function n(){}function o(){o.init.call(this)}function i(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function a(e,t,r,o){var a,s,l;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),l=s[t]):(s=e._events=new n,e._eventsCount=0),l){if("function"==typeof l?l=s[t]=o?[r,l]:[l,r]:o?l.unshift(r):l.push(r),!l.warned&&(a=i(e))&&0<a&&l.length>a){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(c)}}else l=s[t]=r,++e._eventsCount;return e}function s(e,t,r){function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}var o=!1;return n.listener=r,n}function l(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function c(e,t){for(var r=Array(t);t--;)r[t]=e[t];return r}Object.defineProperty(t,"__esModule",{value:!0}),n.prototype=Object.create(null),o.EventEmitter=o,o.usingDomains=!1,o.prototype.domain=void 0,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.init=function(){this.domain=null,o.usingDomains&&r.active&&!(this instanceof r.Domain)&&(this.domain=r.active),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new n,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return i(this)},o.prototype.emit=function(e){var t,r,n,o,i,a,s,l="error"===e;if(a=this._events)l=l&&null==a.error;else if(!l)return!1;if(s=this.domain,l){if(t=arguments[1],!s){if(t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=c(e,n),i=0;i<n;++i)o[i].call(r)}(r,u,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=c(e,o),a=0;a<o;++a)i[a].call(r,n)}(r,u,this,arguments[1]);break;case 3:!function(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,a=c(e,i),s=0;s<i;++s)a[s].call(r,n,o)}(r,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var a=e.length,s=c(e,a),l=0;l<a;++l)s[l].call(r,n,o,i)}(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];!function(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=c(e,o),a=0;a<o;++a)i[a].apply(r,n)}(r,u,this,o)}return!0},o.prototype.addListener=function(e,t){return a(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return a(this,e,t,!0)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,s(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,s(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,o,i,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(o=this._events))return this;if(!(r=o[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new n:(delete o[e],o.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length;0<a--;)if(r[a]===t||r[a].listener&&r[a].listener===t){s=r[a].listener,i=a;break}if(0>i)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new n,this;delete o[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()}(r,i);o.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new n,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new n:delete r[e]),this;if(0===arguments.length){for(var o,i=Object.keys(r),a=0;a<i.length;++a)"removeListener"!==(o=i[a])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=new n,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},o.prototype.listeners=function(e){var t,r,n=this._events;return r=n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[],r},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},o.prototype.listenerCount=l,o.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]};var d,u=new Uint8Array(16);function h(){if(!d&&!(d="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(u)}for(var p=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,A=[],g=0;256>g;++g)A.push((g+256).toString(16).substr(1));function f(e,t,r){var n=(e=e||{}).random||(e.rng||h)();if(n[6]=64|15&n[6],n[8]=128|63&n[8],t){r=r||0;for(var o=0;16>o;++o)t[r+o]=n[o];return t}return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=(A[e[t+0]]+A[e[t+1]]+A[e[t+2]]+A[e[t+3]]+"-"+A[e[t+4]]+A[e[t+5]]+"-"+A[e[t+6]]+A[e[t+7]]+"-"+A[e[t+8]]+A[e[t+9]]+"-"+A[e[t+10]]+A[e[t+11]]+A[e[t+12]]+A[e[t+13]]+A[e[t+14]]+A[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&p.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}(n)}function v(e,t){if(!e||!t)return{};const r={...e};if(r.localCandidateId){const e=t.get(r.localCandidateId);r.local={...e}}if(r.remoteCandidateId){const e=t.get(r.remoteCandidateId);r.remote={...e}}return r}function m(e,t,r){return 8*function(e,t,r){const n=e[r],o=t?t[r]:null;return null===n||null===o?null:(n-o)/(e.timestamp-t.timestamp)*1e3}(e,t,r)}function C(e){if(!e.entries)return e;const t={};return e.forEach(function(e,r){t[r]=e}),t}function w(e,t,r={}){if(!e)return null;let n={audio:{inbound:[],outbound:[]},video:{inbound:[],outbound:[]},connection:{inbound:[],outbound:[]}};r.remote&&(n.remote={audio:{inbound:[],outbound:[]},video:{inbound:[],outbound:[]}});for(const t of e.values())switch(t.type){case"outbound-rtp":{const r=t.mediaType||t.kind,o={};let i={};if(!["audio","video"].includes(r))continue;if(t.codecId){const r=e.get(t.codecId);r&&(o.clockRate=r.clockRate,o.mimeType=r.mimeType,o.payloadType=r.payloadType)}i=e.get(t.mediaSourceId)||e.get(t.trackId)||{},n[r].outbound.push({...t,...o,track:{...i}});break}case"inbound-rtp":{let r=t.mediaType||t.kind,o={};const i={};if(!["audio","video"].includes(r))if(t.id.includes("Video"))r="video";else{if(!t.id.includes("Audio"))continue;r="audio"}if(t.codecId){const r=e.get(t.codecId);r&&(i.clockRate=r.clockRate,i.mimeType=r.mimeType,i.payloadType=r.payloadType)}if(!n.connection.id&&t.transportId){const r=e.get(t.transportId);if(r&&r.selectedCandidatePairId){const t=e.get(r.selectedCandidatePairId);n.connection=v(t,e)}}o=e.get(t.mediaSourceId)||e.get(t.trackId)||{},n[r].inbound.push({...t,...i,track:{...o}});break}case"peer-connection":n.connection.dataChannelsClosed=t.dataChannelsClosed,n.connection.dataChannelsOpened=t.dataChannelsOpened;break;case"remote-inbound-rtp":{if(!r.remote)break;let o=t.mediaType||t.kind;const i={};if(!["audio","video"].includes(o))if(t.id.includes("Video"))o="video";else{if(!t.id.includes("Audio"))continue;o="audio"}if(t.codecId){const r=e.get(t.codecId);r&&(i.clockRate=r.clockRate,i.mimeType=r.mimeType,i.payloadType=r.payloadType)}if(!n.connection.id&&t.transportId){const r=e.get(t.transportId);if(r&&r.selectedCandidatePairId){const t=e.get(r.selectedCandidatePairId);n.connection=v(t,e)}}n.remote[o].inbound.push({...t,...i});break}case"remote-outbound-rtp":{if(!r.remote)break;const o=t.mediaType||t.kind,i={};if(!["audio","video"].includes(o))continue;if(t.codecId){const r=e.get(t.codecId);r&&(i.clockRate=r.clockRate,i.mimeType=r.mimeType,i.payloadType=r.payloadType)}n.remote[o].outbound.push({...t,...i});break}}if(!n.connection.id)for(const t of e.values())"candidate-pair"===t.type&&t.nominated&&"succeeded"===t.state&&(n.connection=v(t,e));return n=function(e,t){return t?(e.audio.inbound.map(e=>{let r=t.audio.inbound.find(t=>t.id===e.id);e.bitrate=m(e,r,"bytesReceived"),e.packetRate=m(e,r,"packetsReceived")}),e.audio.outbound.map(e=>{let r=t.audio.outbound.find(t=>t.id===e.id);e.bitrate=m(e,r,"bytesSent"),e.packetRate=m(e,r,"packetsSent")}),e.video.inbound.map(e=>{let r=t.video.inbound.find(t=>t.id===e.id);e.bitrate=m(e,r,"bytesReceived"),e.packetRate=m(e,r,"packetsReceived")}),e.video.outbound.map(e=>{let r=t.video.outbound.find(t=>t.id===e.id);e.bitrate=m(e,r,"bytesSent"),e.packetRate=m(e,r,"packetsSent")}),e):e}(n,t),n}let b,y={},k=[];t.WebRTCStats=class extends o{constructor(e){if(super(),this.monitoringSetInterval=0,this.connectionMonitoringSetInterval=0,this.connectionMonitoringInterval=1e3,this.remote=!0,this.peersToMonitor={},this.timeline=[],this.statsToMonitor=["inbound-rtp","outbound-rtp","remote-inbound-rtp","remote-outbound-rtp","peer-connection","data-channel","stream","track","sender","receiver","transport","candidate-pair","local-candidate","remote-candidate"],"undefined"==typeof window)throw new Error("WebRTCStats only works in browser");const t={...e};this.isEdge=!!window.RTCIceGatherer,this.getStatsInterval=t.getStatsInterval||1e3,this.rawStats=!!t.rawStats,this.statsObject=!!t.statsObject,this.filteredStats=!!t.filteredStats,this.shouldWrapGetUserMedia=!!t.wrapGetUserMedia,"boolean"==typeof t.remote&&(this.remote=t.remote),this.debug=!!t.debug,this.logLevel=t.logLevel||"none",this.shouldWrapGetUserMedia&&this.wrapGetUserMedia()}async addPeer(e,t){return console.warn("The addPeer() method has been deprecated, please use addConnection()"),this.addConnection({peerId:e,pc:t})}async addConnection(e){const{pc:t,peerId:r}=e;let{connectionId:n,remote:o}=e;if(o="boolean"==typeof o?o:this.remote,!(t&&t instanceof RTCPeerConnection))throw new Error("Missing argument 'pc' or is not of instance RTCPeerConnection");if(!r)throw new Error("Missing argument peerId");if(this.isEdge)throw new Error("Can't monitor peers in Edge at this time.");if(this.peersToMonitor[r]){if(n&&n in this.peersToMonitor[r])throw new Error(`We are already monitoring connection with id ${n}.`);for(let e in this.peersToMonitor[r]){const n=this.peersToMonitor[r][e];if(n.pc===t)throw new Error(`We are already monitoring peer with id ${r}.`);"closed"===n.pc.connectionState&&this.removeConnection({pc:n.pc})}}const i=t.getConfiguration();return i.iceServers&&i.iceServers.forEach(function(e){delete e.credential}),n||(n=f()),this.emitEvent({event:"addConnection",tag:"peer",peerId:r,connectionId:n,data:{options:e,peerConfiguration:i}}),this.monitorPeer({peerId:r,connectionId:n,pc:t,remote:o}),{connectionId:n}}getTimeline(e){return this.timeline=this.timeline.sort((e,t)=>e.timestamp.getTime()-t.timestamp.getTime()),e?this.timeline.filter(t=>t.tag===e):this.timeline}get logger(){const e=e=>{const t=["none","error","warn","info","debug"];return t.slice(0,t.indexOf(this.logLevel)+1).indexOf(e)>-1};return{error(...t){this.debug&&e("error")&&console.error("[webrtc-stats][error] ",...t)},warn(...t){this.debug&&e("warn")&&console.warn("[webrtc-stats][warn] ",...t)},info(...t){this.debug&&e("info")&&console.log("[webrtc-stats][info] ",...t)},debug(...t){this.debug&&e("debug")&&console.debug("[webrtc-stats][debug] ",...t)}}}removeConnection(e){let t,{connectionId:r,pc:n}=e;if(!n&&!r)throw new Error("Missing arguments. You need to either send pc or a connectionId.");if(r){if("string"!=typeof r)throw new Error("connectionId must be a string.");for(let e in this.peersToMonitor)r in this.peersToMonitor[e]&&(n=this.peersToMonitor[e][r].pc,t=e)}else if(n){if(!(n instanceof RTCPeerConnection))throw new Error("pc must be an instance of RTCPeerConnection.");for(let e in this.peersToMonitor)for(let o in this.peersToMonitor[e])this.peersToMonitor[e][o].pc===n&&(r=o,t=e)}if(!n||!r)throw new Error("Could not find the desired connection.");return this.removePeerConnectionEventListeners(r,n),delete this.peersToMonitor[t][r],0===Object.values(this.peersToMonitor[t]).length&&delete this.peersToMonitor[t],{connectionId:r}}removeAllPeers(){for(let e in this.peersToMonitor)this.removePeer(e)}removePeer(e){if(this.logger.info(`Removing PeerConnection with id ${e}.`),this.peersToMonitor[e]){for(let t in this.peersToMonitor[e]){let r=this.peersToMonitor[e][t].pc;this.removePeerConnectionEventListeners(t,r)}delete this.peersToMonitor[e]}}destroy(){this.removeAllPeers(),k.forEach(e=>{this.removeTrackEventListeners(e)}),k=[],this.shouldWrapGetUserMedia&&b&&(navigator.mediaDevices.getUserMedia=b)}monitorPeer(e){let{peerId:t,connectionId:r,pc:n,remote:o}=e;if(!n)return void this.logger.warn("Did not receive pc argument when calling monitorPeer()");const i={pc:n,connectionId:r,stream:null,stats:{parsed:null,raw:null},options:{remote:o}};if(this.peersToMonitor[t]){if(r in this.peersToMonitor[t])return void this.logger.warn(`Already watching connection with ID ${r}`);this.peersToMonitor[t][r]=i}else this.peersToMonitor[t]={[r]:i};this.addPeerConnectionEventListeners(t,r,n),1===this.numberOfMonitoredPeers&&(this.startStatsMonitoring(),this.startConnectionStateMonitoring())}startStatsMonitoring(){this.monitoringSetInterval||(this.monitoringSetInterval=window.setInterval(()=>{this.numberOfMonitoredPeers||this.stopStatsMonitoring(),this.getStats().then(e=>{e.forEach(e=>{this.emitEvent(e)})})},this._getStatsInterval))}stopStatsMonitoring(){this.monitoringSetInterval&&(window.clearInterval(this.monitoringSetInterval),this.monitoringSetInterval=0)}async getStats(e=null){this.logger.info(e?`Getting stats from peer ${e}`:"Getting stats from all peers");let t={};if(e){if(!this.peersToMonitor[e])throw new Error(`Cannot get stats. Peer with id ${e} does not exist`);t[e]=this.peersToMonitor[e]}else t=this.peersToMonitor;let r=[];for(const n in t)for(const o in t[n]){const i=t[n][o],a=i.pc;if(a&&!this.checkIfConnectionIsClosed(n,o,a))try{const e=this.getTimestamp(),t=a.getStats(null);if(t){const a=await t,s=this.getTimestamp(),l=C(a),c={remote:i.options.remote},d=w(a,i.stats.parsed,c),u={event:"stats",tag:"stats",peerId:n,connectionId:o,timeTaken:s-e,data:d};!0===this.rawStats&&(u.rawStats=a),!0===this.statsObject&&(u.statsObject=l),!0===this.filteredStats&&(u.filteredStats=this.filteroutStats(l)),r.push(u),i.stats.parsed=d}else this.logger.error(`PeerConnection from peer ${n} did not return any stats data`)}catch(e){this.logger.error(e)}}return r}startConnectionStateMonitoring(){this.connectionMonitoringSetInterval=window.setInterval(()=>{this.numberOfMonitoredPeers||this.stopConnectionStateMonitoring();for(const e in this.peersToMonitor)for(const t in this.peersToMonitor[e]){const r=this.peersToMonitor[e][t].pc;this.checkIfConnectionIsClosed(e,t,r)}},this.connectionMonitoringInterval)}checkIfConnectionIsClosed(e,t,r){const n=this.isConnectionClosed(r);if(n){this.removeConnection({pc:r});let n="closed"===r.connectionState?"onconnectionstatechange":"oniceconnectionstatechange";this.emitEvent({event:n,peerId:e,connectionId:t,tag:"connection",data:"closed"})}return n}isConnectionClosed(e){return"closed"===e.connectionState||"closed"===e.iceConnectionState}stopConnectionStateMonitoring(){this.connectionMonitoringSetInterval&&(window.clearInterval(this.connectionMonitoringSetInterval),this.connectionMonitoringSetInterval=0)}wrapGetUserMedia(){if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)return void this.logger.warn("'navigator.mediaDevices.getUserMedia' is not available in browser. Will not wrap getUserMedia.");this.logger.info("Wrapping getUsermedia functions."),b=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);const e=this.parseGetUserMedia.bind(this);navigator.mediaDevices.getUserMedia=function(){return e({constraints:arguments[0]}),b.apply(navigator.mediaDevices,arguments).then(t=>(e({stream:t}),t),t=>(e({error:t}),Promise.reject(t)))}.bind(navigator.mediaDevices)}filteroutStats(e={}){const t={...e};for(const e in t){var r=t[e];this.statsToMonitor.includes(r.type)||delete t[e]}return t}get peerConnectionListeners(){return{icecandidate:(e,t,r,n)=>{this.logger.debug("[pc-event] icecandidate | peerId: ${peerId}",n),this.emitEvent({event:"onicecandidate",tag:"connection",peerId:e,connectionId:t,data:n.candidate})},track:(e,t,r,n)=>{this.logger.debug(`[pc-event] track | peerId: ${e}`,n);const o=n.track,i=n.streams[0];e in this.peersToMonitor&&t in this.peersToMonitor[e]&&(this.peersToMonitor[e][t].stream=i),this.addTrackEventListeners(o,t),this.emitEvent({event:"ontrack",tag:"track",peerId:e,connectionId:t,data:{stream:i?this.getStreamDetails(i):null,track:o?this.getMediaTrackDetails(o):null,title:n.track.kind+":"+n.track.id+" "+n.streams.map(function(e){return"stream:"+e.id})}})},signalingstatechange:(e,t,r)=>{this.logger.debug(`[pc-event] signalingstatechange | peerId: ${e}`),this.emitEvent({event:"onsignalingstatechange",tag:"connection",peerId:e,connectionId:t,data:{signalingState:r.signalingState,localDescription:r.localDescription,remoteDescription:r.remoteDescription}})},iceconnectionstatechange:(e,t,r)=>{this.logger.debug(`[pc-event] iceconnectionstatechange | peerId: ${e}`),this.emitEvent({event:"oniceconnectionstatechange",tag:"connection",peerId:e,connectionId:t,data:r.iceConnectionState})},icegatheringstatechange:(e,t,r)=>{this.logger.debug(`[pc-event] icegatheringstatechange | peerId: ${e}`),this.emitEvent({event:"onicegatheringstatechange",tag:"connection",peerId:e,connectionId:t,data:r.iceGatheringState})},icecandidateerror:(e,t,r,n)=>{this.logger.debug(`[pc-event] icecandidateerror | peerId: ${e}`),this.emitEvent({event:"onicecandidateerror",tag:"connection",peerId:e,connectionId:t,error:{errorCode:n.errorCode}})},connectionstatechange:(e,t,r)=>{this.logger.debug(`[pc-event] connectionstatechange | peerId: ${e}`),this.emitEvent({event:"onconnectionstatechange",tag:"connection",peerId:e,connectionId:t,data:r.connectionState})},negotiationneeded:(e,t,r)=>{this.logger.debug(`[pc-event] negotiationneeded | peerId: ${e}`),this.emitEvent({event:"onnegotiationneeded",tag:"connection",peerId:e,connectionId:t})},datachannel:(e,t,r,n)=>{this.logger.debug(`[pc-event] datachannel | peerId: ${e}`,n),this.emitEvent({event:"ondatachannel",tag:"datachannel",peerId:e,connectionId:t,data:n.channel})}}}addPeerConnectionEventListeners(e,t,r){this.logger.debug(`Adding event listeners for peer ${e} and connection ${t}.`),y[t]={},Object.keys(this.peerConnectionListeners).forEach(n=>{y[t][n]=this.peerConnectionListeners[n].bind(this,e,t,r),r.addEventListener(n,y[t][n],!1)})}parseGetUserMedia(e){try{const t={event:"getUserMedia",tag:"getUserMedia",data:{...e}};e.stream&&(t.data.details=this.parseStream(e.stream),e.stream.getTracks().map(e=>{this.addTrackEventListeners(e),k.push(e)})),this.emitEvent(t)}catch(e){}}parseStream(e){const t={audio:[],video:[]};return e.getTracks().forEach(e=>{t[e.kind].push(this.getMediaTrackDetails(e))}),t}getMediaTrackDetails(e){return{enabled:e.enabled,id:e.id,contentHint:e.contentHint,kind:e.kind,label:e.label,muted:e.muted,readyState:e.readyState,constructorName:e.constructor.name,capabilities:e.getCapabilities?e.getCapabilities():{},constraints:e.getConstraints?e.getConstraints():{},settings:e.getSettings?e.getSettings():{},_track:e}}getStreamDetails(e){return{active:e.active,id:e.id,_stream:e}}getTrackEventObject(e){return{mute:t=>{this.emitEvent({event:"mute",tag:"track",connectionId:e,data:{event:t}})},unmute:t=>{this.emitEvent({event:"unmute",tag:"track",connectionId:e,data:{event:t}})},overconstrained:t=>{this.emitEvent({event:"overconstrained",tag:"track",connectionId:e,data:{event:t}})},ended:t=>{this.emitEvent({event:"ended",tag:"track",connectionId:e,data:{event:t}}),this.removeTrackEventListeners(t.target)}}}addTrackEventListeners(e,t){y[e.id]={};const r=this.getTrackEventObject(t);Object.keys(r).forEach(t=>{y[e.id][t]=r[t].bind(this),e.addEventListener(t,y[e.id][t])}),y[e.id].readyState=setInterval(()=>{if("ended"===e.readyState){let t=new CustomEvent("ended",{detail:{check:"readyState"}});e.dispatchEvent(t)}},1e3)}removeTrackEventListeners(e){if(e.id in y){const t=this.getTrackEventObject();Object.keys(t).forEach(t=>{e.removeEventListener(t,y[e.id][t])}),clearInterval(y[e.id].readyState),delete y[e.id]}}addToTimeline(e){this.timeline.push(e),this.emit("timeline",e)}emitEvent(e){const t={...e,timestamp:new Date};this.addToTimeline(t),t.tag&&this.emit(t.tag,t)}set getStatsInterval(e){if(!Number.isInteger(e))throw new Error(`getStatsInterval should be an integer, got: ${e}`);this._getStatsInterval=e,this.monitoringSetInterval&&(this.stopStatsMonitoring(),this.startStatsMonitoring())}get numberOfMonitoredPeers(){return Object.keys(this.peersToMonitor).length}removePeerConnectionEventListeners(e,t){e in y&&(Object.keys(this.peerConnectionListeners).forEach(r=>{t.removeEventListener(r,y[e][r],!1)}),delete y[e]),t.getSenders().forEach(e=>{e.track&&this.removeTrackEventListeners(e.track)}),t.getReceivers().forEach(e=>{e.track&&this.removeTrackEventListeners(e.track)})}getTimestamp(){return Date.now()}wrapGetDisplayMedia(){const e=this;if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){const t=navigator.mediaDevices.getDisplayMedia.bind(navigator.mediaDevices),r=function(){return e.debug("navigator.mediaDevices.getDisplayMedia",null,arguments[0]),t.apply(navigator.mediaDevices,arguments).then(function(e){return e},function(t){return e.debug("navigator.mediaDevices.getDisplayMediaOnFailure",null,t.name),Promise.reject(t)})};navigator.mediaDevices.getDisplayMedia=r.bind(navigator.mediaDevices)}}}});(Gt=Yt)&&Gt.__esModule&&Object.prototype.hasOwnProperty.call(Gt,"default")&&Gt.default;var Kt=Yt.WebRTCStats;function Qt(e){return isNaN(e)?null:e>4.2?"excellent":e>=4.1&&e<=4.2?"good":e>=3.7&&e<=4?"fair":e>=3.1&&e<=3.6?"poor":"bad"}class Jt extends tt{constructor(e,t){super(),this.buildRequest({type:"debug_report_start",debug_report_id:e,debug_report_version:1,call_id:t})}}class Xt extends tt{constructor(e,t){super(),this.buildRequest({type:"debug_report_stop",debug_report_id:e,debug_report_version:1,call_id:t})}}class Zt extends tt{constructor(e,t){super(),this.buildRequest({type:"debug_report_data",debug_report_id:e,debug_report_version:1,debug_report_data:t})}}function er(e,t){var r,n;return{errorCode:e.errorCode,errorText:e.errorText,url:e.url,address:e.address,port:e.port,connectionState:t.connectionState,iceConnectionState:t.iceConnectionState,iceGatheringState:t.iceGatheringState,signalingState:t.signalingState,localDescriptionType:null===(r=t.localDescription)||void 0===r?void 0:r.type,remoteDescriptionType:null===(n=t.remoteDescription)||void 0===n?void 0:n.type}}function tr(e,t){const r=p();let n=!1;const o=new Kt({getStatsInterval:1e3,rawStats:!1,statsObject:!0,filteredStats:!1,remote:!0,debug:!1,logLevel:"warn"}),i=t=>s(this,void 0,void 0,function*(){"stats"===t.event&&Je(te.StatsFrame,function({data:e}){var t,r,n,o,i,a,s,l;const{audio:c,remote:d}=e,{audio:u}=d,h=null!==(r=null===(t=u.inbound[0])||void 0===t?void 0:t.jitter)&&void 0!==r?r:1/0,p=null!==(o=null===(n=u.inbound[0])||void 0===n?void 0:n.roundTripTime)&&void 0!==o?o:1/0,A=null!==(a=null===(i=c.inbound[0])||void 0===i?void 0:i.packetsReceived)&&void 0!==a?a:-1,g=function(e){const{packetsLost:t,packetsReceived:r,jitter:n,rtt:o}=e,i=function(e){const{jitter:t,rtt:r}=e,n=t+r/2;return.024*n+.11*(n-177.3)*(n>177.3?1:0)}({rtt:o,jitter:n}),a=function(e){const{packetsLost:t,packetsReceived:r}=e,n=t/(r+t)*100;return 20*Math.log(1+n)}({packetsLost:t,packetsReceived:r}),s=93.2-i-a+0,l=1+.035*s+7e-6*s*(s-60)*(100-s);return Math.min(Math.max(l,1),5)}({jitter:1e3*h,rtt:1e3*p,packetsLost:null!==(l=null===(s=c.inbound[0])||void 0===s?void 0:s.packetsLost)&&void 0!==l?l:-1,packetsReceived:A});return{jitter:h,rtt:p,mos:g,quality:Qt(g),inboundAudio:c.inbound[0],outboundAudio:c.outbound[0],remoteInboundAudio:u.inbound[0],remoteOutboundAudio:u.outbound[0]}}(t),e.uuid),yield e.execute(new Zt(r,t))});return{get isRunning(){return n},start:(a,l,c)=>s(this,void 0,void 0,function*(){if(n)Ae.debug(`[${t}] Stats reporter already running, skipping start`);else{yield e.execute(new Jt(r,t)),o.on("timeline",i);try{yield o.addConnection({pc:a,peerId:l,connectionId:c}),n=!0}catch(e){Ae.error(`[${t}] Failed to start stats reporter:`,e),o.removeAllPeers(),o.destroy()}}}),stop:i=>s(this,void 0,void 0,function*(){const a=o.getTimeline();Je(te.StatsReport,a,e.uuid),"file"===i&&function(e,t){const r=new Blob([JSON.stringify(e)],{type:"application/json"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download=`${t}.json`,o.click(),URL.revokeObjectURL(n)}(a,`webrtc-stats-${r}-${Date.now()}`),yield e.execute(new Xt(r,t)),o.removeAllPeers(),o.destroy(),n=!1}),reportConnectionStateChange:e=>{const t={event:"connectionstatechange-detailed",tag:"connection",timestamp:(new Date).toISOString(),data:e};i(t)},reportIceCandidateError:e=>{const t={event:"icecandidateerror-detailed",tag:"connection",timestamp:(new Date).toISOString(),data:e};i(t)}}}const rr=(e,t)=>{const{contentType:r,canvasType:n,callID:o,canvasInfo:i=null,currentLayerIdx:a=-1}=t;i&&"mcu-personal-canvas"!==n&&delete i.memberID;const s={type:Me.conferenceUpdate,call:e.calls[o],canvasInfo:nr(i),currentLayerIdx:a};switch(r){case"layer-info":{const t=Object.assign({action:ze.LayerInfo},s);Je(te.Notification,t,e.uuid);break}case"layout-info":{const t=Object.assign({action:ze.LayoutInfo},s);Je(te.Notification,t,e.uuid);break}}},nr=e=>{const t=JSON.stringify(e).replace(/memberID/g,"participantId").replace(/ID"/g,'Id"').replace(/POS"/g,'Pos"');return we(t)},or=["new-call-start","new-peer","get-user-media","peer-creation-end","start-negotiation","create-offer","create-answer","set-local-description","ice-gathering-started","first-candidate","first-non-host-candidate","send-sdp","ice-gathering-completed","ringing","telnyx-rtc-media","first-remote-media-track","set-remote-description","telnyx-rtc-answer","ice-connected","dtls-connected","call-active","answer-called"],ir={"new-call-start":"Call Start","new-peer":"Peer object created","get-user-media":"Media devices acquired","peer-creation-end":"Peer setup complete","start-negotiation":"SDP negotiation started","create-offer":"SDP offer generated","create-answer":"SDP answer generated","set-local-description":"Local description applied","ice-gathering-started":"ICE candidate gathering started","first-candidate":"First ICE candidate found","first-non-host-candidate":"First server-reflexive/relay candidate found","send-sdp":"SDP sent to server","ice-gathering-completed":"All ICE candidates gathered",ringing:"Remote side ringing","telnyx-rtc-media":"Early media received from server","first-remote-media-track":"First remote audio/video track received","set-remote-description":"Remote description applied","telnyx-rtc-answer":"Call answered by remote side","ice-connected":"ICE connection established","dtls-connected":"Secure media channel established (DTLS)","call-active":"Call is active","answer-called":"Answer delay (invite → call.answer)"};function ar(e){try{const t=performance.getEntriesByName(e,"mark");return t.length>0?t[0].startTime:void 0}catch(e){return}}class sr{constructor(e,t,r,n,o){this.type=e,this.options=t,this.onSdpReadyTwice=null,this.statsReporter=null,this._negotiating=!1,this._prevConnectionState=null,this._restartedIceOnConnectionStateFailed=!1,this._sleepWakeupIntervalId=null,this._iceGatheringSafetyTimeout=null,this._gatheredCandidatesCount=0,this._firstMediaTrackMarked=!1,this._timingsCollected=!1,this.handleConnectionStateChange=()=>s(this,void 0,void 0,function*(){const{connectionState:e}=this.instance;if(Ae.info(`[${(new Date).toISOString()}] Connection State changed: ${this._prevConnectionState} -> ${e}`),"failed"===e||"disconnected"===e){const e=()=>s(this,void 0,void 0,function*(){if(this.isDebugEnabled&&this.statsReporter){const e=yield function(e,t){return s(this,void 0,void 0,function*(){const r={connectionState:e.connectionState,previousConnectionState:t,iceConnectionState:e.iceConnectionState,iceGatheringState:e.iceGatheringState,signalingState:e.signalingState},n=e.getTransceivers();if(n.length>0){const e=n[0].sender,t=null==e?void 0:e.transport;t&&(r.dtlsState=t.state)}e.sctp&&(r.sctpState=e.sctp.state);try{const t=yield e.getStats();t.forEach(e=>{"candidate-pair"===e.type&&"succeeded"===e.state&&(r.candidatePairState=e.state,t.forEach(t=>{"local-candidate"===t.type&&t.id===e.localCandidateId&&(r.localCandidateType=t.candidateType,r.selectedCandidatePair=r.selectedCandidatePair||{local:{},remote:{}},r.selectedCandidatePair.local={address:t.address,port:t.port,protocol:t.protocol,candidateType:t.candidateType}),"remote-candidate"===t.type&&t.id===e.remoteCandidateId&&(r.remoteCandidateType=t.candidateType,r.selectedCandidatePair=r.selectedCandidatePair||{local:{},remote:{}},r.selectedCandidatePair.remote={address:t.address,port:t.port,protocol:t.protocol,candidateType:t.candidateType})})),"transport"===e.type&&(r.dtlsCipher=e.dtlsCipher,r.srtpCipher=e.srtpCipher,r.tlsVersion=e.tlsVersion,e.dtlsState&&(r.dtlsState=e.dtlsState))})}catch(e){Ae.error("Error gathering connection state details:",e)}return r})}(this.instance,this._prevConnectionState);this.statsReporter.reportConnectionStateChange(e)}window.removeEventListener("online",e)});navigator.onLine?e():window.addEventListener("online",e)}if("disconnected"===e){const e=oe(q);Je(te.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}if("failed"===e){const t=oe(H);Je(te.PeerConnectionFailureError,{warning:t,error:new Error(`Peer Connection failed. previous state: ${this._prevConnectionState}, current state: ${e}`),sessionId:this._session.sessionid},this.options.id)}this._prevConnectionState=e,"connected"===e&&(performance.mark("dtls-connected"),this.tryCollectTimings()),this._isTrickleIce()&&("connecting"===e&&performance.mark("peer-connection-connecting"),"connected"===e&&(this._clearIceGatheringSafetyTimeout(),performance.mark("peer-connection-connected")))}),this._handleIceConnectionStateChange=()=>{const e=this.instance.iceConnectionState;Ae.debug(`[${(new Date).toISOString()}] ICE Connection State`,e),"connected"===e&&performance.mark("ice-connected")},this._handleIceGatheringStateChange=()=>{const e=this.instance.iceGatheringState;Ae.debug(`[${(new Date).toISOString()}] ICE Gathering State`,e),"gathering"===e?(this._gatheredCandidatesCount=0,this._startIceGatheringSafetyTimeout()):"complete"===e&&this._clearIceGatheringSafetyTimeout()},this._setCodecs=(e,t)=>{if(e.setCodecPreferences)return e.setCodecPreferences(t)},Ae.debug("New Peer with type:",this.type,"Options:",this.options),this._constraints={offerToReceiveAudio:!0,offerToReceiveVideo:!!t.video},this._sdpReady=this._sdpReady.bind(this),this.handleSignalingStateChangeEvent=this.handleSignalingStateChangeEvent.bind(this),this.handleNegotiationNeededEvent=this.handleNegotiationNeededEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.createPeerConnection=this.createPeerConnection.bind(this),this._session=r,this._trickleIceSdpFn=n,this._registerPeerEvents=o}get isOffer(){return this.type===Le.Offer}get isAnswer(){return this.type===Le.Answer}get isDebugEnabled(){return this.options.debug||this._session.options.debug}get debugOutput(){return this.options.debugOutput||this._session.options.debugOutput}get restartedIceOnConnectionStateFailed(){return this._restartedIceOnConnectionStateFailed}isConnectionHealthy(){return"connected"===this.instance.connectionState&&"connected"===this.instance.iceConnectionState&&"closed"!==this.instance.signalingState}startNegotiation(){performance.mark("start-negotiation"),this._negotiating=!0,this._isOffer()?this._createOffer():this._createAnswer()}startTrickleIceNegotiation(){return s(this,void 0,void 0,function*(){performance.mark("start-negotiation"),this._negotiating=!0,this._isOffer()?yield this._createOffer().then(this._trickleIceSdpFn.bind(this)):yield this._createAnswer().then(this._trickleIceSdpFn.bind(this))})}_logTransceivers(){this.instance?(Ae.info("Number of transceivers:",this.instance.getTransceivers().length),this.instance.getTransceivers().forEach((e,t)=>{Ae.info(`>> Transceiver [${t}]:`,e.mid,e.direction,e.stopped),Ae.info(`>> Sender Params [${t}]:`,JSON.stringify(e.sender.getParameters(),null,2))})):Ae.warn("Cannot log transceivers: peer connection is null")}handleSignalingStateChangeEvent(){switch(Ae.info("signalingState:",this.instance.signalingState),this.instance.signalingState){case"stable":this._negotiating=!1;break;case"closed":Je(te.PeerConnectionSignalingStateClosed,{sessionId:this._session.sessionid},this.options.id),this.instance&&(Ae.debug(`[${this.options.id}] Closing peer due to signalingState closed`),this.close());break;default:this._negotiating=!0}}handleNegotiationNeededEvent(){Ae.info("Negotiation needed event"),"stable"!==this.instance.signalingState||this._negotiating?Ae.debug("Skipping negotiation, state:",this.instance.signalingState,"negotiating:",this._negotiating):this._isTrickleIce()?this.startTrickleIceNegotiation():this.startNegotiation()}handleTrackEvent(e){this._firstMediaTrackMarked||(performance.mark("first-remote-media-track"),this._firstMediaTrackMarked=!0);const{streams:[t]}=e,{remoteElement:r,screenShare:n}=this.options;this.options.remoteStream=t,!1===n&&_t(r,this.options.remoteStream)}tryCollectTimings(){if(this._timingsCollected)return;if(!(performance.getEntriesByName("call-active","mark").length>0)||"connected"!==this.instance.connectionState)return;this._timingsCollected=!0;const e=function(e,t){const r=ar("new-call-start");if(void 0===r)return{mode:e,direction:t,steps:[]};const n=[];for(const e of or){if("new-call-start"===e)continue;const t=ar(e);void 0!==t&&n.push({label:ir[e]||e,fromStart:t-r})}n.sort((e,t)=>e.fromStart-t.fromStart);const o=[];let i=0;for(const e of n)o.push({label:e.label,fromStart:e.fromStart,delta:e.fromStart-i}),i=e.fromStart;return{mode:e,direction:t,steps:o}}(this._isTrickleIce()?"trickle":"non-trickle",this.isOffer?"outbound":"inbound");!function(e){const{mode:t,direction:r,steps:n}=e,o=`[CallTimings][${r}][${t}]`;if(0===n.length)return void Ae.info(`${o} No timing data collected`);const i=Math.max(...n.map(e=>e.label.length),4)+2,a=(e,t)=>{for(;e.length<t;)e+=" ";return e},s=(e,t)=>{for(;e.length<t;)e=" "+e;return e},l=a("Step",i)+s("Delta",14)+s("From Start",14);let c="";for(let e=0;e<l.length;e++)c+="-";Ae.info(`${o} Call establishment timing breakdown:`),Ae.info(`${o} ${l}`),Ae.info(`${o} ${c}`),Ae.info(`${o} ${a("Call Start",i)}${s("-",14)}${s("0.00ms",14)}`);for(const e of n){const t=e.delta.toFixed(2)+"ms",r=e.fromStart.toFixed(2)+"ms";Ae.info(`${o} ${a(e.label,i)}${s(t,14)}${s(r,14)}`)}Ae.info(`${o} ${c}`)}(e),function(){for(const e of or)try{performance.clearMarks(e)}catch(e){Ae.warn("Clearing performance marks is failed")}}()}createPeerConnection(){return s(this,void 0,void 0,function*(){var e;if(this.instance=(e=this._config(),new window.RTCPeerConnection(e)),this.instance.onsignalingstatechange=this.handleSignalingStateChangeEvent,this.instance.onnegotiationneeded=this.handleNegotiationNeededEvent,this.instance.ontrack=this.handleTrackEvent,this.instance.addEventListener("connectionstatechange",this.handleConnectionStateChange),this.instance.addEventListener("iceconnectionstatechange",this._handleIceConnectionStateChange),this.instance.addEventListener("icegatheringstatechange",this._handleIceGatheringStateChange),this.instance.addEventListener("addstream",e=>{this.options.remoteStream=e.stream}),this._registerPeerEvents(this.instance),this._prevConnectionState=this.instance.connectionState,this.isAnswer&&(yield this._setRemoteDescription({sdp:this.options.remoteSdp,type:Le.Offer}),performance.mark("set-remote-description"),!this.instance))throw se(_);const t=Boolean(this.options.receiveOnlyAudio)&&!this.options.audio;let r=null;if(this.options.localStream=yield this._retrieveLocalStream().catch(e=>s(this,void 0,void 0,function*(){const t=this._session.options.mediaPermissionsRecovery;if((null==t?void 0:t.enabled)&&this._isAnswer()){let n=null,o=null;return yield new Promise((r,n)=>{o=setTimeout(()=>n(new Error("Media recovery flow timed out!")),t.timeout),Je(te.Error,{error:se(ae(e),e),callId:this.options.id,sessionId:this._session.sessionid,recoverable:!0,retryDeadline:Date.now()+t.timeout,resume:()=>{r()},reject:()=>{n(new Error("Call was rejected during media recovery flow!"))}},this._session.uuid)}).then(()=>s(this,void 0,void 0,function*(){var e;o&&(clearTimeout(o),o=null),n=yield this._retrieveLocalStream(),null===(e=t.onSuccess)||void 0===e||e.call(t)})).catch(e=>{var n;o&&(clearTimeout(o),o=null),r=e,null===(n=t.onError)||void 0===n||n.call(t,e)}),n}return r=e,null})),!this.instance)throw se(_);if(!this.options.localStream&&!t)throw se(r?ae(r):b,null!=r?r:void 0);performance.mark("get-user-media"),this.options.mutedMicOnStart&&St(this.options.localStream)&&(Ae.info("Muting local audio tracks on start"),Ut(this.options.localStream)),performance.mark("peer-creation-end")})}incrementGatheredCandidates(){this._gatheredCandidatesCount++}_startIceGatheringSafetyTimeout(){this._clearIceGatheringSafetyTimeout(),this._iceGatheringSafetyTimeout=setTimeout(()=>{if(this.instance)if(0===this._gatheredCandidatesCount){const e=oe(W);Je(te.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}else if("complete"!==this.instance.iceGatheringState){const e=oe($);Je(te.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}},sr.ICE_GATHERING_SAFETY_TIMEOUT_MS)}_clearIceGatheringSafetyTimeout(){null!==this._iceGatheringSafetyTimeout&&(clearTimeout(this._iceGatheringSafetyTimeout),this._iceGatheringSafetyTimeout=null)}init(){var e;return s(this,void 0,void 0,function*(){if(yield this.createPeerConnection(),!this.instance)throw se(_);this.isDebugEnabled&&(this.statsReporter=tr(this._session,this.options.id),yield null===(e=this.statsReporter)||void 0===e?void 0:e.start(this.instance,this._session.sessionid,this._session.sessionid));const{localElement:t,localStream:r=null,screenShare:n=!1}=this.options;if(St(r)){const e=r.getAudioTracks();let o=[...e];if(Ae.info("Local audio tracks: ",e),"object"==typeof this.options.audio&&e.forEach(e=>{Ae.info("Local audio tracks constraints: ",e.getConstraints())}),this.options.video){const t=r.getVideoTracks();o=[...e,...t],Ae.info("Local video tracks: ",t),"object"==typeof this.options.video&&t.forEach(e=>{Ae.info("Local video tracks constraints: ",e.getConstraints())})}const{audioCodecs:i,videoCodecs:a}=Wt(this.options.preferred_codecs);if(this.isOffer&&"function"==typeof this.instance.addTransceiver){const e={direction:"sendrecv",streams:[r]};o.forEach(t=>{"audio"===t.kind&&(this.options.userVariables.microphoneLabel=t.label),"video"===t.kind&&(this.options.userVariables.cameraLabel=t.label);const r=this.instance.addTransceiver(t,e);"audio"===t.kind&&i.length>0&&this._setCodecs(r,i),"video"===t.kind&&a.length>0&&this._setCodecs(r,a)})}else"function"==typeof this.instance.addTrack?(o.forEach(e=>{"audio"===e.kind&&(this.options.userVariables.microphoneLabel=e.label),"video"===e.kind&&(this.options.userVariables.cameraLabel=e.label),this.instance.addTrack(e,r)}),this.instance.getTransceivers().forEach(e=>{"audio"===e.receiver.track.kind&&i.length>0&&this._setCodecs(e,i),"video"===e.receiver.track.kind&&a.length>0&&this._setCodecs(e,a)})):this.instance.addStream(r);!1===n&&_t(t,r)}else if(this.options.receiveOnlyAudio&&"function"==typeof this.instance.addTransceiver){const e=this.instance.addTransceiver("audio",{direction:"recvonly"});Ae.info("Added recvonly audio transceiver for receive-only mode",e);const{audioCodecs:t}=Wt(this.options.preferred_codecs);t.length>0&&this._setCodecs(e,t)}this.isOffer?(this.options.negotiateAudio&&this._checkMediaToNegotiate("audio"),this.options.negotiateVideo&&this._checkMediaToNegotiate("video")):this._isTrickleIce()||this.startNegotiation(),this._isTrickleIce()&&this.startTrickleIceNegotiation(),this._logTransceivers()})}_getSenderByKind(e){return this.instance.getSenders().find(({track:t})=>t&&t.kind===e)}_checkMediaToNegotiate(e){if(!this._getSenderByKind(e)){const t=this.instance.addTransceiver(e);Ae.info("Add transceiver",e,t)}}_createOffer(){return s(this,void 0,void 0,function*(){if(this._isOffer()){this._constraints.offerToReceiveAudio=!1!==this.options.audio||Boolean(this.options.receiveOnlyAudio),this._constraints.offerToReceiveVideo=Boolean(this.options.video),Ae.info("_createOffer - this._constraints",this._constraints);try{const e=yield this.instance.createOffer(this._constraints);return performance.mark("create-offer"),yield this._setLocalDescription(e),performance.mark("set-local-description"),performance.mark("ice-gathering-started"),this._isTrickleIce()||this._sdpReady(),e}catch(e){Ae.error("Peer _createOffer error:",e);const t=se(A,e);Je(te.Error,{error:t,sessionId:this._session.sessionid},this.options.id)}}})}_setRemoteDescription(e){return s(this,void 0,void 0,function*(){Ae.debug("Setting remote description",e);try{yield this.instance.setRemoteDescription(e)}catch(e){Ae.error("Peer _setRemoteDescription error:",e);const t=se(v,e);throw Je(te.Error,{error:t,sessionId:this._session.sessionid},this.options.id),e}})}_createAnswer(){return s(this,void 0,void 0,function*(){if(this._isAnswer()){if("stable"!==this.instance.signalingState&&"have-remote-offer"!==this.instance.signalingState)return Ae.debug("Skipping negotiation, state:",this.instance.signalingState),Ae.debug(" - But the signaling state isn't stable, so triggering rollback"),void(yield Promise.all([this.instance.setLocalDescription({type:"rollback"}),this.instance.setRemoteDescription({sdp:this.options.remoteSdp,type:Le.Offer})]));this._logTransceivers();try{const e=yield this.instance.createAnswer();return performance.mark("create-answer"),yield this._setLocalDescription(e),performance.mark("set-local-description"),performance.mark("ice-gathering-started"),e}catch(e){Ae.error("Peer _createAnswer error:",e);const t=se(g,e);Je(te.Error,{error:t,sessionId:this._session.sessionid},this.options.id)}}})}_setLocalDescription(e){return s(this,void 0,void 0,function*(){try{yield this.instance.setLocalDescription(e)}catch(e){Ae.error("Peer _setLocalDescription error:",e);const t=se(f,e);throw Je(te.Error,{error:t,sessionId:this._session.sessionid},this.options.id),e}})}_sdpReady(){be(this.onSdpReadyTwice)&&this.onSdpReadyTwice(this.instance.localDescription)}_retrieveLocalStream(){return s(this,void 0,void 0,function*(){if(St(this.options.localStream))return this.options.localStream;const e=yield(t=this.options,s(void 0,void 0,void 0,function*(){let{audio:e=!0,micId:r,video:n=!1,camId:o}=t;const{micLabel:i="",camLabel:a=""}=t;return r&&(r=yield Ot(r,i,qe.AudioIn).catch(e=>null),r&&("boolean"==typeof e&&(e={}),e.deviceId={exact:r})),o&&(o=yield Ot(o,a,qe.Video).catch(e=>null),o&&("boolean"==typeof n&&(n={}),n.deviceId={exact:o})),{audio:e,video:n}}));var t;return Tt(e)})}_isOffer(){return this.type===Le.Offer}_isAnswer(){return this.type===Le.Answer}_isTrickleIce(){return!0===this.options.trickleIce}_config(){const{prefetchIceCandidates:e,forceRelayCandidate:t,iceServers:r}=this.options,n={bundlePolicy:"balanced",iceCandidatePoolSize:e?10:0,iceServers:r,iceTransportPolicy:t?"relay":"all"};return Ae.info("RTC config",n),n}restartStatsReporter(){return s(this,void 0,void 0,function*(){this.isDebugEnabled&&this.statsReporter&&(this.instance?this.statsReporter.isRunning?Ae.debug(`[${this.options.id}] Stats reporter already running, skipping restart`):(Ae.debug(`[${this.options.id}] Restarting stats reporter after reconnect`),yield this.statsReporter.start(this.instance,this._session.sessionid,this._session.sessionid)):Ae.debug(`[${this.options.id}] Cannot restart stats reporter - no peer connection instance`))})}close(){return s(this,void 0,void 0,function*(){this._clearIceGatheringSafetyTimeout(),null!==this._sleepWakeupIntervalId&&(clearInterval(this._sleepWakeupIntervalId),this._sleepWakeupIntervalId=null),this.isDebugEnabled&&this.statsReporter&&(yield this.statsReporter.stop(this.debugOutput)),this.instance&&(this.instance.close(),this.instance=null)})}}sr.ICE_GATHERING_SAFETY_TIMEOUT_MS=15e3;const lr=lt;class cr{constructor(e,t){this.session=e,this._callReportCollector=null,this.id="",this.recoveredCallId="",this.state=Fe[Fe.New],this.prevState="",this.channels=[],this.role=je.Participant,this.extension=null,this._state=Fe.New,this._prevState=Fe.New,this.gotAnswer=!1,this.gotEarly=!1,this._lastSerno=0,this._targetNodeId=null,this._iceTimeout=null,this._iceDone=!1,this._statsBindings=[],this._statsIntervalId=null,this._pendingIceCandidates=[],this._isRemoteDescriptionSet=!1,this._signalingStateClosed=!1,this._creatingPeer=!1,this._firstCandidateSent=!1,this._firstNonHostCandidateSent=!1,this._isRecovering=!1,this._checkConferenceSerno=e=>{const t=e<0||!this._lastSerno||this._lastSerno&&e===this._lastSerno+1;return t&&e>=0&&(this._lastSerno=e),t},this._doStats=()=>{this.peer&&this.peer.instance&&0!==this._statsBindings.length&&this.peer.instance.getStats().then(e=>{e.forEach(e=>{this._statsBindings.forEach(t=>{if(t.callback){if(t.constraints)for(const r in t.constraints)if(t.constraints.hasOwnProperty(r)&&t.constraints[r]!==e[r])return;t.callback(e)}})})})};const{iceServers:r,speaker:n,micId:o,micLabel:i,camId:a,camLabel:s,localElement:l,remoteElement:c,options:d,mediaConstraints:{audio:u,video:h},ringtoneFile:p,ringbackFile:A}=e;this.options=Object.assign({},Ue,{audio:u,video:h,iceServers:(null==t?void 0:t.iceServers)&&Array.isArray(t.iceServers)?t.iceServers:r,localElement:l,remoteElement:c,micId:o,micLabel:i,camId:a,camLabel:s,speakerId:n,ringtoneFile:p,ringbackFile:A,debug:d.debug,debugOutput:d.debugOutput,trickleIce:d.trickleIce,prefetchIceCandidates:d.prefetchIceCandidates,forceRelayCandidate:d.forceRelayCandidate,keepConnectionAliveOnSocketClose:d.keepConnectionAliveOnSocketClose,mutedMicOnStart:d.mutedMicOnStart},t),this._onMediaError=this._onMediaError.bind(this),this._onPeerConnectionFailureError=this._onPeerConnectionFailureError.bind(this),this._onPeerConnectionSignalingStateClosed=this._onPeerConnectionSignalingStateClosed.bind(this),this._onTrickleIceSdp=this._onTrickleIceSdp.bind(this),this._registerPeerEvents=this._registerPeerEvents.bind(this),this._registerTrickleIcePeerEvents=this._registerTrickleIcePeerEvents.bind(this),this._init(),this.options&&(this._ringtone=zt(this.options.ringtoneFile,"_ringtone"),this._ringback=zt(this.options.ringbackFile,"_ringback"))}get creatingPeer(){return this._creatingPeer}get signalingStateClosed(){return this._signalingStateClosed}get nodeId(){return this._targetNodeId}set nodeId(e){this._targetNodeId=e}get isVideoCall(){return!!this.options.video}get telnyxIDs(){return{telnyxCallControlId:this.options.telnyxCallControlId,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId}}get localStream(){return this.options.localStream}get remoteStream(){return this.options.remoteStream}get memberChannel(){return`conference-member.${this.id}`}get isAudioMuted(){return!(()=>((e,t=null)=>{if(!St(e))return null;let r=[];switch(t){case"audio":r=e.getAudioTracks();break;case"video":r=e.getVideoTracks();break;default:r=e.getTracks()}return r.some(e=>e.enabled)})(this.options.localStream,"audio"))()}invite(){return s(this,void 0,void 0,function*(){this._creatingPeer=!0,this.direction=De.Outbound,this.options.trickleIce&&this._resetTrickleIceCandidateState(),performance.mark("new-peer"),this.peer=new sr(Le.Offer,this.options,this.session,this._onTrickleIceSdp,this.options.trickleIce?this._registerTrickleIcePeerEvents:this._registerPeerEvents);try{yield this.peer.init()}catch(e){Ae.error("Peer init failed, aborting call",e),this._creatingPeer=!1;const t=e instanceof ie?e:se(D,e instanceof Error?e:void 0);return Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid,recoverable:!1},this.session.uuid),void this.hangup({},!1)}this._creatingPeer=!1})}answer(e={}){var t,r;return s(this,void 0,void 0,function*(){if((null===(t=this.peer)||void 0===t?void 0:t.instance)&&"closed"!==this.peer.instance.signalingState){const e=oe(G);return Je(te.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),void Ae.warn(`[${this.id}] answer() ignored: peer connection already exists (signalingState: ${this.peer.instance.signalingState})`)}performance.mark("answer-called"),this._creatingPeer=!0,this.stopRingtone(),this.direction=De.Inbound,(null===(r=null==e?void 0:e.customHeaders)||void 0===r?void 0:r.length)>0&&(this.options=Object.assign(Object.assign({},this.options),{customHeaders:e.customHeaders})),this.options.trickleIce&&this._resetTrickleIceCandidateState(),performance.mark("new-peer"),this.peer=new sr(Le.Answer,this.options,this.session,this._onTrickleIceSdp,this.options.trickleIce?this._registerTrickleIcePeerEvents:this._registerPeerEvents);try{yield this.peer.init()}catch(e){Ae.error("Peer init failed, aborting call",e),this._creatingPeer=!1;const t=e instanceof ie?e:se(D,e instanceof Error?e:void 0);return Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid,recoverable:!1},this.session.uuid),void(yield this.hangup())}this._creatingPeer=!1})}playRingtone(){qt(this._ringtone)}stopRingtone(){$t(this._ringtone)}playRingback(){qt(this._ringback)}stopRingback(){$t(this._ringback)}hangup(e,t){var r,n,o,i;return s(this,void 0,void 0,function*(){const a=e||{},s=!1!==t,l=this._state<Fe.Active?{cause:"USER_BUSY",causeCode:17}:{cause:"NORMAL_CLEARING",causeCode:16};if(this.cause=a.cause||l.cause,this.causeCode=a.causeCode||l.causeCode,this.sipCode=a.sipCode||null,this.sipReason=a.sipReason||null,this.sipCallId=a.sip_call_id||null,this.options.customHeaders=[...null!==(r=this.options.customHeaders)&&void 0!==r?r:[],...null!==(o=null===(n=null==a?void 0:a.dialogParams)||void 0===n?void 0:n.customHeaders)&&void 0!==o?o:[]],a.isRecovering)return this._isRecovering=!0,this.setState(Fe.Recovering),void this._finalize();if(this.setState(Fe.Hangup),this.stopRingtone(),this.stopRingback(),s){const e=new At({sipCode:this.sipCode,sip_call_id:this.sipCallId,sessid:this.session.sessionid,dialogParams:this.options,cause:this.cause,causeCode:this.causeCode});try{yield this._execute(e)}catch(e){Ae.error("telnyx_rtc.bye failed!",e);const t=se(x,e);Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}}Ae.debug(`[${this.id}] Closing peer from hangup`),null===(i=this.peer)||void 0===i||i.close(),this.setState(Fe.Destroy)})}hold(){const e=new vt({sessid:this.session.sessionid,action:"hold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}unhold(){const e=new vt({sessid:this.session.sessionid,action:"unhold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}toggleHold(){const e=new vt({sessid:this.session.sessionid,action:"toggleHold",dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}dtmf(e){const t=new mt({sessid:this.session.sessionid,dtmf:e,dialogParams:this.options});this._execute(t)}message(e,t){const r={from:this.session.options.login,to:e,body:t},n=new mt({sessid:this.session.sessionid,msg:r,dialogParams:this.options});this._execute(n)}muteAudio(){Ut(this.options.localStream)}unmuteAudio(){Mt(this.options.localStream)}toggleAudioMute(){Ft(this.options.localStream)}setAudioInDevice(e,t=this.options.mutedMicOnStart){var r;return s(this,void 0,void 0,function*(){const{instance:n}=this.peer,o=n.getSenders().find(({track:{kind:e}})=>"audio"===e);if(o){let n;try{n=yield xt({audio:{deviceId:{exact:e}}})}catch(e){const t=se(ae(e),e);return void Je(te.MediaError,t,(null===(r=this.options)||void 0===r?void 0:r.id)||this.id)}const i=n.getAudioTracks()[0];i.enabled=!t,o.replaceTrack(i),this.options.micId=e;const{localStream:a}=this.options;a.getAudioTracks().forEach(e=>e.stop()),a.getVideoTracks().forEach(e=>n.addTrack(e)),this.options.localStream=n}})}muteVideo(){var e;e=this.options.localStream,Pt(e,"video",!1)}unmuteVideo(){var e;e=this.options.localStream,Pt(e,"video",!0)}toggleVideoMute(){var e;e=this.options.localStream,Pt(e,"video",null)}setVideoDevice(e){return s(this,void 0,void 0,function*(){const{instance:t}=this.peer,r=t.getSenders().find(({track:{kind:e}})=>"video"===e);if(r){const t=yield xt({video:{deviceId:{exact:e}}}),n=t.getVideoTracks()[0];r.replaceTrack(n);const{localElement:o,localStream:i}=this.options;_t(o,t),this.options.camId=e,i.getAudioTracks().forEach(e=>t.addTrack(e)),i.getVideoTracks().forEach(e=>e.stop()),this.options.localStream=t}})}deaf(){Ut(this.options.remoteStream)}undeaf(){Mt(this.options.remoteStream)}toggleDeaf(){Ft(this.options.remoteStream)}setBandwidthEncodingsMaxBps(e,t){return s(this,void 0,void 0,function*(){if(!this||!this.peer)return void Ae.error("Could not set bandwidth (reason: no peer connection). Dynamic bandwidth can only be set when there is a call running - is there any call running?)");const{instance:r}=this.peer,n=r.getSenders();if(!n)return void Ae.error("Could not set bandwidth (reason: no senders). Dynamic bandwidth can only be set when there is a call running - is there any call running?)");const o=n.find(({track:{kind:e}})=>e===t);if(o){const r=o.getParameters();r.encodings||(r.encodings=[{rid:"h"}]),Ae.info("Parameters: ",r),Ae.info("Setting max ","audio"===t?"audio":"video"," bandwidth to: ",e," [bps]"),r.encodings[0].maxBitrate=e,yield o.setParameters(r).then(()=>{Ae.info("audio"===t?"New audio":"New video"," bandwidth settings in use: ",o.getParameters())}).catch(e=>Ae.error(e))}else Ae.error("Could not set bandwidth (reason: no "+t+" sender). Dynamic bandwidth can only be set when there is a call running - is there any call running?)")})}setAudioBandwidthEncodingsMaxBps(e){this.setBandwidthEncodingsMaxBps(e,"audio")}setVideoBandwidthEncodingsMaxBps(e){this.setBandwidthEncodingsMaxBps(e,"video")}getStats(e,t){if(!e)return;const r={callback:e,constraints:t};if(this._statsBindings.push(r),!this._statsIntervalId){const e=2e3;this._startStats(e)}}setState(e){var t,r;switch(this._prevState=this._state,this._state=e,this.state=Fe[this._state].toLowerCase(),this.prevState=Fe[this._prevState].toLowerCase(),Ae.debug(`Call ${this.id} state change from ${this.prevState} to ${this.state}`),this._dispatchNotification({type:Me.callUpdate,call:this}),e){case Fe.Purge:Ae.info(`[${this.id}] Entering Purge state.`);break;case Fe.Active:performance.mark("call-active"),null===(t=this.peer)||void 0===t||t.tryCollectTimings(),this._isRecovering&&(this._isRecovering=!1,Ae.debug(`[${this.id}] Recovery complete, call is active`)),setTimeout(()=>{const{remoteElement:e,speakerId:t}=this.options;e&&t&&Bt(e,t)},0),this._callReportCollector&&(null===(r=this.peer)||void 0===r?void 0:r.instance)&&this.session.callReportId&&this._callReportCollector.start(this.peer.instance);break;case Fe.Destroy:this._finalize()}}handleMessage(e){const{method:t,params:r}=e;switch(t){case Pe.Answer:if(performance.mark("telnyx-rtc-answer"),this.gotAnswer=!0,r.telnyx_call_control_id&&(this.options.telnyxCallControlId=r.telnyx_call_control_id),r.telnyx_session_id&&(this.options.telnyxSessionId=r.telnyx_session_id),r.telnyx_leg_id&&(this.options.telnyxLegId=r.telnyx_leg_id),this._state>=Fe.Active)return;this._state>=Fe.Early&&this.setState(Fe.Active),this.gotEarly||this._onRemoteSdp(r.sdp),this.stopRingback(),this.stopRingtone();break;case Pe.Media:if(performance.mark("telnyx-rtc-media"),this._state>=Fe.Early)return;this.gotEarly=!0,this._onRemoteSdp(r.sdp);break;case Pe.Display:{const{display_name:e,display_number:n,display_direction:o}=r;this.extension=n;const i=o===De.Inbound?De.Outbound:De.Inbound,a={type:Me[t],call:this,displayName:e,displayNumber:n,displayDirection:i};Je(te.Notification,a,this.id)||Je(te.Notification,a,this.session.uuid);break}case Pe.Candidate:this._addIceCandidate(r);break;case Pe.Info:case Pe.Event:{const e=Object.assign(Object.assign({},r),{type:Me.generic,call:this});Je(te.Notification,e,this.id)||Je(te.Notification,e,this.session.uuid);break}case Pe.Ringing:performance.mark("ringing"),this.playRingback(),r.telnyx_call_control_id&&(this.options.telnyxCallControlId=r.telnyx_call_control_id),r.telnyx_session_id&&(this.options.telnyxSessionId=r.telnyx_session_id),r.telnyx_leg_id&&(this.options.telnyxLegId=r.telnyx_leg_id);break;case Pe.Bye:const e=r.client_state||r.clientState;e&&(this.options.clientState=e),this.stopRingback(),this.stopRingtone(),this.hangup(r,!1)}}handleConferenceUpdate(e,t){return s(this,void 0,void 0,function*(){if(!this._checkConferenceSerno(e.wireSerno)&&e.name!==t.laName)return Ae.error("ConferenceUpdate invalid wireSerno or packet name:",e),"INVALID_PACKET";const{action:r,data:n,hashKey:o=String(this._lastSerno),arrIndex:i}=e;switch(r){case"bootObj":{this._lastSerno=0;const{chatChannel:e,infoChannel:r,modChannel:o,laName:i,conferenceMemberID:a,role:s}=t;this._dispatchConferenceUpdate({action:ze.Join,conferenceName:i,participantId:Number(a),role:s}),e&&(yield this._subscribeConferenceChat(e)),r&&(yield this._subscribeConferenceInfo(r));const l=[];for(const e in n)l.push(Object.assign({callId:n[e][0],index:Number(e)},Ce(n[e][1])));this._dispatchConferenceUpdate({action:ze.Bootstrap,participants:l});break}case"add":this._dispatchConferenceUpdate(Object.assign({action:ze.Add,callId:o,index:i},Ce(n)));break;case"modify":this._dispatchConferenceUpdate(Object.assign({action:ze.Modify,callId:o,index:i},Ce(n)));break;case"del":this._dispatchConferenceUpdate(Object.assign({action:ze.Delete,callId:o,index:i},Ce(n)));break;case"clear":this._dispatchConferenceUpdate({action:ze.Clear});break;default:this._dispatchConferenceUpdate({action:r,data:n,callId:o,index:i})}})}_addChannel(e){this.channels.includes(e)||this.channels.push(e);const t=this.session.relayProtocol;this.session._existsSubscription(t,e)&&(this.session.subscriptions[t][e]=Object.assign(Object.assign({},this.session.subscriptions[t][e]),{callId:this.id}))}_subscribeConferenceChat(e){return s(this,void 0,void 0,function*(){const t={nodeId:this.nodeId,channels:[e],handler:e=>{const{direction:t,from:r,fromDisplay:n,message:o,type:i}=e.data;this._dispatchConferenceUpdate({action:ze.ChatMessage,direction:t,participantNumber:r,participantName:n,messageText:o,messageType:i,messageId:e.eventSerno})}},r=yield this.session.vertoSubscribe(t).catch(e=>{Ae.error("ConfChat subscription error:",e)});Lt(r,e)&&(this._addChannel(e),Object.defineProperties(this,{sendChatMessage:{configurable:!0,value:(t,r)=>{this.session.vertoBroadcast({nodeId:this.nodeId,channel:e,data:{action:"send",message:t,type:r}})}}}))})}_subscribeConferenceInfo(e){return s(this,void 0,void 0,function*(){const t={nodeId:this.nodeId,channels:[e],handler:e=>{const{eventData:t}=e;"layout-info"===t.contentType?(t.callID=this.id,rr(this.session,t)):Ae.error("Conference-Info unknown contentType",e)}},r=yield this.session.vertoSubscribe(t).catch(e=>{Ae.error("ConfInfo subscription error:",e)});Lt(r,e)&&this._addChannel(e)})}_confControl(e,t={}){const r=Object.assign({application:"conf-control",callID:this.id,value:null},t);this.session.vertoBroadcast({nodeId:this.nodeId,channel:e,data:r})}_handleChangeHoldStateSuccess(e){return"active"===e.holdState?this.setState(Fe.Active):this.setState(Fe.Held),!0}_handleChangeHoldStateError(e){Ae.error(`Failed to ${e.action} on call ${this.id}`);const t=se(y,e);return Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),!1}_onRemoteSdp(e){return s(this,void 0,void 0,function*(){const t=new RTCSessionDescription({sdp:e,type:Le.Answer});yield this.peer.instance.setRemoteDescription(t).then(()=>{performance.mark("set-remote-description"),this.options.trickleIce&&(this._isRemoteDescriptionSet=!0,this._flushPendingTrickleIceCandidates()),this.gotEarly&&this.setState(Fe.Early),this.gotAnswer&&this.setState(Fe.Active)}).catch(e=>s(this,void 0,void 0,function*(){Ae.error("Call setRemoteDescription Error: ",e);const t=se(v,e);Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17},!0)}catch(e){Ae.error("Error during hangup after setRemoteDescription failure:",e)}}))})}_requestAnotherLocalDescription(){be(this.peer.onSdpReadyTwice)?Je(te.Error,{error:new Error("SDP without candidates for the second time!"),sessionId:this.session.sessionid},this.session.uuid):(Object.defineProperty(this.peer,"onSdpReadyTwice",{value:this._onIceSdp.bind(this)}),this._iceDone=!1,this.peer.startNegotiation())}_onIceSdp(e){var t,r;if(this._iceTimeout&&clearTimeout(this._iceTimeout),this._iceTimeout=null,this._iceDone=!0,!e)return void Ae.warn("localDescription is null — PeerConnection may have been closed during ICE gathering");const{sdp:n,type:o}=e;if(-1===n.indexOf("candidate"))return Ae.info("No candidate - retry \n"),void this._requestAnotherLocalDescription();if(null===(r=null===(t=this.peer)||void 0===t?void 0:t.instance)||void 0===r||r.removeEventListener("icecandidate",this._onIce),!Q.test(n)){const e=oe(V);Ae.warn(`[${this.id}] Warning ${e.code}: ${e.message}`),Je(te.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}performance.mark("ice-gathering-end");let i=null;const a={sessid:this.session.sessionid,sdp:n,dialogParams:this.options,"User-Agent":`Web-${lr}`};switch(o){case Le.Offer:this.setState(Fe.Requesting),i=new ut(a);break;case Le.Answer:this._isRecovering||this.setState(Fe.Answering),i=!0===this.options.attach?new pt(a):new ht(a);break;default:return Ae.error(`${this.id} - Unknown local SDP type:`,e),void this.hangup({},!1)}performance.mark("send-sdp"),this._execute(i).then(e=>{const{node_id:t=null}=e;this._targetNodeId=t,o===Le.Offer?this.setState(Fe.Trying):this.setState(Fe.Active)}).catch(e=>s(this,void 0,void 0,function*(){Ae.error(`${this.id} - Sending ${o} error:`,e);const t=se(m,e);Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17},!0)}catch(e){Ae.error("Error during hangup after SDP send failure:",e)}}))}_onTrickleIceSdp(e){if(!e)return Ae.error("No SDP data provided"),void this.hangup({},!1);const{sdp:t,type:r}=e;let n=null;const o={sessid:this.session.sessionid,sdp:t,dialogParams:this.options,trickle:!0,"User-Agent":`Web-${lr}`};switch(r){case Le.Offer:this.setState(Fe.Requesting),n=new ut(o);break;case Le.Answer:this._isRecovering||this.setState(Fe.Answering),n=!0===this.options.attach?new pt(o):new ht(o);break;default:return Ae.error(`${this.id} - Unknown local SDP type:`,e),void this.hangup({},!1)}performance.mark("send-sdp"),this._execute(n).then(e=>{const{node_id:t=null}=e;this._targetNodeId=t,r===Le.Offer?this.setState(Fe.Trying):this.setState(Fe.Active)}).catch(e=>s(this,void 0,void 0,function*(){Ae.error(`${this.id} - Sending ${r} error:`,e);const t=se(m,e);Je(te.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17},!0)}catch(e){Ae.error("Error during hangup after SDP send failure:",e)}}))}_onIce(e){var t;const{instance:r}=this.peer;if(null===this._iceTimeout){const e=this.options.attach?5e3:1e3;this._iceTimeout=setTimeout(()=>this._onIceSdp(r.localDescription),e)}e.candidate?(Ae.debug("RTCPeer Candidate:",e.candidate),null===(t=this.peer)||void 0===t||t.incrementGatheredCandidates(),this._trackCandidateMarks(e.candidate)):this._onIceSdp(r.localDescription)}_onTrickleIce(e){var t;e.candidate&&e.candidate.candidate?(Ae.debug("RTCPeer Candidate:",e.candidate),null===(t=this.peer)||void 0===t||t.incrementGatheredCandidates(),this._trackCandidateMarks(e.candidate),this._sendIceCandidate(e.candidate)):this._sendEndOfCandidates()}_sendIceCandidate(e){const t=new gt({sessid:this.session.sessionid,candidate:e.candidate,sdpMLineIndex:e.sdpMLineIndex,sdpMid:e.sdpMid,dialogParams:this.options});this._execute(t)}_addIceCandidate(e){if(!this._isRemoteDescriptionSet)return Ae.debug("Remote description not set. Queued ICE candidate.",e),void this._pendingIceCandidates.push(e);this._addIceCandidateToPeer(e)}_addIceCandidateToPeer(e){const t=this.peer.instance.addIceCandidate(e);Promise.resolve(t).then(()=>{Ae.debug("Successfully added ICE candidate:",e)}).catch(t=>{Ae.error("Failed to add ICE candidate:",t,e)})}_sendEndOfCandidates(){const e=new ft({sessid:this.session.sessionid,endOfCandidates:!0,dialogParams:this.options});this._execute(e)}_trackCandidateMarks(e){var t;if(this._firstCandidateSent||(performance.mark("first-candidate"),this._firstCandidateSent=!0),!this._firstNonHostCandidateSent){const r=null===(t=e.candidate.match(/typ (\w+)/))||void 0===t?void 0:t[1];r&&"host"!==r&&(performance.mark("first-non-host-candidate"),this._firstNonHostCandidateSent=!0)}}_resetTrickleIceCandidateState(){this._pendingIceCandidates=[],this._isRemoteDescriptionSet=!1,this._firstCandidateSent=!1,this._firstNonHostCandidateSent=!1}_flushPendingTrickleIceCandidates(){if(!this._pendingIceCandidates.length)return;const e=[...this._pendingIceCandidates];this._pendingIceCandidates=[],e.forEach(e=>{this._addIceCandidateToPeer(e)})}_registerPeerEvents(e){this._iceDone=!1,e.onicecandidate=e=>{this._iceDone||this._onIce(e)},e.onicegatheringstatechange=()=>{"complete"===e.iceGatheringState&&performance.mark("ice-gathering-completed")},e.onicecandidateerror=t=>{var r;if(Ae.debug("ICE candidate error:",t),null===(r=this.peer)||void 0===r?void 0:r.statsReporter){const r=er(t,e);this.peer.statsReporter.reportIceCandidateError(r)}},e.addEventListener("addstream",e=>{this.options.remoteStream=e.stream}),e.addEventListener("track",e=>{this.options.remoteStream=e.streams[0];const{remoteElement:t,remoteStream:r,screenShare:n}=this.options;!1===n&&_t(t,r)})}_registerTrickleIcePeerEvents(e){e.onicecandidate=e=>{this._onTrickleIce(e)},e.onicegatheringstatechange=t=>{Ae.debug("ICE gathering state changed:",e.iceGatheringState,t),"complete"===e.iceGatheringState&&(Ae.debug("Finished gathering candidates"),performance.mark("ice-gathering-completed"))},e.onicecandidateerror=t=>{var r;if(Ae.debug("ICE candidate error:",t),null===(r=this.peer)||void 0===r?void 0:r.statsReporter){const r=er(t,e);this.peer.statsReporter.reportIceCandidateError(r)}},e.addEventListener("addstream",e=>{this.options.remoteStream=e.stream}),e.addEventListener("track",e=>{this.options.remoteStream=e.streams[0];const{remoteElement:t,remoteStream:r,screenShare:n}=this.options;!1===n&&_t(t,r)})}_onMediaError(e){const t=(null==e?void 0:e.name)||"UnknownError",r=(null==e?void 0:e.message)||"Unknown media error",n=(null==e?void 0:e.originalError)||e;this._dispatchNotification({type:Me.userMediaError,error:n,call:this,errorName:t,errorMessage:r}),Ae.error(`Media error (${t}): ${r}`,e),Je(te.Error,{error:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),this.hangup({},!1)}_onPeerConnectionFailureError(e){this._dispatchNotification({type:Me.peerConnectionFailureError,error:e.error}),Ae.error("Peer connection failure error"),e.warning&&Je(te.Warning,{warning:e.warning,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}_onPeerConnectionSignalingStateClosed(e){this._signalingStateClosed=!0,this._dispatchNotification(Object.assign({type:Me.signalingStateClosed},e)),Ae.debug("Peer connection signaling state closed, call is not recoverable")}_dispatchConferenceUpdate(e){this._dispatchNotification(Object.assign({type:Me.conferenceUpdate,call:this},e))}_dispatchNotification(e){!0!==this.options.screenShare&&(Je(te.Notification,e,this.id,!1)||Je(te.Notification,e,this.session.uuid))}_execute(e){return this.nodeId&&(e.targetNodeId=this.nodeId),this.session.execute(e)}_init(){var e,t;const{id:r,userVariables:n,remoteCallerNumber:o,onNotification:i,recoveredCallId:a}=this.options;var s;this.options.id=r?r.toString():p(),this.id=this.options.id,a&&(this.recoveredCallId=a,this._isRecovering=!0),n&&(s=n,0!==Object.keys(s).length)||(this.options.userVariables=this.session.options.userVariables||{}),o||(this.options.remoteCallerNumber=this.options.destinationNumber),this.session.calls[this.id]=this,Ye(te.MediaError,this._onMediaError,this.id),Ye(te.PeerConnectionFailureError,this._onPeerConnectionFailureError,this.id),Ye(te.PeerConnectionSignalingStateClosed,this._onPeerConnectionSignalingStateClosed,this.id),be(i)&&Ye(te.Notification,i.bind(this),this.id);const l=!1!==this.session.options.enableCallReports,c=this.session.options.callReportInterval||5e3,d=this.session.options.debugLogLevel||"debug",u=this.session.options.debugLogMaxEntries||1e3;l&&(this._callReportCollector=new Vt({enabled:!0,interval:c},{enabled:!0,level:d,maxEntries:u}),this._callReportCollector.onFlushNeeded=()=>{this._flushIntermediateReport()},this._callReportCollector.onWarning=e=>{Je(te.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}),this._isRecovering?this.setState(Fe.Recovering):this.setState(Fe.New),Ae.info(`New Call — region: ${null!==(e=this.session.region)&&void 0!==e?e:"unknown"}, dc: ${null!==(t=this.session.dc)&&void 0!==t?t:"unknown"}`,this.options)}_finalize(){var e;this._stopStats(),Ae.debug(`[${this.id}] Closing peer from _finalize`),null===(e=this.peer)||void 0===e||e.close();const{remoteStream:t,localStream:r}=this.options;It(t),It(r),Qe(te.MediaError,null,this.id),Qe(te.PeerConnectionFailureError,null,this.id),Qe(te.PeerConnectionSignalingStateClosed,null,this.id),this.session.calls[this.id]=null,delete this.session.calls[this.id],this._postCallReport().catch(e=>{Ae.error("Unexpected error in _postCallReport",{error:e})})}_flushIntermediateReport(){var e;if(!this._callReportCollector)return;const t=this.session.callReportId;if(!t)return void Ae.debug("Cannot flush intermediate report: call_report_id not available");const r=null===(e=this.session.connection)||void 0===e?void 0:e.host;if(!r)return void Ae.debug("Cannot flush intermediate report: connection host not available");const n={callId:this.id,destinationNumber:this.options.destinationNumber,callerNumber:this.options.callerNumber,direction:this.direction===De.Inbound?"inbound":"outbound",state:this.state,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId,sdkVersion:lr},o=this._callReportCollector.flush(n);if(!o)return;const i=Ne()||void 0;this._callReportCollector.sendPayload(o,t,r,i).catch(e=>{Ae.error("Failed to post intermediate call report segment",{error:e})})}_postCallReport(){var e;return s(this,void 0,void 0,function*(){if(!this._callReportCollector)return void Ae.warn("Call report collector not initialized");yield this._callReportCollector.stop();const t=this.session.callReportId;if(!t)return Ae.debug("Cannot post call report: call_report_id not available"),void this._callReportCollector.cleanup();const r={callId:this.id,destinationNumber:this.options.destinationNumber,callerNumber:this.options.callerNumber,direction:this.direction===De.Inbound?"inbound":"outbound",state:this.state,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId,sdkVersion:lr},n=null===(e=this.session.connection)||void 0===e?void 0:e.host;if(!n)return void Ae.error("Cannot post call report: connection host not available");const o=Ne()||void 0;this._callReportCollector.postReport(r,t,n,o).catch(e=>{Ae.error("Failed to post call report",{error:e})}).finally(()=>{var e;null===(e=this._callReportCollector)||void 0===e||e.cleanup()})})}_startStats(e){this._statsIntervalId=setInterval(this._doStats,e),Ae.info("Stats started")}_stopStats(){this._statsIntervalId&&(clearInterval(this._statsIntervalId),this._statsIntervalId=null),Ae.debug("Stats stopped")}}cr.setStateTelnyx=e=>{if(e){switch(e._state){case Fe.Recovering:e.state="recovering";break;case Fe.Requesting:case Fe.Trying:case Fe.Early:e.state="connecting";break;case Fe.Active:e.state="active";break;case Fe.Held:e.state="held";break;case Fe.Hangup:case Fe.Destroy:e.state="done";break;case Fe.Answering:e.state="ringing";break;case Fe.New:e.state="new"}return e}};class dr extends cr{constructor(){super(...arguments),this._statsInterval=null,this.sendConversationMessage=(e,t)=>this.session.execute(new Ht(e,t))}hangup(e={},t=!0){const r=Object.create(null,{hangup:{get:()=>super.hangup}});return s(this,void 0,void 0,function*(){this.screenShare instanceof dr&&(yield this.screenShare.hangup(e,t)),yield r.hangup.call(this,e,t)})}startScreenShare(e){return s(this,void 0,void 0,function*(){const t=yield(r={video:!0},navigator.mediaDevices.getDisplayMedia(r));var r;t.getTracks().forEach(e=>{e.addEventListener("ended",()=>s(this,void 0,void 0,function*(){this.screenShare&&(yield this.screenShare.hangup())}))});const{remoteCallerName:n,remoteCallerNumber:o,callerName:i,callerNumber:a}=this.options,l=Object.assign({screenShare:!0,localStream:t,destinationNumber:`${this.extension}-screen`,remoteCallerName:n,remoteCallerNumber:`${o}-screen`,callerName:`${i} (Screen)`,callerNumber:`${a} (Screen)`},e);return this.screenShare=new dr(this.session,l),this.screenShare.invite(),this.screenShare})}stopScreenShare(){return s(this,void 0,void 0,function*(){this.screenShare instanceof dr&&(yield this.screenShare.hangup())})}setAudioOutDevice(e){return s(this,void 0,void 0,function*(){this.options.speakerId=e;const{remoteElement:t,speakerId:r}=this.options;return!(!t||!r)&&Bt(t,r)})}_finalize(){this._stats(!1),super._finalize()}_stats(e=!0){if(!1===e)return clearInterval(this._statsInterval);this._statsInterval=window.setInterval(()=>s(this,void 0,void 0,function*(){const e=yield this.peer.instance.getStats(null);let t="";const r=["certificate","codec","peer-connection","stream","local-candidate","remote-candidate"],n=["id","type","timestamp"];e.forEach(e=>{r.includes(e.type)||(t+=`\n${e.type}\n`,Object.keys(e).forEach(r=>{n.includes(r)||(t+=`\t${r}: ${e[r]}\n`)}))}),Ae.info(t)}),2e3)}}class ur extends kt{constructor(e){super(e),this.calls={},this.autoRecoverCalls=!0,this._iceServers=[],this._localElement=null,this._remoteElement=null,this._jwtAuth=!0,this._audioConstraints=!0,this._previousAudioConstraints=!0,this._videoConstraints=!1,this._speaker=null,this._onlineHandler=null,this._offlineHandler=null,this._wasOffline=!1,this._videoConstraints=e.video||!1,this.iceServers=e.iceServers,this.ringtoneFile=e.ringtoneFile,this.ringbackFile=e.ringbackFile,this._setupNetworkListeners()}get reconnectDelay(){return 1e3}getIsRegistered(){const e=Object.create(null,{getIsRegistered:{get:()=>super.getIsRegistered}});return s(this,void 0,void 0,function*(){return e.getIsRegistered.call(this)})}connect(){const e=Object.create(null,{connect:{get:()=>super.connect}});return s(this,void 0,void 0,function*(){e.connect.call(this)})}checkPermissions(e=!0,t=!0){return s(this,void 0,void 0,function*(){try{const r=yield Tt({audio:e,video:t});return It(r),!0}catch(e){return!1}})}logout(){this.disconnect()}disconnect(){const e=Object.create(null,{disconnect:{get:()=>super.disconnect}});return s(this,void 0,void 0,function*(){Ae.info("[disconnect] Client-initiated disconnect — setting Purge with BYE on all active calls.");for(const e in this.calls){const t=this.calls[e];t.setState(Fe.Purge),Ae.info("Start hangup for ",t),yield t.hangup({},!0)}this.calls={},this._cleanupNetworkListeners(),yield e.disconnect.call(this)})}serverDisconnect(){const e=Object.create(null,{disconnect:{get:()=>super.disconnect}});return s(this,void 0,void 0,function*(){Ae.info("[serverDisconnect] Server-initiated disconnect — setting Purge without BYE on all active calls.");for(const e in this.calls){const t=this.calls[e];t.setState(Fe.Purge),t.hangup({},!1)}this.calls={},this._cleanupNetworkListeners(),yield e.disconnect.call(this)})}socketDisconnect(){this._closeConnection()}handleLoginError(e){super._handleLoginError(e)}speedTest(e){return new Promise((t,r)=>{if(Ke(te.SpeedTest,r=>{const{upDur:n,downDur:o}=r,i=o?8*e/(o/1e3)/1024:0;t({upDur:n,downDur:o,upKps:(n?8*e/(n/1e3)/1024:0).toFixed(0),downKps:i.toFixed(0)})},this.uuid),!(e=Number(e)))return r(`Invalid parameter 'bytes': ${e}`);this.executeRaw(`#SPU ${e}`);let n=e/1024;e%1024&&n++;const o=".".repeat(1024);for(let e=0;e<n;e++)this.executeRaw(`#SPB ${o}`);this.executeRaw("#SPE")})}getDevices(){return Rt().catch(e=>{const t=se(ae(e),e);return Je(te.MediaError,t,this.uuid),[]})}getVideoDevices(){return Rt(qe.Video).catch(e=>(Je(te.MediaError,e,this.uuid),[]))}getAudioInDevices(){return Rt(qe.AudioIn).catch(e=>{const t=se(ae(e),e);return Je(te.MediaError,t,this.uuid),[]})}getAudioOutDevices(){return Rt(qe.AudioOut).catch(e=>(Ae.error("getAudioOutDevices",e),Je(te.MediaError,e,this.uuid),[]))}validateDeviceId(e,t,r){return Ot(e,t,r)}getDeviceResolutions(e){return s(this,void 0,void 0,function*(){try{return yield(e=>s(void 0,void 0,void 0,function*(){const t=[],r=yield Tt({video:{deviceId:{exact:e}}}),n=r.getVideoTracks()[0];for(let e=0;e<Nt.length;e++){const[r,o]=Nt[e];(yield n.applyConstraints({width:{exact:r},height:{exact:o}}).then(()=>!0).catch(()=>!1))&&t.push({resolution:`${r}x${o}`,width:r,height:o})}return It(r),t}))(e)}catch(e){throw e}})}get mediaConstraints(){return{audio:this._audioConstraints,video:this._videoConstraints}}setAudioSettings(e){return s(this,void 0,void 0,function*(){if(!e)throw new Error("You need to provide the settings object");const{micId:t,micLabel:r}=e,n=a(e,["micId","micLabel"]);return(e=>{const t=navigator.mediaDevices.getSupportedConstraints();Object.keys(e).map(r=>{t.hasOwnProperty(r)&&null!==e[r]&&void 0!==e[r]||delete e[r]})})(n),this._audioConstraints=yield((e,t,r,n)=>s(void 0,void 0,void 0,function*(){const{deviceId:r}=n;if(void 0===r&&(e||t)){const r=yield Ot(e,t,"audioinput").catch(e=>null);r&&(n.deviceId={exact:r})}return n}))(t,r,0,n),this.micId=t,this.micLabel=r,this._audioConstraints})}disableMicrophone(){this._previousAudioConstraints=this._audioConstraints,this._audioConstraints=!1}enableMicrophone(){this._audioConstraints=this._previousAudioConstraints||!0}set iceServers(e){if(e&&Array.isArray(e))this._iceServers=e;else{const e="development"===this.options.env;this._iceServers=e?ee:Z}}get iceServers(){return this._iceServers}set speaker(e){this._speaker=e}get speaker(){return this._speaker}set localElement(e){this._localElement=ye(e)}get localElement(){return this._localElement}set remoteElement(e){this._remoteElement=ye(e)}get remoteElement(){return this._remoteElement}vertoBroadcast({nodeId:e,channel:t="",data:r}){if(!t)throw new Error(`Invalid channel for broadcast: ${t}`);const n=new Ct({sessid:this.sessionid,eventChannel:t,data:r});e&&(n.targetNodeId=e),this.execute(n).catch(e=>e)}vertoSubscribe({nodeId:e,channels:t=[],handler:r}){return s(this,void 0,void 0,function*(){if(!(t=t.filter(e=>e&&!this._existsSubscription(this.relayProtocol,e))).length)return{};const n=new wt({sessid:this.sessionid,eventChannel:t});e&&(n.targetNodeId=e);const o=yield this.execute(n),{unauthorized:i=[],subscribed:a=[]}=Dt(o);return i.length&&i.forEach(e=>this._removeSubscription(this.relayProtocol,e)),a.forEach(e=>this._addSubscription(this.relayProtocol,r,e)),o})}vertoUnsubscribe({nodeId:e,channels:t=[]}){return s(this,void 0,void 0,function*(){if(!(t=t.filter(e=>e&&this._existsSubscription(this.relayProtocol,e))).length)return{};const r=new bt({sessid:this.sessionid,eventChannel:t});e&&(r.targetNodeId=e);const n=yield this.execute(r),{unsubscribed:o=[],notSubscribed:i=[]}=Dt(n);return o.forEach(e=>this._removeSubscription(this.relayProtocol,e)),i.forEach(e=>this._removeSubscription(this.relayProtocol,e)),n})}_setupNetworkListeners(){"undefined"!=typeof window&&(this._onlineHandler=()=>{this._wasOffline&&(Ae.debug(`Network connectivity restored for session ${this.sessionid}. Reconnecting...`),this._wasOffline=!1,this._autoReconnect=!0,this.socketDisconnect())},this._offlineHandler=()=>{this._wasOffline=!0,Ae.debug(`Network connectivity lost for session ${this.sessionid}`);const e=se(L);Je(te.Error,{error:e,sessionId:this.sessionid},this.uuid)},window.addEventListener("online",this._onlineHandler),window.addEventListener("offline",this._offlineHandler))}_cleanupNetworkListeners(){"undefined"!=typeof window&&this._onlineHandler&&this._offlineHandler&&(window.removeEventListener("online",this._onlineHandler),window.removeEventListener("offline",this._offlineHandler),this._onlineHandler=null,this._offlineHandler=null)}static telnyxStateCall(e){return dr.setStateTelnyx(e)}}class hr{constructor(e,t){this.code=t,this.message=e}}class pr{constructor(e){this.session=e,this.retriedConnect=0,this.retriedRegister=0}_ack(e,t){const r=new dt(e,t);this.nodeId&&(r.targetNodeId=this.nodeId),this.session.execute(r)}reconnectDelay(){return 1e3*Se(2,6)}handleMessage(e){var t,r,n,o,i,a,s,l,c;const{session:d}=this;d.setPingReceived();const{id:u,method:h,params:p={},voice_sdk_id:A}=e,g=null==p?void 0:p.callID,f=null==p?void 0:p.eventChannel,v=null==p?void 0:p.eventType,m=d.calls[g],C=null===(t=null==m?void 0:m.peer)||void 0===t?void 0:t.isConnectionHealthy();if(Array.isArray(null==p?void 0:p.reattached_sessions)&&0===p.reattached_sessions.length&&Object.keys(d.calls).length>0){const e=oe(K);Je(te.Warning,{warning:e,sessionId:d.sessionid},d.uuid)}if("channelPvtData"===v)return this._handlePvtEvent(p.pvtData);const w=e=>{var t,r,n,o,i,a;const s={audio:!0,video:d.options.video,remoteSdp:p.sdp,destinationNumber:p.callee_id_number,remoteCallerName:p.caller_id_name,remoteCallerNumber:p.caller_id_number,callerName:p.callee_id_name,callerNumber:p.callee_id_number,attach:h===Pe.Attach,mediaSettings:p.mediaSettings,debug:null!==(t=d.options.debug)&&void 0!==t&&t,debugOutput:null!==(r=d.options.debugOutput)&&void 0!==r?r:"socket",trickleIce:null!==(n=d.options.trickleIce)&&void 0!==n&&n,prefetchIceCandidates:null===(o=d.options.prefetchIceCandidates)||void 0===o||o,forceRelayCandidate:null!==(i=d.options.forceRelayCandidate)&&void 0!==i&&i,keepConnectionAliveOnSocketClose:null!==(a=d.options.keepConnectionAliveOnSocketClose)&&void 0!==a&&a};g&&(s.id=g),p.telnyx_call_control_id&&(s.telnyxCallControlId=p.telnyx_call_control_id),p.telnyx_session_id&&(s.telnyxSessionId=p.telnyx_session_id),p.telnyx_leg_id&&(s.telnyxLegId=p.telnyx_leg_id),p.client_state&&(s.clientState=p.client_state),p.dialogParams&&p.dialogParams.custom_headers&&p.dialogParams.custom_headers.length&&(s.customHeaders=p.dialogParams.custom_headers),e&&(s.recoveredCallId=e),performance.mark("new-call-start");const l=new dr(d,s);return l.nodeId=this.nodeId,l},b=new ot(A),y=new at(A);switch(h){case Pe.Answer:case Pe.Display:case Pe.Candidate:case Pe.Ringing:case Pe.Bye:case Pe.Media:if(!g||!m)return void Ae.error(`Received ${h} for non existing call:`,p);m.handleMessage(e),this._ack(u,h);break;case Pe.Ping:this.session.setPingReceived(),this.session.execute(y);break;case Pe.Punt:d.options.keepConnectionAliveOnSocketClose&&C?(Ae.info("[punt] Received PUNT from server. keepConnectionAliveOnSocketClose=true — disconnecting socket only, keeping calls alive."),d.socketDisconnect(),this._ack(u,h)):(Ae.info("[punt] Received PUNT from server — calling serverDisconnect() to purge all calls without BYE."),d.serverDisconnect());break;case Pe.Invite:{const e=w();e.direction=De.Inbound,e.playRingtone(),e.setState(Fe.Ringing),this._ack(u,h);break}case Pe.Attach:{if(!m)return w().answer(),void this._ack(u,h);const e=m.id;Ae.info(`[${(new Date).toISOString()}][${g}] closing existing call on ATTACH.`),m.hangup({isRecovering:!0},!1),Ae.info(`[${(new Date).toISOString()}][${g}] Attach: Creating new call for recovery (recoveredCallId: ${e})`),w(e).answer(),this._ack(u,h);break}case Pe.Event:case"webrtc.event":if(!f)return void Ae.error("Verto received an unknown event:",p);const t=d.relayProtocol,A=f.split(".")[0];d._existsSubscription(t,f)?Je(t,p,f):f===d.sessionid?this._handleSessionEvent(p.eventData):d._existsSubscription(t,A)?Je(t,p,A):d.calls.hasOwnProperty(f)?d.calls[f].handleMessage(e):Je(te.Notification,p,d.uuid);break;case Pe.Info:p.type=Me.generic,Je(te.Notification,p,d.uuid);break;case Pe.ClientReady:this.session.execute(b);break;default:{const t=Ee(e);if(t){switch(t){case $e.REGISTER:case $e.REGED:if(d.connection.previousGatewayState!==$e.REGED&&d.connection.previousGatewayState!==$e.REGISTER){this.session._triggerKeepAliveTimeoutCheck(),this.retriedRegister=0;const t=null===(n=null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.params)||void 0===n?void 0:n.call_report_id;t&&(d.callReportId=t,Ae.debug("Captured call_report_id from REGED:",t));const u=null===(i=null===(o=null==e?void 0:e.result)||void 0===o?void 0:o.params)||void 0===i?void 0:i.dc;u&&(d.dc=u);const h=null===(s=null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.params)||void 0===s?void 0:s.region;h&&(d.region=h),Ae.info(`Connected to Telnyx — region: ${null!==(l=d.region)&&void 0!==l?l:"unknown"}, dc: ${null!==(c=d.dc)&&void 0!==c?c:"unknown"}`),p.type=Me.vertoClientReady,Je(te.Ready,p,d.uuid)}break;case $e.UNREGED:case $e.NOREG:if(this.retriedRegister+=1,5===this.retriedRegister){this.retriedRegister=0;const e=new hr("Fail to register the user, the server tried 5 times","UNREGED|NOREG"),t=se(R,e);Je(te.Error,{error:t,sessionId:d.sessionid},d.uuid);break}setTimeout(()=>{this.session.execute(b)},this.reconnectDelay());break;case $e.FAILED:case $e.FAIL_WAIT:if(d.connection.previousGatewayState!==$e.FAILED&&d.connection.previousGatewayState!==$e.FAIL_WAIT){const e=se(T,new Error(`Gateway state: ${t}`));if(Je(te.Error,{error:e,sessionId:d.sessionid},d.uuid),!this.session.hasAutoReconnect()){this.retriedConnect=0;const e=new hr("Fail to connect the server, the server tried 5 times","FAILED|FAIL_WAIT"),t=se(I,e);Je(te.Error,{error:t,sessionId:d.sessionid},d.uuid);break}if(this.retriedConnect+=1,5===this.retriedConnect){this.retriedConnect=0;const e=se(45003,new Error("Connection Retry Failed"));Je(te.Error,{error:e,sessionId:d.sessionid},d.uuid);break}setTimeout(()=>{if(Ae.debug(`Reconnecting... Retry ${this.retriedConnect} of 5`),this.session.options.keepConnectionAliveOnSocketClose){const e=Object.values(d.calls).some(e=>{var t;return(null===(t=e.peer)||void 0===t?void 0:t.instance)&&!e.signalingStateClosed});if(e)return Ae.debug("Reconnecting by keeping the existing session due to keepConnectionAliveOnSocketClose option being set."),void this.session.socketDisconnect();Ae.debug("keepConnectionAliveOnSocketClose is set but all peer connections have signalingState closed, doing full reconnect")}this.session.disconnect().then(()=>{this.session.clearConnection(),this.session.connect()})},this.reconnectDelay())}break;default:Ae.warn("GatewayState message unknown method:",e)}break}Ae.debug("Verto message unknown method:",e);break}}}_retrieveCallId(e,t){const r=Object.keys(this.session.calls);if("bootObj"!==e.action)return r.find(e=>this.session.calls[e].channels.includes(t));{const t=e.data.find(e=>r.includes(e[0]));if(t instanceof Array)return t[0]}}_handlePvtEvent(e){return s(this,void 0,void 0,function*(){const{session:t}=this,r=t.relayProtocol,{action:n,laChannel:o,laName:i,chatChannel:a,infoChannel:s,modChannel:l,conferenceMemberID:c,role:d,callID:u}=e;switch(n){case"conference-liveArray-join":{const r=()=>{t.vertoBroadcast({nodeId:this.nodeId,channel:o,data:{liveArray:{command:"bootstrap",context:o,name:i}}})},n={nodeId:this.nodeId,channels:[o],handler:({data:n})=>{const a=u||this._retrieveCallId(n,o);if(a&&t.calls.hasOwnProperty(a)){const s=t.calls[a];s._addChannel(o),s.extension=i,s.handleConferenceUpdate(n,e).then(e=>{"INVALID_PACKET"===e&&r()})}}},a=yield t.vertoSubscribe(n).catch(e=>{Ae.error("liveArray subscription error:",e);const r=se(S,e);Je(te.Error,{error:r,sessionId:t.sessionid},t.uuid)});Lt(a,o)&&r();break}case"conference-liveArray-part":{let e=null;if(o&&t._existsSubscription(r,o)){const{callId:n=null}=t.subscriptions[r][o];if(e=t.calls[n]||null,null!==n){const r={type:Me.conferenceUpdate,action:ze.Leave,conferenceName:i,participantId:Number(c),role:d};Je(te.Notification,r,n,!1)||Je(te.Notification,r,t.uuid),null===e&&Qe(te.Notification,null,n)}}const n=[o,a,s,l];t.vertoUnsubscribe({nodeId:this.nodeId,channels:n}).then(({unsubscribedChannels:t=[]})=>{e&&(e.channels=e.channels.filter(e=>!t.includes(e)))}).catch(e=>{Ae.error("liveArray unsubscribe error:",e)});break}}})}_handleSessionEvent(e){switch(e.contentType){case"layout-info":case"layer-info":rr(this.session,e);break;case"logo-info":{const t={type:Me.conferenceUpdate,action:ze.LogoInfo,logo:e.logoURL};Je(te.Notification,t,this.session.uuid);break}}}}class Ar extends ur{constructor(e){super(e),this.relayProtocol="verto-protocol",this.timeoutErrorCode=-329990,this.handleLoginOnSocketOpen=()=>s(this,void 0,void 0,function*(){this._idle=!1;const{autoReconnect:e=!0}=this.options;yield this.login({onSuccess:()=>{this._autoReconnect=e}})}),this.handleAnonymousLoginOnSocketOpen=()=>s(this,void 0,void 0,function*(){this._idle=!1,yield this.login()}),this._vertoHandler=new pr(this),window.addEventListener("beforeunload",e=>{this.calls&&Object.keys(this.calls).forEach(e=>{this.calls[e]&&(Ae.info(`Hanging up call due to window unload: ${e}`),this.calls[e].hangup({},!0))})})}validateOptions(){return _e(this.options)||Be(this.options)}newCall(e){if(!this.validateCallOptions(e))throw se(k,void 0,"Error: destinationNumber is required");const t=new dr(this,e);return performance.mark("new-call-start"),t.invite(),t}broadcast(e){return this.vertoBroadcast(e)}subscribe(e){return this.vertoSubscribe(e)}unsubscribe(e){return this.vertoUnsubscribe(e)}validateCallOptions(e){return!!Be(this.options)||Boolean(e.destinationNumber)}_onSocketOpen(){return s(this,void 0,void 0,function*(){return _e(this.options)?this.handleLoginOnSocketOpen():Be(this.options)?this.handleAnonymousLoginOnSocketOpen():void 0})}_onSocketMessage(e){this._vertoHandler.handleMessage(e)}}class gr extends Ar{constructor(e){super(e),Ae.info(`SDK version: ${st}`)}newCall(e){return super.newCall(e)}static webRTCInfo(){return function(){try{const{browserInfo:e,name:t,version:r,supportAudio:n,supportVideo:o}=function(){if(!window||!window.navigator||!window.navigator.userAgent)throw new Error("You should use @telnyx/webrtc in a web browser such as Chrome|Firefox|Safari");if(navigator.userAgent.match(/chrom(e|ium)/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/chrom(e|ium)\/[0-9]+\./gim)[0].split("/"),t=e[0],r=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:r,supportAudio:!0,supportVideo:!0}}if(navigator.userAgent.match(/firefox/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/firefox\/[0-9]+\./gim)[0].split("/"),t=e[0],r=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:r,supportAudio:!0,supportVideo:!1}}if(navigator.userAgent.match(/safari/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/safari/gim)[0],t=navigator.userAgent.match(/version\/[0-9]+\./gim)[0].split("/"),r=parseInt(t[1],10);return{browserInfo:navigator.userAgent,name:e,version:r,supportAudio:!0,supportVideo:!0}}if(navigator.userAgent.match(/edg/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)){const e=navigator.userAgent.match(/edg\/[0-9]+\./gim)[0].split("/"),t=e[0],r=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:r,supportAudio:!0,supportVideo:!0}}throw new Error("This browser does not support @telnyx/webrtc. To see browser support list: `TelnyxRTC.webRTCSupportedBrowserList()`")}(),i=window.RTCPeerConnection,a=window.RTCSessionDescription,s=window.RTCIceCandidate,l=window.navigator&&window.navigator.mediaDevices,c=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia;return{browserInfo:e,browserName:t,browserVersion:r,supportWebRTC:!!(i&&a&&s&&l&&c),supportWebRTCAudio:n,supportWebRTCVideo:o,supportRTCPeerConnection:!!i,supportSessionDescription:!!a,supportIceCandidate:!!s,supportMediaDevices:!!l,supportGetUserMedia:!!Tt}}catch(e){return e.message}}()}static webRTCSupportedBrowserList(){return[{operationSystem:"Android",supported:[{browserName:"Chrome",features:["audio"],supported:jt.full},{browserName:"Firefox",features:["audio"],supported:jt.partial},{browserName:"Safari",supported:jt.not_supported},{browserName:"Edge",supported:jt.not_supported}]},{operationSystem:"iOS",supported:[{browserName:"Chrome",supported:jt.not_supported},{browserName:"Firefox",supported:jt.not_supported},{browserName:"Safari",features:["video","audio"],supported:jt.full},{browserName:"Edge",supported:jt.not_supported}]},{operationSystem:"Linux",supported:[{browserName:"Chrome",features:["video","audio"],supported:jt.full},{browserName:"Firefox",features:["audio"],supported:jt.partial},{browserName:"Safari",supported:jt.not_supported},{browserName:"Edge",supported:jt.not_supported}]},{operationSystem:"MacOS",supported:[{browserName:"Chrome",features:["video","audio"],supported:jt.full},{browserName:"Firefox",features:["audio"],supported:jt.partial},{browserName:"Safari",features:["video","audio"],supported:jt.full},{browserName:"Edge",features:["audio"],supported:jt.partial}]},{operationSystem:"Windows",supported:[{browserName:"Chrome",features:["video","audio"],supported:jt.full},{browserName:"Firefox",features:["audio"],supported:jt.partial},{browserName:"Safari",supported:jt.not_supported},{browserName:"Edge",features:["audio"],supported:jt.partial}]}]}}class fr{constructor(){this.analyserNode=null,this.audioSource=null,this.animationId=null,this.audioContext=null}start(e,t){try{this.audioContext=new AudioContext,this.audioSource=this.audioContext.createMediaStreamSource(e),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=256,this.analyserNode.smoothingTimeConstant=.3,this.audioSource.connect(this.analyserNode);const r=new Float32Array(this.analyserNode.fftSize),n=()=>{if(!this.analyserNode)return void this.stop();this.analyserNode.getFloatTimeDomainData(r);let e=0;for(const t of r)e+=t*t;const o=Math.sqrt(e/r.length),i=Math.min(1,10*o);t((i>.01?i:0).toFixed(3)),this.animationId=requestAnimationFrame(n)};n()}catch(e){}}stop(){if(null!==this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.audioSource){try{this.audioSource.disconnect()}catch(e){}this.audioSource=null}this.audioContext&&(this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyserNode=null}}const vr={NotAllowedError:"Microphone permission denied",NotFoundError:"No microphone found",NotReadableError:"Microphone is in use by another application",OverconstrainedError:"Microphone does not support required settings"};class mr{constructor(e){this.options=e,this.client=null,this.call=null,this.localStream=null,this.remoteAudio=null,this.audioMonitor=null,this.state="idle",this.eventListeners=new Map,this.connectResolve=null,this.connectReject=null,this.readyTimeout=null,this.cleaningUp=!1,this.handleReady=()=>{if(this.client&&this.localStream){try{this.call=this.client.newCall({destinationNumber:"moveo-test",audio:!0,localStream:this.localStream,remoteElement:this.ensureRemoteAudioElement()})}catch(e){const t=e instanceof Error?e.message:"Failed to start Telnyx call";return this.emitError(t),void this.cleanup()}this.audioMonitor=new fr,this.audioMonitor.start(this.localStream,e=>{this.emit("audio-level",e,Number(e))})}},this.handleClientError=e=>{const t=e instanceof Error?e.message:"object"==typeof e&&e&&"message"in e?String(e.message):"Telnyx client error";this.emitError(t),this.cleanup()},this.handleNotification=e=>{var t,r;if("userMediaError"===e.type)return this.emitError((null===(t=e.error)||void 0===t?void 0:t.message)||"Microphone access failed"),void this.cleanup();if("callUpdate"!==e.type||!e.call)return;const n=e.call.state;switch(n){case"new":break;case"trying":case"requesting":case"ringing":this.setState("connecting");break;case"active":this.setState("connected"),this.clearReadyTimeout(),null===(r=this.connectResolve)||void 0===r||r.call(this),this.connectResolve=null,this.connectReject=null;break;case"held":this.emitError("Call on hold"),this.cleanup();break;case"hangup":case"destroy":case"purge":"hangup"!==n&&this.emitError("Call ended unexpectedly"),this.cleanup(!0);break;default:this.emitError(`Unexpected call state: ${n}`),this.cleanup()}}}async connect(){let e;this.setState("connecting");try{e=await this.fetchToken()}catch(e){const t=e instanceof Error?e.message:"Token fetch failed";throw this.emitError(t),new Error(t)}try{this.localStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(e){const t=e instanceof Error?e.name:"",r=vr[t]||"Microphone access failed";throw this.emitError(r),new Error(r)}return this.client=new gr({login_token:e}),this.client.on("telnyx.ready",this.handleReady),this.client.on("telnyx.error",this.handleClientError),this.client.on("telnyx.notification",this.handleNotification),this.client.connect(),new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t,this.readyTimeout=setTimeout(()=>{this.connectReject&&(this.emitError("Could not connect to Telnyx"),this.cleanup())},15e3)})}disconnect(){this.cleanup()}toggleMute(){return!!this.call&&(this.call.isAudioMuted?(this.call.unmuteAudio(),!1):(this.call.muteAudio(),!0))}isMuted(){var e,t;return null!==(t=null===(e=this.call)||void 0===e?void 0:e.isAudioMuted)&&void 0!==t&&t}sendDigits(e){if(this.call)for(const t of e)this.call.dtmf(t)}on(e,t){var r;const n=null!==(r=this.eventListeners.get(e))&&void 0!==r?r:new Set;return n.add(t),this.eventListeners.set(e,n),()=>this.off(e,t)}off(e,t){const r=this.eventListeners.get(e);r&&(r.delete(t),0===r.size&&this.eventListeners.delete(e))}async fetchToken(){const e=`${this.options.host}/v1/telnyxvoice/${encodeURIComponent(this.options.integrationId)}/token`,t=await fetch(e,{method:"GET"});if(!t.ok){if(404===t.status)throw new Error(`Integration ID "${this.options.integrationId}" was not found.`);throw new Error(`Unable to fetch Telnyx token (status ${t.status} ${t.statusText}).`)}const r=(await t.text()).trim();if(!r)throw new Error("Empty token response from Telnyx token endpoint");let n;try{n=JSON.parse(r)}catch(e){return r}if(n&&"object"==typeof n&&"token"in n&&"string"==typeof n.token)return n.token;throw new Error(`Unexpected Telnyx token response shape: ${r.slice(0,200)}`)}ensureRemoteAudioElement(){return this.remoteAudio||(this.remoteAudio=document.createElement("audio"),this.remoteAudio.autoplay=!0,document.body.appendChild(this.remoteAudio)),this.remoteAudio}cleanup(e=!1){var t,r;if(!this.cleaningUp){this.cleaningUp=!0,this.clearReadyTimeout(),this.client&&(this.client.off("telnyx.ready",this.handleReady),this.client.off("telnyx.error",this.handleClientError),this.client.off("telnyx.notification",this.handleNotification)),this.call=null;try{null===(t=this.audioMonitor)||void 0===t||t.stop()}catch(e){}if(this.audioMonitor=null,this.client)try{(e?this.client.serverDisconnect():this.client.disconnect()).catch(()=>{})}catch(e){}this.client=null;try{null===(r=this.localStream)||void 0===r||r.getTracks().forEach(e=>e.stop())}catch(e){}if(this.localStream=null,this.remoteAudio){try{this.remoteAudio.srcObject=null,this.remoteAudio.remove()}catch(e){}this.remoteAudio=null}this.connectReject&&this.connectReject(new Error("Call disconnected before connection completed")),this.connectResolve=null,this.connectReject=null,this.setState("idle"),this.cleaningUp=!1}}clearReadyTimeout(){this.readyTimeout&&(clearTimeout(this.readyTimeout),this.readyTimeout=null)}setState(e){this.state!==e&&(this.state=e,this.emit("state-change",e,e))}emitError(e){this.emit("error",e),this.setState("error")}emit(e,t,r){const n={state:e,message:t,data:r},o=e=>{const t=this.eventListeners.get(e);t&&t.forEach(e=>{try{e(n)}catch(e){}})};o(e),o("any")}}var Cr=r(4922);const wr=(...e)=>e.filter((e,t,r)=>Boolean(e)&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),br=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var yr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const kr=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},xr=(0,o.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...l},c)=>(0,o.createElement)("svg",{ref:c,...yr,width:t,height:t,stroke:e,strokeWidth:n?24*Number(r)/Number(t):r,className:wr("lucide",i),...!a&&!kr(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Sr=(e,t)=>{const r=(0,o.forwardRef)(({className:r,...n},i)=>{return(0,o.createElement)(xr,{ref:i,iconNode:t,className:wr(`lucide-${a=br(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,r),...n});var a});return r.displayName=br(e),r},_r=Sr("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),Br=Sr("phone-off",[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]);r(3121),Object.create(null);const Er={},Ir=(e,t,r,n)=>{Or(r)&&Er[r]||(Or(r)&&(Er[r]=new Date),((e,t,r,n)=>{const o=[r,{code:t,...n||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Or(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)})(e,t,r,n))},Tr=(e,t)=>()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},Rr=(e,t,r)=>{e.loadNamespaces(t,Tr(e,r))},Nr=(e,t,r,n)=>{if(Or(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Rr(e,r,n);r.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,Tr(e,n))},Or=e=>"string"==typeof e,Lr=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Dr={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Pr=e=>Dr[e];let Mr,Ur={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Lr,Pr)};const Fr={type:"3rdParty",init(e){((e={})=>{Ur={...Ur,...e}})(e.options.react),(e=>{Mr=e})(e)}},jr=(0,o.createContext)();class zr{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const qr=(e,t,r,n)=>e.getFixedT(t,r,n),$r=(e,t={})=>{const{i18n:r}=t,{i18n:n,defaultNS:i}=(0,o.useContext)(jr)||{},a=r||n||Mr;if(a&&!a.reportNamespaces&&(a.reportNamespaces=new zr),!a){Ir(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return Or(t)?t:"object"==typeof(r=t)&&null!==r&&Or(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var r},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react?.wait&&Ir(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Ur,...a.options.react,...t},{useSuspense:l,keyPrefix:c}=s;let d=e||i||a.options?.defaultNS;d=Or(d)?[d]:d||["translation"],a.reportNamespaces.addUsedNamespaces?.(d);const u=(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>((e,t,r={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(t,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):(Ir(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,a,s)),h=((e,t,r,n)=>(0,o.useCallback)(qr(e,t,r,n),[e,t,r,n]))(a,t.lng||null,"fallback"===s.nsMode?d:d[0],c),p=()=>h,A=()=>qr(a,t.lng||null,"fallback"===s.nsMode?d:d[0],c),[g,f]=(0,o.useState)(p);let v=d.join();t.lng&&(v=`${t.lng}${v}`);const m=((e,t)=>{const r=(0,o.useRef)();return(0,o.useEffect)(()=>{r.current=e},[e,t]),r.current})(v),C=(0,o.useRef)(!0);(0,o.useEffect)(()=>{const{bindI18n:e,bindI18nStore:r}=s;C.current=!0,u||l||(t.lng?Nr(a,t.lng,d,()=>{C.current&&f(A)}):Rr(a,d,()=>{C.current&&f(A)})),u&&m&&m!==v&&C.current&&f(A);const n=()=>{C.current&&f(A)};return e&&a?.on(e,n),r&&a?.store.on(r,n),()=>{C.current=!1,a&&e&&e?.split(" ").forEach(e=>a.off(e,n)),r&&a&&r.split(" ").forEach(e=>a.store.off(e,n))}},[a,v]),(0,o.useEffect)(()=>{C.current&&u&&f(p)},[a,c,u]);const w=[g,a,u];if(w.t=g,w.i18n=a,w.ready=u,u)return w;if(!u&&!l)return w;throw new Promise(e=>{t.lng?Nr(a,t.lng,d,()=>e()):Rr(a,d,()=>e())})};Object.freeze({"bab4875e-0411-4ae1-9e98-19ea236d369b":"nbg","0ffdaef8-4ce9-4188-9fdd-4644e5062cf2":"alpha","0e614713-2e6b-4af2-8e9e-21c2a4617981":"fiserv"});const Wr=e=>{const t="number"==typeof e?e:0,r=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,n=Math.floor(r/60),o=r%60;return`${String(n).padStart(2,"0")}:${String(o).padStart(2,"0")}`},Hr=({audioLevel:e,isMuted:t=!1})=>{const r=(0,o.useRef)(0),[n,i]=(0,o.useState)(0);(0,o.useEffect)(()=>{const t=5*e*.3+.7*r.current;(Math.abs(t-r.current)>.02||e<.005)&&(r.current=t,i(t))},[e]);const a=Math.min(1,Math.max(0,n)),s=n>.03;return(0,Cr.jsx)("div",{className:"flex h-9 w-9 items-center justify-center gap-[2px]",children:[.4,.7,1,.7,.4].map((e,r)=>{const n=s?Math.max(.25,Math.min(.95,.25+a*e*.7)):.15;return(0,Cr.jsx)("span",{className:"h-5 w-[2px] origin-center rounded-full transition-transform duration-150 "+(t?"bg-slate-400":"bg-emerald-500"),style:{transform:`scaleY(${n})`,opacity:s?.7+.3*a:.4}},r)})})},Vr=({className:e=""})=>(0,Cr.jsx)("svg",{className:`h-[18px] w-[18px] ${e}`,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Cr.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z"})}),Gr=()=>(0,Cr.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,xmlns:"http://www.w3.org/2000/svg",children:(0,Cr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),Yr=()=>(0,Cr.jsxs)("div",{className:"relative h-5 w-5",children:[(0,Cr.jsx)(_r,{className:"h-5 w-5"}),(0,Cr.jsx)("svg",{className:"absolute inset-0 h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Cr.jsx)("path",{d:"M3 3L17 17",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})})]}),Kr=()=>(0,Cr.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,Cr.jsx)("circle",{cx:"6",cy:"5",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"12",cy:"5",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"18",cy:"5",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"6",cy:"10",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"12",cy:"10",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"18",cy:"10",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"6",cy:"15",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"12",cy:"15",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"18",cy:"15",r:"1.5"}),(0,Cr.jsx)("circle",{cx:"12",cy:"20",r:"1.5"})]}),Qr=[["1","2","3"],["4","5","6"],["7","8","9"],["*","0","#"]],Jr=({onSendDigits:e})=>{const{t:t}=$r(),[r,n]=(0,o.useState)(null);return(0,Cr.jsx)("div",{className:"grid grid-cols-3 gap-2 rounded-xl border border-slate-200/80 bg-white/90 p-3 shadow-sm backdrop-blur-md dark:border-slate-700/50 dark:bg-slate-900/80",role:"group","aria-label":t("audio_widget.dtmf.label"),children:Qr.flat().map(t=>(0,Cr.jsx)("button",{type:"button",onClick:()=>(t=>{e(t),n(t),setTimeout(()=>n(null),150)})(t),className:"flex h-11 w-11 items-center justify-center rounded-lg text-base font-semibold transition-all duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-1 active:scale-95 "+(r===t?"bg-sky-100 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-700"),"aria-label":t,children:t},t))})},Xr=({onStartCall:e,onEndCall:t,onToggleMute:r,isMuted:n,onSendDigits:i,onEvent:a})=>{const{t:s}=$r(),[l,c]=(0,o.useState)("idle"),[d,u]=(0,o.useState)(""),[h,p]=(0,o.useState)(""),[A,g]=(0,o.useState)(0),[f,v]=(0,o.useState)(!1),[m,C]=(0,o.useState)(!1),[w,b]=(0,o.useState)(0),[y,k]=(0,o.useState)(!1),[x,S]=(0,o.useState)(!1),_=(0,o.useRef)(null),B=(0,o.useRef)(null),E=(0,o.useRef)(null),I=(0,o.useRef)(null),T=(0,o.useRef)(null);(0,o.useEffect)(()=>("connected"===l&&I.current?T.current=window.setInterval(()=>{I.current&&b(Math.floor((Date.now()-I.current)/1e3))},1e3):T.current&&(clearInterval(T.current),T.current=null),()=>{T.current&&clearInterval(T.current)}),[l]),(0,o.useEffect)(()=>{const e=a("any",({state:e,message:t,data:r})=>{switch(e){case"audio-level":{const e=null!=r?r:t;let n;n="number"==typeof e?e:"string"==typeof e?parseFloat(e):Number(e),Number.isNaN(n)||g(Math.max(0,n));break}case"warning":t&&(p(t),_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{p(""),_.current=null},5e3));break;case"warning-cleared":p(""),_.current&&(clearTimeout(_.current),_.current=null);break;case"remote-audio":B.current&&(clearTimeout(B.current),B.current=null),E.current&&(clearTimeout(E.current),E.current=null),v(!1),C(!1);break;case"error":c("error"),u(t||s("audio_widget.errors.generic")),v(!1),C(!1),b(0),I.current=null,E.current&&(clearTimeout(E.current),E.current=null),setTimeout(()=>{c("idle"),u("")},3e3)}});return()=>{e(),_.current&&clearTimeout(_.current)}},[a,s]),(0,o.useEffect)(()=>"connected"!==l?(B.current&&(clearTimeout(B.current),B.current=null),E.current&&(clearTimeout(E.current),E.current=null),void queueMicrotask(()=>{f&&v(!1),m&&C(!1)})):A>.04?(queueMicrotask(()=>{m||C(!0),f&&v(!1)}),B.current&&(clearTimeout(B.current),B.current=null),void(E.current&&(clearTimeout(E.current),E.current=null))):void(!m||f||B.current||(B.current=window.setTimeout(()=>{v(!0),B.current=null},1400))),[A,l,m,f]),(0,o.useEffect)(()=>()=>{B.current&&clearTimeout(B.current),E.current&&clearTimeout(E.current)},[]),(0,o.useEffect)(()=>{f?(E.current&&clearTimeout(E.current),E.current=window.setTimeout(()=>{v(!1),C(!1),E.current=null},4e3)):E.current&&(clearTimeout(E.current),E.current=null)},[f]);const R="connecting"===l,N="error"===l?"bg-rose-50/80 text-rose-600 border border-rose-200/60 shadow-[0_2px_8px_rgba(244,63,94,0.12)] dark:bg-rose-500/15 dark:text-rose-300 dark:border-rose-500/30":"connected"===l?"bg-emerald-50/80 text-emerald-600 border border-emerald-200/60 shadow-[0_2px_8px_rgba(16,185,129,0.15)] hover:bg-gradient-to-br hover:from-red-500 hover:to-red-600 hover:text-white hover:border-red-500/20 hover:shadow-[0_6px_20px_rgba(239,68,68,0.35)] dark:bg-emerald-500/15 dark:text-emerald-300 dark:border-emerald-500/30 dark:hover:from-red-600 dark:hover:to-red-700 transition-colors":"connecting"===l?"bg-sky-50/80 text-sky-600 border border-sky-200/60 shadow-[0_2px_8px_rgba(14,165,233,0.12)] dark:bg-sky-500/15 dark:text-sky-300 dark:border-sky-500/30":"bg-gradient-to-br from-emerald-500 to-emerald-600 text-white border border-emerald-500/20 shadow-[0_4px_14px_rgba(16,185,129,0.25)] hover:shadow-[0_6px_20px_rgba(16,185,129,0.35)] dark:from-emerald-600 dark:to-emerald-700 dark:border-emerald-500/30",O="error"===l?"border-t-rose-400/60 border-r-rose-300/30 border-b-transparent border-l-transparent":f?"border-t-sky-400/60 border-r-sky-300/30 border-b-transparent border-l-transparent":"border-t-sky-500/60 border-r-sky-400/30 border-b-transparent border-l-transparent",L=s("idle"===l?"audio_widget.status.ready":"connecting"===l?"audio_widget.status.connecting":"connected"===l?f?"audio_widget.status.thinking":"audio_widget.status.on_call":"audio_widget.status.error"),D="error"===l?"text-rose-500 dark:text-rose-400":"connected"===l?"text-emerald-500 dark:text-emerald-400":"connecting"===l?"text-sky-500 dark:text-sky-400":"text-slate-500 dark:text-slate-400",P=s("idle"===l||"error"===l?"audio_widget.actions.start":"connecting"===l?"audio_widget.actions.cancel":"audio_widget.actions.end"),M="idle"===l?s("audio_widget.sr.ready"):"connecting"===l?s("audio_widget.sr.connecting"):"connected"===l?s(f?"audio_widget.sr.connected_thinking":"audio_widget.sr.connected"):d?s("audio_widget.sr.error_with_message",{message:d}):s("audio_widget.sr.error");return(0,Cr.jsxs)("div",{className:"relative font-sans text-slate-800 antialiased dark:text-slate-100",children:[h&&(0,Cr.jsx)("div",{className:"absolute -top-14 left-1/2 w-max max-w-[18rem] -translate-x-1/2 rounded-full bg-amber-100/90 px-4 py-2 text-xs font-medium text-amber-800 shadow-lg shadow-amber-200/70 ring-1 ring-amber-300 backdrop-blur dark:bg-amber-500/15 dark:text-amber-200 dark:ring-amber-400/40",role:"status","aria-live":"polite",children:h}),(0,Cr.jsxs)("div",{className:"inline-flex min-w-[260px] items-center gap-3 rounded-2xl border border-slate-200/80 bg-white/90 px-5 py-3.5 shadow-sm backdrop-blur-md backdrop-saturate-150 transition-all duration-200 hover:shadow-md dark:border-slate-700/50 dark:bg-slate-900/80 dark:shadow-xl dark:shadow-slate-950/30",children:[(0,Cr.jsxs)("button",{type:"button",onClick:()=>{"idle"!==l&&"error"!==l?(B.current&&(clearTimeout(B.current),B.current=null),T.current&&(clearInterval(T.current),T.current=null),t(),c("idle"),g(0),v(!1),C(!1),b(0),k(!1),S(!1),I.current=null,E.current&&(clearTimeout(E.current),E.current=null)):(async()=>{try{c("connecting"),u(""),g(0),v(!1),C(!1),b(0),I.current=null,await e(),c("connected"),I.current=Date.now(),b(0)}catch(e){c("error"),v(!1),C(!1),u(e instanceof Error?e.message:s("audio_widget.errors.start_failed")),b(0),I.current=null}})()},className:`group relative flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-[1.05] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white active:scale-[0.98] dark:focus-visible:ring-offset-slate-950 ${N}`,"aria-label":P,title:"error"===l&&d?d:L,children:[(0,Cr.jsx)("span",{className:"sr-only",children:M}),"connected"===l?(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center transition-opacity duration-200 group-hover:opacity-0",children:(0,Cr.jsx)(Hr,{audioLevel:A,isMuted:y})}),(0,Cr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:(0,Cr.jsx)(Br,{className:"h-5 w-5"})})]}):"error"===l?(0,Cr.jsx)(Gr,{}):(0,Cr.jsx)(Vr,{className:"idle"===l?"fill-white":"fill-sky-600 dark:fill-sky-300"}),R?(0,Cr.jsx)("span",{className:`pointer-events-none absolute inset-[-4px] rounded-full border border-transparent ${O} animate-spin`}):null]}),"connected"===l&&(0,Cr.jsx)("button",{type:"button",onClick:()=>{r(),k(n())},className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(y?"bg-amber-100 text-amber-700 hover:bg-amber-200 focus-visible:ring-amber-400 dark:bg-amber-500/20 dark:text-amber-300 dark:hover:bg-amber-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":s(y?"audio_widget.mute.unmute_microphone":"audio_widget.mute.mute_microphone"),title:s(y?"audio_widget.mute.unmute":"audio_widget.mute.mute"),children:y?(0,Cr.jsx)(Yr,{}):(0,Cr.jsx)(_r,{className:"h-5 w-5"})}),"connected"===l&&(0,Cr.jsxs)("div",{className:"relative shrink-0",children:[(0,Cr.jsx)("button",{type:"button",onClick:()=>S(e=>!e),className:"flex h-12 w-12 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(x?"bg-sky-100 text-sky-700 hover:bg-sky-200 focus-visible:ring-sky-400 dark:bg-sky-500/20 dark:text-sky-300 dark:hover:bg-sky-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":s("audio_widget.dtmf.toggle"),title:s("audio_widget.dtmf.toggle"),"aria-expanded":x,children:(0,Cr.jsx)(Kr,{})}),x&&(0,Cr.jsx)("div",{className:"absolute bottom-full left-1/2 mb-5 w-max -translate-x-1/2",children:(0,Cr.jsx)(Jr,{onSendDigits:i})})]}),(0,Cr.jsxs)("div",{className:"relative flex flex-col gap-1 overflow-hidden leading-tight",children:[(0,Cr.jsx)("span",{className:`relative z-10 text-[0.65rem] font-medium uppercase tracking-[0.25em] ${D} transition-colors duration-200`,children:L}),"connected"===l&&(0,Cr.jsx)("span",{className:"animate-in fade-in slide-in-from-bottom-1 relative z-10 font-mono text-[0.8rem] text-slate-600 transition-all duration-500 dark:text-slate-400",children:Wr(w)})]})]})]})};class Zr{constructor(e){this.provider=null,this.widgetRoot=null,this.widgetContainer=null,this.widgetKey=0,this.prevProviderState=null,this.mq=null,this.mqListener=null,this.config={host:e.host||"https://channels.moveo.ai",integrationId:e.integrationId},this.log=t()(`moveo:telnyx:controller:${e.integrationId}`)}async init(){return this.provider=new mr({integrationId:this.config.integrationId,host:this.config.host}),this.provider.on("state-change",({data:e})=>{const t=e,r=this.prevProviderState;"idle"!==t||"connected"!==r&&"reconnecting"!==r||this.resetWidget(),this.prevProviderState=t}),this.createWidgetContainer(),this.renderWidget(),this.log("TelnyxController initialized"),this}async startCall(){var e;await(null===(e=this.provider)||void 0===e?void 0:e.connect())}endCall(){var e;null===(e=this.provider)||void 0===e||e.disconnect()}toggleMute(){var e;null===(e=this.provider)||void 0===e||e.toggleMute()}isMuted(){var e,t;return null!==(t=null===(e=this.provider)||void 0===e?void 0:e.isMuted())&&void 0!==t&&t}sendDigits(e){var t;null===(t=this.provider)||void 0===t||t.sendDigits(e)}on(e,t){var r,n;return null!==(n=null===(r=this.provider)||void 0===r?void 0:r.on(e,t))&&void 0!==n?n:()=>{}}off(e,t){var r;null===(r=this.provider)||void 0===r||r.off(e,t)}destroy(){var e;null===(e=this.provider)||void 0===e||e.disconnect(),this.provider=null,this.mq&&this.mqListener&&this.mq.removeEventListener("change",this.mqListener),this.mq=null,this.mqListener=null,this.widgetRoot&&(this.widgetRoot.unmount(),this.widgetRoot=null),this.widgetContainer&&(document.body.removeChild(this.widgetContainer),this.widgetContainer=null)}createWidgetContainer(){this.widgetContainer=document.createElement("div"),this.widgetContainer.id="moveo-telnyx-widget",this.widgetContainer.style.position="fixed",this.widgetContainer.style.zIndex="2147483647",this.widgetContainer.style.bottom="20px",this.widgetContainer.style.right="20px",this.applyDarkMode(),document.body.appendChild(this.widgetContainer)}applyDarkMode(){if(!this.widgetContainer||"function"!=typeof window.matchMedia)return;this.mq=window.matchMedia("(prefers-color-scheme: dark)");const e=e=>{var t;null===(t=this.widgetContainer)||void 0===t||t.classList.toggle("dark",e)};e(this.mq.matches),this.mqListener=t=>e(t.matches),this.mq.addEventListener("change",this.mqListener)}resetWidget(){this.widgetKey++,this.widgetRoot&&this.renderWidgetElement()}renderWidget(){if(!this.widgetContainer)throw new Error("Widget container not created");this.widgetRoot=(0,i.H)(this.widgetContainer),this.renderWidgetElement()}renderWidgetElement(){this.widgetRoot.render((0,o.createElement)(Xr,{key:this.widgetKey,onStartCall:this.startCall.bind(this),onEndCall:this.endCall.bind(this),onToggleMute:this.toggleMute.bind(this),isMuted:this.isMuted.bind(this),onSendDigits:this.sendDigits.bind(this),onEvent:this.on.bind(this)}))}}const en=e=>"string"==typeof e,tn=()=>{let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},rn=e=>null==e?"":""+e,nn=/###/g,on=e=>e&&e.indexOf("###")>-1?e.replace(nn,"."):e,an=e=>!e||en(e),sn=(e,t,r)=>{const n=en(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(an(e))return{};const t=on(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return an(e)?{}:{obj:e,k:on(n[o])}},ln=(e,t,r)=>{const{obj:n,k:o}=sn(e,t,Object);if(void 0!==n||1===t.length)return void(n[o]=r);let i=t[t.length-1],a=t.slice(0,t.length-1),s=sn(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=sn(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},cn=(e,t)=>{const{obj:r,k:n}=sn(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},dn=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?en(e[n])||e[n]instanceof String||en(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):dn(e[n],t[n],r):e[n]=t[n]);return e},un=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const pn=e=>en(e)?e.replace(/[&<>"'\/]/g,e=>hn[e]):e,An=[" ",",","?","!",";"],gn=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),fn=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const n=t.split(r);let o=e;for(let e=0;e<n.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},vn=e=>e?.replace(/_/g,"-"),mn={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Cn{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||mn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(en(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Cn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Cn(this.logger,e)}}var wn=new Cn;class bn{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class yn extends bn{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):en(r)&&o?a.push(...r.split(o)):a.push(r)));const s=cn(this.data,a);return!s&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),!s&&i&&en(r)?fn(this.data?.[e]?.[t],r,o):s}addResource(e,t,r,n,o={silent:!1}){const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),ln(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(const n in r)(en(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,i={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=cn(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?dn(s,r,o):s={...s,...r},ln(this.data,a,s),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var kn={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};const xn=Symbol("i18next/PATH_KEY");function Sn(e,t){const{[xn]:r}=e(function(){const e=[],t=Object.create(null);let r;return t.get=(n,o)=>(r?.revoke?.(),o===xn?e:(e.push(o),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),n=t?.keySeparator??".",o=t?.nsSeparator??":";if(r.length>1&&o){const e=t?.ns;if((e?Array.isArray(e)?e:[e]:[]).includes(r[0]))return`${r[0]}${o}${r.slice(1).join(n)}`}return r.join(n)}const _n={},Bn=e=>!en(e)&&"boolean"!=typeof e&&"number"!=typeof e;class En extends bn{constructor(e,t={}){super(),((e,t,r)=>{["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{t[e]&&(r[e]=t[e])})})(0,e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=wn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const r={...t};if(null==e)return!1;const n=this.resolve(e,r);if(void 0===n?.res)return!1;const o=Bn(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=An.filter(e=>t.indexOf(e)<0&&r.indexOf(e)<0);if(0===n.length)return!0;const o=gn.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:en(o)?[o]:o};const i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:en(o)?[o]:o}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=Sn(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?Sn(e,{...this.options,...n}):String(e));const o=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),l=s[s.length-1];let c=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===d?.toLowerCase())return u?o?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${c}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a;const h=this.resolve(e,n);let p=h?.res;const A=h?.usedKey||a,g=h?.exactUsedKey||a,f=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=void 0!==n.count&&!en(n.count),C=En.hasDefaultValue(n),w=m?this.pluralResolver.getSuffix(d,n.count,n):"",b=n.ordinal&&m?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",y=m&&!n.ordinal&&0===n.count,k=y&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${b}`]||n.defaultValue;let x=p;v&&!p&&C&&(x=k);const S=Bn(x),_=Object.prototype.toString.apply(x);if(!(v&&x&&S&&["[object Number]","[object Function]","[object RegExp]"].indexOf(_)<0)||en(f)&&Array.isArray(x))if(v&&en(f)&&Array.isArray(p))p=p.join(f),p&&(p=this.extendTranslation(p,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(p)&&C&&(t=!0,p=k),this.isValidLookup(p)||(o=!0,p=a);const s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:p,u=C&&k!==p&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,a,u?k:p),i){const e=this.resolve(a,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);const r=(e,t,r)=>{const o=C&&r!==p?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,o,u,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,o,u,n),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,n);y&&n[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],a+t,n[`defaultValue${t}`]||k)})}):r(e,a,k))}p=this.extendTranslation(p,e,n,h,r),o&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${a}`),(o||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?p:void 0,n))}else{if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,x,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=e,h.usedParams=this.getUsedParamsDetails(n),h):e}if(i){const e=Array.isArray(x),t=e?[]:{},r=e?g:A;for(const e in x)if(Object.prototype.hasOwnProperty.call(x,e)){const o=`${r}${i}${e}`;t[e]=C&&!p?this.translate(o,{...n,defaultValue:Bn(k)?k[e]:void 0,joinArrays:!1,ns:s}):this.translate(o,{...n,joinArrays:!1,ns:s}),t[e]===o&&(t[e]=x[e])}p=t}}return o?(h.res=p,h.usedParams=this.getUsedParamsDetails(n),h):p}extendTranslation(e,t,r,n,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const i=en(e)&&(void 0!==r?.interpolation?.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(i){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=r.replace&&!en(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,r.lng||this.language||n.usedLng,r),i){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>o?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}const i=r.postProcess||this.options.postProcess,a=en(i)?[i]:i;return null!=e&&a?.length&&!1!==r.applyPostProcessor&&(e=kn.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,o,i,a;return en(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?Sn(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(e,t),l=s.key;n=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!en(t.count),u=d&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(en(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(r)||(a=e,_n[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(_n[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(r))return;i=n;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));const r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(o)&&a.push(l+e.replace(o,this.options.pluralSeparator)),a.push(l+e),u&&a.push(l+r)),h){const n=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(n),d&&(t.ordinal&&0===e.indexOf(o)&&a.push(n+e.replace(o,this.options.pluralSeparator)),a.push(n+e),u&&a.push(n+r))}}let s;for(;s=a.pop();)this.isValidLookup(r)||(o=s,r=this.getResource(n,e,s,t))}))})}),{res:r,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!en(e.replace);let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class In{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wn.create("languageUtils")}getScriptPartFromCode(e){if(!(e=vn(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=vn(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(en(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),en(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return en(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):en(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))}),n}}const Tn={zero:0,one:1,two:2,few:3,many:4,other:5},Rn={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Nn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=wn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const r=vn("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:n})}catch(r){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Rn;if(!e.match(/-|_/))return Rn;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((e,t)=>Tn[e]-Tn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){const n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const On=(e,t,r,n=".",o=!0)=>{let i=((e,t,r)=>{const n=cn(e,r);return void 0!==n?n:cn(t,r)})(e,t,r);return!i&&o&&en(r)&&(i=fn(e,r,n),void 0===i&&(i=fn(t,r,n))),i},Ln=e=>e.replace(/\$/g,"$$$$");class Dn{constructor(e={}){this.logger=wn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:A,nestingOptionsSeparator:g,maxReplaces:f,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:pn,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?un(o):i||"{{",this.suffix=a?un(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?un(u):h||un("$t("),this.nestingSuffix=p?un(p):A||un(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=f||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=On(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(On(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();const c=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Ln(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ln(this.escape(e)):Ln(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const r=o[1].trim();if(i=l(r),void 0===i)if("function"==typeof c){const t=c(e,o,n);i=en(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(d){i=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else en(i)||this.useRawValueToEscape||(i=rn(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,o,i;const a=(e,t)=>{const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${un(r)}[ ]*{`));let o=`{${n[1]}`;e=n[0],o=this.interpolate(o,i);const a=o.match(/'/g),s=o.match(/"/g);((a?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i={...t,...i})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];i={...r},i=i.replace&&!en(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const l=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==l&&(s=n[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,l)),o=t(a.call(this,n[1].trim(),i),i),o&&n[0]===e&&!en(o))return o;en(o)||(o=rn(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),o=""),s.length&&(o=s.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),o.trim())),e=e.replace(n[0],o),this.regexp.lastIndex=0}return e}}const Pn=e=>{const t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=n+JSON.stringify(i);let s=t[a];return s||(s=e(vn(n),o),t[a]=s),s(r)}},Mn=e=>(t,r,n)=>e(vn(r),n)(t);class Un{constructor(e={}){this.logger=wn.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const r=t.cacheInBuiltFormats?Pn:Mn;this.formats={number:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Pn(t)}format(e,t,r,n={}){const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{const a=n?.formatParams?.[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class Fn extends bn{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=wn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){const o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){const n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(r=>{((e,t,r)=>{const{obj:n,k:o}=sn(e,t,Object);n[o]=n[o]||[],n[o].push(r)})(r.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});const t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}}prepareLoading(e,t,r={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();en(e)&&(e=this.languageUtils.toResolveHierarchy(e)),en(t)&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,o,i={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=r&&""!==r){if(this.backend?.create){const s={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,r,n,s):l(e,t,r,n),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else l(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}else this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const jn=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),en(e[1])&&(t.defaultValue=e[1]),en(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),zn=e=>(en(e.ns)&&(e.ns=[e.ns]),en(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),en(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),qn=()=>{},$n="__i18next_supportNoticeShown";class Wn extends bn{constructor(e={},t){var r;if(super(),this.options=zn(e),this.services={},this.logger=wn,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(en(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=jn();var n;this.options={...r,...this.options,...zn(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(n=this,n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(e=>e?.projectId))||"undefined"!=typeof globalThis&&globalThis[$n]||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[$n]=!0));const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?wn.init(o(this.modules.logger),this.options):wn.init(null,this.options),e=this.modules.formatter?this.modules.formatter:Un;const t=new In(this.options);this.store=new yn(this.options.resources,this.options);const n=this.services;n.logger=wn,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Nn(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(n.formatter=o(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Dn(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Fn(o(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=o(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=o(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new En(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=qn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const i=tn(),a=()=>{const e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=qn){let r=t;const n=en(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return r();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){const n=tn();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=qn),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&kn.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const r=tn();this.emit("languageChanging",e);const n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(o,i)=>{i?this.isLanguageChangingTo===e&&(n(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},i=t=>{e||t||!this.services.languageDetector||(t=[]);const r=en(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(en(t)?[t]:t);i&&(this.language||n(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}getFixedT(e,t,r){const n=(e,t,...o)=>{let i;i="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t},i.lng=i.lng||n.lng,i.lngs=i.lngs||n.lngs,i.ns=i.ns||n.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||r||n.keyPrefix);const a=this.options.keySeparator||".";let s;return i.keyPrefix&&Array.isArray(e)?s=e.map(e=>("function"==typeof e&&(e=Sn(e,{...this.options,...t})),`${i.keyPrefix}${a}${e}`)):("function"==typeof e&&(e=Sn(e,{...this.options,...t})),s=i.keyPrefix?`${i.keyPrefix}${a}${e}`:e),this.t(s,i)};return en(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!(!this.hasResourceBundle(r,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!i(r,e)||n&&!i(o,e)))}loadNamespaces(e,t){const r=tn();return this.options.ns?(en(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=tn();en(e)&&(e=[e]);const n=this.options.preload||[],o=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new In(jn());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const r=new Wn(e,t);return r.createInstance=Wn.createInstance,r}cloneInstance(e={},t=qn){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new Wn(n);if(void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{});o.store=new yn(e,n),o.services.resourceStore=o.store}if(e.interpolation){const t={...jn().interpolation,...this.options.interpolation,...e.interpolation},r={...n,interpolation:t};o.services.interpolator=new Dn(r)}return o.translator=new En(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Hn=Wn.createInstance(),{slice:Vn,forEach:Gn}=(Hn.createInstance,Hn.dir,Hn.init,Hn.loadResources,Hn.reloadResources,Hn.use,Hn.changeLanguage,Hn.getFixedT,Hn.t,Hn.exists,Hn.setDefaultNamespace,Hn.hasLoadedNamespace,Hn.loadNamespaces,Hn.loadLanguages,[]),Yn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Kn={create(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*r*1e3)),n&&(o.domain=n),document.cookie=function(e,t){const r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let n=`${e}=${encodeURIComponent(t)}`;if(r.maxAge>0){const e=r.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");n+=`; Max-Age=${Math.floor(e)}`}if(r.domain){if(!Yn.test(r.domain))throw new TypeError("option domain is invalid");n+=`; Domain=${r.domain}`}if(r.path){if(!Yn.test(r.path))throw new TypeError("option path is invalid");n+=`; Path=${r.path}`}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");n+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(n+="; HttpOnly"),r.secure&&(n+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:n+="; SameSite=Strict";break;case"lax":n+="; SameSite=Lax";break;case"strict":n+="; SameSite=Strict";break;case"none":n+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(n+="; Partitioned"),n}(e,t,o)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let e=0;e<r.length;e++){let n=r[e];for(;" "===n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Qn={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Kn.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:i}=t;r&&"undefined"!=typeof document&&Kn.create(r,e,n,o,i)}},Jn={name:"querystring",lookup(e){let t,{lookupQuerystring:r}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const n=e.substring(1).split("&");for(let e=0;e<n.length;e++){const o=n[e].indexOf("=");o>0&&n[e].substring(0,o)===r&&(t=n[e].substring(o+1))}}return t}},Xn={name:"hash",lookup(e){let t,{lookupHash:r,lookupFromHashIndex:n}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(r){const e=o.split("&");for(let n=0;n<e.length;n++){const o=e[n].indexOf("=");o>0&&e[n].substring(0,o)===r&&(t=e[n].substring(o+1))}}if(t)return t;if(!t&&n>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const r="number"==typeof n?n:0;return t[r]?.replace("/","")}}}return t}};let Zn=null;const eo=()=>{if(null!==Zn)return Zn;try{if(Zn="undefined"!=typeof window&&null!==window.localStorage,!Zn)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Zn=!1}return Zn};var to={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&eo())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&eo()&&window.localStorage.setItem(r,e)}};let ro=null;const no=()=>{if(null!==ro)return ro;try{if(ro="undefined"!=typeof window&&null!==window.sessionStorage,!ro)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){ro=!1}return ro};var oo={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&no())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&no()&&window.sessionStorage.setItem(r,e)}},io={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:r,language:n}=navigator;if(e)for(let r=0;r<e.length;r++)t.push(e[r]);r&&t.push(r),n&&t.push(n)}return t.length>0?t:void 0}},ao={name:"htmlTag",lookup(e){let t,{htmlTag:r}=e;const n=r||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},so={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(r))return;const n="number"==typeof t?t:0;return r[n]?.replace("/","")}},lo={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const r="number"==typeof t?t+1:1,n="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};let co=!1;try{document.cookie,co=!0}catch(a){}const uo=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];co||uo.splice(1,1);class ho{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Gn.call(Vn.call(arguments,1),t=>{if(t)for(const r in t)void 0===e[r]&&(e[r]=t[r])}),e}(t,this.options||{},{order:uo,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Qn),this.addDetector(Jn),this.addDetector(to),this.addDetector(oo),this.addDetector(io),this.addDetector(ao),this.addDetector(so),this.addDetector(lo),this.addDetector(Xn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let r=this.detectors[e].lookup(this.options);r&&"string"==typeof r&&(r=[r]),r&&(t=t.concat(r))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}ho.type="languageDetector";Hn.createInstance().use(ho).use(Fr).init({resources:{el:{translation:{audio_widget:{actions:{cancel:"Ακύρωση δοκιμαστικής κλήσης ήχου",end:"Τερματισμός δοκιμαστικής κλήσης ήχου",start:"Έναρξη δοκιμαστικής κλήσης ήχου"},errors:{generic:"Παρουσιάστηκε σφάλμα",start_failed:"Δεν ήταν δυνατή η έναρξη της κλήσης"},mute:{mute:"Σίγαση",mute_microphone:"Σίγαση μικροφώνου",unmute:"Κατάργηση σίγασης",unmute_microphone:"Κατάργηση σίγασης μικροφώνου"},sr:{connected:"Η κλήση συνδέθηκε",connected_thinking:"Η κλήση συνδέθηκε, δημιουργία απάντησης",connecting:"Σύνδεση κλήσης",error:"Σφάλμα κλήσης",error_with_message:"Σφάλμα κλήσης: {{message}}",ready:"Έτοιμο για πραγματοποίηση κλήσης"},status:{connecting:"Σύνδεση",error:"Σφάλμα",on_call:"Σε κλήση",ready:"Έτοιμο",thinking:"Σκέφτεται"}}}},en:{translation:{audio_widget:{actions:{cancel:"Cancel audio preview call",end:"End audio preview call",start:"Start audio preview call"},errors:{generic:"An error occurred",start_failed:"Failed to start call"},mute:{mute:"Mute",mute_microphone:"Mute microphone",unmute:"Unmute",unmute_microphone:"Unmute microphone"},sr:{connected:"Call connected",connected_thinking:"Call connected, generating response",connecting:"Connecting call",error:"Call error",error_with_message:"Call error: {{message}}",ready:"Ready to place a call"},status:{connecting:"Connecting",error:"Error",on_call:"On call",ready:"Ready",thinking:"Thinking"}}}},"pt-br":{translation:{audio_widget:{actions:{cancel:"Cancelar chamada de prévia de áudio",end:"Encerrar chamada de prévia de áudio",start:"Iniciar chamada de prévia de áudio"},errors:{generic:"Ocorreu um erro",start_failed:"Não foi possível iniciar a chamada"},mute:{mute:"Silenciar",mute_microphone:"Silenciar microfone",unmute:"Ativar",unmute_microphone:"Ativar microfone"},sr:{connected:"Chamada conectada",connected_thinking:"Chamada conectada, gerando resposta",connecting:"Conectando chamada",error:"Erro na chamada",error_with_message:"Erro na chamada: {{message}}",ready:"Pronto para iniciar uma chamada"},status:{connecting:"Conectando",error:"Erro",on_call:"Em chamada",ready:"Pronto",thinking:"Pensando"}}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:["navigator"]}});var po=r(6186),Ao=r.n(po),go=r(2155),fo=r.n(go),vo=r(7433),mo=r.n(vo),Co=r(8626),wo=r.n(Co),bo=r(8990),yo=r.n(bo),ko=r(9827),xo=r.n(ko),So=r(4511),_o={};_o.styleTagTransform=xo(),_o.setAttributes=wo(),_o.insert=mo().bind(null,"head"),_o.domAPI=fo(),_o.insertStyleElement=yo(),Ao()(So.A,_o),So.A&&So.A.locals&&So.A.locals;const Bo=t()("moveo:telnyx:main"),Eo=async e=>{if(Bo("MoveoTelnyx.init() called with config",e),!e.integrationId){const e=new Error("integrationId is required in config");throw Bo("Initialization failed: integrationId is required",e),e}Bo("Creating TelnyxController instance");const t=new Zr(e);return Bo("Initializing TelnyxController"),await t.init(),Bo("MoveoTelnyx initialization complete"),t};var Io=Object.assign(Eo,{init:Eo,TelnyxController:Zr})}(),n.default}()});
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("MoveoTelnyx",[],t):"object"==typeof exports?exports.MoveoTelnyx=t():e.MoveoTelnyx=t()}(this,()=>(()=>{var e={4511(e,t,n){"use strict";var i=n(1601),r=n.n(i),o=n(6314),a=n.n(o)()(r());a.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap);"]),a.push([e.id,'/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--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-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-green-500:oklch(72.3% .219 149.579);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-blue-100:oklch(93.2% .032 255.585);--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-900:oklch(37.9% .146 265.522);--color-purple-600:oklch(55.8% .288 302.321);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-200:oklch(92.8% .006 264.531);--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-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:Inter, system-ui, -apple-system, sans-serif}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-\\[-4px\\]{inset:-4px}.inset-x-0{inset-inline:0}.-top-3{top:calc(var(--spacing) * -3)}.-top-14{top:calc(var(--spacing) * -14)}.-top-\\[28px\\]{top:-28px}.top-0{top:0}.top-1\\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-\\[50\\%\\]{top:50%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-auto{right:auto}.-bottom-3{bottom:calc(var(--spacing) * -3)}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\\[calc\\(100\\%\\+40px\\)\\]{bottom:calc(100% + 40px)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:0}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-4{left:calc(var(--spacing) * 4)}.left-\\[50\\%\\]{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-1100{z-index:1100}.clear-both{clear:both}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-2{margin:calc(var(--spacing) * 2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-5{margin-inline:calc(var(--spacing) * 5)}.mx-7{margin-inline:calc(var(--spacing) * 7)}.mx-8{margin-inline:calc(var(--spacing) * 8)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0{margin-top:0}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\\[10\\%\\]{margin-top:10%}.mt-\\[var\\(--moveo-new-header-height\\)\\]{margin-top:var(--moveo-new-header-height)}.mt-auto{margin-top:auto}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-auto{margin-right:auto}.mb-0{margin-bottom:0}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-9{margin-bottom:calc(var(--spacing) * 9)}.mb-16{margin-bottom:calc(var(--spacing) * 16)}.mb-20{margin-bottom:calc(var(--spacing) * 20)}.-ml-1{margin-left:calc(var(--spacing) * -1)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-0{margin-left:0}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-full{width:100%;height:100%}.h-\\(--moveo-chat-height\\){height:var(--moveo-chat-height)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-45{height:calc(var(--spacing) * 45)}.h-96{height:calc(var(--spacing) * 96)}.h-\\[18px\\]{height:18px}.h-\\[28px\\]{height:28px}.h-\\[42px\\]{height:42px}.h-\\[44px\\]{height:44px}.h-\\[78vh\\]{height:78vh}.h-\\[82px\\]{height:82px}.h-\\[222px\\]{height:222px}.h-\\[254px\\]{height:254px}.h-\\[282px\\]{height:282px}.h-\\[320px\\]{height:320px}.h-\\[386px\\]{height:386px}.h-\\[562px\\]{height:562px}.h-\\[650px\\]{height:650px}.h-\\[calc\\(100\\%-44px\\)\\]{height:calc(100% - 44px)}.h-\\[var\\(--moveo-chat-height\\)\\]{height:var(--moveo-chat-height)}.h-\\[var\\(--moveo-modal-tall-height\\)\\]{height:var(--moveo-modal-tall-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--radix-select-content-available-height\\){max-height:var(--radix-select-content-available-height)}.max-h-18{max-height:calc(var(--spacing) * 18)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[88px\\]{max-height:88px}.max-h-\\[400px\\]{max-height:400px}.max-h-\\[calc\\(100\\%-68px\\)\\]{max-height:calc(100% - 68px)}.max-h-\\[calc\\(100vh-16px\\)\\]{max-height:calc(100vh - 16px)}.max-h-\\[calc\\(100vh-80px\\)\\]{max-height:calc(100vh - 80px)}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\\[72px\\]{min-height:72px}.min-h-\\[calc\\(100\\%-44px\\)\\]{min-height:calc(100% - 44px)}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\\(--moveo-expanded-chat-width\\){width:var(--moveo-expanded-chat-width)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3xs{width:var(--container-3xs)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[2px\\]{width:2px}.w-\\[18px\\]{width:18px}.w-\\[28px\\]{width:28px}.w-\\[42px\\]{width:42px}.w-\\[380px\\]{width:380px}.w-\\[420px\\]{width:420px}.w-\\[510px\\]{width:510px}.w-\\[512px\\]{width:512px}.w-\\[calc\\(100\\%\\+48px\\)\\]{width:calc(100% + 48px)}.w-\\[calc\\(100\\%-24px\\)\\]{width:calc(100% - 24px)}.w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)}.w-\\[var\\(--moveo-chat-width\\)\\]{width:var(--moveo-chat-width)}.w-\\[var\\(--moveo-expanded-chat-width\\)\\]{width:var(--moveo-expanded-chat-width)}.w-\\[var\\(--moveo-modal-tall-width\\)\\]{width:var(--moveo-modal-tall-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-sm{width:var(--container-sm)}.w-xs{width:var(--container-xs)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-18{max-width:calc(var(--spacing) * 18)}.max-w-\\[18rem\\]{max-width:18rem}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[328px\\]{max-width:328px}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[260px\\]{min-width:260px}.min-w-\\[300px\\]{min-width:300px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.flex-1{flex:1}.flex-initial{flex:0 auto}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-\\[130px\\]{flex-basis:130px}.basis-\\[min\\(336px\\,calc\\(100\\%-48px\\)\\)\\]{flex-basis:min(336px,100% - 48px)}.basis-\\[min\\(400px\\,calc\\(100\\%-48px\\)\\)\\]{flex-basis:min(400px,100% - 48px)}.basis-full{flex-basis:100%}.origin-\\(--radix-popover-content-transform-origin\\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\\(--radix-select-content-transform-origin\\){transform-origin:var(--radix-select-content-transform-origin)}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-6{--tw-translate-x:calc(var(--spacing) * -6);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-12{--tw-translate-x:calc(var(--spacing) * -12);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-0\\.5{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[fadeIn_0\\.3s_forwards\\]{animation:.3s forwards fadeIn}.animate-\\[slide-in-up_0\\.2s_ease-out\\]{animation:.2s ease-out slide-in-up}.animate-\\[typing_1\\.2s_ease-in-out_infinite\\]{animation:1.2s ease-in-out infinite typing}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.scroll-my-1{scroll-margin-block:var(--spacing)}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]{scrollbar-color:#00000026 transparent}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-\\[36px_16px_36px\\]{grid-template-columns:36px 16px 36px}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-12{gap:calc(var(--spacing) * 12)}.gap-\\[2px\\]{gap:2px}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-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)))}: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)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\(--moveo-border-radius-base\\){border-radius:var(--moveo-border-radius-base)}.rounded-\\(--moveo-new-border-radius-base\\){border-radius:var(--moveo-new-border-radius-base)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--moveo-border-radius-base\\)\\]{border-radius:var(--moveo-border-radius-base)}.rounded-\\[var\\(--moveo-new-border-radius-base\\)\\]{border-radius:var(--moveo-new-border-radius-base)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200\\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab, red, red)){.border-emerald-200\\/60{border-color:color-mix(in oklab, var(--color-emerald-200) 60%, transparent)}}.border-emerald-500\\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\\/20{border-color:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-700{border-color:var(--color-gray-700)}.border-rose-200\\/60{border-color:#ffccd399}@supports (color:color-mix(in lab, red, red)){.border-rose-200\\/60{border-color:color-mix(in oklab, var(--color-rose-200) 60%, transparent)}}.border-sky-200\\/60{border-color:#b8e6fe99}@supports (color:color-mix(in lab, red, red)){.border-sky-200\\/60{border-color:color-mix(in oklab, var(--color-sky-200) 60%, transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-t-rose-400\\/60{border-top-color:#ff667f99}@supports (color:color-mix(in lab, red, red)){.border-t-rose-400\\/60{border-top-color:color-mix(in oklab, var(--color-rose-400) 60%, transparent)}}.border-t-sky-400\\/60{border-top-color:#00bcfe99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-400\\/60{border-top-color:color-mix(in oklab, var(--color-sky-400) 60%, transparent)}}.border-t-sky-500\\/60{border-top-color:#00a5ef99}@supports (color:color-mix(in lab, red, red)){.border-t-sky-500\\/60{border-top-color:color-mix(in oklab, var(--color-sky-500) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-r-rose-300\\/30{border-right-color:#ffa2ae4d}@supports (color:color-mix(in lab, red, red)){.border-r-rose-300\\/30{border-right-color:color-mix(in oklab, var(--color-rose-300) 30%, transparent)}}.border-r-sky-300\\/30{border-right-color:#77d4ff4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-300\\/30{border-right-color:color-mix(in oklab, var(--color-sky-300) 30%, transparent)}}.border-r-sky-400\\/30{border-right-color:#00bcfe4d}@supports (color:color-mix(in lab, red, red)){.border-r-sky-400\\/30{border-right-color:color-mix(in oklab, var(--color-sky-400) 30%, transparent)}}.border-b-transparent{border-bottom-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){background-color:var(--color-launcher-background,var(--color-accent))}.bg-\\(--color-opening-message-background\\,var\\(--color-accent\\)\\){background-color:var(--color-opening-message-background,var(--color-accent))}.bg-\\(--color-rating-background\\){background-color:var(--color-rating-background)}.bg-\\[var\\(--background\\)\\]{background-color:var(--background)}.bg-\\[var\\(--moveo-header-background\\)\\]{background-color:var(--moveo-header-background)}.bg-\\[var\\(--moveo-header-background\\,var\\(--color-accent\\)\\)\\]{background-color:var(--moveo-header-background,var(--color-accent))}.bg-\\[var\\(--nbg-bg\\)\\]{background-color:var(--nbg-bg)}.bg-\\[var\\(--text-03\\)\\]{background-color:var(--text-03)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-100\\/90{background-color:#fef3c6e6}@supports (color:color-mix(in lab, red, red)){.bg-amber-100\\/90{background-color:color-mix(in oklab, var(--color-amber-100) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-emerald-50\\/80{background-color:#ecfdf5cc}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/80{background-color:color-mix(in oklab, var(--color-emerald-50) 80%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-50\\/80{background-color:#fff1f2cc}@supports (color:color-mix(in lab, red, red)){.bg-rose-50\\/80{background-color:color-mix(in oklab, var(--color-rose-50) 80%, transparent)}}.bg-sky-50\\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab, red, red)){.bg-sky-50\\/80{background-color:color-mix(in oklab, var(--color-sky-50) 80%, transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab, red, red)){.bg-white\\/80{background-color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-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))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-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))}.to-white{--tw-gradient-to: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))}.bg-contain{background-size:contain}.bg-right{background-position:100%}.bg-no-repeat{background-repeat:no-repeat}.fill-\\(--color-launcher-background\\,var\\(--color-accent\\)\\){fill:var(--color-launcher-background,var(--color-accent))}.fill-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){fill:var(--color-launcher-foreground,var(--color-background))}.fill-sky-600{fill:var(--color-sky-600)}.fill-white{fill:var(--color-white)}.stroke-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){stroke:var(--color-launcher-foreground,var(--color-background))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-\\[10\\%\\]{padding:10%}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-\\[var\\(--moveo-new-header-height\\)\\]{padding-top:var(--moveo-new-header-height)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-0{padding-bottom:0}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-14{padding-bottom:calc(var(--spacing) * 14)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pb-\\[40px\\]{padding-bottom:40px}.pl-0{padding-left:0}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.text-\\[10px\\]{font-size:10px}.text-\\[42px\\]{font-size:42px}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-8{--tw-leading:calc(var(--spacing) * 8);line-height:calc(var(--spacing) * 8)}.leading-\\[30px\\]{--tw-leading:30px;line-height:30px}.leading-\\[51px\\]{--tw-leading:51px;line-height:51px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.25em\\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words,.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.text-\\(--color-launcher-foreground\\,var\\(--color-background\\)\\){color:var(--color-launcher-foreground,var(--color-background))}.text-\\(--color-link\\){color:var(--color-link)}.text-\\(--color-opening-message-foreground\\,var\\(--color-text-primary-foreground\\)\\){color:var(--color-opening-message-foreground,var(--color-text-primary-foreground))}.text-\\(--color-send-icon\\){color:var(--color-send-icon)}.text-\\[var\\(--color-link\\)\\]{color:var(--color-link)}.text-\\[var\\(--moveo-accent-color\\)\\]{color:var(--moveo-accent-color)}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-accent\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-accent))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-element-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-element-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-foreground))}.text-\\[var\\(--moveo-header-text-color\\,var\\(--color-text-primary-foreground\\)\\)\\]{color:var(--moveo-header-text-color,var(--color-text-primary-foreground))}.text-\\[var\\(--moveo-header-text-color\\,white\\)\\]{color:var(--moveo-header-text-color,white)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-current{color:currentColor}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-600{color:var(--color-gray-600)}.text-gray-800{color:var(--color-gray-800)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-30{opacity:.3}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(14\\,165\\,233\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0ea5e91f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(16\\,185\\,129\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(244\\,63\\,94\\,0\\.12\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#f43f5e1f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_4px_14px_rgba\\(16\\,185\\,129\\,0\\.25\\)\\]{--tw-shadow:0 4px 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[2px_3px_6px_rgb\\(104_104_104\\/10\\%\\)\\]{--tw-shadow:2px 3px 6px var(--tw-shadow-color,#6868681a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[var\\(--moveo-shadow-bubble\\)\\]{--tw-shadow:var(--moveo-shadow-bubble);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.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)}.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)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--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)}.shadow-amber-200\\/70{--tw-shadow-color:#fee685b3}@supports (color:color-mix(in lab, red, red)){.shadow-amber-200\\/70{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber-200) 70%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-300{--tw-ring-color:var(--color-amber-300)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.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,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);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-blur-\\[20px\\]{--tw-backdrop-blur:blur(20px);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-blur-md{--tw-backdrop-blur:blur(var(--blur-md));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-saturate-150{--tw-backdrop-saturate:saturate(150%);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,)}.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,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-500{transition-delay:.5s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[animation-delay\\:0\\.2s\\]{animation-delay:.2s}.\\[animation-delay\\:0\\.4s\\]{animation-delay:.4s}.\\[animation-delay\\:0s\\]{animation-delay:0s}.\\[animation-fill-mode\\:forwards\\]{animation-fill-mode:forwards}@media (hover:hover){.group-hover\\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}@media (hover:hover){.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)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.05\\]:hover{scale:1.05}.hover\\:border-red-500\\/20:hover{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.hover\\:border-red-500\\/20:hover{border-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.hover\\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\\:bg-gray-700\\/50:hover{background-color:#36415380}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-gray-700\\/50:hover{background-color:color-mix(in oklab, var(--color-gray-700) 50%, transparent)}}.hover\\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:bg-gradient-to-br:hover{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.hover\\:from-red-500:hover{--tw-gradient-from:var(--color-red-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))}.hover\\:to-red-600:hover{--tw-gradient-to:var(--color-red-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))}.hover\\:text-\\[var\\(--color-accent\\)\\]:hover{color:var(--color-accent)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:shadow-\\[0_6px_20px_rgba\\(16\\,185\\,129\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#10b98159);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-\\[0_6px_20px_rgba\\(239\\,68\\,68\\,0\\.35\\)\\]:hover{--tw-shadow:0 6px 20px var(--tw-shadow-color,#ef444459);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-lg:hover{--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)}.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)}.hover\\:shadow-sm:hover{--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)}.hover\\:brightness-\\[0\\.92\\]:hover{--tw-brightness:brightness(.92);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,)}.hover\\:backdrop-blur-sm:hover{--tw-backdrop-blur:blur(var(--blur-sm));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,)}}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[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)}.focus-visible\\:ring-amber-400:focus-visible{--tw-ring-color:var(--color-amber-400)}.focus-visible\\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-sky-400)}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--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)}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--color-white)}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.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)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[placeholder\\]\\:text-sm[data-placeholder]{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.data-\\[placeholder\\]\\:leading-5[data-placeholder]{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.data-\\[placeholder\\]\\:font-normal[data-placeholder]{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.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)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.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)}: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}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:text-left{text-align:left}.sm\\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (min-width:48rem){.md\\:max-h-\\[70vh\\]{max-height:70vh}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:items-start{align-items:flex-start}.md\\:px-12{padding-inline:calc(var(--spacing) * 12)}.md\\:pb-16{padding-bottom:calc(var(--spacing) * 16)}.md\\:text-left{text-align:left}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:64rem){.lg\\:gap-16{gap:calc(var(--spacing) * 16)}}.dark\\:border-emerald-500\\/30:is(.dark *){border-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-emerald-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.dark\\:border-rose-500\\/30:is(.dark *){border-color:#ff23574d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-rose-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-rose-500) 30%, transparent)}}.dark\\:border-sky-500\\/30:is(.dark *){border-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:border-sky-500\\/30:is(.dark *){border-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:border-slate-700\\/50:is(.dark *){border-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:border-slate-700\\/50:is(.dark *){border-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-amber-500\\/15:is(.dark *){background-color:#f99c0026}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 15%, transparent)}}.dark\\:bg-amber-500\\/20:is(.dark *){background-color:#f99c0033}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.dark\\:bg-rose-500\\/15:is(.dark *){background-color:#ff235726}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-rose-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-rose-500) 15%, transparent)}}.dark\\:bg-sky-500\\/15:is(.dark *){background-color:#00a5ef26}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/15:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 15%, transparent)}}.dark\\:bg-sky-500\\/20:is(.dark *){background-color:#00a5ef33}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-sky-500\\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-sky-500) 20%, transparent)}}.dark\\:bg-slate-700\\/50:is(.dark *){background-color:#31415880}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-700\\/50:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-700) 50%, transparent)}}.dark\\:bg-slate-900\\/80:is(.dark *){background-color:#0f172bcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-slate-900\\/80:is(.dark *){background-color:color-mix(in oklab, var(--color-slate-900) 80%, transparent)}}.dark\\:from-emerald-600:is(.dark *){--tw-gradient-from:var(--color-emerald-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))}.dark\\:to-emerald-700:is(.dark *){--tw-gradient-to:var(--color-emerald-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))}.dark\\:to-slate-950:is(.dark *){--tw-gradient-to:var(--color-slate-950);--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))}.dark\\:fill-sky-300:is(.dark *){fill:var(--color-sky-300)}.dark\\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\\:text-slate-100:is(.dark *){color:var(--color-slate-100)}.dark\\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\\:text-slate-300:is(.dark *){color:var(--color-slate-300)}.dark\\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\\:shadow-xl:is(.dark *){--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)}.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:#0206184d}@supports (color:color-mix(in lab, red, red)){.dark\\:shadow-slate-950\\/30:is(.dark *){--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-950) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:#fcbb0066}@supports (color:color-mix(in lab, red, red)){.dark\\:ring-amber-400\\/40:is(.dark *){--tw-ring-color:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}@media (hover:hover){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-amber-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:#ff235740}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-rose-500\\/25:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-rose-500) 25%, transparent)}}.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:#00a5ef4d}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-sky-500\\/30:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-sky-500) 30%, transparent)}}.dark\\:hover\\:bg-slate-700:is(.dark *):hover{background-color:var(--color-slate-700)}.dark\\:hover\\:from-red-600:is(.dark *):hover{--tw-gradient-from:var(--color-red-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))}.dark\\:hover\\:to-red-700:is(.dark *):hover{--tw-gradient-to:var(--color-red-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))}}.dark\\:focus-visible\\:ring-offset-slate-950:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.\\[\\&_a\\]\\:cursor-pointer a{cursor:pointer}.\\[\\&_a\\:hover\\]\\:underline a:hover{text-decoration-line:underline}.\\[\\&_a\\>\\*\\]\\:pointer-events-none a>*{pointer-events:none}.\\[\\&_p\\]\\:max-w-md p{max-width:var(--container-md)}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&_svg\\]\\:h-6 svg{height:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:w-6 svg{width:calc(var(--spacing) * 6)}.\\[\\&_svg\\]\\:flex-shrink-0 svg,.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\'size-\\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}\n',""]);const s=a;n.d(t,["A",0,s])},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,i,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);i&&a[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),n&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=n):d[2]=n),r&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=r):d[4]="".concat(r)),t.push(d))}},t}},1601(e){"use strict";e.exports=function(e){return e[1]}},7833(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(r=i))}),t.splice(r,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(736)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736(e,t,n){e.exports=function(e){function t(e){let n,r,o,a=null;function s(...e){if(!s.enabled)return;const i=s,r=Number(new Date),o=r-(n||r);i.diff=o,i.prev=n,i.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,r)=>{if("%%"===n)return"%";a++;const o=t.formatters[r];if("function"==typeof o){const t=e[a];n=o.call(i,t),e.splice(a,1),a--}return n}),t.formatArgs.call(i,e),(i.log||t.log).apply(i,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=i,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(r!==t.namespaces&&(r=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function i(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function r(e,t){let n=0,i=0,r=-1,o=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(r=i,o=n,i++):(n++,i++);else{if(-1===r)return!1;i=r+1,o++,n=o}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=n(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},6585(e){var t=1e3,n=60*t,i=60*n,r=24*i,o=7*r;function a(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}e.exports=function(e,s){s=s||{};var l,c,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(a){var s=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return s*o;case"days":case"day":case"d":return s*r;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===d&&isFinite(e))return s.long?(l=e,(c=Math.abs(l))>=r?a(l,c,r,"day"):c>=i?a(l,c,i,"hour"):c>=n?a(l,c,n,"minute"):c>=t?a(l,c,t,"second"):l+" ms"):function(e){var o=Math.abs(e);return o>=r?Math.round(e/r)+"d":o>=i?Math.round(e/i)+"h":o>=n?Math.round(e/n)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},1247(e,t,n){"use strict";var i=n(9982),r=n(6540),o=n(961);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function l(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function c(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function d(e){if(s(e)!==e)throw Error(a(188))}function u(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=u(e)))return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),f=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy");Symbol.for("react.scope");var E=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var I=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var T=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=T&&e[T]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function A(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case _:return"Suspense";case S:return"SuspenseList";case E:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case w:return e.displayName||"Context";case y:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case x:return null!==(t=e.displayName||null)?t:A(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return A(e(t))}catch(e){}}return null}var N=Array.isArray,L=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},M=[],F=-1;function j(e){return{current:e}}function U(e){0>F||(e.current=M[F],M[F]=null,F--)}function $(e,t){F++,M[F]=e.current,e.current=t}var z,B,H=j(null),W=j(null),V=j(null),G=j(null);function q(e,t){switch($(V,t),$(W,e),$(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mu(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=vu(t=mu(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(H),$(H,e)}function K(){U(H),U(W),U(V)}function Y(e){null!==e.memoizedState&&$(G,e);var t=H.current,n=vu(t,e.type);t!==n&&($(W,e),$(H,n))}function Q(e){W.current===e&&(U(H),U(W)),G.current===e&&(U(G),ch._currentValue=P)}function J(e){if(void 0===z)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||"",B=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+z+e+B}var X=!1;function Z(e,t){if(!e||X)return"";X=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var i=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){i=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){i=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&i&&"string"==typeof e.stack)return[e.stack,i.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=i.DetermineComponentFrameRoot(),a=o[0],s=o[1];if(a&&s){var l=a.split("\n"),c=s.split("\n");for(r=i=0;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(i===l.length||r===c.length)for(i=l.length-1,r=c.length-1;1<=i&&0<=r&&l[i]!==c[r];)r--;for(;1<=i&&0<=r;i--,r--)if(l[i]!==c[r]){if(1!==i||1!==r)do{if(i--,0>--r||l[i]!==c[r]){var d="\n"+l[i].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}}while(1<=i&&0<=r);break}}}finally{X=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function ee(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return Z(e.type,!1);case 11:return Z(e.type.render,!1);case 1:return Z(e.type,!0);case 31:return J("Activity");default:return""}}function te(e){try{var t="",n=null;do{t+=ee(e,n),n=e,e=e.return}while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var ne=Object.prototype.hasOwnProperty,ie=i.unstable_scheduleCallback,re=i.unstable_cancelCallback,oe=i.unstable_shouldYield,ae=i.unstable_requestPaint,se=i.unstable_now,le=i.unstable_getCurrentPriorityLevel,ce=i.unstable_ImmediatePriority,de=i.unstable_UserBlockingPriority,ue=i.unstable_NormalPriority,he=i.unstable_LowPriority,pe=i.unstable_IdlePriority,fe=i.log,ge=i.unstable_setDisableYieldValue,me=null,ve=null;function be(e){if("function"==typeof fe&&ge(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(me,e)}catch(e){}}var ye=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2,_e=256,Se=262144,xe=4194304;function Ce(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ee(e,t,n){var i=e.pendingLanes;if(0===i)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var s=134217727&i;return 0!==s?0!==(i=s&~o)?r=Ce(i):0!==(a&=s)?r=Ce(a):n||0!==(n=s&~e)&&(r=Ce(n)):0!==(s=i&~o)?r=Ce(s):0!==a?r=Ce(a):n||0!==(n=i&~e)&&(r=Ce(n)),0===r?0:0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(n=t&-t)||32===o&&4194048&n)?t:r}function Ie(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Te(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Re(){var e=xe;return!(62914560&(xe<<=1))&&(xe=4194304),e}function Oe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ae(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ne(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-ye(t);e.entangledLanes|=t,e.entanglements[i]=1073741824|e.entanglements[i]|261930&n}function Le(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-ye(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}function De(e,t){var n=t&-t;return 0!==((n=42&n?1:Pe(n))&(e.suspendedLanes|t))?0:n}function Pe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Me(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Fe(){var e=D.p;return 0!==e?e:void 0===(e=window.event)?32:Sh(e.type)}function je(e,t){var n=D.p;try{return D.p=e,t()}finally{D.p=n}}var Ue=Math.random().toString(36).slice(2),$e="__reactFiber$"+Ue,ze="__reactProps$"+Ue,Be="__reactContainer$"+Ue,He="__reactEvents$"+Ue,We="__reactListeners$"+Ue,Ve="__reactHandles$"+Ue,Ge="__reactResources$"+Ue,qe="__reactMarker$"+Ue;function Ke(e){delete e[$e],delete e[ze],delete e[He],delete e[We],delete e[Ve]}function Ye(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Be]||n[$e]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Pu(e);null!==e;){if(n=e[$e])return n;e=Pu(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[$e]||e[Be]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function Xe(e){var t=e[Ge];return t||(t=e[Ge]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[qe]=!0}var et=new Set,tt={};function nt(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(tt[e]=t,e=0;e<t.length;e++)et.add(t[e])}var rt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ot={},at={};function st(e,t,n){if(r=t,ne.call(at,r)||!ne.call(ot,r)&&(rt.test(r)?at[r]=!0:(ot[r]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var i=t.toLowerCase().slice(0,5);if("data-"!==i&&"aria-"!==i)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var r}function lt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ct(e,t,n,i){if(null===i)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+i)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ut(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){if(!e._valueTracker){var t=ut(e)?"checked":"value";e._valueTracker=function(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==i&&"function"==typeof i.get&&"function"==typeof i.set){var r=i.get,o=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){n=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=ut(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function ft(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var gt=/[\n"\\]/g;function mt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,i,r,o,a,s){e.name="",null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a?e.type=a:e.removeAttribute("type"),null!=t?"number"===a?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==a&&"reset"!==a||e.removeAttribute("value"),null!=t?yt(e,a,dt(t)):null!=n?yt(e,a,dt(n)):null!=i&&e.removeAttribute("value"),null==r&&null!=o&&(e.defaultChecked=!!o),null!=r&&(e.checked=r&&"function"!=typeof r&&"symbol"!=typeof r),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function bt(e,t,n,i,r,o,a,s){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return void ht(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}i="function"!=typeof(i=null!=i?i:r)&&"symbol"!=typeof i&&!!i,e.checked=s?e.checked:!!i,e.defaultChecked=!!i,null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.name=a),ht(e)}function yt(e,t,n){"number"===t&&ft(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function _t(e,t,n,i){if(null==t){if(null!=i){if(null!=n)throw Error(a(92));if(N(i)){if(1<i.length)throw Error(a(93));i=i[0]}n=i}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(i=e.textContent)===n&&""!==i&&null!==i&&(e.value=i),ht(e)}function St(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var xt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ct(e,t,n){var i=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?i?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":i?e.setProperty(t,n):"number"!=typeof n||0===n||xt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Et(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(a(62));if(e=e.style,null!=n){for(var i in n)!n.hasOwnProperty(i)||null!=t&&t.hasOwnProperty(i)||(0===i.indexOf("--")?e.setProperty(i,""):"float"===i?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&n[r]!==i&&Ct(e,r,i)}else for(var o in t)t.hasOwnProperty(o)&&Ct(e,o,t[o])}function It(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Rt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ot(e){return Rt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function At(){}var Nt=null;function Lt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Dt=null,Pt=null;function Mt(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[ze]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+mt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=i[ze]||null;if(!r)throw Error(a(90));vt(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)(i=n[t]).form===e.form&&pt(i)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var Ft=!1;function jt(e,t,n){if(Ft)return e(t,n);Ft=!0;try{return e(t)}finally{if(Ft=!1,(null!==Dt||null!==Pt)&&(Xc(),Dt&&(t=Dt,e=Pt,Pt=Dt=null,Mt(t),e)))for(t=0;t<e.length;t++)Mt(e[t])}}function Ut(e,t){var n=e.stateNode;if(null===n)return null;var i=n[ze]||null;if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var $t=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),zt=!1;if($t)try{var Bt={};Object.defineProperty(Bt,"passive",{get:function(){zt=!0}}),window.addEventListener("test",Bt,Bt),window.removeEventListener("test",Bt,Bt)}catch(e){zt=!1}var Ht=null,Wt=null,Vt=null;function Gt(){if(Vt)return Vt;var e,t,n=Wt,i=n.length,r="value"in Ht?Ht.value:Ht.textContent,o=r.length;for(e=0;e<i&&n[e]===r[e];e++);var a=i-e;for(t=1;t<=a&&n[i-t]===r[o-t];t++);return Vt=r.slice(e,1<t?1-t:void 0)}function qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Kt(){return!0}function Yt(){return!1}function Qt(e){function t(t,n,i,r,o){for(var a in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(r):r[a]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?Kt:Yt,this.isPropagationStopped=Yt,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Kt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Kt)},persist:function(){},isPersistent:Kt}),t}var Jt,Xt,Zt,en={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tn=Qt(en),nn=h({},en,{view:0,detail:0}),rn=Qt(nn),on=h({},nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zt&&(Zt&&"mousemove"===e.type?(Jt=e.screenX-Zt.screenX,Xt=e.screenY-Zt.screenY):Xt=Jt=0,Zt=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Xt}}),an=Qt(on),sn=Qt(h({},on,{dataTransfer:0})),ln=Qt(h({},nn,{relatedTarget:0})),cn=Qt(h({},en,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Qt(h({},en,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),un=Qt(h({},en,{data:0})),hn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=fn[e])&&!!t[e]}function mn(){return gn}var vn=Qt(h({},nn,{key:function(e){if(e.key){var t=hn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mn,charCode:function(e){return"keypress"===e.type?qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Qt(h({},on,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yn=Qt(h({},nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mn})),wn=Qt(h({},en,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=Qt(h({},on,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),_n=Qt(h({},en,{newState:0,oldState:0})),Sn=[9,13,27,32],xn=$t&&"CompositionEvent"in window,Cn=null;$t&&"documentMode"in document&&(Cn=document.documentMode);var En=$t&&"TextEvent"in window&&!Cn,In=$t&&(!xn||Cn&&8<Cn&&11>=Cn),Tn=String.fromCharCode(32),Rn=!1;function On(e,t){switch(e){case"keyup":return-1!==Sn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function An(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Nn=!1,Ln={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Dn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ln[e.type]:"textarea"===t}function Pn(e,t,n,i){Dt?Pt?Pt.push(i):Pt=[i]:Dt=i,0<(t=nu(t,"onChange")).length&&(n=new tn("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Mn=null,Fn=null;function jn(e){Kd(e,0)}function Un(e){if(pt(Je(e)))return e}function $n(e,t){if("change"===e)return t}var zn=!1;if($t){var Bn;if($t){var Hn="oninput"in document;if(!Hn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Hn="function"==typeof Wn.oninput}Bn=Hn}else Bn=!1;zn=Bn&&(!document.documentMode||9<document.documentMode)}function Vn(){Mn&&(Mn.detachEvent("onpropertychange",Gn),Fn=Mn=null)}function Gn(e){if("value"===e.propertyName&&Un(Fn)){var t=[];Pn(t,Fn,e,Lt(e)),jt(jn,t)}}function qn(e,t,n){"focusin"===e?(Vn(),Fn=n,(Mn=t).attachEvent("onpropertychange",Gn)):"focusout"===e&&Vn()}function Kn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Un(Fn)}function Yn(e,t){if("click"===e)return Un(t)}function Qn(e,t){if("input"===e||"change"===e)return Un(t)}var Jn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Xn(e,t){if(Jn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!ne.call(t,r)||!Jn(e[r],t[r]))return!1}return!0}function Zn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ei(e,t){var n,i=Zn(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Zn(i)}}function ti(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?ti(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ni(e){for(var t=ft((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=ft((e=t.contentWindow).document)}return t}function ii(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var ri=$t&&"documentMode"in document&&11>=document.documentMode,oi=null,ai=null,si=null,li=!1;function ci(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;li||null==oi||oi!==ft(i)||(i="selectionStart"in(i=oi)&&ii(i)?{start:i.selectionStart,end:i.selectionEnd}:{anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},si&&Xn(si,i)||(si=i,0<(i=nu(ai,"onSelect")).length&&(t=new tn("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=oi)))}function di(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ui={animationend:di("Animation","AnimationEnd"),animationiteration:di("Animation","AnimationIteration"),animationstart:di("Animation","AnimationStart"),transitionrun:di("Transition","TransitionRun"),transitionstart:di("Transition","TransitionStart"),transitioncancel:di("Transition","TransitionCancel"),transitionend:di("Transition","TransitionEnd")},hi={},pi={};function fi(e){if(hi[e])return hi[e];if(!ui[e])return e;var t,n=ui[e];for(t in n)if(n.hasOwnProperty(t)&&t in pi)return hi[e]=n[t];return e}$t&&(pi=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);var gi=fi("animationend"),mi=fi("animationiteration"),vi=fi("animationstart"),bi=fi("transitionrun"),yi=fi("transitionstart"),wi=fi("transitioncancel"),ki=fi("transitionend"),_i=new Map,Si="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function xi(e,t){_i.set(e,t),nt(t,[e])}Si.push("scrollEnd");var Ci="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Ei=[],Ii=0,Ti=0;function Ri(){for(var e=Ii,t=Ti=Ii=0;t<e;){var n=Ei[t];Ei[t++]=null;var i=Ei[t];Ei[t++]=null;var r=Ei[t];Ei[t++]=null;var o=Ei[t];if(Ei[t++]=null,null!==i&&null!==r){var a=i.pending;null===a?r.next=r:(r.next=a.next,a.next=r),i.pending=r}0!==o&&Li(n,r,o)}}function Oi(e,t,n,i){Ei[Ii++]=e,Ei[Ii++]=t,Ei[Ii++]=n,Ei[Ii++]=i,Ti|=i,e.lanes|=i,null!==(e=e.alternate)&&(e.lanes|=i)}function Ai(e,t,n,i){return Oi(e,t,n,i),Di(e)}function Ni(e,t){return Oi(e,null,null,t),Di(e)}function Li(e,t,n){e.lanes|=n;var i=e.alternate;null!==i&&(i.lanes|=n);for(var r=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(i=o.alternate)&&(i.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(r=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,r&&null!==t&&(r=31-ye(n),null===(i=(e=o.hiddenUpdates)[r])?e[r]=[t]:i.push(t),t.lane=536870912|n),o):null}function Di(e){if(50<Hc)throw Hc=0,Wc=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Pi={};function Mi(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(e,t,n,i){return new Mi(e,t,n,i)}function ji(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ui(e,t){var n=e.alternate;return null===n?((n=Fi(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function $i(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function zi(e,t,n,i,r,o){var s=0;if(i=e,"function"==typeof e)ji(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case E:return(e=Fi(31,n,t,r)).elementType=E,e.lanes=o,e;case m:return Bi(n.children,r,o,t);case v:s=8,r|=24;break;case b:return(e=Fi(12,n,t,2|r)).elementType=b,e.lanes=o,e;case _:return(e=Fi(13,n,t,r)).elementType=_,e.lanes=o,e;case S:return(e=Fi(19,n,t,r)).elementType=S,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:s=10;break e;case y:s=9;break e;case k:s=11;break e;case x:s=14;break e;case C:s=16,i=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),i=null}return(t=Fi(s,n,t,r)).elementType=e,t.type=i,t.lanes=o,t}function Bi(e,t,n,i){return(e=Fi(7,e,i,t)).lanes=n,e}function Hi(e,t,n){return(e=Fi(6,e,null,t)).lanes=n,e}function Wi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return(t=Fi(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gi=new WeakMap;function qi(e,t){if("object"==typeof e&&null!==e){var n=Gi.get(e);return void 0!==n?n:(t={value:e,source:t,stack:te(t)},Gi.set(e,t),t)}return{value:e,source:t,stack:te(t)}}var Ki=[],Yi=0,Qi=null,Ji=0,Xi=[],Zi=0,er=null,tr=1,nr="";function ir(e,t){Ki[Yi++]=Ji,Ki[Yi++]=Qi,Qi=e,Ji=t}function rr(e,t,n){Xi[Zi++]=tr,Xi[Zi++]=nr,Xi[Zi++]=er,er=e;var i=tr;e=nr;var r=32-ye(i)-1;i&=~(1<<r),n+=1;var o=32-ye(t)+r;if(30<o){var a=r-r%5;o=(i&(1<<a)-1).toString(32),i>>=a,r-=a,tr=1<<32-ye(t)+r|n<<r|i,nr=o+e}else tr=1<<o|n<<r|i,nr=e}function or(e){null!==e.return&&(ir(e,1),rr(e,1,0))}function ar(e){for(;e===Qi;)Qi=Ki[--Yi],Ki[Yi]=null,Ji=Ki[--Yi],Ki[Yi]=null;for(;e===er;)er=Xi[--Zi],Xi[Zi]=null,nr=Xi[--Zi],Xi[Zi]=null,tr=Xi[--Zi],Xi[Zi]=null}function sr(e,t){Xi[Zi++]=tr,Xi[Zi++]=nr,Xi[Zi++]=er,tr=t.id,nr=t.overflow,er=e}var lr=null,cr=null,dr=!1,ur=null,hr=!1,pr=Error(a(519));function fr(e){throw wr(qi(Error(a(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),pr}function gr(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[$e]=e,t[ze]=i,n){case"dialog":Yd("cancel",t),Yd("close",t);break;case"iframe":case"object":case"embed":Yd("load",t);break;case"video":case"audio":for(n=0;n<Gd.length;n++)Yd(Gd[n],t);break;case"source":Yd("error",t);break;case"img":case"image":case"link":Yd("error",t),Yd("load",t);break;case"details":Yd("toggle",t);break;case"input":Yd("invalid",t),bt(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Yd("invalid",t);break;case"textarea":Yd("invalid",t),_t(t,i.value,i.defaultValue,i.children)}"string"!=typeof(n=i.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===i.suppressHydrationWarning||lu(t.textContent,n)?(null!=i.popover&&(Yd("beforetoggle",t),Yd("toggle",t)),null!=i.onScroll&&Yd("scroll",t),null!=i.onScrollEnd&&Yd("scrollend",t),null!=i.onClick&&(t.onclick=At),t=!0):t=!1,t||fr(e,!0)}function mr(e){for(lr=e.return;lr;)switch(lr.tag){case 5:case 31:case 13:return void(hr=!1);case 27:case 3:return void(hr=!0);default:lr=lr.return}}function vr(e){if(e!==lr)return!1;if(!dr)return mr(e),dr=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||bu(e.type,e.memoizedProps)),t=!t),t&&cr&&fr(e),mr(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));cr=Du(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));cr=Du(e)}else 27===n?(n=cr,Cu(e.type)?(e=Lu,Lu=null,cr=e):cr=n):cr=lr?Nu(e.stateNode.nextSibling):null;return!0}function br(){cr=lr=null,dr=!1}function yr(){var e=ur;return null!==e&&(null===Rc?Rc=e:Rc.push.apply(Rc,e),ur=null),e}function wr(e){null===ur?ur=[e]:ur.push(e)}var kr=j(null),_r=null,Sr=null;function xr(e,t,n){$(kr,t._currentValue),t._currentValue=n}function Cr(e){e._currentValue=kr.current,U(kr)}function Er(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Ir(e,t,n,i){var r=e.child;for(null!==r&&(r.return=e);null!==r;){var o=r.dependencies;if(null!==o){var s=r.child;o=o.firstContext;e:for(;null!==o;){var l=o;o=r;for(var c=0;c<t.length;c++)if(l.context===t[c]){o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Er(o.return,n,e),i||(s=null);break e}o=l.next}}else if(18===r.tag){if(null===(s=r.return))throw Error(a(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),Er(s,n,e),s=null}else s=r.child;if(null!==s)s.return=r;else for(s=r;null!==s;){if(s===e){s=null;break}if(null!==(r=s.sibling)){r.return=s.return,s=r;break}s=s.return}r=s}}function Tr(e,t,n,i){e=null;for(var r=t,o=!1;null!==r;){if(!o)if(524288&r.flags)o=!0;else if(262144&r.flags)break;if(10===r.tag){var s=r.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var l=r.type;Jn(r.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(r===G.current){if(null===(s=r.alternate))throw Error(a(387));s.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(null!==e?e.push(ch):e=[ch])}r=r.return}null!==e&&Ir(t,e,n,i),t.flags|=262144}function Rr(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Or(e){_r=e,Sr=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ar(e){return Lr(_r,e)}function Nr(e,t){return null===_r&&Or(e),Lr(e,t)}function Lr(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Sr){if(null===e)throw Error(a(308));Sr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Sr=Sr.next=t;return n}var Dr="undefined"!=typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Pr=i.unstable_scheduleCallback,Mr=i.unstable_NormalPriority,Fr={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jr(){return{controller:new Dr,data:new Map,refCount:0}}function Ur(e){e.refCount--,0===e.refCount&&Pr(Mr,function(){e.controller.abort()})}var $r=null,zr=0,Br=0,Hr=null;function Wr(){if(0===--zr&&null!==$r){null!==Hr&&(Hr.status="fulfilled");var e=$r;$r=null,Br=0,Hr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Vr=L.S;L.S=function(e,t){Nc=se(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===$r){var n=$r=[];zr=0,Br=zd(),Hr={status:"pending",value:void 0,then:function(e){n.push(e)}}}zr++,t.then(Wr,Wr)}(0,t),null!==Vr&&Vr(e,t)};var Gr=j(null);function qr(){var e=Gr.current;return null!==e?e:pc.pooledCache}function Kr(e,t){$(Gr,null===t?Gr.current:t.pool)}function Yr(){var e=qr();return null===e?null:{parent:Fr._currentValue,pool:e}}var Qr=Error(a(460)),Jr=Error(a(474)),Xr=Error(a(542)),Zr={then:function(){}};function eo(e){return"fulfilled"===(e=e.status)||"rejected"===e}function to(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(At,At),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw oo(e=t.reason),e;default:if("string"==typeof t.status)t.then(At,At);else{if(null!==(e=pc)&&100<e.shellSuspendCounter)throw Error(a(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw oo(e=t.reason),e}throw io=t,Qr}}function no(e){try{return(0,e._init)(e._payload)}catch(e){if(null!==e&&"object"==typeof e&&"function"==typeof e.then)throw io=e,Qr;throw e}}var io=null;function ro(){if(null===io)throw Error(a(459));var e=io;return io=null,e}function oo(e){if(e===Qr||e===Xr)throw Error(a(483))}var ao=null,so=0;function lo(e){var t=so;return so+=1,null===ao&&(ao=[]),to(ao,e,t)}function co(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function uo(e,t){if(t.$$typeof===p)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ho(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function r(e,t){return(e=Ui(e,t)).index=0,e.sibling=null,e}function o(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=67108866,n):i:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=Hi(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,i){var o=n.type;return o===m?u(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===C&&no(o)===t.type)?(co(t=r(t,n.props),n),t.return=e,t):(co(t=zi(n.type,n.key,n.props,null,e.mode,i),n),t.return=e,t)}function d(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Vi(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function u(e,t,n,i,o){return null===t||7!==t.tag?((t=Bi(n,e.mode,i,o)).return=e,t):((t=r(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Hi(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case f:return co(n=zi(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Vi(t,e.mode,n)).return=e,t;case C:return h(e,t=no(t),n)}if(N(t)||R(t))return(t=Bi(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return h(e,lo(t),n);if(t.$$typeof===w)return h(e,Nr(e,t),n);uo(e,t)}return null}function p(e,t,n,i){var r=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==r?null:l(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case f:return n.key===r?c(e,t,n,i):null;case g:return n.key===r?d(e,t,n,i):null;case C:return p(e,t,n=no(n),i)}if(N(n)||R(n))return null!==r?null:u(e,t,n,i,null);if("function"==typeof n.then)return p(e,t,lo(n),i);if(n.$$typeof===w)return p(e,t,Nr(e,n),i);uo(e,n)}return null}function v(e,t,n,i,r){if("string"==typeof i&&""!==i||"number"==typeof i||"bigint"==typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case f:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case g:return d(t,e=e.get(null===i.key?n:i.key)||null,i,r);case C:return v(e,t,n,i=no(i),r)}if(N(i)||R(i))return u(t,e=e.get(n)||null,i,r,null);if("function"==typeof i.then)return v(e,t,n,lo(i),r);if(i.$$typeof===w)return v(e,t,n,Nr(t,i),r);uo(t,i)}return null}function b(l,c,d,u){if("object"==typeof d&&null!==d&&d.type===m&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case f:e:{for(var y=d.key;null!==c;){if(c.key===y){if((y=d.type)===m){if(7===c.tag){n(l,c.sibling),(u=r(c,d.props.children)).return=l,l=u;break e}}else if(c.elementType===y||"object"==typeof y&&null!==y&&y.$$typeof===C&&no(y)===c.type){n(l,c.sibling),co(u=r(c,d.props),d),u.return=l,l=u;break e}n(l,c);break}t(l,c),c=c.sibling}d.type===m?((u=Bi(d.props.children,l.mode,u,d.key)).return=l,l=u):(co(u=zi(d.type,d.key,d.props,null,l.mode,u),d),u.return=l,l=u)}return s(l);case g:e:{for(y=d.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(l,c.sibling),(u=r(c,d.children||[])).return=l,l=u;break e}n(l,c);break}t(l,c),c=c.sibling}(u=Vi(d,l.mode,u)).return=l,l=u}return s(l);case C:return b(l,c,d=no(d),u)}if(N(d))return function(r,a,s,l){for(var c=null,d=null,u=a,f=a=0,g=null;null!==u&&f<s.length;f++){u.index>f?(g=u,u=null):g=u.sibling;var m=p(r,u,s[f],l);if(null===m){null===u&&(u=g);break}e&&u&&null===m.alternate&&t(r,u),a=o(m,a,f),null===d?c=m:d.sibling=m,d=m,u=g}if(f===s.length)return n(r,u),dr&&ir(r,f),c;if(null===u){for(;f<s.length;f++)null!==(u=h(r,s[f],l))&&(a=o(u,a,f),null===d?c=u:d.sibling=u,d=u);return dr&&ir(r,f),c}for(u=i(u);f<s.length;f++)null!==(g=v(u,r,f,s[f],l))&&(e&&null!==g.alternate&&u.delete(null===g.key?f:g.key),a=o(g,a,f),null===d?c=g:d.sibling=g,d=g);return e&&u.forEach(function(e){return t(r,e)}),dr&&ir(r,f),c}(l,c,d,u);if(R(d)){if("function"!=typeof(y=R(d)))throw Error(a(150));return function(r,s,l,c){if(null==l)throw Error(a(151));for(var d=null,u=null,f=s,g=s=0,m=null,b=l.next();null!==f&&!b.done;g++,b=l.next()){f.index>g?(m=f,f=null):m=f.sibling;var y=p(r,f,b.value,c);if(null===y){null===f&&(f=m);break}e&&f&&null===y.alternate&&t(r,f),s=o(y,s,g),null===u?d=y:u.sibling=y,u=y,f=m}if(b.done)return n(r,f),dr&&ir(r,g),d;if(null===f){for(;!b.done;g++,b=l.next())null!==(b=h(r,b.value,c))&&(s=o(b,s,g),null===u?d=b:u.sibling=b,u=b);return dr&&ir(r,g),d}for(f=i(f);!b.done;g++,b=l.next())null!==(b=v(f,r,g,b.value,c))&&(e&&null!==b.alternate&&f.delete(null===b.key?g:b.key),s=o(b,s,g),null===u?d=b:u.sibling=b,u=b);return e&&f.forEach(function(e){return t(r,e)}),dr&&ir(r,g),d}(l,c,d=y.call(d),u)}if("function"==typeof d.then)return b(l,c,lo(d),u);if(d.$$typeof===w)return b(l,c,Nr(l,d),u);uo(l,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==c&&6===c.tag?(n(l,c.sibling),(u=r(c,d)).return=l,l=u):(n(l,c),(u=Hi(d,l.mode,u)).return=l,l=u),s(l)):n(l,c)}return function(e,t,n,i){try{so=0;var r=b(e,t,n,i);return ao=null,r}catch(t){if(t===Qr||t===Xr)throw t;var o=Fi(29,t,null,e.mode);return o.lanes=i,o.return=e,o}}}var po=ho(!0),fo=ho(!1),go=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yo(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,2&hc){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Di(e),Li(e,null,n),t}return Oi(e,i,t,n),Di(e)}function wo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,Le(e,n)}}function ko(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?r=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?r=o=t:o=o.next=t}else r=o=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var _o=!1;function So(){if(_o&&null!==Hr)throw Hr}function xo(e,t,n,i){_o=!1;var r=e.updateQueue;go=!1;var o=r.firstBaseUpdate,a=r.lastBaseUpdate,s=r.shared.pending;if(null!==s){r.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var d=e.alternate;null!==d&&(s=(d=d.updateQueue).lastBaseUpdate)!==a&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l)}if(null!==o){var u=r.baseState;for(a=0,d=c=l=null,s=o;;){var p=-536870913&s.lane,f=p!==s.lane;if(f?(gc&p)===p:(i&p)===p){0!==p&&p===Br&&(_o=!0),null!==d&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var g=e,m=s;p=t;var v=n;switch(m.tag){case 1:if("function"==typeof(g=m.payload)){u=g.call(v,u,p);break e}u=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(p="function"==typeof(g=m.payload)?g.call(v,u,p):g))break e;u=h({},u,p);break e;case 2:go=!0}}null!==(p=s.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=r.callbacks)?r.callbacks=[p]:f.push(p))}else f={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=f,l=u):d=d.next=f,a|=p;if(null===(s=s.next)){if(null===(s=r.shared.pending))break;s=(f=s).next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}null===d&&(l=u),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=d,null===o&&(r.shared.lanes=0),Sc|=a,e.lanes=a,e.memoizedState=u}}function Co(e,t){if("function"!=typeof e)throw Error(a(191,e));e.call(t)}function Eo(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var Io=j(null),To=j(0);function Ro(e,t){$(To,e=kc),$(Io,t),kc=e|t.baseLanes}function Oo(){$(To,kc),$(Io,Io.current)}function Ao(){kc=To.current,U(Io),U(To)}var No=j(null),Lo=null;function Do(e){var t=e.alternate;$(Uo,1&Uo.current),$(No,e),null===Lo&&(null===t||null!==Io.current||null!==t.memoizedState)&&(Lo=e)}function Po(e){$(Uo,Uo.current),$(No,e),null===Lo&&(Lo=e)}function Mo(e){22===e.tag?($(Uo,Uo.current),$(No,e),null===Lo&&(Lo=e)):Fo()}function Fo(){$(Uo,Uo.current),$(No,No.current)}function jo(e){U(No),Lo===e&&(Lo=null),U(Uo)}var Uo=j(0);function $o(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ou(n)||Au(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zo=0,Bo=null,Ho=null,Wo=null,Vo=!1,Go=!1,qo=!1,Ko=0,Yo=0,Qo=null,Jo=0;function Xo(){throw Error(a(321))}function Zo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function ea(e,t,n,i,r,o){return zo=o,Bo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=null===e||null===e.memoizedState?gs:ms,qo=!1,o=n(i,r),qo=!1,Go&&(o=na(t,n,i,r)),ta(e),o}function ta(e){L.H=fs;var t=null!==Ho&&null!==Ho.next;if(zo=0,Wo=Ho=Bo=null,Vo=!1,Yo=0,Qo=null,t)throw Error(a(300));null===e||Ns||null!==(e=e.dependencies)&&Rr(e)&&(Ns=!0)}function na(e,t,n,i){Bo=e;var r=0;do{if(Go&&(Qo=null),Yo=0,Go=!1,25<=r)throw Error(a(301));if(r+=1,Wo=Ho=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}L.H=vs,o=t(n,i)}while(Go);return o}function ia(){var e=L.H,t=e.useState()[0];return t="function"==typeof t.then?ca(t):t,e=e.useState()[0],(null!==Ho?Ho.memoizedState:null)!==e&&(Bo.flags|=1024),t}function ra(){var e=0!==Ko;return Ko=0,e}function oa(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function aa(e){if(Vo){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Vo=!1}zo=0,Wo=Ho=Bo=null,Go=!1,Yo=Ko=0,Qo=null}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wo?Bo.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function la(){if(null===Ho){var e=Bo.alternate;e=null!==e?e.memoizedState:null}else e=Ho.next;var t=null===Wo?Bo.memoizedState:Wo.next;if(null!==t)Wo=t,Ho=e;else{if(null===e){if(null===Bo.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(Ho=e).memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},null===Wo?Bo.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function ca(e){var t=Yo;return Yo+=1,null===Qo&&(Qo=[]),e=to(Qo,e,t),t=Bo,null===(null===Wo?t.memoizedState:Wo.next)&&(t=t.alternate,L.H=null===t||null===t.memoizedState?gs:ms),e}function da(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ca(e);if(e.$$typeof===w)return Ar(e)}throw Error(a(438,String(e)))}function ua(e){var t=null,n=Bo.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var i=Bo.alternate;null!==i&&null!==(i=i.updateQueue)&&null!=(i=i.memoCache)&&(t={data:i.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Bo.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=I;return t.index++,n}function ha(e,t){return"function"==typeof t?t(e):t}function pa(e){return fa(la(),Ho,e)}function fa(e,t,n){var i=e.queue;if(null===i)throw Error(a(311));i.lastRenderedReducer=n;var r=e.baseQueue,o=i.pending;if(null!==o){if(null!==r){var s=r.next;r.next=o.next,o.next=s}t.baseQueue=r=o,i.pending=null}if(o=e.baseState,null===r)e.memoizedState=o;else{var l=s=null,c=null,d=t=r.next,u=!1;do{var h=-536870913&d.lane;if(h!==d.lane?(gc&h)===h:(zo&h)===h){var p=d.revertLane;if(0===p)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),h===Br&&(u=!0);else{if((zo&p)===p){d=d.next,p===Br&&(u=!0);continue}h={lane:0,revertLane:d.revertLane,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},null===c?(l=c=h,s=o):c=c.next=h,Bo.lanes|=p,Sc|=p}h=d.action,qo&&n(o,h),o=d.hasEagerState?d.eagerState:n(o,h)}else p={lane:h,revertLane:d.revertLane,gesture:d.gesture,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},null===c?(l=c=p,s=o):c=c.next=p,Bo.lanes|=h,Sc|=h;d=d.next}while(null!==d&&d!==t);if(null===c?s=o:c.next=l,!Jn(o,e.memoizedState)&&(Ns=!0,u&&null!==(n=Hr)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=c,i.lastRenderedState=o}return null===r&&(i.lanes=0),[e.memoizedState,i.dispatch]}function ga(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,o=t.memoizedState;if(null!==r){n.pending=null;var s=r=r.next;do{o=e(o,s.action),s=s.next}while(s!==r);Jn(o,t.memoizedState)||(Ns=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function ma(e,t,n){var i=Bo,r=la(),o=dr;if(o){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Jn((Ho||r).memoizedState,n);if(s&&(r.memoizedState=n,Ns=!0),r=r.queue,za(ya.bind(null,i,r,e),[e]),r.getSnapshot!==t||s||null!==Wo&&1&Wo.memoizedState.tag){if(i.flags|=2048,Ma(9,{destroy:void 0},ba.bind(null,i,r,n,t),null),null===pc)throw Error(a(349));o||127&zo||va(i,t,n)}return n}function va(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Bo.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Bo.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ba(e,t,n,i){t.value=n,t.getSnapshot=i,wa(t)&&ka(e)}function ya(e,t,n){return n(function(){wa(t)&&ka(e)})}function wa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(e){return!0}}function ka(e){var t=Ni(e,2);null!==t&&qc(t,0,2)}function _a(e){var t=sa();if("function"==typeof e){var n=e;if(e=n(),qo){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function Sa(e,t,n,i){return e.baseState=n,fa(e,Ho,"function"==typeof i?i:ha)}function xa(e,t,n,i,r){if(us(e))throw Error(a(485));if(null!==(e=t.action)){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==L.T?n(!0):o.isTransition=!1,i(o),null===(n=t.pending)?(o.next=t.pending=o,Ca(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ca(e,t){var n=t.action,i=t.payload,r=e.state;if(t.isTransition){var o=L.T,a={};L.T=a;try{var s=n(r,i),l=L.S;null!==l&&l(a,s),Ea(e,t,s)}catch(n){Ta(e,t,n)}finally{null!==o&&null!==a.types&&(o.types=a.types),L.T=o}}else try{Ea(e,t,o=n(r,i))}catch(n){Ta(e,t,n)}}function Ea(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ia(e,t,n)},function(n){return Ta(e,t,n)}):Ia(e,t,n)}function Ia(e,t,n){t.status="fulfilled",t.value=n,Ra(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ca(e,n)))}function Ta(e,t,n){var i=e.pending;if(e.pending=null,null!==i){i=i.next;do{t.status="rejected",t.reason=n,Ra(t),t=t.next}while(t!==i)}e.action=null}function Ra(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Oa(e,t){return t}function Aa(e,t){if(dr){var n=pc.formState;if(null!==n){e:{var i=Bo;if(dr){if(cr){t:{for(var r=cr,o=hr;8!==r.nodeType;){if(!o){r=null;break t}if(null===(r=Nu(r.nextSibling))){r=null;break t}}r="F!"===(o=r.data)||"F"===o?r:null}if(r){cr=Nu(r.nextSibling),i="F!"===r.data;break e}}fr(i)}i=!1}i&&(t=n[0])}}return(n=sa()).memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:t},n.queue=i,n=ls.bind(null,Bo,i),i.dispatch=n,i=_a(!1),o=ds.bind(null,Bo,!1,i.queue),r={state:t,dispatch:null,action:e,pending:null},(i=sa()).queue=r,n=xa.bind(null,Bo,r,o,n),r.dispatch=n,i.memoizedState=e,[t,n,!1]}function Na(e){return La(la(),Ho,e)}function La(e,t,n){if(t=fa(e,t,Oa)[0],e=pa(ha)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var i=ca(t)}catch(e){if(e===Qr)throw Xr;throw e}else i=t;var r=(t=la()).queue,o=r.dispatch;return n!==t.memoizedState&&(Bo.flags|=2048,Ma(9,{destroy:void 0},Da.bind(null,r,n),null)),[i,o,e]}function Da(e,t){e.action=t}function Pa(e){var t=la(),n=Ho;if(null!==n)return La(t,n,e);la(),t=t.memoizedState;var i=(n=la()).queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Ma(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},null===(t=Bo.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Bo.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Fa(){return la().memoizedState}function ja(e,t,n,i){var r=sa();Bo.flags|=e,r.memoizedState=Ma(1|t,{destroy:void 0},n,void 0===i?null:i)}function Ua(e,t,n,i){var r=la();i=void 0===i?null:i;var o=r.memoizedState.inst;null!==Ho&&null!==i&&Zo(i,Ho.memoizedState.deps)?r.memoizedState=Ma(t,o,n,i):(Bo.flags|=e,r.memoizedState=Ma(1|t,o,n,i))}function $a(e,t){ja(8390656,8,e,t)}function za(e,t){Ua(2048,8,e,t)}function Ba(e){var t=la().memoizedState;return function(e){Bo.flags|=4;var t=Bo.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Bo.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&hc)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Ha(e,t){return Ua(4,2,e,t)}function Wa(e,t){return Ua(4,4,e,t)}function Va(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ga(e,t,n){n=null!=n?n.concat([e]):null,Ua(4,4,Va.bind(null,t,e),n)}function qa(){}function Ka(e,t){var n=la();t=void 0===t?null:t;var i=n.memoizedState;return null!==t&&Zo(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Ya(e,t){var n=la();t=void 0===t?null:t;var i=n.memoizedState;if(null!==t&&Zo(t,i[1]))return i[0];if(i=e(),qo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[i,t],i}function Qa(e,t,n){return void 0===n||1073741824&zo&&!(261930&gc)?e.memoizedState=t:(e.memoizedState=n,e=Gc(),Bo.lanes|=e,Sc|=e,n)}function Ja(e,t,n,i){return Jn(n,t)?n:null!==Io.current?(e=Qa(e,n,i),Jn(e,t)||(Ns=!0),e):42&zo&&(!(1073741824&zo)||261930&gc)?(e=Gc(),Bo.lanes|=e,Sc|=e,t):(Ns=!0,e.memoizedState=n)}function Xa(e,t,n,i,r){var o=D.p;D.p=0!==o&&8>o?o:8;var a,s,l,c=L.T,d={};L.T=d,ds(e,!1,t,n);try{var u=r(),h=L.S;null!==h&&h(d,u),null!==u&&"object"==typeof u&&"function"==typeof u.then?cs(e,t,(a=i,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},u.then(function(){l.status="fulfilled",l.value=a;for(var e=0;e<s.length;e++)(0,s[e])(a)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Vc()):cs(e,t,i,Vc())}catch(n){cs(e,t,{then:function(){},status:"rejected",reason:n},Vc())}finally{D.p=o,null!==c&&null!==d.types&&(c.types=d.types),L.T=c}}function Za(){}function es(e,t,n,i){if(5!==e.tag)throw Error(a(476));var r=ts(e).queue;Xa(e,r,t,P,null===n?Za:function(){return ns(e),n(i)})}function ts(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:P},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ns(e){var t=ts(e);null===t.next&&(t=e.alternate.memoizedState),cs(e,t.next.queue,{},Vc())}function is(){return Ar(ch)}function rs(){return la().memoizedState}function os(){return la().memoizedState}function as(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Vc(),i=yo(t,e=bo(n),n);return null!==i&&(qc(i,0,n),wo(i,t,n)),t={cache:jr()},void(e.payload=t)}t=t.return}}function ss(e,t,n){var i=Vc();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},us(e)?hs(t,n):null!==(n=Ai(e,t,n,i))&&(qc(n,0,i),ps(n,t,i))}function ls(e,t,n){cs(e,t,n,Vc())}function cs(e,t,n,i){var r={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(us(e))hs(t,r);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(r.hasEagerState=!0,r.eagerState=s,Jn(s,a))return Oi(e,t,r,0),null===pc&&Ri(),!1}catch(e){}if(null!==(n=Ai(e,t,r,i)))return qc(n,0,i),ps(n,t,i),!0}return!1}function ds(e,t,n,i){if(i={lane:2,revertLane:zd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(a(479))}else null!==(t=Ai(e,n,i,2))&&qc(t,0,2)}function us(e){var t=e.alternate;return e===Bo||null!==t&&t===Bo}function hs(e,t){Go=Vo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(4194048&n){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,Le(e,n)}}var fs={readContext:Ar,use:da,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo};fs.useEffectEvent=Xo;var gs={readContext:Ar,use:da,useCallback:function(e,t){return sa().memoizedState=[e,void 0===t?null:t],e},useContext:Ar,useEffect:$a,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,ja(4194308,4,Va.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ja(4194308,4,e,t)},useInsertionEffect:function(e,t){ja(4,2,e,t)},useMemo:function(e,t){var n=sa();t=void 0===t?null:t;var i=e();if(qo){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=sa();if(void 0!==n){var r=n(t);if(qo){be(!0);try{n(t)}finally{be(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=ss.bind(null,Bo,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},sa().memoizedState=e},useState:function(e){var t=(e=_a(e)).queue,n=ls.bind(null,Bo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qa,useDeferredValue:function(e,t){return Qa(sa(),e,t)},useTransition:function(){var e=_a(!1);return e=Xa.bind(null,Bo,e.queue,!0,!1),sa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Bo,r=sa();if(dr){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===pc)throw Error(a(349));127&gc||va(i,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,$a(ya.bind(null,i,o,e),[e]),i.flags|=2048,Ma(9,{destroy:void 0},ba.bind(null,i,o,n,t),null),n},useId:function(){var e=sa(),t=pc.identifierPrefix;if(dr){var n=nr;t="_"+t+"R_"+(n=(tr&~(1<<32-ye(tr)-1)).toString(32)+n),0<(n=Ko++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Jo++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:is,useFormState:Aa,useActionState:Aa,useOptimistic:function(e){var t=sa();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,Bo,!0,n),n.dispatch=t,[e,t]},useMemoCache:ua,useCacheRefresh:function(){return sa().memoizedState=as.bind(null,Bo)},useEffectEvent:function(e){var t=sa(),n={impl:e};return t.memoizedState=n,function(){if(2&hc)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},ms={readContext:Ar,use:da,useCallback:Ka,useContext:Ar,useEffect:za,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Ya,useReducer:pa,useRef:Fa,useState:function(){return pa(ha)},useDebugValue:qa,useDeferredValue:function(e,t){return Ja(la(),Ho.memoizedState,e,t)},useTransition:function(){var e=pa(ha)[0],t=la().memoizedState;return["boolean"==typeof e?e:ca(e),t]},useSyncExternalStore:ma,useId:rs,useHostTransitionStatus:is,useFormState:Na,useActionState:Na,useOptimistic:function(e,t){return Sa(la(),0,e,t)},useMemoCache:ua,useCacheRefresh:os};ms.useEffectEvent=Ba;var vs={readContext:Ar,use:da,useCallback:Ka,useContext:Ar,useEffect:za,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:Wa,useMemo:Ya,useReducer:ga,useRef:Fa,useState:function(){return ga(ha)},useDebugValue:qa,useDeferredValue:function(e,t){var n=la();return null===Ho?Qa(n,e,t):Ja(n,Ho.memoizedState,e,t)},useTransition:function(){var e=ga(ha)[0],t=la().memoizedState;return["boolean"==typeof e?e:ca(e),t]},useSyncExternalStore:ma,useId:rs,useHostTransitionStatus:is,useFormState:Pa,useActionState:Pa,useOptimistic:function(e,t){var n=la();return null!==Ho?Sa(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ua,useCacheRefresh:os};function bs(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:h({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=Ba;var ys={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Vc(),r=bo(i);r.payload=t,null!=n&&(r.callback=n),null!==(t=yo(e,r,i))&&(qc(t,0,i),wo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Vc(),r=bo(i);r.tag=1,r.payload=t,null!=n&&(r.callback=n),null!==(t=yo(e,r,i))&&(qc(t,0,i),wo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Vc(),i=bo(n);i.tag=2,null!=t&&(i.callback=t),null!==(t=yo(e,i,n))&&(qc(t,0,n),wo(t,e,n))}};function ws(e,t,n,i,r,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,o,a):!(t.prototype&&t.prototype.isPureReactComponent&&Xn(n,i)&&Xn(r,o))}function ks(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&ys.enqueueReplaceState(t,t.state,null)}function _s(e,t){var n=t;if("ref"in t)for(var i in n={},t)"ref"!==i&&(n[i]=t[i]);if(e=e.defaultProps)for(var r in n===t&&(n=h({},n)),e)void 0===n[r]&&(n[r]=e[r]);return n}function Ss(e){Ci(e)}function xs(e){console.error(e)}function Cs(e){Ci(e)}function Es(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Is(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ts(e,t,n){return(n=bo(n)).tag=3,n.payload={element:null},n.callback=function(){Es(e,t)},n}function Rs(e){return(e=bo(e)).tag=3,e}function Os(e,t,n,i){var r=n.type.getDerivedStateFromError;if("function"==typeof r){var o=i.value;e.payload=function(){return r(o)},e.callback=function(){Is(t,n,i)}}var a=n.stateNode;null!==a&&"function"==typeof a.componentDidCatch&&(e.callback=function(){Is(t,n,i),"function"!=typeof r&&(null===Pc?Pc=new Set([this]):Pc.add(this));var e=i.stack;this.componentDidCatch(i.value,{componentStack:null!==e?e:""})})}var As=Error(a(461)),Ns=!1;function Ls(e,t,n,i){t.child=null===e?fo(t,null,n,i):po(t,e.child,n,i)}function Ds(e,t,n,i,r){n=n.render;var o=t.ref;if("ref"in i){var a={};for(var s in i)"ref"!==s&&(a[s]=i[s])}else a=i;return Or(t),i=ea(e,t,n,a,o,r),s=ra(),null===e||Ns?(dr&&s&&or(t),t.flags|=1,Ls(e,t,i,r),t.child):(oa(e,t,r),il(e,t,r))}function Ps(e,t,n,i,r){if(null===e){var o=n.type;return"function"!=typeof o||ji(o)||void 0!==o.defaultProps||null!==n.compare?((e=zi(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ms(e,t,o,i,r))}if(o=e.child,!rl(e,r)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:Xn)(a,i)&&e.ref===t.ref)return il(e,t,r)}return t.flags|=1,(e=Ui(o,i)).ref=t.ref,e.return=t,t.child=e}function Ms(e,t,n,i,r){if(null!==e){var o=e.memoizedProps;if(Xn(o,i)&&e.ref===t.ref){if(Ns=!1,t.pendingProps=i=o,!rl(e,r))return t.lanes=e.lanes,il(e,t,r);131072&e.flags&&(Ns=!0)}}return Hs(e,t,n,i,r)}function Fs(e,t,n,i){var r=i.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===i.mode){if(128&t.flags){if(o=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,r=0;null!==i;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~o}else i=0,t.child=null;return Us(e,t,o,n,i)}if(!(536870912&n))return i=t.lanes=536870912,Us(e,t,null!==o?o.baseLanes|n:n,n,i);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Kr(0,null!==o?o.cachePool:null),null!==o?Ro(t,o):Oo(),Mo(t)}else null!==o?(Kr(0,o.cachePool),Ro(t,o),Fo(),t.memoizedState=null):(null!==e&&Kr(0,null),Oo(),Fo());return Ls(e,t,r,n),t.child}function js(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Us(e,t,n,i,r){var o=qr();return o=null===o?null:{parent:Fr._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Kr(0,null),Oo(),Mo(t),null!==e&&Tr(e,t,i,!0),t.childLanes=r,null}function $s(e,t){return(t=Xs({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function zs(e,t,n){return po(t,e.child,null,n),(e=$s(t,t.pendingProps)).flags|=2,jo(t),t.memoizedState=null,e}function Bs(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Hs(e,t,n,i,r){return Or(t),n=ea(e,t,n,i,void 0,r),i=ra(),null===e||Ns?(dr&&i&&or(t),t.flags|=1,Ls(e,t,n,r),t.child):(oa(e,t,r),il(e,t,r))}function Ws(e,t,n,i,r,o){return Or(t),t.updateQueue=null,n=na(t,i,n,r),ta(e),i=ra(),null===e||Ns?(dr&&i&&or(t),t.flags|=1,Ls(e,t,n,o),t.child):(oa(e,t,o),il(e,t,o))}function Vs(e,t,n,i,r){if(Or(t),null===t.stateNode){var o=Pi,a=n.contextType;"object"==typeof a&&null!==a&&(o=Ar(a)),o=new n(i,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=ys,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=i,o.state=t.memoizedState,o.refs={},mo(t),a=n.contextType,o.context="object"==typeof a&&null!==a?Ar(a):Pi,o.state=t.memoizedState,"function"==typeof(a=n.getDerivedStateFromProps)&&(bs(t,n,a,i),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(a=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),a!==o.state&&ys.enqueueReplaceState(o,o.state,null),xo(t,i,o,r),So(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),i=!0}else if(null===e){o=t.stateNode;var s=t.memoizedProps,l=_s(n,s);o.props=l;var c=o.context,d=n.contextType;a=Pi,"object"==typeof d&&null!==d&&(a=Ar(d));var u=n.getDerivedStateFromProps;d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate,s=t.pendingProps!==s,d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s||c!==a)&&ks(t,o,i,a),go=!1;var h=t.memoizedState;o.state=h,xo(t,i,o,r),So(),c=t.memoizedState,s||h!==c||go?("function"==typeof u&&(bs(t,n,u,i),c=t.memoizedState),(l=go||ws(t,n,l,i,h,c,a))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),o.props=i,o.state=c,o.context=a,i=l):("function"==typeof o.componentDidMount&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,vo(e,t),d=_s(n,a=t.memoizedProps),o.props=d,u=t.pendingProps,h=o.context,c=n.contextType,l=Pi,"object"==typeof c&&null!==c&&(l=Ar(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(a!==u||h!==l)&&ks(t,o,i,l),go=!1,h=t.memoizedState,o.state=h,xo(t,i,o,r),So();var p=t.memoizedState;a!==u||h!==p||go||null!==e&&null!==e.dependencies&&Rr(e.dependencies)?("function"==typeof s&&(bs(t,n,s,i),p=t.memoizedState),(d=go||ws(t,n,d,i,h,p,l)||null!==e&&null!==e.dependencies&&Rr(e.dependencies))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(i,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(i,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),o.props=i,o.state=p,o.context=l,i=d):("function"!=typeof o.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return o=i,Bs(e,t),i=!!(128&t.flags),o||i?(o=t.stateNode,n=i&&"function"!=typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&i?(t.child=po(t,e.child,null,r),t.child=po(t,null,n,r)):Ls(e,t,n,r),t.memoizedState=o.state,e=t.child):e=il(e,t,r),e}function Gs(e,t,n,i){return br(),t.flags|=256,Ls(e,t,n,i),t.child}var qs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ks(e){return{baseLanes:e,cachePool:Yr()}}function Ys(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Ec),e}function Qs(e,t,n){var i,r=t.pendingProps,o=!1,s=!!(128&t.flags);if((i=s)||(i=(null===e||null!==e.memoizedState)&&!!(2&Uo.current)),i&&(o=!0,t.flags&=-129),i=!!(32&t.flags),t.flags&=-33,null===e){if(dr){if(o?Do(t):Fo(),(e=cr)?null!==(e=null!==(e=Ru(e,hr))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==er?{id:tr,overflow:nr}:null,retryLane:536870912,hydrationErrors:null},(n=Wi(e)).return=t,t.child=n,lr=t,cr=null):e=null,null===e)throw fr(t);return Au(e)?t.lanes=32:t.lanes=536870912,null}var l=r.children;return r=r.fallback,o?(Fo(),l=Xs({mode:"hidden",children:l},o=t.mode),r=Bi(r,o,n,null),l.return=t,r.return=t,l.sibling=r,t.child=l,(r=t.child).memoizedState=Ks(n),r.childLanes=Ys(e,i,n),t.memoizedState=qs,js(null,r)):(Do(t),Js(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Do(t),t.flags&=-257,t=Zs(e,t,n)):null!==t.memoizedState?(Fo(),t.child=e.child,t.flags|=128,t=null):(Fo(),l=r.fallback,o=t.mode,r=Xs({mode:"visible",children:r.children},o),(l=Bi(l,o,n,null)).flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,po(t,e.child,null,n),(r=t.child).memoizedState=Ks(n),r.childLanes=Ys(e,i,n),t.memoizedState=qs,t=js(null,r));else if(Do(t),Au(l)){if(i=l.nextSibling&&l.nextSibling.dataset)var d=i.dgst;i=d,(r=Error(a(419))).stack="",r.digest=i,wr({value:r,source:null,stack:null}),t=Zs(e,t,n)}else if(Ns||Tr(e,t,n,!1),i=0!==(n&e.childLanes),Ns||i){if(null!==(i=pc)&&0!==(r=De(i,n))&&r!==c.retryLane)throw c.retryLane=r,Ni(e,r),qc(i,0,r),As;Ou(l)||od(),t=Zs(e,t,n)}else Ou(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,cr=Nu(l.nextSibling),lr=t,dr=!0,ur=null,hr=!1,null!==e&&sr(t,e),(t=Js(t,r.children)).flags|=4096);return t}return o?(Fo(),l=r.fallback,o=t.mode,d=(c=e.child).sibling,(r=Ui(c,{mode:"hidden",children:r.children})).subtreeFlags=65011712&c.subtreeFlags,null!==d?l=Ui(d,l):(l=Bi(l,o,n,null)).flags|=2,l.return=t,r.return=t,r.sibling=l,t.child=r,js(null,r),r=t.child,null===(l=e.child.memoizedState)?l=Ks(n):(null!==(o=l.cachePool)?(c=Fr._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=Yr(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Ys(e,i,n),t.memoizedState=qs,js(e.child,r)):(Do(t),e=(n=e.child).sibling,(n=Ui(n,{mode:"visible",children:r.children})).return=t,n.sibling=null,null!==e&&(null===(i=t.deletions)?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Js(e,t){return(t=Xs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Xs(e,t){return(e=Fi(22,e,null,t)).lanes=0,e}function Zs(e,t,n){return po(t,e.child,null,n),(e=Js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function el(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),Er(e.return,t,n)}function tl(e,t,n,i,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r,treeForkCount:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=i,a.tail=n,a.tailMode=r,a.treeForkCount=o)}function nl(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;i=i.children;var a=Uo.current,s=!!(2&a);if(s?(a=1&a|2,t.flags|=128):a&=1,$(Uo,a),Ls(e,t,i,n),i=dr?Ji:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&el(e,n,t);else if(19===e.tag)el(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===$o(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),tl(t,!1,r,n,o,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===$o(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}tl(t,!0,n,null,o,i);break;case"together":tl(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Sc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Tr(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ui(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ui(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function rl(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Rr(e))}function ol(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ns=!0;else{if(!(rl(e,n)||128&t.flags))return Ns=!1,function(e,t,n){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),xr(0,Fr,e.memoizedState.cache),br();break;case 27:case 5:Y(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:xr(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Po(t),null;break;case 13:var i=t.memoizedState;if(null!==i)return null!==i.dehydrated?(Do(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Qs(e,t,n):(Do(t),null!==(e=il(e,t,n))?e.sibling:null);Do(t);break;case 19:var r=!!(128&e.flags);if((i=0!==(n&t.childLanes))||(Tr(e,t,n,!1),i=0!==(n&t.childLanes)),r){if(i)return nl(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),$(Uo,Uo.current),i)break;return null;case 22:return t.lanes=0,Fs(e,t,n,t.pendingProps);case 24:xr(0,Fr,e.memoizedState.cache)}return il(e,t,n)}(e,t,n);Ns=!!(131072&e.flags)}else Ns=!1,dr&&1048576&t.flags&&rr(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=no(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var r=e.$$typeof;if(r===k){t.tag=11,t=Ds(null,t,e,i,n);break e}if(r===x){t.tag=14,t=Ps(null,t,e,i,n);break e}}throw t=A(e)||e,Error(a(306,t,""))}ji(e)?(i=_s(e,i),t.tag=1,t=Vs(null,t,e,i,n)):(t.tag=0,t=Hs(null,t,e,i,n))}return t;case 0:return Hs(e,t,t.type,t.pendingProps,n);case 1:return Vs(e,t,i=t.type,r=_s(i,t.pendingProps),n);case 3:e:{if(q(t,t.stateNode.containerInfo),null===e)throw Error(a(387));i=t.pendingProps;var o=t.memoizedState;r=o.element,vo(e,t),xo(t,i,null,n);var s=t.memoizedState;if(i=s.cache,xr(0,Fr,i),i!==o.cache&&Ir(t,[Fr],n,!0),So(),i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Gs(e,t,i,n);break e}if(i!==r){wr(r=qi(Error(a(424)),t)),t=Gs(e,t,i,n);break e}for(e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,cr=Nu(e.firstChild),lr=t,dr=!0,ur=null,hr=!0,n=fo(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(br(),i===r){t=il(e,t,n);break e}Ls(e,t,i,n)}t=t.child}return t;case 26:return Bs(e,t),null===e?(n=Wu(t.type,null,t.pendingProps,null))?t.memoizedState=n:dr||(n=t.type,e=t.pendingProps,(i=gu(V.current).createElement(n))[$e]=t,i[ze]=e,uu(i,n,e),Ze(i),t.stateNode=i):t.memoizedState=Wu(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Y(t),null===e&&dr&&(i=t.stateNode=Mu(t.type,t.pendingProps,V.current),lr=t,hr=!0,r=cr,Cu(t.type)?(Lu=r,cr=Nu(i.firstChild)):cr=r),Ls(e,t,t.pendingProps.children,n),Bs(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&dr&&((r=i=cr)&&(null!==(i=function(e,t,n,i){for(;1===e.nodeType;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(i){if(!e[qe])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(null==r.href||""===r.href?null:r.href)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin)||e.getAttribute("title")!==(null==r.title?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==r.src?null:r.src)||e.getAttribute("type")!==(null==r.type?null:r.type)||e.getAttribute("crossorigin")!==(null==r.crossOrigin?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==r.name?null:""+r.name;if("hidden"===r.type&&e.getAttribute("name")===o)return e}if(null===(e=Nu(e.nextSibling)))break}return null}(i,t.type,t.pendingProps,hr))?(t.stateNode=i,lr=t,cr=Nu(i.firstChild),hr=!1,r=!0):r=!1),r||fr(t)),Y(t),r=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,i=o.children,bu(r,o)?i=null:null!==s&&bu(r,s)&&(t.flags|=32),null!==t.memoizedState&&(r=ea(e,t,ia,null,null,n),ch._currentValue=r),Bs(e,t),Ls(e,t,i,n),t.child;case 6:return null===e&&dr&&((e=n=cr)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Nu(e.nextSibling)))return null}return e}(n,t.pendingProps,hr))?(t.stateNode=n,lr=t,cr=null,e=!0):e=!1),e||fr(t)),null;case 13:return Qs(e,t,n);case 4:return q(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=po(t,null,i,n):Ls(e,t,i,n),t.child;case 11:return Ds(e,t,t.type,t.pendingProps,n);case 7:return Ls(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ls(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,xr(0,t.type,i.value),Ls(e,t,i.children,n),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,Or(t),i=i(r=Ar(r)),t.flags|=1,Ls(e,t,i,n),t.child;case 14:return Ps(e,t,t.type,t.pendingProps,n);case 15:return Ms(e,t,t.type,t.pendingProps,n);case 19:return nl(e,t,n);case 31:return function(e,t,n){var i=t.pendingProps,r=!!(128&t.flags);if(t.flags&=-129,null===e){if(dr){if("hidden"===i.mode)return e=$s(t,i),t.lanes=536870912,js(null,e);if(Po(t),(e=cr)?null!==(e=null!==(e=Ru(e,hr))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==er?{id:tr,overflow:nr}:null,retryLane:536870912,hydrationErrors:null},(n=Wi(e)).return=t,t.child=n,lr=t,cr=null):e=null,null===e)throw fr(t);return t.lanes=536870912,null}return $s(t,i)}var o=e.memoizedState;if(null!==o){var s=o.dehydrated;if(Po(t),r)if(256&t.flags)t.flags&=-257,t=zs(e,t,n);else{if(null===t.memoizedState)throw Error(a(558));t.child=e.child,t.flags|=128,t=null}else if(Ns||Tr(e,t,n,!1),r=0!==(n&e.childLanes),Ns||r){if(null!==(i=pc)&&0!==(s=De(i,n))&&s!==o.retryLane)throw o.retryLane=s,Ni(e,s),qc(i,0,s),As;od(),t=zs(e,t,n)}else e=o.treeContext,cr=Nu(s.nextSibling),lr=t,dr=!0,ur=null,hr=!1,null!==e&&sr(t,e),(t=$s(t,i)).flags|=4096;return t}return(e=Ui(e.child,{mode:i.mode,children:i.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return Fs(e,t,n,t.pendingProps);case 24:return Or(t),i=Ar(Fr),null===e?(null===(r=qr())&&(r=pc,o=jr(),r.pooledCache=o,o.refCount++,null!==o&&(r.pooledCacheLanes|=n),r=o),t.memoizedState={parent:i,cache:r},mo(t),xr(0,Fr,r)):(0!==(e.lanes&n)&&(vo(e,t),xo(t,null,null,n),So()),r=e.memoizedState,o=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=r),xr(0,Fr,i)):(i=o.cache,xr(0,Fr,i),i!==r.cache&&Ir(t,[Fr],n,!0))),Ls(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function al(e){e.flags|=4}function sl(e,t,n,i,r){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&r)===r)if(e.stateNode.complete)e.flags|=8192;else{if(!nd())throw io=Zr,Jr;e.flags|=8192}}else e.flags&=-16777217}function ll(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(!nd())throw io=Zr,Jr;e.flags|=8192}}function cl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Re():536870912,e.lanes|=t,Ic|=t)}function dl(e,t){if(!dr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function ul(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=65011712&r.subtreeFlags,i|=65011712&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function hl(e,t,n){var i=t.pendingProps;switch(ar(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return ul(t),null;case 3:return n=t.stateNode,i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Cr(Fr),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(vr(t)?al(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,yr())),ul(t),null;case 26:var r=t.type,o=t.memoizedState;return null===e?(al(t),null!==o?(ul(t),ll(t,o)):(ul(t),sl(t,r,0,0,n))):o?o!==e.memoizedState?(al(t),ul(t),ll(t,o)):(ul(t),t.flags&=-16777217):((e=e.memoizedProps)!==i&&al(t),ul(t),sl(t,r,0,0,n)),null;case 27:if(Q(t),n=V.current,r=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&al(t);else{if(!i){if(null===t.stateNode)throw Error(a(166));return ul(t),null}e=H.current,vr(t)?gr(t):(e=Mu(r,i,n),t.stateNode=e,al(t))}return ul(t),null;case 5:if(Q(t),r=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==i&&al(t);else{if(!i){if(null===t.stateNode)throw Error(a(166));return ul(t),null}if(o=H.current,vr(t))gr(t);else{var s=gu(V.current);switch(o){case 1:o=s.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=s.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=s.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=s.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":(o=s.createElement("div")).innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof i.is?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o="string"==typeof i.is?s.createElement(r,{is:i.is}):s.createElement(r)}}o[$e]=t,o[ze]=i;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)o.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;e:switch(uu(o,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&al(t)}}return ul(t),sl(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==i&&al(t);else{if("string"!=typeof i&&null===t.stateNode)throw Error(a(166));if(e=V.current,vr(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,null!==(r=lr))switch(r.tag){case 27:case 5:i=r.memoizedProps}e[$e]=t,(e=!!(e.nodeValue===n||null!==i&&!0===i.suppressHydrationWarning||lu(e.nodeValue,n)))||fr(t,!0)}else(e=gu(e).createTextNode(i))[$e]=t,t.stateNode=e}return ul(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(i=vr(t),null!==n){if(null===e){if(!i)throw Error(a(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(a(557));e[$e]=t}else br(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ul(t),e=!1}else n=yr(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(jo(t),t):(jo(t),null);if(128&t.flags)throw Error(a(558))}return ul(t),null;case 13:if(i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(r=vr(t),null!==i&&null!==i.dehydrated){if(null===e){if(!r)throw Error(a(318));if(!(r=null!==(r=t.memoizedState)?r.dehydrated:null))throw Error(a(317));r[$e]=t}else br(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ul(t),r=!1}else r=yr(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return 256&t.flags?(jo(t),t):(jo(t),null)}return jo(t),128&t.flags?(t.lanes=n,t):(n=null!==i,e=null!==e&&null!==e.memoizedState,n&&(r=null,null!==(i=t.child).alternate&&null!==i.alternate.memoizedState&&null!==i.alternate.memoizedState.cachePool&&(r=i.alternate.memoizedState.cachePool.pool),o=null,null!==i.memoizedState&&null!==i.memoizedState.cachePool&&(o=i.memoizedState.cachePool.pool),o!==r&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cl(t,t.updateQueue),ul(t),null);case 4:return K(),null===e&&Xd(t.stateNode.containerInfo),ul(t),null;case 10:return Cr(t.type),ul(t),null;case 19:if(U(Uo),null===(i=t.memoizedState))return ul(t),null;if(r=!!(128&t.flags),null===(o=i.rendering))if(r)dl(i,!1);else{if(0!==_c||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=$o(e))){for(t.flags|=128,dl(i,!1),e=o.updateQueue,t.updateQueue=e,cl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)$i(n,e),n=n.sibling;return $(Uo,1&Uo.current|2),dr&&ir(t,i.treeForkCount),t.child}e=e.sibling}null!==i.tail&&se()>Lc&&(t.flags|=128,r=!0,dl(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=$o(o))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,cl(t,e),dl(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!dr)return ul(t),null}else 2*se()-i.renderingStartTime>Lc&&536870912!==n&&(t.flags|=128,r=!0,dl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=se(),e.sibling=null,n=Uo.current,$(Uo,r?1&n|2:1&n),dr&&ir(t,i.treeForkCount),e):(ul(t),null);case 22:case 23:return jo(t),Ao(),i=null!==t.memoizedState,null!==e?null!==e.memoizedState!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?!!(536870912&n)&&!(128&t.flags)&&(ul(t),6&t.subtreeFlags&&(t.flags|=8192)):ul(t),null!==(n=t.updateQueue)&&cl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),i=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),null!==e&&U(Gr),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Cr(Fr),ul(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function pl(e,t){switch(ar(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Cr(Fr),K(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Q(t),null;case 31:if(null!==t.memoizedState){if(jo(t),null===t.alternate)throw Error(a(340));br()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(jo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));br()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return U(Uo),null;case 4:return K(),null;case 10:return Cr(t.type),null;case 22:case 23:return jo(t),Ao(),null!==e&&U(Gr),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Cr(Fr),null;default:return null}}function fl(e,t){switch(ar(t),t.tag){case 3:Cr(Fr),K();break;case 26:case 27:case 5:Q(t);break;case 4:K();break;case 31:null!==t.memoizedState&&jo(t);break;case 13:jo(t);break;case 19:U(Uo);break;case 10:Cr(t.type);break;case 22:case 23:jo(t),Ao(),null!==e&&U(Gr);break;case 24:Cr(Fr)}}function gl(e,t){try{var n=t.updateQueue,i=null!==n?n.lastEffect:null;if(null!==i){var r=i.next;n=r;do{if((n.tag&e)===e){i=void 0;var o=n.create,a=n.inst;i=o(),a.destroy=i}n=n.next}while(n!==r)}}catch(e){_d(t,t.return,e)}}function ml(e,t,n){try{var i=t.updateQueue,r=null!==i?i.lastEffect:null;if(null!==r){var o=r.next;i=o;do{if((i.tag&e)===e){var a=i.inst,s=a.destroy;if(void 0!==s){a.destroy=void 0,r=t;var l=n,c=s;try{c()}catch(e){_d(r,l,e)}}}i=i.next}while(i!==o)}}catch(e){_d(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Eo(t,n)}catch(t){_d(e,e.return,t)}}}function bl(e,t,n){n.props=_s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){_d(e,t,n)}}function yl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;default:i=e.stateNode}"function"==typeof n?e.refCleanup=n(i):n.current=i}}catch(n){_d(e,t,n)}}function wl(e,t){var n=e.ref,i=e.refCleanup;if(null!==n)if("function"==typeof i)try{i()}catch(n){_d(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){_d(e,t,n)}else n.current=null}function kl(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(t){_d(e,e.return,t)}}function _l(e,t,n){try{var i=e.stateNode;!function(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,s=null,l=null,c=null,d=null,u=null;for(f in n){var h=n[f];if(n.hasOwnProperty(f)&&null!=h)switch(f){case"checked":case"value":break;case"defaultValue":c=h;default:i.hasOwnProperty(f)||cu(e,t,f,null,i,h)}}for(var p in i){var f=i[p];if(h=n[p],i.hasOwnProperty(p)&&(null!=f||null!=h))switch(p){case"type":o=f;break;case"name":r=f;break;case"checked":d=f;break;case"defaultChecked":u=f;break;case"value":s=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(a(137,t));break;default:f!==h&&cu(e,t,p,f,i,h)}}return void vt(e,s,l,c,d,u,o,r);case"select":for(o in f=s=l=p=null,n)if(c=n[o],n.hasOwnProperty(o)&&null!=c)switch(o){case"value":break;case"multiple":f=c;default:i.hasOwnProperty(o)||cu(e,t,o,null,i,c)}for(r in i)if(o=i[r],c=n[r],i.hasOwnProperty(r)&&(null!=o||null!=c))switch(r){case"value":p=o;break;case"defaultValue":l=o;break;case"multiple":s=o;default:o!==c&&cu(e,t,r,o,i,c)}return t=l,n=s,i=f,void(null!=p?wt(e,!!n,p,!1):!!i!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in f=p=null,n)if(r=n[l],n.hasOwnProperty(l)&&null!=r&&!i.hasOwnProperty(l))switch(l){case"value":case"children":break;default:cu(e,t,l,null,i,r)}for(s in i)if(r=i[s],o=n[s],i.hasOwnProperty(s)&&(null!=r||null!=o))switch(s){case"value":p=r;break;case"defaultValue":f=r;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=r)throw Error(a(91));break;default:r!==o&&cu(e,t,s,r,i,o)}return void kt(e,p,f);case"option":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!i.hasOwnProperty(g)&&("selected"===g?e.selected=!1:cu(e,t,g,null,i,p));for(c in i)p=i[c],f=n[c],!i.hasOwnProperty(c)||p===f||null==p&&null==f||("selected"===c?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:cu(e,t,c,p,i,f));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var m in n)p=n[m],n.hasOwnProperty(m)&&null!=p&&!i.hasOwnProperty(m)&&cu(e,t,m,null,i,p);for(d in i)if(p=i[d],f=n[d],i.hasOwnProperty(d)&&p!==f&&(null!=p||null!=f))switch(d){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:cu(e,t,d,p,i,f)}return;default:if(It(t)){for(var v in n)p=n[v],n.hasOwnProperty(v)&&void 0!==p&&!i.hasOwnProperty(v)&&du(e,t,v,void 0,i,p);for(u in i)p=i[u],f=n[u],!i.hasOwnProperty(u)||p===f||void 0===p&&void 0===f||du(e,t,u,p,i,f);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!i.hasOwnProperty(b)&&cu(e,t,b,null,i,p);for(h in i)p=i[h],f=n[h],!i.hasOwnProperty(h)||p===f||null==p&&null==f||cu(e,t,h,p,i,f)}(i,e.type,n,t),i[ze]=t}catch(t){_d(e,e.return,t)}}function Sl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Cu(e.type)||4===e.tag}function xl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Cu(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=At));else if(4!==i&&(27===i&&Cu(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Cl(e,t,n),e=e.sibling;null!==e;)Cl(e,t,n),e=e.sibling}function El(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&(27===i&&Cu(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(El(e,t,n),e=e.sibling;null!==e;)El(e,t,n),e=e.sibling}function Il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);uu(t,i,n),t[$e]=e,t[ze]=n}catch(t){_d(e,e.return,t)}}var Tl=!1,Rl=!1,Ol=!1,Al="function"==typeof WeakSet?WeakSet:Set,Nl=null;function Ll(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:ql(e,n),4&i&&gl(5,n);break;case 1:if(ql(e,n),4&i)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){_d(n,n.return,e)}else{var r=_s(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){_d(n,n.return,e)}}64&i&&vl(n),512&i&&yl(n,n.return);break;case 3:if(ql(e,n),64&i&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Eo(e,t)}catch(e){_d(n,n.return,e)}}break;case 27:null===t&&4&i&&Il(n);case 26:case 5:ql(e,n),null===t&&4&i&&kl(n),512&i&&yl(n,n.return);break;case 12:ql(e,n);break;case 31:ql(e,n),4&i&&Ul(e,n);break;case 13:ql(e,n),4&i&&$l(e,n),64&i&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}(e,n=Ed.bind(null,n));break;case 22:if(!(i=null!==n.memoizedState||Tl)){t=null!==t&&null!==t.memoizedState||Rl,r=Tl;var o=Rl;Tl=i,(Rl=t)&&!o?Yl(e,n,!!(8772&n.subtreeFlags)):ql(e,n),Tl=r,Rl=o}break;case 30:break;default:ql(e,n)}}function Dl(e){var t=e.alternate;null!==t&&(e.alternate=null,Dl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&Ke(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pl=null,Ml=!1;function Fl(e,t,n){for(n=n.child;null!==n;)jl(e,t,n),n=n.sibling}function jl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(me,n)}catch(e){}switch(n.tag){case 26:Rl||wl(n,t),Fl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Rl||wl(n,t);var i=Pl,r=Ml;Cu(n.type)&&(Pl=n.stateNode,Ml=!1),Fl(e,t,n),Fu(n.stateNode),Pl=i,Ml=r;break;case 5:Rl||wl(n,t);case 6:if(i=Pl,r=Ml,Pl=null,Fl(e,t,n),Ml=r,null!==(Pl=i))if(Ml)try{(9===Pl.nodeType?Pl.body:"HTML"===Pl.nodeName?Pl.ownerDocument.body:Pl).removeChild(n.stateNode)}catch(e){_d(n,t,e)}else try{Pl.removeChild(n.stateNode)}catch(e){_d(n,t,e)}break;case 18:null!==Pl&&(Ml?(Eu(9===(e=Pl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),zh(e)):Eu(Pl,n.stateNode));break;case 4:i=Pl,r=Ml,Pl=n.stateNode.containerInfo,Ml=!0,Fl(e,t,n),Pl=i,Ml=r;break;case 0:case 11:case 14:case 15:ml(2,n,t),Rl||ml(4,n,t),Fl(e,t,n);break;case 1:Rl||(wl(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount&&bl(n,t,i)),Fl(e,t,n);break;case 21:Fl(e,t,n);break;case 22:Rl=(i=Rl)||null!==n.memoizedState,Fl(e,t,n),Rl=i;break;default:Fl(e,t,n)}}function Ul(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{zh(e)}catch(e){_d(t,t.return,e)}}}function $l(e,t){if(null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{zh(e)}catch(e){_d(t,t.return,e)}}function zl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Al),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Al),t;default:throw Error(a(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var i=Id.bind(null,e,t);t.then(i,i)}})}function Bl(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i],o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(Cu(l.type)){Pl=l.stateNode,Ml=!1;break e}break;case 5:Pl=l.stateNode,Ml=!1;break e;case 3:case 4:Pl=l.stateNode.containerInfo,Ml=!0;break e}l=l.return}if(null===Pl)throw Error(a(160));jl(o,s,r),Pl=null,Ml=!1,null!==(o=r.alternate)&&(o.return=null),r.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Wl(t,e),t=t.sibling}var Hl=null;function Wl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bl(t,e),Vl(e),4&i&&(ml(3,e,e.return),gl(3,e),ml(5,e,e.return));break;case 1:Bl(t,e),Vl(e),512&i&&(Rl||null===n||wl(n,n.return)),64&i&&Tl&&null!==(e=e.updateQueue)&&null!==(i=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?i:n.concat(i));break;case 26:var r=Hl;if(Bl(t,e),Vl(e),512&i&&(Rl||null===n||wl(n,n.return)),4&i){var o=null!==n?n.memoizedState:null;if(i=e.memoizedState,null===n)if(null===i)if(null===e.stateNode){e:{i=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":(!(o=r.getElementsByTagName("title")[0])||o[qe]||o[$e]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=r.createElement(i),r.head.insertBefore(o,r.querySelector("head > title"))),uu(o,i,n),o[$e]=e,Ze(o),i=o;break e;case"link":var s=th("link","href",r).get(i+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((o=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}uu(o=r.createElement(i),i,n),r.head.appendChild(o);break;case"meta":if(s=th("meta","content",r).get(i+(n.content||"")))for(l=0;l<s.length;l++)if((o=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}uu(o=r.createElement(i),i,n),r.head.appendChild(o);break;default:throw Error(a(468,i))}o[$e]=e,Ze(o),i=o}e.stateNode=i}else nh(r,e.type,e.stateNode);else e.stateNode=Qu(r,i,e.memoizedProps);else o!==i?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===i?nh(r,e.type,e.stateNode):Qu(r,i,e.memoizedProps)):null===i&&null!==e.stateNode&&_l(e,e.memoizedProps,n.memoizedProps)}break;case 27:Bl(t,e),Vl(e),512&i&&(Rl||null===n||wl(n,n.return)),null!==n&&4&i&&_l(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Bl(t,e),Vl(e),512&i&&(Rl||null===n||wl(n,n.return)),32&e.flags){r=e.stateNode;try{St(r,"")}catch(t){_d(e,e.return,t)}}4&i&&null!=e.stateNode&&_l(e,r=e.memoizedProps,null!==n?n.memoizedProps:r),1024&i&&(Ol=!0);break;case 6:if(Bl(t,e),Vl(e),4&i){if(null===e.stateNode)throw Error(a(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(t){_d(e,e.return,t)}}break;case 3:if(eh=null,r=Hl,Hl=$u(t.containerInfo),Bl(t,e),Hl=r,Vl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{zh(t.containerInfo)}catch(t){_d(e,e.return,t)}Ol&&(Ol=!1,Gl(e));break;case 4:i=Hl,Hl=$u(e.stateNode.containerInfo),Bl(t,e),Vl(e),Hl=i;break;case 12:default:Bl(t,e),Vl(e);break;case 31:case 19:Bl(t,e),Vl(e),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,zl(e,i));break;case 13:Bl(t,e),Vl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Ac=se()),4&i&&null!==(i=e.updateQueue)&&(e.updateQueue=null,zl(e,i));break;case 22:r=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,d=Tl,u=Rl;if(Tl=d||r,Rl=u||c,Bl(t,e),Rl=u,Tl=d,Vl(e),8192&i)e:for(t=e.stateNode,t._visibility=r?-2&t._visibility:1|t._visibility,r&&(null===n||c||Tl||Rl||Kl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(o=c.stateNode,r)"function"==typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var h=c.memoizedProps.style,p=null!=h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){_d(c,c.return,e)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=r?"":c.memoizedProps}catch(e){_d(c,c.return,e)}}}else if(18===t.tag){if(null===n){c=t;try{var f=c.stateNode;r?Iu(f,!0):Iu(c.stateNode,!1)}catch(e){_d(c,c.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&i&&null!==(i=e.updateQueue)&&null!==(n=i.retryQueue)&&(i.retryQueue=null,zl(e,n));case 30:case 21:}}function Vl(e){var t=e.flags;if(2&t){try{for(var n,i=e.return;null!==i;){if(Sl(i)){n=i;break}i=i.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var r=n.stateNode;El(e,xl(e),r);break;case 5:var o=n.stateNode;32&n.flags&&(St(o,""),n.flags&=-33),El(e,xl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Cl(e,xl(e),s);break;default:throw Error(a(161))}}catch(t){_d(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Gl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Gl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function ql(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Ll(e,t.alternate,t),t=t.sibling}function Kl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ml(4,t,t.return),Kl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&bl(t,t.return,n),Kl(t);break;case 27:Fu(t.stateNode);case 26:case 5:wl(t,t.return),Kl(t);break;case 22:null===t.memoizedState&&Kl(t);break;default:Kl(t)}e=e.sibling}}function Yl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var i=t.alternate,r=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:Yl(r,o,n),gl(4,o);break;case 1:if(Yl(r,o,n),"function"==typeof(r=(i=o).stateNode).componentDidMount)try{r.componentDidMount()}catch(e){_d(i,i.return,e)}if(null!==(r=(i=o).updateQueue)){var s=i.stateNode;try{var l=r.shared.hiddenCallbacks;if(null!==l)for(r.shared.hiddenCallbacks=null,r=0;r<l.length;r++)Co(l[r],s)}catch(e){_d(i,i.return,e)}}n&&64&a&&vl(o),yl(o,o.return);break;case 27:Il(o);case 26:case 5:Yl(r,o,n),n&&null===i&&4&a&&kl(o),yl(o,o.return);break;case 12:Yl(r,o,n);break;case 31:Yl(r,o,n),n&&4&a&&Ul(r,o);break;case 13:Yl(r,o,n),n&&4&a&&$l(r,o);break;case 22:null===o.memoizedState&&Yl(r,o,n),yl(o,o.return);break;case 30:break;default:Yl(r,o,n)}t=t.sibling}}function Ql(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ur(n))}function Jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ur(e))}function Xl(e,t,n,i){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Zl(e,t,n,i),t=t.sibling}function Zl(e,t,n,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xl(e,t,n,i),2048&r&&gl(9,t);break;case 1:case 31:case 13:default:Xl(e,t,n,i);break;case 3:Xl(e,t,n,i),2048&r&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ur(e)));break;case 12:if(2048&r){Xl(e,t,n,i),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,s=o.onPostCommit;"function"==typeof s&&s(a,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){_d(t,t.return,e)}}else Xl(e,t,n,i);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,null!==t.memoizedState?2&o._visibility?Xl(e,t,n,i):tc(e,t):2&o._visibility?Xl(e,t,n,i):(o._visibility|=2,ec(e,t,n,i,!!(10256&t.subtreeFlags)||!1)),2048&r&&Ql(a,t);break;case 24:Xl(e,t,n,i),2048&r&&Jl(t.alternate,t)}}function ec(e,t,n,i,r){for(r=r&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var o=e,a=t,s=n,l=i,c=a.flags;switch(a.tag){case 0:case 11:case 15:ec(o,a,s,l,r),gl(8,a);break;case 23:break;case 22:var d=a.stateNode;null!==a.memoizedState?2&d._visibility?ec(o,a,s,l,r):tc(o,a):(d._visibility|=2,ec(o,a,s,l,r)),r&&2048&c&&Ql(a.alternate,a);break;case 24:ec(o,a,s,l,r),r&&2048&c&&Jl(a.alternate,a);break;default:ec(o,a,s,l,r)}t=t.sibling}}function tc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,i=t,r=i.flags;switch(i.tag){case 22:tc(n,i),2048&r&&Ql(i.alternate,i);break;case 24:tc(n,i),2048&r&&Jl(i.alternate,i);break;default:tc(n,i)}t=t.sibling}}var nc=8192;function ic(e,t,n){if(e.subtreeFlags&nc)for(e=e.child;null!==e;)rc(e,t,n),e=e.sibling}function rc(e,t,n){switch(e.tag){case 26:ic(e,t,n),e.flags&nc&&null!==e.memoizedState&&function(e,t,n,i){if(!("stylesheet"!==n.type||"string"==typeof i.media&&!1===matchMedia(i.media).matches||4&n.state.loading)){if(null===n.instance){var r=Vu(i.href),o=t.querySelector(Gu(r));if(o)return null!==(t=o._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=oh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,void Ze(o);o=t.ownerDocument||t,i=qu(i),(r=ju.get(r))&&Xu(i,r),Ze(o=o.createElement("link"));var a=o;a._p=new Promise(function(e,t){a.onload=e,a.onerror=t}),uu(o,"link",i),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=oh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Hl,e.memoizedState,e.memoizedProps);break;case 5:default:ic(e,t,n);break;case 3:case 4:var i=Hl;Hl=$u(e.stateNode.containerInfo),ic(e,t,n),Hl=i;break;case 22:null===e.memoizedState&&(null!==(i=e.alternate)&&null!==i.memoizedState?(i=nc,nc=16777216,ic(e,t,n),nc=i):ic(e,t,n))}}function oc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function ac(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var i=t[n];Nl=i,cc(i,e)}oc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)sc(e),e=e.sibling}function sc(e){switch(e.tag){case 0:case 11:case 15:ac(e),2048&e.flags&&ml(9,e,e.return);break;case 3:case 12:default:ac(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,lc(e)):ac(e)}}function lc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var i=t[n];Nl=i,cc(i,e)}oc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:ml(8,t,t.return),lc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,lc(t));break;default:lc(t)}e=e.sibling}}function cc(e,t){for(;null!==Nl;){var n=Nl;switch(n.tag){case 0:case 11:case 15:ml(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var i=n.memoizedState.cachePool.pool;null!=i&&i.refCount++}break;case 24:Ur(n.memoizedState.cache)}if(null!==(i=n.child))i.return=n,Nl=i;else e:for(n=e;null!==Nl;){var r=(i=Nl).sibling,o=i.return;if(Dl(i),i===n){Nl=null;break e}if(null!==r){r.return=o,Nl=r;break e}Nl=o}}}var dc={getCacheForType:function(e){var t=Ar(Fr),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ar(Fr).controller.signal}},uc="function"==typeof WeakMap?WeakMap:Map,hc=0,pc=null,fc=null,gc=0,mc=0,vc=null,bc=!1,yc=!1,wc=!1,kc=0,_c=0,Sc=0,xc=0,Cc=0,Ec=0,Ic=0,Tc=null,Rc=null,Oc=!1,Ac=0,Nc=0,Lc=1/0,Dc=null,Pc=null,Mc=0,Fc=null,jc=null,Uc=0,$c=0,zc=null,Bc=null,Hc=0,Wc=null;function Vc(){return 2&hc&&0!==gc?gc&-gc:null!==L.T?zd():Fe()}function Gc(){if(0===Ec)if(536870912&gc&&!dr)Ec=536870912;else{var e=Se;!(3932160&(Se<<=1))&&(Se=262144),Ec=e}return null!==(e=No.current)&&(e.flags|=32),Ec}function qc(e,t,n){(e!==pc||2!==mc&&9!==mc)&&null===e.cancelPendingCommit||(ed(e,0),Jc(e,gc,Ec,!1)),Ae(e,n),2&hc&&e===pc||(e===pc&&(!(2&hc)&&(xc|=n),4===_c&&Jc(e,gc,Ec,!1)),Dd(e))}function Kc(e,t,n){if(6&hc)throw Error(a(327));for(var i=!n&&!(127&t)&&0===(t&e.expiredLanes)||Ie(e,t),r=i?function(e,t){var n=hc;hc|=2;var i=id(),r=rd();pc!==e||gc!==t?(Dc=null,Lc=se()+500,ed(e,t)):yc=Ie(e,t);e:for(;;)try{if(0!==mc&&null!==fc){t=fc;var o=vc;t:switch(mc){case 1:mc=0,vc=null,ud(e,t,o,1);break;case 2:case 9:if(eo(o)){mc=0,vc=null,dd(t);break}t=function(){2!==mc&&9!==mc||pc!==e||(mc=7),Dd(e)},o.then(t,t);break e;case 3:mc=7;break e;case 4:mc=5;break e;case 7:eo(o)?(mc=0,vc=null,dd(t)):(mc=0,vc=null,ud(e,t,o,7));break;case 5:var s=null;switch(fc.tag){case 26:s=fc.memoizedState;case 5:case 27:var l=fc;if(s?ih(s):l.stateNode.complete){mc=0,vc=null;var c=l.sibling;if(null!==c)fc=c;else{var d=l.return;null!==d?(fc=d,hd(d)):fc=null}break t}}mc=0,vc=null,ud(e,t,o,5);break;case 6:mc=0,vc=null,ud(e,t,o,6);break;case 8:Zc(),_c=6;break e;default:throw Error(a(462))}}ld();break}catch(t){td(e,t)}return Sr=_r=null,L.H=i,L.A=r,hc=n,null!==fc?0:(pc=null,gc=0,Ri(),_c)}(e,t):ad(e,t,!0),o=i;;){if(0===r){yc&&!i&&Jc(e,t,0,!1);break}if(n=e.current.alternate,!o||Qc(n)){if(2===r){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!=(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;r=Tc;var c=l.current.memoizedState.isDehydrated;if(c&&(ed(l,s).flags|=256),2!==(s=ad(l,s,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=o,xc|=o,r=4;break e}o=Rc,Rc=r,null!==o&&(null===Rc?Rc=o:Rc.push.apply(Rc,o))}r=s}if(o=!1,2!==r)continue}}if(1===r){ed(e,0),Jc(e,t,0,!0);break}e:{switch(i=e,o=r){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Jc(i,t,Ec,!bc);break e;case 2:Rc=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(r=Ac+300-se())){if(Jc(i,t,Ec,!bc),0!==Ee(i,0,!0))break e;Uc=t,i.timeoutHandle=wu(Yc.bind(null,i,n,Rc,Dc,Oc,t,Ec,xc,Ic,bc,o,"Throttled",-0,0),r)}else Yc(i,n,Rc,Dc,Oc,t,Ec,xc,Ic,bc,o,null,-0,0)}break}r=ad(e,t,!1),o=!1}Dd(e)}function Yc(e,t,n,i,r,o,a,s,l,c,d,u,h,p){if(e.timeoutHandle=-1,8192&(u=t.subtreeFlags)||!(16785408&~u)){rc(t,o,u={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:At});var f=(62914560&o)===o?Ac-se():(4194048&o)===o?Nc-se():0;if(null!==(f=function(e,t){return e.stylesheets&&0===e.count&&sh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===rh&&(rh=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var r=n[i],o=r.transferSize,a=r.initiatorType,s=r.duration;if(o&&s&&hu(a)){for(a=0,s=r.responseEnd,i+=1;i<n.length;i++){var l=n[i],c=l.startTime;if(c>s)break;var d=l.transferSize,u=l.initiatorType;d&&hu(u)&&(a+=d*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--i,t+=8*(o+a)/(r.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"==typeof(e=navigator.connection.downlink)?e:5}());var r=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&sh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}(u,f)))return Uc=o,e.cancelPendingCommit=f(fd.bind(null,e,t,o,n,i,r,a,s,l,d,u,null,h,p)),void Jc(e,o,a,!c)}fd(e,t,o,n,i,r,a,s,l)}function Qc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!Jn(o(),r))return!1}catch(e){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jc(e,t,n,i){t&=~Cc,t&=~xc,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var o=31-ye(r),a=1<<o;i[o]=-1,r&=~a}0!==n&&Ne(e,n,t)}function Xc(){return!!(6&hc)||(Pd(0,!1),!1)}function Zc(){if(null!==fc){if(0===mc)var e=fc.return;else Sr=_r=null,aa(e=fc),ao=null,so=0,e=fc;for(;null!==e;)fl(e.alternate,e),e=e.return;fc=null}}function ed(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ku(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Uc=0,Zc(),pc=e,fc=n=Ui(e.current,null),gc=t,mc=0,vc=null,bc=!1,yc=Ie(e,t),wc=!1,Ic=Ec=Cc=xc=Sc=_c=0,Rc=Tc=null,Oc=!1,8&t&&(t|=32&t);var i=e.entangledLanes;if(0!==i)for(e=e.entanglements,i&=t;0<i;){var r=31-ye(i),o=1<<r;t|=e[r],i&=~o}return kc=t,Ri(),n}function td(e,t){Bo=null,L.H=fs,t===Qr||t===Xr?(t=ro(),mc=3):t===Jr?(t=ro(),mc=4):mc=t===As?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===fc&&(_c=1,Es(e,qi(t,e.current)))}function nd(){var e=No.current;return null===e||((4194048&gc)===gc?null===Lo:!!((62914560&gc)===gc||536870912&gc)&&e===Lo)}function id(){var e=L.H;return L.H=fs,null===e?fs:e}function rd(){var e=L.A;return L.A=dc,e}function od(){_c=4,bc||(4194048&gc)!==gc&&null!==No.current||(yc=!0),!(134217727&Sc)&&!(134217727&xc)||null===pc||Jc(pc,gc,Ec,!1)}function ad(e,t,n){var i=hc;hc|=2;var r=id(),o=rd();pc===e&&gc===t||(Dc=null,ed(e,t)),t=!1;var a=_c;e:for(;;)try{if(0!==mc&&null!==fc){var s=fc,l=vc;switch(mc){case 8:Zc(),a=6;break e;case 3:case 2:case 9:case 6:null===No.current&&(t=!0);var c=mc;if(mc=0,vc=null,ud(e,s,l,c),n&&yc){a=0;break e}break;default:c=mc,mc=0,vc=null,ud(e,s,l,c)}}sd(),a=_c;break}catch(t){td(e,t)}return t&&e.shellSuspendCounter++,Sr=_r=null,hc=i,L.H=r,L.A=o,null===fc&&(pc=null,gc=0,Ri()),a}function sd(){for(;null!==fc;)cd(fc)}function ld(){for(;null!==fc&&!oe();)cd(fc)}function cd(e){var t=ol(e.alternate,e,kc);e.memoizedProps=e.pendingProps,null===t?hd(e):fc=t}function dd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ws(n,t,t.pendingProps,t.type,void 0,gc);break;case 11:t=Ws(n,t,t.pendingProps,t.type.render,t.ref,gc);break;case 5:aa(t);default:fl(n,t),t=ol(n,t=fc=$i(t,kc),kc)}e.memoizedProps=e.pendingProps,null===t?hd(e):fc=t}function ud(e,t,n,i){Sr=_r=null,aa(t),ao=null,so=0;var r=t.return;try{if(function(e,t,n,i,r){if(n.flags|=32768,null!==i&&"object"==typeof i&&"function"==typeof i.then){if(null!==(t=n.alternate)&&Tr(t,n,r,!0),null!==(n=No.current)){switch(n.tag){case 31:case 13:return null===Lo?od():null===n.alternate&&0===_c&&(_c=3),n.flags&=-257,n.flags|=65536,n.lanes=r,i===Zr?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([i]):t.add(i),Sd(e,i,r)),!1;case 22:return n.flags|=65536,i===Zr?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([i]):n.add(i),Sd(e,i,r)),!1}throw Error(a(435,n.tag))}return Sd(e,i,r),od(),!1}if(dr)return null!==(t=No.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==pr&&wr(qi(e=Error(a(422),{cause:i}),n))):(i!==pr&&wr(qi(t=Error(a(423),{cause:i}),n)),(e=e.current.alternate).flags|=65536,r&=-r,e.lanes|=r,i=qi(i,n),ko(e,r=Ts(e.stateNode,i,r)),4!==_c&&(_c=2)),!1;var o=Error(a(520),{cause:i});if(o=qi(o,n),null===Tc?Tc=[o]:Tc.push(o),4!==_c&&(_c=2),null===t)return!0;i=qi(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,ko(n,e=Ts(n.stateNode,i,e)),!1;case 1:if(t=n.type,o=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===o||"function"!=typeof o.componentDidCatch||null!==Pc&&Pc.has(o))))return n.flags|=65536,r&=-r,n.lanes|=r,Os(r=Rs(r),e,n,i),ko(n,r),!1}n=n.return}while(null!==n);return!1}(e,r,t,n,gc))return _c=1,Es(e,qi(n,e.current)),void(fc=null)}catch(t){if(null!==r)throw fc=r,t;return _c=1,Es(e,qi(n,e.current)),void(fc=null)}32768&t.flags?(dr||1===i?e=!0:yc||536870912&gc?e=!1:(bc=e=!0,(2===i||9===i||3===i||6===i)&&null!==(i=No.current)&&13===i.tag&&(i.flags|=16384)),pd(t,e)):hd(t)}function hd(e){var t=e;do{if(32768&t.flags)return void pd(t,bc);e=t.return;var n=hl(t.alternate,t,kc);if(null!==n)return void(fc=n);if(null!==(t=t.sibling))return void(fc=t);fc=t=e}while(null!==t);0===_c&&(_c=5)}function pd(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(fc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(fc=e);fc=e=n}while(null!==e);_c=6,fc=null}function fd(e,t,n,i,r,o,s,l,c){e.cancelPendingCommit=null;do{yd()}while(0!==Mc);if(6&hc)throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,function(e,t,n,i,r,o){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var d=31-ye(n),u=1<<d;s[d]=0,l[d]=-1;var h=c[d];if(null!==h)for(c[d]=null,d=0;d<h.length;d++){var p=h[d];null!==p&&(p.lane&=-536870913)}n&=~u}0!==i&&Ne(e,i,0),0!==o&&0===r&&0!==e.tag&&(e.suspendedLanes|=o&~(a&~t))}(e,n,o|=Ti,s,l,c),e===pc&&(fc=pc=null,gc=0),jc=t,Fc=e,Uc=n,$c=o,zc=r,Bc=i,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ie(ue,function(){return wd(),null})):(e.callbackNode=null,e.callbackPriority=0),i=!!(13878&t.flags),13878&t.subtreeFlags||i){i=L.T,L.T=null,r=D.p,D.p=2,s=hc,hc|=4;try{!function(e,t){if(e=e.containerInfo,pu=mh,ii(e=ni(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,d=0,u=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==r&&3!==h.nodeType||(l=s+r),h!==o||0!==i&&3!==h.nodeType||(c=s+i),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++d===r&&(l=s),p===o&&++u===i&&(c=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(fu={focusedElem:e,selectionRange:n},mh=!1,Nl=t;null!==Nl;)if(e=(t=Nl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Nl=e;else for(;null!==Nl;){switch(o=(t=Nl).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(r=e[n]).ref.impl=r.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==o){e=void 0,n=t,r=o.memoizedProps,o=o.memoizedState,i=n.stateNode;try{var g=_s(n.type,r);e=i.getSnapshotBeforeUpdate(g,o),i.__reactInternalSnapshotBeforeUpdate=e}catch(e){_d(n,n.return,e)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Tu(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tu(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,Nl=e;break}Nl=t.return}}(e,t)}finally{hc=s,D.p=r,L.T=i}}Mc=1,gd(),md(),vd()}}function gd(){if(1===Mc){Mc=0;var e=Fc,t=jc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=L.T,L.T=null;var i=D.p;D.p=2;var r=hc;hc|=4;try{Wl(t,e);var o=fu,a=ni(e.containerInfo),s=o.focusedElem,l=o.selectionRange;if(a!==s&&s&&s.ownerDocument&&ti(s.ownerDocument.documentElement,s)){if(null!==l&&ii(s)){var c=l.start,d=l.end;if(void 0===d&&(d=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(d,s.value.length);else{var u=s.ownerDocument||document,h=u&&u.defaultView||window;if(h.getSelection){var p=h.getSelection(),f=s.textContent.length,g=Math.min(l.start,f),m=void 0===l.end?g:Math.min(l.end,f);!p.extend&&g>m&&(a=m,m=g,g=a);var v=ei(s,g),b=ei(s,m);if(v&&b&&(1!==p.rangeCount||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var y=u.createRange();y.setStart(v.node,v.offset),p.removeAllRanges(),g>m?(p.addRange(y),p.extend(b.node,b.offset)):(y.setEnd(b.node,b.offset),p.addRange(y))}}}}for(u=[],p=s;p=p.parentNode;)1===p.nodeType&&u.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<u.length;s++){var w=u[s];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}mh=!!pu,fu=pu=null}finally{hc=r,D.p=i,L.T=n}}e.current=t,Mc=2}}function md(){if(2===Mc){Mc=0;var e=Fc,t=jc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=L.T,L.T=null;var i=D.p;D.p=2;var r=hc;hc|=4;try{Ll(e,t.alternate,t)}finally{hc=r,D.p=i,L.T=n}}Mc=3}}function vd(){if(4===Mc||3===Mc){Mc=0,ae();var e=Fc,t=jc,n=Uc,i=Bc;10256&t.subtreeFlags||10256&t.flags?Mc=5:(Mc=0,jc=Fc=null,bd(e,e.pendingLanes));var r=e.pendingLanes;if(0===r&&(Pc=null),Me(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(me,t,void 0,!(128&~t.current.flags))}catch(e){}if(null!==i){t=L.T,r=D.p,D.p=2,L.T=null;try{for(var o=e.onRecoverableError,a=0;a<i.length;a++){var s=i[a];o(s.value,{componentStack:s.stack})}}finally{L.T=t,D.p=r}}3&Uc&&yd(),Dd(e),r=e.pendingLanes,261930&n&&42&r?e===Wc?Hc++:(Hc=0,Wc=e):Hc=0,Pd(0,!1)}}function bd(e,t){0===(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,Ur(t))}function yd(){return gd(),md(),vd(),wd()}function wd(){if(5!==Mc)return!1;var e=Fc,t=$c;$c=0;var n=Me(Uc),i=L.T,r=D.p;try{D.p=32>n?32:n,L.T=null,n=zc,zc=null;var o=Fc,s=Uc;if(Mc=0,jc=Fc=null,Uc=0,6&hc)throw Error(a(331));var l=hc;if(hc|=4,sc(o.current),Zl(o,o.current,s,n),hc=l,Pd(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(me,o)}catch(e){}return!0}finally{D.p=r,L.T=i,bd(e,t)}}function kd(e,t,n){t=qi(n,t),null!==(e=yo(e,t=Ts(e.stateNode,t,2),2))&&(Ae(e,2),Dd(e))}function _d(e,t,n){if(3===e.tag)kd(e,e,n);else for(;null!==t;){if(3===t.tag){kd(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===Pc||!Pc.has(i))){e=qi(n,e),null!==(i=yo(t,n=Rs(2),2))&&(Os(n,i,t,e),Ae(i,2),Dd(i));break}}t=t.return}}function Sd(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new uc;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(wc=!0,r.add(n),e=xd.bind(null,e,t,n),t.then(e,e))}function xd(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pc===e&&(gc&n)===n&&(4===_c||3===_c&&(62914560&gc)===gc&&300>se()-Ac?!(2&hc)&&ed(e,0):Cc|=n,Ic===gc&&(Ic=0)),Dd(e)}function Cd(e,t){0===t&&(t=Re()),null!==(e=Ni(e,t))&&(Ae(e,t),Dd(e))}function Ed(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cd(e,n)}function Id(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==i&&i.delete(t),Cd(e,n)}var Td=null,Rd=null,Od=!1,Ad=!1,Nd=!1,Ld=0;function Dd(e){e!==Rd&&null===e.next&&(null===Rd?Td=Rd=e:Rd=Rd.next=e),Ad=!0,Od||(Od=!0,Su(function(){6&hc?ie(ce,Md):Fd()}))}function Pd(e,t){if(!Nd&&Ad){Nd=!0;do{for(var n=!1,i=Td;null!==i;){if(!t)if(0!==e){var r=i.pendingLanes;if(0===r)var o=0;else{var a=i.suspendedLanes,s=i.pingedLanes;o=(1<<31-ye(42|e)+1)-1,o=201326741&(o&=r&~(a&~s))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,$d(i,o))}else o=gc,!(3&(o=Ee(i,i===pc?o:0,null!==i.cancelPendingCommit||-1!==i.timeoutHandle)))||Ie(i,o)||(n=!0,$d(i,o));i=i.next}}while(n);Nd=!1}}function Md(){Fd()}function Fd(){Ad=Od=!1;var e,t=0;0!==Ld&&((e=window.event)&&"popstate"===e.type?e!==yu&&(yu=e,1):(yu=null,0))&&(t=Ld);for(var n=se(),i=null,r=Td;null!==r;){var o=r.next,a=jd(r,n);0===a?(r.next=null,null===i?Td=o:i.next=o,null===o&&(Rd=i)):(i=r,(0!==t||3&a)&&(Ad=!0)),r=o}0!==Mc&&5!==Mc||Pd(t,!1),0!==Ld&&(Ld=0)}function jd(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var a=31-ye(o),s=1<<a,l=r[a];-1===l?0!==(s&n)&&0===(s&i)||(r[a]=Te(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}if(n=gc,n=Ee(e,e===(t=pc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),i=e.callbackNode,0===n||e===t&&(2===mc||9===mc)||null!==e.cancelPendingCommit)return null!==i&&null!==i&&re(i),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Ie(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==i&&re(i),Me(n)){case 2:case 8:n=de;break;case 32:default:n=ue;break;case 268435456:n=pe}return i=Ud.bind(null,e),n=ie(n,i),e.callbackPriority=t,e.callbackNode=n,t}return null!==i&&null!==i&&re(i),e.callbackPriority=2,e.callbackNode=null,2}function Ud(e,t){if(0!==Mc&&5!==Mc)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(yd()&&e.callbackNode!==n)return null;var i=gc;return 0===(i=Ee(e,e===pc?i:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Kc(e,i,t),jd(e,se()),null!=e.callbackNode&&e.callbackNode===n?Ud.bind(null,e):null)}function $d(e,t){if(yd())return null;Kc(e,t,!0)}function zd(){if(0===Ld){var e=Br;0===e&&(e=_e,!(261888&(_e<<=1))&&(_e=256)),Ld=e}return Ld}function Bd(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Ot(""+e)}function Hd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Wd=0;Wd<Si.length;Wd++){var Vd=Si[Wd];xi(Vd.toLowerCase(),"on"+(Vd[0].toUpperCase()+Vd.slice(1)))}xi(gi,"onAnimationEnd"),xi(mi,"onAnimationIteration"),xi(vi,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(bi,"onTransitionRun"),xi(yi,"onTransitionStart"),xi(wi,"onTransitionCancel"),xi(ki,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),nt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nt("onBeforeInput",["compositionend","keypress","textInput","paste"]),nt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qd=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gd));function Kd(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var a=i.length-1;0<=a;a--){var s=i[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&r.isPropagationStopped())break e;o=s,r.currentTarget=c;try{o(r)}catch(e){Ci(e)}r.currentTarget=null,o=l}else for(a=0;a<i.length;a++){if(l=(s=i[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&r.isPropagationStopped())break e;o=s,r.currentTarget=c;try{o(r)}catch(e){Ci(e)}r.currentTarget=null,o=l}}}}function Yd(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var i=e+"__bubble";n.has(i)||(Zd(t,e,2,!1),n.add(i))}function Qd(e,t,n){var i=0;t&&(i|=4),Zd(n,e,i,t)}var Jd="_reactListening"+Math.random().toString(36).slice(2);function Xd(e){if(!e[Jd]){e[Jd]=!0,et.forEach(function(t){"selectionchange"!==t&&(qd.has(t)||Qd(t,!1,e),Qd(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Jd]||(t[Jd]=!0,Qd("selectionchange",!1,t))}}function Zd(e,t,n,i){switch(Sh(t)){case 2:var r=vh;break;case 8:r=bh;break;default:r=yh}n=r.bind(null,t,n,e),r=void 0,!zt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function eu(e,t,n,i,r){var o=i;if(!(1&t||2&t||null===i))e:for(;;){if(null===i)return;var a=i.tag;if(3===a||4===a){var l=i.stateNode.containerInfo;if(l===r)break;if(4===a)for(a=i.return;null!==a;){var c=a.tag;if((3===c||4===c)&&a.stateNode.containerInfo===r)return;a=a.return}for(;null!==l;){if(null===(a=Ye(l)))return;if(5===(c=a.tag)||6===c||26===c||27===c){i=o=a;continue e}l=l.parentNode}}i=i.return}jt(function(){var i=o,r=Lt(n),a=[];e:{var l=_i.get(e);if(void 0!==l){var c=tn,d=e;switch(e){case"keypress":if(0===qt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":d="focus",c=ln;break;case"focusout":d="blur",c=ln;break;case"beforeblur":case"afterblur":c=ln;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=an;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=sn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=yn;break;case gi:case mi:case vi:c=cn;break;case ki:c=wn;break;case"scroll":case"scrollend":c=rn;break;case"wheel":c=kn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=_n}var u=!!(4&t),h=!u&&("scroll"===e||"scrollend"===e),p=u?null!==l?l+"Capture":null:l;u=[];for(var f,g=i;null!==g;){var m=g;if(f=m.stateNode,5!==(m=m.tag)&&26!==m&&27!==m||null===f||null===p||null!=(m=Ut(g,p))&&u.push(tu(g,m,f)),h)break;g=g.return}0<u.length&&(l=new c(l,d,null,n,r),a.push({event:l,listeners:u}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===Nt||!(d=n.relatedTarget||n.fromElement)||!Ye(d)&&!d[Be])&&(c||l)&&(l=r.window===r?r:(l=r.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=i,null!==(d=(d=n.relatedTarget||n.toElement)?Ye(d):null)&&(h=s(d),u=d.tag,d!==h||5!==u&&27!==u&&6!==u)&&(d=null)):(c=null,d=i),c!==d)){if(u=an,m="onMouseLeave",p="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(u=bn,m="onPointerLeave",p="onPointerEnter",g="pointer"),h=null==c?l:Je(c),f=null==d?l:Je(d),(l=new u(m,g+"leave",c,n,r)).target=h,l.relatedTarget=f,m=null,Ye(r)===i&&((u=new u(p,g+"enter",d,n,r)).target=f,u.relatedTarget=h,m=u),h=m,c&&d)e:{for(u=iu,g=d,f=0,m=p=c;m;m=u(m))f++;m=0;for(var v=g;v;v=u(v))m++;for(;0<f-m;)p=u(p),f--;for(;0<m-f;)g=u(g),m--;for(;f--;){if(p===g||null!==g&&p===g.alternate){u=p;break e}p=u(p),g=u(g)}u=null}else u=null;null!==c&&ru(a,l,c,u,!1),null!==d&&null!==h&&ru(a,h,d,u,!0)}if("select"===(c=(l=i?Je(i):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var b=$n;else if(Dn(l))if(zn)b=Qn;else{b=Kn;var y=qn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?i&&It(i.elementType)&&(b=$n):b=Yn;switch(b&&(b=b(e,i))?Pn(a,b,n,r):(y&&y(e,l,i),"focusout"===e&&i&&"number"===l.type&&null!=i.memoizedProps.value&&yt(l,"number",l.value)),y=i?Je(i):window,e){case"focusin":(Dn(y)||"true"===y.contentEditable)&&(oi=y,ai=i,si=null);break;case"focusout":si=ai=oi=null;break;case"mousedown":li=!0;break;case"contextmenu":case"mouseup":case"dragend":li=!1,ci(a,n,r);break;case"selectionchange":if(ri)break;case"keydown":case"keyup":ci(a,n,r)}var w;if(xn)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Nn?On(e,n)&&(k="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(k="onCompositionStart");k&&(In&&"ko"!==n.locale&&(Nn||"onCompositionStart"!==k?"onCompositionEnd"===k&&Nn&&(w=Gt()):(Wt="value"in(Ht=r)?Ht.value:Ht.textContent,Nn=!0)),0<(y=nu(i,k)).length&&(k=new un(k,e,null,n,r),a.push({event:k,listeners:y}),(w||null!==(w=An(n)))&&(k.data=w))),(w=En?function(e,t){switch(e){case"compositionend":return An(t);case"keypress":return 32!==t.which?null:(Rn=!0,Tn);case"textInput":return(e=t.data)===Tn&&Rn?null:e;default:return null}}(e,n):function(e,t){if(Nn)return"compositionend"===e||!xn&&On(e,t)?(e=Gt(),Vt=Wt=Ht=null,Nn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return In&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(k=nu(i,"onBeforeInput")).length&&(y=new un("onBeforeInput","beforeinput",null,n,r),a.push({event:y,listeners:k}),y.data=w),function(e,t,n,i,r){if("submit"===t&&n&&n.stateNode===r){var o=Bd((r[ze]||null).action),a=i.submitter;a&&null!==(t=(t=a[ze]||null)?Bd(t.formAction):a.getAttribute("formAction"))&&(o=t,a=null);var s=new tn("action","action",null,i,r);e.push({event:s,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(0!==Ld){var e=a?Hd(r,a):new FormData(r);es(n,{pending:!0,data:e,method:r.method,action:o},null,e)}}else"function"==typeof o&&(s.preventDefault(),e=a?Hd(r,a):new FormData(r),es(n,{pending:!0,data:e,method:r.method,action:o},o,e))},currentTarget:r}]})}}(a,e,i,n,r)}Kd(a,t)})}function tu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nu(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,o=r.stateNode;if(5!==(r=r.tag)&&26!==r&&27!==r||null===o||(null!=(r=Ut(e,n))&&i.unshift(tu(e,r,o)),null!=(r=Ut(e,t))&&i.push(tu(e,r,o))),3===e.tag)return i;e=e.return}return[]}function iu(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function ru(e,t,n,i,r){for(var o=t._reactName,a=[];null!==n&&n!==i;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===i)break;5!==s&&26!==s&&27!==s||null===c||(l=c,r?null!=(c=Ut(n,o))&&a.unshift(tu(n,c,l)):r||null!=(c=Ut(n,o))&&a.push(tu(n,c,l))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var ou=/\r\n?/g,au=/\u0000|\uFFFD/g;function su(e){return("string"==typeof e?e:""+e).replace(ou,"\n").replace(au,"")}function lu(e,t){return t=su(t),su(e)===t}function cu(e,t,n,i,r,o){switch(n){case"children":"string"==typeof i?"body"===t||"textarea"===t&&""===i||St(e,i):("number"==typeof i||"bigint"==typeof i)&&"body"!==t&&St(e,""+i);break;case"className":lt(e,"class",i);break;case"tabIndex":lt(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":lt(e,n,i);break;case"style":Et(e,i,o);break;case"data":if("object"!==t){lt(e,"data",i);break}case"src":case"href":if(""===i&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==i||"function"==typeof i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Ot(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if("function"==typeof i){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"==typeof o&&("formAction"===n?("input"!==t&&cu(e,t,"name",r.name,r,null),cu(e,t,"formEncType",r.formEncType,r,null),cu(e,t,"formMethod",r.formMethod,r,null),cu(e,t,"formTarget",r.formTarget,r,null)):(cu(e,t,"encType",r.encType,r,null),cu(e,t,"method",r.method,r,null),cu(e,t,"target",r.target,r,null))),null==i||"symbol"==typeof i||"boolean"==typeof i){e.removeAttribute(n);break}i=Ot(""+i),e.setAttribute(n,i);break;case"onClick":null!=i&&(e.onclick=At);break;case"onScroll":null!=i&&Yd("scroll",e);break;case"onScrollEnd":null!=i&&Yd("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(a(61));if(null!=(n=i.__html)){if(null!=r.children)throw Error(a(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"muted":e.muted=i&&"function"!=typeof i&&"symbol"!=typeof i;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==i||"function"==typeof i||"boolean"==typeof i||"symbol"==typeof i){e.removeAttribute("xlink:href");break}n=Ot(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===i?e.setAttribute(n,""):!1!==i&&null!=i&&"function"!=typeof i&&"symbol"!=typeof i?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":null==i||"function"==typeof i||"symbol"==typeof i||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Yd("beforetoggle",e),Yd("toggle",e),st(e,"popover",i);break;case"xlinkActuate":ct(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":ct(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":ct(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":ct(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":ct(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":ct(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":ct(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":ct(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":ct(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":st(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&st(e,n=Tt.get(n)||n,i)}}function du(e,t,n,i,r,o){switch(n){case"style":Et(e,i,o);break;case"dangerouslySetInnerHTML":if(null!=i){if("object"!=typeof i||!("__html"in i))throw Error(a(61));if(null!=(n=i.__html)){if(null!=r.children)throw Error(a(60));e.innerHTML=n}}break;case"children":"string"==typeof i?St(e,i):("number"==typeof i||"bigint"==typeof i)&&St(e,""+i);break;case"onScroll":null!=i&&Yd("scroll",e);break;case"onScrollEnd":null!=i&&Yd("scrollend",e);break;case"onClick":null!=i&&(e.onclick=At);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:tt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),"function"==typeof(o=null!=(o=e[ze]||null)?o[n]:null)&&e.removeEventListener(t,o,r),"function"!=typeof i)?n in e?e[n]=i:!0===i?e.setAttribute(n,""):st(e,n,i):("function"!=typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,r)))}}function uu(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Yd("error",e),Yd("load",e);var i,r=!1,o=!1;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(null!=s)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:cu(e,t,i,s,n,null)}}return o&&cu(e,t,"srcSet",n.srcSet,n,null),void(r&&cu(e,t,"src",n.src,n,null));case"input":Yd("invalid",e);var l=i=s=o=null,c=null,d=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(null!=u)switch(r){case"name":o=u;break;case"type":s=u;break;case"checked":c=u;break;case"defaultChecked":d=u;break;case"value":i=u;break;case"defaultValue":l=u;break;case"children":case"dangerouslySetInnerHTML":if(null!=u)throw Error(a(137,t));break;default:cu(e,t,r,u,n,null)}}return void bt(e,i,l,c,d,s,o,!1);case"select":for(o in Yd("invalid",e),r=s=i=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":r=l;default:cu(e,t,o,l,n,null)}return t=i,n=s,e.multiple=!!r,void(null!=t?wt(e,!!r,t,!1):null!=n&&wt(e,!!r,n,!0));case"textarea":for(s in Yd("invalid",e),i=o=r=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":r=l;break;case"defaultValue":o=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(a(91));break;default:cu(e,t,s,l,n,null)}return void _t(e,r,o,i);case"option":for(c in n)n.hasOwnProperty(c)&&null!=(r=n[c])&&("selected"===c?e.selected=r&&"function"!=typeof r&&"symbol"!=typeof r:cu(e,t,c,r,n,null));return;case"dialog":Yd("beforetoggle",e),Yd("toggle",e),Yd("cancel",e),Yd("close",e);break;case"iframe":case"object":Yd("load",e);break;case"video":case"audio":for(r=0;r<Gd.length;r++)Yd(Gd[r],e);break;case"image":Yd("error",e),Yd("load",e);break;case"details":Yd("toggle",e);break;case"embed":case"source":case"link":Yd("error",e),Yd("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(d in n)if(n.hasOwnProperty(d)&&null!=(r=n[d]))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:cu(e,t,d,r,n,null)}return;default:if(It(t)){for(u in n)n.hasOwnProperty(u)&&void 0!==(r=n[u])&&du(e,t,u,r,n,void 0);return}}for(l in n)n.hasOwnProperty(l)&&null!=(r=n[l])&&cu(e,t,l,r,n,null)}function hu(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var pu=null,fu=null;function gu(e){return 9===e.nodeType?e:e.ownerDocument}function mu(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vu(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function bu(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var yu=null,wu="function"==typeof setTimeout?setTimeout:void 0,ku="function"==typeof clearTimeout?clearTimeout:void 0,_u="function"==typeof Promise?Promise:void 0,Su="function"==typeof queueMicrotask?queueMicrotask:void 0!==_u?function(e){return _u.resolve(null).then(e).catch(xu)}:wu;function xu(e){setTimeout(function(){throw e})}function Cu(e){return"head"===e}function Eu(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)||"/&"===n){if(0===i)return e.removeChild(r),void zh(t);i--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)i++;else if("html"===n)Fu(e.ownerDocument.documentElement);else if("head"===n){Fu(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var a=o.nextSibling,s=o.nodeName;o[qe]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=a}}else"body"===n&&Fu(e.ownerDocument.body);n=r}while(n);zh(t)}function Iu(e,t){var n=e;e=0;do{var i=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=i}while(n)}function Tu(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Tu(n),Ke(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Ru(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Nu(e.nextSibling)))return null}return e}function Ou(e){return"$?"===e.data||"$~"===e.data}function Au(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Nu(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Lu=null;function Du(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Nu(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Pu(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function Mu(e,t,n){switch(t=gu(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function Fu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ke(e)}var ju=new Map,Uu=new Set;function $u(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var zu=D.d;D.d={f:function(){var e=zu.f(),t=Xc();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?ns(t):zu.r(e)},D:function(e){zu.D(e),Hu("dns-prefetch",e,null)},C:function(e,t){zu.C(e,t),Hu("preconnect",e,t)},L:function(e,t,n){zu.L(e,t,n);var i=Bu;if(i&&e&&t){var r='link[rel="preload"][as="'+mt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(r+='[imagesrcset="'+mt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(r+='[imagesizes="'+mt(n.imageSizes)+'"]')):r+='[href="'+mt(e)+'"]';var o=r;switch(t){case"style":o=Vu(e);break;case"script":o=Ku(e)}ju.has(o)||(e=h({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),ju.set(o,e),null!==i.querySelector(r)||"style"===t&&i.querySelector(Gu(o))||"script"===t&&i.querySelector(Yu(o))||(uu(t=i.createElement("link"),"link",e),Ze(t),i.head.appendChild(t)))}},m:function(e,t){zu.m(e,t);var n=Bu;if(n&&e){var i=t&&"string"==typeof t.as?t.as:"script",r='link[rel="modulepreload"][as="'+mt(i)+'"][href="'+mt(e)+'"]',o=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ku(e)}if(!ju.has(o)&&(e=h({rel:"modulepreload",href:e},t),ju.set(o,e),null===n.querySelector(r))){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Yu(o)))return}uu(i=n.createElement("link"),"link",e),Ze(i),n.head.appendChild(i)}}},X:function(e,t){zu.X(e,t);var n=Bu;if(n&&e){var i=Xe(n).hoistableScripts,r=Ku(e),o=i.get(r);o||((o=n.querySelector(Yu(r)))||(e=h({src:e,async:!0},t),(t=ju.get(r))&&Zu(e,t),Ze(o=n.createElement("script")),uu(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}},S:function(e,t,n){zu.S(e,t,n);var i=Bu;if(i&&e){var r=Xe(i).hoistableStyles,o=Vu(e);t=t||"default";var a=r.get(o);if(!a){var s={loading:0,preload:null};if(a=i.querySelector(Gu(o)))s.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ju.get(o))&&Xu(e,n);var l=a=i.createElement("link");Ze(l),uu(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ju(a,t,i)}a={type:"stylesheet",instance:a,count:1,state:s},r.set(o,a)}}},M:function(e,t){zu.M(e,t);var n=Bu;if(n&&e){var i=Xe(n).hoistableScripts,r=Ku(e),o=i.get(r);o||((o=n.querySelector(Yu(r)))||(e=h({src:e,async:!0,type:"module"},t),(t=ju.get(r))&&Zu(e,t),Ze(o=n.createElement("script")),uu(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(r,o))}}};var Bu="undefined"==typeof document?null:document;function Hu(e,t,n){var i=Bu;if(i&&"string"==typeof t&&t){var r=mt(t);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof n&&(r+='[crossorigin="'+n+'"]'),Uu.has(r)||(Uu.add(r),e={rel:e,crossOrigin:n,href:t},null===i.querySelector(r)&&(uu(t=i.createElement("link"),"link",e),Ze(t),i.head.appendChild(t)))}}function Wu(e,t,n,i){var r,o,s,l,c=(c=V.current)?$u(c):null;if(!c)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Vu(n.href),(i=(n=Xe(c).hoistableStyles).get(t))||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Vu(n.href);var d=Xe(c).hoistableStyles,u=d.get(e);if(u||(c=c.ownerDocument||c,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,u),(d=c.querySelector(Gu(e)))&&!d._p&&(u.instance=d,u.state.loading=5),ju.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ju.set(e,n),d||(r=c,o=e,s=n,l=u.state,r.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=r.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),uu(o,"link",s),Ze(o),r.head.appendChild(o))))),t&&null===i)throw Error(a(528,""));return u}if(t&&null!==i)throw Error(a(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Ku(n),(i=(n=Xe(c).hoistableScripts).get(t))||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Vu(e){return'href="'+mt(e)+'"'}function Gu(e){return'link[rel="stylesheet"]['+e+"]"}function qu(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Ku(e){return'[src="'+mt(e)+'"]'}function Yu(e){return"script[async]"+e}function Qu(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+mt(n.href)+'"]');if(i)return t.instance=i,Ze(i),i;var r=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Ze(i=(e.ownerDocument||e).createElement("style")),uu(i,"style",r),Ju(i,n.precedence,e),t.instance=i;case"stylesheet":r=Vu(n.href);var o=e.querySelector(Gu(r));if(o)return t.state.loading|=4,t.instance=o,Ze(o),o;i=qu(n),(r=ju.get(r))&&Xu(i,r),Ze(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),uu(o,"link",i),t.state.loading|=4,Ju(o,n.precedence,e),t.instance=o;case"script":return o=Ku(n.src),(r=e.querySelector(Yu(o)))?(t.instance=r,Ze(r),r):(i=n,(r=ju.get(o))&&Zu(i=h({},n),r),Ze(r=(e=e.ownerDocument||e).createElement("script")),uu(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(i=t.instance,t.state.loading|=4,Ju(i,n.precedence,e));return t.instance}function Ju(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,o=r,a=0;a<i.length;a++){var s=i[a];if(s.dataset.precedence===t)o=s;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Xu(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Zu(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var eh=null;function th(e,t,n){if(null===eh){var i=new Map,r=eh=new Map;r.set(n,i)}else(i=(r=eh).get(n))||(i=new Map,r.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var o=n[r];if(!(o[qe]||o[$e]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var a=o.getAttribute(t)||"";a=e+a;var s=i.get(a);s?s.push(o):i.set(a,[o])}}return i}function nh(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function ih(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var rh=0;function oh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)sh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var ah=null;function sh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,ah=new Map,t.forEach(lh,e),ah=null,oh.call(e))}function lh(e,t){if(!(4&t.state.loading)){var n=ah.get(e);if(n)var i=n.get(null);else{n=new Map,ah.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var a=r[o];"LINK"!==a.nodeName&&"not all"===a.getAttribute("media")||(n.set(a.dataset.precedence,a),i=a)}i&&n.set(null,i)}a=(r=t.instance).getAttribute("data-precedence"),(o=n.get(a)||i)===i&&n.set(null,r),n.set(a,r),this.count++,i=oh.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),o?o.parentNode.insertBefore(r,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(r,e.firstChild),t.state.loading|=4}}var ch={$$typeof:w,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function dh(e,t,n,i,r,o,a,s,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Oe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oe(0),this.hiddenUpdates=Oe(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function uh(e,t,n,i,r,o){r=function(e){return e?e=Pi:Pi}(r),null===i.context?i.context=r:i.pendingContext=r,(i=bo(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(i.callback=o),null!==(n=yo(e,i,t))&&(qc(n,0,t),wo(n,e,t))}function hh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ph(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function fh(e){if(13===e.tag||31===e.tag){var t=Ni(e,67108864);null!==t&&qc(t,0,67108864),ph(e,67108864)}}function gh(e){if(13===e.tag||31===e.tag){var t=Vc(),n=Ni(e,t=Pe(t));null!==n&&qc(n,0,t),ph(e,t)}}var mh=!0;function vh(e,t,n,i){var r=L.T;L.T=null;var o=D.p;try{D.p=2,yh(e,t,n,i)}finally{D.p=o,L.T=r}}function bh(e,t,n,i){var r=L.T;L.T=null;var o=D.p;try{D.p=8,yh(e,t,n,i)}finally{D.p=o,L.T=r}}function yh(e,t,n,i){if(mh){var r=wh(i);if(null===r)eu(e,t,i,kh,n),Nh(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Ch=Lh(Ch,e,t,n,i,r),!0;case"dragenter":return Eh=Lh(Eh,e,t,n,i,r),!0;case"mouseover":return Ih=Lh(Ih,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return Th.set(o,Lh(Th.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,Rh.set(o,Lh(Rh.get(o)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(Nh(e,i),4&t&&-1<Ah.indexOf(e)){for(;null!==r;){var o=Qe(r);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var a=Ce(o.pendingLanes);if(0!==a){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;a;){var l=1<<31-ye(a);s.entanglements[1]|=l,a&=~l}Dd(o),!(6&hc)&&(Lc=se()+500,Pd(0,!1))}}break;case 31:case 13:null!==(s=Ni(o,2))&&qc(s,0,2),Xc(),ph(o,2)}if(null===(o=wh(i))&&eu(e,t,i,kh,n),o===r)break;r=o}null!==r&&i.stopPropagation()}else eu(e,t,i,null,n)}}function wh(e){return _h(e=Lt(e))}var kh=null;function _h(e){if(kh=null,null!==(e=Ye(e))){var t=s(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=l(t)))return e;e=null}else if(31===n){if(null!==(e=c(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return kh=e,null}function Sh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(le()){case ce:return 2;case de:return 8;case ue:case he:return 32;case pe:return 268435456;default:return 32}default:return 32}}var xh=!1,Ch=null,Eh=null,Ih=null,Th=new Map,Rh=new Map,Oh=[],Ah="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Nh(e,t){switch(e){case"focusin":case"focusout":Ch=null;break;case"dragenter":case"dragleave":Eh=null;break;case"mouseover":case"mouseout":Ih=null;break;case"pointerover":case"pointerout":Th.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rh.delete(t.pointerId)}}function Lh(e,t,n,i,r,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},null!==t&&null!==(t=Qe(t))&&fh(t),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Dh(e){var t=Ye(e.target);if(null!==t){var n=s(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=l(n)))return e.blockedOn=t,void je(e.priority,function(){gh(n)})}else if(31===t){if(null!==(t=c(n)))return e.blockedOn=t,void je(e.priority,function(){gh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ph(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=wh(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&fh(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);Nt=i,n.target.dispatchEvent(i),Nt=null,t.shift()}return!0}function Mh(e,t,n){Ph(e)&&n.delete(t)}function Fh(){xh=!1,null!==Ch&&Ph(Ch)&&(Ch=null),null!==Eh&&Ph(Eh)&&(Eh=null),null!==Ih&&Ph(Ih)&&(Ih=null),Th.forEach(Mh),Rh.forEach(Mh)}function jh(e,t){e.blockedOn===t&&(e.blockedOn=null,xh||(xh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Fh)))}var Uh=null;function $h(e){Uh!==e&&(Uh=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],r=e[t+2];if("function"!=typeof i){if(null===_h(i||n))continue;break}var o=Qe(n);null!==o&&(e.splice(t,3),t-=3,es(o,{pending:!0,data:r,method:n.method,action:i},i,r))}}))}function zh(e){function t(t){return jh(t,e)}null!==Ch&&jh(Ch,e),null!==Eh&&jh(Eh,e),null!==Ih&&jh(Ih,e),Th.forEach(t),Rh.forEach(t);for(var n=0;n<Oh.length;n++){var i=Oh[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Oh.length&&null===(n=Oh[0]).blockedOn;)Dh(n),null===n.blockedOn&&Oh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(i=0;i<n.length;i+=3){var r=n[i],o=n[i+1],a=r[ze]||null;if("function"==typeof o)a||$h(n);else if(a){var s=null;if(o&&o.hasAttribute("formAction")){if(r=o,a=o[ze]||null)s=a.formAction;else if(null!==_h(r))continue}else s=a.action;"function"==typeof s?n[i+1]=s:(n.splice(i,3),i-=3),$h(n)}}}function Bh(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return r=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==r&&(r(),r=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==r&&(r(),r=null)}}}function Hh(e){this._internalRoot=e}function Wh(e){this._internalRoot=e}Wh.prototype.render=Hh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));uh(t.current,Vc(),e,t,null,null)},Wh.prototype.unmount=Hh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uh(e.current,2,null,e,null,null),Xc(),t[Be]=null}},Wh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Oh.length&&0!==t&&t<Oh[n].priority;n++);Oh.splice(n,0,e),0===n&&Dh(e)}};var Vh=r.version;if("19.2.8"!==Vh)throw Error(a(527,Vh,"19.2.8"));D.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=s(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var o=r.alternate;if(null===o){if(null!==(i=r.return)){n=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return d(r),e;if(o===i)return d(r),t;o=o.sibling}throw Error(a(188))}if(n.return!==i.return)n=r,i=o;else{for(var l=!1,c=r.child;c;){if(c===n){l=!0,n=r,i=o;break}if(c===i){l=!0,i=r,n=o;break}c=c.sibling}if(!l){for(c=o.child;c;){if(c===n){l=!0,n=o,i=r;break}if(c===i){l=!0,i=o,n=r;break}c=c.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==i)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(t),null===(e=null!==e?u(e):null)?null:e.stateNode};var Gh={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.8"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var qh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qh.isDisabled&&qh.supportsFiber)try{me=qh.inject(Gh),ve=qh}catch(e){}}t.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(a(299));var n,i=!1,r="",o=Ss,s=xs,l=Cs;return null!=t&&(!0===t.unstable_strictMode&&(i=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(o=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,i,r,o,a,s,l,c,d,u){return e=new dh(e,t,n,a,l,c,d,u,s),t=1,!0===o&&(t|=24),o=Fi(3,null,null,t),e.current=o,o.stateNode=e,(t=jr()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:i,isDehydrated:n,cache:t},mo(o),e}(e,1,!1,null,0,i,r,null,o,s,l,Bh),e[Be]=t.current,Xd(e),new Hh(t)}},6221(e,t,n){"use strict";var i=n(6540);function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal"),l=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(r(299));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=a.p;try{if(l.T=null,a.p=2,e)return e()}finally{l.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,a.d.C(e,t))},t.prefetchDNS=function(e){"string"==typeof e&&a.d.D(e)},t.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,i=c(n,t.crossOrigin),r="string"==typeof t.integrity?t.integrity:void 0,o="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?a.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:i,integrity:r,fetchPriority:o}):"script"===n&&a.d.X(e,{crossOrigin:i,integrity:r,fetchPriority:o,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&a.d.M(e)},t.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,i=c(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:i,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=c(t.as,t.crossOrigin);a.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.2.8"},5338(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1247)},961(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(6221)},9698(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(e,t,i){var r=null;if(void 0!==i&&(r=""+i),void 0!==t.key&&(r=""+t.key),"key"in t)for(var o in i={},t)"key"!==o&&(i[o]=t[o]);else i=t;return t=i.ref,{$$typeof:n,type:e,key:r,ref:void 0!==t?t:null,props:i}}t.Fragment=i,t.jsx=r,t.jsxs=r},9869(e,t){"use strict";var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),f=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}function y(){}function w(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var k=w.prototype=new y;k.constructor=w,m(k,b.prototype),k.isPureReactComponent=!0;var _=Array.isArray;function S(){}var x={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function E(e,t,i){var r=i.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==r?r:null,props:i}}function I(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,i={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return i[e]})):t.toString(36);var n,i}function O(e,t,r,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,d=!1;if(null===e)d=!0;else switch(s){case"bigint":case"string":case"number":d=!0;break;case"object":switch(e.$$typeof){case n:case i:d=!0;break;case h:return O((d=e._init)(e._payload),t,r,o,a)}}if(d)return a=a(e),d=""===o?"."+R(e,0):o,_(a)?(r="",null!=d&&(r=d.replace(T,"$&/")+"/"),O(a,t,r,"",function(e){return e})):null!=a&&(I(a)&&(l=a,c=r+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+d,a=E(l.type,c,l.props)),t.push(a)),1;d=0;var u,p=""===o?".":o+":";if(_(e))for(var g=0;g<e.length;g++)d+=O(o=e[g],t,r,s=p+R(o,g),a);else if("function"==typeof(g=null===(u=e)||"object"!=typeof u?null:"function"==typeof(u=f&&u[f]||u["@@iterator"])?u:null))for(e=g.call(e),g=0;!(o=e.next()).done;)d+=O(o=o.value,t,r,s=p+R(o,g++),a);else if("object"===s){if("function"==typeof e.then)return O(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,r,o,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return d}function A(e,t,n){if(null==e)return e;var i=[],r=0;return O(e,i,"","",function(e){return t.call(n,e,r++)}),i}function N(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},D={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=p,t.Children=D,t.Component=b,t.Fragment=r,t.Profiler=a,t.PureComponent=w,t.StrictMode=o,t.Suspense=d,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var i=m({},e.props),r=e.key;if(null!=t)for(o in void 0!==t.key&&(r=""+t.key),t)!C.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(i[o]=t[o]);var o=arguments.length-2;if(1===o)i.children=n;else if(1<o){for(var a=Array(o),s=0;s<o;s++)a[s]=arguments[s+2];i.children=a}return E(e.type,r,i)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},t.createElement=function(e,t,n){var i,r={},o=null;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)C.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&(r[i]=t[i]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(i in a=e.defaultProps)void 0===r[i]&&(r[i]=a[i]);return E(e,o,r)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=x.T,n={};x.T=n;try{var i=e(),r=x.S;null!==r&&r(n,i),"object"==typeof i&&null!==i&&"function"==typeof i.then&&i.then(S,L)}catch(e){L(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),x.T=t}},t.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},t.use=function(e){return x.H.use(e)},t.useActionState=function(e,t,n){return x.H.useActionState(e,t,n)},t.useCallback=function(e,t){return x.H.useCallback(e,t)},t.useContext=function(e){return x.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return x.H.useEffect(e,t)},t.useEffectEvent=function(e){return x.H.useEffectEvent(e)},t.useId=function(){return x.H.useId()},t.useImperativeHandle=function(e,t,n){return x.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return x.H.useMemo(e,t)},t.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return x.H.useReducer(e,t,n)},t.useRef=function(e){return x.H.useRef(e)},t.useState=function(e){return x.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return x.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return x.H.useTransition()},t.version="19.2.8"},6540(e,t,n){"use strict";e.exports=n(9869)},4848(e,t,n){"use strict";e.exports=n(9698)},4477(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<o(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,a=r>>>1;i<a;){var s=2*(i+1)-1,l=e[s],c=s+1,d=e[c];if(0>o(l,n))c<r&&0>o(d,l)?(e[i]=d,e[c]=n,i=c):(e[i]=l,e[s]=n,i=s);else{if(!(c<r&&0>o(d,n)))break e;e[i]=d,e[c]=n,i=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],d=[],u=1,h=null,p=3,f=!1,g=!1,m=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=i(d);null!==t;){if(null===t.callback)r(d);else{if(!(t.startTime<=e))break;r(d),t.sortIndex=t.expirationTime,n(c,t)}t=i(d)}}function _(e){if(m=!1,k(e),!g)if(null!==i(c))g=!0,x||(x=!0,S());else{var t=i(d);null!==t&&N(_,t.startTime-e)}}var S,x=!1,C=-1,E=5,I=-1;function T(){return!(!v&&t.unstable_now()-I<E)}function R(){if(v=!1,x){var e=t.unstable_now();I=e;var n=!0;try{e:{g=!1,m&&(m=!1,y(C),C=-1),f=!0;var o=p;try{t:{for(k(e),h=i(c);null!==h&&!(h.expirationTime>e&&T());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof s){h.callback=s,k(e),n=!0;break t}h===i(c)&&r(c),k(e)}else r(c);h=i(c)}if(null!==h)n=!0;else{var l=i(d);null!==l&&N(_,l.startTime-e),n=!1}}break e}finally{h=null,p=o,f=!1}n=void 0}}finally{n?S():x=!1}}}if("function"==typeof w)S=function(){w(R)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,A=O.port2;O.port1.onmessage=R,S=function(){A.postMessage(null)}}else S=function(){b(R,0)};function N(e,n){C=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,r,o){var a=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:u++,callback:r,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(d,e),null===i(c)&&e===i(d)&&(m?(y(C),C=-1):m=!0,N(_,o-a))):(e.sortIndex=s,n(c,e),g||f||(g=!0,x||(x=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},9982(e,t,n){"use strict";e.exports=n(4477)},5617(e,t,n){"use strict";n.d(t,{default:()=>co});var i=n(7833),r=n.n(i),o=n(6540),a=n(5338),s=n(4848);const l=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),c=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};var d={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const u=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},h=(0,o.createContext)({}),p=(0,o.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:i,className:r="",children:a,iconNode:s,...c},p)=>{const{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:m=!1,color:v="currentColor",className:b=""}=(0,o.useContext)(h)??{},y=i??m?24*Number(n??g)/Number(t??f):n??g;return(0,o.createElement)("svg",{ref:p,...d,width:t??f??d.width,height:t??f??d.height,stroke:e??v,strokeWidth:y,className:l("lucide",b,r),...!a&&!u(c)&&{"aria-hidden":"true"},...c},[...s.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),f=(e,t)=>{const n=(0,o.forwardRef)(({className:n,...i},r)=>{return(0,o.createElement)(p,{ref:r,iconNode:t,className:l(`lucide-${a=c(e),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...i});var a});return n.displayName=c(e),n},g=f("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]),m=f("phone-off",[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]);n(4915),Object.create(null);const v=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,b={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},y=e=>b[e];let w,k={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(v,y)};const _=(0,o.createContext)();class S{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const x={},C=(e,t,n,i)=>{R(n)&&x[n]||(R(n)&&(x[n]=new Date),((e,t,n,i)=>{const r=[n,{code:t,...i||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);R(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)})(e,t,n,i))},E=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},I=(e,t,n)=>{e.loadNamespaces(t,E(e,n))},T=(e,t,n,i)=>{if(R(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return I(e,n,i);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,E(e,i))},R=e=>"string"==typeof e,O=(e,t,n,i)=>e.getFixedT(t,n,i),A=(e,t={})=>{const{i18n:n}=t,{i18n:i,defaultNS:r}=(0,o.useContext)(_)||{},a=n||i||w;if(a&&!a.reportNamespaces&&(a.reportNamespaces=new S),!a){C(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const e=(e,t)=>{return R(t)?t:"object"==typeof(n=t)&&null!==n&&R(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e;var n},t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react?.wait&&C(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...k,...a.options.react,...t},{useSuspense:l,keyPrefix:c}=s;let d=e||r||a.options?.defaultNS;d=R(d)?[d]:d||["translation"],a.reportNamespaces.addUsedNamespaces?.(d);const u=(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>((e,t,n={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e))return!1}}):(C(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0))(e,a,s)),h=((e,t,n,i)=>(0,o.useCallback)(O(e,t,n,i),[e,t,n,i]))(a,t.lng||null,"fallback"===s.nsMode?d:d[0],c),p=()=>h,f=()=>O(a,t.lng||null,"fallback"===s.nsMode?d:d[0],c),[g,m]=(0,o.useState)(p);let v=d.join();t.lng&&(v=`${t.lng}${v}`);const b=((e,t)=>{const n=(0,o.useRef)();return(0,o.useEffect)(()=>{n.current=e},[e,t]),n.current})(v),y=(0,o.useRef)(!0);(0,o.useEffect)(()=>{const{bindI18n:e,bindI18nStore:n}=s;y.current=!0,u||l||(t.lng?T(a,t.lng,d,()=>{y.current&&m(f)}):I(a,d,()=>{y.current&&m(f)})),u&&b&&b!==v&&y.current&&m(f);const i=()=>{y.current&&m(f)};return e&&a?.on(e,i),n&&a?.store.on(n,i),()=>{y.current=!1,a&&e&&e?.split(" ").forEach(e=>a.off(e,i)),n&&a&&n.split(" ").forEach(e=>a.store.off(e,i))}},[a,v]),(0,o.useEffect)(()=>{y.current&&u&&m(p)},[a,c,u]);const x=[g,a,u];if(x.t=g,x.i18n=a,x.ready=u,u)return x;if(!u&&!l)return x;throw new Promise(e=>{t.lng?T(a,t.lng,d,()=>e()):I(a,d,()=>e())})},N={type:"3rdParty",init(e){((e={})=>{k={...k,...e}})(e.options.react),(e=>{w=e})(e)}},L=e=>{const t="number"==typeof e?e:0,n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,i=Math.floor(n/60),r=n%60;return`${String(i).padStart(2,"0")}:${String(r).padStart(2,"0")}`},D=({audioLevel:e,isMuted:t=!1})=>{const n=(0,o.useRef)(0),[i,r]=(0,o.useState)(0);(0,o.useEffect)(()=>{const t=5*e*.3+.7*n.current;(Math.abs(t-n.current)>.02||e<.005)&&(n.current=t,r(t))},[e]);const a=Math.min(1,Math.max(0,i)),l=i>.03;return(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center gap-[2px]",children:[.4,.7,1,.7,.4].map((e,n)=>{const i=l?Math.max(.25,Math.min(.95,.25+a*e*.7)):.15;return(0,s.jsx)("span",{className:"h-5 w-[2px] origin-center rounded-full transition-transform duration-150 "+(t?"bg-slate-400":"bg-emerald-500"),style:{transform:`scaleY(${i})`,opacity:l?.7+.3*a:.4}},n)})})},P=({className:e=""})=>(0,s.jsx)("svg",{className:`h-[18px] w-[18px] ${e}`,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z"})}),M=()=>(0,s.jsx)("svg",{className:"h-[18px] w-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),F=()=>(0,s.jsxs)("div",{className:"relative h-5 w-5",children:[(0,s.jsx)(g,{className:"h-5 w-5"}),(0,s.jsx)("svg",{className:"absolute inset-0 h-5 w-5",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M3 3L17 17",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})})]}),j=()=>(0,s.jsxs)("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"6",cy:"5",r:"1.5"}),(0,s.jsx)("circle",{cx:"12",cy:"5",r:"1.5"}),(0,s.jsx)("circle",{cx:"18",cy:"5",r:"1.5"}),(0,s.jsx)("circle",{cx:"6",cy:"10",r:"1.5"}),(0,s.jsx)("circle",{cx:"12",cy:"10",r:"1.5"}),(0,s.jsx)("circle",{cx:"18",cy:"10",r:"1.5"}),(0,s.jsx)("circle",{cx:"6",cy:"15",r:"1.5"}),(0,s.jsx)("circle",{cx:"12",cy:"15",r:"1.5"}),(0,s.jsx)("circle",{cx:"18",cy:"15",r:"1.5"}),(0,s.jsx)("circle",{cx:"12",cy:"20",r:"1.5"})]}),U=[["1","2","3"],["4","5","6"],["7","8","9"],["*","0","#"]],$=({onSendDigits:e})=>{const{t}=A(),[n,i]=(0,o.useState)(null);return(0,s.jsx)("div",{className:"grid grid-cols-3 gap-2 rounded-xl border border-slate-200/80 bg-white/90 p-3 shadow-sm backdrop-blur-md dark:border-slate-700/50 dark:bg-slate-900/80",role:"group","aria-label":t("audio_widget.dtmf.label"),children:U.flat().map(t=>(0,s.jsx)("button",{type:"button",onClick:()=>(t=>{e(t),i(t),setTimeout(()=>i(null),150)})(t),className:"flex h-11 w-11 items-center justify-center rounded-lg text-base font-semibold transition-all duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-1 active:scale-95 "+(n===t?"bg-sky-100 text-sky-700 dark:bg-sky-500/20 dark:text-sky-300":"bg-slate-100 text-slate-700 hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-200 dark:hover:bg-slate-700"),"aria-label":t,children:t},t))})},z=({onStartCall:e,onEndCall:t,onToggleMute:n,isMuted:i,onSendDigits:r,onEvent:a})=>{const{t:l}=A(),[c,d]=(0,o.useState)("idle"),[u,h]=(0,o.useState)(""),[p,f]=(0,o.useState)(""),[v,b]=(0,o.useState)(0),[y,w]=(0,o.useState)(!1),[k,_]=(0,o.useState)(!1),[S,x]=(0,o.useState)(0),[C,E]=(0,o.useState)(!1),[I,T]=(0,o.useState)(!1),R=(0,o.useRef)(null),O=(0,o.useRef)(null),N=(0,o.useRef)(null),U=(0,o.useRef)(null),z=(0,o.useRef)(null);(0,o.useEffect)(()=>("connected"===c&&U.current?z.current=window.setInterval(()=>{U.current&&x(Math.floor((Date.now()-U.current)/1e3))},1e3):z.current&&(clearInterval(z.current),z.current=null),()=>{z.current&&clearInterval(z.current)}),[c]),(0,o.useEffect)(()=>{const e=a("any",({state:e,message:t,data:n})=>{switch(e){case"audio-level":{const e=n??t;let i;i="number"==typeof e?e:"string"==typeof e?parseFloat(e):Number(e),Number.isNaN(i)||b(Math.max(0,i));break}case"warning":t&&(f(t),R.current&&clearTimeout(R.current),R.current=window.setTimeout(()=>{f(""),R.current=null},5e3));break;case"warning-cleared":f(""),R.current&&(clearTimeout(R.current),R.current=null);break;case"remote-audio":O.current&&(clearTimeout(O.current),O.current=null),N.current&&(clearTimeout(N.current),N.current=null),w(!1),_(!1);break;case"error":d("error"),h(t||l("audio_widget.errors.generic")),w(!1),_(!1),x(0),U.current=null,N.current&&(clearTimeout(N.current),N.current=null),setTimeout(()=>{d("idle"),h("")},3e3)}});return()=>{e(),R.current&&clearTimeout(R.current)}},[a,l]),(0,o.useEffect)(()=>"connected"!==c?(O.current&&(clearTimeout(O.current),O.current=null),N.current&&(clearTimeout(N.current),N.current=null),void queueMicrotask(()=>{y&&w(!1),k&&_(!1)})):v>.04?(queueMicrotask(()=>{k||_(!0),y&&w(!1)}),O.current&&(clearTimeout(O.current),O.current=null),void(N.current&&(clearTimeout(N.current),N.current=null))):void(!k||y||O.current||(O.current=window.setTimeout(()=>{w(!0),O.current=null},1400))),[v,c,k,y]),(0,o.useEffect)(()=>()=>{O.current&&clearTimeout(O.current),N.current&&clearTimeout(N.current)},[]),(0,o.useEffect)(()=>{y?(N.current&&clearTimeout(N.current),N.current=window.setTimeout(()=>{w(!1),_(!1),N.current=null},4e3)):N.current&&(clearTimeout(N.current),N.current=null)},[y]);const B="connecting"===c,H="error"===c?"bg-rose-50/80 text-rose-600 border border-rose-200/60 shadow-[0_2px_8px_rgba(244,63,94,0.12)] dark:bg-rose-500/15 dark:text-rose-300 dark:border-rose-500/30":"connected"===c?"bg-emerald-50/80 text-emerald-600 border border-emerald-200/60 shadow-[0_2px_8px_rgba(16,185,129,0.15)] hover:bg-gradient-to-br hover:from-red-500 hover:to-red-600 hover:text-white hover:border-red-500/20 hover:shadow-[0_6px_20px_rgba(239,68,68,0.35)] dark:bg-emerald-500/15 dark:text-emerald-300 dark:border-emerald-500/30 dark:hover:from-red-600 dark:hover:to-red-700 transition-colors":"connecting"===c?"bg-sky-50/80 text-sky-600 border border-sky-200/60 shadow-[0_2px_8px_rgba(14,165,233,0.12)] dark:bg-sky-500/15 dark:text-sky-300 dark:border-sky-500/30":"bg-gradient-to-br from-emerald-500 to-emerald-600 text-white border border-emerald-500/20 shadow-[0_4px_14px_rgba(16,185,129,0.25)] hover:shadow-[0_6px_20px_rgba(16,185,129,0.35)] dark:from-emerald-600 dark:to-emerald-700 dark:border-emerald-500/30",W="error"===c?"border-t-rose-400/60 border-r-rose-300/30 border-b-transparent border-l-transparent":y?"border-t-sky-400/60 border-r-sky-300/30 border-b-transparent border-l-transparent":"border-t-sky-500/60 border-r-sky-400/30 border-b-transparent border-l-transparent",V=l("idle"===c?"audio_widget.status.ready":"connecting"===c?"audio_widget.status.connecting":"connected"===c?y?"audio_widget.status.thinking":"audio_widget.status.on_call":"audio_widget.status.error"),G="error"===c?"text-rose-500 dark:text-rose-400":"connected"===c?"text-emerald-500 dark:text-emerald-400":"connecting"===c?"text-sky-500 dark:text-sky-400":"text-slate-500 dark:text-slate-400",q=l("idle"===c||"error"===c?"audio_widget.actions.start":"connecting"===c?"audio_widget.actions.cancel":"audio_widget.actions.end"),K="idle"===c?l("audio_widget.sr.ready"):"connecting"===c?l("audio_widget.sr.connecting"):"connected"===c?l(y?"audio_widget.sr.connected_thinking":"audio_widget.sr.connected"):u?l("audio_widget.sr.error_with_message",{message:u}):l("audio_widget.sr.error");return(0,s.jsxs)("div",{className:"relative font-sans text-slate-800 antialiased dark:text-slate-100",children:[p&&(0,s.jsx)("div",{className:"absolute -top-14 left-1/2 w-max max-w-[18rem] -translate-x-1/2 rounded-full bg-amber-100/90 px-4 py-2 text-xs font-medium text-amber-800 shadow-lg shadow-amber-200/70 ring-1 ring-amber-300 backdrop-blur dark:bg-amber-500/15 dark:text-amber-200 dark:ring-amber-400/40",role:"status","aria-live":"polite",children:p}),(0,s.jsxs)("div",{className:"inline-flex min-w-[260px] items-center gap-3 rounded-2xl border border-slate-200/80 bg-white/90 px-5 py-3.5 shadow-sm backdrop-blur-md backdrop-saturate-150 transition-all duration-200 hover:shadow-md dark:border-slate-700/50 dark:bg-slate-900/80 dark:shadow-xl dark:shadow-slate-950/30",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{"idle"!==c&&"error"!==c?(O.current&&(clearTimeout(O.current),O.current=null),z.current&&(clearInterval(z.current),z.current=null),t(),d("idle"),b(0),w(!1),_(!1),x(0),E(!1),T(!1),U.current=null,N.current&&(clearTimeout(N.current),N.current=null)):(async()=>{try{d("connecting"),h(""),b(0),w(!1),_(!1),x(0),U.current=null,await e(),d("connected"),U.current=Date.now(),x(0)}catch(e){d("error"),w(!1),_(!1),h(e instanceof Error?e.message:l("audio_widget.errors.start_failed")),x(0),U.current=null}})()},className:`group relative flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-[1.05] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white active:scale-[0.98] dark:focus-visible:ring-offset-slate-950 ${H}`,"aria-label":q,title:"error"===c&&u?u:V,children:[(0,s.jsx)("span",{className:"sr-only",children:K}),"connected"===c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center transition-opacity duration-200 group-hover:opacity-0",children:(0,s.jsx)(D,{audioLevel:v,isMuted:C})}),(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 transition-opacity duration-200 group-hover:opacity-100",children:(0,s.jsx)(m,{className:"h-5 w-5"})})]}):"error"===c?(0,s.jsx)(M,{}):(0,s.jsx)(P,{className:"idle"===c?"fill-white":"fill-sky-600 dark:fill-sky-300"}),B?(0,s.jsx)("span",{className:`pointer-events-none absolute inset-[-4px] rounded-full border border-transparent ${W} animate-spin`}):null]}),"connected"===c&&(0,s.jsx)("button",{type:"button",onClick:()=>{n(),E(i())},className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(C?"bg-amber-100 text-amber-700 hover:bg-amber-200 focus-visible:ring-amber-400 dark:bg-amber-500/20 dark:text-amber-300 dark:hover:bg-amber-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":l(C?"audio_widget.mute.unmute_microphone":"audio_widget.mute.mute_microphone"),title:l(C?"audio_widget.mute.unmute":"audio_widget.mute.mute"),children:C?(0,s.jsx)(F,{}):(0,s.jsx)(g,{className:"h-5 w-5"})}),"connected"===c&&(0,s.jsxs)("div",{className:"relative shrink-0",children:[(0,s.jsx)("button",{type:"button",onClick:()=>T(e=>!e),className:"flex h-12 w-12 items-center justify-center rounded-full transition-all duration-200 hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 active:scale-95 "+(I?"bg-sky-100 text-sky-700 hover:bg-sky-200 focus-visible:ring-sky-400 dark:bg-sky-500/20 dark:text-sky-300 dark:hover:bg-sky-500/30":"bg-slate-100 text-slate-600 hover:bg-slate-200 focus-visible:ring-slate-400 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700"),"aria-label":l("audio_widget.dtmf.toggle"),title:l("audio_widget.dtmf.toggle"),"aria-expanded":I,children:(0,s.jsx)(j,{})}),I&&(0,s.jsx)("div",{className:"absolute bottom-full left-1/2 mb-5 w-max -translate-x-1/2",children:(0,s.jsx)($,{onSendDigits:r})})]}),(0,s.jsxs)("div",{className:"relative flex flex-col gap-1 overflow-hidden leading-tight",children:[(0,s.jsx)("span",{className:`relative z-10 text-[0.65rem] font-medium uppercase tracking-[0.25em] ${G} transition-colors duration-200`,children:V}),"connected"===c&&(0,s.jsx)("span",{className:"animate-in fade-in slide-in-from-bottom-1 relative z-10 font-mono text-[0.8rem] text-slate-600 transition-all duration-500 dark:text-slate-400",children:L(S)})]})]})]})};function B(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function H(e,t,n,i){return new(n||(n=Promise))(function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;var W="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),V=new Uint8Array(16);function G(){if(!W)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return W(V)}for(var q=[],K=0;K<256;++K)q[K]=(K+256).toString(16).substr(1);function Y(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||G)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var o=0;o<16;++o)t[i+o]=r[o];return t||function(e){var t=0,n=q;return[n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],"-",n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]],n[e[t++]]].join("")}(r)}const{SDP_CREATE_OFFER_FAILED:Q,SDP_CREATE_ANSWER_FAILED:J,SDP_SET_LOCAL_DESCRIPTION_FAILED:X,SDP_SET_REMOTE_DESCRIPTION_FAILED:Z,SDP_SEND_FAILED:ee,MEDIA_MICROPHONE_PERMISSION_DENIED:te,MEDIA_DEVICE_NOT_FOUND:ne,MEDIA_GET_USER_MEDIA_FAILED:ie,HOLD_FAILED:re,INVALID_CALL_PARAMETERS:oe,BYE_SEND_FAILED:ae,SUBSCRIBE_FAILED:se,PEER_CLOSED_DURING_INIT:le,WEBSOCKET_CONNECTION_FAILED:ce,WEBSOCKET_ERROR:de,RECONNECTION_EXHAUSTED:ue,GATEWAY_FAILED:he,LOGIN_FAILED:pe,INVALID_CREDENTIALS:fe,AUTHENTICATION_REQUIRED:ge,ICE_RESTART_FAILED:me,NETWORK_OFFLINE:ve,SESSION_NOT_REATTACHED:be,UNEXPECTED_ERROR:ye}={SDP_CREATE_OFFER_FAILED:40001,SDP_CREATE_ANSWER_FAILED:40002,SDP_SET_LOCAL_DESCRIPTION_FAILED:40003,SDP_SET_REMOTE_DESCRIPTION_FAILED:40004,SDP_SEND_FAILED:40005,MEDIA_MICROPHONE_PERMISSION_DENIED:42001,MEDIA_DEVICE_NOT_FOUND:42002,MEDIA_GET_USER_MEDIA_FAILED:42003,HOLD_FAILED:44001,INVALID_CALL_PARAMETERS:44002,BYE_SEND_FAILED:44003,SUBSCRIBE_FAILED:44004,PEER_CLOSED_DURING_INIT:44005,WEBSOCKET_CONNECTION_FAILED:45001,WEBSOCKET_ERROR:45002,RECONNECTION_EXHAUSTED:45003,GATEWAY_FAILED:45004,LOGIN_FAILED:46001,INVALID_CREDENTIALS:46002,AUTHENTICATION_REQUIRED:46003,ICE_RESTART_FAILED:47001,NETWORK_OFFLINE:48001,SESSION_NOT_REATTACHED:48501,UNEXPECTED_ERROR:49001},{HIGH_RTT:we,HIGH_JITTER:ke,HIGH_PACKET_LOSS:_e,LOW_MOS:Se,LOW_LOCAL_AUDIO:xe,LOW_INBOUND_AUDIO:Ce,LOW_BYTES_RECEIVED:Ee,LOW_BYTES_SENT:Ie,RECORDING_UNAVAILABLE:Te,RECORDING_BUFFER_OVERFLOW:Re,ICE_CONNECTIVITY_LOST:Oe,ICE_GATHERING_TIMEOUT:Ae,ICE_GATHERING_EMPTY:Ne,PEER_CONNECTION_FAILED:Le,ONLY_HOST_ICE_CANDIDATES:De,ANSWER_WHILE_PEER_ACTIVE:Pe,ICE_CANDIDATE_PAIR_CHANGED:Me,AUDIO_INPUT_DEVICE_CHANGE_SKIPPED:Fe,MULTIPLE_ACTIVE_CALLS_DETECTED:je,DUPLICATE_INBOUND_ANSWER:Ue,SHARED_REMOTE_ELEMENT_OVERWRITE:$e,TOKEN_EXPIRING_SOON:ze,UNKNOWN_REATTACHED_SESSION:Be,SIGNALING_RECOVERY_REQUIRED:He,MEDIA_RECOVERY_REQUIRED:We,RECONNECTION_FAILED_WITH_NO_AUTO_RECONNECT:Ve}={HIGH_RTT:31001,HIGH_JITTER:31002,HIGH_PACKET_LOSS:31003,LOW_MOS:31004,LOW_LOCAL_AUDIO:31005,LOW_INBOUND_AUDIO:31006,LOW_BYTES_RECEIVED:32001,LOW_BYTES_SENT:32002,RECORDING_UNAVAILABLE:32003,RECORDING_BUFFER_OVERFLOW:32004,ICE_CONNECTIVITY_LOST:33001,ICE_GATHERING_TIMEOUT:33002,ICE_GATHERING_EMPTY:33003,PEER_CONNECTION_FAILED:33004,ONLY_HOST_ICE_CANDIDATES:33005,ANSWER_WHILE_PEER_ACTIVE:33006,ICE_CANDIDATE_PAIR_CHANGED:33008,AUDIO_INPUT_DEVICE_CHANGE_SKIPPED:33009,MULTIPLE_ACTIVE_CALLS_DETECTED:33010,DUPLICATE_INBOUND_ANSWER:33007,SHARED_REMOTE_ELEMENT_OVERWRITE:33011,TOKEN_EXPIRING_SOON:34001,UNKNOWN_REATTACHED_SESSION:35002,SIGNALING_RECOVERY_REQUIRED:36003,MEDIA_RECOVERY_REQUIRED:36004,RECONNECTION_FAILED_WITH_NO_AUTO_RECONNECT:36005},Ge=/^a=candidate:.+typ (srflx|prflx|relay)/m,qe="wss://rtc.telnyx.com",Ke={NORMAL_CLOSURE:1e3,GOING_AWAY:1001,PROTOCOL_ERROR:1002,UNSUPPORTED_DATA:1003,NO_STATUS_RECEIVED:1005,ABNORMAL_CLOSURE:1006,INVALID_FRAME_PAYLOAD:1007,POLICY_VIOLATION:1008,MESSAGE_TOO_BIG:1009,INTERNAL_ERROR:1011},Ye={urls:"stun:stun.l.google.com:19302"},Qe=[{urls:"stun:stun.telnyx.com:3478"},Ye,{urls:"turn:turn.telnyx.com:3478?transport=udp",username:"testuser",credential:"testpassword"},{urls:"turn:turn.telnyx.com:3478?transport=tcp",username:"testuser",credential:"testpassword"},{urls:"turns:turn.telnyx.com:443",username:"testuser",credential:"testpassword"},{urls:"turns:turn2.telnyx.com:443",username:"testuser",credential:"testpassword"}],Je=[{urls:"stun:stundev.telnyx.com:3478"},Ye,{urls:"turn:turndev.telnyx.com:3478?transport=udp",username:"testuser",credential:"testpassword"},{urls:"turn:turndev.telnyx.com:3478?transport=tcp",username:"testuser",credential:"testpassword"},{urls:"turns:turndev.telnyx.com:443",username:"testuser",credential:"testpassword"}];var Xe,Ze;(Ze=Xe||(Xe={})).SocketOpen="telnyx.socket.open",Ze.SocketClose="telnyx.socket.close",Ze.SocketError="telnyx.socket.error",Ze.SocketMessage="telnyx.socket.message",Ze.SpeedTest="telnyx.internal.speedtest",Ze.SocketActivity="telnyx.internal.socketActivity",Ze.Ready="telnyx.ready",Ze.Error="telnyx.error",Ze.Warning="telnyx.warning",Ze.Notification="telnyx.notification",Ze.StatsFrame="telnyx.stats.frame",Ze.StatsReport="telnyx.stats.report",Ze.Messages="telnyx.messages",Ze.Calls="telnyx.calls",Ze.MediaError="telnyx.rtc.mediaError",Ze.PeerConnectionFailureError="telnyx.rtc.peerConnectionFailureError",Ze.PeerConnectionSignalingStateClosed="telnyx.rtc.peerConnectionSignalingStateClosed",Ze.AIConversationMessage="telnyx.ai.conversation";const et={40001:{name:"SDP_CREATE_OFFER_FAILED",message:"Failed to create call offer",description:"The browser was unable to generate a local SDP offer. This typically indicates a WebRTC API error or invalid media constraints.",causes:["Browser WebRTC API error","Missing or invalid media constraints"],solutions:["Check getUserMedia permissions","Verify ICE server configuration"],fatal:!0},40002:{name:"SDP_CREATE_ANSWER_FAILED",message:"Failed to answer the call",description:"The browser was unable to generate a local SDP answer. The remote offer may be invalid or the browser state inconsistent.",causes:["Browser WebRTC API error","Invalid remote SDP offer"],solutions:["Retry the call","Check browser WebRTC compatibility"],fatal:!0},40003:{name:"SDP_SET_LOCAL_DESCRIPTION_FAILED",message:"Failed to apply local call settings",description:"setLocalDescription() was rejected by the browser. The generated SDP may be malformed or the browser state may be inconsistent.",causes:["Malformed SDP","Browser state inconsistency"],solutions:["Retry the call"],fatal:!0},40004:{name:"SDP_SET_REMOTE_DESCRIPTION_FAILED",message:"Failed to apply remote call settings",description:"setRemoteDescription() was rejected by the browser. The remote SDP may be malformed or contain unsupported codecs.",causes:["Malformed remote SDP","Browser codec mismatch"],solutions:["Retry the call","Check codec configuration"],fatal:!0},40005:{name:"SDP_SEND_FAILED",message:"Failed to send call data to server",description:"The Invite or Answer message could not be delivered via the signaling WebSocket. The connection may have been lost.",causes:["WebSocket connection lost","Server error"],solutions:["Check network connectivity","Retry the call"],fatal:!0},42001:{name:"MEDIA_MICROPHONE_PERMISSION_DENIED",message:"Microphone access denied",description:"The user or operating system denied microphone permission. The browser permission prompt was dismissed or OS-level access is disabled.",causes:["User denied browser permission prompt","OS-level microphone access disabled"],solutions:["Ask user to grant microphone permission in browser settings"],fatal:!0},42002:{name:"MEDIA_DEVICE_NOT_FOUND",message:"No microphone found",description:"The requested audio input device is not available. No microphone is connected, the device was disconnected, or an invalid deviceId was specified.",causes:["No microphone connected","Device was disconnected","Invalid deviceId"],solutions:["Check that a microphone is connected","Select a valid audio input device"],fatal:!0},42003:{name:"MEDIA_GET_USER_MEDIA_FAILED",message:"Failed to access microphone",description:"getUserMedia() was rejected for an unexpected reason. The device may be in use by another application or the browser encountered an internal error.",causes:["Browser error","Device in use by another application"],solutions:["Close other applications using the microphone","Retry"],fatal:!0},44001:{name:"HOLD_FAILED",message:"Failed to hold the call",description:"The server rejected or did not respond to the hold request. The WebSocket connection may have been lost during the operation.",causes:["Server error","WebSocket connection lost during hold"],solutions:["Retry the hold operation","Check network connectivity"],fatal:!1},44002:{name:"INVALID_CALL_PARAMETERS",message:"Invalid call parameters",description:"The call could not be initiated because required parameters are missing or invalid. For example, no destination number was provided to newCall().",causes:["Missing destinationNumber in call options","Invalid or empty call parameters"],solutions:["Provide a valid destinationNumber when calling newCall()","Check the call options object for required fields"],fatal:!0},44003:{name:"BYE_SEND_FAILED",message:"Failed to hang up cleanly",description:"The hangup signal could not be delivered to the server. The call was terminated locally but the server may not be aware.",causes:["WebSocket connection lost before BYE sent"],solutions:["No action needed — call is terminated locally","Check network connectivity"],fatal:!1},44004:{name:"SUBSCRIBE_FAILED",message:"Failed to subscribe to call events",description:"The Verto subscribe request for the call channel failed. This may prevent receiving call state updates from the server.",causes:["WebSocket connection lost during subscribe","Server rejected the subscription request"],solutions:["Check network connectivity","Retry the call"],fatal:!1},44005:{name:"PEER_CLOSED_DURING_INIT",message:"Call was closed during setup",description:"The PeerConnection was closed (e.g. by hangup()) while peer.init() was still running. This is a race condition: an async operation such as setRemoteDescription, getUserMedia, or the media recovery flow yielded control, and close() ran during that gap. The init() cannot continue because the underlying RTCPeerConnection has been destroyed.",causes:["call.hangup() or call.close() was called while the call was still setting up","A WebSocket Bye message arrived during getUserMedia prompt or SDP negotiation","User clicked hangup/decline before media permissions were granted"],solutions:["This is expected if the user intentionally hung up during setup — no action needed","If this happens frequently without user action, check for automatic hangup triggers that may fire too early"],fatal:!0},45001:{name:"WEBSOCKET_CONNECTION_FAILED",message:"Unable to connect to server",description:"The WebSocket connection to the signaling server could not be established. The server may be unreachable, the URL may be incorrect, or a firewall may be blocking the connection.",causes:["Server unreachable","Incorrect WebSocket URL","Firewall blocking WebSocket connections","Network interruption"],solutions:["Check network connectivity","Verify the signaling server URL","Ensure WebSocket connections are not blocked by a firewall"],fatal:!0},45002:{name:"WEBSOCKET_ERROR",message:"Connection to server lost",description:"An error occurred on the WebSocket connection after it was established. The connection may have been dropped due to network issues or server-side closure.",causes:["Network interruption","Server closed the connection","Idle timeout"],solutions:["Check network connectivity","SDK will attempt automatic reconnection if configured"],fatal:!1},45003:{name:"RECONNECTION_EXHAUSTED",message:"Unable to reconnect to server",description:"All automatic reconnection attempts have been exhausted. The SDK tried to re-establish the WebSocket connection multiple times but failed on every attempt.",causes:["Prolonged network outage","Server unreachable","Firewall or proxy blocking reconnection"],solutions:["Check network connectivity","Call client.disconnect() and client.connect() to manually retry","Notify the user that the connection was lost"],fatal:!0},45004:{name:"GATEWAY_FAILED",message:"Gateway connection failed",description:"The upstream gateway reported a FAILED, FAIL_WAIT, or TIMEOUT state. The signaling server could not establish or maintain a connection to the gateway. When autoReconnect is disabled, this is immediately fatal. When enabled, the SDK will retry until RECONNECTION_EXHAUSTED.",causes:["Gateway down or unreachable","Server-side infrastructure issue","Network partition between signaling server and gateway"],solutions:["Wait for automatic reconnection (if autoReconnect is enabled)","Call client.disconnect() and client.connect() to manually retry","Check Telnyx service status"],fatal:!1},46001:{name:"LOGIN_FAILED",message:"Authentication failed",description:"The login request was rejected by the server. The credentials may be invalid, expired, or the account may be suspended.",causes:["Invalid credentials (username/password or token)","Expired authentication token","Account suspended or disabled"],solutions:["Verify credentials","Generate a new authentication token","Check account status"],fatal:!0},46002:{name:"INVALID_CREDENTIALS",message:"Invalid credential parameters",description:"The SDK rejected the login options before sending any request to the server. This is an internal client-side validation guard — the credentials object is missing required fields or has an invalid structure. No network request was made.",causes:["Missing login and password fields","Missing or malformed authentication token","Invalid combination of credential fields in the options object"],solutions:["Provide valid login/password or a valid authentication token","Check the TelnyxRTC constructor options against the documentation","Ensure the credential object matches one of the supported auth modes (credentials, token, or anonymous)"],fatal:!0},46003:{name:"AUTHENTICATION_REQUIRED",message:"Authentication required",description:"The server rejected a request because the session is not authenticated. This can happen when the client sends a message (e.g. Invite, Subscribe, or Ping) before login completes, after a token expires mid-session, or after the server drops the authenticated state for any reason.",causes:["Message sent before login completed","Authentication token expired during the session","Server-side session was invalidated","WebSocket reconnected but re-authentication did not complete"],solutions:["Ensure the client is fully logged in before sending messages","Re-authenticate using client.login() with fresh credentials","Listen for telnyx.ready before making calls or sending requests"],fatal:!1},47001:{name:"ICE_RESTART_FAILED",message:"ICE restart failed",description:"The ICE restart Modify request could not be sent or the server returned an error. The media path could not be recovered via ICE restart.",causes:["WebSocket connection lost during ICE restart","Server rejected the Modify request","Timeout waiting for server response"],solutions:["The call may recover via WebSocket reconnect + Attach","If the call does not recover, hang up and retry"],fatal:!1},48001:{name:"NETWORK_OFFLINE",message:"Device is offline",description:"The browser reported that the device has lost network connectivity (navigator.onLine === false). All WebSocket and media connections will fail until the network is restored.",causes:["Wi-Fi or ethernet disconnected","Airplane mode enabled","Network interface went down"],solutions:["Check network connectivity","Reconnect to Wi-Fi or ethernet","Disable airplane mode"],fatal:!1},48501:{name:"SESSION_NOT_REATTACHED",message:"Active call lost after reconnect",description:"The WebSocket reconnected successfully but the server did not reattach the active call session. The server no longer knows about the call, so any subsequent call-control operation (hangup, hold, etc.) will fail with CALL_DOES_NOT_EXIST. The call is unrecoverable and must be terminated locally.",causes:["Server-side session expired during the disconnection window","Reconnect token was invalidated","Backend restarted or lost in-memory call state"],solutions:["Terminate the local call and notify the user","Start a new call","Investigate why the session was not preserved on the server"],fatal:!0},49001:{name:"UNEXPECTED_ERROR",message:"An unexpected error occurred",description:"An error was thrown that does not match any known SDK error category. This is a catch-all for unclassified failures.",causes:["Unknown or unhandled error condition"],solutions:["Check the originalError property for the underlying cause","Report the issue if it persists"],fatal:!0}},tt={31001:{name:"HIGH_RTT",message:"High network latency detected",description:"Round-trip time (RTT) exceeded the threshold for multiple consecutive samples. High latency causes perceptible audio delays.",causes:["Poor network connection","Geographic distance to media server","Network congestion"],solutions:["Check network connectivity","Use a wired connection instead of Wi-Fi","Close bandwidth-heavy applications"]},31002:{name:"HIGH_JITTER",message:"High jitter detected",description:"Jitter (variability in packet arrival time) exceeded the threshold for multiple consecutive samples. High jitter causes crackling and choppy audio.",causes:["Network congestion","Unstable Wi-Fi connection","Overloaded network equipment"],solutions:["Use a wired connection instead of Wi-Fi","Close bandwidth-heavy applications","Check network equipment"]},31003:{name:"HIGH_PACKET_LOSS",message:"High packet loss detected",description:"Packet loss exceeded the threshold for multiple consecutive samples. High packet loss causes choppy audio or dropped calls.",causes:["Network congestion","Unstable connection","Firewall or QoS misconfiguration"],solutions:["Check network connectivity","Use a wired connection","Contact network administrator"]},31004:{name:"LOW_MOS",message:"Low call quality score",description:"Mean Opinion Score (MOS) dropped below the acceptable threshold for multiple consecutive samples. This is a composite indicator of overall call quality.",causes:["Combination of high latency, jitter, and/or packet loss","Poor network conditions"],solutions:["Check network connectivity","Use a wired connection","Close bandwidth-heavy applications"]},31005:{name:"LOW_LOCAL_AUDIO",message:"Low local microphone audio detected",description:"Local outbound audio level stayed below the acceptable threshold before the microphone produced real audio, or stayed silent for a long continuous window after audio was confirmed. This may indicate that the microphone is not capturing enough audio even while RTP is being sent.",causes:["Microphone input level is too low","Wrong microphone selected","Microphone is obstructed or too far from the speaker","Operating system input gain is muted or very low"],solutions:["Check the selected microphone","Increase microphone input gain","Move closer to the microphone","Verify the microphone is not muted at the operating system or hardware level"]},31006:{name:"LOW_INBOUND_AUDIO",message:"Low inbound audio detected",description:"Inbound (remote) audio level stayed below the acceptable threshold for multiple consecutive stats intervals while RTP packets continued to flow. This may indicate the remote party is sending silence or comfort-noise (e.g. one-way audio caused by a media bridge issue), as opposed to LOW_BYTES_RECEIVED which fires when no bytes arrive at all.",causes:["Remote party microphone is muted or capturing very low audio","Media bridge or PBX is injecting comfort-noise/silence instead of forwarding real audio","One-way audio where RTP flows but content is silent (server-side media issue)","Remote party is on hold or not speaking"],solutions:["Verify the remote party is not muted and is actively speaking","Check the media bridge / PBX for comfort-noise injection or transcoding issues","Inspect PCAP RTP payload uniqueness to distinguish real audio from comfort-noise","If the issue persists, report the call for server-side media investigation"]},32001:{name:"LOW_BYTES_RECEIVED",message:"No audio data received",description:"No bytes have been received from the remote party for multiple consecutive seconds. This may indicate a network interruption or remote-side issue.",causes:["Network interruption","Remote party microphone issue","Firewall blocking inbound media"],solutions:["Check network connectivity","Ask remote party to check their microphone","Check firewall rules for media ports"]},32002:{name:"LOW_BYTES_SENT",message:"No audio data being sent",description:"No bytes have been sent for multiple consecutive seconds. This may indicate a local microphone issue or network interruption.",causes:["Microphone muted or disconnected","Network interruption","Local media track ended"],solutions:["Check that the microphone is not muted","Verify the microphone is still connected","Check network connectivity"]},32003:{name:"RECORDING_UNAVAILABLE",message:"Call recording is not available in this browser",description:"Call recording was enabled (enableCallRecording is true), but the browser does not support MediaStreamTrackProcessor (required to capture raw audio PCM). Recording is disabled for this call; the call proceeds normally. Currently affects Firefox and older Chromium (< 94).",causes:["Browser does not implement MediaStreamTrackProcessor (Firefox, Safari)","Chromium version older than 94","Recording enabled on an unsupported platform"],solutions:["Use a recent Chromium-based browser (Chrome 94+, Edge 94+) to capture recordings","Disable enableCallRecording if recording is not required for this deployment","See the enableCallRecording JSDoc for platform support details"]},32004:{name:"RECORDING_BUFFER_OVERFLOW",message:"Call recording buffer overflow — oldest packets dropped",description:"The in-memory call recording buffer reached its maxBufferBytes cap before the next scheduled flush. The oldest captured RTP packets were dropped to keep memory bounded. This indicates the flush interval is too long for the call audio rate, or the upload endpoint is slow/unreachable. The recording continues with the remaining (newer) packets.",causes:["Flush interval (callRecordingFlushIntervalMs) is larger than the buffer can hold at the current audio rate","Upload endpoint (/call_recording) is slow or unreachable, so intermediate flushes back up","A very long call with high sample rate filling the buffer between flushes"],solutions:["Reduce callRecordingFlushIntervalMs so flushes happen more frequently","Increase callRecordingMaxBufferBytes if memory headroom allows","Check the /call_recording endpoint health and network path to voice-sdk-proxy"]},33001:{name:"ICE_CONNECTIVITY_LOST",message:"Connection interrupted",description:"The ICE connection transitioned to the disconnected state. The previously selected connection path was lost and renegotiation may be required. The connection may recover automatically.",causes:["Temporary network interruption","Network interface change (e.g. Wi-Fi to cellular)","NAT rebinding"],solutions:["Wait for automatic recovery","Check network connectivity"]},33002:{name:"ICE_GATHERING_TIMEOUT",message:"ICE gathering timed out",description:"ICE candidate gathering did not complete within the safety timeout. This is typically caused by network restrictions blocking STUN/TURN. The call may still succeed if candidates arrive late.",causes:["Firewall blocking STUN/TURN","Network unreachable","STUN/TURN server not responding"],solutions:["Check STUN/TURN server reachability","Ensure UDP traffic is not blocked","Try forceRelayCandidate option"]},33003:{name:"ICE_GATHERING_EMPTY",message:"No ICE candidates gathered",description:"No ICE candidates were gathered after sending the initial SDP. This may indicate a firewall blocking all STUN/TURN traffic or no available network interface.",causes:["Firewall blocking all STUN/TURN traffic","No network interface available","VPN blocking UDP"],solutions:["Check STUN/TURN server reachability","Ensure UDP traffic is not blocked","Use forceRelayCandidate option"]},33004:{name:"PEER_CONNECTION_FAILED",message:"Connection failed",description:"RTCPeerConnection entered the failed state. This is a recoverable condition — the SDK may attempt ICE restart or the connection may recover. If it does not recover, the call will eventually be terminated.",causes:["ICE failure","DTLS handshake failure","Prolonged network interruption"],solutions:["Wait for automatic recovery","Check network connectivity","Verify TURN server credentials"]},33005:{name:"ONLY_HOST_ICE_CANDIDATES",message:"Only local network candidates available",description:"ICE gathering completed but only host (local network) candidates were collected — no server-reflexive (srflx) or relay (turn) candidates were found. This typically means the STUN/TURN servers are unreachable, which will prevent connections outside the local network.",causes:["STUN/TURN servers unreachable","Firewall blocking UDP traffic to STUN/TURN servers","Incorrect TURN server configuration or credentials","Restrictive corporate network or VPN"],solutions:["Verify STUN/TURN server URLs and credentials","Ensure UDP traffic to STUN/TURN ports is not blocked","Check firewall or VPN settings","Try using TCP-based TURN as a fallback"]},33006:{name:"ANSWER_WHILE_PEER_ACTIVE",message:"Call answer ignored because a peer connection is already active",description:"answer() was called on a call that already has an active or connecting peer connection. Creating a second peer connection for the same call would duplicate media negotiation, confuse the remote party, and break call reporting. This is typically caused by application code invoking answer() multiple times (e.g. from multiple event handlers).",causes:["Application called answer() twice on the same call object","Multiple click handlers or event listeners triggering answer()"],solutions:["Ensure answer() is called only once per call","Disable the answer button after the first click","Check that answer() is not invoked from multiple event handlers"]},33008:{name:"ICE_CANDIDATE_PAIR_CHANGED",message:"ICE candidate pair changed mid-call",description:"The selected ICE candidate pair changed during an active call. This indicates a network path shift — for example, a Wi-Fi to cellular handoff, a NAT rebinding, or a relay fallback. The call may continue normally, but the path change can briefly affect audio quality.",causes:["Network interface change (e.g. Wi-Fi to cellular)","NAT rebinding or IP address change","Previous candidate pair failed and ICE selected an alternative","Network topology change"],solutions:["Monitor for audio quality degradation after the path change","Check network stability if changes are frequent","Verify TURN server configuration for relay fallback"]},33007:{name:"DUPLICATE_INBOUND_ANSWER",message:"Call answer ignored because another inbound call is already being answered",description:"answer() was called on an inbound call while another inbound call is already answering or active in this JavaScript runtime. Answering both legs can trigger SIP 486 USER_BUSY / LOSE_RACE when duplicate WebSocket registrations receive the same incoming call.",causes:["Multiple TelnyxRTC instances in the same page","Application code recreating a client without disconnecting the previous instance","Duplicate inbound call notifications produced by duplicate WebSocket registrations"],solutions:["Keep a single active TelnyxRTC instance for inbound call handling","Call disconnect() before replacing an SDK client instance","Only call answer() for one inbound call notification at a time"]},34001:{name:"TOKEN_EXPIRING_SOON",message:"Authentication token expiring soon",description:"The authentication token is approaching its expiration time. If the token expires the connection will be lost and calls will fail. A new token should be generated before expiration.",causes:["Token was issued with a limited lifetime"],solutions:["Generate a new authentication token","Reconnect with fresh credentials before the token expires"]},36003:{name:"SIGNALING_RECOVERY_REQUIRED",message:"Signaling recovery required",description:"The signaling (WebSocket) path has been detected as unhealthy and the SDK will force-close the socket and reconnect. The source field in the warning payload indicates what triggered the recovery (probe, request, peer_failure, or no_rtp). Active calls will be recovered via reattach after reconnection.",causes:["WebSocket probe timed out with no response","Critical signaling request timed out","Peer/media failure detected while signaling is also unhealthy"],solutions:["The SDK will automatically reconnect and recover the call","Check for network interface changes or interruptions","Verify firewall/NAT timeout settings"]},36004:{name:"MEDIA_RECOVERY_REQUIRED",message:"Media recovery required",description:"The peer connection or media flow has been detected as unhealthy while signaling is healthy. The SDK will attempt ICE restart to recover the media path. No socket reconnection is needed.",causes:["ICE connection state changed to failed","RTCPeerConnection state changed to failed","No RTP packets/bytes received while media should be active"],solutions:["The SDK will automatically attempt ICE restart","Check network connectivity and ICE candidate availability","Verify TURN server configuration"]},36005:{name:"RECONNECTION_FAILED_WITH_NO_AUTO_RECONNECT",message:"Reconnection failed — auto-reconnect disabled",description:"The WebSocket was closed and auto-reconnect is disabled, so the SDK will not attempt to reconnect. This typically occurs after the user called disconnect() or after reconnection attempts were exhausted.",causes:["Auto-reconnect was disabled by the application","Reconnection attempts were previously exhausted","The session was intentionally disconnected"],solutions:["Call connect() manually to re-establish the session","Check if disconnect() was called intentionally","Review maxReconnectAttempts configuration"]},33009:{name:"AUDIO_INPUT_DEVICE_CHANGE_SKIPPED",message:"Audio input device change skipped",description:"The SDK could not change the microphone because the active peer connection has no audio RTP sender to replace. The existing local media and mute state were left unchanged.",causes:["The call was created without an audio sender","The peer connection was not ready when setAudioInDevice was called","The call is already ending or the local media sender was removed"],solutions:["Retry after the call is active and local media is attached","Verify the call was started with audio enabled","Inspect call state and peer connection sender availability"]},33010:{name:"MULTIPLE_ACTIVE_CALLS_DETECTED",message:"Multiple active calls detected in one SDK session",description:"A new call was created or received while another call is still active (ringing, answering, active, held, or recovering) in the same SDK session. This may be intentional for some applications (e.g. call waiting, transfer) but is often abnormal and makes call reports and application behavior harder to reason about. The new call proceeds normally — this warning is diagnostic only.",causes:["Application created an outbound call while another call is active","An inbound call arrived while another call is already active","Application did not hang up the previous call before starting a new one","Call waiting or multi-call scenario (may be intentional)"],solutions:["Verify this is the expected behavior for your application","Ensure the previous call is hung up before creating a new one if only one call is expected","Use call.hold() before starting a new call if needed","Check the warning payload for call IDs to correlate which calls are involved"]},33011:{name:"SHARED_REMOTE_ELEMENT_OVERWRITE",message:"Remote media element overwritten by another call",description:"A new MediaStream was attached to an HTML media element (audio/video) that already held a different MediaStream from another active call. The SDK overwrote the existing stream (last-writer-wins), which disrupts the other call remote media playout. This happens when two concurrent calls share a single remoteElement instead of each having its own. Use a per-call remoteElement (client.newCall({ remoteElement }) or call.answer({ remoteElement })) so each call owns a distinct element.",causes:["Two concurrent calls share one remoteElement (legacy single-element app)","Application did not pass a per-call remoteElement to newCall() or answer()","A second inbound call rang into a session using one session-level remoteElement"],solutions:["Pass a distinct remoteElement per call via client.newCall({ remoteElement })","For inbound calls, override at answer time via call.answer({ remoteElement })","Give each call its own <audio>/<video> element so attach/detach lifecycles are independent"]},35002:{name:"UNKNOWN_REATTACHED_SESSION",message:"Unknown reattach session after reconnect",description:"The WebSocket reconnected successfully and the server sent an Attach message for a session that does not match any active SDK call. The unknown Attach is ACK'd and ignored.",causes:["Server sent an Attach for a call that no longer exists in the SDK","Multiple Attach messages arrived and only the first was recovered","Race condition between reconnection and new inbound call"],solutions:["Check application logic for multiple simultaneous calls","Inspect the Attach callID in the warning payload for details","If a call should be active, start a new call manually"]}};function nt(e,t){const n=tt[e];return{code:e,name:n.name,message:t||n.message,description:n.description,causes:[...n.causes],solutions:[...n.solutions]}}class it extends Error{constructor(e){super(e.message||`[${e.code}] ${e.name}`),this.name=e.name,this.code=e.code,this.description=e.description,this.causes=e.causes,this.solutions=e.solutions,this.originalError=e.originalError,this.fatal=e.fatal,Object.setPrototypeOf(this,it.prototype)}toJSON(){return{code:this.code,name:this.name,description:this.description,message:this.message,causes:this.causes,solutions:this.solutions,originalError:this.originalError,fatal:this.fatal}}}function rt(e){if(e instanceof DOMException){if("NotAllowedError"===e.name)return te;if("NotFoundError"===e.name||"OverconstrainedError"===e.name)return ne}return ie}function ot(e,t,n,i){const r=et[e],o=t instanceof Error?t:void 0!==t?new Error(String(t)):void 0;return new it({code:e,name:r.name,description:r.description,message:n||r.message,causes:[...r.causes],solutions:[...r.solutions],originalError:o,fatal:null!=i?i:r.fatal})}class at extends Error{constructor(e,t,n=""){super(`Signaling request timed out (id=${e}, method=${n||"unknown"}, timeout=${t}ms)`),this.name="RequestTimeoutError",this.requestId=e,this.timeoutMs=t,this.method=n}}class st extends Error{constructor(e,t,n){super(`Stale request cancelled (id=${e}, gen=${t}, current=${n})`),this.name="StaleRequestError",this.requestId=e,this.staleGeneration=t,this.currentGeneration=n}}var lt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};function ct(e,t){return e(t={exports:{}},t.exports),t.exports}var dt=ct(function(e){var t,n;t=lt,n=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,n){for(var r=0;r<i.length;r++){var o=i[r];this[o]=r<t?e:this.methodFactory(o,t,n)}this.log=this.debug}function s(e,n,i){return function(){typeof console!==t&&(a.call(this,n,i),this[e].apply(this,arguments))}}function l(i,a,l){return function(i){return"debug"===i&&(i="log"),typeof console!==t&&("trace"===i&&n?o:void 0!==console[i]?r(console,i):void 0!==console.log?r(console,"log"):e)}(i)||s.apply(this,arguments)}function c(e,n,r){var o,s=this;n=n??"WARN";var c="loglevel";function d(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,i=n.indexOf(encodeURIComponent(c)+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=r||l,s.getLevel=function(){return o},s.setLevel=function(n,r){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(o=n,!1!==r&&function(e){var n=(i[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}}(n),a.call(s,n,e),typeof console===t&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){n=e,d()||s.setLevel(e,!1)},s.resetLevel=function(){s.setLevel(n,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var u=d();null==u&&(u=n),s.setLevel(u,!1)}var d=new c,u={};d.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=u[e];return t||(t=u[e]=new c(e,d.getLevel(),d.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return d.noConflict=function(){return typeof window!==t&&window.log===d&&(window.log=h),d},d.getLoggers=function(){return u},d.default=d,d},e.exports?e.exports=n():t.log=n()});const ut={debug:0,info:1,warn:2,error:3};class ht{constructor(e={}){var t,n,i;this.buffer=[],this.isCapturing=!1,this.options={enabled:null!==(t=e.enabled)&&void 0!==t&&t,level:null!==(n=e.level)&&void 0!==n?n:"debug",maxEntries:null!==(i=e.maxEntries)&&void 0!==i?i:1e3}}start(){this.options.enabled&&(this.isCapturing=!0,this.buffer=[])}stop(){this.isCapturing=!1}addEntry(e,t,n){if(!this.isCapturing||!this.options.enabled)return;if(ut[e]<ut[this.options.level])return;const i=Object.assign({timestamp:(new Date).toISOString(),level:e,message:t},n&&Object.keys(n).length>0?{context:n}:{});this.buffer.push(i),this.buffer.length>this.options.maxEntries&&this.buffer.shift()}getLogs(){return[...this.buffer]}getLogCount(){return this.buffer.length}drain(){const e=this.buffer;return this.buffer=[],e}clear(){this.buffer=[]}isActive(){return this.isCapturing}isEnabled(){return this.options.enabled}}let pt=null;const ft=dt.getLogger("telnyx"),gt={trace:0,debug:1,info:2,warn:3,error:4};let mt=gt.info;function vt(e){if(null==e)return e;if("object"!=typeof e)return e;try{const t=JSON.stringify(e),n=JSON.parse(t);if("object"==typeof n&&null!==n&&Object.keys(n).length>1)return n}catch(e){}const t={};for(const n in e)try{const i=e[n];if("function"==typeof i)continue;if("object"==typeof i&&null!==i)try{t[n]=JSON.parse(JSON.stringify(i))}catch(e){t[n]=String(i)}else t[n]=i}catch(e){}return Object.keys(t).length>0?t:{value:String(e)}}const bt=ft.methodFactory;ft.methodFactory=(e,t,n)=>{const i=bt(e,t,n);return function(...t){if(gt[e]>=mt){const e=[(new Date).toISOString().replace("T"," ").replace("Z",""),"-"];for(const n of t)e.push(n);i(...e)}const n=pt;if(null==n?void 0:n.isActive()){const[i,...r]=t,o="string"==typeof i?i:JSON.stringify(i);let a;r.length>0&&(a=1===r.length&&"object"==typeof r[0]&&null!==r[0]?vt(r[0]):{args:r.map(vt)}),n.addEntry(e,o,a)}}},ft.setLevel("debug",!1);const yt=e=>{const[t,n,i,r,o,a]=e;let s={};try{s=JSON.parse(o.replace(/ID"/g,'Id"'))}catch(e){ft.warn("Verto LA invalid media JSON string:",o)}return{participantId:Number(t),participantNumber:n,participantName:i,codec:r,media:s,participantData:a}},wt=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(t){return e}},kt=e=>e instanceof Function||"function"==typeof e,_t=e=>"object"==typeof document&&"getElementById"in document?"string"==typeof e?document.getElementById(e)||null:"function"==typeof e?e():e instanceof HTMLMediaElement?e:null:null,St=/^(ws|wss):\/\//,xt=(e,t=null)=>{const{result:n={},error:i}=e;if(i)return{error:i};const{result:r=null}=n;if(null===r)return null!==t&&(n.node_id=t),{result:n};const{code:o=null,node_id:a=null,result:s=null}=r;return o&&"200"!==o?{error:r}:s?xt(s,a):{result:r}},Ct=({login:e,passwd:t,password:n,login_token:i})=>Boolean(e&&(t||n)||i),Et=({anonymous_login:e})=>Boolean(e)&&Boolean(e.target_id)&&Boolean(e.target_type),It=e=>{var t,n,i,r,o,a;let s="",l="";return(null===(n=null===(t=null==e?void 0:e.result)||void 0===t?void 0:t.params)||void 0===n?void 0:n.state)&&(s=null===(r=null===(i=null==e?void 0:e.result)||void 0===i?void 0:i.params)||void 0===r?void 0:r.state),(null===(o=null==e?void 0:e.params)||void 0===o?void 0:o.state)&&(l=null===(a=null==e?void 0:e.params)||void 0===a?void 0:a.state),s||l};function Tt({debounceTime:e}){let t,n;return{promise:new Promise((i,r)=>{t=e?Rt(i,e):i,n=r}),resolve:t,reject:n}}const Rt=(e,t)=>{let n;return(...i)=>{clearTimeout(n),n=window.setTimeout(()=>{e(...i)},t)}},Ot="telnyx-voice-sdk-id",At="telnyx-voice-sdk-session-id",Nt="telnyx-voice-sdk-session-id-stored-at",Lt="telnyx-voice-sdk-active-calls";function Dt(e=Date.now()){const t=function(){const e=Number(sessionStorage.getItem(Nt));return Number.isFinite(e)?e:null}();return null!==t&&e-t<=9e4}function Pt(){return sessionStorage.getItem(Ot)}function Mt(e,t=Date.now()){sessionStorage.setItem(At,e),sessionStorage.setItem(Nt,String(t))}function Ft(){sessionStorage.removeItem(Ot),sessionStorage.removeItem(At),sessionStorage.removeItem(Nt)}function jt(){!function(e){try{sessionStorage.removeItem(e)}catch(t){ft.debug(`safeRemoveItem('${e}') failed: ${t instanceof Error?t.message:String(t)}`)}}(Lt)}function Ut(e=Date.now()){const t=function(e){try{return sessionStorage.getItem(e)}catch(t){return ft.debug(`safeGetItem('${e}') failed: ${t instanceof Error?t.message:String(t)}`),null}}(Lt);if(!t)return null;try{const n=JSON.parse(t);if(!n||"object"!=typeof n||!Array.isArray(n.calls))return ft.debug("Active-calls recovery marker payload was malformed — discarded."),jt(),null;const i=Number(n.storedAt);return!Number.isFinite(i)||e-i>9e5?(ft.debug("Active-calls recovery marker was stale or had an invalid timestamp — discarded."),jt(),null):0===n.calls.length?(ft.debug("Active-calls recovery marker had no call records — discarded."),jt(),null):n}catch(e){return ft.debug(`Active-calls recovery marker JSON parse failed — discarded: ${e instanceof Error?e.message:String(e)}`),jt(),null}}function $t(e,t,n=Date.now()){if(!Array.isArray(e)||0===e.length)return void jt();const i={sessionId:t,calls:e,storedAt:n};!function(e,t){try{sessionStorage.setItem(e,t)}catch(t){ft.info(`safeSetItem('${e}') failed: ${t instanceof Error?t.message:String(t)}`)}}(Lt,JSON.stringify(i))}var zt,Bt,Ht;!function(e){e.Offer="offer",e.Answer="answer"}(zt||(zt={})),function(e){e.Inbound="inbound",e.Outbound="outbound"}(Bt||(Bt={})),function(e){e.Invite="telnyx_rtc.invite",e.Attach="telnyx_rtc.attach",e.Answer="telnyx_rtc.answer",e.Info="telnyx_rtc.info",e.Candidate="telnyx_rtc.candidate",e.EndOfCandidates="telnyx_rtc.endOfCandidates",e.Display="telnyx_rtc.display",e.Media="telnyx_rtc.media",e.Event="telnyx_rtc.event",e.Bye="telnyx_rtc.bye",e.Punt="telnyx_rtc.punt",e.Broadcast="telnyx_rtc.broadcast",e.Subscribe="telnyx_rtc.subscribe",e.Unsubscribe="telnyx_rtc.unsubscribe",e.ClientReady="telnyx_rtc.clientReady",e.Modify="telnyx_rtc.modify",e.Ringing="telnyx_rtc.ringing",e.GatewayState="telnyx_rtc.gatewayState",e.Ping="telnyx_rtc.ping",e.Pong="telnyx_rtc.pong"}(Ht||(Ht={}));const Wt={generic:"event",[Ht.Display]:"participantData",[Ht.Attach]:"participantData",conferenceUpdate:"conferenceUpdate",callUpdate:"callUpdate",vertoClientReady:"vertoClientReady",userMediaError:"userMediaError",peerConnectionFailureError:"peerConnectionFailureError",signalingStateClosed:"signalingStateClosed"},Vt=8e6,Gt={destinationNumber:"",remoteCallerName:"Outbound Call",remoteCallerNumber:"",callerName:"",callerNumber:"",audio:!0,useStereo:!1,debug:!1,debugOutput:"socket",attach:!1,screenShare:!1,userVariables:{},mediaSettings:{useSdpASBandwidthKbps:!1,sdpASBandwidthKbps:0},mutedMicOnStart:!1,prefetchIceCandidates:!0};var qt,Kt,Yt,Qt,Jt,Xt;!function(e){e[e.New=0]="New",e[e.Requesting=1]="Requesting",e[e.Trying=2]="Trying",e[e.Recovering=3]="Recovering",e[e.Ringing=4]="Ringing",e[e.Answering=5]="Answering",e[e.Early=6]="Early",e[e.Active=7]="Active",e[e.Held=8]="Held",e[e.Hangup=9]="Hangup",e[e.Destroy=10]="Destroy",e[e.Purge=11]="Purge"}(qt||(qt={})),function(e){e.Participant="participant",e.Moderator="moderator"}(Kt||(Kt={})),function(e){e.Join="join",e.Leave="leave",e.Bootstrap="bootstrap",e.Add="add",e.Modify="modify",e.Delete="delete",e.Clear="clear",e.ChatMessage="chatMessage",e.LayerInfo="layerInfo",e.LogoInfo="logoInfo",e.LayoutInfo="layoutInfo",e.LayoutList="layoutList",e.ModCmdResponse="modCommandResponse"}(Yt||(Yt={})),function(e){e.Video="videoinput",e.AudioIn="audioinput",e.AudioOut="audiooutput"}(Qt||(Qt={})),function(e){e.REGED="REGED",e.UNREGED="UNREGED",e.NOREG="NOREG",e.FAILED="FAILED",e.FAIL_WAIT="FAIL_WAIT",e.TIMEOUT="TIMEOUT",e.REGISTER="REGISTER",e.TRYING="TRYING",e.EXPIRED="EXPIRED",e.UNREGISTER="UNREGISTER"}(Jt||(Jt={})),function(e){e.Hold="hold",e.Unhold="unhold",e.ToggleHold="toggleHold",e.UpdateMedia="updateMedia"}(Xt||(Xt={}));const Zt="GLOBAL",en={},tn=(e,t)=>`${e}|${t}`,nn=(e,t=Zt)=>tn(e,t)in en,rn=(e,t,n=Zt)=>{const i=tn(e,n);i in en||(en[i]=[]),en[i].push(t)},on=(e,t,n=Zt)=>{const i=function(r){an(e,i,n),t(r)};return i.prototype.targetRef=t,rn(e,i,n)},an=(e,t,n=Zt)=>{if(!nn(e,n))return!1;const i=tn(e,n);if(kt(t))for(let e=en[i].length-1;e>=0;e--){const n=en[i][e];(t===n||n.prototype&&t===n.prototype.targetRef)&&en[i].splice(e,1)}else en[i]=[];return 0===en[i].length&&delete en[i],!0},sn=(e,t,n=Zt,i=!0)=>{const r=i&&n!==Zt;if(!nn(e,n))return r&&sn(e,t),!1;const o=tn(e,n),a=en[o].length;if(!a)return r&&sn(e,t),!1;for(let e=a-1;e>=0;e--)en[o][e](t);return r&&sn(e,t),!0},ln=e=>{const t=tn(e,"");Object.keys(en).filter(e=>0===e.indexOf(t)).forEach(e=>delete en[e])};let cn="undefined"!=typeof WebSocket?WebSocket:null;class dn{constructor(e){this.session=e,this.previousGatewayState="",this.lastInboundAt=0,this.socketGeneration=0,this._wsClient=null,this._host=qe,this._timers={},this._useCanaryRtcServer=!1,this._hasCanaryBeenUsed=!1,this._safetyTimeoutId=null,this._pendingRequestIds=new Set,this._pendingRequestTimers=new Map,this._pendingRequestRejecters=new Map,this.upDur=null,this.downDur=null;const{host:t,env:n,region:i,useCanaryRtcServer:r}=e.options;ft.debug("Creating new Connection",{host:this._host,env:n,region:i,useCanaryRtcServer:r}),n&&(this._host="development"===n?"wss://rtcdev.telnyx.com":qe),t&&(this._host=(e=>`${St.test(e)?"":"wss://"}${e}`)(t)),i&&(this._host=this._host.replace(/rtc(dev)?/,`${i}.rtc$1`)),r&&(this._useCanaryRtcServer=!0)}get connected(){return!!this._wsClient&&1===this._wsClient.readyState}get connecting(){return!!this._wsClient&&0===this._wsClient.readyState}get closing(){return!!this._wsClient&&2===this._wsClient.readyState}get closed(){return!!this._wsClient&&3===this._wsClient.readyState}get isAlive(){return this.connecting||this.connected}get isDead(){return this.closing||this.closed}get host(){return this._host}connect(){ft.debug("Connection.connect() called",{host:this._host,socketGeneration:this.socketGeneration,sessionId:this.session.sessionid});const e=new URL(this._host);let t=Pt();this.session.options.rtcIp&&this.session.options.rtcPort&&(t=null,this._useCanaryRtcServer=!1,e.searchParams.set("rtc_ip",this.session.options.rtcIp),e.searchParams.set("rtc_port",this.session.options.rtcPort.toString())),t&&e.searchParams.set("voice_sdk_id",t),this._useCanaryRtcServer&&(e.searchParams.set("canary","true"),t&&!this._hasCanaryBeenUsed&&(e.searchParams.delete("voice_sdk_id"),ft.debug("first canary connection. Refreshing voice_sdk_id")),this._hasCanaryBeenUsed=!0),this.session.callReportVoiceSdkId=e.searchParams.get("voice_sdk_id"),this.session.options.skipLastVoiceSdkId&&e.searchParams.has("voice_sdk_id")&&e.searchParams.set("skip_last_voice_sdk_id","true"),this.session.options.skipTrailing&&e.searchParams.set("skip_trailing","true");try{const t=this.socketGeneration;this._wsClient=new cn(e.toString()),this.socketGeneration+=1,ft.debug("WebSocket connection created",{sessionId:this.session.sessionid,voiceSdkId:this.session.callReportVoiceSdkId,socketGeneration:this.socketGeneration,reconnectCount:t}),this.lastInboundAt=0,this._cleanupPendingRequests(),this._registerSocketEvents(this._wsClient)}catch(e){ft.error("WebSocket connection failed:",e);const t=ot(ce,e);sn(Xe.Error,{error:t,sessionId:this.session.sessionid},this.session.uuid),this.session._terminateActiveCallsLocally()}}sendRawText(e){var t;null===(t=this._wsClient)||void 0===t||t.send(e)}send(e,t){var n;const{request:i}=e,r=this.socketGeneration,o=i.method||"",a=new Promise((e,n)=>{if(i.hasOwnProperty("result"))return e();let a=!1,s=null;const l=t=>{if(null!==s&&(clearTimeout(s),this._pendingRequestTimers.delete(i.id),s=null),this._pendingRequestIds.delete(i.id),this._pendingRequestRejecters.delete(i.id),a)return;const{result:r,error:o}=xt(t);return o?n(o):e(r)};on(i.id,l),this._pendingRequestIds.add(i.id),this._pendingRequestRejecters.set(i.id,{reject:n,generation:r}),t&&t>0&&(s=setTimeout(()=>{if(a=!0,s=null,this._pendingRequestTimers.delete(i.id),this._pendingRequestRejecters.delete(i.id),an(i.id,l),this._pendingRequestIds.delete(i.id),this.socketGeneration!==r)return ft.debug(`Stale request timeout for ${i.id} (gen ${r}, current ${this.socketGeneration}) — settling with StaleRequestError`),void n(new st(i.id,r,this.socketGeneration));n(new at(i.id,t,o))},t),this._pendingRequestTimers.set(i.id,s))});return ft.debug("SEND: \n",JSON.stringify(i,null,2),"\n"),null===(n=this._wsClient)||void 0===n||n.send(JSON.stringify(i)),a}close(){if(ft.debug("Connection.close() called",{hasWsClient:!!this._wsClient,closing:this.closing,closed:this.closed,socketGeneration:this.socketGeneration,safetyTimeoutId:this._safetyTimeoutId,sessionId:this.session.sessionid}),!this._wsClient||this.closing)return;this._cleanupPendingRequests();const e=this._wsClient;kt(this._wsClient._beginClose)?this._wsClient._beginClose():this._wsClient.close(),this._safetyTimeoutId||(this._safetyTimeoutId=setTimeout(()=>this._handleCloseTimeout(e),5e3))}_registerSocketEvents(e){const t=this.socketGeneration;e.onopen=e=>(ft.debug("WebSocket onopen",{socketGeneration:this.socketGeneration,sessionId:this.session.sessionid}),sn(Xe.SocketOpen,e,this.session.uuid)),e.onclose=n=>(this._clearSafetyTimeout(),this._safetyCleanupSocket(e,"close"),ft.debug("WebSocket onclose",{code:null==n?void 0:n.code,reason:null==n?void 0:n.reason,wasClean:null==n?void 0:n.wasClean,socketGeneration:t,sessionId:this.session.sessionid}),sn(Xe.SocketClose,{event:n,socketGeneration:t},this.session.uuid)),e.onerror=n=>{this._clearSafetyTimeout(),this._safetyCleanupSocket(e,"error"),ft.debug("WebSocket onerror",{socketGeneration:this.socketGeneration,sessionId:this.session.sessionid});const i=ot(de);return sn(Xe.Error,{error:i,sessionId:this.session.sessionid},this.session.uuid),sn(Xe.SocketError,{error:n,sessionId:this.session.sessionid,socketGeneration:t},this.session.uuid)},e.onmessage=e=>{var t,n;this.lastInboundAt=Date.now(),sn(Xe.SocketActivity,{timestamp:this.lastInboundAt},this.session.uuid);const i=wt(e.data);var r;if("string"!=typeof i){if(i.voice_sdk_id&&(this.session.callReportVoiceSdkId=i.voice_sdk_id,r=i.voice_sdk_id,sessionStorage.setItem(Ot,r)),this._unsetTimer(i.id),ft.debug("RECV: \n",JSON.stringify(i,null,2),"\n"),Jt[`${null===(n=null===(t=null==i?void 0:i.result)||void 0===t?void 0:t.params)||void 0===n?void 0:n.state}`]||!sn(i.id,i)){const e=It(i);sn(Xe.SocketMessage,i,this.session.uuid),Boolean(e)&&(this.previousGatewayState=e)}}else this._handleStringResponse(i)}}_deregisterSocketEvents(e){e.onopen=null,e.onclose=null,e.onerror=null,e.onmessage=null}_handleCloseTimeout(e){this._safetyTimeoutId=null,e&&3!==e.readyState?(ft.warn("Socket stuck in CLOSING after 5s — forcefully cleaning up"),this._deregisterSocketEvents(e),this._safetyCleanupSocket(e,"timeout"),this._wsClient&&this._wsClient!==e?ft.debug("Safety timeout: socket was replaced, not emitting SocketClose",{hasWsClient:!!this._wsClient,isSameSocket:this._wsClient===e}):(ft.debug("Safety timeout: emitting SocketClose for stuck socket",{hasWsClient:!!this._wsClient,isSameSocket:this._wsClient===e}),sn(Xe.SocketClose,{code:Ke.ABNORMAL_CLOSURE,reason:"STUCK_WS_TIMEOUT: Socket got stuck in CLOSING state and was forcefully cleaned up by safety timeout",wasClean:!1,socketGeneration:this.socketGeneration},this.session.uuid))):ft.warn("Safety timeout fired but socket is already closed or cleaned up")}_clearSafetyTimeout(){this._safetyTimeoutId&&(ft.debug("Clearing safety timeout"),clearTimeout(this._safetyTimeoutId),this._safetyTimeoutId=null)}_safetyCleanupSocket(e,t){this._wsClient===e?(ft.debug(`Nulling socket reference (reason: ${t})`),this._wsClient=null):ft.debug(`Skipping socket cleanup - old socket already replaced (reason: ${t})`)}_cleanupPendingRequests(){Array.from(this._pendingRequestIds).forEach(e=>{an(e);const t=this._pendingRequestTimers.get(e),n=this._pendingRequestRejecters.get(e);t&&(clearTimeout(t),this._pendingRequestTimers.delete(e),n&&n.reject(new st(e,n.generation,this.socketGeneration))),this._pendingRequestRejecters.delete(e)}),this._pendingRequestIds.clear()}_unsetTimer(e){clearTimeout(this._timers[e]),delete this._timers[e]}_handleStringResponse(e){if(/^#SP/.test(e))switch(e[3]){case"U":this.upDur=parseInt(e.substring(4));break;case"D":this.downDur=parseInt(e.substring(4)),sn(Xe.SpeedTest,{upDur:this.upDur,downDur:this.downDur},this.session.uuid)}else ft.warn("Unknown message from socket",e)}}dn.DEFAULT_REQUEST_TIMEOUT_MS=1e4;class un{buildRequest(e){this.request=Object.assign({jsonrpc:"2.0",id:Y()},e)}buildNotification(e){this.request=Object.assign({jsonrpc:"2.0"},e)}}const hn={id:"callID",destinationNumber:"destination_number",remoteCallerName:"remote_caller_id_name",remoteCallerNumber:"remote_caller_id_number",callerName:"caller_id_name",callerNumber:"caller_id_number",customHeaders:"custom_headers"};class pn extends un{constructor(e={}){if(super(),e.hasOwnProperty("dialogParams")){const t=B(e.dialogParams,["remoteSdp","localStream","remoteStream","localElement","remoteElement","onNotification","camId","micId","speakerId"]);for(const e in hn)e&&t.hasOwnProperty(e)&&(t[hn[e]]=t[e],delete t[e]);e.dialogParams=t}this.buildRequest({method:this.toString(),params:e})}}class fn extends pn{constructor(e){super(),this.method=Ht.GatewayState,this.buildRequest({method:this.method,voice_sdk_id:e,params:{}})}}class gn{constructor(e){this.pendingRequestId=null,this.onSocketMessage=e=>H(this,void 0,void 0,function*(){e.id===this.pendingRequestId&&this.gatewayStateTask.resolve(It(e))}),this.getIsRegistered=()=>H(this,void 0,void 0,function*(){const e=new fn(Pt());this.pendingRequestId=e.request.id,this.gatewayStateTask=Tt({}),this.session.execute(e);const t=yield this.gatewayStateTask.promise;return!!t&&[Jt.REGISTER,Jt.REGED].includes(t)}),this.session=e,this.gatewayStateTask=Tt({}),this.session.on("telnyx.socket.message",this.onSocketMessage)}}class mn extends pn{constructor(e){super(),this.method=Ht.Ping,this.buildRequest({method:this.method,voice_sdk_id:e,params:{}})}}class vn{constructor(e){this._session=e,this._lastInboundAt=0,this._lastProbeSentAt=0,this._probeInFlight=!1,this._intervalId=null,this._pendingMediaRecovery=null,this._browserWasOffline=!1,this._onlineHandler=null,this._offlineHandler=null}static isCriticalMethod(e){return vn.CRITICAL_METHODS.has(e)}start(){this._intervalId||(ft.debug("Signaling health: monitor started"),this._lastInboundAt=Date.now(),this._probeInFlight=!1,this._lastProbeSentAt=0,this._setupBrowserListeners(),this._intervalId=setInterval(()=>this._check(),3e3))}stop(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null,this._probeInFlight=!1,this._lastProbeSentAt=0),this._pendingMediaRecovery=null,this._cleanupBrowserListeners(),ft.debug("Signaling health: monitor stopped")}get isRunning(){return null!==this._intervalId}get isProbeInFlight(){return this._probeInFlight}onSocketActivity(){this._lastInboundAt=Date.now()}_resolveProbe(){if(!this._probeInFlight)return;if(this._probeInFlight=!1,this._lastProbeSentAt=0,this._lastInboundAt=Date.now(),ft.debug("Signaling health: probe resolved by matching Ping response"),!this._pendingMediaRecovery)return void ft.debug("Signaling health: probe resolved but no pending media recovery");const e=this._pendingMediaRecovery;this._pendingMediaRecovery=null,"healthy"===this._getSignalingHealthState()&&(ft.info(`Signaling health: signaling probe resolved, triggering pending ICE restart for call ${e.callId}`),this._triggerIceRestart(e.callId,e.reason))}_probeIfNeeded(e){var t;(null===(t=this._session.connection)||void 0===t?void 0:t.connected)&&(this._probeInFlight?ft.debug(`Signaling health: probe already in flight, skipping duplicate probe (${e})`):(ft.info(`Signaling health: ${e}, sending signaling probe`),this._sendProbe()))}onRequestTimeout(e,t,n=""){var i;(null===(i=this._session.connection)||void 0===i?void 0:i.connected)&&(vn.isCriticalMethod(n)?(ft.warn(`Critical signaling request timed out (id=${e}, method=${n}, timeout=${t}ms) — declaring signaling unhealthy`),this._triggerSignalingRecovery(`Critical signaling request timed out (method=${n}, id=${e}, timeout=${t}ms)`,"request")):ft.warn(`Non-critical signaling request timed out (id=${e}, method=${n||"unknown"}, timeout=${t}ms) — logging but not triggering signaling recovery`))}onPeerFailure(e,t){ft.warn(`Signaling health: peer failure reported (callId=${e}, evidence=${t})`),this._recoverMediaOrSignaling(e,`Peer connection failure (${t})`,`Peer failure detected (${t}) while signaling is unhealthy`,"peer_failure")}onNoRtp(e,t){ft.warn(`Signaling health: no RTP detected (callId=${e}, direction=${t})`),this._recoverMediaOrSignaling(e,`No RTP ${t} while media should be active`,`No RTP ${t} while signaling is unhealthy`,"no_rtp")}_setupBrowserListeners(){"undefined"==typeof window||this._onlineHandler||(this._onlineHandler=()=>{this._browserWasOffline&&(ft.debug(`Signaling health: browser online — clearing browser offline state for session ${this._session.sessionid}`),this._browserWasOffline=!1)},this._offlineHandler=()=>{this._browserWasOffline=!0,ft.debug(`Signaling health: browser offline signal received for session ${this._session.sessionid}`);const e=ot(ve);sn(Xe.Error,{error:e,sessionId:this._session.sessionid},this._session.uuid),this.isRunning&&this._probeIfNeeded("browser offline signal while monitor is active")},window.addEventListener("online",this._onlineHandler),window.addEventListener("offline",this._offlineHandler))}_cleanupBrowserListeners(){"undefined"!=typeof window&&this._onlineHandler&&this._offlineHandler&&(window.removeEventListener("online",this._onlineHandler),window.removeEventListener("offline",this._offlineHandler),this._onlineHandler=null,this._offlineHandler=null,this._browserWasOffline=!1)}onIceRestartFailed(e){ft.warn(`Signaling health: ICE restart failed (callId=${e}) — triggering socket reconnect`),this._triggerSignalingRecovery(`ICE restart failed for call ${e}`,"peer_failure")}_check(){var e;if(!(null===(e=this._session.connection)||void 0===e?void 0:e.connected))return;const t=Date.now(),n=t-this._lastInboundAt;if(n<2e4)return;if(!this._probeInFlight)return ft.info(`Signaling health: no inbound WS activity for ${Math.round(n/1e3)}s during active call, sending health probe`),void this._sendProbe();const i=t-this._lastProbeSentAt;i>=5e3&&(ft.warn(`Signaling health: probe timed out after ${i}ms with no inbound activity — declaring signaling unhealthy`),this._triggerSignalingRecovery("Signaling health probe timed out: no inbound WS activity after probe","probe"))}_sendProbe(){var e;this._probeInFlight=!0,this._lastProbeSentAt=Date.now();const t=new mn(Pt());null===(e=this._session.connection)||void 0===e||e.send(t).then(()=>this._resolveProbe()).catch(e=>{ft.warn("Signaling health: probe Ping failed to send",e)})}_recoverMediaOrSignaling(e,t,n,i){if(!this._session.hasActiveCall())return void ft.debug(`Signaling health: ignoring ${i} recovery without an active call`);const r=this._getSignalingHealthState();return"healthy"===r?(ft.info(`Signaling health: signaling is healthy, triggering ICE restart for call ${e}`),void this._triggerIceRestart(e,t)):"unknown"===r?(ft.info(`Signaling health: signaling health is unknown, deferring ICE restart decision for call ${e}`),this._pendingMediaRecovery={callId:e,reason:t,source:i},void this._probeIfNeeded(`${i} detected with stale/unknown signaling`)):(ft.info("Signaling health: signaling is unhealthy, triggering socket reconnect instead of ICE restart"),void this._triggerSignalingRecovery(n,i))}_getSignalingHealthState(){var e;if(!(null===(e=this._session.connection)||void 0===e?void 0:e.connected))return"unhealthy";if(this._probeInFlight)return"unknown";const t=Date.now(),n=this._lastInboundAt||this._session.connection.lastInboundAt||0;return 0===n?"unknown":t-n<3e3?"healthy":"unknown"}_triggerSignalingRecovery(e,t="probe"){var n,i,r;this._pendingMediaRecovery=null,this._probeInFlight=!1,this._lastProbeSentAt=0,ft.debug(`Signaling recovery triggered (source=${t}, reason=${e})`);const o=nt(He);sn(Xe.Warning,{warning:o,reason:e,source:t,sessionId:this._session.sessionid},this._session.uuid),(null===(n=this._session.connection)||void 0===n?void 0:n.connected)?(ft.info("Signaling health: force-closing WebSocket to trigger reconnect"),this._session.socketDisconnect()):ft.debug("Signaling health: recovery triggered but connection not connected",{connected:null===(i=this._session.connection)||void 0===i?void 0:i.connected,hasConnection:!!this._session.connection,socketGeneration:null===(r=this._session.connection)||void 0===r?void 0:r.socketGeneration})}_triggerIceRestart(e,t){ft.info(`Signaling health: triggering ICE restart for call ${e}`);const n=this._session.triggerIceRestart(e);if(!n.started)return void ft.info(`Signaling health: ICE restart not started for call ${e}: ${n.reason}`);const i=nt(We);sn(Xe.Warning,{warning:i,reason:t,callId:e,sessionId:this._session.sessionid},this._session.uuid)}}vn.CRITICAL_METHODS=new Set([Ht.Modify,Ht.Bye,Ht.Ping]);var bn="2.27.8",yn=bn;class wn extends pn{constructor(e,t,n,i,r={},o){super(),this.method="login";const a={login:e,passwd:t,login_token:n,userVariables:r,reconnection:o,loginParams:{},"User-Agent":{sdkVersion:yn,data:navigator.userAgent}};i&&(a.sessid=i),this.buildRequest({method:this.method,params:a})}}class kn extends pn{constructor(e,t){super(),this.buildRequest({id:e,result:{method:t}})}}class _n extends pn{toString(){return Ht.Invite}}class Sn extends pn{toString(){return Ht.Answer}}class xn extends pn{toString(){return Ht.Attach}}class Cn extends pn{toString(){return Ht.Bye}}class En extends pn{toString(){return Ht.Candidate}}class In extends pn{toString(){return Ht.EndOfCandidates}}class Tn extends pn{toString(){return Ht.Modify}}class Rn extends pn{toString(){return Ht.Info}}class On extends pn{toString(){return Ht.Broadcast}}class An extends pn{toString(){return Ht.Subscribe}}class Nn extends pn{toString(){return Ht.Unsubscribe}}class Ln extends pn{constructor(e){super(),this.method="anonymous_login";const{target_type:t,target_id:n,target_version_id:i,target_params:r,userVariables:o,sessionId:a,reconnection:s}=e,l={target_type:t,target_id:n,userVariables:o,reconnection:s,"User-Agent":{sdkVersion:yn,data:navigator.userAgent}};a&&(l.sessid=a),i&&(l.target_version_id=i),r&&(l.target_params=r),this.buildRequest({method:this.method,params:l})}}class Dn{constructor(e){if(this.options=e,this.uuid=Y(),this.sessionid="",this.subscriptions={},this.signature=null,this.relayProtocol=null,this.contexts=[],this.timeoutErrorCode=-32e3,this.invalidMethodErrorCode=-32601,this.authenticationRequiredErrorCode=-32e3,this.callReportId=null,this.callReportVoiceSdkId=null,this.dc=null,this.region=null,this.connection=null,this._jwtAuth=!1,this._autoReconnect=!0,this._idle=!1,this._reconnectAttempts=0,this._reconnectCountedGeneration=-1,this._intentionalClose=!1,this._tokenExpiryTimeout=null,this._pendingCallReportUploads=new Set,this._signalingHealthMonitor=new vn(this),this._executeQueue=[],!this.validateOptions())throw new Error("Invalid init options");var t,n;t=e.debug?"debug":"info",mt=null!==(n=gt[t])&&void 0!==n?n:gt.info,this._onSocketOpen=this._onSocketOpen.bind(this),this.onNetworkClose=this.onNetworkClose.bind(this),this._onSocketMessage=this._onSocketMessage.bind(this),this._handleLoginError=this._handleLoginError.bind(this),this._onSocketActivity=this._onSocketActivity.bind(this),this._attachListeners(),this.connection=new dn(this),this.registerAgent=new gn(this)}get __logger(){return ft}get connected(){return this.connection&&this.connection.connected}getIsRegistered(){return H(this,void 0,void 0,function*(){return this.registerAgent.getIsRegistered()})}get reconnectDelay(){const e=this._reconnectAttempts,t=Math.min(1e3*Math.pow(2,e-1),3e4),n=Math.floor(.25*t*(2*Math.random()-1)),i=t+n;return ft.debug("Reconnect delay computed",{attempt:e,baseDelayMs:1e3,maxDelayMs:3e4,delayMs:t,jitterMs:n,totalDelay:i,sessionId:this.sessionid}),i}execute(e){var t;if(this._idle)return new Promise(t=>this._executeQueue.push({resolve:t,msg:e}));if(!this.connected)return new Promise(t=>{this._executeQueue.push({resolve:t,msg:e}),ft.debug("Calling connect from execute since not currently connected."),this.connect()});const n=vn.isCriticalMethod((null===(t=e.request)||void 0===t?void 0:t.method)||"")?dn.DEFAULT_REQUEST_TIMEOUT_MS:void 0;return(null!=n?this.connection.send(e,n):this.connection.send(e)).catch(e=>H(this,void 0,void 0,function*(){if(e instanceof st)throw ft.debug(`Stale request settled (id=${e.requestId}, gen=${e.staleGeneration}) — not triggering recovery`),e;if("RequestTimeoutError"===(null==e?void 0:e.name))throw this.onSignalingRequestTimeout(e.requestId,e.timeoutMs,e.method),e;if((null==e?void 0:e.code)===this.authenticationRequiredErrorCode){if(!this._autoReconnect){const t=ot(ge,e,void 0,!0);sn(Xe.Error,{error:t,sessionId:this.sessionid},this.uuid)}yield this.login()}throw e}))}executeRaw(e){this._idle?this._executeQueue.push({msg:e}):this.connection.sendRawText(e)}trackCallReportUpload(e){this._pendingCallReportUploads.add(e),e.then(()=>this._pendingCallReportUploads.delete(e),()=>this._pendingCallReportUploads.delete(e))}_drainCallReportUploads(){return H(this,void 0,void 0,function*(){if(0===this._pendingCallReportUploads.size)return;const e=Array.from(this._pendingCallReportUploads);let t=!1;yield Promise.race([Promise.all(e.map(e=>e.catch(()=>{}))),new Promise(e=>setTimeout(()=>{t=!0,e()},Dn.CALL_REPORT_UPLOAD_DRAIN_TIMEOUT_MS))]),t&&ft.warn("Timed out waiting for pending call report uploads",{pendingCount:this._pendingCallReportUploads.size})})}validateOptions(){return Ct(this.options)||Et(this.options)}broadcast(e){}disconnect(){return H(this,void 0,void 0,function*(){clearTimeout(this._reconnectTimeout),this._clearTokenExpiryTimeout(),this.subscriptions={},this._autoReconnect=!1,this._intentionalClose=!0,this._reconnectAttempts=0,this.relayProtocol=null,yield this._drainCallReportUploads(),this._closeConnection(),yield sessionStorage.removeItem(this.signature),this._executeQueue=[],this._detachListeners(),ft.debug("Session disconnected. Cleaned up all listeners and subscriptions, closed connection, disabled auto-reconnect.")})}on(e,t){return rn(e,t,this.uuid),this}off(e,t){return an(e,t,this.uuid),this}connect(){return H(this,void 0,void 0,function*(){this.connection||(ft.debug("No existing connection found, creating a new one."),this.connection=new dn(this)),this._attachListeners(),this._autoReconnect||(ft.debug("autoReconnect was disabled, resetting reconnect attempts"),this._reconnectAttempts=0),this._autoReconnect=!0,this.connection.isAlive||(ft.debug("Connection wasn't alive, initiating connection to the server..."),this.connection.connect()),ft.debug("Connect method called. Connection initiated.")})}resetReconnectAttempts(){this._reconnectAttempts=0,this._reconnectCountedGeneration=-1}_handleLoginError(e){const t=ot(pe,e);sn(Xe.Error,{error:t,sessionId:this.sessionid},this.uuid)}clearReconnectToken(){Ft()}_checkTokenExpiry(){this._clearTokenExpiryTimeout();const e=this.options.login_token;if(e&&"string"==typeof e)try{const t=e.split(".");if(3!==t.length)return;const n=JSON.parse(atob(t[1])).exp;if("number"!=typeof n)return;const i=n-Math.floor(Date.now()/1e3);if(i<=0)return;if(i<=Dn.TOKEN_EXPIRY_WARNING_SECONDS)this._emitTokenExpiryWarning();else{const e=1e3*(i-Dn.TOKEN_EXPIRY_WARNING_SECONDS);this._tokenExpiryTimeout=setTimeout(()=>{this._emitTokenExpiryWarning()},e)}}catch(e){ft.debug("login_token is not a decodable JWT, skipping expiry check")}}_emitTokenExpiryWarning(){const e=nt(ze);sn(Xe.Warning,{warning:e,sessionId:this.sessionid},this.uuid)}_clearTokenExpiryTimeout(){null!==this._tokenExpiryTimeout&&(clearTimeout(this._tokenExpiryTimeout),this._tokenExpiryTimeout=null)}login({creds:e,onSuccess:t,onError:n}={}){return H(this,void 0,void 0,function*(){if(this.connection&&this.connection.isAlive){if(e&&(void 0!==e.login&&(this.options.login=e.login),void 0!==e.password&&(this.options.password=e.password),void 0!==e.passwd&&(this.options.passwd=e.passwd),void 0!==e.login_token&&(this.options.login_token=e.login_token),void 0!==e.userVariables&&(this.options.userVariables=e.userVariables),void 0!==e.anonymous_login&&(this.options.anonymous_login=e.anonymous_login)),Ct(this.options))return this._login({type:"login",onSuccess:t,onError:n});if(Et(this.options))return this._login({type:"anonymous_login",onSuccess:t,onError:n});{const e="Invalid login options provided for authentication.";ft.error(e);const t=ot(fe,void 0,e);return void sn(Xe.Error,{error:t,type:"InvalidCredentialsOptions",sessionId:this.sessionid},this.uuid)}}})}_login({type:e,onSuccess:t,onError:n}){var i,r,o;return H(this,void 0,void 0,function*(){let a;const s=!!Pt(),l=s&&(this.sessionid&&Dt()?this.sessionid:function(e=Date.now()){const t=sessionStorage.getItem(At);return t?Dt(e)?t:(sessionStorage.removeItem(At),sessionStorage.removeItem(Nt),null):null}())||"";if("login"===e){const e=null!==(o=null!==(i=this.options.pushWhenActive)&&void 0!==i?i:null===(r=this.options.userVariables)||void 0===r?void 0:r.push_when_active)&&void 0!==o&&o,t=Object.assign(Object.assign({},this.options.userVariables),{push_when_active:e,pn_late_fanout:e});a=new wn(this.options.login,this.options.password||this.options.passwd,this.options.login_token,l,t,s)}else a=new Ln({target_id:this.options.anonymous_login.target_id,target_type:this.options.anonymous_login.target_type,target_version_id:this.options.anonymous_login.target_version_id,target_params:this.options.anonymous_login.target_params,sessionId:l,userVariables:this.options.userVariables,reconnection:s});const c=yield this.execute(a).catch(e=>{this._handleLoginError(e),n&&n(e)});c&&(this.sessionid=c.sessid,this.sessionid&&Mt(this.sessionid),this._checkTokenExpiry(),t&&t())})}_onSocketOpen(){return H(this,void 0,void 0,function*(){this.startSignalingHealthMonitor()})}_flushIntermediateCallReports(e){const t=this.calls;t&&Object.values(t).forEach(t=>{if(null==t?void 0:t.flushIntermediateCallReport)try{t.flushIntermediateCallReport(e)}catch(n){ft.error("Failed to flush intermediate call report",{callId:t.id,flushReason:e,error:n})}})}_getSocketCloseCodeName(e){if(void 0===e)return;const t=Object.entries(Ke).find(([,t])=>t===e);return null==t?void 0:t[0]}_getSocketCloseError(e){if(e)return e instanceof Error?e.message:String(e)}_createSocketCloseFlushReason(e){return{type:(null==e?void 0:e.error)?"socket-error":"socket-close",socketClose:{code:null==e?void 0:e.code,codeName:this._getSocketCloseCodeName(null==e?void 0:e.code),reason:null==e?void 0:e.reason,wasClean:null==e?void 0:e.wasClean,error:this._getSocketCloseError(null==e?void 0:e.error)}}}onNetworkClose(e){var t,n,i,r;const o=null!==(n=null===(t=this.connection)||void 0===t?void 0:t.socketGeneration)&&void 0!==n?n:0,a=null!==(i=null==e?void 0:e.socketGeneration)&&void 0!==i?i:o;if(a<o)ft.debug(`Skipping stale onNetworkClose for socket generation ${a} (current generation is ${o})`);else if(a!==this._reconnectCountedGeneration){this._flushIntermediateCallReports(this._createSocketCloseFlushReason(e)),ft.debug("onNetworkClose called",{closeCode:null==e?void 0:e.code,closeReason:null==e?void 0:e.reason,wasClean:null==e?void 0:e.wasClean,voiceSdkId:this.callReportVoiceSdkId,sessid:this.sessionid||void 0,autoReconnect:this._autoReconnect,reconnectAttempts:this._reconnectAttempts}),this.relayProtocol&&ln(this.relayProtocol);for(const e in this.subscriptions)ln(e);if(this.subscriptions={},this.contexts=[],clearTimeout(this._keepAliveTimeout),clearTimeout(this._reconnectTimeout),this.stopSignalingHealthMonitor(),this.sessionid&&this._autoReconnect&&Mt(this.sessionid),this.connection&&(this.connection.previousGatewayState=""),this._autoReconnect){const e=null!==(r=this.options.maxReconnectAttempts)&&void 0!==r?r:10;if(this._reconnectCountedGeneration=a,this._reconnectAttempts+=1,e>0&&this._reconnectAttempts>e){ft.info(`Reconnection exhausted after ${e} attempts. Stopping automatic reconnect.`),this._reconnectAttempts=0,this._autoReconnect=!1,this._terminateActiveCallsLocally();const t=ot(ue);return void sn(Xe.Error,{error:t,sessionId:this.sessionid},this.uuid)}const t=this.reconnectDelay;ft.debug(`Reconnect attempt ${this._reconnectAttempts}${e>0?` of ${e}`:""} (delay=${t}ms)`),this._reconnectTimeout=setTimeout(()=>{ft.debug("Calling connect due to network close and auto-reconnect enabled."),this.connect()},t)}else if(ft.debug("auto_reconnect disabled, not reconnecting",{voiceSdkId:this.callReportVoiceSdkId,sessid:this.sessionid||void 0,intentionalClose:this._intentionalClose}),!this._intentionalClose){const e=nt(Ve);sn(Xe.Warning,{warning:e,reason:"auto_reconnect_disabled",sessionId:this.sessionid},this.uuid)}this._intentionalClose=!1}else ft.debug(`Skipping duplicate onNetworkClose for socket generation ${a} (already handled, reconnect attempt ${this._reconnectAttempts})`)}_onSocketMessage(e){}_removeSubscription(e,t){this._existsSubscription(e,t)&&(t?(delete this.subscriptions[e][t],an(e,null,t)):(delete this.subscriptions[e],ln(e)))}_addSubscription(e,t=null,n){this._existsSubscription(e,n)||(this._existsSubscription(e)||(this.subscriptions[e]={}),this.subscriptions[e][n]={},kt(t)&&rn(e,t,n))}_existsSubscription(e,t){return!(!this.subscriptions.hasOwnProperty(e)||!(!t||t&&this.subscriptions[e].hasOwnProperty(t)))}_attachListeners(){this._detachListeners(),ft.debug("Attaching socket event listeners"),this.on(Xe.SocketOpen,this._onSocketOpen),this.on(Xe.SocketClose,this.onNetworkClose),this.on(Xe.SocketError,this.onNetworkClose),this.on(Xe.SocketMessage,this._onSocketMessage),this.on(Xe.SocketActivity,this._onSocketActivity)}_detachListeners(){ft.debug("Detaching socket event listeners"),this.off(Xe.SocketOpen,this._onSocketOpen),this.off(Xe.SocketClose,this.onNetworkClose),this.off(Xe.SocketError,this.onNetworkClose),this.off(Xe.SocketMessage,this._onSocketMessage),this.off(Xe.SocketActivity,this._onSocketActivity)}_emptyExecuteQueues(){this._executeQueue.forEach(({resolve:e,msg:t})=>{"string"==typeof t?this.executeRaw(t):e(this.execute(t))})}_closeConnection(){var e,t;this._idle=!0,clearTimeout(this._keepAliveTimeout),this.stopSignalingHealthMonitor(),ft.debug("_closeConnection called",{connected:null===(e=this.connection)||void 0===e?void 0:e.connected,socketGeneration:null===(t=this.connection)||void 0===t?void 0:t.socketGeneration,voiceSdkId:this.callReportVoiceSdkId,sessid:this.sessionid||void 0}),this.connection&&this.connection.close()}_resetKeepAlive(){!1===this._pong&&(ft.warn("No ping/pong received, forcing PING ACK to keep alive"),this.execute(new mn(Pt()))),clearTimeout(this._keepAliveTimeout),this._triggerKeepAliveTimeoutCheck()}_triggerKeepAliveTimeoutCheck(){this._pong=!1,this._keepAliveTimeout=setTimeout(()=>this._resetKeepAlive(),35e3)}setPingReceived(){ft.debug("Ping received"),this._pong=!0}_onSocketActivity(){this._signalingHealthMonitor.onSocketActivity()}hasActiveCall(){const e=this.calls;if(!e)return!1;const t=new Set([qt.Early,qt.Active,qt.Held]);return Object.values(e).some(e=>e&&null!=e._state&&t.has(e._state))}_terminateActiveCallsLocally(){const e=this.calls;if(!e)return;const t=Object.keys(e);if(0!==t.length){ft.debug(`Reconnection exhausted — locally terminating ${t.length} active call(s) (no BYE): ${t.join(", ")}`);for(const n of t){const t=e[n];null==t||t.hangup({},!1)}}}startSignalingHealthMonitor(){this._signalingHealthMonitor.start()}stopSignalingHealthMonitor(){this._signalingHealthMonitor.stop()}triggerIceRestart(e){const t=this.calls,n=null==t?void 0:t[e];if(!n)return ft.warn(`Signaling health: cannot trigger ICE restart — call ${e} not found`),{started:!1,reason:"call not found"};const i=n.peer;if(!(null==i?void 0:i.restartIce))return ft.warn(`Signaling health: cannot trigger ICE restart — no peer for call ${e}`),{started:!1,reason:"no peer"};const r=i.restartIce();return r.started||ft.debug(`Signaling health: ICE restart skipped for call ${e}: ${r.reason}`),r}onSignalingRequestTimeout(e,t,n=""){this._signalingHealthMonitor.onRequestTimeout(e,t,n)}reportPeerFailure(e,t){this._signalingHealthMonitor.onPeerFailure(e,t)}reportNoRtp(e,t){this._signalingHealthMonitor.onNoRtp(e,t)}reportIceRestartFailed(e){this._signalingHealthMonitor.onIceRestartFailed(e)}static on(e,t){rn(e,t)}static off(e){an(e)}static uuid(){return Y()}clearConnection(){this.connection=null}hasAutoReconnect(){return this._autoReconnect}}Dn.TOKEN_EXPIRY_WARNING_SECONDS=120,Dn.CALL_REPORT_UPLOAD_DRAIN_TIMEOUT_MS=1e4;const Pn=e=>navigator.mediaDevices.getUserMedia(e),Mn=e=>e&&e instanceof MediaStream,Fn=(e,t,n)=>{const i=_t(e);if(null!==i){if(i.getAttribute("autoplay")||i.setAttribute("autoplay","autoplay"),i.getAttribute("playsinline")||i.setAttribute("playsinline","playsinline"),i.srcObject&&i.srcObject!==t&&(ft.warn("attachMediaStream: element already has a different MediaStream attached; overwriting will disrupt the existing call. Use a per-call remoteElement (client.newCall({ remoteElement }) or call.answer({ remoteElement })) for concurrent calls."),n)){const e=nt($e);sn(Xe.Warning,{warning:e,callId:n.callId,sessionId:n.sessionId},n.eventTarget)}i.srcObject=t}},jn=(e,t)=>{const n=_t(e);if(n){if(t&&n.srcObject!==t)return;n.srcObject=null}},Un=(e,t)=>H(void 0,void 0,void 0,function*(){const n=_t(e);if(null===n)return ft.info("No HTMLMediaElement to attach the speakerId"),!1;if("string"!=typeof t)return ft.info(`Invalid speaker deviceId: '${t}'`),!1;try{return yield n.setSinkId(t),!0}catch(e){return!1}}),$n=e=>{e&&"live"===e.readyState&&e.stop()},zn=e=>{Mn(e)&&e.getTracks().forEach($n),e=null},Bn=e=>H(void 0,void 0,void 0,function*(){ft.info("RTCService.getUserMedia",e);const{audio:t,video:n}=e;if(!t&&!n)return null;try{return yield Pn(e)}catch(t){if(ft.error("getUserMedia error: ",t),(e=>"NotReadableError"===e.name||"NotFoundError"===e.name||"OverconstrainedError"===e.name)(t)){const n=(e=>{const{audio:t,video:n}=e;let i=!1,r=t,o=n;if("object"==typeof t&&null!==t&&"deviceId"in t){i=!0;const e=Object.assign({},t);delete e.deviceId,r=0===Object.keys(e).length||e}if("object"==typeof n&&null!==n&&"deviceId"in n){i=!0;const e=Object.assign({},n);delete e.deviceId,o=0===Object.keys(e).length||e}return i?{audio:r,video:o}:null})(e);if(n){ft.warn("Device not found or not readable, falling back to default device");try{return yield Pn(n)}catch(e){throw ft.error("Fallback getUserMedia also failed: ",e),t}}}throw t}}),Hn=(e=null,t=!1)=>H(void 0,void 0,void 0,function*(){let n=[];const i=yield navigator.mediaDevices.getUserMedia(((e=null)=>({audio:!e||e===Qt.AudioIn||e===Qt.AudioOut,video:!e||e===Qt.Video}))(e)).catch(e=>(ft.error(e),null));if(i){if(zn(i),n=yield navigator.mediaDevices.enumerateDevices(),e&&(n=n.filter(t=>t.kind===e)),!0===t)return n;const r=[];n=n.filter(e=>{if(!e.groupId)return!0;const t=`${e.kind}-${e.groupId}`;return!r.includes(t)&&(r.push(t),!0)})}return n}),Wn=[[320,240],[640,360],[640,480],[1280,720],[1920,1080]],Vn=(e,t,n)=>H(void 0,void 0,void 0,function*(){const i=yield Hn(n,!0);for(let n=0;n<i.length;n++){const{deviceId:r,label:o}=i[n];if(e===r||t===o)return r}return null}),Gn=e=>e?{id:e.id,kind:e.kind,enabled:e.enabled,muted:e.muted,readyState:e.readyState}:null,qn=e=>{var t,n,i,r,o,a;return e?(null!==(n=null===(t=e.getTracks)||void 0===t?void 0:t.call(e))&&void 0!==n?n:[...null!==(r=null===(i=e.getAudioTracks)||void 0===i?void 0:i.call(e))&&void 0!==r?r:[],...null!==(a=null===(o=e.getVideoTracks)||void 0===o?void 0:o.call(e))&&void 0!==a?a:[]]).map(e=>Gn(e)):[]},Kn=(e,t)=>{if(!e)return!1;const{subscribed:n,alreadySubscribed:i}=Yn(e);return n.includes(t)||i.includes(t)},Yn=e=>{const t={subscribed:[],alreadySubscribed:[],unauthorized:[],unsubscribed:[],notSubscribed:[]};return Object.keys(t).forEach(n=>{t[n]=e[`${n}Channels`]||[]}),t},Qn=(e,t=null,n=null)=>{if(!Mn(e))return null;let i=[];switch(t){case"audio":i=e.getAudioTracks();break;case"video":i=e.getVideoTracks();break;default:i=e.getTracks()}i.forEach(e=>{switch(n){case"on":case!0:e.enabled=!0;break;case"off":case!1:e.enabled=!1;break;default:e.enabled=!e.enabled}})},Jn=e=>{Qn(e,"audio",!0)},Xn=e=>{Qn(e,"audio",!1)};var Zn;function ei(e,t){const n=document.getElementById(t);if(n)return n;if(e&&t){const n=document.createElement("audio");return n.id=t,n.loop=!0,n.src=e,n.preload="auto",n.load(),document.body.appendChild(n),n}return null}function ti(e){e&&(e._playFulfilled=!1,e._promise=e.play(),e._promise.then(()=>{e._playFulfilled=!0}).catch(t=>{ft.error("playAudio",t),e._playFulfilled=!0}))}function ni(e){e&&(e._playFulfilled?(e.pause(),e.currentTime=0):e._promise&&e._promise.then?e._promise.then(()=>{e.pause(),e.currentTime=0}):setTimeout(()=>{e.pause(),e.currentTime=0},1e3))}!function(e){e.not_supported="not supported",e.full="full",e.partial="partial"}(Zn||(Zn={}));const ii=e=>{const t=[],n=[];return e&&0!==e.length?(e.forEach(e=>{const i=e.mimeType.toLocaleLowerCase();i.startsWith("audio/")?t.push(e):i.startsWith("video/")&&n.push(e)}),{audioCodecs:t,videoCodecs:n}):{audioCodecs:t,videoCodecs:n}};class ri extends un{constructor(e,t){super(),this.method="ai_conversation",this.buildRequest({method:this.method,params:{type:"conversation.item.create",previous_item_id:null,item:{id:Y(),type:"message",role:"user",content:[{type:"input_text",text:e},...null==t?void 0:t.map(e=>({type:"image_url",image_url:{url:e}}))]}}})}}class oi extends un{constructor(e){super(),this.method="ai_conversation",this.buildNotification({method:this.method,params:{type:"conversation.item.create",item:e}})}}class ai{constructor(e,t){var n;this.peerConnection=null,this.intervalId=null,this.statsBuffer=[],this.intervalStartTime=null,this.callEndTime=null,this.logCollector=null,this.intervalAudioLevels={outbound:[],inbound:[]},this.intervalJitters=[],this.intervalRTTs=[],this.intervalBitrates={outbound:[],inbound:[]},this.previousStats={},this.previousCandidatePairSnapshot=null,this.MAX_BUFFER_SIZE=360,this.onFlushNeeded=null,this.onWarning=null,this._breachCounters={},this._activeWarnings=new Set,this._lastWarningEmitted={},this._prevPacketsReceived=null,this._prevPacketsLost=null,this._previousStatsEntryForWarnings=null,this._isHeld=!1,this._lastLocalAudioTrackSnapshotJson=null,this._hasConfirmedLocalAudio=!1,this._confirmedLocalAudioSilenceMs=0,this._segmentIndex=0,this._flushing=!1,this._stopped=!1,this.options=e,this.logCollectorOptions=t||{enabled:!1,level:"debug",maxEntries:1e3},this.callStartTime=new Date,this._lastIntermediateFlushTime=this.callStartTime,this.logCollectorOptions.enabled&&(this.logCollector=function(e){return new ht(e)}(this.logCollectorOptions),this.logCollector.start(),n=this.logCollector,pt=n)}start(e){var t,n;this.options.enabled&&(this.peerConnection=e,this.intervalStartTime=new Date,this._lastIntermediateFlushTime=this.intervalStartTime,this._stopped=!1,ft.info("CallReportCollector: Starting stats collection",{interval:this.options.interval,initialInterval:ai.INITIAL_COLLECTION_INTERVAL_MS,logCollectorActive:null!==(n=null===(t=this.logCollector)||void 0===t?void 0:t.isActive())&&void 0!==n&&n}),this._scheduleNextCollection())}stop(){var e,t;return H(this,void 0,void 0,function*(){this._stopped=!0,this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),this.callEndTime=new Date,this.peerConnection&&this.intervalStartTime&&(yield this._collectStats(!0));const n=null!==(t=null===(e=this.logCollector)||void 0===e?void 0:e.getLogCount())&&void 0!==t?t:0;this.logCollector&&this.logCollector.stop(),ft.info("CallReportCollector: Stopped stats collection",{totalIntervals:this.statsBuffer.length,totalLogs:n,duration:this.callEndTime.getTime()-this.callStartTime.getTime()})})}flush(e,t){var n,i,r,o;const a=this.statsBuffer.length,s=null!==(i=null===(n=this.logCollector)||void 0===n?void 0:n.getLogCount())&&void 0!==i?i:0,l="socket-close"===(null==t?void 0:t.type)||"socket-error"===(null==t?void 0:t.type),c=a>0||s>0||l;if(this._flushing||!c)return ft.debug("CallReportCollector: Skipping intermediate flush",{reason:this._flushing?"already-flushing":"no-stats-or-logs",flushReason:t,statsIntervals:a,logEntries:s}),null;this._flushing=!0;try{const n=this._segmentIndex++,i=this.statsBuffer;this.statsBuffer=[];const a=null!==(o=null===(r=this.logCollector)||void 0===r?void 0:r.drain())&&void 0!==o?o:[],s=new Date;this._lastIntermediateFlushTime=s;const l=Object.assign(Object.assign(Object.assign({summary:Object.assign(Object.assign({},e),{durationSeconds:(s.getTime()-this.callStartTime.getTime())/1e3,startTimestamp:this.callStartTime.toISOString(),endTimestamp:s.toISOString()}),stats:i},a.length>0?{logs:a}:{}),{segment:n}),t?{flushReason:t}:{});return ft.info("CallReportCollector: Flushed intermediate segment",{segment:n,intervals:i.length,logEntries:a.length,callId:e.callId,flushReason:t}),l}finally{this._flushing=!1}}postReport(e,t,n,i){var r,o;return H(this,void 0,void 0,function*(){const a=null===(r=this.logCollector)||void 0===r?void 0:r.getLogs(),s=a&&a.length>0;if(!this.options.enabled)return void ft.info("CallReportCollector: Skipping report — call reports disabled");if(0===this.statsBuffer.length&&!s)return void ft.info("CallReportCollector: Skipping report — no stats or logs collected");const l=this._segmentIndex>0,c=this._segmentIndex,d=Object.assign(Object.assign({summary:Object.assign(Object.assign({},e),{durationSeconds:this.callEndTime&&this.callStartTime?(this.callEndTime.getTime()-this.callStartTime.getTime())/1e3:void 0,startTimestamp:this.callStartTime.toISOString(),endTimestamp:null===(o=this.callEndTime)||void 0===o?void 0:o.toISOString()}),stats:this.statsBuffer},a&&a.length>0?{logs:a}:{}),l?{segment:c}:{});yield this._sendPayload(d,t,n,i,!0)})}sendPayload(e,t,n,i,r=!1){return H(this,void 0,void 0,function*(){yield this._sendPayload(e,t,n,i,!1,r)})}_sendPayload(e,t,n,i,r=!0,o=!1){var a,s;return H(this,void 0,void 0,function*(){const l=new URL(n),c=`${l.protocol.replace(/^ws/,"http")}//${l.host}/call_report`,d=r?"final report":`intermediate segment ${e.segment}`;ft.info(`CallReportCollector: Posting ${d}`,{endpoint:c,intervals:e.stats.length,logEntries:null!==(s=null===(a=e.logs)||void 0===a?void 0:a.length)&&void 0!==s?s:0,callId:e.summary.callId,segment:e.segment});const u={"Content-Type":"application/json","x-call-report-id":t,"x-call-id":e.summary.callId};i&&(u["x-voice-sdk-id"]=i);const h=JSON.stringify(e),p=(r||o)&&h.length<=ai.KEEPALIVE_BODY_LIMIT_BYTES;let f;for(let e=0;e<=ai.RETRY_DELAYS_MS.length;e++){try{const t=yield fetch(c,Object.assign({method:"POST",headers:u,body:h},p?{keepalive:!0}:{}));if(t.ok)return void ft.info(`CallReportCollector: Successfully posted ${d}`,{attempt:e+1,status:t.status});{const n=yield t.text();f=new Error(`Call report POST failed with status ${t.status}`),ft.error(`CallReportCollector: Failed to post ${d}`,{attempt:e+1,status:t.status,error:n})}}catch(l){f=l,ft.warn(`CallReportCollector: Network error posting ${d}`,{attempt:e+1,error:l})}const t=ai.RETRY_DELAYS_MS[e];if(void 0===t)break;ft.info(`CallReportCollector: Retrying ${d} in ${t}ms`,{attempt:e+2}),yield new Promise(e=>setTimeout(e,t))}throw ft.error(`CallReportCollector: Exhausted retries posting ${d}`,{error:f}),f instanceof Error?f:new Error("Call report POST failed after retries")})}getStatsBuffer(){return this.statsBuffer}shouldForceRelayCandidateForRecovery(){var e,t,n,i,r,o,a,s,l,c,d,u,h,p,f,g;if(this.statsBuffer.length<2)return!1;const m=this.statsBuffer[this.statsBuffer.length-1],v=this.statsBuffer[this.statsBuffer.length-2],b=null===(e=m.ice)||void 0===e?void 0:e.local;if("vpn"!==(null==b?void 0:b.networkType)||"relay"===(null==b?void 0:b.candidateType))return!1;const y=!1===(null===(t=m.ice)||void 0===t?void 0:t.writable),w="disconnected"===(null===(n=m.transport)||void 0===n?void 0:n.iceState)||"failed"===(null===(i=m.transport)||void 0===i?void 0:i.iceState),k=this._positiveDelta(null===(r=m.ice)||void 0===r?void 0:r.requestsSent,null===(o=v.ice)||void 0===o?void 0:o.requestsSent),_=this._positiveDelta(null===(a=m.ice)||void 0===a?void 0:a.responsesReceived,null===(s=v.ice)||void 0===s?void 0:s.responsesReceived),S=k>0&&0===_,x=this._positiveDelta(null===(c=null===(l=m.audio)||void 0===l?void 0:l.outbound)||void 0===c?void 0:c.bytesSent,null===(u=null===(d=v.audio)||void 0===d?void 0:d.outbound)||void 0===u?void 0:u.bytesSent),C=this._positiveDelta(null===(p=null===(h=m.audio)||void 0===h?void 0:h.inbound)||void 0===p?void 0:p.bytesReceived,null===(g=null===(f=v.audio)||void 0===f?void 0:f.inbound)||void 0===g?void 0:g.bytesReceived);return y||w||S||x>0&&0===C}getLogs(){var e,t;return null!==(t=null===(e=this.logCollector)||void 0===e?void 0:e.getLogs())&&void 0!==t?t:[]}_positiveDelta(e,t){return void 0===e||void 0===t?0:Math.max(0,e-t)}cleanup(){this._lastLocalAudioTrackSnapshotJson=null,this.logCollector&&(this.logCollector.clear(),this.logCollector=null)}setHeld(e){this._isHeld!==e&&(this._isHeld=e,this._trackBreach(Ce,!1),this._trackBreach(Ee,!1))}_scheduleNextCollection(){if(this._stopped||!this.peerConnection||!this.intervalStartTime||this.intervalId)return;const e=this._collectionIntervalFor();this.intervalId=setTimeout(()=>{this.intervalId=null,this._collectStats().finally(()=>{!this._stopped&&this.peerConnection&&this._scheduleNextCollection()})},e)}_collectionIntervalFor(){const e=this._positiveInterval(this.options.interval,5e3);return Math.min(ai.INITIAL_COLLECTION_INTERVAL_MS,e)}_positiveInterval(e,t){return"number"==typeof e&&Number.isFinite(e)&&e>0?e:t}_collectStats(e=!1){var t,n;return H(this,void 0,void 0,function*(){if(this.peerConnection&&this.intervalStartTime)try{const i=yield this.peerConnection.getStats(),r=new Date;let o=null,a=null,s=null,l=null,c=null,d=null;const u=[];let h=null;i.forEach(e=>{switch(e.type){case"outbound-rtp":"audio"===e.kind&&"audio"===e.mediaType&&(o=e);break;case"inbound-rtp":"audio"===e.kind&&"audio"===e.mediaType&&(a=e);break;case"media-playout":"audio"===e.kind&&(s=e);break;case"remote-inbound-rtp":"audio"===e.kind&&(l=e);break;case"remote-outbound-rtp":"audio"===e.kind&&(c=e);break;case"candidate-pair":(e.nominated||"succeeded"===e.state)&&u.push(e);break;case"transport":h=e}});const p=null==h?void 0:h.selectedCandidatePairId,f=p?null===(n=(t=i).get)||void 0===n?void 0:n.call(t,p):void 0,g=this._getCodec(i,null==o?void 0:o.codecId),m=this._getCodec(i,null==a?void 0:a.codecId);if(d="candidate-pair"===(null==f?void 0:f.type)?f:p?u.find(e=>e.id===p)||u[u.length-1]||null:u[u.length-1]||null,o){const e=this._getOutboundAudioLevel(i,o);if(null!==e&&this.intervalAudioLevels.outbound.push(e),void 0!==this.previousStats.outboundBytes&&void 0!==this.previousStats.timestamp){const e=(o.bytesSent||0)-this.previousStats.outboundBytes,t=(o.timestamp||r.getTime())-this.previousStats.timestamp;if(t>0){const n=8*e*1e3/t;this.intervalBitrates.outbound.push(n)}}this.previousStats.outboundBytes=o.bytesSent}if(a){const e=this._getInboundAudioLevel(i,a);if(null!==e&&this.intervalAudioLevels.inbound.push(e),void 0!==a.jitter&&this.intervalJitters.push(1e3*a.jitter),void 0!==this.previousStats.inboundBytes&&void 0!==this.previousStats.timestamp){const e=(a.bytesReceived||0)-this.previousStats.inboundBytes,t=(a.timestamp||r.getTime())-this.previousStats.timestamp;if(t>0){const n=8*e*1e3/t;this.intervalBitrates.inbound.push(n)}}this.previousStats.inboundBytes=a.bytesReceived}let v,b,y,w,k;d&&void 0!==d.currentRoundTripTime&&this.intervalRTTs.push(d.currentRoundTripTime),d&&(v=this._resolveCandidate(i,d.localCandidateId),b=this._resolveCandidate(i,d.remoteCandidateId)),d&&(y=Object.assign(Object.assign({id:d.id,localCandidateId:d.localCandidateId,remoteCandidateId:d.remoteCandidateId,state:d.state,nominated:d.nominated,writable:d.writable,currentRoundTripTime:d.currentRoundTripTime,requestsSent:d.requestsSent,responsesReceived:d.responsesReceived},v?{local:v}:{}),b?{remote:b}:{}),null!==this.previousCandidatePairSnapshot&&d.id!==this.previousCandidatePairSnapshot.id&&(ft.debug("CallReportCollector: ICE candidate pair changed mid-call",{previous:this.previousCandidatePairSnapshot,current:y}),this._emitWarning(Me)),this.previousCandidatePairSnapshot=y),o&&(w=this._getLocalAudioTrackSnapshot(),k=this._getOutboundAudioSourceStats(i,o)),this._logLocalAudioTrackSnapshot(w,k),this.previousStats.timestamp=r.getTime();const _=r.getTime()-this.intervalStartTime.getTime(),S=this._collectionIntervalFor();if(e||_>=S){const e=this._createStatsEntry(this.intervalStartTime,r,o,a,d,v,b,h,w,k,s,l,c,g,m);this.statsBuffer.push(e),this.statsBuffer.length>this.MAX_BUFFER_SIZE&&(this.statsBuffer.shift(),ft.warn("CallReportCollector: Buffer size limit reached, removing oldest entry")),this._checkQualityWarnings(e,a),this._requestIntermediateFlushIfNeeded(r),this.intervalStartTime=r,this._resetIntervalAccumulators()}}catch(e){ft.error("CallReportCollector: Error collecting stats",{error:e})}})}_getIntermediateReportInterval(){var e;return null!==(e=this.options.intermediateReportInterval)&&void 0!==e?e:ai.DEFAULT_INTERMEDIATE_REPORT_INTERVAL_MS}_requestIntermediateFlushIfNeeded(e){var t,n;const i=this.statsBuffer.length,r=null!==(n=null===(t=this.logCollector)||void 0===t?void 0:t.getLogCount())&&void 0!==n?n:0;if(!this.onFlushNeeded||this._flushing)return;if(0===i&&0===r)return void ft.debug("CallReportCollector: Skipping intermediate flush request — no stats or logs buffered");const o=this._getIntermediateReportInterval(),a=e.getTime()-this._lastIntermediateFlushTime.getTime();let s=null;if(i>=ai.STATS_FLUSH_THRESHOLD||r>=ai.LOGS_FLUSH_THRESHOLD?s="buffer-limit":o>0&&a>=o&&(s="safety-interval"),s){ft.info("CallReportCollector: Requesting intermediate report flush",{reason:s,statsIntervals:i,logEntries:r,msSinceLastFlush:a}),this._lastIntermediateFlushTime=e;try{this.onFlushNeeded()}catch(e){ft.error("CallReportCollector: onFlushNeeded callback error",{error:e})}}}_checkQualityWarnings(e,t){var n,i,r,o,a,s,l,c,d,u,h,p,f,g,m;if(!this.onWarning)return;const v=null===(n=e.connection)||void 0===n?void 0:n.roundTripTimeAvg,b=null===(r=null===(i=e.audio)||void 0===i?void 0:i.inbound)||void 0===r?void 0:r.jitterAvg;let y;if(t){const e=null!==(o=t.packetsReceived)&&void 0!==o?o:0,n=null!==(a=t.packetsLost)&&void 0!==a?a:0;if(null!==this._prevPacketsReceived&&null!==this._prevPacketsLost){const t=e-this._prevPacketsReceived,i=n-this._prevPacketsLost,r=t+i;r>0&&(y=i/r*100)}this._prevPacketsReceived=e,this._prevPacketsLost=n}if(this._trackBreach(we,void 0!==v&&v>ai.THRESHOLD_RTT_MS),this._trackBreach(ke,void 0!==b&&b>ai.THRESHOLD_JITTER_MS),this._trackBreach(_e,void 0!==y&&y>ai.THRESHOLD_PACKET_LOSS_PCT),this._trackLowLocalAudio(e),this._isHeld?this._trackBreach(Ce,!1):this._trackLowInboundAudio(e),void 0!==v&&void 0!==b&&void 0!==y){const e=93.2-.11*b-2.5*y-1e3*v*.01,t=Math.max(1,Math.min(4.5,1+.035*e+e*(e-60)*(100-e)*7e-6));this._trackBreach(Se,t<ai.THRESHOLD_MOS)}else this._trackBreach(Se,!1);if(void 0!==(null===(l=null===(s=e.audio)||void 0===s?void 0:s.inbound)||void 0===l?void 0:l.bytesReceived)){const t=null===(u=null===(d=null===(c=this._previousStatsEntryForWarnings)||void 0===c?void 0:c.audio)||void 0===d?void 0:d.inbound)||void 0===u?void 0:u.bytesReceived,n=e.audio.inbound.bytesReceived;this._trackBreach(Ee,!this._isHeld&&void 0!==t&&n-t==0)}if(void 0!==(null===(p=null===(h=e.audio)||void 0===h?void 0:h.outbound)||void 0===p?void 0:p.bytesSent)){const t=null===(m=null===(g=null===(f=this._previousStatsEntryForWarnings)||void 0===f?void 0:f.audio)||void 0===g?void 0:g.outbound)||void 0===m?void 0:m.bytesSent,n=e.audio.outbound.bytesSent;this._trackBreach(Ie,void 0!==t&&n-t==0)}this._previousStatsEntryForWarnings=e}_trackLowLocalAudio(e){var t;const n=null===(t=e.audio)||void 0===t?void 0:t.outbound,i=null==n?void 0:n.audioLevelAvg,r=null==n?void 0:n.localTrack;if(void 0!==i&&!1!==(null==r?void 0:r.enabled)&&!0!==(null==r?void 0:r.muted))return i<=ai.THRESHOLD_LOCAL_AUDIO_LEVEL?void(this._hasConfirmedLocalAudio?(this._confirmedLocalAudioSilenceMs+=this._getStatsIntervalDurationMs(e),this._confirmedLocalAudioSilenceMs>=ai.CONFIRMED_LOCAL_AUDIO_SILENCE_MS&&this._emitWarningOncePerEpisode(xe)):this._trackBreach(xe,!0)):(this._hasConfirmedLocalAudio=!0,this._confirmedLocalAudioSilenceMs=0,void this._trackBreach(xe,!1));this._resetLowLocalAudioWarning()}_resetLowLocalAudioWarning(){this._confirmedLocalAudioSilenceMs=0,this._trackBreach(xe,!1)}_getStatsIntervalDurationMs(e){const t=new Date(e.intervalStartUtc).getTime(),n=new Date(e.intervalEndUtc).getTime()-t;return Number.isFinite(n)&&n>0?n:this.options.interval}_trackLowInboundAudio(e){var t;const n=null===(t=e.audio)||void 0===t?void 0:t.inbound,i=null==n?void 0:n.audioLevelAvg;if(void 0===i)return void this._trackBreach(Ce,!1);const r=i<=ai.THRESHOLD_INBOUND_AUDIO_LEVEL;this._trackBreach(Ce,r)}_trackBreach(e,t){var n,i;if(t){if(this._breachCounters[e]=(null!==(n=this._breachCounters[e])&&void 0!==n?n:0)+1,this._breachCounters[e]>=ai.CONSECUTIVE_BREACHES_REQUIRED){this._activeWarnings.add(e);const t=Date.now();t-(null!==(i=this._lastWarningEmitted[e])&&void 0!==i?i:0)>=ai.WARNING_THROTTLE_MS&&(this._lastWarningEmitted[e]=t,this._emitWarning(e))}}else this._breachCounters[e]=0,this._activeWarnings.delete(e),delete this._lastWarningEmitted[e]}_emitWarningOncePerEpisode(e){this._activeWarnings.has(e)||(this._activeWarnings.add(e),this._lastWarningEmitted[e]=Date.now(),this._emitWarning(e))}_emitWarning(e){var t;try{const n=nt(e);ft.warn(`CallReportCollector: warning ${n.code}: ${n.message}`),null===(t=this.onWarning)||void 0===t||t.call(this,n)}catch(t){ft.error(`CallReportCollector: Failed to emit warning ${e}`,{error:t})}}_createStatsEntry(e,t,n,i,r,o,a,s,l,c,d,u,h,p,f){const g={intervalStartUtc:e.toISOString(),intervalEndUtc:t.toISOString(),audio:{}};if(n&&(g.audio.outbound=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({packetsSent:n.packetsSent,bytesSent:n.bytesSent,audioLevelAvg:this._average(this.intervalAudioLevels.outbound),bitrateAvg:this._average(this.intervalBitrates.outbound)},l?{localTrack:l}:{}),c?{mediaSource:c}:{}),void 0!==n.retransmittedPacketsSent?{retransmittedPacketsSent:n.retransmittedPacketsSent}:{}),void 0!==n.retransmittedBytesSent?{retransmittedBytesSent:n.retransmittedBytesSent}:{}),void 0!==n.headerBytesSent?{headerBytesSent:n.headerBytesSent}:{}),void 0!==n.nackCount?{nackCount:n.nackCount}:{}),void 0!==n.targetBitrate?{targetBitrate:n.targetBitrate}:{}),void 0!==n.totalPacketSendDelay?{totalPacketSendDelay:n.totalPacketSendDelay}:{}),void 0!==n.active?{active:n.active}:{}),p?{codec:this._buildCodecSnapshot(p,n.codecId)}:{})),i&&(g.audio.inbound=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({packetsReceived:i.packetsReceived,bytesReceived:i.bytesReceived,packetsLost:i.packetsLost,packetsDiscarded:i.packetsDiscarded,jitterBufferDelay:i.jitterBufferDelay,jitterBufferEmittedCount:i.jitterBufferEmittedCount,totalSamplesReceived:i.totalSamplesReceived,concealedSamples:i.concealedSamples,concealmentEvents:i.concealmentEvents,audioLevelAvg:this._average(this.intervalAudioLevels.inbound),jitterAvg:this._average(this.intervalJitters),bitrateAvg:this._average(this.intervalBitrates.inbound)},void 0!==i.nackCount?{nackCount:i.nackCount}:{}),void 0!==i.headerBytesReceived?{headerBytesReceived:i.headerBytesReceived}:{}),void 0!==i.fecPacketsReceived?{fecPacketsReceived:i.fecPacketsReceived}:{}),void 0!==i.fecPacketsDiscarded?{fecPacketsDiscarded:i.fecPacketsDiscarded}:{}),void 0!==i.jitterBufferTargetDelay?{jitterBufferTargetDelay:i.jitterBufferTargetDelay}:{}),void 0!==i.jitterBufferMinimumDelay?{jitterBufferMinimumDelay:i.jitterBufferMinimumDelay}:{}),void 0!==i.totalSamplesDecoded?{totalSamplesDecoded:i.totalSamplesDecoded}:{}),void 0!==i.samplesDecodedWithSilence?{samplesDecodedWithSilence:i.samplesDecodedWithSilence}:{}),void 0!==i.samplesDecodedWithConcealment?{samplesDecodedWithConcealment:i.samplesDecodedWithConcealment}:{}),void 0!==i.totalAudioEnergy?{totalAudioEnergy:i.totalAudioEnergy}:{}),void 0!==i.totalSamplesDuration?{totalSamplesDuration:i.totalSamplesDuration}:{}),f?{codec:this._buildCodecSnapshot(f,i.codecId)}:{})),r&&(g.connection=Object.assign(Object.assign({roundTripTimeAvg:this._average(this.intervalRTTs),currentRoundTripTime:r.currentRoundTripTime},void 0!==r.currentRoundTripTime?{roundTripTimeSource:"candidate-pair.currentRoundTripTime"}:{}),{packetsSent:r.packetsSent,packetsReceived:r.packetsReceived,bytesSent:r.bytesSent,bytesReceived:r.bytesReceived}),g.ice=Object.assign(Object.assign({id:r.id,localCandidateId:r.localCandidateId,remoteCandidateId:r.remoteCandidateId,state:r.state,nominated:r.nominated,writable:r.writable,currentRoundTripTime:r.currentRoundTripTime,requestsSent:r.requestsSent,responsesReceived:r.responsesReceived},o?{local:o}:{}),a?{remote:a}:{})),s&&(g.transport=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},void 0!==s.iceState?{iceState:s.iceState}:{}),void 0!==s.dtlsState?{dtlsState:s.dtlsState}:{}),void 0!==s.srtpCipher?{srtpCipher:s.srtpCipher}:{}),void 0!==s.tlsVersion?{tlsVersion:s.tlsVersion}:{}),void 0!==s.selectedCandidatePairChanges?{selectedCandidatePairChanges:s.selectedCandidatePairChanges}:{}),void 0!==s.selectedCandidatePairId?{selectedCandidatePairId:s.selectedCandidatePairId}:{})),d&&(g.mediaPlayout=this._withoutUndefined({synthesizedSamples:d.synthesizedSamples,synthesizedDuration:d.synthesizedDuration,totalPlayoutDelay:d.totalPlayoutDelay,totalSampleCount:d.totalSampleCount})),u||h){const e={};if(u){const t=void 0!==u.jitter?1e3*u.jitter:void 0;let n;"number"==typeof u.totalRoundTripTime&&"number"==typeof u.roundTripTimeMeasurements&&u.roundTripTimeMeasurements>0&&(n=u.totalRoundTripTime/u.roundTripTimeMeasurements),e.inbound=this._withoutUndefined({packetsReceived:u.packetsReceived,packetsLost:u.packetsLost,fractionLost:u.fractionLost,jitter:t,roundTripTime:u.roundTripTime,totalRoundTripTime:u.totalRoundTripTime,roundTripTimeMeasurements:u.roundTripTimeMeasurements,roundTripTimeAvg:n,nackCount:u.nackCount,reportsReceived:u.reportsReceived,packetsDiscarded:u.packetsDiscarded})}h&&(e.outbound=this._withoutUndefined({packetsSent:h.packetsSent,bytesSent:h.bytesSent,reportsCount:h.reportsCount,roundTripTime:h.roundTripTime,totalPacketSendDelay:h.totalPacketSendDelay})),g.remoteRtcp=e}return g}_resolveCandidate(e,t){if(!t)return void ft.debug("CallReportCollector: candidateId is empty, skipping resolve");const n=e.get(t);if(!n)return void ft.debug("CallReportCollector: candidate not found in stats report",{candidateId:t});const i={};if(void 0!==n.id&&(i.id=n.id),void 0!==n.address?i.address=n.address:void 0!==n.ip&&(i.address=n.ip),void 0!==n.port&&(i.port=n.port),void 0!==n.candidateType&&(i.candidateType=n.candidateType),void 0!==n.protocol&&(i.protocol=n.protocol),void 0!==n.networkType&&(i.networkType=n.networkType),void 0!==n.url&&(i.url=n.url),void 0!==n.relayProtocol&&(i.relayProtocol=n.relayProtocol),0!==Object.keys(i).length)return i;ft.debug("CallReportCollector: candidate report has no usable fields",{candidateId:t})}_getCodec(e,t){if(!t)return;const n=e.get(t);return n&&"codec"===n.type?n:void 0}_buildCodecSnapshot(e,t){const n=this._withoutUndefined(Object.assign({mimeType:e.mimeType,clockRate:e.clockRate,channels:e.channels,payloadType:e.payloadType,sdpFmtpLine:e.sdpFmtpLine},void 0!==t?{codecId:t}:{}));return Object.keys(n).length>0?n:void 0}_getOutboundMediaSource(e,t){let n;return t.mediaSourceId&&(n=e.get(t.mediaSourceId)),n||e.forEach(e=>{n||"media-source"!==e.type||"audio"!==e.kind||(n=e)}),n}_getLocalAudioTrackSnapshot(){var e,t;try{const n=null===(e=this.peerConnection)||void 0===e?void 0:e.getSenders().find(e=>{var t;return"audio"===(null===(t=e.track)||void 0===t?void 0:t.kind)}),i=null==n?void 0:n.track;if(!i)return;const r=null===(t=i.getSettings)||void 0===t?void 0:t.call(i),o=this._withoutUndefined({deviceId:null==r?void 0:r.deviceId,groupId:null==r?void 0:r.groupId,channelCount:null==r?void 0:r.channelCount,sampleRate:null==r?void 0:r.sampleRate,sampleSize:null==r?void 0:r.sampleSize,latency:null==r?void 0:r.latency,echoCancellation:null==r?void 0:r.echoCancellation,noiseSuppression:null==r?void 0:r.noiseSuppression,autoGainControl:null==r?void 0:r.autoGainControl}),a=this._withoutUndefined(Object.assign({id:i.id,label:i.label,enabled:i.enabled,muted:i.muted,readyState:i.readyState,contentHint:i.contentHint},Object.keys(o).length>0?{settings:o}:{}));return Object.keys(a).length>0?a:void 0}catch(e){return void ft.debug("CallReportCollector: unable to snapshot local audio track",{error:e})}}_getOutboundAudioSourceStats(e,t){const n=this._getOutboundMediaSource(e,t);if(!n)return;const i=this._withoutUndefined({id:n.id,trackIdentifier:n.trackIdentifier,audioLevel:n.audioLevel,totalAudioEnergy:n.totalAudioEnergy,totalSamplesDuration:n.totalSamplesDuration,echoReturnLoss:n.echoReturnLoss,echoReturnLossEnhancement:n.echoReturnLossEnhancement});return Object.keys(i).length>0?i:void 0}_logLocalAudioTrackSnapshot(e,t){if(!e||0===Object.keys(e).length)return;const n=this._stableStringify(e);n!==this._lastLocalAudioTrackSnapshotJson&&(this._lastLocalAudioTrackSnapshotJson=n,ft.debug("CallReportCollector: local audio track snapshot",{localTrack:e,mediaSource:t}))}_withoutUndefined(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return void 0!==i&&(t[n]=i),t},{})}_stableStringify(e){return JSON.stringify(this._sortObjectKeys(e))}_sortObjectKeys(e){return Array.isArray(e)?e.map(e=>this._sortObjectKeys(e)):e&&"object"==typeof e?Object.keys(e).sort().reduce((t,n)=>(t[n]=this._sortObjectKeys(e[n]),t),{}):e}_getOutboundAudioLevel(e,t){const n=this._getOutboundMediaSource(e,t);if(void 0!==(null==n?void 0:n.audioLevel))return n.audioLevel;if(n){const e=this._computeAudioLevelFromEnergy(n.totalAudioEnergy,n.totalSamplesDuration,"outbound");if(null!==e)return e}return this._getTrackAudioLevel(e,t.trackId)}_getInboundAudioLevel(e,t){if(void 0!==t.audioLevel)return t.audioLevel;const n=this._computeAudioLevelFromEnergy(t.totalAudioEnergy,t.totalSamplesDuration,"inbound");return null!==n?n:this._getTrackAudioLevel(e,t.trackId)}_computeAudioLevelFromEnergy(e,t,n){if(void 0===e||void 0===t)return null;const i="inbound"===n?"inboundAudioEnergy":"outboundAudioEnergy",r="inbound"===n?"inboundSamplesDuration":"outboundSamplesDuration",o=this.previousStats[i],a=this.previousStats[r];if(this.previousStats[i]=e,this.previousStats[r]=t,void 0===o||void 0===a)return null;const s=e-o,l=t-a;if(l<=0)return null;const c=Math.sqrt(s/l);return Math.min(1,Math.max(0,c))}_getTrackAudioLevel(e,t){var n;if(!t)return null;const i=e.get(t);return i&&null!==(n=i.audioLevel)&&void 0!==n?n:null}_average(e){if(0===e.length)return;const t=e.reduce((e,t)=>e+t,0);return parseFloat((t/e.length).toFixed(4))}_resetIntervalAccumulators(){this.intervalAudioLevels={outbound:[],inbound:[]},this.intervalJitters=[],this.intervalRTTs=[],this.intervalBitrates={outbound:[],inbound:[]}}}ai.INITIAL_COLLECTION_INTERVAL_MS=1e3,ai.STATS_FLUSH_THRESHOLD=300,ai.LOGS_FLUSH_THRESHOLD=800,ai.DEFAULT_INTERMEDIATE_REPORT_INTERVAL_MS=18e4,ai.CONSECUTIVE_BREACHES_REQUIRED=3,ai.THRESHOLD_RTT_MS=.4,ai.THRESHOLD_JITTER_MS=30,ai.THRESHOLD_PACKET_LOSS_PCT=1,ai.THRESHOLD_MOS=3.5,ai.THRESHOLD_LOCAL_AUDIO_LEVEL=.001,ai.CONFIRMED_LOCAL_AUDIO_SILENCE_MS=3e4,ai.THRESHOLD_INBOUND_AUDIO_LEVEL=.001,ai.WARNING_THROTTLE_MS=15e3,ai.RETRY_DELAYS_MS=[500,1e3,2e3],ai.KEEPALIVE_BODY_LIMIT_BYTES=61440;class si{constructor(e,t){this._buffers={local:[],remote:[]},this._bufferBytes={local:0,remote:0},this._trackStates={local:null,remote:null},this._processors=[],this._readerCancellers=[],this._flushTimerId=null,this._flushing=!1,this._stopped=!1,this._started=!1,this._startedAt=null,this._endedAt=null,this._overflowWarnedThisWindow={local:!1,remote:!1},this.onWarning=null,this._host=null,this._callReportId=null,this.options=e,this.callContext=t,this.recordingId=t.recordingId||`${t.callId}-${Date.now().toString(36)}`}start(e,t){if(!this.options.enabled||this._started)return;if("function"!=typeof MediaStreamTrackProcessor)return ft.warn("CallRecorder: MediaStreamTrackProcessor unavailable — recording disabled for this call"),this._emitWarning(Te),void(this._started=!0);const n=this.options.tracks||["local","remote"];let i=0;if(n.includes("local")&&e&&(this._attach(e,"local"),i++),n.includes("remote")&&t&&(this._attach(t,"remote"),i++),0===i)return ft.info("CallRecorder: no audio tracks available to record — recording idle for this call",{callId:this.callContext.callId}),void(this._started=!0);this._startedAt=new Date,this._started=!0,this._scheduleFlush(),ft.info("CallRecorder: started",{callId:this.callContext.callId,tracksAttached:i,flushIntervalMs:this._flushIntervalMs(),maxBufferBytes:this._maxBufferBytes()})}stop(){this._stopped||(this._stopped=!0,this._clearFlushTimer(),this._cancelReaders(),this._endedAt=new Date,ft.info("CallRecorder: stopped",{callId:this.callContext.callId,packetsBuffered:this._buffers.local.length+this._buffers.remote.length}))}postFinalReport(){return H(this,void 0,void 0,function*(){if(!this.options.enabled)return;if(this.stop(),!this._startedAt)return void ft.debug("CallRecorder: postFinalReport skipped — never started");const e=this._resolveEndpointFromContext();if(!e)return void ft.debug("CallRecorder: postFinalReport skipped — no host available");const t=this.options.tracks||["local","remote"],n=this._startedAt,i=this._endedAt||new Date,r=t.flatMap(e=>{const t=this._drain(e);if(0===t.length)return[];const r=this._buildEnvelope(t,e,"final",n,i);return[{envelope:r,bodyBytes:JSON.stringify(r).length}]}),o=r.reduce((e,t)=>e+t.bodyBytes,0)<=si.KEEPALIVE_BODY_LIMIT_BYTES,a=(yield Promise.allSettled(r.map(({envelope:t})=>this._postRecording(e,t,o)))).find(e=>"rejected"===e.status);if(a)throw a.reason})}cleanup(){this._clearFlushTimer(),this._cancelReaders(),this._buffers={local:[],remote:[]},this._bufferBytes={local:0,remote:0},this._trackStates={local:null,remote:null}}_attach(e,t){this._trackStates[t]={ssrc:Math.floor(4294967295*Math.random())>>>0,seq:0,ts:0};try{const n=new MediaStreamTrackProcessor({track:e});this._processors.push(n);const i=n.readable.getReader();let r=!1;const o=()=>{r=!0,i.cancel().catch(()=>{}).finally(()=>{})};this._readerCancellers.push(o),(()=>{H(this,void 0,void 0,function*(){try{for(;!r&&!this._stopped;){const{done:e,value:n}=yield i.read();if(e)break;this._onFrame(t,n)}}catch(e){this._stopped||ft.warn("CallRecorder: reader loop error",{track:t,error:e})}})})()}catch(e){ft.warn("CallRecorder: failed to attach track",{track:t,error:e}),this._trackStates[t]=null}}_onFrame(e,t){var n;const i=this._trackStates[e];if(!i||this._stopped)return;const r=t.numberOfFrames,o=new Float32Array(r);t.copyTo(o,{planeIndex:0}),null===(n=t.close)||void 0===n||n.call(t);const a=new Uint8Array(o.buffer,o.byteOffset,o.byteLength);i.seq=i.seq+1&65535;const s=i.ts;i.ts+=r;const l={rtpSeq:i.seq,rtpTs:s,rtpSsrc:i.ssrc,capturedAt:(new Date).toISOString(),payloadBytes:a};this._pushPacket(l,e)}_pushPacket(e,t){const n=e.payloadBytes.length+si.PACKET_OVERHEAD_BYTES,i=this._maxBufferBytes(),r=this._buffers[t];if(r.push(e),this._bufferBytes[t]+=n,this._bufferBytes[t]>i){for(;r.length>1&&this._bufferBytes[t]>i;){const e=r.shift();e&&(this._bufferBytes[t]-=e.payloadBytes.length+si.PACKET_OVERHEAD_BYTES)}this._overflowWarnedThisWindow[t]||(this._overflowWarnedThisWindow[t]=!0,ft.warn("CallRecorder: buffer overflow — oldest packets dropped",{track:t}),this._emitWarning(Re))}}_flushIntervalMs(){var e;const t=null!==(e=this.options.flushIntervalMs)&&void 0!==e?e:15e3;return t<=0?t:Math.min(t,this._maxSafeFlushIntervalMs())}_maxSafeFlushIntervalMs(){const e=this._sampleRate()*si.BYTES_PER_SAMPLE+si.FRAMES_PER_SECOND*si.PACKET_OVERHEAD_BYTES;return Math.max(1e3,this._maxBufferBytes()/e*500)}_maxBufferBytes(){var e;return null!==(e=this.options.maxBufferBytes)&&void 0!==e?e:Vt}_sampleRate(){var e;return null!==(e=this.options.sampleRate)&&void 0!==e?e:48e3}_scheduleFlush(){if(this._stopped||this._flushTimerId)return;const e=this._flushIntervalMs();e<=0||(this._flushTimerId=setInterval(()=>{this._periodicFlush().catch(e=>{ft.error("CallRecorder: periodic flush error",{error:e})})},e))}_clearFlushTimer(){this._flushTimerId&&(clearInterval(this._flushTimerId),this._flushTimerId=null)}_cancelReaders(){for(const e of this._readerCancellers)try{e()}catch(e){}this._readerCancellers=[],this._processors=[]}_periodicFlush(){return H(this,void 0,void 0,function*(){if(!this._flushing&&!this._stopped){this._flushing=!0;try{const e=this._resolveEndpointFromContext();if(!e)return void ft.debug("CallRecorder: periodic flush skipped — no host available");const t=this.options.tracks||["local","remote"],n=this._startedAt||new Date,i=new Date;yield Promise.allSettled(t.map(t=>{const r=this._drain(t);if(0===r.length)return Promise.resolve();const o=this._buildEnvelope(r,t,"intermediate",n,i);return this._postRecording(e,o,!1).catch(e=>{ft.error("CallRecorder: intermediate flush failed",{track:t,error:e})})})),this._overflowWarnedThisWindow={local:!1,remote:!1}}finally{this._flushing=!1}}})}_drain(e){const t=this._buffers[e];return this._buffers[e]=[],this._bufferBytes[e]=0,t}_resolveEndpointFromContext(){const e=this.callContext.host;return e?this._resolveEndpoint(e):this._host?this._resolveEndpoint(this._host):null}_setHost(e){this._host=e}_setCallReportId(e){e&&(this._callReportId=e)}_resolveCallReportId(){return this._callReportId||this.callContext.callReportId}_resolveEndpoint(e){const t=this.options.endpoint||"/call_recording";try{const n=new URL(e);return`${n.protocol.replace(/^ws/,"http")}//${n.host}${t}`}catch(n){return/^https?:\/\//.test(e)?`${e}${t}`:`https://${e}${t}`}}_buildEnvelope(e,t,n,i,r){let o=0;const a=e.map(e=>(o+=e.payloadBytes.length,{rtp_seq:e.rtpSeq,rtp_ts:e.rtpTs,rtp_ssrc:e.rtpSsrc,captured_at:e.capturedAt,payload_b64:this._toBase64(e.payloadBytes)}));return Object.assign(Object.assign({call_report_id:this._resolveCallReportId(),call_id:this.callContext.callId},this.callContext.voiceSdkId?{voice_sdk_id:this.callContext.voiceSdkId}:{}),{recording_id:this.recordingId,segment:n,track:t,codec:"pcm-f32-le",sample_rate:this._sampleRate(),channels:1,started_at:i.toISOString(),ended_at:r.toISOString(),packet_count:e.length,byte_count:o,packets:a})}_postRecording(e,t,n){return H(this,void 0,void 0,function*(){const i={"Content-Type":"application/json","x-call-report-id":t.call_report_id,"x-call-id":t.call_id};t.voice_sdk_id&&(i["x-voice-sdk-id"]=t.voice_sdk_id);const r=JSON.stringify(t),o=n&&r.length<=si.KEEPALIVE_BODY_LIMIT_BYTES,a=this.options.fetchImpl||fetch;let s;for(let n=0;n<=si.RETRY_DELAYS_MS.length;n++){try{const l=yield a(e,Object.assign({method:"POST",headers:i,body:r},o?{keepalive:!0}:{}));if(l.ok)return void ft.info("CallRecorder: posted",{track:t.track,segment:t.segment,attempt:n+1,status:l.status,packets:t.packet_count});{const e=yield l.text().catch(()=>"");s=new Error(`Call recording POST failed with status ${l.status}`),ft.error("CallRecorder: failed to post",{track:t.track,segment:t.segment,attempt:n+1,status:l.status,error:e})}}catch(e){s=e,ft.warn("CallRecorder: network error posting",{track:t.track,segment:t.segment,attempt:n+1,error:e})}const l=si.RETRY_DELAYS_MS[n];if(void 0===l)break;ft.info("CallRecorder: retrying",{track:t.track,segment:t.segment,inMs:l,attempt:n+2}),yield new Promise(e=>setTimeout(e,l))}throw ft.error("CallRecorder: exhausted retries",{track:t.track,segment:t.segment,error:s}),s instanceof Error?s:new Error("Call recording POST failed after retries")})}_emitWarning(e){var t;try{const n=nt(e);null===(t=this.onWarning)||void 0===t||t.call(this,n)}catch(t){ft.warn("CallRecorder: failed to emit warning",{code:e,error:t})}}_toBase64(e){let t="";for(let n=0;n<e.length;n+=32768){const i=e.subarray(n,n+32768);t+=String.fromCharCode.apply(null,Array.from(i))}return btoa(t)}}si.RETRY_DELAYS_MS=[500,1e3,2e3],si.KEEPALIVE_BODY_LIMIT_BYTES=61440,si.PACKET_OVERHEAD_BYTES=160,si.BYTES_PER_SAMPLE=4,si.FRAMES_PER_SECOND=100;class li{constructor(){this._rawDeviceCache=[],this._deviceChangeHandler=null,this._stopped=!1}logDevicesAtStart(){return H(this,void 0,void 0,function*(){try{const e=yield this._enumerateAudioDevices();this._rawDeviceCache=e,ft.debug("MediaDeviceCollector: devices at call start",{devices:e}),this._startDeviceChangeListener()}catch(e){ft.debug("MediaDeviceCollector: failed to log devices at start",{error:e})}})}stop(){this._stopped=!0,this._removeDeviceChangeListener()}_enumerateAudioDevices(){return H(this,void 0,void 0,function*(){try{if("undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.enumerateDevices)return(yield navigator.mediaDevices.enumerateDevices()).filter(e=>"audioinput"===e.kind||"audiooutput"===e.kind)}catch(e){ft.debug("MediaDeviceCollector: enumerateDevices failed",{error:e})}return[]})}_startDeviceChangeListener(){"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.addEventListener&&(this._deviceChangeHandler=()=>{this._onDeviceChange()},navigator.mediaDevices.addEventListener("devicechange",this._deviceChangeHandler))}_removeDeviceChangeListener(){this._deviceChangeHandler&&"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.removeEventListener&&navigator.mediaDevices.removeEventListener("devicechange",this._deviceChangeHandler),this._deviceChangeHandler=null}_onDeviceChange(){return H(this,void 0,void 0,function*(){if(!this._stopped)try{const e=yield this._enumerateAudioDevices(),t=new Set(this._rawDeviceCache.map(e=>e.deviceId)),n=new Set(e.map(e=>e.deviceId)),i=e.filter(e=>!t.has(e.deviceId)),r=this._rawDeviceCache.filter(e=>!n.has(e.deviceId));(i.length>0||r.length>0)&&ft.debug("MediaDeviceCollector: devices changed during call",{connected:i,disconnected:r}),this._rawDeviceCache=e}catch(e){ft.debug("MediaDeviceCollector: error handling devicechange",{error:e})}})}}var ci,di=ct(function(e,t){var n;function i(){}function r(){r.init.call(this)}function o(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var a,s,l;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),l=s[t]):(s=e._events=new i,e._eventsCount=0),l){if("function"==typeof l?l=s[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(a=o(e))&&0<a&&l.length>a){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(c)}}else l=s[t]=n,++e._eventsCount;return e}function s(e,t,n){function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}var r=!1;return i.listener=n,i}function l(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function c(e,t){for(var n=Array(t);t--;)n[t]=e[t];return n}Object.defineProperty(t,"__esModule",{value:!0}),i.prototype=Object.create(null),r.EventEmitter=r,r.usingDomains=!1,r.prototype.domain=void 0,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.init=function(){this.domain=null,r.usingDomains&&n.active&&!(this instanceof n.Domain)&&(this.domain=n.active),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new i,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||0>e||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return o(this)},r.prototype.emit=function(e){var t,n,i,r,o,a,s,l="error"===e;if(a=this._events)l=l&&null==a.error;else if(!l)return!1;if(s=this.domain,l){if(t=arguments[1],!s){if(t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(n=a[e]))return!1;var u="function"==typeof n;switch(i=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var i=e.length,r=c(e,i),o=0;o<i;++o)r[o].call(n)}(n,u,this);break;case 2:!function(e,t,n,i){if(t)e.call(n,i);else for(var r=e.length,o=c(e,r),a=0;a<r;++a)o[a].call(n,i)}(n,u,this,arguments[1]);break;case 3:!function(e,t,n,i,r){if(t)e.call(n,i,r);else for(var o=e.length,a=c(e,o),s=0;s<o;++s)a[s].call(n,i,r)}(n,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,i,r,o){if(t)e.call(n,i,r,o);else for(var a=e.length,s=c(e,a),l=0;l<a;++l)s[l].call(n,i,r,o)}(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=Array(i-1),o=1;o<i;o++)r[o-1]=arguments[o];!function(e,t,n,i){if(t)e.apply(n,i);else for(var r=e.length,o=c(e,r),a=0;a<r;++a)o[a].apply(n,i)}(n,u,this,r)}return!0},r.prototype.addListener=function(e,t){return a(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return a(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,s(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,s(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,r,o,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener&&n.listener===t)0==--this._eventsCount?this._events=new i:(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){s=n[a].listener,o=a;break}if(0>o)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new i,this;delete r[e]}else!function(e,t){for(var n=t,i=n+1,r=e.length;i<r;n+=1,i+=1)e[n]=e[i];e.pop()}(n,o);r.removeListener&&this.emit("removeListener",e,s||t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new i,this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=new i:delete n[e]),this;if(0===arguments.length){for(var r,o=Object.keys(n),a=0;a<o.length;++a)"removeListener"!==(r=o[a])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new i,this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},r.prototype.listeners=function(e){var t,n,i=this._events;return n=i&&(t=i[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[],n},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},r.prototype.listenerCount=l,r.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]};var d,u=new Uint8Array(16);function h(){if(!d&&!(d="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(u)}for(var p=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,f=[],g=0;256>g;++g)f.push((g+256).toString(16).substr(1));function m(e,t,n){var i=(e=e||{}).random||(e.rng||h)();if(i[6]=64|15&i[6],i[8]=128|63&i[8],t){n=n||0;for(var r=0;16>r;++r)t[n+r]=i[r];return t}return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&p.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}(i)}function v(e,t){if(!e||!t)return{};const n={...e};if(n.localCandidateId){const e=t.get(n.localCandidateId);n.local={...e}}if(n.remoteCandidateId){const e=t.get(n.remoteCandidateId);n.remote={...e}}return n}function b(e,t,n){return 8*function(e,t,n){const i=e[n],r=t?t[n]:null;return null===i||null===r?null:(i-r)/(e.timestamp-t.timestamp)*1e3}(e,t,n)}function y(e){if(!e.entries)return e;const t={};return e.forEach(function(e,n){t[n]=e}),t}function w(e,t,n={}){if(!e)return null;let i={audio:{inbound:[],outbound:[]},video:{inbound:[],outbound:[]},connection:{inbound:[],outbound:[]}};n.remote&&(i.remote={audio:{inbound:[],outbound:[]},video:{inbound:[],outbound:[]}});for(const t of e.values())switch(t.type){case"outbound-rtp":{const n=t.mediaType||t.kind,r={};let o={};if(!["audio","video"].includes(n))continue;if(t.codecId){const n=e.get(t.codecId);n&&(r.clockRate=n.clockRate,r.mimeType=n.mimeType,r.payloadType=n.payloadType)}o=e.get(t.mediaSourceId)||e.get(t.trackId)||{},i[n].outbound.push({...t,...r,track:{...o}});break}case"inbound-rtp":{let n=t.mediaType||t.kind,r={};const o={};if(!["audio","video"].includes(n))if(t.id.includes("Video"))n="video";else{if(!t.id.includes("Audio"))continue;n="audio"}if(t.codecId){const n=e.get(t.codecId);n&&(o.clockRate=n.clockRate,o.mimeType=n.mimeType,o.payloadType=n.payloadType)}if(!i.connection.id&&t.transportId){const n=e.get(t.transportId);if(n&&n.selectedCandidatePairId){const t=e.get(n.selectedCandidatePairId);i.connection=v(t,e)}}r=e.get(t.mediaSourceId)||e.get(t.trackId)||{},i[n].inbound.push({...t,...o,track:{...r}});break}case"peer-connection":i.connection.dataChannelsClosed=t.dataChannelsClosed,i.connection.dataChannelsOpened=t.dataChannelsOpened;break;case"remote-inbound-rtp":{if(!n.remote)break;let r=t.mediaType||t.kind;const o={};if(!["audio","video"].includes(r))if(t.id.includes("Video"))r="video";else{if(!t.id.includes("Audio"))continue;r="audio"}if(t.codecId){const n=e.get(t.codecId);n&&(o.clockRate=n.clockRate,o.mimeType=n.mimeType,o.payloadType=n.payloadType)}if(!i.connection.id&&t.transportId){const n=e.get(t.transportId);if(n&&n.selectedCandidatePairId){const t=e.get(n.selectedCandidatePairId);i.connection=v(t,e)}}i.remote[r].inbound.push({...t,...o});break}case"remote-outbound-rtp":{if(!n.remote)break;const r=t.mediaType||t.kind,o={};if(!["audio","video"].includes(r))continue;if(t.codecId){const n=e.get(t.codecId);n&&(o.clockRate=n.clockRate,o.mimeType=n.mimeType,o.payloadType=n.payloadType)}i.remote[r].outbound.push({...t,...o});break}}if(!i.connection.id)for(const t of e.values())"candidate-pair"===t.type&&t.nominated&&"succeeded"===t.state&&(i.connection=v(t,e));return i=function(e,t){return t?(e.audio.inbound.map(e=>{let n=t.audio.inbound.find(t=>t.id===e.id);e.bitrate=b(e,n,"bytesReceived"),e.packetRate=b(e,n,"packetsReceived")}),e.audio.outbound.map(e=>{let n=t.audio.outbound.find(t=>t.id===e.id);e.bitrate=b(e,n,"bytesSent"),e.packetRate=b(e,n,"packetsSent")}),e.video.inbound.map(e=>{let n=t.video.inbound.find(t=>t.id===e.id);e.bitrate=b(e,n,"bytesReceived"),e.packetRate=b(e,n,"packetsReceived")}),e.video.outbound.map(e=>{let n=t.video.outbound.find(t=>t.id===e.id);e.bitrate=b(e,n,"bytesSent"),e.packetRate=b(e,n,"packetsSent")}),e):e}(i,t),i}let k,_={},S=[];t.WebRTCStats=class extends r{constructor(e){if(super(),this.monitoringSetInterval=0,this.connectionMonitoringSetInterval=0,this.connectionMonitoringInterval=1e3,this.remote=!0,this.peersToMonitor={},this.timeline=[],this.statsToMonitor=["inbound-rtp","outbound-rtp","remote-inbound-rtp","remote-outbound-rtp","peer-connection","data-channel","stream","track","sender","receiver","transport","candidate-pair","local-candidate","remote-candidate"],"undefined"==typeof window)throw new Error("WebRTCStats only works in browser");const t={...e};this.isEdge=!!window.RTCIceGatherer,this.getStatsInterval=t.getStatsInterval||1e3,this.rawStats=!!t.rawStats,this.statsObject=!!t.statsObject,this.filteredStats=!!t.filteredStats,this.shouldWrapGetUserMedia=!!t.wrapGetUserMedia,"boolean"==typeof t.remote&&(this.remote=t.remote),this.debug=!!t.debug,this.logLevel=t.logLevel||"none",this.shouldWrapGetUserMedia&&this.wrapGetUserMedia()}async addPeer(e,t){return console.warn("The addPeer() method has been deprecated, please use addConnection()"),this.addConnection({peerId:e,pc:t})}async addConnection(e){const{pc:t,peerId:n}=e;let{connectionId:i,remote:r}=e;if(r="boolean"==typeof r?r:this.remote,!(t&&t instanceof RTCPeerConnection))throw new Error("Missing argument 'pc' or is not of instance RTCPeerConnection");if(!n)throw new Error("Missing argument peerId");if(this.isEdge)throw new Error("Can't monitor peers in Edge at this time.");if(this.peersToMonitor[n]){if(i&&i in this.peersToMonitor[n])throw new Error(`We are already monitoring connection with id ${i}.`);for(let e in this.peersToMonitor[n]){const i=this.peersToMonitor[n][e];if(i.pc===t)throw new Error(`We are already monitoring peer with id ${n}.`);"closed"===i.pc.connectionState&&this.removeConnection({pc:i.pc})}}const o=t.getConfiguration();return o.iceServers&&o.iceServers.forEach(function(e){delete e.credential}),i||(i=m()),this.emitEvent({event:"addConnection",tag:"peer",peerId:n,connectionId:i,data:{options:e,peerConfiguration:o}}),this.monitorPeer({peerId:n,connectionId:i,pc:t,remote:r}),{connectionId:i}}getTimeline(e){return this.timeline=this.timeline.sort((e,t)=>e.timestamp.getTime()-t.timestamp.getTime()),e?this.timeline.filter(t=>t.tag===e):this.timeline}get logger(){const e=e=>{const t=["none","error","warn","info","debug"];return t.slice(0,t.indexOf(this.logLevel)+1).indexOf(e)>-1};return{error(...t){this.debug&&e("error")&&console.error("[webrtc-stats][error] ",...t)},warn(...t){this.debug&&e("warn")&&console.warn("[webrtc-stats][warn] ",...t)},info(...t){this.debug&&e("info")&&console.log("[webrtc-stats][info] ",...t)},debug(...t){this.debug&&e("debug")&&console.debug("[webrtc-stats][debug] ",...t)}}}removeConnection(e){let t,{connectionId:n,pc:i}=e;if(!i&&!n)throw new Error("Missing arguments. You need to either send pc or a connectionId.");if(n){if("string"!=typeof n)throw new Error("connectionId must be a string.");for(let e in this.peersToMonitor)n in this.peersToMonitor[e]&&(i=this.peersToMonitor[e][n].pc,t=e)}else if(i){if(!(i instanceof RTCPeerConnection))throw new Error("pc must be an instance of RTCPeerConnection.");for(let e in this.peersToMonitor)for(let r in this.peersToMonitor[e])this.peersToMonitor[e][r].pc===i&&(n=r,t=e)}if(!i||!n)throw new Error("Could not find the desired connection.");return this.removePeerConnectionEventListeners(n,i),delete this.peersToMonitor[t][n],0===Object.values(this.peersToMonitor[t]).length&&delete this.peersToMonitor[t],{connectionId:n}}removeAllPeers(){for(let e in this.peersToMonitor)this.removePeer(e)}removePeer(e){if(this.logger.info(`Removing PeerConnection with id ${e}.`),this.peersToMonitor[e]){for(let t in this.peersToMonitor[e]){let n=this.peersToMonitor[e][t].pc;this.removePeerConnectionEventListeners(t,n)}delete this.peersToMonitor[e]}}destroy(){this.removeAllPeers(),S.forEach(e=>{this.removeTrackEventListeners(e)}),S=[],this.shouldWrapGetUserMedia&&k&&(navigator.mediaDevices.getUserMedia=k)}monitorPeer(e){let{peerId:t,connectionId:n,pc:i,remote:r}=e;if(!i)return void this.logger.warn("Did not receive pc argument when calling monitorPeer()");const o={pc:i,connectionId:n,stream:null,stats:{parsed:null,raw:null},options:{remote:r}};if(this.peersToMonitor[t]){if(n in this.peersToMonitor[t])return void this.logger.warn(`Already watching connection with ID ${n}`);this.peersToMonitor[t][n]=o}else this.peersToMonitor[t]={[n]:o};this.addPeerConnectionEventListeners(t,n,i),1===this.numberOfMonitoredPeers&&(this.startStatsMonitoring(),this.startConnectionStateMonitoring())}startStatsMonitoring(){this.monitoringSetInterval||(this.monitoringSetInterval=window.setInterval(()=>{this.numberOfMonitoredPeers||this.stopStatsMonitoring(),this.getStats().then(e=>{e.forEach(e=>{this.emitEvent(e)})})},this._getStatsInterval))}stopStatsMonitoring(){this.monitoringSetInterval&&(window.clearInterval(this.monitoringSetInterval),this.monitoringSetInterval=0)}async getStats(e=null){this.logger.info(e?`Getting stats from peer ${e}`:"Getting stats from all peers");let t={};if(e){if(!this.peersToMonitor[e])throw new Error(`Cannot get stats. Peer with id ${e} does not exist`);t[e]=this.peersToMonitor[e]}else t=this.peersToMonitor;let n=[];for(const i in t)for(const r in t[i]){const o=t[i][r],a=o.pc;if(a&&!this.checkIfConnectionIsClosed(i,r,a))try{const e=this.getTimestamp(),t=a.getStats(null);if(t){const a=await t,s=this.getTimestamp(),l=y(a),c={remote:o.options.remote},d=w(a,o.stats.parsed,c),u={event:"stats",tag:"stats",peerId:i,connectionId:r,timeTaken:s-e,data:d};!0===this.rawStats&&(u.rawStats=a),!0===this.statsObject&&(u.statsObject=l),!0===this.filteredStats&&(u.filteredStats=this.filteroutStats(l)),n.push(u),o.stats.parsed=d}else this.logger.error(`PeerConnection from peer ${i} did not return any stats data`)}catch(e){this.logger.error(e)}}return n}startConnectionStateMonitoring(){this.connectionMonitoringSetInterval=window.setInterval(()=>{this.numberOfMonitoredPeers||this.stopConnectionStateMonitoring();for(const e in this.peersToMonitor)for(const t in this.peersToMonitor[e]){const n=this.peersToMonitor[e][t].pc;this.checkIfConnectionIsClosed(e,t,n)}},this.connectionMonitoringInterval)}checkIfConnectionIsClosed(e,t,n){const i=this.isConnectionClosed(n);if(i){this.removeConnection({pc:n});let i="closed"===n.connectionState?"onconnectionstatechange":"oniceconnectionstatechange";this.emitEvent({event:i,peerId:e,connectionId:t,tag:"connection",data:"closed"})}return i}isConnectionClosed(e){return"closed"===e.connectionState||"closed"===e.iceConnectionState}stopConnectionStateMonitoring(){this.connectionMonitoringSetInterval&&(window.clearInterval(this.connectionMonitoringSetInterval),this.connectionMonitoringSetInterval=0)}wrapGetUserMedia(){if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)return void this.logger.warn("'navigator.mediaDevices.getUserMedia' is not available in browser. Will not wrap getUserMedia.");this.logger.info("Wrapping getUsermedia functions."),k=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);const e=this.parseGetUserMedia.bind(this);navigator.mediaDevices.getUserMedia=function(){return e({constraints:arguments[0]}),k.apply(navigator.mediaDevices,arguments).then(t=>(e({stream:t}),t),t=>(e({error:t}),Promise.reject(t)))}.bind(navigator.mediaDevices)}filteroutStats(e={}){const t={...e};for(const e in t){var n=t[e];this.statsToMonitor.includes(n.type)||delete t[e]}return t}get peerConnectionListeners(){return{icecandidate:(e,t,n,i)=>{this.logger.debug("[pc-event] icecandidate | peerId: ${peerId}",i),this.emitEvent({event:"onicecandidate",tag:"connection",peerId:e,connectionId:t,data:i.candidate})},track:(e,t,n,i)=>{this.logger.debug(`[pc-event] track | peerId: ${e}`,i);const r=i.track,o=i.streams[0];e in this.peersToMonitor&&t in this.peersToMonitor[e]&&(this.peersToMonitor[e][t].stream=o),this.addTrackEventListeners(r,t),this.emitEvent({event:"ontrack",tag:"track",peerId:e,connectionId:t,data:{stream:o?this.getStreamDetails(o):null,track:r?this.getMediaTrackDetails(r):null,title:i.track.kind+":"+i.track.id+" "+i.streams.map(function(e){return"stream:"+e.id})}})},signalingstatechange:(e,t,n)=>{this.logger.debug(`[pc-event] signalingstatechange | peerId: ${e}`),this.emitEvent({event:"onsignalingstatechange",tag:"connection",peerId:e,connectionId:t,data:{signalingState:n.signalingState,localDescription:n.localDescription,remoteDescription:n.remoteDescription}})},iceconnectionstatechange:(e,t,n)=>{this.logger.debug(`[pc-event] iceconnectionstatechange | peerId: ${e}`),this.emitEvent({event:"oniceconnectionstatechange",tag:"connection",peerId:e,connectionId:t,data:n.iceConnectionState})},icegatheringstatechange:(e,t,n)=>{this.logger.debug(`[pc-event] icegatheringstatechange | peerId: ${e}`),this.emitEvent({event:"onicegatheringstatechange",tag:"connection",peerId:e,connectionId:t,data:n.iceGatheringState})},icecandidateerror:(e,t,n,i)=>{this.logger.debug(`[pc-event] icecandidateerror | peerId: ${e}`),this.emitEvent({event:"onicecandidateerror",tag:"connection",peerId:e,connectionId:t,error:{errorCode:i.errorCode}})},connectionstatechange:(e,t,n)=>{this.logger.debug(`[pc-event] connectionstatechange | peerId: ${e}`),this.emitEvent({event:"onconnectionstatechange",tag:"connection",peerId:e,connectionId:t,data:n.connectionState})},negotiationneeded:(e,t,n)=>{this.logger.debug(`[pc-event] negotiationneeded | peerId: ${e}`),this.emitEvent({event:"onnegotiationneeded",tag:"connection",peerId:e,connectionId:t})},datachannel:(e,t,n,i)=>{this.logger.debug(`[pc-event] datachannel | peerId: ${e}`,i),this.emitEvent({event:"ondatachannel",tag:"datachannel",peerId:e,connectionId:t,data:i.channel})}}}addPeerConnectionEventListeners(e,t,n){this.logger.debug(`Adding event listeners for peer ${e} and connection ${t}.`),_[t]={},Object.keys(this.peerConnectionListeners).forEach(i=>{_[t][i]=this.peerConnectionListeners[i].bind(this,e,t,n),n.addEventListener(i,_[t][i],!1)})}parseGetUserMedia(e){try{const t={event:"getUserMedia",tag:"getUserMedia",data:{...e}};e.stream&&(t.data.details=this.parseStream(e.stream),e.stream.getTracks().map(e=>{this.addTrackEventListeners(e),S.push(e)})),this.emitEvent(t)}catch(e){}}parseStream(e){const t={audio:[],video:[]};return e.getTracks().forEach(e=>{t[e.kind].push(this.getMediaTrackDetails(e))}),t}getMediaTrackDetails(e){return{enabled:e.enabled,id:e.id,contentHint:e.contentHint,kind:e.kind,label:e.label,muted:e.muted,readyState:e.readyState,constructorName:e.constructor.name,capabilities:e.getCapabilities?e.getCapabilities():{},constraints:e.getConstraints?e.getConstraints():{},settings:e.getSettings?e.getSettings():{},_track:e}}getStreamDetails(e){return{active:e.active,id:e.id,_stream:e}}getTrackEventObject(e){return{mute:t=>{this.emitEvent({event:"mute",tag:"track",connectionId:e,data:{event:t}})},unmute:t=>{this.emitEvent({event:"unmute",tag:"track",connectionId:e,data:{event:t}})},overconstrained:t=>{this.emitEvent({event:"overconstrained",tag:"track",connectionId:e,data:{event:t}})},ended:t=>{this.emitEvent({event:"ended",tag:"track",connectionId:e,data:{event:t}}),this.removeTrackEventListeners(t.target)}}}addTrackEventListeners(e,t){_[e.id]={};const n=this.getTrackEventObject(t);Object.keys(n).forEach(t=>{_[e.id][t]=n[t].bind(this),e.addEventListener(t,_[e.id][t])}),_[e.id].readyState=setInterval(()=>{if("ended"===e.readyState){let t=new CustomEvent("ended",{detail:{check:"readyState"}});e.dispatchEvent(t)}},1e3)}removeTrackEventListeners(e){if(e.id in _){const t=this.getTrackEventObject();Object.keys(t).forEach(t=>{e.removeEventListener(t,_[e.id][t])}),clearInterval(_[e.id].readyState),delete _[e.id]}}addToTimeline(e){this.timeline.push(e),this.emit("timeline",e)}emitEvent(e){const t={...e,timestamp:new Date};this.addToTimeline(t),t.tag&&this.emit(t.tag,t)}set getStatsInterval(e){if(!Number.isInteger(e))throw new Error(`getStatsInterval should be an integer, got: ${e}`);this._getStatsInterval=e,this.monitoringSetInterval&&(this.stopStatsMonitoring(),this.startStatsMonitoring())}get numberOfMonitoredPeers(){return Object.keys(this.peersToMonitor).length}removePeerConnectionEventListeners(e,t){e in _&&(Object.keys(this.peerConnectionListeners).forEach(n=>{t.removeEventListener(n,_[e][n],!1)}),delete _[e]),t.getSenders().forEach(e=>{e.track&&this.removeTrackEventListeners(e.track)}),t.getReceivers().forEach(e=>{e.track&&this.removeTrackEventListeners(e.track)})}getTimestamp(){return Date.now()}wrapGetDisplayMedia(){const e=this;if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){const t=navigator.mediaDevices.getDisplayMedia.bind(navigator.mediaDevices),n=function(){return e.debug("navigator.mediaDevices.getDisplayMedia",null,arguments[0]),t.apply(navigator.mediaDevices,arguments).then(function(e){return e},function(t){return e.debug("navigator.mediaDevices.getDisplayMediaOnFailure",null,t.name),Promise.reject(t)})};navigator.mediaDevices.getDisplayMedia=n.bind(navigator.mediaDevices)}}}});(ci=di)&&ci.__esModule&&Object.prototype.hasOwnProperty.call(ci,"default")&&ci.default;var ui=di.WebRTCStats;function hi(e){return isNaN(e)?null:e>4.2?"excellent":e>=4.1&&e<=4.2?"good":e>=3.7&&e<=4?"fair":e>=3.1&&e<=3.6?"poor":"bad"}class pi extends un{constructor(e,t){super(),this.buildRequest({type:"debug_report_start",debug_report_id:e,debug_report_version:1,call_id:t})}}class fi extends un{constructor(e,t){super(),this.buildRequest({type:"debug_report_stop",debug_report_id:e,debug_report_version:1,call_id:t})}}class gi extends un{constructor(e,t,n){super(),this.buildRequest({type:"debug_report_data",debug_report_id:e,debug_report_version:1,call_id:t,debug_report_data:n})}}const mi=(e,t)=>{const{contentType:n,canvasType:i,callID:r,canvasInfo:o=null,currentLayerIdx:a=-1}=t;o&&"mcu-personal-canvas"!==i&&delete o.memberID;const s={type:Wt.conferenceUpdate,call:e.calls[r],canvasInfo:vi(o),currentLayerIdx:a};switch(n){case"layer-info":{const t=Object.assign({action:Yt.LayerInfo},s);sn(Xe.Notification,t,e.uuid);break}case"layout-info":{const t=Object.assign({action:Yt.LayoutInfo},s);sn(Xe.Notification,t,e.uuid);break}}},vi=e=>{const t=JSON.stringify(e).replace(/memberID/g,"participantId").replace(/ID"/g,'Id"').replace(/POS"/g,'Pos"');return wt(t)},bi=["new-call-start","new-peer","get-user-media","peer-creation-end","start-negotiation","create-offer","create-answer","set-local-description","ice-gathering-started","first-candidate","first-non-host-candidate","send-sdp","ice-gathering-completed","ringing","telnyx-rtc-media","first-remote-media-track","set-remote-description","telnyx-rtc-answer","ice-connected","dtls-connected","call-active","answer-called"],yi={"new-call-start":"Call Start","new-peer":"Peer object created","get-user-media":"Media devices acquired","peer-creation-end":"Peer setup complete","start-negotiation":"SDP negotiation started","create-offer":"SDP offer generated","create-answer":"SDP answer generated","set-local-description":"Local description applied","ice-gathering-started":"ICE candidate gathering started","first-candidate":"First ICE candidate found","first-non-host-candidate":"First server-reflexive/relay candidate found","send-sdp":"SDP sent to server","ice-gathering-completed":"All ICE candidates gathered",ringing:"Remote side ringing","telnyx-rtc-media":"Early media received from server","first-remote-media-track":"First remote audio/video track received","set-remote-description":"Remote description applied","telnyx-rtc-answer":"Call answered by remote side","ice-connected":"ICE connection established","dtls-connected":"Secure media channel established (DTLS)","call-active":"Call is active","answer-called":"Answer delay (invite → call.answer)"};function wi(e,t){return`telnyx:call:${e}:${t}`}function ki(e){try{const t=performance.getEntriesByName(e,"mark");return t.length>0?t[0].startTime:void 0}catch(e){return}}function _i(e){for(const t of bi)try{performance.clearMarks(wi(e,t))}catch(e){ft.warn("Clearing performance marks is failed")}}class Si{constructor(e,t,n,i,r){this.type=e,this.options=t,this.onSdpReadyTwice=null,this.statsReporter=null,this.isIceRestarting=!1,this.iceDone=!1,this._negotiating=!1,this._prevConnectionState=null,this._restartedIceOnConnectionStateFailed=!1,this._sleepWakeupIntervalId=null,this._iceGatheringSafetyTimeout=null,this._gatheredCandidatesCount=0,this._firstMediaTrackMarked=!1,this._timingsCollected=!1,this._iceRestartTimeoutId=null,this.handleConnectionStateChange=()=>H(this,void 0,void 0,function*(){var e,t;if(!this.instance)return void ft.debug("Connection state change ignored: instance is null");const{connectionState:n}=this.instance;if(ft.info(`[${(new Date).toISOString()}] Connection State changed: ${this._prevConnectionState} -> ${n}`),"failed"!==n&&"disconnected"!==n||(this.isDebugEnabled&&this.statsReporter&&function(e,t){return H(this,void 0,void 0,function*(){const n={connectionState:e.connectionState,previousConnectionState:t,iceConnectionState:e.iceConnectionState,iceGatheringState:e.iceGatheringState,signalingState:e.signalingState},i=e.getTransceivers();if(i.length>0){const e=i[0].sender,t=null==e?void 0:e.transport;t&&(n.dtlsState=t.state)}e.sctp&&(n.sctpState=e.sctp.state);try{const t=yield e.getStats();t.forEach(e=>{"candidate-pair"===e.type&&"succeeded"===e.state&&(n.candidatePairState=e.state,t.forEach(t=>{"local-candidate"===t.type&&t.id===e.localCandidateId&&(n.localCandidateType=t.candidateType,n.selectedCandidatePair=n.selectedCandidatePair||{local:{},remote:{}},n.selectedCandidatePair.local={address:t.address,port:t.port,protocol:t.protocol,candidateType:t.candidateType}),"remote-candidate"===t.type&&t.id===e.remoteCandidateId&&(n.remoteCandidateType=t.candidateType,n.selectedCandidatePair=n.selectedCandidatePair||{local:{},remote:{}},n.selectedCandidatePair.remote={address:t.address,port:t.port,protocol:t.protocol,candidateType:t.candidateType})})),"transport"===e.type&&(n.dtlsCipher=e.dtlsCipher,n.srtpCipher=e.srtpCipher,n.tlsVersion=e.tlsVersion,e.dtlsState&&(n.dtlsState=e.dtlsState))})}catch(e){ft.error("Error gathering connection state details:",e)}return n})}(this.instance,this._prevConnectionState).then(e=>{this.statsReporter.reportConnectionStateChange(e)}),null===(t=(e=this._session).reportPeerFailure)||void 0===t||t.call(e,this.options.id,"connection_failed")),"disconnected"===n){const e=nt(Oe);sn(Xe.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}if("failed"===n){const e=nt(Le);sn(Xe.PeerConnectionFailureError,{warning:e,error:new Error(`Peer Connection failed. previous state: ${this._prevConnectionState}, current state: ${n}`),sessionId:this._session.sessionid},this.options.id)}this._prevConnectionState=n,"connected"===n&&(performance.mark(wi(this.options.id,"dtls-connected")),this.tryCollectTimings(),this._restartedIceOnConnectionStateFailed=!1),this._isTrickleIce()&&("connecting"===n&&performance.mark(wi(this.options.id,"peer-connection-connecting")),"connected"===n&&(this._clearIceGatheringSafetyTimeout(),performance.mark(wi(this.options.id,"peer-connection-connected"))))}),this._handleIceConnectionStateChange=()=>{var e,t;if(!this.instance)return void ft.debug("ICE connection state change ignored: instance is null");const n=this.instance.iceConnectionState;ft.debug(`[${(new Date).toISOString()}] ICE Connection State`,n),"connected"===n&&performance.mark(wi(this.options.id,"ice-connected")),"failed"===n&&(null===(t=(e=this._session).reportPeerFailure)||void 0===t||t.call(e,this.options.id,"ice_failed"))},this._handleIceGatheringStateChange=()=>{const e=this.instance.iceGatheringState;ft.debug(`[${(new Date).toISOString()}] ICE Gathering State`,e),"gathering"===e?(this._gatheredCandidatesCount=0,this._startIceGatheringSafetyTimeout()):"complete"===e&&this._clearIceGatheringSafetyTimeout()},this._setCodecs=(e,t)=>{if(e.setCodecPreferences)return e.setCodecPreferences(t)},ft.debug("New Peer with type:",this.type,"Options:",this.options),this._constraints={offerToReceiveAudio:!0,offerToReceiveVideo:!!t.video},this._sdpReady=this._sdpReady.bind(this),this.handleSignalingStateChangeEvent=this.handleSignalingStateChangeEvent.bind(this),this.handleNegotiationNeededEvent=this.handleNegotiationNeededEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.createPeerConnection=this.createPeerConnection.bind(this),this._session=n,this._trickleIceSdpFn=i,this._registerPeerEvents=r}finishIceRestart(){this.isIceRestarting&&(this.isIceRestarting=!1,this._iceRestartTimeoutId&&(clearTimeout(this._iceRestartTimeoutId),this._iceRestartTimeoutId=null))}restartIce(){return this.instance?this.isIceRestarting?(ft.debug("ICE restart: already in progress, skipping"),{started:!1,reason:"already in progress"}):this._session.connected?(this.isIceRestarting=!0,this._restartedIceOnConnectionStateFailed=!0,this.instance.restartIce(),this.iceDone=!1,this._iceRestartTimeoutId=setTimeout(()=>{this.isIceRestarting&&(ft.warn("ICE restart: Modify exchange timed out, clearing isIceRestarting flag"),this.isIceRestarting=!1),this._iceRestartTimeoutId=null},Si.ICE_RESTART_TIMEOUT_MS),ft.info("ICE restart: initiated by signaling health monitor"),{started:!0}):(ft.debug("ICE restart: session not connected, skipping"),{started:!1,reason:"session not connected"}):(ft.warn("ICE restart: no RTCPeerConnection instance"),{started:!1,reason:"no RTCPeerConnection instance"})}get isOffer(){return this.type===zt.Offer}get isAnswer(){return this.type===zt.Answer}get isDebugEnabled(){return this.options.debug||this._session.options.debug}get debugOutput(){return this.options.debugOutput||this._session.options.debugOutput}get restartedIceOnConnectionStateFailed(){return this._restartedIceOnConnectionStateFailed}isConnectionHealthy(){return"connected"===this.instance.connectionState&&"connected"===this.instance.iceConnectionState&&"closed"!==this.instance.signalingState}startNegotiation(){performance.mark(wi(this.options.id,"start-negotiation")),this._negotiating=!0,this._isOffer()||this.isIceRestarting?this._createOffer().catch(e=>this._emitNegotiationError(e)):this._createAnswer().catch(e=>this._emitNegotiationError(e))}startTrickleIceNegotiation(){return H(this,void 0,void 0,function*(){performance.mark(wi(this.options.id,"start-negotiation")),this._negotiating=!0,this._isOffer()||this.isIceRestarting?yield this._createOffer().then(this._trickleIceSdpFn.bind(this)):yield this._createAnswer().then(this._trickleIceSdpFn.bind(this))})}_emitNegotiationError(e){e instanceof it&&sn(Xe.Error,{error:e,sessionId:this._session.sessionid},this.options.id)}_logTransceivers(){this.instance?(ft.info("Number of transceivers:",this.instance.getTransceivers().length),this.instance.getTransceivers().forEach((e,t)=>{ft.info(`>> Transceiver [${t}]:`,e.mid,e.direction,e.stopped),ft.info(`>> Sender Params [${t}]:`,JSON.stringify(e.sender.getParameters(),null,2))})):ft.warn("Cannot log transceivers: peer connection is null")}handleSignalingStateChangeEvent(){switch(ft.info("signalingState:",this.instance.signalingState),this.instance.signalingState){case"stable":this._negotiating=!1;break;case"closed":sn(Xe.PeerConnectionSignalingStateClosed,{sessionId:this._session.sessionid},this.options.id),this.instance&&(ft.debug(`[${this.options.id}] Closing peer due to signalingState closed`),this.close());break;default:this._negotiating=!0}}handleNegotiationNeededEvent(){ft.info("Negotiation needed event"),"stable"!==this.instance.signalingState||this._negotiating?ft.debug("Skipping negotiation, state:",this.instance.signalingState,"negotiating:",this._negotiating):this._isTrickleIce()?this.startTrickleIceNegotiation().catch(e=>this._emitNegotiationError(e)):this.startNegotiation()}handleTrackEvent(e){this._firstMediaTrackMarked||(performance.mark(wi(this.options.id,"first-remote-media-track")),this._firstMediaTrackMarked=!0);const{streams:[t]}=e,{remoteElement:n,screenShare:i}=this.options;this.options.remoteStream=t,!1===i&&Fn(n,this.options.remoteStream,{callId:this.options.id,sessionId:this._session.sessionid,eventTarget:this._session.uuid})}tryCollectTimings(){if(this._timingsCollected)return;if(!(performance.getEntriesByName(wi(this.options.id,"call-active"),"mark").length>0)||"connected"!==this.instance.connectionState)return;this._timingsCollected=!0;const e=this._isTrickleIce()?"trickle":"non-trickle",t=this.isOffer?"outbound":"inbound",n=function(e,t,n){const i=ki(wi(e,"new-call-start"));if(void 0===i)return{mode:t,direction:n,steps:[]};const r=[];for(const t of bi){if("new-call-start"===t)continue;const n=ki(wi(e,t));void 0!==n&&r.push({label:yi[t]||t,fromStart:n-i})}r.sort((e,t)=>e.fromStart-t.fromStart);const o=[];let a=0;for(const e of r)o.push({label:e.label,fromStart:e.fromStart,delta:e.fromStart-a}),a=e.fromStart;return{mode:t,direction:n,steps:o}}(this.options.id,e,t);!function(e){const{mode:t,direction:n,steps:i}=e,r=`[CallTimings][${n}][${t}]`;if(0===i.length)return void ft.info(`${r} No timing data collected`);const o=Math.max(...i.map(e=>e.label.length),4)+2,a=(e,t)=>{for(;e.length<t;)e+=" ";return e},s=(e,t)=>{for(;e.length<t;)e=" "+e;return e},l=a("Step",o)+s("Delta",14)+s("From Start",14);let c="";for(let e=0;e<l.length;e++)c+="-";ft.info(`${r} Call establishment timing breakdown:`),ft.info(`${r} ${l}`),ft.info(`${r} ${c}`),ft.info(`${r} ${a("Call Start",o)}${s("-",14)}${s("0.00ms",14)}`);for(const e of i){const t=e.delta.toFixed(2)+"ms",n=e.fromStart.toFixed(2)+"ms";ft.info(`${r} ${a(e.label,o)}${s(t,14)}${s(n,14)}`)}ft.info(`${r} ${c}`)}(n),_i(this.options.id)}createPeerConnection(){return H(this,void 0,void 0,function*(){var e;if(this.instance=(e=this._config(),new window.RTCPeerConnection(e)),this.instance.onsignalingstatechange=this.handleSignalingStateChangeEvent,this.instance.onnegotiationneeded=this.handleNegotiationNeededEvent,this.instance.ontrack=this.handleTrackEvent,this.instance.addEventListener("connectionstatechange",this.handleConnectionStateChange),this.instance.addEventListener("iceconnectionstatechange",this._handleIceConnectionStateChange),this.instance.addEventListener("icegatheringstatechange",this._handleIceGatheringStateChange),this.instance.addEventListener("addstream",e=>{this.options.remoteStream=e.stream}),this._registerPeerEvents(this.instance),this._prevConnectionState=this.instance.connectionState,this.isAnswer&&(yield this._setRemoteDescription({sdp:this.options.remoteSdp,type:zt.Offer}),performance.mark(wi(this.options.id,"set-remote-description")),!this.instance))throw ot(le);const t=Boolean(this.options.receiveOnlyAudio)&&!this.options.audio;let n=null;if(this.options.localStream=yield this._retrieveLocalStream().catch(e=>H(this,void 0,void 0,function*(){const t=this._session.options.mediaPermissionsRecovery;if((null==t?void 0:t.enabled)&&this._isAnswer()){let i=null,r=null;return yield new Promise((n,i)=>{r=setTimeout(()=>i(new Error("Media recovery flow timed out!")),t.timeout),sn(Xe.Error,{error:ot(rt(e),e,void 0,!1),callId:this.options.id,sessionId:this._session.sessionid,recoverable:!0,retryDeadline:Date.now()+t.timeout,resume:()=>{n()},reject:()=>{i(new Error("Call was rejected during media recovery flow!"))}},this._session.uuid)}).then(()=>H(this,void 0,void 0,function*(){var e;r&&(clearTimeout(r),r=null),i=yield this._retrieveLocalStream(),null===(e=t.onSuccess)||void 0===e||e.call(t)})).catch(e=>{var i;r&&(clearTimeout(r),r=null),n=e,null===(i=t.onError)||void 0===i||i.call(t,e)}),i}return n=e,null})),!this.instance)throw ot(le);if(!this.options.localStream&&!t)throw ot(n?rt(n):ie,null!=n?n:void 0);performance.mark(wi(this.options.id,"get-user-media")),this.options.mutedMicOnStart&&Mn(this.options.localStream)&&(ft.info("Muting local audio tracks on start"),Xn(this.options.localStream)),this.options.applyDesiredAudioMuteState&&this.options.applyDesiredAudioMuteState(),performance.mark(wi(this.options.id,"peer-creation-end"))})}incrementGatheredCandidates(){this._gatheredCandidatesCount++}_startIceGatheringSafetyTimeout(){this._clearIceGatheringSafetyTimeout(),this._iceGatheringSafetyTimeout=setTimeout(()=>{if(this.instance)if(0===this._gatheredCandidatesCount){const e=nt(Ne);sn(Xe.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}else if("complete"!==this.instance.iceGatheringState){const e=nt(Ae);sn(Xe.Warning,{warning:e,callId:this.options.id,sessionId:this._session.sessionid},this.options.id)}},Si.ICE_GATHERING_SAFETY_TIMEOUT_MS)}_clearIceGatheringSafetyTimeout(){null!==this._iceGatheringSafetyTimeout&&(clearTimeout(this._iceGatheringSafetyTimeout),this._iceGatheringSafetyTimeout=null)}init(){var e;return H(this,void 0,void 0,function*(){if(yield this.createPeerConnection(),!this.instance)throw ot(le);this.isDebugEnabled&&(this.statsReporter=function(e,t){const n=Y();let i=!1;const r=new ui({getStatsInterval:1e3,rawStats:!1,statsObject:!0,filteredStats:!1,remote:!0,debug:!1,logLevel:"warn"}),o=i=>H(this,void 0,void 0,function*(){"stats"===i.event&&sn(Xe.StatsFrame,function({data:e}){var t,n,i,r,o,a,s,l;const{audio:c,remote:d}=e,{audio:u}=d,h=null!==(n=null===(t=u.inbound[0])||void 0===t?void 0:t.jitter)&&void 0!==n?n:1/0,p=null!==(r=null===(i=u.inbound[0])||void 0===i?void 0:i.roundTripTime)&&void 0!==r?r:1/0,f=null!==(a=null===(o=c.inbound[0])||void 0===o?void 0:o.packetsReceived)&&void 0!==a?a:-1,g=function(e){const{packetsLost:t,packetsReceived:n,jitter:i,rtt:r}=e,o=function(e){const{jitter:t,rtt:n}=e,i=t+n/2;return.024*i+.11*(i-177.3)*(i>177.3?1:0)}({rtt:r,jitter:i}),a=function(e){const{packetsLost:t,packetsReceived:n}=e,i=t/(n+t)*100;return 20*Math.log(1+i)}({packetsLost:t,packetsReceived:n}),s=93.2-o-a+0,l=1+.035*s+7e-6*s*(s-60)*(100-s);return Math.min(Math.max(l,1),5)}({jitter:1e3*h,rtt:1e3*p,packetsLost:null!==(l=null===(s=c.inbound[0])||void 0===s?void 0:s.packetsLost)&&void 0!==l?l:-1,packetsReceived:f});return{jitter:h,rtt:p,mos:g,quality:hi(g),inboundAudio:c.inbound[0],outboundAudio:c.outbound[0],remoteInboundAudio:u.inbound[0],remoteOutboundAudio:u.outbound[0]}}(i),e.uuid),yield e.execute(new gi(n,t,i))});return{get isRunning(){return i},start:(a,s,l)=>H(this,void 0,void 0,function*(){if(i)ft.debug(`[${t}] Stats reporter already running, skipping start`);else{yield e.execute(new pi(n,t)),r.on("timeline",o);try{yield r.addConnection({pc:a,peerId:s,connectionId:l}),i=!0}catch(e){ft.error(`[${t}] Failed to start stats reporter:`,e),r.removeAllPeers(),r.destroy()}}}),stop:o=>H(this,void 0,void 0,function*(){const a=r.getTimeline();sn(Xe.StatsReport,a,e.uuid),"file"===o&&function(e,t){const n=new Blob([JSON.stringify(e)],{type:"application/json"}),i=URL.createObjectURL(n),r=document.createElement("a");r.href=i,r.download=`${t}.json`,r.click(),URL.revokeObjectURL(i)}(a,`webrtc-stats-${n}-${Date.now()}`),yield e.execute(new fi(n,t)),r.removeAllPeers(),r.destroy(),i=!1}),reportConnectionStateChange:e=>{const t={event:"connectionstatechange-detailed",tag:"connection",timestamp:(new Date).toISOString(),data:e};o(t)},reportIceCandidateError:e=>{const t={event:"icecandidateerror-detailed",tag:"connection",timestamp:(new Date).toISOString(),data:e};o(t)}}}(this._session,this.options.id),yield null===(e=this.statsReporter)||void 0===e?void 0:e.start(this.instance,this._session.sessionid,this._session.sessionid));const{localElement:t,localStream:n=null,screenShare:i=!1}=this.options;if(Mn(n)){const e=n.getAudioTracks();let r=[...e];if(ft.info("Local audio tracks: ",e),"object"==typeof this.options.audio&&e.forEach(e=>{ft.info("Local audio tracks constraints: ",e.getConstraints())}),this.options.video){const t=n.getVideoTracks();r=[...e,...t],ft.info("Local video tracks: ",t),"object"==typeof this.options.video&&t.forEach(e=>{ft.info("Local video tracks constraints: ",e.getConstraints())})}const{audioCodecs:o,videoCodecs:a}=ii(this.options.preferred_codecs);if(this.isOffer&&"function"==typeof this.instance.addTransceiver){const e={direction:"sendrecv",streams:[n]};r.forEach(t=>{"audio"===t.kind&&(this.options.userVariables.microphoneLabel=t.label),"video"===t.kind&&(this.options.userVariables.cameraLabel=t.label);const n=this.instance.addTransceiver(t,e);"audio"===t.kind&&o.length>0&&this._setCodecs(n,o),"video"===t.kind&&a.length>0&&this._setCodecs(n,a)})}else"function"==typeof this.instance.addTrack?(r.forEach(e=>{"audio"===e.kind&&(this.options.userVariables.microphoneLabel=e.label),"video"===e.kind&&(this.options.userVariables.cameraLabel=e.label),this.instance.addTrack(e,n)}),this.instance.getTransceivers().forEach(e=>{"audio"===e.receiver.track.kind&&o.length>0&&this._setCodecs(e,o),"video"===e.receiver.track.kind&&a.length>0&&this._setCodecs(e,a)})):this.instance.addStream(n);!1===i&&Fn(t,n)}else if(this.options.receiveOnlyAudio&&"function"==typeof this.instance.addTransceiver){const e=this.instance.addTransceiver("audio",{direction:"recvonly"});ft.info("Added recvonly audio transceiver for receive-only mode",e);const{audioCodecs:t}=ii(this.options.preferred_codecs);t.length>0&&this._setCodecs(e,t)}this.isOffer?(this.options.negotiateAudio&&this._checkMediaToNegotiate("audio"),this.options.negotiateVideo&&this._checkMediaToNegotiate("video")):this._isTrickleIce()||this.startNegotiation(),this._isTrickleIce()&&this.startTrickleIceNegotiation().catch(e=>this._emitNegotiationError(e)),this._logTransceivers()})}_getSenderByKind(e){return this.instance.getSenders().find(({track:t})=>t&&t.kind===e)}_checkMediaToNegotiate(e){if(!this._getSenderByKind(e)){const t=this.instance.addTransceiver(e);ft.info("Add transceiver",e,t)}}_createOffer(){return H(this,void 0,void 0,function*(){if(this._isOffer()||this.isIceRestarting){this._constraints.offerToReceiveAudio=!1!==this.options.audio||Boolean(this.options.receiveOnlyAudio),this._constraints.offerToReceiveVideo=Boolean(this.options.video),ft.info("_createOffer - this._constraints",this._constraints);try{const e=yield this.instance.createOffer(this._constraints);return performance.mark(wi(this.options.id,"create-offer")),yield this._setLocalDescription(e),performance.mark(wi(this.options.id,"set-local-description")),performance.mark(wi(this.options.id,"ice-gathering-started")),this._isTrickleIce()||this._sdpReady(),e}catch(e){if(ft.error("Peer _createOffer error:",e),e instanceof it)throw e;throw ot(Q,e)}}})}_setRemoteDescription(e){return H(this,void 0,void 0,function*(){ft.debug("Setting remote description",e);try{yield this.instance.setRemoteDescription(e)}catch(e){throw ft.error("Peer _setRemoteDescription error:",e),ot(Z,e)}})}_createAnswer(){return H(this,void 0,void 0,function*(){if(this._isAnswer()){if("stable"!==this.instance.signalingState&&"have-remote-offer"!==this.instance.signalingState)return ft.debug("Skipping negotiation, state:",this.instance.signalingState),ft.debug(" - But the signaling state isn't stable, so triggering rollback"),void(yield Promise.all([this.instance.setLocalDescription({type:"rollback"}),this.instance.setRemoteDescription({sdp:this.options.remoteSdp,type:zt.Offer})]));this._logTransceivers();try{const e=yield this.instance.createAnswer();return performance.mark(wi(this.options.id,"create-answer")),yield this._setLocalDescription(e),performance.mark(wi(this.options.id,"set-local-description")),performance.mark(wi(this.options.id,"ice-gathering-started")),e}catch(e){if(ft.error("Peer _createAnswer error:",e),e instanceof it)throw e;throw ot(J,e)}}})}_setLocalDescription(e){return H(this,void 0,void 0,function*(){try{yield this.instance.setLocalDescription(e)}catch(e){throw ft.error("Peer _setLocalDescription error:",e),ot(X,e)}})}_sdpReady(){kt(this.onSdpReadyTwice)&&this.onSdpReadyTwice(this.instance.localDescription)}_retrieveLocalStream(){return H(this,void 0,void 0,function*(){if(Mn(this.options.localStream))return this.options.localStream;const e=yield(t=this.options,H(void 0,void 0,void 0,function*(){let{audio:e=!0,micId:n,video:i=!1,camId:r}=t;const{micLabel:o="",camLabel:a=""}=t;return n&&(n=yield Vn(n,o,Qt.AudioIn).catch(()=>null),n&&("boolean"==typeof e&&(e={}),e.deviceId={exact:n})),r&&(r=yield Vn(r,a,Qt.Video).catch(()=>null),r&&("boolean"==typeof i&&(i={}),i.deviceId={exact:r})),{audio:e,video:i}}));var t;return Bn(e)})}_isOffer(){return this.type===zt.Offer}_isAnswer(){return this.type===zt.Answer}_isTrickleIce(){return!0===this.options.trickleIce}_config(){const{prefetchIceCandidates:e,forceRelayCandidate:t,iceServers:n}=this.options,i={bundlePolicy:"balanced",iceCandidatePoolSize:e?10:0,iceServers:n,iceTransportPolicy:t?"relay":"all"};return ft.info("RTC config",i),i}restartStatsReporter(){return H(this,void 0,void 0,function*(){this.isDebugEnabled&&this.statsReporter&&(this.instance?this.statsReporter.isRunning?ft.debug(`[${this.options.id}] Stats reporter already running, skipping restart`):(ft.debug(`[${this.options.id}] Restarting stats reporter after reconnect`),yield this.statsReporter.start(this.instance,this._session.sessionid,this._session.sessionid)):ft.debug(`[${this.options.id}] Cannot restart stats reporter - no peer connection instance`))})}close(){return H(this,void 0,void 0,function*(){_i(this.options.id),this.finishIceRestart(),this._clearIceGatheringSafetyTimeout(),null!==this._sleepWakeupIntervalId&&(clearInterval(this._sleepWakeupIntervalId),this._sleepWakeupIntervalId=null),this.isDebugEnabled&&this.statsReporter&&(yield this.statsReporter.stop(this.debugOutput)),this.instance&&(this.instance.close(),this.instance=null)})}}Si.ICE_GATHERING_SAFETY_TIMEOUT_MS=15e3,Si.ICE_RESTART_TIMEOUT_MS=15e3;const xi=yn;class Ci{constructor(e,t){this.session=e,this._callReportCollector=null,this._callRecorder=null,this._mediaDeviceCollector=null,this.id="",this.recoveredCallId="",this.state=qt[qt.New],this.prevState="",this.channels=[],this.role=Kt.Participant,this.extension=null,this._state=qt.New,this._prevState=qt.New,this.gotAnswer=!1,this.gotEarly=!1,this._lastSerno=0,this._targetNodeId=null,this._iceTimeout=null,this._statsBindings=[],this._statsIntervalId=null,this._pendingIceCandidates=[],this._isRemoteDescriptionSet=!1,this._signalingStateClosed=!1,this._creatingPeer=!1,this._desiredAudioMuted=!1,this._firstCandidateSent=!1,this._firstNonHostCandidateSent=!1,this._isRecovering=!1,this._wasHeldBeforeRecovery=!1,this._checkConferenceSerno=e=>{const t=e<0||!this._lastSerno||this._lastSerno&&e===this._lastSerno+1;return t&&e>=0&&(this._lastSerno=e),t},this._doStats=()=>{this.peer&&this.peer.instance&&0!==this._statsBindings.length&&this.peer.instance.getStats().then(e=>{e.forEach(e=>{this._statsBindings.forEach(t=>{if(t.callback){if(t.constraints)for(const n in t.constraints)if(t.constraints.hasOwnProperty(n)&&t.constraints[n]!==e[n])return;t.callback(e)}})})})};const{iceServers:n,speaker:i,micId:r,micLabel:o,camId:a,camLabel:s,localElement:l,remoteElement:c,options:d,mediaConstraints:{audio:u,video:h},ringtoneFile:p,ringbackFile:f}=e;this.options=Object.assign({},Gt,{audio:u,video:h,iceServers:(null==t?void 0:t.iceServers)&&Array.isArray(t.iceServers)?t.iceServers:n,localElement:l,remoteElement:c,micId:r,micLabel:o,camId:a,camLabel:s,speakerId:i,ringtoneFile:p,ringbackFile:f,debug:d.debug,debugOutput:d.debugOutput,trickleIce:d.trickleIce,prefetchIceCandidates:d.prefetchIceCandidates,forceRelayCandidate:d.forceRelayCandidate,keepConnectionAliveOnSocketClose:d.keepConnectionAliveOnSocketClose,mutedMicOnStart:d.mutedMicOnStart},t),this._onMediaError=this._onMediaError.bind(this),this._onPeerConnectionFailureError=this._onPeerConnectionFailureError.bind(this),this._onPeerConnectionSignalingStateClosed=this._onPeerConnectionSignalingStateClosed.bind(this),this._onTrickleIceSdp=this._onTrickleIceSdp.bind(this),this._registerPeerEvents=this._registerPeerEvents.bind(this),this._desiredAudioMuted=Boolean(this.options.mutedMicOnStart),this.options.applyDesiredAudioMuteState=this._applyDesiredAudioMuteState.bind(this),this._init(),this.options&&(this._ringtone=ei(this.options.ringtoneFile,"_ringtone"),this._ringback=ei(this.options.ringbackFile,"_ringback"))}get creatingPeer(){return this._creatingPeer}get signalingStateClosed(){return this._signalingStateClosed}_captureHangupCallerStack(){const e=new Error("Call.hangup caller").stack;return e?e.split("\n").map(e=>e.trim()).filter(Boolean).slice(1,11):[]}get nodeId(){return this._targetNodeId}set nodeId(e){this._targetNodeId=e}get isVideoCall(){return!!this.options.video}get telnyxIDs(){return{telnyxCallControlId:this.options.telnyxCallControlId,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId}}get localStream(){return this.options.localStream}get remoteStream(){return this.options.remoteStream}get memberChannel(){return`conference-member.${this.id}`}get isAudioMuted(){return this._desiredAudioMuted}_getLocalAudioTrackId(){var e,t;return null===(t=null===(e=this.options.localStream)||void 0===e?void 0:e.getAudioTracks()[0])||void 0===t?void 0:t.id}_hasActiveUnmutedLocalAudioTrack(){const e=this.options.localStream;return!!(null==e?void 0:e.getAudioTracks)&&e.getAudioTracks().some(e=>!0===e.enabled&&!0!==e.muted&&"live"===e.readyState)}shouldForceRelayCandidateForRecovery(){var e,t;return!this.options.forceRelayCandidate&&!!this.recoveredCallId&&null!==(t=null===(e=this._callReportCollector)||void 0===e?void 0:e.shouldForceRelayCandidateForRecovery())&&void 0!==t&&t}invite(){return H(this,void 0,void 0,function*(){this._creatingPeer=!0,this.direction=Bt.Outbound,this.options.trickleIce&&this._resetTrickleIceCandidateState(),performance.mark(wi(this.id,"new-peer")),this.peer=new Si(zt.Offer,this.options,this.session,this._onTrickleIceSdp,this._registerPeerEvents);try{yield this.peer.init()}catch(e){ft.error("Peer init failed, aborting call",e),this._creatingPeer=!1;const t=e instanceof it?e:ot(ye,e instanceof Error?e:void 0);return sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid,recoverable:!1},this.session.uuid),void this.hangup({initiator:"sdk:peer-init-failed"},!1)}this._creatingPeer=!1})}answer(e={}){var t,n,i,r,o,a,s,l;return H(this,void 0,void 0,function*(){const c=(null!==(i=null===(n=(t=this.session).getActiveCalls)||void 0===n?void 0:n.call(t))&&void 0!==i?i:[]).filter(e=>e.id!==this.id);if(c.length>0&&ft.debug(`[${this.id}] answer(): answering inbound call while ${c.length} other active call(s) exist in session ${this.session.sessionid}`),this._creatingPeer||(null===(r=this.peer)||void 0===r?void 0:r.instance)&&"closed"!==this.peer.instance.signalingState){const e=nt(Pe);return sn(Xe.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),void ft.warn(`[${this.id}] answer() ignored: peer connection already exists or is being created (signalingState: ${null!==(s=null===(a=null===(o=this.peer)||void 0===o?void 0:o.instance)||void 0===a?void 0:a.signalingState)&&void 0!==s?s:"creating"})`)}if(this._registerInboundAnswerAttempt()){performance.mark(wi(this.id,"answer-called")),this._creatingPeer=!0,this.stopRingtone(),this.direction=Bt.Inbound,(null===(l=null==e?void 0:e.customHeaders)||void 0===l?void 0:l.length)>0&&(this.options=Object.assign(Object.assign({},this.options),{customHeaders:e.customHeaders})),void 0===e.remoteElement&&void 0===e.localElement||(this.options=Object.assign(Object.assign(Object.assign({},this.options),void 0!==e.remoteElement&&{remoteElement:e.remoteElement}),void 0!==e.localElement&&{localElement:e.localElement})),this.options.trickleIce&&this._resetTrickleIceCandidateState(),performance.mark(wi(this.id,"new-peer")),this.peer=new Si(zt.Answer,this.options,this.session,this._onTrickleIceSdp,this._registerPeerEvents);try{yield this.peer.init()}catch(e){ft.error("Peer init failed, aborting call",e),this._creatingPeer=!1;const t=e instanceof it?e:ot(ye,e instanceof Error?e:void 0);return sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid,recoverable:!1},this.session.uuid),void(yield this.hangup({initiator:"sdk:peer-init-failed"},!0))}this._creatingPeer=!1}})}playRingtone(){ti(this._ringtone)}stopRingtone(){ni(this._ringtone)}playRingback(){ti(this._ringback)}stopRingback(){ni(this._ringback)}hangup(e,t){var n,i,r,o,a,s;return H(this,void 0,void 0,function*(){const l=e||{},c=!1!==t,d=this.state,u=this.prevState,h=this._captureHangupCallerStack(),p=l.initiator||"app:call.hangup",f=this._state<qt.Active?{cause:"USER_BUSY",causeCode:17}:{cause:"NORMAL_CLEARING",causeCode:16};if(this.cause=l.cause||f.cause,this.causeCode=l.causeCode||f.causeCode,this.sipCode=l.sipCode||null,this.sipReason=l.sipReason||null,this.sipCallId=l.sip_call_id||null,this.options.customHeaders=[...null!==(n=this.options.customHeaders)&&void 0!==n?n:[],...null!==(r=null===(i=null==l?void 0:l.dialogParams)||void 0===i?void 0:i.customHeaders)&&void 0!==r?r:[]],ft.debug(`[${this.id}] hangup() invoked`,{callId:this.id,execute:c,state:d,prevState:u,cause:this.cause,causeCode:this.causeCode,initiator:p,sipCode:this.sipCode,sipReason:this.sipReason,sipCallId:this.sipCallId,isRecovering:Boolean(l.isRecovering),hasDialogCustomHeaders:Boolean(null===(a=null===(o=l.dialogParams)||void 0===o?void 0:o.customHeaders)||void 0===a?void 0:a.length),callerStack:h}),l.isRecovering)return this._isRecovering=!0,this.setState(qt.Recovering),void this._finalize();if(this.setState(qt.Hangup),this.stopRingtone(),this.stopRingback(),c){const e=new Cn({sipCode:this.sipCode,sip_call_id:this.sipCallId,sessid:this.session.sessionid,dialogParams:this.options,cause:this.cause,causeCode:this.causeCode});let t;try{yield Promise.race([this._execute(e),new Promise(e=>{t=setTimeout(()=>{ft.warn(`[${this.id}] BYE execution timed out after 5000ms — proceeding to destroy.`),e()},5e3)})])}catch(e){ft.error("telnyx_rtc.bye failed!",e);const t=ot(ae,e);sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}finally{t&&clearTimeout(t)}}ft.debug(`[${this.id}] Closing peer from hangup`),null===(s=this.peer)||void 0===s||s.close(),this.setState(qt.Destroy)})}hold(){const e=new Tn({sessid:this.session.sessionid,action:Xt.Hold,dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}unhold(){const e=new Tn({sessid:this.session.sessionid,action:Xt.Unhold,dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}toggleHold(){const e=new Tn({sessid:this.session.sessionid,action:Xt.ToggleHold,dialogParams:this.options});return this._execute(e).then(this._handleChangeHoldStateSuccess.bind(this)).catch(this._handleChangeHoldStateError.bind(this))}dtmf(e){const t=new Rn({sessid:this.session.sessionid,dtmf:e,dialogParams:this.options});this._execute(t)}message(e,t){const n={from:this.session.options.login,to:e,body:t},i=new Rn({sessid:this.session.sessionid,msg:n,dialogParams:this.options});this._execute(i)}muteAudio(){ft.debug("muteAudio called",{callId:this.id,previousAudioState:this._desiredAudioMuted,audioTrackId:this._getLocalAudioTrackId()}),this._desiredAudioMuted=!0,Xn(this.options.localStream)}unmuteAudio(){ft.debug("unmuteAudio called",{callId:this.id,previousAudioState:this._desiredAudioMuted,audioTrackId:this._getLocalAudioTrackId()}),this._desiredAudioMuted=!1,Jn(this.options.localStream)}_applyDesiredAudioMuteState(){ft.debug("applyDesiredAudioMuteState called",{callId:this.id,previousAudioState:this._desiredAudioMuted,audioTrackId:this._getLocalAudioTrackId()}),this._desiredAudioMuted?Xn(this.options.localStream):Jn(this.options.localStream)}toggleAudioMute(){ft.debug("toggleAudioMute called",{callId:this.id,previousAudioState:this._desiredAudioMuted,audioTrackId:this._getLocalAudioTrackId()}),this._desiredAudioMuted=!this._desiredAudioMuted,this._applyDesiredAudioMuteState()}setAudioInDevice(e,t=this._desiredAudioMuted){var n,i,r;return H(this,void 0,void 0,function*(){const o=Boolean(t),{instance:a}=this.peer,s=a.getSenders().find(({track:{kind:e}})=>"audio"===e);if(!s)return ft.warn("Skipping audio input device change: no audio sender found",{callId:this.id,deviceId:e,audioMuted:this._desiredAudioMuted,audioTrackId:this._getLocalAudioTrackId()}),void sn(Xe.Warning,{warning:nt(Fe),callId:this.id,deviceId:e,sessionId:this.session.sessionid},(null===(n=this.options)||void 0===n?void 0:n.id)||this.id);let l;ft.debug("Starting audio input device change",{callId:this.id,state:this.state,deviceId:e,previousDesiredAudioMuted:this._desiredAudioMuted,newDesiredMuted:o,currentSenderTrack:Gn(s.track),localTracks:qn(this.options.localStream)});try{l=yield Pn({audio:{deviceId:{exact:e}}})}catch(e){const t=ot(rt(e),e);return void sn(Xe.MediaError,t,(null===(i=this.options)||void 0===i?void 0:i.id)||this.id)}const c=l.getAudioTracks()[0];c.enabled=!o;try{yield s.replaceTrack(c)}catch(e){const t=ot(rt(e),e);return sn(Xe.MediaError,t,(null===(r=this.options)||void 0===r?void 0:r.id)||this.id),void l.getTracks().forEach(e=>e.stop())}this._desiredAudioMuted=o,this.options.micId=e;const{localStream:d}=this.options;d.getAudioTracks().forEach(e=>e.stop()),d.getVideoTracks().forEach(e=>l.addTrack(e)),this.options.localStream=l,ft.debug("Finished audio input device change",{callId:this.id,state:this.state,deviceId:e,desiredAudioMuted:this._desiredAudioMuted,senderTrack:Gn(s.track),localTracks:qn(this.options.localStream)})})}muteVideo(){var e;e=this.options.localStream,Qn(e,"video",!1)}unmuteVideo(){var e;e=this.options.localStream,Qn(e,"video",!0)}toggleVideoMute(){var e;e=this.options.localStream,Qn(e,"video",null)}setVideoDevice(e){return H(this,void 0,void 0,function*(){const{instance:t}=this.peer,n=t.getSenders().find(({track:{kind:e}})=>"video"===e);if(n){const t=yield Pn({video:{deviceId:{exact:e}}}),i=t.getVideoTracks()[0];n.replaceTrack(i);const{localElement:r,localStream:o}=this.options;Fn(r,t),this.options.camId=e,o.getAudioTracks().forEach(e=>t.addTrack(e)),o.getVideoTracks().forEach(e=>e.stop()),this.options.localStream=t,this._applyDesiredAudioMuteState()}})}deaf(){Xn(this.options.remoteStream)}undeaf(){Jn(this.options.remoteStream)}toggleDeaf(){var e;e=this.options.remoteStream,Qn(e,"audio",null)}setBandwidthEncodingsMaxBps(e,t){return H(this,void 0,void 0,function*(){if(!this||!this.peer)return void ft.error("Could not set bandwidth (reason: no peer connection). Dynamic bandwidth can only be set when there is a call running - is there any call running?)");const{instance:n}=this.peer,i=n.getSenders();if(!i)return void ft.error("Could not set bandwidth (reason: no senders). Dynamic bandwidth can only be set when there is a call running - is there any call running?)");const r=i.find(({track:{kind:e}})=>e===t);if(r){const n=r.getParameters();n.encodings||(n.encodings=[{rid:"h"}]),ft.info("Parameters: ",n),ft.info("Setting max ","audio"===t?"audio":"video"," bandwidth to: ",e," [bps]"),n.encodings[0].maxBitrate=e,yield r.setParameters(n).then(()=>{ft.info("audio"===t?"New audio":"New video"," bandwidth settings in use: ",r.getParameters())}).catch(e=>ft.error(e))}else ft.error("Could not set bandwidth (reason: no "+t+" sender). Dynamic bandwidth can only be set when there is a call running - is there any call running?)")})}setAudioBandwidthEncodingsMaxBps(e){this.setBandwidthEncodingsMaxBps(e,"audio")}setVideoBandwidthEncodingsMaxBps(e){this.setBandwidthEncodingsMaxBps(e,"video")}_isTerminatingOrTerminated(){return[qt.Hangup,qt.Destroy,qt.Purge].includes(this._state)}getStats(e,t){if(!e)return;const n={callback:e,constraints:t};if(this._statsBindings.push(n),!this._statsIntervalId){const e=2e3;this._startStats(e)}}setState(e){var t,n,i,r,o,a,s;switch(this._prevState=this._state,this._state=e,this.state=qt[this._state].toLowerCase(),this.prevState=qt[this._prevState].toLowerCase(),ft.debug(`Call ${this.id} state change from ${this.prevState} to ${this.state}`),this._dispatchNotification({type:Wt.callUpdate,call:this}),e){case qt.Purge:ft.info(`[${this.id}] Entering Purge state.`);break;case qt.Active:if(performance.mark(wi(this.id,"call-active")),null===(t=this.peer)||void 0===t||t.tryCollectTimings(),this._isRecovering&&(this._isRecovering=!1,ft.debug(`[${this.id}] Recovery complete, call is active`)),this._wasHeldBeforeRecovery&&(ft.debug(`[${this.id}] Cleared held-before-recovery intent on transition to Active`),this._wasHeldBeforeRecovery=!1),null===(n=this._callReportCollector)||void 0===n||n.setHeld(!1),this.session.startSignalingHealthMonitor(),setTimeout(()=>{const{remoteElement:e,speakerId:t}=this.options;e&&t&&Un(e,t)},0),this._callReportCollector&&(null===(i=this.peer)||void 0===i?void 0:i.instance)&&this.session.callReportId&&this._callReportCollector.start(this.peer.instance),this._callRecorder){const e=null===(r=this.session.connection)||void 0===r?void 0:r.host;e&&this._callRecorder._setHost(e),this.session.callReportId&&this._callRecorder._setCallReportId(this.session.callReportId);const t=null===(o=this.options.localStream)||void 0===o?void 0:o.getAudioTracks()[0],n=null===(a=this.options.remoteStream)||void 0===a?void 0:a.getAudioTracks()[0];this._callRecorder.start(t,n)}this._mediaDeviceCollector=new li,this._mediaDeviceCollector.logDevicesAtStart();break;case qt.Held:null===(s=this._callReportCollector)||void 0===s||s.setHeld(!0);break;case qt.Destroy:this._finalize()}}handleMessage(e){const{method:t,params:n}=e;switch(t){case Ht.Answer:if(performance.mark(wi(this.id,"telnyx-rtc-answer")),this.gotAnswer=!0,n.telnyx_call_control_id&&(this.options.telnyxCallControlId=n.telnyx_call_control_id),n.telnyx_session_id&&(this.options.telnyxSessionId=n.telnyx_session_id),n.telnyx_leg_id&&(this.options.telnyxLegId=n.telnyx_leg_id),this._state>=qt.Active)return;this._state>=qt.Early&&this.setState(qt.Active),this.gotEarly||this._onRemoteSdp(n.sdp),this.stopRingback(),this.stopRingtone();break;case Ht.Media:if(performance.mark(wi(this.id,"telnyx-rtc-media")),this._state>=qt.Early)return;this.gotEarly=!0,this._onRemoteSdp(n.sdp);break;case Ht.Display:{const{display_name:e,display_number:i,display_direction:r}=n;this.extension=i;const o=r===Bt.Inbound?Bt.Outbound:Bt.Inbound,a={type:Wt[t],call:this,displayName:e,displayNumber:i,displayDirection:o};sn(Xe.Notification,a,this.id)||sn(Xe.Notification,a,this.session.uuid);break}case Ht.Candidate:this._addIceCandidate(n);break;case Ht.Info:case Ht.Event:{const e=Object.assign(Object.assign({},n),{type:Wt.generic,call:this});sn(Xe.Notification,e,this.id)||sn(Xe.Notification,e,this.session.uuid);break}case Ht.Ringing:performance.mark(wi(this.id,"ringing")),this.playRingback(),n.telnyx_call_control_id&&(this.options.telnyxCallControlId=n.telnyx_call_control_id),n.telnyx_session_id&&(this.options.telnyxSessionId=n.telnyx_session_id),n.telnyx_leg_id&&(this.options.telnyxLegId=n.telnyx_leg_id);break;case Ht.Bye:const e=n.client_state||n.clientState;e&&(this.options.clientState=e),this.stopRingback(),this.stopRingtone(),this.hangup(Object.assign(Object.assign({},n),{initiator:"remote:telnyx_rtc.bye"}),!1)}}handleConferenceUpdate(e,t){return H(this,void 0,void 0,function*(){if(!this._checkConferenceSerno(e.wireSerno)&&e.name!==t.laName)return ft.error("ConferenceUpdate invalid wireSerno or packet name:",e),"INVALID_PACKET";const{action:n,data:i,hashKey:r=String(this._lastSerno),arrIndex:o}=e;switch(n){case"bootObj":{this._lastSerno=0;const{chatChannel:e,infoChannel:n,modChannel:r,laName:o,conferenceMemberID:a,role:s}=t;this._dispatchConferenceUpdate({action:Yt.Join,conferenceName:o,participantId:Number(a),role:s}),e&&(yield this._subscribeConferenceChat(e)),n&&(yield this._subscribeConferenceInfo(n));const l=[];for(const e in i)l.push(Object.assign({callId:i[e][0],index:Number(e)},yt(i[e][1])));this._dispatchConferenceUpdate({action:Yt.Bootstrap,participants:l});break}case"add":this._dispatchConferenceUpdate(Object.assign({action:Yt.Add,callId:r,index:o},yt(i)));break;case"modify":this._dispatchConferenceUpdate(Object.assign({action:Yt.Modify,callId:r,index:o},yt(i)));break;case"del":this._dispatchConferenceUpdate(Object.assign({action:Yt.Delete,callId:r,index:o},yt(i)));break;case"clear":this._dispatchConferenceUpdate({action:Yt.Clear});break;default:this._dispatchConferenceUpdate({action:n,data:i,callId:r,index:o})}})}_addChannel(e){this.channels.includes(e)||this.channels.push(e);const t=this.session.relayProtocol;this.session._existsSubscription(t,e)&&(this.session.subscriptions[t][e]=Object.assign(Object.assign({},this.session.subscriptions[t][e]),{callId:this.id}))}_subscribeConferenceChat(e){return H(this,void 0,void 0,function*(){const t={nodeId:this.nodeId,channels:[e],handler:e=>{const{direction:t,from:n,fromDisplay:i,message:r,type:o}=e.data;this._dispatchConferenceUpdate({action:Yt.ChatMessage,direction:t,participantNumber:n,participantName:i,messageText:r,messageType:o,messageId:e.eventSerno})}},n=yield this.session.vertoSubscribe(t).catch(e=>{ft.error("ConfChat subscription error:",e)});Kn(n,e)&&(this._addChannel(e),Object.defineProperties(this,{sendChatMessage:{configurable:!0,value:(t,n)=>{this.session.vertoBroadcast({nodeId:this.nodeId,channel:e,data:{action:"send",message:t,type:n}})}}}))})}_subscribeConferenceInfo(e){return H(this,void 0,void 0,function*(){const t={nodeId:this.nodeId,channels:[e],handler:e=>{const{eventData:t}=e;"layout-info"===t.contentType?(t.callID=this.id,mi(this.session,t)):ft.error("Conference-Info unknown contentType",e)}},n=yield this.session.vertoSubscribe(t).catch(e=>{ft.error("ConfInfo subscription error:",e)});Kn(n,e)&&this._addChannel(e)})}_confControl(e,t={}){const n=Object.assign({application:"conf-control",callID:this.id,value:null},t);this.session.vertoBroadcast({nodeId:this.nodeId,channel:e,data:n})}_handleChangeHoldStateSuccess(e){return"active"===e.holdState?this.setState(qt.Active):this.setState(qt.Held),!0}_handleChangeHoldStateError(e){ft.error(`Failed to ${e.action} on call ${this.id}`);const t=ot(re,e);return sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),!1}_sendIceRestartModify(e,t={}){const n=new Tn(Object.assign(Object.assign({sessid:this.session.sessionid,action:Xt.UpdateMedia,callID:this.options.id,sdp:e},t.trickle?{trickle:!0}:{}),{dialogParams:this.options}));ft.info(`ICE restart: sending ${t.trickle?"trickle ":""}Modify with new offer SDP`),this._execute(n).then(e=>H(this,void 0,void 0,function*(){var t;(null==e?void 0:e.sdp)?(ft.info("ICE restart Modify response received"),null===(t=this.peer)||void 0===t||t.finishIceRestart(),yield this._onRemoteSdp(e.sdp)):this._onIceRestartFailed("ICE restart Modify response missing SDP")})).catch(e=>{this._onIceRestartFailed("ICE restart Modify failed",e)})}_onIceRestartFailed(e,t){var n,i,r;ft.error(e,t),null===(n=this.peer)||void 0===n||n.finishIceRestart();const o=ot(me,t);sn(Xe.Error,{error:o,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),null===(r=(i=this.session).reportIceRestartFailed)||void 0===r||r.call(i,this.id)}_onRemoteSdp(e){return H(this,void 0,void 0,function*(){const t=new RTCSessionDescription({sdp:e,type:zt.Answer});yield this.peer.instance.setRemoteDescription(t).then(()=>{performance.mark(wi(this.id,"set-remote-description")),this.options.trickleIce&&(this._isRemoteDescriptionSet=!0,this._flushPendingTrickleIceCandidates()),this.gotEarly&&this.setState(qt.Early),this.gotAnswer&&this._state!==qt.Held&&this.setState(qt.Active)}).catch(e=>H(this,void 0,void 0,function*(){ft.error("Call setRemoteDescription Error: ",e);const t=ot(Z,e);sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17,initiator:"sdk:set-remote-description-failure"},!0)}catch(e){ft.error("Error during hangup after setRemoteDescription failure:",e)}}))})}_requestAnotherLocalDescription(){if(kt(this.peer.onSdpReadyTwice)){const e=ot(ee,new Error("SDP without candidates for the second time!"));sn(Xe.Error,{error:e,sessionId:this.session.sessionid},this.session.uuid)}else Object.defineProperty(this.peer,"onSdpReadyTwice",{value:this._onIceSdp.bind(this)}),this.peer.iceDone=!1,this.peer.startNegotiation()}_onIceSdp(e){var t,n,i;if(this._iceTimeout&&clearTimeout(this._iceTimeout),this._iceTimeout=null,this.peer&&(this.peer.iceDone=!0),!e)return void ft.warn("localDescription is null — PeerConnection may have been closed during ICE gathering");const{sdp:r,type:o}=e;if(-1===r.indexOf("candidate"))return ft.info("No candidate - retry \n"),void this._requestAnotherLocalDescription();if(null===(n=null===(t=this.peer)||void 0===t?void 0:t.instance)||void 0===n||n.removeEventListener("icecandidate",this._onIce),!Ge.test(r)){const e=nt(De);ft.warn(`[${this.id}] Warning ${e.code}: ${e.message}`),sn(Xe.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}performance.mark(wi(this.id,"ice-gathering-end"));let a=null;const s={sessid:this.session.sessionid,sdp:r,dialogParams:this.options,"User-Agent":`Web-${xi}`};if(null===(i=this.peer)||void 0===i?void 0:i.isIceRestarting)this._sendIceRestartModify(r);else{switch(o){case zt.Offer:this.setState(qt.Requesting),a=new _n(s);break;case zt.Answer:this._isRecovering||this.setState(qt.Answering),a=!0===this.options.attach?new xn(s):new Sn(s);break;default:return ft.error(`${this.id} - Unknown local SDP type:`,e),void this.hangup({initiator:"sdk:unknown-local-sdp-type"},!1)}performance.mark(wi(this.id,"send-sdp")),this._execute(a).then(e=>{if(this._isTerminatingOrTerminated())return void ft.debug(`[${this.id}] Ignoring ${o} response because call is ${this.state}`);const{node_id:t=null}=e;this._targetNodeId=t,o===zt.Offer?this.setState(qt.Trying):this._wasHeldBeforeRecovery&&this._isRecovering?this.setState(qt.Held):this.setState(qt.Active)}).catch(e=>H(this,void 0,void 0,function*(){ft.error(`${this.id} - Sending ${o} error:`,e);const t=ot(ee,e);sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17,initiator:"sdk:sdp-send-failure"},!0)}catch(e){ft.error("Error during hangup after SDP send failure:",e)}}))}}_onTrickleIceSdp(e){var t;if(!e)return ft.error("No SDP data provided"),void this.hangup({initiator:"sdk:missing-local-sdp"},!1);const{sdp:n,type:i}=e;let r=null;const o={sessid:this.session.sessionid,sdp:n,dialogParams:this.options,trickle:!0,"User-Agent":`Web-${xi}`};if(null===(t=this.peer)||void 0===t?void 0:t.isIceRestarting)this._sendIceRestartModify(n,{trickle:!0});else{switch(i){case zt.Offer:this.setState(qt.Requesting),r=new _n(o);break;case zt.Answer:this._isRecovering||this.setState(qt.Answering),r=!0===this.options.attach?new xn(o):new Sn(o);break;default:return ft.error(`${this.id} - Unknown local SDP type:`,e),void this.hangup({initiator:"sdk:unknown-local-sdp-type"},!1)}performance.mark(wi(this.id,"send-sdp")),this._execute(r).then(e=>{if(this._isTerminatingOrTerminated())return void ft.debug(`[${this.id}] Ignoring ${i} response because call is ${this.state}`);const{node_id:t=null}=e;this._targetNodeId=t,i===zt.Offer?this.setState(qt.Trying):this._wasHeldBeforeRecovery&&this._isRecovering?this.setState(qt.Held):this.setState(qt.Active)}).catch(e=>H(this,void 0,void 0,function*(){ft.error(`${this.id} - Sending ${i} error:`,e);const t=ot(ee,e);sn(Xe.Error,{error:t,callId:this.id,sessionId:this.session.sessionid},this.session.uuid);try{yield this.hangup({cause:"USER_BUSY",causeCode:17,initiator:"sdk:sdp-send-failure"},!0)}catch(e){ft.error("Error during hangup after SDP send failure:",e)}}))}}_onIce(e){var t;const{instance:n}=this.peer;if(null===this._iceTimeout){const e=this.options.attach?5e3:1e3;this._iceTimeout=setTimeout(()=>this._onIceSdp(n.localDescription),e)}e.candidate?(ft.debug("RTCPeer Candidate:",e.candidate),null===(t=this.peer)||void 0===t||t.incrementGatheredCandidates(),this._trackCandidateMarks(e.candidate)):this._onIceSdp(n.localDescription)}_onTrickleIce(e){var t;e.candidate&&e.candidate.candidate?(ft.debug("RTCPeer Candidate:",e.candidate),null===(t=this.peer)||void 0===t||t.incrementGatheredCandidates(),this._trackCandidateMarks(e.candidate),this._sendIceCandidate(e.candidate)):this._sendEndOfCandidates()}_sendIceCandidate(e){const t=new En({sessid:this.session.sessionid,candidate:e.candidate,sdpMLineIndex:e.sdpMLineIndex,sdpMid:e.sdpMid,dialogParams:this.options});this._execute(t)}_addIceCandidate(e){if(!this._isRemoteDescriptionSet)return ft.debug("Remote description not set. Queued ICE candidate.",e),void this._pendingIceCandidates.push(e);this._addIceCandidateToPeer(e)}_addIceCandidateToPeer(e){const t=this.peer.instance.addIceCandidate(e);Promise.resolve(t).then(()=>{ft.debug("Successfully added ICE candidate:",e)}).catch(t=>{ft.error("Failed to add ICE candidate:",t,e)})}_sendEndOfCandidates(){const e=new In({sessid:this.session.sessionid,endOfCandidates:!0,dialogParams:this.options});this._execute(e)}_trackCandidateMarks(e){var t;if(this._firstCandidateSent||(performance.mark(wi(this.id,"first-candidate")),this._firstCandidateSent=!0),!this._firstNonHostCandidateSent){const n=null===(t=e.candidate.match(/typ (\w+)/))||void 0===t?void 0:t[1];n&&"host"!==n&&(performance.mark(wi(this.id,"first-non-host-candidate")),this._firstNonHostCandidateSent=!0)}}_resetTrickleIceCandidateState(){this._pendingIceCandidates=[],this._isRemoteDescriptionSet=!1,this._firstCandidateSent=!1,this._firstNonHostCandidateSent=!1}_flushPendingTrickleIceCandidates(){if(!this._pendingIceCandidates.length)return;const e=[...this._pendingIceCandidates];this._pendingIceCandidates=[],e.forEach(e=>{this._addIceCandidateToPeer(e)})}_registerPeerEvents(e){e.onicecandidate=e=>{var t;this.options.trickleIce?this._onTrickleIce(e):(null===(t=this.peer)||void 0===t?void 0:t.iceDone)||this._onIce(e)},e.onicegatheringstatechange=t=>{ft.debug("ICE gathering state changed:",e.iceGatheringState,t),"complete"===e.iceGatheringState&&(ft.debug("Finished gathering candidates"),performance.mark(wi(this.id,"ice-gathering-completed")))},e.onicecandidateerror=t=>{var n;if(ft.debug("ICE candidate error:",t),null===(n=this.peer)||void 0===n?void 0:n.statsReporter){const n=function(e,t){var n,i;return{errorCode:e.errorCode,errorText:e.errorText,url:e.url,address:e.address,port:e.port,connectionState:t.connectionState,iceConnectionState:t.iceConnectionState,iceGatheringState:t.iceGatheringState,signalingState:t.signalingState,localDescriptionType:null===(n=t.localDescription)||void 0===n?void 0:n.type,remoteDescriptionType:null===(i=t.remoteDescription)||void 0===i?void 0:i.type}}(t,e);this.peer.statsReporter.reportIceCandidateError(n)}},e.addEventListener("addstream",e=>{this.options.remoteStream=e.stream}),e.addEventListener("track",e=>{this.options.remoteStream=e.streams[0];const{remoteElement:t,remoteStream:n,screenShare:i}=this.options;!1===i&&Fn(t,n,{callId:this.id,sessionId:this.session.sessionid,eventTarget:this.session.uuid})})}_onMediaError(e){const t=(null==e?void 0:e.name)||"UnknownError",n=(null==e?void 0:e.message)||"Unknown media error",i=(null==e?void 0:e.originalError)||e;this._dispatchNotification({type:Wt.userMediaError,error:i,call:this,errorName:t,errorMessage:n}),ft.error(`Media error (${t}): ${n}`,e),sn(Xe.Error,{error:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),this.hangup({initiator:"sdk:media-error"},!1)}_onPeerConnectionFailureError(e){this._dispatchNotification({type:Wt.peerConnectionFailureError,error:e.error}),ft.error("Peer connection failure error"),e.warning&&sn(Xe.Warning,{warning:e.warning,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}_onPeerConnectionSignalingStateClosed(e){this._signalingStateClosed=!0,this._dispatchNotification(Object.assign({type:Wt.signalingStateClosed},e)),ft.debug("Peer connection signaling state closed, call is not recoverable")}_dispatchConferenceUpdate(e){this._dispatchNotification(Object.assign({type:Wt.conferenceUpdate,call:this},e))}_dispatchNotification(e){!0!==this.options.screenShare&&(sn(Xe.Notification,e,this.id,!1)||sn(Xe.Notification,e,this.session.uuid))}_execute(e){return this.nodeId&&(e.targetNodeId=this.nodeId),this.session.execute(e)}_registerInboundAnswerAttempt(){var e;if(this.options.attach||this._isRecovering)return!0;const t=null===(e=this.session.calls)||void 0===e?void 0:e[this.id];if(t&&t!==this){const e=nt(Ue);return sn(Xe.Warning,{warning:e,callId:this.id,activeCallId:t.id,sessionId:this.session.sessionid},this.session.uuid),ft.warn(`[${this.id}] answer() ignored: callID ${this.id} already has an active call (${t.id})`),!1}return!0}_init(){var e,t,n,i,r,o,a,s,l,c;const{id:d,userVariables:u,remoteCallerNumber:h,onNotification:p,recoveredCallId:f,wasHeldBeforeRecovery:g}=this.options;var m;this.options.id=d?d.toString():Y(),this.id=this.options.id,f&&(this.recoveredCallId=f,this._isRecovering=!0,this._wasHeldBeforeRecovery=Boolean(g)),u&&(m=u,0!==Object.keys(m).length)||(this.options.userVariables=this.session.options.userVariables||{}),h||(this.options.remoteCallerNumber=this.options.destinationNumber),this.session.calls[this.id]=this,rn(Xe.MediaError,this._onMediaError,this.id),rn(Xe.PeerConnectionFailureError,this._onPeerConnectionFailureError,this.id),rn(Xe.PeerConnectionSignalingStateClosed,this._onPeerConnectionSignalingStateClosed,this.id),kt(p)&&rn(Xe.Notification,p.bind(this),this.id);const v=!1!==this.session.options.enableCallReports,b=this.session.options.callReportInterval||5e3,y=null!==(e=this.session.options.callReportFlushInterval)&&void 0!==e?e:18e4,w=this.session.options.debugLogLevel||"debug",k=this.session.options.debugLogMaxEntries||1e3;if(v&&(this._callReportCollector=new ai({enabled:!0,interval:b,intermediateReportInterval:y},{enabled:!0,level:w,maxEntries:k}),this._callReportCollector.onFlushNeeded=()=>{this._flushIntermediateReport()},this._callReportCollector.onWarning=e=>{var t,n,i,r;sn(Xe.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid),e.code===Ee&&this._state!==qt.Held?null===(n=(t=this.session).reportNoRtp)||void 0===n||n.call(t,this.id,"inbound"):e.code===Ie&&this._state!==qt.Held&&this._hasActiveUnmutedLocalAudioTrack()&&(null===(r=(i=this.session).reportNoRtp)||void 0===r||r.call(i,this.id,"outbound"))}),!0===this.session.options.enableCallRecording){const e={enabled:!0,flushIntervalMs:null!==(t=this.session.options.callRecordingFlushIntervalMs)&&void 0!==t?t:15e3,maxBufferBytes:null!==(n=this.session.options.callRecordingMaxBufferBytes)&&void 0!==n?n:Vt,sampleRate:null!==(i=this.session.options.callRecordingSampleRate)&&void 0!==i?i:48e3,tracks:null!==(r=this.session.options.callRecordingTracks)&&void 0!==r?r:["local","remote"],endpoint:null!==(o=this.session.options.callRecordingEndpoint)&&void 0!==o?o:"/call_recording"},l={callId:this.id,callReportId:null!==(a=this.session.callReportId)&&void 0!==a?a:"",voiceSdkId:this._getCallReportVoiceSdkId()};this._callRecorder=new si(e,l);const c=null===(s=this.session.connection)||void 0===s?void 0:s.host;c&&this._callRecorder._setHost(c),this._callRecorder.onWarning=e=>{sn(Xe.Warning,{warning:e,callId:this.id,sessionId:this.session.sessionid},this.session.uuid)}}this._isRecovering?this.setState(qt.Recovering):this.setState(qt.New),ft.info(`New Call — region: ${null!==(l=this.session.region)&&void 0!==l?l:"unknown"}, dc: ${null!==(c=this.session.dc)&&void 0!==c?c:"unknown"}`,this.options)}_finalize(){var e,t,n;this._stopStats(),null===(e=this._mediaDeviceCollector)||void 0===e||e.stop(),this._mediaDeviceCollector=null,null===(t=this._callRecorder)||void 0===t||t.stop(),_i(this.id),ft.debug(`[${this.id}] Closing peer from _finalize`),null===(n=this.peer)||void 0===n||n.close();const{remoteStream:i,localStream:r,remoteElement:o,localElement:a}=this.options;zn(i),zn(r),jn(o,i),jn(a,r),an(Xe.MediaError,null,this.id),an(Xe.PeerConnectionFailureError,null,this.id),an(Xe.PeerConnectionSignalingStateClosed,null,this.id),this.session.calls[this.id]=null,delete this.session.calls[this.id];const s=this._postCallReport().catch(e=>{ft.error("Unexpected error in _postCallReport",{error:e})});this.session.trackCallReportUpload(s)}_getCallReportVoiceSdkId(){return this.session.callReportVoiceSdkId||void 0}_getClientSummary(){var e,t,n,i,r,o,a,s,l,c,d,u;const h=this.session.options,p=h.anonymous_login;return{authentication:Object.assign({type:this._getAuthenticationType()},p?{anonymousLogin:{targetType:p.target_type,targetId:p.target_id,targetVersionId:p.target_version_id,targetParams:this._sanitizeClientOption(p.target_params)}}:{}),connection:{env:h.env,host:h.host,project:h.project,region:null!==(e=this.session.region)&&void 0!==e?e:h.region,dc:this.session.dc,rtcIp:h.rtcIp,rtcPort:h.rtcPort,autoReconnect:null===(t=h.autoReconnect)||void 0===t||t,maxReconnectAttempts:null!==(n=h.maxReconnectAttempts)&&void 0!==n?n:10,keepConnectionAliveOnSocketClose:null!==(i=h.keepConnectionAliveOnSocketClose)&&void 0!==i&&i,hangupOnBeforeUnload:!1!==h.hangupOnBeforeUnload,useCanaryRtcServer:null!==(r=h.useCanaryRtcServer)&&void 0!==r&&r,skipLastVoiceSdkId:null!==(o=h.skipLastVoiceSdkId)&&void 0!==o&&o,skipTrailing:null!==(a=h.skipTrailing)&&void 0!==a&&a},media:{audio:this._sanitizeClientOption(this.options.audio),video:this._sanitizeClientOption(this.options.video),mutedMicOnStart:null!==(s=this.options.mutedMicOnStart)&&void 0!==s&&s,prefetchIceCandidates:null===(l=this.options.prefetchIceCandidates)||void 0===l||l,forceRelayCandidate:null!==(c=this.options.forceRelayCandidate)&&void 0!==c&&c,trickleIce:null!==(d=this.options.trickleIce)&&void 0!==d&&d,iceServers:this._sanitizeIceServers(this.options.iceServers)},callReports:{enabled:!1!==h.enableCallReports,intervalMs:h.callReportInterval||5e3,flushIntervalMs:null!==(u=h.callReportFlushInterval)&&void 0!==u?u:18e4,debugLogLevel:h.debugLogLevel||"debug",debugLogMaxEntries:h.debugLogMaxEntries||1e3}}}_getAuthenticationType(){const e=this.session.options;return e.anonymous_login?"anonymous_login":e.login_token?"login_token":e.login&&(e.password||e.passwd)?"login_password":e.token?"token":"unknown"}_sanitizeIceServers(e){if(e&&0!==e.length)return e.map(({urls:e,username:t,credential:n})=>({urls:e,hasUsername:Boolean(t),hasCredential:Boolean(n)}))}_sanitizeClientOption(e,t=0){if(void 0!==e){if(null===e)return null;if("string"==typeof e)return e;if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("boolean"==typeof e)return e;if("function"!=typeof e){if(t>=4)return"[truncated]";if(Array.isArray(e))return e.map(e=>this._sanitizeClientOption(e,t+1)).filter(e=>void 0!==e);if("object"==typeof e){const n=Object.entries(e).filter(([e])=>!this._isSensitiveClientOptionKey(e)).map(([e,n])=>[e,this._sanitizeClientOption(n,t+1)]).filter(e=>void 0!==e[1]);return Object.fromEntries(n)}}}}_isSensitiveClientOptionKey(e){return/(password|passwd|credential|secret|token|authorization|auth|api[_-]?key)/i.test(e)}flushIntermediateCallReport(e={type:"manual"}){this._flushIntermediateReport(e)}_flushIntermediateReport(e={type:"buffer-limit"}){var t;if(!this._callReportCollector)return;const n=this.session.callReportId;if(!n)return void ft.debug("Cannot flush intermediate report: call_report_id not available");const i=null===(t=this.session.connection)||void 0===t?void 0:t.host;if(!i)return void ft.debug("Cannot flush intermediate report: connection host not available");const r={callId:this.id,destinationNumber:this.options.destinationNumber,callerNumber:this.options.callerNumber,direction:this.direction===Bt.Inbound?"inbound":"outbound",state:this.state,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId,sdkVersion:xi,clientSummary:this._getClientSummary()},o=this._callReportCollector.flush(r,e);if(!o)return;ft.info("Flushing intermediate call report",{callId:this.id,flushReason:e,segment:o.segment});const a=this._getCallReportVoiceSdkId(),s="page-unload"===e.type,l=this._callReportCollector.sendPayload(o,n,i,a,s).catch(e=>{ft.error("Failed to post intermediate call report segment",{error:e})});this.session.trackCallReportUpload(l)}_postCallReport(){var e,t,n,i;return H(this,void 0,void 0,function*(){if(!this._callReportCollector)return void ft.warn("Call report collector not initialized");if(yield this._callReportCollector.stop(),this._callRecorder){this._callRecorder.stop();const t=null===(e=this.session.connection)||void 0===e?void 0:e.host;t&&this._callRecorder._setHost(t),this.session.callReportId&&this._callRecorder._setCallReportId(this.session.callReportId);const n=this._callRecorder.postFinalReport().catch(e=>{ft.error("Failed to post final call recording",{error:e})}).finally(()=>{var e;null===(e=this._callRecorder)||void 0===e||e.cleanup()});this.session.trackCallReportUpload(n)}const r=this.session.callReportId;if(!r)return ft.debug("Cannot post call report: call_report_id not available"),void this._callReportCollector.cleanup();const o={callId:this.id,destinationNumber:this.options.destinationNumber,callerNumber:this.options.callerNumber,direction:this.direction===Bt.Inbound?"inbound":"outbound",state:this.state,telnyxSessionId:this.options.telnyxSessionId,telnyxLegId:this.options.telnyxLegId,sdkVersion:xi,clientSummary:this._getClientSummary()},a=null===(t=this.session.connection)||void 0===t?void 0:t.host;if(!a)return void ft.error("Cannot post call report: connection host not available");const s=this._getCallReportVoiceSdkId();try{yield this._callReportCollector.postReport(o,r,a,s)}catch(e){throw ft.error("Failed to post call report",{error:e}),e}finally{null===(n=this._callReportCollector)||void 0===n||n.cleanup(),null===(i=this._callRecorder)||void 0===i||i.cleanup()}})}_startStats(e){this._statsIntervalId=setInterval(this._doStats,e),ft.info("Stats started")}_stopStats(){this._statsIntervalId&&(clearInterval(this._statsIntervalId),this._statsIntervalId=null),ft.debug("Stats stopped")}}Ci.setStateTelnyx=e=>{if(e){switch(e._state){case qt.Recovering:e.state="recovering";break;case qt.Requesting:case qt.Trying:case qt.Early:e.state="connecting";break;case qt.Active:e.state="active";break;case qt.Held:e.state="held";break;case qt.Hangup:case qt.Destroy:e.state="done";break;case qt.Answering:e.state="ringing";break;case qt.New:e.state="new"}return e}};class Ei extends Ci{constructor(){super(...arguments),this._statsInterval=null,this.sendConversationMessage=(e,t)=>this.session.execute(new ri(e,t)),this.sendAIConversationMessage=e=>{if(!this.session.connected)throw new Error("Cannot send AI conversation message: session is not connected. sendAIConversationMessage requires an active WebSocket connection.");const t=new oi(e);this.session.connection.sendRawText(JSON.stringify(t.request))}}hangup(e={},t=!0){const n=Object.create(null,{hangup:{get:()=>super.hangup}});return H(this,void 0,void 0,function*(){this.screenShare instanceof Ei&&(yield this.screenShare.hangup(e,t)),yield n.hangup.call(this,e,t)})}startScreenShare(e){return H(this,void 0,void 0,function*(){const t=yield(n={video:!0},navigator.mediaDevices.getDisplayMedia(n));var n;t.getTracks().forEach(e=>{e.addEventListener("ended",()=>H(this,void 0,void 0,function*(){this.screenShare&&(yield this.screenShare.hangup({initiator:"sdk:screenshare-track-ended"}))}))});const{remoteCallerName:i,remoteCallerNumber:r,callerName:o,callerNumber:a}=this.options,s=Object.assign({screenShare:!0,localStream:t,destinationNumber:`${this.extension}-screen`,remoteCallerName:i,remoteCallerNumber:`${r}-screen`,callerName:`${o} (Screen)`,callerNumber:`${a} (Screen)`},e);return this.screenShare=new Ei(this.session,s),this.screenShare.invite(),this.screenShare})}stopScreenShare(){return H(this,void 0,void 0,function*(){this.screenShare instanceof Ei&&(yield this.screenShare.hangup({initiator:"app:stopScreenShare"}))})}setAudioOutDevice(e){return H(this,void 0,void 0,function*(){this.options.speakerId=e;const{remoteElement:t,speakerId:n}=this.options;return!(!t||!n)&&Un(t,n)})}_finalize(){this._stats(!1),super._finalize()}_stats(e=!0){if(!1===e)return clearInterval(this._statsInterval);this._statsInterval=window.setInterval(()=>H(this,void 0,void 0,function*(){const e=yield this.peer.instance.getStats(null);let t="";const n=["certificate","codec","peer-connection","stream","local-candidate","remote-candidate"],i=["id","type","timestamp"];e.forEach(e=>{n.includes(e.type)||(t+=`\n${e.type}\n`,Object.keys(e).forEach(n=>{i.includes(n)||(t+=`\t${n}: ${e[n]}\n`)}))}),ft.info(t)}),2e3)}}class Ii extends Dn{constructor(e){super(e),this.calls={},this.autoRecoverCalls=!0,this._iceServers=[],this._localElement=null,this._localElementId=null,this._remoteElement=null,this._remoteElementId=null,this._jwtAuth=!0,this._audioConstraints=!0,this._previousAudioConstraints=!0,this._videoConstraints=!1,this._speaker=null,this._videoConstraints=e.video||!1,this.iceServers=e.iceServers,this.ringtoneFile=e.ringtoneFile,this.ringbackFile=e.ringbackFile}getActiveCalls(){return Object.values(this.calls).filter(e=>Ii.ACTIVE_CALL_STATE_NAMES.has(e.state))}_extractSafeCallIdentifiers(e){var t,n;const i={callId:e.id,state:e.state,direction:e.direction};(null===(t=e.options)||void 0===t?void 0:t.telnyxSessionId)&&(i.telnyxSessionId=e.options.telnyxSessionId),(null===(n=e.options)||void 0===n?void 0:n.telnyxLegId)&&(i.telnyxLegId=e.options.telnyxLegId);const r=e.sipCallId;return"string"==typeof r&&r&&(i.sipCallId=r),i}emitMultipleActiveCallsWarning(e){const t=this.getActiveCalls().filter(t=>t.id!==e);if(0===t.length)return;const n=nt(je),i=this.calls[e],r=i?this._extractSafeCallIdentifiers(i):{callId:e};sn(Xe.Warning,{warning:n,callId:e,sessionId:this.sessionid,newCall:r,activeCalls:t.map(e=>this._extractSafeCallIdentifiers(e))},this.uuid),ft.warn(`MULTIPLE_ACTIVE_CALLS_DETECTED: new call ${e} created while ${t.length} other call(s) are active in session ${this.sessionid}`)}getIsRegistered(){const e=Object.create(null,{getIsRegistered:{get:()=>super.getIsRegistered}});return H(this,void 0,void 0,function*(){return e.getIsRegistered.call(this)})}connect(){const e=Object.create(null,{connect:{get:()=>super.connect}});return H(this,void 0,void 0,function*(){ft.debug("BrowserSession.connect() called"),e.connect.call(this)})}checkPermissions(e=!0,t=!0){return H(this,void 0,void 0,function*(){try{const n=yield Bn({audio:e,video:t});return zn(n),!0}catch(e){return!1}})}logout(){this.disconnect()}disconnect(){const e=Object.create(null,{disconnect:{get:()=>super.disconnect}});return H(this,void 0,void 0,function*(){ft.info("[disconnect] Client-initiated disconnect — setting Purge with BYE on all active calls.");for(const e in this.calls){const t=this.calls[e];t.setState(qt.Purge),ft.info("Start hangup for ",t),yield t.hangup({initiator:"app:client.disconnect"},!0)}this.calls={},yield e.disconnect.call(this)})}serverDisconnect(){const e=Object.create(null,{disconnect:{get:()=>super.disconnect}});return H(this,void 0,void 0,function*(){ft.info("[serverDisconnect] Server-initiated disconnect — setting Purge without BYE on all active calls.");for(const e in this.calls){const t=this.calls[e];t.setState(qt.Purge),t.hangup({initiator:"sdk:server-disconnect"},!1)}this.calls={},yield e.disconnect.call(this)})}socketDisconnect(){this._closeConnection()}handleLoginError(e){super._handleLoginError(e)}speedTest(e){return new Promise((t,n)=>{if(on(Xe.SpeedTest,n=>{const{upDur:i,downDur:r}=n,o=r?8*e/(r/1e3)/1024:0;t({upDur:i,downDur:r,upKps:(i?8*e/(i/1e3)/1024:0).toFixed(0),downKps:o.toFixed(0)})},this.uuid),!(e=Number(e)))return n(`Invalid parameter 'bytes': ${e}`);this.executeRaw(`#SPU ${e}`);let i=e/1024;e%1024&&i++;const r=".".repeat(1024);for(let e=0;e<i;e++)this.executeRaw(`#SPB ${r}`);this.executeRaw("#SPE")})}getDevices(){return Hn().catch(e=>{const t=ot(rt(e),e);return sn(Xe.MediaError,t,this.uuid),[]})}getVideoDevices(){return Hn(Qt.Video).catch(e=>(sn(Xe.MediaError,e,this.uuid),[]))}getAudioInDevices(){return Hn(Qt.AudioIn).catch(e=>{const t=ot(rt(e),e);return sn(Xe.MediaError,t,this.uuid),[]})}getAudioOutDevices(){return Hn(Qt.AudioOut).catch(e=>(ft.error("getAudioOutDevices",e),sn(Xe.MediaError,e,this.uuid),[]))}validateDeviceId(e,t,n){return Vn(e,t,n)}getDeviceResolutions(e){return H(this,void 0,void 0,function*(){try{return yield(e=>H(void 0,void 0,void 0,function*(){const t=[],n=yield Bn({video:{deviceId:{exact:e}}}),i=n.getVideoTracks()[0];for(let e=0;e<Wn.length;e++){const[n,r]=Wn[e];(yield i.applyConstraints({width:{exact:n},height:{exact:r}}).then(()=>!0).catch(()=>!1))&&t.push({resolution:`${n}x${r}`,width:n,height:r})}return zn(n),t}))(e)}catch(e){throw e}})}get mediaConstraints(){return{audio:this._audioConstraints,video:this._videoConstraints}}setAudioSettings(e){return H(this,void 0,void 0,function*(){if(!e)throw new Error("You need to provide the settings object");const{micId:t,micLabel:n}=e,i=B(e,["micId","micLabel"]);return(e=>{const t=navigator.mediaDevices.getSupportedConstraints();Object.keys(e).map(n=>{t.hasOwnProperty(n)&&null!==e[n]&&void 0!==e[n]||delete e[n]})})(i),this._audioConstraints=yield((e,t,n,i)=>H(void 0,void 0,void 0,function*(){const{deviceId:n}=i;if(void 0===n&&(e||t)){const n=yield Vn(e,t,"audioinput").catch(()=>null);n&&(i.deviceId={exact:n})}return i}))(t,n,0,i),this.micId=t,this.micLabel=n,this._audioConstraints})}disableMicrophone(){this._previousAudioConstraints=this._audioConstraints,this._audioConstraints=!1}enableMicrophone(){this._audioConstraints=this._previousAudioConstraints||!0}set iceServers(e){if(e&&Array.isArray(e))this._iceServers=e;else{const e="development"===this.options.env;this._iceServers=e?Je:Qe}}get iceServers(){return this._iceServers}set speaker(e){this._speaker=e}get speaker(){return this._speaker}set localElement(e){this._localElementId="string"==typeof e?e:null,this._localElement=_t(e)}get localElement(){return this._localElement}get localElementId(){return this._localElementId}set remoteElement(e){this._remoteElementId="string"==typeof e?e:null,this._remoteElement=_t(e)}get remoteElement(){return this._remoteElement}get remoteElementId(){return this._remoteElementId}vertoBroadcast({nodeId:e,channel:t="",data:n}){if(!t)throw new Error(`Invalid channel for broadcast: ${t}`);const i=new On({sessid:this.sessionid,eventChannel:t,data:n});e&&(i.targetNodeId=e),this.execute(i).catch(e=>e)}vertoSubscribe({nodeId:e,channels:t=[],handler:n}){return H(this,void 0,void 0,function*(){if(!(t=t.filter(e=>e&&!this._existsSubscription(this.relayProtocol,e))).length)return{};const i=new An({sessid:this.sessionid,eventChannel:t});e&&(i.targetNodeId=e);const r=yield this.execute(i),{unauthorized:o=[],subscribed:a=[]}=Yn(r);return o.length&&o.forEach(e=>this._removeSubscription(this.relayProtocol,e)),a.forEach(e=>this._addSubscription(this.relayProtocol,n,e)),r})}vertoUnsubscribe({nodeId:e,channels:t=[]}){return H(this,void 0,void 0,function*(){if(!(t=t.filter(e=>e&&this._existsSubscription(this.relayProtocol,e))).length)return{};const n=new Nn({sessid:this.sessionid,eventChannel:t});e&&(n.targetNodeId=e);const i=yield this.execute(n),{unsubscribed:r=[],notSubscribed:o=[]}=Yn(i);return r.forEach(e=>this._removeSubscription(this.relayProtocol,e)),o.forEach(e=>this._removeSubscription(this.relayProtocol,e)),i})}static telnyxStateCall(e){return Ei.setStateTelnyx(e)}}Ii.ACTIVE_CALL_STATE_NAMES=new Set(["new","requesting","trying","recovering","ringing","answering","early","active","held"]);class Ti{constructor(e,t){this.code=t,this.message=e}}class Ri{constructor(e){this.session=e,this.retriedConnect=0,this.retriedRegister=0}_ack(e,t){const n=new kn(e,t);this.nodeId&&(n.targetNodeId=this.nodeId),this.session.execute(n)}reconnectDelay(){return 1e3*Math.floor(5*Math.random()+2)}handleMessage(e){var t,n,i,r,o,a,s,l,c,d,u;const{session:h}=this;h.setPingReceived();const{id:p,method:f,params:g={},voice_sdk_id:m}=e,v=null==g?void 0:g.callID,b=null==g?void 0:g.eventChannel,y=null==g?void 0:g.eventType,w=h.calls[v],k=null===(t=null==w?void 0:w.peer)||void 0===t?void 0:t.isConnectionHealthy(),_=new Set(Object.keys(h.calls));if(Array.isArray(null==g?void 0:g.reattached_sessions)&&_.size){ft.debug(`Reattach: active call IDs before cleanup check: [${Array.from(_).join(", ")}].`);const e=0===g.reattached_sessions.length,t=g.reattached_sessions.some(e=>_.has(e));if(e||!t)for(const e of Object.keys(h.calls)){const t=h.calls[e];ft.debug(`Session not reattached — terminating active call ${e} `);const n=ot(be);sn(Xe.Error,{error:n,callId:e,sessionId:h.sessionid},h.uuid),t.hangup({},!1)}}if(Array.isArray(null==g?void 0:g.reattached_sessions)&&h.sessionid){const t=Ut();if(t&&t.calls.length>0)if(t.sessionId!==h.sessionid)ft.debug(`Recovery markers were saved for a different sessid (saved=${t.sessionId}, current=${h.sessionid}) — ignoring all.`),jt();else{const n=new Set(g.reattached_sessions),i=[];for(const r of t.calls)try{if(n.has(r.id)){ft.debug(`Recovery marker for call ${r.id} was reattached — keeping for Attach element restore.`),i.push(r);continue}ft.info(`Recovery marker for call ${r.id} (sessid=${h.sessionid}) was not reattached — emitting SESSION_NOT_REATTACHED.`);const e=ot(be);sn(Xe.Error,{error:e,callId:r.id,sessionId:h.sessionid,customHeaders:r.customHeaders},h.uuid)}catch(e){ft.debug(`Recovery marker for a saved call failed to process (callId=${null==r?void 0:r.id}) — skipping: ${e instanceof Error?e.message:String(e)}`),i.push(r)}$t(i,t.sessionId,t.storedAt)}}if("channelPvtData"===y)return this._handlePvtEvent(g.pvtData);const S=({recoveredCallId:e,forceRelayCandidateForRecovery:t,mutedMicOnStart:n,remoteElement:i,localElement:r,wasHeldBeforeRecovery:o}={})=>{var a,s,l,c,d;const u={audio:!0,video:h.options.video,remoteSdp:g.sdp,destinationNumber:g.callee_id_number,remoteCallerName:g.caller_id_name,remoteCallerNumber:g.caller_id_number,callerName:g.callee_id_name,callerNumber:g.callee_id_number,attach:f===Ht.Attach,mediaSettings:g.mediaSettings,debug:null!==(a=h.options.debug)&&void 0!==a&&a,debugOutput:null!==(s=h.options.debugOutput)&&void 0!==s?s:"socket",trickleIce:null!==(l=h.options.trickleIce)&&void 0!==l&&l,prefetchIceCandidates:null===(c=h.options.prefetchIceCandidates)||void 0===c||c,forceRelayCandidate:t||h.options.forceRelayCandidate||!1,keepConnectionAliveOnSocketClose:null!==(d=h.options.keepConnectionAliveOnSocketClose)&&void 0!==d&&d,mutedMicOnStart:null!=n?n:h.options.mutedMicOnStart};v&&(u.id=v),g.telnyx_call_control_id&&(u.telnyxCallControlId=g.telnyx_call_control_id),g.telnyx_session_id&&(u.telnyxSessionId=g.telnyx_session_id),g.telnyx_leg_id&&(u.telnyxLegId=g.telnyx_leg_id),g.client_state&&(u.clientState=g.client_state),g.dialogParams&&g.dialogParams.custom_headers&&g.dialogParams.custom_headers.length&&(u.customHeaders=g.dialogParams.custom_headers),e&&(u.recoveredCallId=e),o&&(u.wasHeldBeforeRecovery=o),void 0!==i&&(u.remoteElement=i),void 0!==r&&(u.localElement=r),performance.mark(wi(u.id,"new-call-start"));const p=new Ei(h,u);return p.nodeId=this.nodeId,p},x=new fn(m),C=new mn(m);switch(f){case Ht.Answer:case Ht.Display:case Ht.Candidate:case Ht.Ringing:case Ht.Bye:case Ht.Media:if(!v||!w)return void ft.error(`Received ${f} for non existing call:`,g);w.handleMessage(e),this._ack(p,f);break;case Ht.Ping:this.session.setPingReceived(),this.session.execute(C);break;case Ht.Punt:h.options.keepConnectionAliveOnSocketClose&&k?(ft.info("[punt] Received PUNT from server. keepConnectionAliveOnSocketClose=true — disconnecting socket only, keeping calls alive."),h.socketDisconnect(),this._ack(p,f)):(ft.info("[punt] Received PUNT from server — calling serverDisconnect() to purge all calls without BYE."),h.serverDisconnect());break;case Ht.Invite:{const e=S();e.direction=Bt.Inbound,e.playRingtone(),e.setState(qt.Ringing),this.session.emitMultipleActiveCallsWarning(e.id),this._ack(p,f);break}case Ht.Attach:{const e=w||null;if(0===Object.keys(h.calls).length){let e,t;ft.warn(`[${(new Date).toISOString()}][${v}] Attach: SDK doens't have any active call therefore we recover first arrived attach session ${v}`);let n=!1;const i=Ut();if(i&&i.sessionId===h.sessionid){const r=i.calls.find(e=>e.id===v);r&&(e=r.remoteElement,t=r.localElement,n=!0===r.wasHeld,(e||t)&&ft.info(`[${v}] Attach: restoring per-call media elements from recovery marker (remoteElement=${null!=e?e:"<none>"}, localElement=${null!=t?t:"<none>"}).`))}const r=S({recoveredCallId:v,remoteElement:e,localElement:t,wasHeldBeforeRecovery:n});r.answer(),this.session.emitMultipleActiveCallsWarning(r.id),this._ack(p,f);break}if(e){const t=e.id,r=null!==(i=null===(n=e.shouldForceRelayCandidateForRecovery)||void 0===n?void 0:n.call(e))&&void 0!==i&&i,o="held"===e.state;r&&ft.warn(`[${(new Date).toISOString()}][${v}] Attach: forcing relay candidate because recovered VPN media path is still stalled`),ft.info(`[${(new Date).toISOString()}][${v}] Attach: recovering active call ${t}.`),e.hangup({isRecovering:!0,initiator:"sdk:attach-recovery"},!1);const a=S({recoveredCallId:t,forceRelayCandidateForRecovery:r,mutedMicOnStart:e.isAudioMuted,remoteElement:e.options.remoteElement,localElement:e.options.localElement,wasHeldBeforeRecovery:o});a.answer(),this.session.emitMultipleActiveCallsWarning(a.id),this._ack(p,f);break}ft.warn(`Attach: callID ${v} does not match any active calls. `),sn(Xe.Warning,{warning:nt(Be),callId:v,params:g,sessionId:h.sessionid},h.uuid),this._ack(p,f);break}case Ht.Event:case"webrtc.event":if(!b)return void ft.error("Verto received an unknown event:",g);const t=h.relayProtocol,y=b.split(".")[0];h._existsSubscription(t,b)?sn(t,g,b):b===h.sessionid?this._handleSessionEvent(g.eventData):h._existsSubscription(t,y)?sn(t,g,y):h.calls.hasOwnProperty(b)?h.calls[b].handleMessage(e):sn(Xe.Notification,g,h.uuid);break;case Ht.Info:g.type=Wt.generic,sn(Xe.Notification,g,h.uuid);break;case Ht.ClientReady:this.session.execute(x);break;case"ai_conversation":sn(Xe.AIConversationMessage,{method:"ai_conversation",params:g,voice_sdk_id:m},h.uuid);break;default:{const t=It(e);if(t){switch(t){case Jt.REGISTER:case Jt.REGED:if(!this.isDuplicateGatewayState(t,[Jt.REGED,Jt.REGISTER])){this.session._triggerKeepAliveTimeoutCheck(),this.retriedRegister=0,t===Jt.REGED&&this.session.resetReconnectAttempts();const n=null===(o=null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.params)||void 0===o?void 0:o.call_report_id;n&&(h.callReportId=n,ft.debug("Captured call_report_id from REGED:",n));const i=null===(s=null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.params)||void 0===s?void 0:s.dc;i&&(h.dc=i);const p=null===(c=null===(l=null==e?void 0:e.result)||void 0===l?void 0:l.params)||void 0===c?void 0:c.region;p&&(h.region=p),ft.info(`Connected to Telnyx — region: ${null!==(d=h.region)&&void 0!==d?d:"unknown"}, dc: ${null!==(u=h.dc)&&void 0!==u?u:"unknown"}`),g.type=Wt.vertoClientReady,sn(Xe.Ready,g,h.uuid)}break;case Jt.UNREGED:case Jt.NOREG:if(this.retriedRegister+=1,5===this.retriedRegister){this.retriedRegister=0;const e=new Ti("Fail to register the user, the server tried 5 times","UNREGED|NOREG"),t=ot(pe,e);sn(Xe.Error,{error:t,sessionId:h.sessionid},h.uuid);break}setTimeout(()=>{this.session.execute(x)},this.reconnectDelay());break;case Jt.FAILED:case Jt.FAIL_WAIT:case Jt.TIMEOUT:if(!this.isDuplicateGatewayState(t,[Jt.FAILED,Jt.FAIL_WAIT,Jt.TIMEOUT])){const e=ot(he,new Error(`Gateway state: ${t}`));if(sn(Xe.Error,{error:e,sessionId:h.sessionid},h.uuid),h.options.skipLastVoiceSdkId=!0,ft.debug(`Set skipLastVoiceSdkId=true on session options to avoid sticky reconnect to same b2bua-rtc instance (sessionId=${h.sessionid})`),!this.session.hasAutoReconnect()){this.retriedConnect=0;const e=new Ti("Fail to connect the server, the server tried 5 times","FAILED|FAIL_WAIT|TIMEOUT");this.session._terminateActiveCallsLocally();const t=ot(ue,e);sn(Xe.Error,{error:t,sessionId:h.sessionid},h.uuid);break}if(this.retriedConnect+=1,5===this.retriedConnect){this.retriedConnect=0,this.session._terminateActiveCallsLocally();const e=ot(ue,new Error("Connection Retry Failed"));sn(Xe.Error,{error:e,sessionId:h.sessionid},h.uuid);break}setTimeout(()=>{if(ft.debug(`Reconnecting... Retry ${this.retriedConnect} of 5`),this.session.options.keepConnectionAliveOnSocketClose){const e=Object.values(h.calls).some(e=>{var t;return(null===(t=e.peer)||void 0===t?void 0:t.instance)&&!e.signalingStateClosed});if(e)return ft.debug("Reconnecting by keeping the existing session due to keepConnectionAliveOnSocketClose option being set."),void this.session.socketDisconnect();ft.debug("keepConnectionAliveOnSocketClose is set but all peer connections have signalingState closed, doing full reconnect")}this.session.disconnect().then(()=>{this.session.clearConnection(),this.session.connect()})},this.reconnectDelay())}break;default:ft.warn("GatewayState message unknown method:",e)}break}ft.debug("Verto message unknown method:",e);break}}}isDuplicateGatewayState(e,t){const{previousGatewayState:n}=this.session.connection,i=t.includes(n);return i&&ft.debug(`Gateway state '${e}' received but previous state was '${n}' — guard condition met, skipping re-emission (sessionId=${this.session.sessionid})`),i}_retrieveCallId(e,t){const n=Object.keys(this.session.calls);if("bootObj"!==e.action)return n.find(e=>this.session.calls[e].channels.includes(t));{const t=e.data.find(e=>n.includes(e[0]));if(t instanceof Array)return t[0]}}_handlePvtEvent(e){return H(this,void 0,void 0,function*(){const{session:t}=this,n=t.relayProtocol,{action:i,laChannel:r,laName:o,chatChannel:a,infoChannel:s,modChannel:l,conferenceMemberID:c,role:d,callID:u}=e;switch(i){case"conference-liveArray-join":{const n=()=>{t.vertoBroadcast({nodeId:this.nodeId,channel:r,data:{liveArray:{command:"bootstrap",context:r,name:o}}})},i={nodeId:this.nodeId,channels:[r],handler:({data:i})=>{const a=u||this._retrieveCallId(i,r);if(a&&t.calls.hasOwnProperty(a)){const s=t.calls[a];s._addChannel(r),s.extension=o,s.handleConferenceUpdate(i,e).then(e=>{"INVALID_PACKET"===e&&n()})}}},a=yield t.vertoSubscribe(i).catch(e=>{ft.error("liveArray subscription error:",e);const n=ot(se,e);sn(Xe.Error,{error:n,sessionId:t.sessionid},t.uuid)});Kn(a,r)&&n();break}case"conference-liveArray-part":{let e=null;if(r&&t._existsSubscription(n,r)){const{callId:i=null}=t.subscriptions[n][r];if(e=t.calls[i]||null,null!==i){const n={type:Wt.conferenceUpdate,action:Yt.Leave,conferenceName:o,participantId:Number(c),role:d};sn(Xe.Notification,n,i,!1)||sn(Xe.Notification,n,t.uuid),null===e&&an(Xe.Notification,null,i)}}const i=[r,a,s,l];t.vertoUnsubscribe({nodeId:this.nodeId,channels:i}).then(({unsubscribedChannels:t=[]})=>{e&&(e.channels=e.channels.filter(e=>!t.includes(e)))}).catch(e=>{ft.error("liveArray unsubscribe error:",e)});break}}})}_handleSessionEvent(e){switch(e.contentType){case"layout-info":case"layer-info":mi(this.session,e);break;case"logo-info":{const t={type:Wt.conferenceUpdate,action:Yt.LogoInfo,logo:e.logoURL};sn(Xe.Notification,t,this.session.uuid);break}}}}class Oi extends Ii{constructor(e){super(e),this.relayProtocol="verto-protocol",this.timeoutErrorCode=-329990,this.handleLoginOnSocketOpen=()=>H(this,void 0,void 0,function*(){this._idle=!1;const{autoReconnect:e=!0}=this.options;yield this.login({onSuccess:()=>{this._autoReconnect=e}})}),this.handleAnonymousLoginOnSocketOpen=()=>H(this,void 0,void 0,function*(){this._idle=!1,yield this.login()}),this._vertoHandler=new Ri(this),window.addEventListener("beforeunload",t=>{if(ft.debug("Window beforeunload triggered."),!1!==e.hangupOnBeforeUnload)return Ft(),void(this.calls&&Object.keys(this.calls).forEach(e=>{this.calls[e]&&(ft.info(`Hanging up call due to window unload: ${e}`),this.calls[e].hangup({initiator:"sdk:beforeunload"},!0))}));this.calls&&Object.keys(this.calls).forEach(e=>{const t=this.calls[e];(null==t?void 0:t.flushIntermediateCallReport)&&(ft.debug(`beforeunload: flushing call report for ${e}.`),t.flushIntermediateCallReport({type:"page-unload"}))});try{const e=(this.calls?Object.keys(this.calls):[]).filter(e=>!!this.calls[e]).map(e=>this.calls[e]).map(e=>{const t={id:e.id,customHeaders:e.options.customHeaders};return"held"===e.state&&(t.wasHeld=!0),"string"==typeof e.options.remoteElement?t.remoteElement=e.options.remoteElement:this.remoteElementId&&e.options.remoteElement===this.remoteElement&&(t.remoteElement=this.remoteElementId),"string"==typeof e.options.localElement?t.localElement=e.options.localElement:this.localElementId&&e.options.localElement===this.localElement&&(t.localElement=this.localElementId),t});if(!this.sessionid||0===e.length)return ft.debug(`No sessionID ${this.sessionid} or activeCalls ${e.length} during saving calls recover marker!`),void jt();ft.info(`Saving recovery marker for ${e.length} active call(s) before unload (sessid=${this.sessionid}): [${e.map(e=>e.id).join(", ")}].`),$t(e,this.sessionid)}catch(e){const t=this.calls?Object.keys(this.calls):[];ft.debug(`Failed to save active-calls recovery marker before unload (active call ids: [${t.join(", ")}]): ${e instanceof Error?e.message:String(e)}`)}}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&!1===e.hangupOnBeforeUnload&&this.sessionid&&this.hasActiveCall()&&(ft.debug("visibilitychange → hidden: re-stamping reconnect session-id freshness."),Mt(this.sessionid))})}validateOptions(){return Ct(this.options)||Et(this.options)}newCall(e){if(!this.validateCallOptions(e))throw ot(oe,void 0,"Error: destinationNumber is required");const t=new Ei(this,e);return e.id||ft.debug(`newCall: callId was not provided in options, SDK-generated ID: ${t.id}`),this.emitMultipleActiveCallsWarning(t.id),performance.mark(wi(t.id,"new-call-start")),t.invite(),t}broadcast(e){return this.vertoBroadcast(e)}subscribe(e){return this.vertoSubscribe(e)}unsubscribe(e){return this.vertoUnsubscribe(e)}validateCallOptions(e){return!!Et(this.options)||Boolean(e.destinationNumber)}_onSocketOpen(){const e=Object.create(null,{_onSocketOpen:{get:()=>super._onSocketOpen}});return H(this,void 0,void 0,function*(){return e._onSocketOpen.call(this),Ct(this.options)?this.handleLoginOnSocketOpen():Et(this.options)?this.handleAnonymousLoginOnSocketOpen():void 0})}_onSocketMessage(e){this._vertoHandler.handleMessage(e)}}class Ai extends Oi{constructor(e){super(e),ft.info(`SDK version: ${bn}`)}newCall(e){return super.newCall(e)}static webRTCInfo(){return function(){try{const{browserInfo:e,name:t,version:n,supportAudio:i,supportVideo:r}=function(){if(!window||!window.navigator||!window.navigator.userAgent)throw new Error("You should use @telnyx/webrtc in a web browser such as Chrome|Firefox|Safari");if(navigator.userAgent.match(/chrom(e|ium)/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/chrom(e|ium)\/[0-9]+\./gim)[0].split("/"),t=e[0],n=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:n,supportAudio:!0,supportVideo:!0}}if(navigator.userAgent.match(/firefox/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/firefox\/[0-9]+\./gim)[0].split("/"),t=e[0],n=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:n,supportAudio:!0,supportVideo:!1}}if(navigator.userAgent.match(/safari/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)&&!navigator.userAgent.match(/edg/gim)){const e=navigator.userAgent.match(/safari/gim)[0],t=navigator.userAgent.match(/version\/[0-9]+\./gim)[0].split("/"),n=parseInt(t[1],10);return{browserInfo:navigator.userAgent,name:e,version:n,supportAudio:!0,supportVideo:!0}}if(navigator.userAgent.match(/edg/gim)&&!navigator.userAgent.match(/OPR\/[0-9]{2}/gi)){const e=navigator.userAgent.match(/edg\/[0-9]+\./gim)[0].split("/"),t=e[0],n=parseInt(e[1],10);return{browserInfo:navigator.userAgent,name:t,version:n,supportAudio:!0,supportVideo:!0}}throw new Error("This browser does not support @telnyx/webrtc. To see browser support list: `TelnyxRTC.webRTCSupportedBrowserList()`")}(),o=window.RTCPeerConnection,a=window.RTCSessionDescription,s=window.RTCIceCandidate,l=window.navigator&&window.navigator.mediaDevices,c=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia;return{browserInfo:e,browserName:t,browserVersion:n,supportWebRTC:!!(o&&a&&s&&l&&c),supportWebRTCAudio:i,supportWebRTCVideo:r,supportRTCPeerConnection:!!o,supportSessionDescription:!!a,supportIceCandidate:!!s,supportMediaDevices:!!l,supportGetUserMedia:!!Bn}}catch(e){return e.message}}()}static webRTCSupportedBrowserList(){return[{operationSystem:"Android",supported:[{browserName:"Chrome",features:["audio"],supported:Zn.full},{browserName:"Firefox",features:["audio"],supported:Zn.partial},{browserName:"Safari",supported:Zn.not_supported},{browserName:"Edge",supported:Zn.not_supported}]},{operationSystem:"iOS",supported:[{browserName:"Chrome",supported:Zn.not_supported},{browserName:"Firefox",supported:Zn.not_supported},{browserName:"Safari",features:["video","audio"],supported:Zn.full},{browserName:"Edge",supported:Zn.not_supported}]},{operationSystem:"Linux",supported:[{browserName:"Chrome",features:["video","audio"],supported:Zn.full},{browserName:"Firefox",features:["audio"],supported:Zn.partial},{browserName:"Safari",supported:Zn.not_supported},{browserName:"Edge",supported:Zn.not_supported}]},{operationSystem:"MacOS",supported:[{browserName:"Chrome",features:["video","audio"],supported:Zn.full},{browserName:"Firefox",features:["audio"],supported:Zn.partial},{browserName:"Safari",features:["video","audio"],supported:Zn.full},{browserName:"Edge",features:["audio"],supported:Zn.partial}]},{operationSystem:"Windows",supported:[{browserName:"Chrome",features:["video","audio"],supported:Zn.full},{browserName:"Firefox",features:["audio"],supported:Zn.partial},{browserName:"Safari",supported:Zn.not_supported},{browserName:"Edge",features:["audio"],supported:Zn.partial}]}]}}class Ni{constructor(){this.analyserNode=null,this.audioSource=null,this.animationId=null,this.audioContext=null}start(e,t){try{this.audioContext=new AudioContext,this.audioSource=this.audioContext.createMediaStreamSource(e),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=256,this.analyserNode.smoothingTimeConstant=.3,this.audioSource.connect(this.analyserNode);const n=new Float32Array(this.analyserNode.fftSize),i=()=>{if(!this.analyserNode)return void this.stop();this.analyserNode.getFloatTimeDomainData(n);let e=0;for(const t of n)e+=t*t;const r=Math.sqrt(e/n.length),o=Math.min(1,10*r);t((o>.01?o:0).toFixed(3)),this.animationId=requestAnimationFrame(i)};i()}catch{}}stop(){if(null!==this.animationId&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.audioSource){try{this.audioSource.disconnect()}catch{}this.audioSource=null}this.audioContext&&(this.audioContext.close().catch(()=>{}),this.audioContext=null),this.analyserNode=null}}const Li={NotAllowedError:"Microphone permission denied",NotFoundError:"No microphone found",NotReadableError:"Microphone is in use by another application",OverconstrainedError:"Microphone does not support required settings"};class Di{constructor(e){this.options=e,this.client=null,this.call=null,this.localStream=null,this.remoteAudio=null,this.audioMonitor=null,this.state="idle",this.eventListeners=new Map,this.connectResolve=null,this.connectReject=null,this.readyTimeout=null,this.cleaningUp=!1,this.handleReady=()=>{if(this.client&&this.localStream){try{this.call=this.client.newCall({destinationNumber:"moveo-test",audio:!0,localStream:this.localStream,remoteElement:this.ensureRemoteAudioElement()})}catch(e){const t=e instanceof Error?e.message:"Failed to start Telnyx call";return this.emitError(t),void this.cleanup()}this.audioMonitor=new Ni,this.audioMonitor.start(this.localStream,e=>{this.emit("audio-level",e,Number(e))})}},this.handleClientError=e=>{const t=e instanceof Error?e.message:"object"==typeof e&&e&&"message"in e?String(e.message):"Telnyx client error";this.emitError(t),this.cleanup()},this.handleNotification=e=>{if("userMediaError"===e.type)return this.emitError(e.error?.message||"Microphone access failed"),void this.cleanup();if("callUpdate"!==e.type||!e.call)return;const t=e.call.state;switch(t){case"new":break;case"trying":case"requesting":case"ringing":this.setState("connecting");break;case"active":this.setState("connected"),this.clearReadyTimeout(),this.connectResolve?.(),this.connectResolve=null,this.connectReject=null;break;case"held":this.emitError("Call on hold"),this.cleanup();break;case"hangup":case"destroy":case"purge":"hangup"!==t&&this.emitError("Call ended unexpectedly"),this.cleanup(!0);break;default:this.emitError(`Unexpected call state: ${t}`),this.cleanup()}}}async connect(){let e;this.setState("connecting");try{e=await this.fetchToken()}catch(e){const t=e instanceof Error?e.message:"Token fetch failed";throw this.emitError(t),new Error(t)}try{this.localStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(e){const t=e instanceof Error?e.name:"",n=Li[t]||"Microphone access failed";throw this.emitError(n),new Error(n)}return this.client=new Ai({login_token:e}),this.client.on("telnyx.ready",this.handleReady),this.client.on("telnyx.error",this.handleClientError),this.client.on("telnyx.notification",this.handleNotification),this.client.connect(),new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t,this.readyTimeout=setTimeout(()=>{this.connectReject&&(this.emitError("Could not connect to Telnyx"),this.cleanup())},15e3)})}disconnect(){this.cleanup()}toggleMute(){return!!this.call&&(this.call.isAudioMuted?(this.call.unmuteAudio(),!1):(this.call.muteAudio(),!0))}isMuted(){return this.call?.isAudioMuted??!1}sendDigits(e){if(this.call)for(const t of e)this.call.dtmf(t)}on(e,t){const n=this.eventListeners.get(e)??new Set;return n.add(t),this.eventListeners.set(e,n),()=>this.off(e,t)}off(e,t){const n=this.eventListeners.get(e);n&&(n.delete(t),0===n.size&&this.eventListeners.delete(e))}async fetchToken(){const e=`${this.options.host}/v1/telnyxvoice/${encodeURIComponent(this.options.integrationId)}/token`,t=await fetch(e,{method:"GET"});if(!t.ok){if(404===t.status)throw new Error(`Integration ID "${this.options.integrationId}" was not found.`);throw new Error(`Unable to fetch Telnyx token (status ${t.status} ${t.statusText}).`)}const n=(await t.text()).trim();if(!n)throw new Error("Empty token response from Telnyx token endpoint");let i;try{i=JSON.parse(n)}catch{return n}if(i&&"object"==typeof i&&"token"in i&&"string"==typeof i.token)return i.token;throw new Error(`Unexpected Telnyx token response shape: ${n.slice(0,200)}`)}ensureRemoteAudioElement(){return this.remoteAudio||(this.remoteAudio=document.createElement("audio"),this.remoteAudio.autoplay=!0,document.body.appendChild(this.remoteAudio)),this.remoteAudio}cleanup(e=!1){if(!this.cleaningUp){this.cleaningUp=!0,this.clearReadyTimeout(),this.client&&(this.client.off("telnyx.ready",this.handleReady),this.client.off("telnyx.error",this.handleClientError),this.client.off("telnyx.notification",this.handleNotification)),this.call=null;try{this.audioMonitor?.stop()}catch{}if(this.audioMonitor=null,this.client)try{(e?this.client.serverDisconnect():this.client.disconnect()).catch(()=>{})}catch{}this.client=null;try{this.localStream?.getTracks().forEach(e=>e.stop())}catch{}if(this.localStream=null,this.remoteAudio){try{this.remoteAudio.srcObject=null,this.remoteAudio.remove()}catch{}this.remoteAudio=null}this.connectReject&&this.connectReject(new Error("Call disconnected before connection completed")),this.connectResolve=null,this.connectReject=null,this.setState("idle"),this.cleaningUp=!1}}clearReadyTimeout(){this.readyTimeout&&(clearTimeout(this.readyTimeout),this.readyTimeout=null)}setState(e){this.state!==e&&(this.state=e,this.emit("state-change",e,e))}emitError(e){this.emit("error",e),this.setState("error")}emit(e,t,n){const i={state:e,message:t,data:n},r=e=>{const t=this.eventListeners.get(e);t&&t.forEach(e=>{try{e(i)}catch{}})};r(e),r("any")}}class Pi{constructor(e){this.provider=null,this.widgetRoot=null,this.widgetContainer=null,this.widgetKey=0,this.prevProviderState=null,this.mq=null,this.mqListener=null,this.config={host:e.host||"https://channels.moveo.ai",integrationId:e.integrationId},this.log=r()(`moveo:telnyx:controller:${e.integrationId}`)}async init(){return this.provider=new Di({integrationId:this.config.integrationId,host:this.config.host}),this.provider.on("state-change",({data:e})=>{const t=e,n=this.prevProviderState;"idle"!==t||"connected"!==n&&"reconnecting"!==n||this.resetWidget(),this.prevProviderState=t}),this.createWidgetContainer(),this.renderWidget(),this.log("TelnyxController initialized"),this}async startCall(){await(this.provider?.connect())}endCall(){this.provider?.disconnect()}toggleMute(){this.provider?.toggleMute()}isMuted(){return this.provider?.isMuted()??!1}sendDigits(e){this.provider?.sendDigits(e)}on(e,t){return this.provider?.on(e,t)??(()=>{})}off(e,t){this.provider?.off(e,t)}destroy(){this.provider?.disconnect(),this.provider=null,this.mq&&this.mqListener&&this.mq.removeEventListener("change",this.mqListener),this.mq=null,this.mqListener=null,this.widgetRoot&&(this.widgetRoot.unmount(),this.widgetRoot=null),this.widgetContainer&&(document.body.removeChild(this.widgetContainer),this.widgetContainer=null)}createWidgetContainer(){this.widgetContainer=document.createElement("div"),this.widgetContainer.id="moveo-telnyx-widget",this.widgetContainer.style.position="fixed",this.widgetContainer.style.zIndex="2147483647",this.widgetContainer.style.bottom="20px",this.widgetContainer.style.right="20px",this.applyDarkMode(),document.body.appendChild(this.widgetContainer)}applyDarkMode(){if(!this.widgetContainer||"function"!=typeof window.matchMedia)return;this.mq=window.matchMedia("(prefers-color-scheme: dark)");const e=e=>{this.widgetContainer?.classList.toggle("dark",e)};e(this.mq.matches),this.mqListener=t=>e(t.matches),this.mq.addEventListener("change",this.mqListener)}resetWidget(){this.widgetKey++,this.widgetRoot&&this.renderWidgetElement()}renderWidget(){if(!this.widgetContainer)throw new Error("Widget container not created");this.widgetRoot=(0,a.createRoot)(this.widgetContainer),this.renderWidgetElement()}renderWidgetElement(){this.widgetRoot.render((0,o.createElement)(z,{key:this.widgetKey,onStartCall:this.startCall.bind(this),onEndCall:this.endCall.bind(this),onToggleMute:this.toggleMute.bind(this),isMuted:this.isMuted.bind(this),onSendDigits:this.sendDigits.bind(this),onEvent:this.on.bind(this)}))}}const Mi=e=>"string"==typeof e,Fi=()=>{let e,t;const n=new Promise((n,i)=>{e=n,t=i});return n.resolve=e,n.reject=t,n},ji=e=>null==e?"":""+e,Ui=/###/g,$i=e=>e&&e.indexOf("###")>-1?e.replace(Ui,"."):e,zi=e=>!e||Mi(e),Bi=(e,t,n)=>{const i=Mi(t)?t.split("."):t;let r=0;for(;r<i.length-1;){if(zi(e))return{};const t=$i(i[r]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return zi(e)?{}:{obj:e,k:$i(i[r])}},Hi=(e,t,n)=>{const{obj:i,k:r}=Bi(e,t,Object);if(void 0!==i||1===t.length)return void(i[r]=n);let o=t[t.length-1],a=t.slice(0,t.length-1),s=Bi(e,a,Object);for(;void 0===s.obj&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=Bi(e,a,Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},Wi=(e,t)=>{const{obj:n,k:i}=Bi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},Vi=(e,t,n)=>{for(const i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?Mi(e[i])||e[i]instanceof String||Mi(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):Vi(e[i],t[i],n):e[i]=t[i]);return e},Gi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var qi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ki=e=>Mi(e)?e.replace(/[&<>"'\/]/g,e=>qi[e]):e,Yi=[" ",",","?","!",";"],Qi=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Ji=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const i=t.split(n);let r=e;for(let e=0;e<i.length;){if(!r||"object"!=typeof r)return;let t,o="";for(let a=e;a<i.length;++a)if(a!==e&&(o+=n),o+=i[a],t=r[o],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<i.length-1)continue;e+=a-e+1;break}r=t}return r},Xi=e=>e?.replace(/_/g,"-"),Zi={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class er{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Zi,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(Mi(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new er(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new er(this.logger,e)}}var tr=new er;class nr{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let i=0;i<n;i++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,i])=>{for(let r=0;r<i;r++)n.apply(n,[e,...t])})}}class ir extends nr{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,i={}){const r=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,o=void 0!==i.ignoreJSONStructure?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):Mi(n)&&r?a.push(...n.split(r)):a.push(n)));const s=Wi(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&o&&Mi(n)?Ji(this.data?.[e]?.[t],n,r):s}addResource(e,t,n,i,r={silent:!1}){const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),Hi(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n,i={silent:!1}){for(const i in n)(Mi(n[i])||Array.isArray(n[i]))&&this.addResource(e,t,i,n[i],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r,o={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let s=Wi(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Vi(s,n,r):s={...s,...n},Hi(this.data,a,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var rr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(e=>{t=this.processors[e]?.process(t,n,i,r)??t}),t}};const or=Symbol("i18next/PATH_KEY");function ar(e,t){const{[or]:n}=e(function(){const e=[],t=Object.create(null);let n;return t.get=(i,r)=>(n?.revoke?.(),r===or?e:(e.push(r),n=Proxy.revocable(i,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}()),i=t?.keySeparator??".",r=t?.nsSeparator??":";if(n.length>1&&r){const e=t?.ns,o=Array.isArray(e)?e:null;if(o&&o.length>1&&o.slice(1).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(i)}`}return n.join(i)}const sr={},lr=e=>!Mi(e)&&"boolean"!=typeof e&&"number"!=typeof e;class cr extends nr{constructor(e,t={}){var n,i;super(),n=e,i=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(i[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=tr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(null==e)return!1;const i=this.resolve(e,n);if(void 0===i?.res)return!1;const r=lr(i.res);return!1!==n.returnObjects||!r}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const i=Yi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===i.length)return!0;const r=Qi.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`);let o=!r.test(e);if(!o){const t=e.indexOf(n);t>0&&!r.test(e.substring(0,t))&&(o=!0)}return o})(e,n,i));if(o&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Mi(r)?[r]:r};const o=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(o[0])>-1)&&(r=o.shift()),e=o.join(i)}return{key:e,namespaces:Mi(r)?[r]:r}}translate(e,t,n){let i="object"==typeof t?{...t}:t;if("object"!=typeof i&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof i&&(i={...i}),i||(i={}),null==e)return"";"function"==typeof e&&(e=ar(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?ar(e,{...this.options,...i}):String(e));const r=void 0!==i.returnDetails?i.returnDetails:this.options.returnDetails,o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],i),l=s[s.length-1];let c=void 0!==i.nsSeparator?i.nsSeparator:this.options.nsSeparator;void 0===c&&(c=":");const d=i.lng||this.language,u=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===d?.toLowerCase())return u?r?{res:`${l}${c}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${c}${a}`:r?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:a;const h=this.resolve(e,i);let p=h?.res;const f=h?.usedKey||a,g=h?.exactUsedKey||a,m=void 0!==i.joinArrays?i.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,b=void 0!==i.count&&!Mi(i.count),y=cr.hasDefaultValue(i),w=b?this.pluralResolver.getSuffix(d,i.count,i):"",k=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):"",_=b&&!i.ordinal&&0===i.count,S=_&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${w}`]||i[`defaultValue${k}`]||i.defaultValue;let x=p;v&&!p&&y&&(x=S);const C=lr(x),E=Object.prototype.toString.apply(x);if(!(v&&x&&C&&["[object Number]","[object Function]","[object RegExp]"].indexOf(E)<0)||Mi(m)&&Array.isArray(x))if(v&&Mi(m)&&Array.isArray(p))p=p.join(m),p&&(p=this.extendTranslation(p,e,i,n));else{let t=!1,r=!1;!this.isValidLookup(p)&&y&&(t=!0,p=S),this.isValidLookup(p)||(r=!0,p=a);const s=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:p,u=y&&S!==p&&this.options.updateMissing;if(r||t||u){if(this.logger.log(u?"updateKey":"missingKey",d,l,a,u?S:p),o){const e=this.resolve(a,{...i,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);const n=(e,t,n)=>{const r=y&&n!==p?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,u,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,u,i),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{const t=this.pluralResolver.getSuffixes(e,i);_&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],a+t,i[`defaultValue${t}`]||S)})}):n(e,a,S))}p=this.extendTranslation(p,e,i,h,n),r&&p===a&&this.options.appendNamespaceToMissingKey&&(p=`${l}${c}${a}`),(r||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${a}`:a,t?p:void 0,i))}else{if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,x,{...i,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return r?(h.res=e,h.usedParams=this.getUsedParamsDetails(i),h):e}if(o){const e=Array.isArray(x),t=e?[]:{},n=e?g:f;for(const e in x)if(Object.prototype.hasOwnProperty.call(x,e)){const r=`${n}${o}${e}`;t[e]=y&&!p?this.translate(r,{...i,defaultValue:lr(S)?S[e]:void 0,joinArrays:!1,ns:s}):this.translate(r,{...i,joinArrays:!1,ns:s}),t[e]===r&&(t[e]=x[e])}p=t}}return r?(h.res=p,h.usedParams=this.getUsedParamsDetails(i),h):p}extendTranslation(e,t,n,i,r){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const o=Mi(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(o){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&!Mi(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||i.usedLng,n),o){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>r?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,a=Mi(o)?[o]:o;return null!=e&&a?.length&&!1!==n.applyPostProcessor&&(e=rr.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,i,r,o,a;return Mi(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?ar(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;const s=this.extractFromKey(e,t),l=s.key;i=l;let c=s.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const d=void 0!==t.count&&!Mi(t.count),u=d&&!t.ordinal&&0===t.count,h=void 0!==t.context&&(Mi(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(e=>{this.isValidLookup(n)||(a=e,sr[`${p[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(a)||(sr[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(i=>{if(this.isValidLookup(n))return;o=i;const a=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,i,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(i,t.count,t));const n=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&0===e.indexOf(r)&&a.push(l+e.replace(r,this.options.pluralSeparator)),a.push(l+e),u&&a.push(l+n)),h){const i=`${l}${this.options.contextSeparator||"_"}${t.context}`;a.push(i),d&&(t.ordinal&&0===e.indexOf(r)&&a.push(i+e.replace(r,this.options.pluralSeparator)),a.push(i+e),u&&a.push(i+n))}}let s;for(;s=a.pop();)this.isValidLookup(n)||(r=s,n=this.getResource(i,e,s,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Mi(e.replace);let i=n?e.replace:e;if(n&&void 0!==e.count&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const e of t)delete i[e]}return i}static hasDefaultValue(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}class dr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=tr.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Xi(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Xi(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Mi(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const i=this.getLanguagePartFromCode(e);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(e=>e===i?e:e.indexOf("-")<0&&i.indexOf("-")<0?void 0:e.indexOf("-")>0&&i.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===i||0===e.indexOf(i)&&i.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),Mi(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),i=[],r=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Mi(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&r(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&r(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&r(this.getLanguagePartFromCode(e))):Mi(e)&&r(this.formatLanguageCode(e)),n.forEach(e=>{i.indexOf(e)<0&&r(this.formatLanguageCode(e))}),i}}const ur={zero:0,one:1,two:2,few:3,many:4,other:5},hr={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class pr{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=tr.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Xi("dev"===e?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch(n){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),hr;if(!e.match(/-|_/))return hr;const i=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(i,t)}return this.pluralRulesCache[r]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((e,t)=>ur[e]-ur[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const fr=(e,t,n,i=".",r=!0)=>{let o=((e,t,n)=>{const i=Wi(e,n);return void 0!==i?i:Wi(t,n)})(e,t,n);return!o&&r&&Mi(n)&&(o=Ji(e,n,i),void 0===o&&(o=Ji(t,n,i))),o},gr=e=>e.replace(/\$/g,"$$$$");class mr{constructor(e={}){this.logger=tr.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:s,formatSeparator:l,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:u,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Ki,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==i&&i,this.prefix=r?Gi(r):o||"{{",this.suffix=a?Gi(a):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=u?Gi(u):h||Gi("$t("),this.nestingSuffix=p?Gi(p):f||Gi(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,i){let r,o,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const r=fr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,n,{...i,...t,interpolationkey:e}):r}const r=e.split(this.formatSeparator),o=r.shift().trim(),a=r.join(this.formatSeparator).trim();return this.format(fr(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...i,...t,interpolationkey:o})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=void 0!==i?.interpolation?.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>gr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?gr(this.escape(e)):gr(e)}].forEach(t=>{for(a=0;r=t.regex.exec(e);){const n=r[1].trim();if(o=l(n),void 0===o)if("function"==typeof c){const t=c(e,r,i);o=Mi(t)?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,n))o="";else{if(d){o=r[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o=""}else Mi(o)||this.useRawValueToEscape||(o=ji(o));const s=t.safeValue(o);if(e=e.replace(r[0],s),d?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t,n={}){let i,r,o;const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const i=e.split(new RegExp(`${Gi(n)}[ ]*{`));let r=`{${i[1]}`;e=i[0],r=this.interpolate(r,o);const a=r.match(/'/g),s=r.match(/"/g);((a?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(r=r.replace(/'/g,'"'));try{o=JSON.parse(r),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${r}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;i=this.nestingRegexp.exec(e);){let s=[];o={...n},o=o.replace&&!Mi(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(-1!==l&&(s=i[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),r=t(a.call(this,i[1].trim(),o),o),r&&i[0]===e&&!Mi(r))return r;Mi(r)||(r=ji(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),s.length&&(r=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const vr=e=>{const t={};return(n,i,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});const a=i+JSON.stringify(o);let s=t[a];return s||(s=e(Xi(i),r),t[a]=s),s(n)}},br=e=>(t,n,i)=>e(Xi(n),i)(t);class yr{constructor(e={}){this.logger=tr.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?vr:br;this.formats={number:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=vr(t)}format(e,t,n,i={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(e=>e.indexOf(")")>-1)){const e=r.findIndex(e=>e.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,e)].join(this.formatSeparator)}const o=r.reduce((e,t)=>{const{formatName:r,formatOptions:o}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);"currency"===t&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):"relativetime"===t&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(e=>{if(e){const[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=r),"false"===r&&(n[o]=!1),"true"===r&&(n[o]=!0),isNaN(r)||(n[o]=parseInt(r,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[r]){let t=e;try{const a=i?.formatParams?.[i.interpolationkey]||{},s=a.locale||a.lng||i.locale||i.lng||n;t=this.formats[r](e,s,{...o,...i,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e);return o}}class wr extends nr{constructor(e,t,n,i={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=tr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},a={},s={};return e.forEach(e=>{let i=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===o[a]&&(o[a]=!0):(this.state[a]=1,i=!1,void 0===o[a]&&(o[a]=!0),void 0===r[a]&&(r[a]=!0),void 0===s[t]&&(s[t]=!0)))}),i||(a[e]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:i,k:r}=Bi(e,t,Object);i[r]=i[r]||[],i[r].push(n)})(n.loaded,[r],o),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,i=0,r=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&i<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,i+1,2*r,o)},r):o(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Mi(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Mi(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,i,r,o={},a=()=>{}){if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const s={...o,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;r=5===l.length?l(e,t,n,i,s):l(e,t,n,i),r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}else l(e,t,n,i,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,i)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const kr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),Mi(e[1])&&(t.defaultValue=e[1]),Mi(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_r=e=>(Mi(e.ns)&&(e.ns=[e.ns]),Mi(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Mi(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Sr=()=>{},xr="__i18next_supportNoticeShown";class Cr extends nr{constructor(e={},t){var n;if(super(),this.options=_r(e),this.services={},this.logger=tr,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(Mi(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=kr();var i;this.options={...n,...this.options,..._r(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||(i=this,i?.modules?.backend?.name?.indexOf("Locize")>0||i?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||i?.options?.backend?.backends&&i.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||i?.options?.backend?.projectId||i?.options?.backend?.backendOptions&&i.options.backend.backendOptions.some(e=>e?.projectId))||"undefined"!=typeof globalThis&&globalThis[xr]||"undefined"!=typeof process&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||"undefined"!=typeof process&&process.env||("undefined"!=typeof console&&void 0!==console.info&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),"undefined"!=typeof globalThis&&(globalThis[xr]=!0));const r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?tr.init(r(this.modules.logger),this.options):tr.init(null,this.options),e=this.modules.formatter?this.modules.formatter:yr;const t=new dr(this.options);this.store=new ir(this.options.resources,this.options);const i=this.services;i.logger=tr,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new pr(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),!e||this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format||(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new mr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new wr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new cr(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Sr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});const o=Fi(),a=()=>{const e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),o}loadResources(e,t=Sr){let n=t;const i=Mi(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===i?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();const e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){const i=Fi();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Sr),this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&rr.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Fi();this.emit("languageChanging",e);const i=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},r=(r,o)=>{o?this.isLanguageChangingTo===e&&(i(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(r,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);const n=Mi(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Mi(t)?[t]:t);o&&(this.language||i(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{r(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){const i=(e,t,...r)=>{let o;o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(r)):{...t},o.lng=o.lng||i.lng,o.lngs=o.lngs||i.lngs,o.ns=o.ns||i.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||i.keyPrefix);const a={...this.options,...o};"function"==typeof o.keyPrefix&&(o.keyPrefix=ar(o.keyPrefix,a));const s=this.options.keySeparator||".";let l;return o.keyPrefix&&Array.isArray(e)?l=e.map(e=>("function"==typeof e&&(e=ar(e,a)),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ar(e,a)),l=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(l,o)};return Mi(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){const n=Fi();return this.options.ns?(Mi(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Fi();Mi(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(e=>i.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return r.length?(this.options.preload=i.concat(r),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const t=new Intl.Locale(e);if(t&&t.getTextInfo){const e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}const t=this.services?.languageUtils||new dr(kr());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const n=new Cr(e,t);return n.createInstance=Cr.createInstance,n}cloneInstance(e={},t=Sr){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new Cr(i);if(void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n){const e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,i)=>(n[i]={...e[t][i]},n),e[t]),e),{});r.store=new ir(e,i),r.services.resourceStore=r.store}if(e.interpolation){const t={...kr().interpolation,...this.options.interpolation,...e.interpolation},n={...i,interpolation:t};r.services.interpolator=new mr(n)}return r.translator=new cr(r.services,i),r.translator.on("*",(e,...t)=>{r.emit(e,...t)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Er=Cr.createInstance(),{slice:Ir,forEach:Tr}=(Er.createInstance,Er.dir,Er.init,Er.loadResources,Er.reloadResources,Er.use,Er.changeLanguage,Er.getFixedT,Er.t,Er.exists,Er.setDefaultNamespace,Er.hasLoadedNamespace,Er.loadNamespaces,Er.loadLanguages,[]),Rr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Or={create(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+60*n*1e3)),i&&(r.domain=i),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let i=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Rr.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!Rr.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(i+="; Partitioned"),i}(e,t,r)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let i=n[e];for(;" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Ar={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Or.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:o}=t;n&&"undefined"!=typeof document&&Or.create(n,e,i,r,o)}},Nr={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const i=e.substring(1).split("&");for(let e=0;e<i.length;e++){const r=i[e].indexOf("=");r>0&&i[e].substring(0,r)===n&&(t=i[e].substring(r+1))}}return t}},Lr={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:i}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const r=e.substring(1);if(n){const e=r.split("&");for(let i=0;i<e.length;i++){const r=e[i].indexOf("=");r>0&&e[i].substring(0,r)===n&&(t=e[i].substring(r+1))}}if(t)return t;if(!t&&i>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof i?i:0;return t[n]?.replace("/","")}}}return t}};let Dr=null;const Pr=()=>{if(null!==Dr)return Dr;try{if(Dr="undefined"!=typeof window&&null!==window.localStorage,!Dr)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Dr=!1}return Dr};var Mr={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Pr())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Pr()&&window.localStorage.setItem(n,e)}};let Fr=null;const jr=()=>{if(null!==Fr)return Fr;try{if(Fr="undefined"!=typeof window&&null!==window.sessionStorage,!Fr)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Fr=!1}return Fr};var Ur={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&jr())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&jr()&&window.sessionStorage.setItem(n,e)}},$r={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:i}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},zr={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const i=n||("undefined"!=typeof document?document.documentElement:null);return i&&"function"==typeof i.getAttribute&&(t=i.getAttribute("lang")),t}},Br={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const i="number"==typeof t?t:0;return n[i]?.replace("/","")}},Hr={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,i="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};let Wr=!1;try{document.cookie,Wr=!0}catch(Ze){}const Vr=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Wr||Vr.splice(1,1);class Gr{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return Tr.call(Ir.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:Vr,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ar),this.addDetector(Nr),this.addDetector(Mr),this.addDetector(Ur),this.addDetector($r),this.addDetector(zr),this.addDetector(Br),this.addDetector(Hr),this.addDetector(Lr)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}Gr.type="languageDetector";Er.createInstance().use(Gr).use(N).init({resources:{el:{translation:{audio_widget:{actions:{cancel:"Ακύρωση δοκιμαστικής κλήσης ήχου",end:"Τερματισμός δοκιμαστικής κλήσης ήχου",start:"Έναρξη δοκιμαστικής κλήσης ήχου"},errors:{generic:"Παρουσιάστηκε σφάλμα",start_failed:"Δεν ήταν δυνατή η έναρξη της κλήσης"},mute:{mute:"Σίγαση",mute_microphone:"Σίγαση μικροφώνου",unmute:"Κατάργηση σίγασης",unmute_microphone:"Κατάργηση σίγασης μικροφώνου"},sr:{connected:"Η κλήση συνδέθηκε",connected_thinking:"Η κλήση συνδέθηκε, δημιουργία απάντησης",connecting:"Σύνδεση κλήσης",error:"Σφάλμα κλήσης",error_with_message:"Σφάλμα κλήσης: {{message}}",ready:"Έτοιμο για πραγματοποίηση κλήσης"},status:{connecting:"Σύνδεση",error:"Σφάλμα",on_call:"Σε κλήση",ready:"Έτοιμο",thinking:"Σκέφτεται"}}}},en:{translation:{audio_widget:{actions:{cancel:"Cancel audio preview call",end:"End audio preview call",start:"Start audio preview call"},errors:{generic:"An error occurred",start_failed:"Failed to start call"},mute:{mute:"Mute",mute_microphone:"Mute microphone",unmute:"Unmute",unmute_microphone:"Unmute microphone"},sr:{connected:"Call connected",connected_thinking:"Call connected, generating response",connecting:"Connecting call",error:"Call error",error_with_message:"Call error: {{message}}",ready:"Ready to place a call"},status:{connecting:"Connecting",error:"Error",on_call:"On call",ready:"Ready",thinking:"Thinking"}}}},"pt-br":{translation:{audio_widget:{actions:{cancel:"Cancelar chamada de prévia de áudio",end:"Encerrar chamada de prévia de áudio",start:"Iniciar chamada de prévia de áudio"},errors:{generic:"Ocorreu um erro",start_failed:"Não foi possível iniciar a chamada"},mute:{mute:"Silenciar",mute_microphone:"Silenciar microfone",unmute:"Ativar",unmute_microphone:"Ativar microfone"},sr:{connected:"Chamada conectada",connected_thinking:"Chamada conectada, gerando resposta",connecting:"Conectando chamada",error:"Erro na chamada",error_with_message:"Erro na chamada: {{message}}",ready:"Pronto para iniciar uma chamada"},status:{connecting:"Conectando",error:"Erro",on_call:"Em chamada",ready:"Pronto",thinking:"Pensando"}}}}},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:["navigator"]}});var qr=n.cjs(function(e,t){var n=[];function i(e){for(var t=-1,i=0;i<n.length;i++)if(n[i].identifier===e){t=i;break}return t}function r(e,t){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],c=t.base?l[0]+t.base:l[0],d=r[c]||0,u="".concat(c," ").concat(d);r[c]=d+1;var h=i(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==h)n[h].references++,n[h].updater(p);else{var f=o(p,t);t.byIndex=s,n.splice(s,0,{identifier:u,updater:f,references:1})}a.push(u)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,t){var o=r(e=e||[],t=t||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var s=i(o[a]);n[s].references--}for(var l=r(e,t),c=0;c<o.length;c++){var d=i(o[c]);0===n[d].references&&(n[d].updater(),n.splice(d,1))}o=l}}}),Kr=n.n(qr),Yr=n.cjs(function(e,t){e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var o=n.sourceMap;o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}),Qr=n.n(Yr),Jr=n.cjs(function(e,t){var n={};e.exports=function(e,t){var i=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}}),Xr=n.n(Jr),Zr=n.cjs(function(e,t){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}}),eo=n.n(Zr),to=n.cjs(function(e,t){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}}),no=n.n(to),io=n.cjs(function(e,t){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}),ro=n.n(io),oo=n(4511),ao={};ao.styleTagTransform=ro(),ao.setAttributes=eo(),ao.insert=Xr().bind(null,"head"),ao.domAPI=Qr(),ao.insertStyleElement=no(),Kr()(oo.A,ao),oo.A&&oo.A.locals&&oo.A.locals;const so=r()("moveo:telnyx:main"),lo=async e=>{if(so("MoveoTelnyx.init() called with config",e),!e.integrationId){const e=new Error("integrationId is required in config");throw so("Initialization failed: integrationId is required",e),e}so("Creating TelnyxController instance");const t=new Pi(e);return so("Initializing TelnyxController"),await t.init(),so("MoveoTelnyx initialization complete"),t},co=Object.assign(lo,{init:lo,TelnyxController:Pi})},4915(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}}};const t={};function n(i){const r=t[i];if(void 0!==r)return r.exports;const o=t[i]={id:i,exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var r=t[i++],o=t[i++];n.o(e,r)?0===o&&i++:0===o?Object.defineProperty(e,r,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,r,{enumerable:!0,get:o})}else for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports},n.nc=void 0;let i=n(5617);return i=i.default,i})());