@tmsoft/webphone 3.0.19 → 3.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  (function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(`@import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Monda:wght@400..700&display=swap&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap&family=Quicksand:wght@300..700&display=swap";@import "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&family=Monda:wght@400..700&display=swap&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap&family=Quicksand:wght@300..700&display=swap";@layer components;@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{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-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-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-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-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-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-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}[data-v-e843f7cf],[data-v-e843f7cf]:before,[data-v-e843f7cf]:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-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-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-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}[data-v-e843f7cf]::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-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-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-outline-style:solid;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--wp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--wp-color-red-500:#fb2c36;--wp-color-amber-100:#fef3c6;--wp-color-amber-400:#fcbb00;--wp-color-amber-500:#f99c00;--wp-color-amber-600:#dd7400;--wp-color-amber-900:#7b3306;--wp-color-green-500:#00c758;--wp-color-emerald-100:#d0fae5;--wp-color-emerald-400:#00d294;--wp-color-emerald-600:#009767;--wp-color-emerald-900:#004e3b;--wp-color-blue-100:#dbeafe;--wp-color-blue-400:#54a2ff;--wp-color-blue-500:#3080ff;--wp-color-blue-600:#155dfc;--wp-color-blue-900:#1c398e;--wp-color-purple-100:#f3e8ff;--wp-color-purple-400:#c07eff;--wp-color-purple-600:#9810fa;--wp-color-purple-900:#59168b;--wp-color-neutral-100:#f5f5f5;--wp-color-neutral-200:#e5e5e5;--wp-color-neutral-400:#a1a1a1;--wp-color-neutral-500:#737373;--wp-color-neutral-600:#525252;--wp-color-neutral-700:#404040;--wp-color-neutral-800:#262626;--wp-color-neutral-900:#171717;--wp-color-black:#000;--wp-color-white:#fff;--wp-spacing:.25rem;--wp-breakpoint-2xl:96rem;--wp-container-sm:24rem;--wp-container-md:28rem;--wp-container-lg:32rem;--wp-text-xs:.75rem;--wp-text-xs--line-height:calc(1 / .75);--wp-text-sm:.875rem;--wp-text-sm--line-height:calc(1.25 / .875);--wp-text-base:1rem;--wp-text-base--line-height:calc(1.5 / 1);--wp-text-lg:1.125rem;--wp-text-lg--line-height:calc(1.75 / 1.125);--wp-text-3xl:1.875rem;--wp-text-3xl--line-height:calc(2.25 / 1.875);--wp-font-weight-light:300;--wp-font-weight-medium:500;--wp-font-weight-semibold:600;--wp-font-weight-bold:700;--wp-tracking-wider:.05em;--wp-tracking-widest:.1em;--wp-radius-xs:.125rem;--wp-radius-2xl:1rem;--wp-ease-in-out:cubic-bezier(.4, 0, .2, 1);--wp-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--wp-aspect-video:16 / 9;--wp-default-transition-duration:.15s;--wp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--wp-default-font-family:"Montserrat", sans-serif;--wp-default-mono-font-family:var(--wp-font-mono)}@supports (color:color(display-p3 0 0 0)){:root,:host{--wp-color-red-500:color(display-p3 .903738 .262579 .253307);--wp-color-amber-100:color(display-p3 .989391 .954583 .796328);--wp-color-amber-400:color(display-p3 .959186 .738519 .118268);--wp-color-amber-500:color(display-p3 .93994 .620584 .0585367);--wp-color-amber-600:color(display-p3 .827144 .467166 .0336006);--wp-color-amber-900:color(display-p3 .445958 .216422 .0823321);--wp-color-green-500:color(display-p3 .308734 .774754 .374307);--wp-color-emerald-100:color(display-p3 .848335 .975974 .901691);--wp-color-emerald-400:color(display-p3 .334701 .819603 .591575);--wp-color-emerald-600:color(display-p3 .206557 .589057 .413962);--wp-color-emerald-900:color(display-p3 .117821 .302975 .234501);--wp-color-blue-100:color(display-p3 .869214 .915931 .989622);--wp-color-blue-400:color(display-p3 .397443 .62813 .992116);--wp-color-blue-500:color(display-p3 .266422 .491219 .988624);--wp-color-blue-600:color(display-p3 .174493 .358974 .950247);--wp-color-blue-900:color(display-p3 .136395 .219428 .537145);--wp-color-purple-100:color(display-p3 .945034 .910569 .992972);--wp-color-purple-400:color(display-p3 .719919 .492497 .995173);--wp-color-purple-600:color(display-p3 .546729 .130167 .94439);--wp-color-purple-900:color(display-p3 .321698 .107597 .524563);--wp-color-neutral-100:color(display-p3 .960587 .960587 .960587);--wp-color-neutral-200:color(display-p3 .898161 .898161 .898161);--wp-color-neutral-400:color(display-p3 .630163 .630163 .630163);--wp-color-neutral-500:color(display-p3 .451519 .451519 .451519);--wp-color-neutral-600:color(display-p3 .321993 .321993 .321993);--wp-color-neutral-700:color(display-p3 .250471 .250471 .250471);--wp-color-neutral-800:color(display-p3 .149382 .149382 .149382);--wp-color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){:root,:host{--wp-color-red-500:lab(55.4814% 75.0732 48.8528);--wp-color-amber-100:lab(95.916% -1.21653 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8672 97.9407);--wp-color-amber-600:lab(60.3514% 40.5624 87.1228);--wp-color-amber-900:lab(31.2288% 30.2627 40.0378);--wp-color-green-500:lab(70.5521% -66.5147 45.8073);--wp-color-emerald-100:lab(94.9004% -17.0769 5.63836);--wp-color-emerald-400:lab(75.0771% -60.7313 19.4147);--wp-color-emerald-600:lab(55.0481% -49.9246 15.93);--wp-color-emerald-900:lab(28.8637% -26.9249 5.45986);--wp-color-blue-100:lab(92.0301% -2.24757 -11.6453);--wp-color-blue-400:lab(65.0361% -1.42065 -56.9802);--wp-color-blue-500:lab(54.1736% 13.3369 -74.6839);--wp-color-blue-600:lab(44.0605% 29.0279 -86.0352);--wp-color-blue-900:lab(26.1542% 15.7545 -51.5504);--wp-color-purple-100:lab(93.3333% 6.97437 -9.83434);--wp-color-purple-400:lab(63.6946% 47.6127 -59.2066);--wp-color-purple-600:lab(43.0295% 75.21 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 .0000119209);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% -.0000298023 .0000119209);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% 0 0);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 -.00000596046);--wp-color-neutral-900:lab(7.78201% -.0000149012 0)}}[data-v-e843f7cf]:root,[data-v-e843f7cf]:host{--wp-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--wp-color-red-500:#fb2c36;--wp-color-amber-100:#fef3c6;--wp-color-amber-400:#fcbb00;--wp-color-amber-500:#f99c00;--wp-color-amber-600:#dd7400;--wp-color-amber-900:#7b3306;--wp-color-green-500:#00c758;--wp-color-emerald-100:#d0fae5;--wp-color-emerald-400:#00d294;--wp-color-emerald-600:#009767;--wp-color-emerald-900:#004e3b;--wp-color-blue-100:#dbeafe;--wp-color-blue-400:#54a2ff;--wp-color-blue-500:#3080ff;--wp-color-blue-600:#155dfc;--wp-color-blue-900:#1c398e;--wp-color-purple-100:#f3e8ff;--wp-color-purple-400:#c07eff;--wp-color-purple-600:#9810fa;--wp-color-purple-900:#59168b;--wp-color-neutral-100:#f5f5f5;--wp-color-neutral-200:#e5e5e5;--wp-color-neutral-400:#a1a1a1;--wp-color-neutral-500:#737373;--wp-color-neutral-600:#525252;--wp-color-neutral-700:#404040;--wp-color-neutral-800:#262626;--wp-color-neutral-900:#171717;--wp-color-black:#000;--wp-color-white:#fff;--wp-spacing:.25rem;--wp-breakpoint-2xl:96rem;--wp-container-sm:24rem;--wp-container-md:28rem;--wp-container-lg:32rem;--wp-text-xs:.75rem;--wp-text-xs--line-height:calc(1 / .75);--wp-text-sm:.875rem;--wp-text-sm--line-height:calc(1.25 / .875);--wp-text-base:1rem;--wp-text-base--line-height:calc(1.5 / 1);--wp-text-lg:1.125rem;--wp-text-lg--line-height:calc(1.75 / 1.125);--wp-text-3xl:1.875rem;--wp-text-3xl--line-height:calc(2.25 / 1.875);--wp-font-weight-light:300;--wp-font-weight-medium:500;--wp-font-weight-semibold:600;--wp-font-weight-bold:700;--wp-tracking-wider:.05em;--wp-tracking-widest:.1em;--wp-radius-xs:.125rem;--wp-radius-2xl:1rem;--wp-ease-in-out:cubic-bezier(.4, 0, .2, 1);--wp-animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--wp-aspect-video:16 / 9;--wp-default-transition-duration:.15s;--wp-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--wp-default-font-family:"Montserrat", sans-serif;--wp-default-mono-font-family:var(--wp-font-mono)}@supports (color:color(display-p3 0 0 0)){[data-v-e843f7cf]:root,[data-v-e843f7cf]:host{--wp-color-red-500:color(display-p3 .903738 .262579 .253307);--wp-color-amber-100:color(display-p3 .989391 .954583 .796328);--wp-color-amber-400:color(display-p3 .959186 .738519 .118268);--wp-color-amber-500:color(display-p3 .93994 .620584 .0585367);--wp-color-amber-600:color(display-p3 .827144 .467166 .0336006);--wp-color-amber-900:color(display-p3 .445958 .216422 .0823321);--wp-color-green-500:color(display-p3 .308734 .774754 .374307);--wp-color-emerald-100:color(display-p3 .848335 .975974 .901691);--wp-color-emerald-400:color(display-p3 .334701 .819603 .591575);--wp-color-emerald-600:color(display-p3 .206557 .589057 .413962);--wp-color-emerald-900:color(display-p3 .117821 .302975 .234501);--wp-color-blue-100:color(display-p3 .869214 .915931 .989622);--wp-color-blue-400:color(display-p3 .397443 .62813 .992116);--wp-color-blue-500:color(display-p3 .266422 .491219 .988624);--wp-color-blue-600:color(display-p3 .174493 .358974 .950247);--wp-color-blue-900:color(display-p3 .136395 .219428 .537145);--wp-color-purple-100:color(display-p3 .945034 .910569 .992972);--wp-color-purple-400:color(display-p3 .719919 .492497 .995173);--wp-color-purple-600:color(display-p3 .546729 .130167 .94439);--wp-color-purple-900:color(display-p3 .321698 .107597 .524563);--wp-color-neutral-100:color(display-p3 .960587 .960587 .960587);--wp-color-neutral-200:color(display-p3 .898161 .898161 .898161);--wp-color-neutral-400:color(display-p3 .630163 .630163 .630163);--wp-color-neutral-500:color(display-p3 .451519 .451519 .451519);--wp-color-neutral-600:color(display-p3 .321993 .321993 .321993);--wp-color-neutral-700:color(display-p3 .250471 .250471 .250471);--wp-color-neutral-800:color(display-p3 .149382 .149382 .149382);--wp-color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){[data-v-e843f7cf]:root,[data-v-e843f7cf]:host{--wp-color-red-500:lab(55.4814% 75.0732 48.8528);--wp-color-amber-100:lab(95.916% -1.21653 23.111);--wp-color-amber-400:lab(80.1641% 16.6016 99.2089);--wp-color-amber-500:lab(72.7183% 31.8672 97.9407);--wp-color-amber-600:lab(60.3514% 40.5624 87.1228);--wp-color-amber-900:lab(31.2288% 30.2627 40.0378);--wp-color-green-500:lab(70.5521% -66.5147 45.8073);--wp-color-emerald-100:lab(94.9004% -17.0769 5.63836);--wp-color-emerald-400:lab(75.0771% -60.7313 19.4147);--wp-color-emerald-600:lab(55.0481% -49.9246 15.93);--wp-color-emerald-900:lab(28.8637% -26.9249 5.45986);--wp-color-blue-100:lab(92.0301% -2.24757 -11.6453);--wp-color-blue-400:lab(65.0361% -1.42065 -56.9802);--wp-color-blue-500:lab(54.1736% 13.3369 -74.6839);--wp-color-blue-600:lab(44.0605% 29.0279 -86.0352);--wp-color-blue-900:lab(26.1542% 15.7545 -51.5504);--wp-color-purple-100:lab(93.3333% 6.97437 -9.83434);--wp-color-purple-400:lab(63.6946% 47.6127 -59.2066);--wp-color-purple-600:lab(43.0295% 75.21 -86.5669);--wp-color-purple-900:lab(24.9401% 45.2703 -51.2728);--wp-color-neutral-100:lab(96.52% -.0000298023 .0000119209);--wp-color-neutral-200:lab(90.952% 0 -.0000119209);--wp-color-neutral-400:lab(66.128% -.0000298023 .0000119209);--wp-color-neutral-500:lab(48.496% 0 0);--wp-color-neutral-600:lab(34.924% 0 0);--wp-color-neutral-700:lab(27.036% 0 0);--wp-color-neutral-800:lab(15.204% 0 -.00000596046);--wp-color-neutral-900:lab(7.78201% -.0000149012 0)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--wp-default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--wp-default-font-feature-settings,normal);font-variation-settings:var(--wp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--wp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--wp-default-mono-font-feature-settings,normal);font-variation-settings:var(--wp-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);color:var(--foreground)}[data-v-e843f7cf],[data-v-e843f7cf]:after,[data-v-e843f7cf]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-e843f7cf]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-e843f7cf]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-e843f7cf]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-e843f7cf],[data-v-e843f7cf]:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--wp-default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--wp-default-font-feature-settings,normal);font-variation-settings:var(--wp-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr[data-v-e843f7cf]{height:0;color:inherit;border-top-width:1px}abbr[data-v-e843f7cf]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-e843f7cf],h2[data-v-e843f7cf],h3[data-v-e843f7cf],h4[data-v-e843f7cf],h5[data-v-e843f7cf],h6[data-v-e843f7cf]{font-size:inherit;font-weight:inherit}a[data-v-e843f7cf]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-e843f7cf],strong[data-v-e843f7cf]{font-weight:bolder}code[data-v-e843f7cf],kbd[data-v-e843f7cf],samp[data-v-e843f7cf],pre[data-v-e843f7cf]{font-family:var(--wp-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--wp-default-mono-font-feature-settings,normal);font-variation-settings:var(--wp-default-mono-font-variation-settings,normal);font-size:1em}small[data-v-e843f7cf]{font-size:80%}sub[data-v-e843f7cf],sup[data-v-e843f7cf]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-e843f7cf]{bottom:-.25em}sup[data-v-e843f7cf]{top:-.5em}table[data-v-e843f7cf]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-e843f7cf]:-moz-focusring{outline:auto}progress[data-v-e843f7cf]{vertical-align:baseline}summary[data-v-e843f7cf]{display:list-item}ol[data-v-e843f7cf],ul[data-v-e843f7cf],menu[data-v-e843f7cf]{list-style:none}img[data-v-e843f7cf],svg[data-v-e843f7cf],video[data-v-e843f7cf],canvas[data-v-e843f7cf],audio[data-v-e843f7cf],iframe[data-v-e843f7cf],embed[data-v-e843f7cf],object[data-v-e843f7cf]{vertical-align:middle;display:block}img[data-v-e843f7cf],video[data-v-e843f7cf]{max-width:100%;height:auto}button[data-v-e843f7cf],input[data-v-e843f7cf],select[data-v-e843f7cf],optgroup[data-v-e843f7cf],textarea[data-v-e843f7cf]{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}[data-v-e843f7cf]::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}[data-v-e843f7cf]::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup[data-v-e843f7cf]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-e843f7cf]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-e843f7cf]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-e843f7cf]{padding-inline-start:20px}[data-v-e843f7cf]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-e843f7cf]::file-selector-button{margin-inline-end:4px}[data-v-e843f7cf]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-e843f7cf]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-e843f7cf]::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea[data-v-e843f7cf]{resize:vertical}[data-v-e843f7cf]::-webkit-search-decoration{-webkit-appearance:none}[data-v-e843f7cf]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-e843f7cf]::-webkit-datetime-edit{display:inline-flex}[data-v-e843f7cf]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-e843f7cf]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-e843f7cf]::-webkit-calendar-picker-indicator{line-height:1}[data-v-e843f7cf]:-moz-ui-invalid{box-shadow:none}button[data-v-e843f7cf]{-webkit-appearance:button;appearance:button}input[data-v-e843f7cf]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-e843f7cf]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-e843f7cf]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-e843f7cf]::-webkit-inner-spin-button{height:auto}[data-v-e843f7cf]::-webkit-outer-spin-button{height:auto}[hidden][data-v-e843f7cf]:where(:not([hidden=until-found])){display:none!important}[data-v-e843f7cf]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-e843f7cf]{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body[data-v-e843f7cf]{background-color:var(--background);color:var(--foreground)}}@layer utilities{.wp\\:\\@container\\/card-header{container:card-header/inline-size}.wp\\:pointer-events-none{pointer-events:none}.wp\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wp\\:absolute{position:absolute}.wp\\:fixed{position:fixed}.wp\\:relative{position:relative}.wp\\:sticky{position:sticky}.wp\\:inset-0{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2{top:50%}.wp\\:top-2\\.5{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\]{top:50%}.wp\\:top-full{top:100%}.wp\\:right-0{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full{bottom:100%}.wp\\:left-0{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\]{left:50%}.wp\\:z-10{z-index:10}.wp\\:z-40{z-index:40}.wp\\:z-50{z-index:50}.wp\\:order-first{order:-9999}.wp\\:col-start-2{grid-column-start:2}.wp\\:row-span-2{grid-row:span 2/span 2}.wp\\:row-start-1{grid-row-start:1}.wp\\:container{width:100%}@media (min-width:40rem){.wp\\:container{max-width:40rem}}@media (min-width:48rem){.wp\\:container{max-width:48rem}}@media (min-width:64rem){.wp\\:container{max-width:64rem}}@media (min-width:80rem){.wp\\:container{max-width:80rem}}@media (min-width:96rem){.wp\\:container{max-width:96rem}}.wp\\:-mx-1{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto{margin-right:auto}.wp\\:mb-1{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto{margin-left:auto}.wp\\:block{display:block}.wp\\:flex{display:flex}.wp\\:grid{display:grid}.wp\\:hidden{display:none}.wp\\:inline-flex{display:inline-flex}.wp\\:aspect-square{aspect-ratio:1}.wp\\:aspect-video{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full{width:100%;height:100%}.wp\\:h-2\\.5{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\]{height:15px}.wp\\:h-\\[16px\\]{height:16px}.wp\\:h-\\[60vh\\]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\]{height:var(--reka-select-trigger-height)}.wp\\:h-full{height:100%}.wp\\:h-px{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\){max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\){max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\]{max-height:300px}.wp\\:min-h-10{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen{min-height:100vh}.wp\\:\\!w-full{width:100%!important}.wp\\:w-2\\.5{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\]{width:15px}.wp\\:w-\\[16px\\]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\]{width:min(92vw,330px)}.wp\\:w-auto{width:auto}.wp\\:w-fit{width:-moz-fit-content;width:fit-content}.wp\\:w-full{width:100%}.wp\\:max-w-80{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg{max-width:var(--wp-container-lg)}.wp\\:max-w-md{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1{flex:1}.wp\\:shrink-0{flex-shrink:0}.wp\\:grow{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\){transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\){transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-0\\.5{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45{rotate:45deg}.wp\\:animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:animate-pulse{animation:var(--wp-animate-pulse)}.wp\\:cursor-default{cursor:default}.wp\\:cursor-move{cursor:move}.wp\\:cursor-pointer{cursor:pointer}.wp\\:touch-none{touch-action:none}.wp\\:scroll-my-1{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min{grid-auto-rows:min-content}.wp\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.wp\\:flex-col{flex-direction:column}.wp\\:flex-col-reverse{flex-direction:column-reverse}.wp\\:place-items-center{place-items:center}.wp\\:items-center{align-items:center}.wp\\:items-end{align-items:flex-end}.wp\\:items-start{align-items:flex-start}.wp\\:justify-between{justify-content:space-between}.wp\\:justify-center{justify-content:center}.wp\\:gap-0{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-0\\.5{gap:calc(var(--wp-spacing) * .5)}.wp\\:gap-1{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.wp\\:gap-x-6{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start{align-self:flex-start}.wp\\:justify-self-end{justify-self:flex-end}.wp\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto{overflow:auto}.wp\\:overflow-hidden{overflow:hidden}.wp\\:overflow-x-hidden{overflow-x:hidden}.wp\\:overflow-y-auto{overflow-y:auto}.wp\\:rounded{border-radius:.25rem}.wp\\:rounded-2xl{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\]{border-radius:2px}.wp\\:rounded-\\[inherit\\]{border-radius:inherit}.wp\\:rounded-full{border-radius:3.40282e38px}.wp\\:rounded-lg{border-radius:var(--radius)}.wp\\:rounded-md{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs{border-radius:var(--wp-radius-xs)}.wp\\:border{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500{border-color:var(--wp-color-blue-500)}.wp\\:border-border{border-color:var(--border)}.wp\\:border-destructive{border-color:var(--destructive)}.wp\\:border-input{border-color:var(--input)}.wp\\:border-primary{border-color:var(--primary)}.wp\\:border-white\\/20{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent{border-top-color:#0000}.wp\\:border-l-transparent{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100{background-color:var(--wp-color-amber-100)}.wp\\:bg-background,.wp\\:bg-background\\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black,.wp\\:bg-black\\/80{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100{background-color:var(--wp-color-blue-100)}.wp\\:bg-border{background-color:var(--border)}.wp\\:bg-card{background-color:var(--card)}.wp\\:bg-destructive{background-color:var(--destructive)}.wp\\:bg-emerald-100{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground{background-color:var(--foreground)}.wp\\:bg-muted{background-color:var(--muted)}.wp\\:bg-neutral-100{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover{background-color:var(--popover)}.wp\\:bg-primary,.wp\\:bg-primary\\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary{background-color:var(--secondary)}.wp\\:bg-status-available{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent{background-color:#0000}.wp\\:bg-white,.wp\\:bg-white\\/70{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80{--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))}.wp\\:from-destructive\\/60{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60{--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))}.wp\\:to-\\[color\\:var\\(--p-primary-color\\)\\]\\/100{--tw-gradient-to:var(--p-primary-color);--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))}.wp\\:to-destructive\\/90{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.wp\\:fill-current{fill:currentColor}.wp\\:fill-foreground{fill:var(--foreground)}.wp\\:object-contain{object-fit:contain}.wp\\:object-cover{object-fit:cover}.wp\\:p-0{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px{padding:1px}.wp\\:px-1{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center{text-align:center}.wp\\:text-left{text-align:left}.wp\\:font-mono{font-family:var(--wp-font-mono)}.wp\\:font-sans{font-family:Montserrat,sans-serif}.wp\\:text-3xl{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\]{font-size:10px}.wp\\:text-\\[11px\\]{font-size:11px}.wp\\:leading-none{--tw-leading:1;line-height:1}.wp\\:font-bold{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance{text-wrap:balance}.wp\\:whitespace-nowrap{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\]{color:var(--primary)}.wp\\:text-amber-500{color:var(--wp-color-amber-500)}.wp\\:text-amber-600{color:var(--wp-color-amber-600)}.wp\\:text-background{color:var(--background)}.wp\\:text-black{color:var(--wp-color-black)}.wp\\:text-blue-500{color:var(--wp-color-blue-500)}.wp\\:text-blue-600{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground{color:var(--card-foreground)}.wp\\:text-destructive{color:var(--destructive)}.wp\\:text-emerald-600{color:var(--wp-color-emerald-600)}.wp\\:text-foreground{color:var(--foreground)}.wp\\:text-green-500{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground{color:var(--muted-foreground)}.wp\\:text-neutral-400{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground{color:var(--popover-foreground)}.wp\\:text-primary{color:var(--primary)}.wp\\:text-primary-foreground{color:var(--primary-foreground)}.wp\\:text-purple-600{color:var(--wp-color-purple-600)}.wp\\:text-red-500{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground{color:var(--secondary-foreground)}.wp\\:text-status-available{color:var(--status-available)}.wp\\:text-status-disconnected{color:var(--status-disconnected)}.wp\\:text-status-hold{color:var(--status-hold)}.wp\\:text-status-incall{color:var(--status-incall)}.wp\\:text-status-incoming{color:var(--status-incoming)}.wp\\:text-white{color:var(--wp-color-white)}.wp\\:capitalize{text-transform:capitalize}.wp\\:underline-offset-4{text-underline-offset:4px}.wp\\:opacity-0{opacity:0}.wp\\:opacity-50{opacity:.5}.wp\\:opacity-70{opacity:.7}.wp\\:opacity-100{opacity:1}.wp\\: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)}.wp\\: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)}.wp\\: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)}.wp\\: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)}.wp\\:inset-shadow-2xs{--tw-inset-shadow:inset 0 1px var(--tw-inset-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)}.wp\\:ring-ring\\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden{outline-offset:2px;outline:2px solid #0000}}.wp\\: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,)}.wp\\:backdrop-blur-\\[1px\\]{--tw-backdrop-blur:blur(1px);-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,)}.wp\\:transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\: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(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:duration-150{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0{--tw-enter-opacity:0}.wp\\:outline-none{--tw-outline-style:none;outline-style:none}.wp\\:select-none{-webkit-user-select:none;user-select:none}.wp\\:select-text{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary ::selection,.wp\\:selection\\:bg-primary::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground ::selection,.wp\\:selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex::file-selector-button{display:inline-flex}.wp\\:file\\:h-7::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm::-webkit-file-upload-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:text-sm::file-selector-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:font-medium::-webkit-file-upload-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:font-medium::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent:hover,.wp\\:hover\\:bg-accent\\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary:hover,.wp\\:hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 75%, transparent)}}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75:hover{--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))}.wp\\:hover\\:from-destructive\\/70:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70:hover{--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))}.wp\\:hover\\:to-\\[color\\:var\\(--p-primary-color\\)\\]:hover{--tw-gradient-to:var(--p-primary-color);--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))}.wp\\:hover\\:to-destructive\\/95:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95:hover{--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))}.wp\\:hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive:hover{color:var(--destructive)}.wp\\:hover\\:text-muted-foreground:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected:hover,.wp\\:hover\\:text-status-disconnected\\/80:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80:hover{opacity:.8}.wp\\:hover\\:opacity-100:hover{opacity:1}.wp\\:hover\\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + 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)}}.wp\\:focus\\:z-10:focus{z-index:10}.wp\\:focus\\:bg-accent:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus\\:ring-ring:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.wp\\: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)}.wp\\:focus-visible\\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + 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)}.wp\\: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)}.wp\\:focus-visible\\:ring-\\[var\\(--p-primary-color\\)\\]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\: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)}.wp\\:focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\: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)}.wp\\:disabled\\:pointer-events-none:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\: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(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:data-\\[spacing\\=0\\]\\:first\\:rounded-l-md[data-spacing="0"]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[spacing\\=0\\]\\:last\\:rounded-r-md[data-spacing="0"]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline]:focus-visible{--tw-ring-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border[data-spacing="0"][data-variant=outline]{border-style:var(--tw-border-style);border-width:1px}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-spacing="0"][data-variant=outline]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline]{--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)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.wp\\:supports-backdrop-filter\\:bg-background\\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block{display:block}.wp\\:sm\\:inline{display:inline}.wp\\:sm\\:inline-block{display:inline-block}.wp\\:sm\\:max-w-lg{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row{flex-direction:row}.wp\\:sm\\:justify-end{justify-content:flex-end}.wp\\:sm\\:gap-0{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg{border-radius:var(--radius)}.wp\\:sm\\:text-left{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full{width:100%}.wp\\:md\\:text-sm{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-emerald-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-neutral-900\\/70:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:var(--wp-color-purple-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-800)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-neutral-800\\/80:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--wp-color-neutral-800) 80%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-900:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:focus-visible\\:ring-offset-neutral-900:where(.dark,.dark *):focus-visible{--tw-ring-offset-color:var(--wp-color-neutral-900)}.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-3 svg:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-4 svg:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'text-\\\\\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:\\[\\&\\:not\\(\\:first-child\\)\\]\\:border-l-0[data-spacing="0"][data-variant=outline]:not(:first-child){border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10:where(.dark,.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10:where(.dark,.dark *){background-color:color-mix(in oklab, var(--background) 10%, transparent)}}.wp\\:\\@container\\/card-header[data-v-e843f7cf]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-e843f7cf]{pointer-events:none}.wp\\:sr-only[data-v-e843f7cf]{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.wp\\:absolute[data-v-e843f7cf]{position:absolute}.wp\\:fixed[data-v-e843f7cf]{position:fixed}.wp\\:relative[data-v-e843f7cf]{position:relative}.wp\\:sticky[data-v-e843f7cf]{position:sticky}.wp\\:inset-0[data-v-e843f7cf]{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0[data-v-e843f7cf]{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0[data-v-e843f7cf]{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2[data-v-e843f7cf]{top:50%}.wp\\:top-2\\.5[data-v-e843f7cf]{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4[data-v-e843f7cf]{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\][data-v-e843f7cf]{top:50%}.wp\\:top-full[data-v-e843f7cf]{top:100%}.wp\\:right-0[data-v-e843f7cf]{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1[data-v-e843f7cf]{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2[data-v-e843f7cf]{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4[data-v-e843f7cf]{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2[data-v-e843f7cf]{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full[data-v-e843f7cf]{bottom:100%}.wp\\:left-0[data-v-e843f7cf]{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5[data-v-e843f7cf]{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2[data-v-e843f7cf]{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\][data-v-e843f7cf]{left:50%}.wp\\:z-10[data-v-e843f7cf]{z-index:10}.wp\\:z-40[data-v-e843f7cf]{z-index:40}.wp\\:z-50[data-v-e843f7cf]{z-index:50}.wp\\:order-first[data-v-e843f7cf]{order:-9999}.wp\\:col-start-2[data-v-e843f7cf]{grid-column-start:2}.wp\\:row-span-2[data-v-e843f7cf]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-e843f7cf]{grid-row-start:1}.wp\\:container[data-v-e843f7cf]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-e843f7cf]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-e843f7cf]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-e843f7cf]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-e843f7cf]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-e843f7cf]{max-width:96rem}}.wp\\:-mx-1[data-v-e843f7cf]{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2[data-v-e843f7cf]{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto[data-v-e843f7cf]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-e843f7cf]{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2[data-v-e843f7cf]{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8[data-v-e843f7cf]{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1[data-v-e843f7cf]{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4[data-v-e843f7cf]{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto[data-v-e843f7cf]{margin-right:auto}.wp\\:mb-1[data-v-e843f7cf]{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2[data-v-e843f7cf]{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4[data-v-e843f7cf]{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5[data-v-e843f7cf]{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto[data-v-e843f7cf]{margin-left:auto}.wp\\:block[data-v-e843f7cf]{display:block}.wp\\:flex[data-v-e843f7cf]{display:flex}.wp\\:grid[data-v-e843f7cf]{display:grid}.wp\\:hidden[data-v-e843f7cf]{display:none}.wp\\:inline-flex[data-v-e843f7cf]{display:inline-flex}.wp\\:aspect-square[data-v-e843f7cf]{aspect-ratio:1}.wp\\:aspect-video[data-v-e843f7cf]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full[data-v-e843f7cf]{width:100%;height:100%}.wp\\:h-2\\.5[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80[data-v-e843f7cf]{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\][data-v-e843f7cf]{height:15px}.wp\\:h-\\[16px\\][data-v-e843f7cf]{height:16px}.wp\\:h-\\[60vh\\][data-v-e843f7cf]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-e843f7cf]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-e843f7cf]{height:100%}.wp\\:h-px[data-v-e843f7cf]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-e843f7cf]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-e843f7cf]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-e843f7cf]{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40[data-v-e843f7cf]{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60[data-v-e843f7cf]{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\][data-v-e843f7cf]{max-height:300px}.wp\\:min-h-10[data-v-e843f7cf]{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-e843f7cf]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-e843f7cf]{min-height:100vh}.wp\\:\\!w-full[data-v-e843f7cf]{width:100%!important}.wp\\:w-2\\.5[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72[data-v-e843f7cf]{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\][data-v-e843f7cf]{width:15px}.wp\\:w-\\[16px\\][data-v-e843f7cf]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\][data-v-e843f7cf]{width:min(92vw,330px)}.wp\\:w-auto[data-v-e843f7cf]{width:auto}.wp\\:w-fit[data-v-e843f7cf]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-e843f7cf]{width:100%}.wp\\:max-w-80[data-v-e843f7cf]{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\][data-v-e843f7cf]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-e843f7cf]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-e843f7cf]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-e843f7cf]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-e843f7cf]{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0[data-v-e843f7cf]{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5[data-v-e843f7cf]{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8[data-v-e843f7cf]{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9[data-v-e843f7cf]{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10[data-v-e843f7cf]{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\][data-v-e843f7cf]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-e843f7cf]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-e843f7cf]{flex:1}.wp\\:shrink-0[data-v-e843f7cf]{flex-shrink:0}.wp\\:grow[data-v-e843f7cf]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-e843f7cf]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-e843f7cf]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-\\[-50\\%\\][data-v-e843f7cf]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-e843f7cf]{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-0\\.5[data-v-e843f7cf]{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-e843f7cf]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-e843f7cf]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45[data-v-e843f7cf]{rotate:45deg}.wp\\:animate-in[data-v-e843f7cf]{animation:enter-e843f7cf var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:animate-pulse[data-v-e843f7cf]{animation:var(--wp-animate-pulse)}.wp\\:cursor-default[data-v-e843f7cf]{cursor:default}.wp\\:cursor-move[data-v-e843f7cf]{cursor:move}.wp\\:cursor-pointer[data-v-e843f7cf]{cursor:pointer}.wp\\:touch-none[data-v-e843f7cf]{touch-action:none}.wp\\:scroll-my-1[data-v-e843f7cf]{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1[data-v-e843f7cf]{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min[data-v-e843f7cf]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-e843f7cf]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-e843f7cf]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-e843f7cf]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-e843f7cf]{flex-direction:column}.wp\\:flex-col-reverse[data-v-e843f7cf]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-e843f7cf]{place-items:center}.wp\\:items-center[data-v-e843f7cf]{align-items:center}.wp\\:items-end[data-v-e843f7cf]{align-items:flex-end}.wp\\:items-start[data-v-e843f7cf]{align-items:flex-start}.wp\\:justify-between[data-v-e843f7cf]{justify-content:space-between}.wp\\:justify-center[data-v-e843f7cf]{justify-content:center}.wp\\:gap-0[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-0\\.5[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * .5)}.wp\\:gap-1[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-e843f7cf]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2[data-v-e843f7cf]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-4[data-v-e843f7cf]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.wp\\:space-y-6[data-v-e843f7cf]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--wp-spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--wp-spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.wp\\:gap-x-6[data-v-e843f7cf]{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3[data-v-e843f7cf]{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start[data-v-e843f7cf]{align-self:flex-start}.wp\\:justify-self-end[data-v-e843f7cf]{justify-self:flex-end}.wp\\:truncate[data-v-e843f7cf]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-e843f7cf]{overflow:auto}.wp\\:overflow-hidden[data-v-e843f7cf]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-e843f7cf]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-e843f7cf]{overflow-y:auto}.wp\\:rounded[data-v-e843f7cf]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-e843f7cf]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-e843f7cf]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-e843f7cf]{border-radius:inherit}.wp\\:rounded-full[data-v-e843f7cf]{border-radius:3.40282e38px}.wp\\:rounded-lg[data-v-e843f7cf]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-e843f7cf]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-e843f7cf]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-e843f7cf]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-e843f7cf]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-e843f7cf]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0[data-v-e843f7cf]{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t[data-v-e843f7cf]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-e843f7cf]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-e843f7cf]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500[data-v-e843f7cf]{border-color:var(--wp-color-blue-500)}.wp\\:border-border[data-v-e843f7cf]{border-color:var(--border)}.wp\\:border-destructive[data-v-e843f7cf]{border-color:var(--destructive)}.wp\\:border-input[data-v-e843f7cf]{border-color:var(--input)}.wp\\:border-primary[data-v-e843f7cf]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-e843f7cf]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-e843f7cf]{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent[data-v-e843f7cf]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-e843f7cf]{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-e843f7cf]{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-e843f7cf]{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100[data-v-e843f7cf]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-e843f7cf],.wp\\:bg-background\\/95[data-v-e843f7cf]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black[data-v-e843f7cf],.wp\\:bg-black\\/80[data-v-e843f7cf]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100[data-v-e843f7cf]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-e843f7cf]{background-color:var(--border)}.wp\\:bg-card[data-v-e843f7cf]{background-color:var(--card)}.wp\\:bg-destructive[data-v-e843f7cf]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-e843f7cf]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-e843f7cf]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-e843f7cf]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-e843f7cf]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-e843f7cf]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-e843f7cf]{background-color:var(--popover)}.wp\\:bg-primary[data-v-e843f7cf],.wp\\:bg-primary\\/10[data-v-e843f7cf]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100[data-v-e843f7cf]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-e843f7cf]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-e843f7cf]{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12[data-v-e843f7cf]{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent[data-v-e843f7cf]{background-color:#0000}.wp\\:bg-white[data-v-e843f7cf],.wp\\:bg-white\\/70[data-v-e843f7cf]{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r[data-v-e843f7cf]{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-e843f7cf]{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-e843f7cf]{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-e843f7cf]{--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))}.wp\\:from-destructive\\/60[data-v-e843f7cf]{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60[data-v-e843f7cf]{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60[data-v-e843f7cf]{--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))}.wp\\:to-\\[color\\:var\\(--p-primary-color\\)\\]\\/100[data-v-e843f7cf]{--tw-gradient-to:var(--p-primary-color);--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))}.wp\\:to-destructive\\/90[data-v-e843f7cf]{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90[data-v-e843f7cf]{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90[data-v-e843f7cf]{--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))}.wp\\:fill-current[data-v-e843f7cf]{fill:currentColor}.wp\\:fill-foreground[data-v-e843f7cf]{fill:var(--foreground)}.wp\\:object-contain[data-v-e843f7cf]{object-fit:contain}.wp\\:object-cover[data-v-e843f7cf]{object-fit:cover}.wp\\:p-0[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6[data-v-e843f7cf]{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px[data-v-e843f7cf]{padding:1px}.wp\\:px-1[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14[data-v-e843f7cf]{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8[data-v-e843f7cf]{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0[data-v-e843f7cf]{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2[data-v-e843f7cf]{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4[data-v-e843f7cf]{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8[data-v-e843f7cf]{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0[data-v-e843f7cf]{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4[data-v-e843f7cf]{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2[data-v-e843f7cf]{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8[data-v-e843f7cf]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center[data-v-e843f7cf]{text-align:center}.wp\\:text-left[data-v-e843f7cf]{text-align:left}.wp\\:font-mono[data-v-e843f7cf]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-e843f7cf]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-e843f7cf]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-e843f7cf]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-e843f7cf]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-e843f7cf]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs[data-v-e843f7cf]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-e843f7cf]{font-size:10px}.wp\\:text-\\[11px\\][data-v-e843f7cf]{font-size:11px}.wp\\:leading-none[data-v-e843f7cf]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-e843f7cf]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-e843f7cf]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-e843f7cf]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-e843f7cf]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-e843f7cf]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-e843f7cf]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-e843f7cf]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-e843f7cf]{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\][data-v-e843f7cf]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\][data-v-e843f7cf]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\][data-v-e843f7cf]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\][data-v-e843f7cf]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\][data-v-e843f7cf]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\][data-v-e843f7cf]{color:var(--primary)}.wp\\:text-amber-500[data-v-e843f7cf]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-e843f7cf]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-e843f7cf]{color:var(--background)}.wp\\:text-black[data-v-e843f7cf]{color:var(--wp-color-black)}.wp\\:text-blue-500[data-v-e843f7cf]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-e843f7cf]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-e843f7cf]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-e843f7cf]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-e843f7cf]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-e843f7cf]{color:var(--foreground)}.wp\\:text-green-500[data-v-e843f7cf]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-e843f7cf]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-e843f7cf]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500[data-v-e843f7cf]{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600[data-v-e843f7cf]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-e843f7cf]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-e843f7cf]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-e843f7cf]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-e843f7cf]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-e843f7cf]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-e843f7cf]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-e843f7cf]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-e843f7cf]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-e843f7cf]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-e843f7cf]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-e843f7cf]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-e843f7cf]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-e843f7cf]{color:var(--status-incoming)}.wp\\:text-white[data-v-e843f7cf]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-e843f7cf]{text-transform:capitalize}.wp\\:underline-offset-4[data-v-e843f7cf]{text-underline-offset:4px}.wp\\:opacity-0[data-v-e843f7cf]{opacity:0}.wp\\:opacity-50[data-v-e843f7cf]{opacity:.5}.wp\\:opacity-70[data-v-e843f7cf]{opacity:.7}.wp\\:opacity-100[data-v-e843f7cf]{opacity:1}.wp\\:shadow-lg[data-v-e843f7cf]{--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)}.wp\\:shadow-md[data-v-e843f7cf]{--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)}.wp\\:shadow-sm[data-v-e843f7cf]{--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)}.wp\\:shadow-xs[data-v-e843f7cf]{--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)}.wp\\:inset-shadow-2xs[data-v-e843f7cf]{--tw-inset-shadow:inset 0 1px var(--tw-inset-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)}.wp\\:ring-ring\\/50[data-v-e843f7cf]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-e843f7cf]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background[data-v-e843f7cf]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-e843f7cf]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-e843f7cf]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-e843f7cf]{--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,)}.wp\\:backdrop-blur-\\[1px\\][data-v-e843f7cf]{--tw-backdrop-blur:blur(1px);-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,)}.wp\\:transition-\\[color\\,box-shadow\\][data-v-e843f7cf]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-all[data-v-e843f7cf]{transition-property:all;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-colors[data-v-e843f7cf]{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(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-opacity[data-v-e843f7cf]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:transition-transform[data-v-e843f7cf]{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--wp-default-transition-timing-function));transition-duration:var(--tw-duration,var(--wp-default-transition-duration))}.wp\\:duration-150[data-v-e843f7cf]{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200[data-v-e843f7cf]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-e843f7cf]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-e843f7cf]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-e843f7cf]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-e843f7cf]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-e843f7cf]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-e843f7cf]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-e843f7cf]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-e843f7cf]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-e843f7cf]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-e843f7cf]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-e843f7cf]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-e843f7cf] ::selection,.wp\\:selection\\:bg-primary[data-v-e843f7cf]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-e843f7cf] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-e843f7cf]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-e843f7cf]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-e843f7cf]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-e843f7cf]::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7[data-v-e843f7cf]::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0[data-v-e843f7cf]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-e843f7cf]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-e843f7cf]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-e843f7cf]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-e843f7cf]::-webkit-file-upload-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:text-sm[data-v-e843f7cf]::file-selector-button{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:file\\:font-medium[data-v-e843f7cf]::-webkit-file-upload-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:font-medium[data-v-e843f7cf]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-e843f7cf]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-e843f7cf]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-e843f7cf]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-e843f7cf]:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8[data-v-e843f7cf]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/8[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-e843f7cf]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-e843f7cf]:hover{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent[data-v-e843f7cf]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-e843f7cf]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-e843f7cf]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted[data-v-e843f7cf]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100[data-v-e843f7cf]:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200[data-v-e843f7cf]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/90[data-v-e843f7cf]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary[data-v-e843f7cf]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-e843f7cf]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-e843f7cf]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-e843f7cf]:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent[data-v-e843f7cf]:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-e843f7cf]:hover{--tw-gradient-from:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-e843f7cf]:hover{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 75%, transparent)}}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-e843f7cf]:hover{--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))}.wp\\:hover\\:from-destructive\\/70[data-v-e843f7cf]:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70[data-v-e843f7cf]:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70[data-v-e843f7cf]:hover{--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))}.wp\\:hover\\:to-\\[color\\:var\\(--p-primary-color\\)\\][data-v-e843f7cf]:hover{--tw-gradient-to:var(--p-primary-color);--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))}.wp\\:hover\\:to-destructive\\/95[data-v-e843f7cf]:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95[data-v-e843f7cf]:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95[data-v-e843f7cf]:hover{--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))}.wp\\:hover\\:text-accent-foreground[data-v-e843f7cf]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-e843f7cf]:hover{color:var(--destructive)}.wp\\:hover\\:text-muted-foreground[data-v-e843f7cf]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary[data-v-e843f7cf]:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80[data-v-e843f7cf]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-e843f7cf]:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-e843f7cf]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-e843f7cf]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-e843f7cf]:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80[data-v-e843f7cf]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-e843f7cf]:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80[data-v-e843f7cf]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-e843f7cf]:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80[data-v-e843f7cf]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-e843f7cf]:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline[data-v-e843f7cf]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80[data-v-e843f7cf]:hover{opacity:.8}.wp\\:hover\\:opacity-100[data-v-e843f7cf]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-e843f7cf]:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + 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)}}.wp\\:focus\\:z-10[data-v-e843f7cf]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-e843f7cf]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-e843f7cf]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-e843f7cf]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:focus\\:ring-ring[data-v-e843f7cf]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-e843f7cf]:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.wp\\:focus\\:outline-hidden[data-v-e843f7cf]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-e843f7cf]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-e843f7cf]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-e843f7cf]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2[data-v-e843f7cf]: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)}.wp\\:focus-visible\\:ring-4[data-v-e843f7cf]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + 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)}.wp\\:focus-visible\\:ring-\\[3px\\][data-v-e843f7cf]: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)}.wp\\:focus-visible\\:ring-\\[var\\(--p-primary-color\\)\\][data-v-e843f7cf]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20[data-v-e843f7cf]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-e843f7cf]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-e843f7cf]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-e843f7cf]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2[data-v-e843f7cf]: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)}.wp\\:focus-visible\\:ring-offset-white[data-v-e843f7cf]:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden[data-v-e843f7cf]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-e843f7cf]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-e843f7cf]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-e843f7cf]:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.wp\\:disabled\\:pointer-events-none[data-v-e843f7cf]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-e843f7cf]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-e843f7cf]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-e843f7cf]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-e843f7cf]:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-e843f7cf]:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-e843f7cf]:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-e843f7cf]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-e843f7cf]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-e843f7cf]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-e843f7cf]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-e843f7cf]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-e843f7cf]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-e843f7cf]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-e843f7cf]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-e843f7cf]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-e843f7cf]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-e843f7cf]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-e843f7cf]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-e843f7cf]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-e843f7cf]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-e843f7cf]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-e843f7cf]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-e843f7cf]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-e843f7cf]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-e843f7cf]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-e843f7cf]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-e843f7cf]{--tw-translate-y:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom][data-v-e843f7cf]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-e843f7cf]{--tw-translate-x:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left][data-v-e843f7cf]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-e843f7cf]{--tw-translate-x:calc(var(--wp-spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right][data-v-e843f7cf]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-e843f7cf]{--tw-translate-y:calc(var(--wp-spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top][data-v-e843f7cf]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-e843f7cf]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-e843f7cf]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-e843f7cf]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value][data-v-e843f7cf]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-e843f7cf]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-e843f7cf]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-e843f7cf]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.wp\\:data-\\[spacing\\=0\\]\\:first\\:rounded-l-md[data-spacing="0"][data-v-e843f7cf]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[spacing\\=0\\]\\:last\\:rounded-r-md[data-spacing="0"][data-v-e843f7cf]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.wp\\:data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed][data-v-e843f7cf]{animation:accordion-up-e843f7cf var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:animate-out[data-state=closed][data-v-e843f7cf]{animation:exit-e843f7cf var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed][data-v-e843f7cf]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-e843f7cf]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-e843f7cf]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-e843f7cf]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-e843f7cf]{animation:accordion-down-e843f7cf var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:animate-in[data-state=open][data-v-e843f7cf]{animation:enter-e843f7cf var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.wp\\:data-\\[state\\=open\\]\\:bg-accent[data-state=open][data-v-e843f7cf]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-e843f7cf]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-e843f7cf]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-e843f7cf]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-e843f7cf]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-e843f7cf]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-e843f7cf]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-e843f7cf]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-e843f7cf]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-e843f7cf]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-e843f7cf]:focus-visible{--tw-ring-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border[data-spacing="0"][data-variant=outline][data-v-e843f7cf]{border-style:var(--tw-border-style);border-width:1px}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-spacing="0"][data-variant=outline][data-v-e843f7cf]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-e843f7cf]{--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)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-e843f7cf]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-e843f7cf]{display:block}.wp\\:sm\\:inline[data-v-e843f7cf]{display:inline}.wp\\:sm\\:inline-block[data-v-e843f7cf]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-e843f7cf]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-e843f7cf]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-e843f7cf]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-e843f7cf]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-e843f7cf]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-e843f7cf]{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg[data-v-e843f7cf]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-e843f7cf]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-e843f7cf]{width:100%}.wp\\:md\\:text-sm[data-v-e843f7cf]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-e843f7cf]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-amber-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-amber-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-blue-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-blue-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-emerald-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-emerald-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-neutral-900\\/70[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--wp-color-purple-900)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-purple-900\\/30[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-e843f7cf]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-800)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--wp-color-neutral-800) 80%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-900[data-v-e843f7cf]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100[data-v-e843f7cf]:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-e843f7cf]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-e843f7cf]:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-e843f7cf]:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:focus-visible\\:ring-offset-neutral-900[data-v-e843f7cf]:where(.dark,.dark *):focus-visible{--tw-ring-offset-color:var(--wp-color-neutral-900)}.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true][data-v-e843f7cf]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true][data-v-e843f7cf]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive][data-v-e843f7cf]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive][data-v-e843f7cf]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-e843f7cf]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-e843f7cf]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-e843f7cf]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-e843f7cf]:not([class*=size-]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-3 svg[data-v-e843f7cf]:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-4 svg[data-v-e843f7cf]:not([class*="'size-'"]){width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'text-\\\\\\'\\]\\)\\]\\:text-muted-foreground svg[data-v-e843f7cf]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-e843f7cf]{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-e843f7cf]{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-e843f7cf]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-e843f7cf]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-e843f7cf]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-e843f7cf]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-e843f7cf]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-e843f7cf]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-e843f7cf]>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-e843f7cf]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-e843f7cf]>*):is(svg){color:var(--destructive)!important}.wp\\:data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:\\[\\&\\:not\\(\\:first-child\\)\\]\\:border-l-0[data-spacing="0"][data-variant=outline][data-v-e843f7cf]:not(:first-child){border-left-style:var(--tw-border-style);border-left-width:0}.wp\\:\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg[data-v-e843f7cf]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-e843f7cf]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-e843f7cf]{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-e843f7cf]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-e843f7cf]:where(.dark,.dark *){background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-e843f7cf]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--background) 10%, transparent)}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:Ibrand;src:url(/fonts/Ibrand.otf)format("truetype");font-weight:100 900;font-style:normal;font-display:swap}svg [clip-path]{clip-path:none!important}:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--color-primary-500:#9b5ff5;--p-primary-color:var(--color-primary-500);--primary-foreground:#fafafa;--secondary:#f5f5f5;--secondary-foreground:#171717;--muted:#f5f5f5;--muted-foreground:#737373;--accent:#f5f5f5;--accent-foreground:#171717;--destructive:#e40014;--border:#e5e5e5;--input:#e5e5e5;--ring:#a1a1a1;--chart-1:#f05100;--chart-2:#009588;--chart-3:#104e64;--chart-4:#fcbb00;--chart-5:#f99c00;--sidebar:#fafafa;--sidebar-foreground:#0a0a0a;--sidebar-primary:#171717;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f5f5f5;--sidebar-accent-foreground:#171717;--sidebar-border:#e5e5e5;--sidebar-ring:#a1a1a1;--status-available:#00a544;--status-incall:#7a75b5;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;--color-green:#81c200;--color-red:#ed3237;--color-blue:#7a75b5;--color-settings:#b3acd5;--color-avaible:#00c448;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .474968 .45946 .692102);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307);--color-green:color(display-p3 .562304 .754036 .228809);--color-red:color(display-p3 .855599 .269309 .251664);--color-blue:color(display-p3 .474968 .45946 .692102);--color-settings:color(display-p3 .697185 .675441 .822883);--color-avaible:color(display-p3 .345782 .7571 .347428)}}@supports (color:lab(0% 0 0)){:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% 0 0);--secondary:lab(96.52% -.0000298023 .0000119209);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 .0000119209);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 .0000119209);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% -.0000298023 .0000119209);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8672 97.9407);--sidebar:lab(98.26% 0 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(96.52% -.0000298023 .0000119209);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% -.0000298023 .0000119209);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(51.7014% 13.4467 -33.5273);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528);--color-green:lab(71.931% -38.9071 70.3045);--color-red:lab(53.3473% 69.9469 45.351);--color-blue:lab(51.7014% 13.4467 -33.5273);--color-settings:lab(71.9851% 8.76683 -19.9302);--color-avaible:lab(69.443% -61.9097 48.3881)}}.dark{--background:#0a0a0a;--foreground:#fafafa;--card:#171717;--card-foreground:#fafafa;--popover:#171717;--popover-foreground:#fafafa;--primary:var(--p-primary-color,#e5e5e5);--primary-foreground:#171717;--secondary:#262626;--secondary-foreground:#fafafa;--muted:#262626;--muted-foreground:#a1a1a1;--accent:#262626;--accent-foreground:#fafafa;--destructive:#ff6568;--border:#ffffff1a;--input:#ffffff26;--ring:#737373;--chart-1:#1447e6;--chart-2:#00bb7f;--chart-3:#f99c00;--chart-4:#ac4bff;--chart-5:#ff2357;--sidebar:#171717;--sidebar-foreground:#fafafa;--sidebar-primary:#1447e6;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#262626;--sidebar-accent-foreground:#fafafa;--sidebar-border:#ffffff1a;--sidebar-ring:#737373;--status-available:#41cd6a;--status-incall:#54a2ff;--status-hold:#fccf2c;--status-incoming:#b971ff;--status-disconnected:#ff6568}@supports (color:color(display-p3 0 0 0)){.dark{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark{--background:lab(2.75381% 0 0);--foreground:lab(98.26% 0 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% 0 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% 0 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 -.00000596046);--secondary-foreground:lab(98.26% 0 0);--muted:lab(15.204% 0 -.00000596046);--muted-foreground:lab(66.128% -.0000298023 .0000119209);--accent:lab(15.204% 0 -.00000596046);--accent-foreground:lab(98.26% 0 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8672 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% 0 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(15.204% 0 -.00000596046);--sidebar-accent-foreground:lab(98.26% 0 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.10837 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}.ibrand{font-family:Ibrand,sans-serif}.montserrat{font-family:Montserrat}.quicksand{font-family:Quicksand}.manrope{font-family:Manrope}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-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-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-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}.p-input::placeholder{color:#959595;font-size:12px}@font-face{font-family:Ibrand;src:url(/fonts/Ibrand.otf)format("truetype");font-weight:100 900;font-style:normal;font-display:swap}svg [clip-path][data-v-e843f7cf]{clip-path:none!important}[data-v-e843f7cf]:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--color-primary-500:#9b5ff5;--p-primary-color:var(--color-primary-500);--primary-foreground:#fafafa;--secondary:#f5f5f5;--secondary-foreground:#171717;--muted:#f5f5f5;--muted-foreground:#737373;--accent:#f5f5f5;--accent-foreground:#171717;--destructive:#e40014;--border:#e5e5e5;--input:#e5e5e5;--ring:#a1a1a1;--chart-1:#f05100;--chart-2:#009588;--chart-3:#104e64;--chart-4:#fcbb00;--chart-5:#f99c00;--sidebar:#fafafa;--sidebar-foreground:#0a0a0a;--sidebar-primary:#171717;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f5f5f5;--sidebar-accent-foreground:#171717;--sidebar-border:#e5e5e5;--sidebar-ring:#a1a1a1;--status-available:#00a544;--status-incall:#7a75b5;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;--color-green:#81c200;--color-red:#ed3237;--color-blue:#7a75b5;--color-settings:#b3acd5;--color-avaible:#00c448;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){[data-v-e843f7cf]:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .474968 .45946 .692102);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307);--color-green:color(display-p3 .562304 .754036 .228809);--color-red:color(display-p3 .855599 .269309 .251664);--color-blue:color(display-p3 .474968 .45946 .692102);--color-settings:color(display-p3 .697185 .675441 .822883);--color-avaible:color(display-p3 .345782 .7571 .347428)}}@supports (color:lab(0% 0 0)){[data-v-e843f7cf]:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% 0 0);--secondary:lab(96.52% -.0000298023 .0000119209);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 .0000119209);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 .0000119209);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% -.0000298023 .0000119209);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8672 97.9407);--sidebar:lab(98.26% 0 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(96.52% -.0000298023 .0000119209);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% -.0000298023 .0000119209);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(51.7014% 13.4467 -33.5273);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528);--color-green:lab(71.931% -38.9071 70.3045);--color-red:lab(53.3473% 69.9469 45.351);--color-blue:lab(51.7014% 13.4467 -33.5273);--color-settings:lab(71.9851% 8.76683 -19.9302);--color-avaible:lab(69.443% -61.9097 48.3881)}}.dark[data-v-e843f7cf]{--background:#0a0a0a;--foreground:#fafafa;--card:#171717;--card-foreground:#fafafa;--popover:#171717;--popover-foreground:#fafafa;--primary:var(--p-primary-color,#e5e5e5);--primary-foreground:#171717;--secondary:#262626;--secondary-foreground:#fafafa;--muted:#262626;--muted-foreground:#a1a1a1;--accent:#262626;--accent-foreground:#fafafa;--destructive:#ff6568;--border:#ffffff1a;--input:#ffffff26;--ring:#737373;--chart-1:#1447e6;--chart-2:#00bb7f;--chart-3:#f99c00;--chart-4:#ac4bff;--chart-5:#ff2357;--sidebar:#171717;--sidebar-foreground:#fafafa;--sidebar-primary:#1447e6;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#262626;--sidebar-accent-foreground:#fafafa;--sidebar-border:#ffffff1a;--sidebar-ring:#737373;--status-available:#41cd6a;--status-incall:#54a2ff;--status-hold:#fccf2c;--status-incoming:#b971ff;--status-disconnected:#ff6568}@supports (color:color(display-p3 0 0 0)){.dark[data-v-e843f7cf]{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark[data-v-e843f7cf]{--background:lab(2.75381% 0 0);--foreground:lab(98.26% 0 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% 0 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% 0 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 -.00000596046);--secondary-foreground:lab(98.26% 0 0);--muted:lab(15.204% 0 -.00000596046);--muted-foreground:lab(66.128% -.0000298023 .0000119209);--accent:lab(15.204% 0 -.00000596046);--accent-foreground:lab(98.26% 0 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8672 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% 0 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% 0 0);--sidebar-accent:lab(15.204% 0 -.00000596046);--sidebar-accent-foreground:lab(98.26% 0 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.10837 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}.ibrand[data-v-e843f7cf]{font-family:Ibrand,sans-serif}.montserrat[data-v-e843f7cf]{font-family:Montserrat}.quicksand[data-v-e843f7cf]{font-family:Quicksand}.manrope[data-v-e843f7cf]{font-family:Manrope}@keyframes pulse-e843f7cf{50%{opacity:.5}}@keyframes enter-e843f7cf{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit-e843f7cf{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}@keyframes accordion-down-e843f7cf{0%{height:0}to{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}}@keyframes accordion-up-e843f7cf{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}
2
2
  /*$vite$:1*/`)),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
3
- (function(){var Ac=Object.defineProperty,sg=(e,t)=>{let r={};for(var n in e)Ac(r,n,{get:e[n],enumerable:!0});return t&&Ac(r,Symbol.toStringTag,{value:"Module"}),r};function $s(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ne={},Xn=[],Zt=()=>{},Ic=()=>!1,Ps=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sa=e=>e.startsWith("onUpdate:"),ze=Object.assign,ia=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},ig=Object.prototype.hasOwnProperty,Ue=(e,t)=>ig.call(e,t),me=Array.isArray,Qn=e=>es(e)==="[object Map]",$n=e=>es(e)==="[object Set]",Rc=e=>es(e)==="[object Date]",og=e=>es(e)==="[object RegExp]",Te=e=>typeof e=="function",Xe=e=>typeof e=="string",cr=e=>typeof e=="symbol",Ve=e=>e!==null&&typeof e=="object",oa=e=>(Ve(e)||Te(e))&&Te(e.then)&&Te(e.catch),kc=Object.prototype.toString,es=e=>kc.call(e),ag=e=>es(e).slice(8,-1),xi=e=>es(e)==="[object Object]",Ti=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pn=$s(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ei=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},lg=/-\w/g,dt=Ei(e=>e.replace(lg,t=>t.slice(1).toUpperCase())),cg=/\B([A-Z])/g,Nt=Ei(e=>e.replace(cg,"-$1").toLowerCase()),Ds=Ei(e=>e.charAt(0).toUpperCase()+e.slice(1)),ts=Ei(e=>e?`on${Ds(e)}`:""),$t=(e,t)=>!Object.is(e,t),rs=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},$c=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Ai=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ii=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t},Pc,Ri=()=>Pc||(Pc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ug=$s("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function gt(e){if(me(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=Xe(n)?hg(n):gt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(Xe(e)||Ve(e))return e}var dg=/;(?![^(]*\))/g,fg=/:([^]+)/,pg=/\/\*[^]*?\*\//g;function hg(e){const t={};return e.replace(pg,"").split(dg).forEach(r=>{if(r){const n=r.split(fg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ze(e){let t="";if(Xe(e))t=e;else if(me(e))for(let r=0;r<e.length;r++){const n=Ze(e[r]);n&&(t+=n+" ")}else if(Ve(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function ur(e){if(!e)return null;let{class:t,style:r}=e;return t&&!Xe(t)&&(e.class=Ze(t)),r&&(e.style=gt(r)),e}var Dc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gg=$s(Dc),rx=$s(Dc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Oc(e){return!!e||e===""}function vg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Pr(e[n],t[n]);return r}function Pr(e,t){if(e===t)return!0;let r=Rc(e),n=Rc(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=cr(e),n=cr(t),r||n)return e===t;if(r=me(e),n=me(t),r||n)return r&&n?vg(e,t):!1;if(r=Ve(e),n=Ve(t),r||n){if(!r||!n||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e){const i=e.hasOwnProperty(s),o=t.hasOwnProperty(s);if(i&&!o||!i&&o||!Pr(e[s],t[s]))return!1}}return String(e)===String(t)}function ki(e,t){return e.findIndex(r=>Pr(r,t))}var Hc=e=>!!(e&&e.__v_isRef===!0),Oe=e=>Xe(e)?e:e==null?"":me(e)||Ve(e)&&(e.toString===kc||!Te(e.toString))?Hc(e)?Oe(e.value):JSON.stringify(e,Mc,2):String(e),Mc=(e,t)=>Hc(t)?Mc(e,t.value):Qn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[aa(n,i)+" =>"]=s,r),{})}:$n(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>aa(r))}:cr(t)?aa(t):Ve(t)&&!me(t)&&!xi(t)?String(t):t,aa=(e,t="")=>{var r;return cr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function mg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var xt,la=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=xt,!e&&xt&&(this.index=(xt.scopes||(xt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=xt;try{return xt=this,e()}finally{xt=t}}}on(){++this._on===1&&(this.prevScope=xt,xt=this)}off(){this._on>0&&--this._on===0&&(xt=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,r;for(t=0,r=this.effects.length;t<r;t++)this.effects[t].stop();for(this.effects.length=0,t=0,r=this.cleanups.length;t<r;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function ca(e){return new la(e)}function $i(){return xt}function ua(e,t=!1){xt&&xt.cleanups.push(e)}var Qe,da=new WeakSet,Os=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,xt&&xt.active&&xt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,da.has(this)&&(da.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||qc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,jc(this),Bc(this);const e=Qe,t=dr;Qe=this,dr=!0;try{return this.fn()}finally{Lc(this),Qe=e,dr=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ga(e);this.deps=this.depsTail=void 0,jc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?da.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ha(this)&&this.run()}get dirty(){return ha(this)}},Nc=0,Hs,Ms;function qc(e,t=!1){if(e.flags|=8,t){e.next=Ms,Ms=e;return}e.next=Hs,Hs=e}function fa(){Nc++}function pa(){if(--Nc>0)return;if(Ms){let t=Ms;for(Ms=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Hs;){let t=Hs;for(Hs=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function Bc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ga(n),wg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function ha(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Fc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ns)||(e.globalVersion=Ns,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ha(e))))return;e.flags|=2;const t=e.dep,r=Qe,n=dr;Qe=e,dr=!0;try{Bc(e);const s=e.fn(e._value);(t.version===0||$t(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Qe=r,dr=n,Lc(e),e.flags&=-3}}function ga(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)ga(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function wg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function yg(e,t){e.effect instanceof Os&&(e=e.effect.fn);const r=new Os(e);t&&ze(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function bg(e){e.effect.stop()}var dr=!0,Vc=[];function Dr(){Vc.push(dr),dr=!1}function Or(){const e=Vc.pop();dr=e===void 0?!0:e}function jc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=Qe;Qe=void 0;try{t()}finally{Qe=r}}}var Ns=0,_g=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Pi=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Qe||!dr||Qe===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Qe)t=this.activeLink=new _g(Qe,this),Qe.deps?(t.prevDep=Qe.depsTail,Qe.depsTail.nextDep=t,Qe.depsTail=t):Qe.deps=Qe.depsTail=t,Uc(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=Qe.depsTail,t.nextDep=void 0,Qe.depsTail.nextDep=t,Qe.depsTail=t,Qe.deps===t&&(Qe.deps=r)}return t}trigger(e){this.version++,Ns++,this.notify(e)}notify(e){fa();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{pa()}}};function Uc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Uc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Di=new WeakMap,Dn=Symbol(""),va=Symbol(""),qs=Symbol("");function Tt(e,t,r){if(dr&&Qe){let n=Di.get(e);n||Di.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Pi),s.map=n,s.key=r),s.track()}}function Hr(e,t,r,n,s,i){const o=Di.get(e);if(!o){Ns++;return}const a=l=>{l&&l.trigger()};if(fa(),t==="clear")o.forEach(a);else{const l=me(e),u=l&&Ti(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===qs||!cr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(qs)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Dn)),Qn(e)&&a(o.get(va)));break;case"delete":l||(a(o.get(Dn)),Qn(e)&&a(o.get(va)));break;case"set":Qn(e)&&a(o.get(Dn));break}}pa()}function Sg(e,t){const r=Di.get(e);return r&&r.get(t)}function ns(e){const t=qe(e);return t===e?t:(Tt(t,"iterate",qs),qt(e)?t:t.map(fr))}function Oi(e){return Tt(e=qe(e),"iterate",qs),e}function sn(e,t){return _r(e)?ss(Br(e)?fr(t):t):fr(t)}var Cg={__proto__:null,[Symbol.iterator](){return ma(this,Symbol.iterator,e=>sn(this,e))},concat(...e){return ns(this).concat(...e.map(t=>me(t)?ns(t):t))},entries(){return ma(this,"entries",e=>(e[1]=sn(this,e[1]),e))},every(e,t){return Mr(this,"every",e,t,void 0,arguments)},filter(e,t){return Mr(this,"filter",e,t,r=>r.map(n=>sn(this,n)),arguments)},find(e,t){return Mr(this,"find",e,t,r=>sn(this,r),arguments)},findIndex(e,t){return Mr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Mr(this,"findLast",e,t,r=>sn(this,r),arguments)},findLastIndex(e,t){return Mr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Mr(this,"forEach",e,t,void 0,arguments)},includes(...e){return wa(this,"includes",e)},indexOf(...e){return wa(this,"indexOf",e)},join(e){return ns(this).join(e)},lastIndexOf(...e){return wa(this,"lastIndexOf",e)},map(e,t){return Mr(this,"map",e,t,void 0,arguments)},pop(){return Bs(this,"pop")},push(...e){return Bs(this,"push",e)},reduce(e,...t){return zc(this,"reduce",e,t)},reduceRight(e,...t){return zc(this,"reduceRight",e,t)},shift(){return Bs(this,"shift")},some(e,t){return Mr(this,"some",e,t,void 0,arguments)},splice(...e){return Bs(this,"splice",e)},toReversed(){return ns(this).toReversed()},toSorted(e){return ns(this).toSorted(e)},toSpliced(...e){return ns(this).toSpliced(...e)},unshift(...e){return Bs(this,"unshift",e)},values(){return ma(this,"values",e=>sn(this,e))}};function ma(e,t,r){const n=Oi(e),s=n[t]();return n!==e&&!qt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var xg=Array.prototype;function Mr(e,t,r,n,s,i){const o=Oi(e),a=o!==e&&!qt(e),l=o[t];if(l!==xg[t]){const d=l.apply(e,i);return a?fr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function zc(e,t,r,n){const s=Oi(e);let i=r;return s!==e&&(qt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,sn(e,a),l,e)}),s[t](i,...n)}function wa(e,t,r){const n=qe(e);Tt(n,"iterate",qs);const s=n[t](...r);return(s===-1||s===!1)&&Ls(r[0])?(r[0]=qe(r[0]),n[t](...r)):s}function Bs(e,t,r=[]){Dr(),fa();const n=qe(e)[t].apply(e,r);return pa(),Or(),n}var Tg=$s("__proto__,__v_isRef,__isVue"),Kc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(cr));function Eg(e){cr(e)||(e=String(e));const t=qe(this);return Tt(t,"has",e),t.hasOwnProperty(e)}var Wc=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return r===(n?s?Qc:Xc:s?Zc:Yc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=me(e);if(!n){let a;if(i&&(a=Cg[t]))return a;if(t==="hasOwnProperty")return Eg}const o=Reflect.get(e,t,We(e)?e:r);if((cr(t)?Kc.has(t):Tg(t))||(n||Tt(e,"get",t),s))return o;if(We(o)){const a=i&&Ti(t)?o:o.value;return n&&Ve(a)?Et(a):a}return Ve(o)?n?Et(o):Nr(o):o}},Gc=class extends Wc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=me(e)&&Ti(t);if(!this._isShallow){const l=_r(s);if(!qt(r)&&!_r(r)&&(s=qe(s),r=qe(r)),!i&&We(s)&&!We(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ue(e,t),a=Reflect.set(e,t,r,We(e)?e:n);return e===qe(n)&&(o?$t(r,s)&&Hr(e,"set",t,r,s):Hr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ue(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Hr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!cr(t)||!Kc.has(t))&&Tt(e,"has",t),r}ownKeys(e){return Tt(e,"iterate",me(e)?"length":Dn),Reflect.ownKeys(e)}},Jc=class extends Wc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Ag=new Gc,Ig=new Jc,Rg=new Gc(!0),kg=new Jc(!0),ya=e=>e,Hi=e=>Reflect.getPrototypeOf(e);function $g(e,t,r){return function(...n){const s=this.__v_raw,i=qe(s),o=Qn(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?ya:t?ss:fr;return!t&&Tt(i,"iterate",l?va:Dn),ze(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function Mi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pg(e,t){const r={get(n){const s=this.__v_raw,i=qe(s),o=qe(n);e||($t(n,o)&&Tt(i,"get",n),Tt(i,"get",o));const{has:a}=Hi(i),l=t?ya:e?ss:fr;if(a.call(i,n))return l(s.get(n));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(n)},get size(){const n=this.__v_raw;return!e&&Tt(qe(n),"iterate",Dn),n.size},has(n){const s=this.__v_raw,i=qe(s),o=qe(n);return e||($t(n,o)&&Tt(i,"has",n),Tt(i,"has",o)),n===o?s.has(n):s.has(n)||s.has(o)},forEach(n,s){const i=this,o=i.__v_raw,a=qe(o),l=t?ya:e?ss:fr;return!e&&Tt(a,"iterate",Dn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return ze(r,e?{add:Mi("add"),set:Mi("set"),delete:Mi("delete"),clear:Mi("clear")}:{add(n){!t&&!qt(n)&&!_r(n)&&(n=qe(n));const s=qe(this);return Hi(s).has.call(s,n)||(s.add(n),Hr(s,"add",n,n)),this},set(n,s){!t&&!qt(s)&&!_r(s)&&(s=qe(s));const i=qe(this),{has:o,get:a}=Hi(i);let l=o.call(i,n);l||(n=qe(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?$t(s,u)&&Hr(i,"set",n,s,u):Hr(i,"add",n,s),this},delete(n){const s=qe(this),{has:i,get:o}=Hi(s);let a=i.call(s,n);a||(n=qe(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Hr(s,"delete",n,void 0,l),u},clear(){const n=qe(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Hr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=$g(n,e,t)}),r}function Ni(e,t){const r=Pg(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ue(r,s)&&s in n?r:n,s,i)}var Dg={get:Ni(!1,!1)},Og={get:Ni(!1,!0)},Hg={get:Ni(!0,!1)},Mg={get:Ni(!0,!0)},Yc=new WeakMap,Zc=new WeakMap,Xc=new WeakMap,Qc=new WeakMap;function Ng(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qg(e){return e.__v_skip||!Object.isExtensible(e)?0:Ng(ag(e))}function Nr(e){return _r(e)?e:qi(e,!1,Ag,Dg,Yc)}function eu(e){return qi(e,!1,Rg,Og,Zc)}function Et(e){return qi(e,!0,Ig,Hg,Xc)}function qr(e){return qi(e,!0,kg,Mg,Qc)}function qi(e,t,r,n,s){if(!Ve(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=qg(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function Br(e){return _r(e)?Br(e.__v_raw):!!(e&&e.__v_isReactive)}function _r(e){return!!(e&&e.__v_isReadonly)}function qt(e){return!!(e&&e.__v_isShallow)}function Ls(e){return e?!!e.__v_raw:!1}function qe(e){const t=e&&e.__v_raw;return t?qe(t):e}function ba(e){return!Ue(e,"__v_skip")&&Object.isExtensible(e)&&$c(e,"__v_skip",!0),e}var fr=e=>Ve(e)?Nr(e):e,ss=e=>Ve(e)?Et(e):e;function We(e){return e?e.__v_isRef===!0:!1}function F(e){return tu(e,!1)}function rt(e){return tu(e,!0)}function tu(e,t){return We(e)?e:new Bg(e,t)}var Bg=class{constructor(e,t){this.dep=new Pi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:qe(e),this._value=t?e:fr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||qt(e)||_r(e);e=r?e:qe(e),$t(e,t)&&(this._rawValue=e,this._value=r?e:fr(e),this.dep.trigger())}};function ru(e){e.dep&&e.dep.trigger()}function f(e){return We(e)?e.value:e}function Se(e){return Te(e)?e():f(e)}var Lg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return We(s)&&!We(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function _a(e){return Br(e)?e:new Proxy(e,Lg)}var Fg=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Pi,{get:r,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Fs(e){return new Fg(e)}function At(e){const t=me(e)?new Array(e.length):{};for(const r in e)t[r]=nu(e,r);return t}var Vg=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=qe(e);let n=!0,s=e;if(!me(e)||!Ti(String(t)))do n=!Ls(s)||qt(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=f(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&We(this._raw[this._key])){const t=this._object[this._key];if(We(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Sg(this._raw,this._key)}},jg=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Sa(e,t,r){return We(e)?e:Te(e)?new jg(e):Ve(e)&&arguments.length>1?nu(e,t,r):F(e)}function nu(e,t,r){return new Vg(e,t,r)}var Ug=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Pi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ns-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Qe!==this)return qc(this,!0),!0}get value(){const e=this.dep.track();return Fc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function zg(e,t,r=!1){let n,s;return Te(e)?n=e:(n=e.get,s=e.set),new Ug(n,s,r)}var Kg={GET:"get",HAS:"has",ITERATE:"iterate"},Wg={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Bi={},Li=new WeakMap,on=void 0;function Gg(){return on}function su(e,t=!1,r=on){if(r){let n=Li.get(r);n||Li.set(r,n=[]),n.push(e)}}function Jg(e,t,r=Ne){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=b=>s?b:qt(b)||s===!1||s===0?Lr(b,1):Lr(b);let c,d,p,h,m=!1,w=!1;if(We(e)?(d=()=>e.value,m=qt(e)):Br(e)?(d=()=>u(e),m=!0):me(e)?(w=!0,m=e.some(b=>Br(b)||qt(b)),d=()=>e.map(b=>{if(We(b))return b.value;if(Br(b))return u(b);if(Te(b))return l?l(b,2):b()})):Te(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Dr();try{p()}finally{Or()}}const b=on;on=c;try{return l?l(e,3,[h]):e(h)}finally{on=b}}:d=Zt,t&&s){const b=d,_=s===!0?1/0:s;d=()=>Lr(b(),_)}const x=$i(),v=()=>{c.stop(),x&&x.active&&ia(x.effects,c)};if(i&&t){const b=t;t=(..._)=>{b(..._),v()}}let C=w?new Array(e.length).fill(Bi):Bi;const y=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const _=c.run();if(s||m||(w?_.some((T,P)=>$t(T,C[P])):$t(_,C))){p&&p();const T=on;on=c;try{const P=[_,C===Bi?void 0:w&&C[0]===Bi?[]:C,h];C=_,l?l(t,3,P):t(...P)}finally{on=T}}}else c.run()};return a&&a(y),c=new Os(d),c.scheduler=o?()=>o(y,!1):y,h=b=>su(b,!1,c),p=c.onStop=()=>{const b=Li.get(c);if(b){if(l)l(b,4);else for(const _ of b)_();Li.delete(c)}},t?n?y(!0):C=c.run():o?o(y.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Lr(e,t=1/0,r){if(t<=0||!Ve(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,We(e))Lr(e.value,t,r);else if(me(e))for(let n=0;n<e.length;n++)Lr(e[n],t,r);else if($n(e)||Qn(e))e.forEach(n=>{Lr(n,t,r)});else if(xi(e)){for(const n in e)Lr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Lr(e[n],t,r)}return e}var iu=[];function Yg(e){iu.push(e)}function Zg(){iu.pop()}function Xg(e,t){}var Qg={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ev={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function is(e,t,r,n){try{return n?e(...n):e()}catch(s){On(s,t,r)}}function Xt(e,t,r,n){if(Te(e)){const s=is(e,t,r,n);return s&&oa(s)&&s.catch(i=>{On(i,t,r)}),s}if(me(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Xt(e[i],t,r,n));return s}}function On(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ne;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Dr(),is(i,null,10,[e,l,u]),Or();return}}tv(e,r,s,n,o)}function tv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Pt=[],Sr=-1,os=[],an=null,as=0,ou=Promise.resolve(),Fi=null;function vt(e){const t=Fi||ou;return e?t.then(this?e.bind(this):e):t}function rv(e){let t=Sr+1,r=Pt.length;for(;t<r;){const n=t+r>>>1,s=Pt[n],i=js(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ca(e){if(!(e.flags&1)){const t=js(e),r=Pt[Pt.length-1];!r||!(e.flags&2)&&t>=js(r)?Pt.push(e):Pt.splice(rv(t),0,e),e.flags|=1,au()}}function au(){Fi||(Fi=ou.then(cu))}function Vs(e){me(e)?os.push(...e):an&&e.id===-1?an.splice(as+1,0,e):e.flags&1||(os.push(e),e.flags|=1),au()}function lu(e,t,r=Sr+1){for(;r<Pt.length;r++){const n=Pt[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Pt.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Vi(e){if(os.length){const t=[...new Set(os)].sort((r,n)=>js(r)-js(n));if(os.length=0,an){an.push(...t);return}for(an=t,as=0;as<an.length;as++){const r=an[as];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}an=null,as=0}}var js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function cu(e){try{for(Sr=0;Sr<Pt.length;Sr++){const t=Pt[Sr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),is(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Sr<Pt.length;Sr++){const t=Pt[Sr];t&&(t.flags&=-2)}Sr=-1,Pt.length=0,Vi(e),Fi=null,(Pt.length||os.length)&&cu(e)}}var ls,ji=[];function uu(e,t){var r,n;ls=e,ls?(ls.enabled=!0,ji.forEach(({event:s,args:i})=>ls.emit(s,...i)),ji=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{uu(s,t)}),setTimeout(()=>{ls||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ji=[])},3e3)):ji=[]}var _t=null,Ui=null;function Us(e){const t=_t;return _t=e,Ui=e&&e.type.__scopeId||null,t}function nv(e){Ui=e}function sv(){Ui=null}var iv=e=>R;function R(e,t=_t,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&ni(-1);const i=Us(t);let o;try{o=e(...s)}finally{Us(i),n._d&&ni(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function zi(e,t){if(_t===null)return e;const r=si(_t),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ne]=t[s];i&&(Te(i)&&(i={mounted:i,updated:i}),i.deep&&Lr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Cr(e,t,r,n){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Dr(),Xt(l,r,8,[e.el,a,e,t]),Or())}}function Hn(e,t){if(St){let r=St.provides;const n=St.parent&&St.parent.provides;n===r&&(r=St.provides=Object.create(n)),r[e]=t}}function Dt(e,t,r=!1){const n=ot();if(n||Mn){let s=Mn?Mn._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return r&&Te(t)?t.call(n&&n.proxy):t}}function ov(){return!!(ot()||Mn)}var du=Symbol.for("v-scx"),fu=()=>{{const e=Dt(du);return e}};function tt(e,t){return zs(e,null,t)}function xa(e,t){return zs(e,null,{flush:"post"})}function pu(e,t){return zs(e,null,{flush:"sync"})}function Ie(e,t,r){return zs(e,t,r)}function zs(e,t,r=Ne){const{immediate:n,deep:s,flush:i,once:o}=r,a=ze({},r),l=t&&n||!t&&i!=="post";let u;if(gs){if(i==="sync"){const h=fu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=Zt,h.resume=Zt,h.pause=Zt,h}}const c=St;a.call=(h,m,w)=>Xt(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{lt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ca(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Jg(e,t,a);return gs&&(u?u.push(p):l&&p()),p}function av(e,t,r){const n=this.proxy,s=Xe(e)?e.includes(".")?hu(n,e):()=>n[e]:e.bind(n,n);let i;Te(t)?i=t:(i=t.handler,r=t);const o=Ln(this),a=zs(s,i.bind(n),r);return o(),a}function hu(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}var gu=Symbol("_vte"),vu=e=>e.__isTeleport,Ks=e=>e&&(e.disabled||e.disabled===""),mu=e=>e&&(e.defer||e.defer===""),wu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ta=(e,t)=>{const r=e&&e.to;return Xe(r)?t?t(r):null:r},bu={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,v=Ks(t.props);let{shapeFlag:C,children:y,dynamicChildren:b}=t;if(e==null){const _=t.el=w(""),T=t.anchor=w("");h(_,r,n),h(T,r,n);const P=(M,N)=>{C&16&&c(y,M,N,s,i,o,a,l)},g=()=>{const M=t.target=Ta(t.props,m),N=Aa(M,t,w,h);M&&(o!=="svg"&&wu(M)?o="svg":o!=="mathml"&&yu(M)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(M),v||(P(M,N),Wi(t,!1)))};v&&(P(r,T),Wi(t,!0)),mu(t.props)?(t.el.__isMounted=!1,lt(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(mu(t.props)&&e.el.__isMounted===!1){lt(()=>{bu.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,T=t.target=e.target,P=t.targetAnchor=e.targetAnchor,g=Ks(e.props),M=g?r:T,N=g?_:P;if(o==="svg"||wu(T)?o="svg":(o==="mathml"||yu(T))&&(o="mathml"),b?(p(e.dynamicChildren,b,M,s,i,o,a),Wa(e,t,!0)):l||d(e,t,M,N,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ki(t,r,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const S=t.target=Ta(t.props,m);S&&Ki(t,S,null,u,0)}else g&&Ki(t,T,P,u,1);Wi(t,v)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:p}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!Ks(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:Ki,hydrate:lv};function Ki(e,t,r,{o:{insert:n},m:s},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&n(o,t,r),(!d||Ks(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function lv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,v){let C=v;for(;C;){if(C&&C.nodeType===8){if(C.data==="teleport start anchor")t.targetStart=C;else if(C.data==="teleport anchor"){t.targetAnchor=C,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}C=o(C)}}function h(x,v){v.anchor=d(o(x),v,a(x),r,n,s,i)}const m=t.target=Ta(t.props,l),w=Ks(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||Aa(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||Aa(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),Wi(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Ea=bu;function Wi(e,t){const r=e.ctx;if(r&&r.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function Aa(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[gu]=o,e&&(n(i,e,s),n(o,e,s)),o}var xr=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Ia(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ke(()=>{e.isMounted=!0}),ps(()=>{e.isUnmounting=!0}),e}var Qt=[Function,Array],Ra={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Qt,onEnter:Qt,onAfterEnter:Qt,onEnterCancelled:Qt,onBeforeLeave:Qt,onLeave:Qt,onAfterLeave:Qt,onLeaveCancelled:Qt,onBeforeAppear:Qt,onAppear:Qt,onAfterAppear:Qt,onAppearCancelled:Qt},_u=e=>{const t=e.subTree;return t.component?_u(t.component):t},cv={name:"BaseTransition",props:Ra,setup(e,{slots:t}){const r=ot(),n=Ia();return()=>{const s=t.default&&Gi(t.default(),!0);if(!s||!s.length)return;const i=Su(s),o=qe(e),{mode:a}=o;if(n.isLeaving)return ka(i);const l=Tu(i);if(!l)return ka(i);let u=cs(l,o,n,r,d=>u=d);l.type!==it&&Fr(l,u);let c=r.subTree&&Tu(r.subTree);if(c&&c.type!==it&&!pr(c,l)&&_u(r).type!==it){let d=cs(c,o,n,r);if(Fr(c,d),a==="out-in"&&l.type!==it)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},ka(i);a==="in-out"&&l.type!==it?d.delayLeave=(p,h,m)=>{const w=xu(n,c);w[String(c.key)]=c,p[xr]=()=>{h(),p[xr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function Su(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==it){t=r;break}}return t}var Cu=cv;function xu(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function cs(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:v,onAfterAppear:C,onAppearCancelled:y}=t,b=String(e.key),_=xu(r,e),T=(M,N)=>{M&&Xt(M,n,9,N)},P=(M,N)=>{const S=N[1];T(M,N),me(M)?M.every(E=>E.length<=1)&&S():M.length<=1&&S()},g={mode:o,persisted:a,beforeEnter(M){let N=l;if(!r.isMounted)if(i)N=x||l;else return;M[xr]&&M[xr](!0);const S=_[b];S&&pr(e,S)&&S.el[xr]&&S.el[xr](),T(N,[M])},enter(M){if(_[b]===e)return;let N=u,S=c,E=d;if(!r.isMounted)if(i)N=v||u,S=C||c,E=y||d;else return;let A=!1;M[Ws]=ee=>{A||(A=!0,ee?T(E,[M]):T(S,[M]),g.delayedLeave&&g.delayedLeave(),M[Ws]=void 0)};const Z=M[Ws].bind(null,!1);N?P(N,[M,Z]):Z()},leave(M,N){const S=String(e.key);if(M[Ws]&&M[Ws](!0),r.isUnmounting)return N();T(p,[M]);let E=!1;M[xr]=Z=>{E||(E=!0,N(),Z?T(w,[M]):T(m,[M]),M[xr]=void 0,_[S]===e&&delete _[S])};const A=M[xr].bind(null,!1);_[S]=e,h?P(h,[M,A]):A()},clone(M){const N=cs(M,t,r,n,s);return s&&s(N),N}};return g}function ka(e){if(Gs(e))return e=hr(e),e.children=null,e}function Tu(e){if(!Gs(e))return vu(e.type)&&e.children?Su(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&Te(r.default))return r.default()}}function Fr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,r){let n=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Be?(o.patchFlag&128&&s++,n=n.concat(Gi(o.children,t,a))):(t||o.type!==it)&&n.push(a!=null?hr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function te(e,t){return Te(e)?ze({name:e.name},t,{setup:e}):e}function Eu(){const e=ot();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function $a(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function uv(e){const t=ot(),r=rt(null);if(t){const n=t.refs===Ne?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Au(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var Ji=new WeakMap;function us(e,t,r,n,s=!1){if(me(e)){e.forEach((w,x)=>us(w,t&&(me(t)?t[x]:t),r,n,s));return}if(Vr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&us(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?si(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ne?a.refs={}:a.refs,d=a.setupState,p=qe(d),h=d===Ne?Ic:w=>Au(c,w)?!1:Ue(p,w),m=(w,x)=>!(x&&Au(c,x));if(u!=null&&u!==l){if(Iu(t),Xe(u))c[u]=null,h(u)&&(d[u]=null);else if(We(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Te(l))is(l,a,12,[o,c]);else{const w=Xe(l),x=We(l);if(w||x){const v=()=>{if(e.f){const C=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)me(C)&&ia(C,i);else if(me(C))C.includes(i)||C.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const y=[i];m(l,e.k)&&(l.value=y),e.k&&(c[e.k]=y)}}else w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const C=()=>{v(),Ji.delete(e)};C.id=-1,Ji.set(e,C),lt(C,r)}else Iu(e),v()}}}function Iu(e){const t=Ji.get(e);t&&(t.flags|=8,Ji.delete(e))}var Ru=!1,ds=()=>{Ru||(console.error("Hydration completed but contains mismatches."),Ru=!0)},dv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",fv=e=>e.namespaceURI.includes("MathML"),Yi=e=>{if(e.nodeType===1){if(dv(e))return"svg";if(fv(e))return"mathml"}},fs=e=>e.nodeType===8;function pv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(y,b)=>{if(!b.hasChildNodes()){r(null,y,b),Vi(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Vi(),b._vnode=y},d=(y,b,_,T,P,g=!1)=>{g=g||!!b.dynamicChildren;const M=fs(y)&&y.data==="[",N=()=>w(y,b,_,T,P,M),{type:S,ref:E,shapeFlag:A,patchFlag:Z}=b;let ee=y.nodeType;b.el=y,Z===-2&&(g=!1,b.dynamicChildren=null);let z=null;switch(S){case ln:ee!==3?b.children===""?(l(b.el=s(""),o(y),y),z=y):z=N():(y.data!==b.children&&(ds(),y.data=b.children),z=i(y));break;case it:C(y)?(z=i(y),v(b.el=y.content.firstChild,y,_)):ee!==8||M?z=N():z=i(y);break;case qn:if(M&&(y=i(y),ee=y.nodeType),ee===1||ee===3){z=y;const Q=!b.children.length;for(let Y=0;Y<b.staticCount;Y++)Q&&(b.children+=z.nodeType===1?z.outerHTML:z.data),Y===b.staticCount-1&&(b.anchor=z),z=i(z);return M?i(z):z}else N();break;case Be:M?z=m(y,b,_,T,P,g):z=N();break;default:if(A&1)(ee!==1||b.type.toLowerCase()!==y.tagName.toLowerCase())&&!C(y)?z=N():z=p(y,b,_,T,P,g);else if(A&6){b.slotScopeIds=P;const Q=o(y);if(M?z=x(y):fs(y)&&y.data==="teleport start"?z=x(y,y.data,"teleport end"):z=i(y),t(b,Q,null,_,T,Yi(Q),g),Vr(b)&&!b.type.__asyncResolved){let Y;M?(Y=q(Be),Y.anchor=z?z.previousSibling:Q.lastChild):Y=y.nodeType===3?Me(""):q("div"),Y.el=y,b.component.subTree=Y}}else A&64?ee!==8?z=N():z=b.type.hydrate(y,b,_,T,P,g,e,h):A&128&&(z=b.type.hydrate(y,b,_,T,Yi(o(y)),P,g,e,d))}return E!=null&&us(E,null,T,b),z},p=(y,b,_,T,P,g)=>{g=g||!!b.dynamicChildren;const{type:M,props:N,patchFlag:S,shapeFlag:E,dirs:A,transition:Z}=b,ee=M==="input"||M==="option";if(ee||S!==-1){A&&Cr(b,null,_,"created");let z=!1;if(C(y)){z=dd(null,Z)&&_&&_.vnode.props&&_.vnode.props.appear;const Y=y.content.firstChild;if(z){const le=Y.getAttribute("class");le&&(Y.$cls=le),Z.beforeEnter(Y)}v(Y,y,_),b.el=y=Y}if(E&16&&!(N&&(N.innerHTML||N.textContent))){let Y=h(y.firstChild,b,y,_,T,P,g);for(;Y;){Zi(y,1)||ds();const le=Y;Y=Y.nextSibling,a(le)}}else if(E&8){let Y=b.children;Y[0]===`
4
- `&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(Y=Y.slice(1));const{textContent:le}=y;le!==Y&&le!==Y.replace(/\r\n|\r/g,`
5
- `)&&(Zi(y,0)||ds(),y.textContent=b.children)}if(N){if(ee||!g||S&48){const Y=y.tagName.includes("-");for(const le in N)(ee&&(le.endsWith("value")||le==="indeterminate")||Ps(le)&&!Pn(le)||le[0]==="."||Y&&!Pn(le))&&n(y,le,null,N[le],void 0,_)}else if(N.onClick)n(y,"onClick",null,N.onClick,void 0,_);else if(S&4&&Br(N.style))for(const Y in N.style)N.style[Y]}let Q;(Q=N&&N.onVnodeBeforeMount)&&Lt(Q,_,b),A&&Cr(b,null,_,"beforeMount"),((Q=N&&N.onVnodeMounted)||A||z)&&vd(()=>{Q&&Lt(Q,_,b),z&&Z.enter(y),A&&Cr(b,null,_,"mounted")},T)}return y.nextSibling},h=(y,b,_,T,P,g,M)=>{M=M||!!b.dynamicChildren;const N=b.children,S=N.length;for(let E=0;E<S;E++){const A=M?N[E]:N[E]=Bt(N[E]),Z=A.type===ln;y?(Z&&!M&&E+1<S&&Bt(N[E+1]).type===ln&&(l(s(y.data.slice(A.children.length)),_,i(y)),y.data=A.children),y=d(y,A,T,P,g,M)):Z&&!A.children?l(A.el=s(""),_):(Zi(_,1)||ds(),r(null,A,_,null,T,P,Yi(_),g))}return y},m=(y,b,_,T,P,g)=>{const{slotScopeIds:M}=b;M&&(P=P?P.concat(M):M);const N=o(y),S=h(i(y),b,N,_,T,P,g);return S&&fs(S)&&S.data==="]"?i(b.anchor=S):(ds(),l(b.anchor=u("]"),N,S),S)},w=(y,b,_,T,P,g)=>{if(Zi(y.parentElement,1)||ds(),b.el=null,g){const S=x(y);for(;;){const E=i(y);if(E&&E!==S)a(E);else break}}const M=i(y),N=o(y);return a(y),r(null,b,N,M,_,T,Yi(N),P),_&&(_.vnode.el=b.el,so(_,b.el)),M},x=(y,b="[",_="]")=>{let T=0;for(;y;)if(y=i(y),y&&fs(y)&&(y.data===b&&T++,y.data===_)){if(T===0)return i(y);T--}return y},v=(y,b,_)=>{const T=b.parentNode;T&&T.replaceChild(y,b);let P=_;for(;P;)P.vnode.el===b&&(P.vnode.el=P.subTree.el=y),P=P.parent},C=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}var ku="data-allow-mismatch",hv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Zi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ku);)e=e.parentElement;const r=e&&e.getAttribute(ku);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(hv[t])}}var gv=Ri().requestIdleCallback||(e=>setTimeout(e,1)),vv=Ri().cancelIdleCallback||(e=>clearTimeout(e)),mv=(e=1e4)=>t=>{const r=gv(t,{timeout:e});return()=>vv(r)};function wv(e){const{top:t,left:r,bottom:n,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:o}=window;return(t>0&&t<i||n>0&&n<i)&&(r>0&&r<o||s>0&&s<o)}var yv=e=>(t,r)=>{const n=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){n.disconnect(),t();break}},e);return r(s=>{if(s instanceof Element){if(wv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},bv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},_v=(e=[])=>(t,r)=>{Xe(e)&&(e=[e]);let n=!1;const s=o=>{n||(n=!0,i(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},i=()=>{r(o=>{for(const a of e)o.removeEventListener(a,s)})};return r(o=>{for(const a of e)o.addEventListener(a,s,{once:!0})}),i};function Sv(e,t){if(fs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(fs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var Vr=e=>!!e.type.__asyncLoader;function Cv(e){Te(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,v)=>{l(w,()=>x(p()),()=>v(w),d+1)});throw w}).then(w=>m!==u&&u?u:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),c=w,w)))};return te({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,x){let v=!1;(w.bu||(w.bu=[])).push(()=>v=!0);const C=()=>{v||x()},y=i?()=>{const b=i(C,_=>Sv(m,_));b&&(w.bum||(w.bum=[])).push(b)}:C;c?y():h().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const m=St;if($a(m),c)return()=>Xi(c,m);const w=y=>{u=null,On(y,m,13,!n)};if(a&&m.suspense||gs)return h().then(y=>()=>Xi(y,m)).catch(y=>(w(y),()=>n?q(n,{error:y}):null));const x=F(!1),v=F(),C=F(!!s);return s&&setTimeout(()=>{C.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!v.value){const y=new Error(`Async component timed out after ${o}ms.`);w(y),v.value=y}},o),h().then(()=>{x.value=!0,m.parent&&Gs(m.parent.vnode)&&m.parent.update()}).catch(y=>{w(y),v.value=y}),()=>{if(x.value&&c)return Xi(c,m);if(v.value&&n)return q(n,{error:v.value});if(r&&!C.value)return Xi(r,m)}}})}function Xi(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=q(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Gs=e=>e.type.__isKeepAlive,xv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=ot(),n=r.ctx;if(!n.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const s=new Map,i=new Set;let o=null;const a=r.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:d}}}=n,p=d("div");n.activate=(C,y,b,_,T)=>{const P=C.component;u(C,y,b,0,a),l(P.vnode,C,y,b,P,a,_,C.slotScopeIds,T),lt(()=>{P.isDeactivated=!1,P.a&&rs(P.a);const g=C.props&&C.props.onVnodeMounted;g&&Lt(g,P.parent,C)},a)},n.deactivate=C=>{const y=C.component;io(y.m),io(y.a),u(C,p,null,1,a),lt(()=>{y.da&&rs(y.da);const b=C.props&&C.props.onVnodeUnmounted;b&&Lt(b,y.parent,C),y.isDeactivated=!0},a)};function h(C){Pa(C),c(C,r,a,!0)}function m(C){s.forEach((y,b)=>{const _=el(Vr(y)?y.type.__asyncResolved||{}:y.type);_&&!C(_)&&w(b)})}function w(C){const y=s.get(C);y&&(!o||!pr(y,o))?h(y):o&&Pa(o),s.delete(C),i.delete(C)}Ie(()=>[e.include,e.exclude],([C,y])=>{C&&m(b=>Js(C,b)),y&&m(b=>!Js(y,b))},{flush:"post",deep:!0});let x=null;const v=()=>{x!=null&&(oo(r.subTree.type)?lt(()=>{s.set(x,Qi(r.subTree))},r.subTree.suspense):s.set(x,Qi(r.subTree)))};return Ke(v),Ys(v),ps(()=>{s.forEach(C=>{const{subTree:y,suspense:b}=r,_=Qi(y);if(C.type===_.type&&C.key===_.key){Pa(_);const T=_.component.da;T&&lt(T,b);return}h(C)})}),()=>{if(x=null,!t.default)return o=null;const C=t.default(),y=C[0];if(C.length>1)return o=null,C;if(!Ur(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let b=Qi(y);if(b.type===it)return o=null,b;const _=b.type,T=el(Vr(b)?b.type.__asyncResolved||{}:_),{include:P,exclude:g,max:M}=e;if(P&&(!T||!Js(P,T))||g&&T&&Js(g,T))return b.shapeFlag&=-257,o=b,y;const N=b.key==null?_:b.key,S=s.get(N);return b.el&&(b=hr(b),y.shapeFlag&128&&(y.ssContent=b)),x=N,S?(b.el=S.el,b.component=S.component,b.transition&&Fr(b,b.transition),b.shapeFlag|=512,i.delete(N),i.add(N)):(i.add(N),M&&i.size>parseInt(M,10)&&w(i.values().next().value)),b.shapeFlag|=256,o=b,oo(y.type)?y:b}}};function Js(e,t){return me(e)?e.some(r=>Js(r,t)):Xe(e)?e.split(",").includes(t):og(e)?(e.lastIndex=0,e.test(t)):!1}function $u(e,t){Du(e,"a",t)}function Pu(e,t){Du(e,"da",t)}function Du(e,t,r=St){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(eo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Gs(s.parent.vnode)&&Tv(n,t,r,s),s=s.parent}}function Tv(e,t,r,n){const s=eo(t,e,n,!0);Ot(()=>{ia(n[t],s)},r)}function Pa(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Qi(e){return e.shapeFlag&128?e.ssContent:e}function eo(e,t,r=St,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Dr();const a=Ln(r),l=Xt(t,r,e,o);return a(),Or(),l});return n?s.unshift(i):s.push(i),i}}var jr=e=>(t,r=St)=>{(!gs||e==="sp")&&eo(e,(...n)=>t(...n),r)},Ou=jr("bm"),Ke=jr("m"),Da=jr("bu"),Ys=jr("u"),ps=jr("bum"),Ot=jr("um"),Hu=jr("sp"),Mu=jr("rtg"),Nu=jr("rtc");function qu(e,t=St){eo("ec",e,t)}var Oa="components",Ev="directives";function Av(e,t){return Ha(Oa,e,!0,t)||e}var Bu=Symbol.for("v-ndc");function Zs(e){return Xe(e)?Ha(Oa,e,!1)||e:e||Bu}function Iv(e){return Ha(Ev,e)}function Ha(e,t,r=!0,n=!1){const s=_t||St;if(s){const i=s.type;if(e===Oa){const a=el(i,!1);if(a&&(a===t||a===dt(t)||a===Ds(dt(t))))return i}const o=Lu(s[e]||i[e],t)||Lu(s.appContext[e],t);return!o&&n?i:o}}function Lu(e,t){return e&&(e[t]||e[dt(t)]||e[Ds(dt(t))])}function er(e,t,r,n){let s;const i=r&&r[n],o=me(e);if(o||Xe(e)){const a=o&&Br(e);let l=!1,u=!1;a&&(l=!qt(e),u=_r(e),e=Oi(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?ss(fr(e[c])):fr(e[c]):e[c],c,void 0,i&&i[c])}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i&&i[a])}else if(Ve(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function Rv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(me(n))for(let s=0;s<n.length;s++)e[n[s].name]=n[s].fn;else n&&(e[n.name]=n.key?(...s)=>{const i=n.fn(...s);return i&&(i.key=n.key),i}:n.fn)}return e}function oe(e,t,r={},n,s){if(_t.ce||_t.parent&&Vr(_t.parent)&&_t.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),D(),j(Be,null,[q("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),D();const o=i&&Ma(i(r)),a=r.key||o&&o.key,l=j(Be,{key:(a&&!cr(a)?a:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Ma(e){return e.some(t=>Ur(t)?!(t.type===it||t.type===Be&&!Ma(t.children)):!0)?e:null}function Fu(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ts(n)]=e[n];return r}var Na=e=>e?_d(e)?si(e):Na(e.parent):null,Xs=ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Na(e.parent),$root:e=>Na(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fa(e),$forceUpdate:e=>e.f||(e.f=()=>{Ca(e.update)}),$nextTick:e=>e.n||(e.n=vt.bind(e.proxy)),$watch:e=>av.bind(e)}),qa=(e,t)=>e!==Ne&&!e.__isScriptSetup&&Ue(e,t),Ba={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(qa(n,t))return o[t]=1,n[t];if(s!==Ne&&Ue(s,t))return o[t]=2,s[t];if(Ue(i,t))return o[t]=3,i[t];if(r!==Ne&&Ue(r,t))return o[t]=4,r[t];La&&(o[t]=0)}}const u=Xs[t];let c,d;if(u)return t==="$attrs"&&Tt(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ne&&Ue(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ue(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return qa(s,t)?(s[t]=r,!0):n!==Ne&&Ue(n,t)?(n[t]=r,!0):Ue(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||e!==Ne&&a[0]!=="$"&&Ue(e,a)||qa(t,a)||Ue(i,a)||Ue(n,a)||Ue(Xs,a)||Ue(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ue(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},kv=ze({},Ba,{get(e,t){if(t!==Symbol.unscopables)return Ba.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ug(t)}});function $v(){return null}function Pv(){return null}function Dv(e){}function Ov(e){}function Hv(){return null}function Mv(){}function Nv(e,t){return null}function qv(){return Vu("useSlots").slots}function Bv(){return Vu("useAttrs").attrs}function Vu(e){const t=ot();return t.setupContext||(t.setupContext=xd(t))}function Qs(e){return me(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function ju(e,t){const r=Qs(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?me(s)||Te(s)?s=r[n]={type:s,default:t[n]}:s.default=t[n]:s===null&&(s=r[n]={default:t[n]}),s&&t[`__skip_${n}`]&&(s.skipFactory=!0)}return r}function Lv(e,t){return!e||!t?e||t:me(e)&&me(t)?e.concat(t):ze({},Qs(e),Qs(t))}function Fv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Vv(e){const t=ot();let r=e();co();const n=()=>{ot()!==t&&t.scope.off(),co()};return oa(r)&&(r=r.catch(s=>{throw Ln(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Ln(t),Promise.resolve().then(n)}]}var La=!0;function jv(e){const t=Fa(e),r=e.proxy,n=e.ctx;La=!1,t.beforeCreate&&Uu(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:v,beforeUnmount:C,destroyed:y,unmounted:b,render:_,renderTracked:T,renderTriggered:P,errorCaptured:g,serverPrefetch:M,expose:N,inheritAttrs:S,components:E,directives:A,filters:Z}=t;if(u&&Uv(u,n,null),o)for(const Q in o){const Y=o[Q];Te(Y)&&(n[Q]=Y.bind(r))}if(s){const Q=s.call(r,r);Ve(Q)&&(e.data=Nr(Q))}if(La=!0,i)for(const Q in i){const Y=i[Q],le=V({get:Te(Y)?Y.bind(r,r):Te(Y.get)?Y.get.bind(r,r):Zt,set:!Te(Y)&&Te(Y.set)?Y.set.bind(r):Zt});Object.defineProperty(n,Q,{enumerable:!0,configurable:!0,get:()=>le.value,set:K=>le.value=K})}if(a)for(const Q in a)zu(a[Q],n,r,Q);if(l){const Q=Te(l)?l.call(r):l;Reflect.ownKeys(Q).forEach(Y=>{Hn(Y,Q[Y])})}c&&Uu(c,e,"c");function z(Q,Y){me(Y)?Y.forEach(le=>Q(le.bind(r))):Y&&Q(Y.bind(r))}if(z(Ou,d),z(Ke,p),z(Da,h),z(Ys,m),z($u,w),z(Pu,x),z(qu,g),z(Nu,T),z(Mu,P),z(ps,C),z(Ot,b),z(Hu,M),me(N))if(N.length){const Q=e.exposed||(e.exposed={});N.forEach(Y=>{Object.defineProperty(Q,Y,{get:()=>r[Y],set:le=>r[Y]=le,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Zt&&(e.render=_),S!=null&&(e.inheritAttrs=S),E&&(e.components=E),A&&(e.directives=A),M&&$a(e)}function Uv(e,t,r=Zt){me(e)&&(e=Va(e));for(const n in e){const s=e[n];let i;Ve(s)?"default"in s?i=Dt(s.from||n,s.default,!0):i=Dt(s.from||n):i=Dt(s),We(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Uu(e,t,r){Xt(me(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function zu(e,t,r,n){let s=n.includes(".")?hu(r,n):()=>r[n];if(Xe(e)){const i=t[e];Te(i)&&Ie(s,i)}else if(Te(e))Ie(s,e.bind(r));else if(Ve(e))if(me(e))e.forEach(i=>zu(i,t,r,n));else{const i=Te(e.handler)?e.handler.bind(r):t[e.handler];Te(i)&&Ie(s,i,e)}}function Fa(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(u=>to(l,u,o,!0)),to(l,t,o)),Ve(t)&&i.set(t,l),l}function to(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&to(e,i,r,!0),s&&s.forEach(o=>to(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=zv[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var zv={data:Ku,props:Wu,emits:Wu,methods:ei,computed:ei,beforeCreate:Ht,created:Ht,beforeMount:Ht,mounted:Ht,beforeUpdate:Ht,updated:Ht,beforeDestroy:Ht,beforeUnmount:Ht,destroyed:Ht,unmounted:Ht,activated:Ht,deactivated:Ht,errorCaptured:Ht,serverPrefetch:Ht,components:ei,directives:ei,watch:Wv,provide:Ku,inject:Kv};function Ku(e,t){return t?e?function(){return ze(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function Kv(e,t){return ei(Va(e),Va(t))}function Va(e){if(me(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Ht(e,t){return e?[...new Set([].concat(e,t))]:t}function ei(e,t){return e?ze(Object.create(null),e,t):t}function Wu(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:ze(Object.create(null),Qs(e),Qs(t??{})):t}function Wv(e,t){if(!e)return t;if(!t)return e;const r=ze(Object.create(null),e);for(const n in t)r[n]=Ht(e[n],t[n]);return r}function Gu(){return{app:null,config:{isNativeTag:Ic,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Gv=0;function Jv(e,t){return function(n,s=null){Te(n)||(n=ze({},n)),s!=null&&!Ve(s)&&(s=null);const i=Gu(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Gv++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:Ed,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Te(c.install)?(o.add(c),c.install(u,...d)):Te(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,p){if(!l){const h=u._ceVNode||q(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,c):e(h,c,p),l=!0,u._container=c,c.__vue_app__=u,si(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(Xt(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Mn;Mn=u;try{return c()}finally{Mn=d}}};return u}}var Mn=null;function Yv(e,t,r=Ne){const n=ot(),s=dt(t),i=Nt(t),o=Ju(e,s),a=Fs((l,u)=>{let c,d=Ne,p;return pu(()=>{const h=e[s];$t(c,h)&&(c=h,u())}),{get(){return l(),r.get?r.get(c):c},set(h){const m=r.set?r.set(h):h;if(!$t(m,c)&&!(d!==Ne&&$t(h,d)))return;const w=n.vnode.props;w&&(t in w||s in w||i in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${i}`in w)||(c=h,u()),n.emit(`update:${t}`,m),$t(h,m)&&$t(h,d)&&!$t(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Ne:a,done:!1}:{done:!0}}}},a}var Ju=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${dt(t)}Modifiers`]||e[`${Nt(t)}Modifiers`];function Zv(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ne;let s=r;const i=t.startsWith("update:"),o=i&&Ju(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>Xe(c)?c.trim():c)),o.number&&(s=r.map(Ai)));let a,l=n[a=ts(t)]||n[a=ts(dt(t))];!l&&i&&(l=n[a=ts(Nt(t))]),l&&Xt(l,e,6,s);const u=n[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Xt(u,e,6,s)}}var Xv=new WeakMap;function Yu(e,t,r=!1){const n=r?Xv:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Te(e)){const l=u=>{const c=Yu(u,t,!0);c&&(a=!0,ze(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Ve(e)&&n.set(e,null),null):(me(i)?i.forEach(l=>o[l]=null):ze(o,i),Ve(e)&&n.set(e,o),o)}function ro(e,t){return!e||!Ps(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,Nt(t))||Ue(e,t))}function no(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=Us(e);let v,C;try{if(r.shapeFlag&4){const b=s||n,_=b;v=Bt(u.call(_,b,c,d,h,p,m)),C=a}else{const b=t;v=Bt(b.length>1?b(d,{attrs:a,slots:o,emit:l}):b(d,null)),C=t.props?a:em(a)}}catch(b){ri.length=0,On(b,e,1),v=q(it)}let y=v;if(C&&w!==!1){const b=Object.keys(C),{shapeFlag:_}=y;b.length&&_&7&&(i&&b.some(sa)&&(C=tm(C,i)),y=hr(y,C,!1,!0))}return r.dirs&&(y=hr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(r.dirs):r.dirs),r.transition&&Fr(y,r.transition),v=y,Us(x),v}function Qv(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Ur(s)){if(s.type!==it||s.children==="v-if"){if(r)return;r=s}}else return}return r}var em=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ps(r))&&((t||(t={}))[r]=e[r]);return t},tm=(e,t)=>{const r={};for(const n in e)(!sa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function rm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Zu(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Xu(o,n,p)&&!ro(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Zu(n,o,u):!0:!!o;return!1}function Zu(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Xu(t,e,i)&&!ro(r,i))return!0}return!1}function Xu(e,t,r){const n=e[r],s=t[r];return r==="style"&&Ve(n)&&Ve(s)?!Pr(n,s):n!==s}function so({vnode:e,parent:t},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=r,t=t.parent;else break}}var Qu={},ed=()=>Object.create(Qu),td=e=>Object.getPrototypeOf(e)===Qu;function nm(e,t,r,n=!1){const s={},i=ed();e.propsDefaults=Object.create(null),rd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:eu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function sm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=qe(s),[l]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let p=c[d];if(ro(e.emitsOptions,p))continue;const h=t[p];if(l)if(Ue(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=dt(p);s[m]=ja(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{rd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ue(t,d)&&((c=Nt(d))===d||!Ue(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=ja(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ue(t,d))&&(delete i[d],u=!0)}u&&Hr(e.attrs,"set","")}function rd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Pn(l))continue;const u=t[l];let c;s&&Ue(s,c=dt(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:ro(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=qe(r),u=a||Ne;for(let c=0;c<i.length;c++){const d=i[c];r[d]=ja(s,l,d,u[d],e,!Ue(u,d))}}return o}function ja(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ue(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Te(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Ln(s);n=u[r]=l.call(null,t),c()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Nt(r))&&(n=!0))}return n}var im=new WeakMap;function nd(e,t,r=!1){const n=r?im:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Te(e)){const c=d=>{l=!0;const[p,h]=nd(d,t,!0);ze(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Ve(e)&&n.set(e,Xn),Xn;if(me(i))for(let c=0;c<i.length;c++){const d=dt(i[c]);sd(d)&&(o[d]=Ne)}else if(i)for(const c in i){const d=dt(c);if(sd(d)){const p=i[c],h=o[d]=me(p)||Te(p)?{type:p}:ze({},p),m=h.type;let w=!1,x=!0;if(me(m))for(let v=0;v<m.length;++v){const C=m[v],y=Te(C)&&C.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(x=!1)}else w=Te(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||Ue(h,"default"))&&a.push(d)}}const u=[o,a];return Ve(e)&&n.set(e,u),u}function sd(e){return e[0]!=="$"&&!Pn(e)}var Ua=e=>e==="_"||e==="_ctx"||e==="$stable",za=e=>me(e)?e.map(Bt):[Bt(e)],om=(e,t,r)=>{if(t._n)return t;const n=R((...s)=>za(t(...s)),r);return n._c=!1,n},id=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ua(s))continue;const i=e[s];if(Te(i))t[s]=om(s,i,n);else if(i!=null){const o=za(i);t[s]=()=>o}}},od=(e,t)=>{const r=za(t);e.slots.default=()=>r},ad=(e,t,r)=>{for(const n in t)(r||!Ua(n))&&(e[n]=t[n])},am=(e,t,r)=>{const n=e.slots=ed();if(e.vnode.shapeFlag&32){const s=t._;s?(ad(n,t,r),r&&$c(n,"_",s,!0)):id(t,n)}else t&&od(e,t)},lm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=Ne;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:ad(s,t,r):(i=!t.$stable,id(t,s)),o=t}else t&&(od(e,t),o={default:1});if(i)for(const a in s)!Ua(a)&&o[a]==null&&delete s[a]};function nx(){}var lt=vd;function ld(e){return ud(e)}function cd(e){return ud(e,pv)}function ud(e,t){const r=Ri();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=Zt,insertStaticContent:m}=e,w=(I,O,W,ae=null,re=null,se=null,fe=void 0,de=null,ue=!!O.dynamicChildren)=>{if(I===O)return;I&&!pr(I,O)&&(ae=Je(I),pe(I,re,se,!0),I=null),O.patchFlag===-2&&(ue=!1,O.dynamicChildren=null);const{type:ie,ref:k,shapeFlag:B}=O;switch(ie){case ln:x(I,O,W,ae);break;case it:v(I,O,W,ae);break;case qn:I==null&&C(O,W,ae,fe);break;case Be:E(I,O,W,ae,re,se,fe,de,ue);break;default:B&1?_(I,O,W,ae,re,se,fe,de,ue):B&6?A(I,O,W,ae,re,se,fe,de,ue):(B&64||B&128)&&ie.process(I,O,W,ae,re,se,fe,de,ue,ct)}k!=null&&re?us(k,I&&I.ref,se,O||I,!O):k==null&&I&&I.ref!=null&&us(I.ref,null,se,I,!0)},x=(I,O,W,ae)=>{if(I==null)n(O.el=a(O.children),W,ae);else{const re=O.el=I.el;O.children!==I.children&&u(re,O.children)}},v=(I,O,W,ae)=>{I==null?n(O.el=l(O.children||""),W,ae):O.el=I.el},C=(I,O,W,ae)=>{[I.el,I.anchor]=m(I.children,O,W,ae,I.el,I.anchor)},y=({el:I,anchor:O},W,ae)=>{let re;for(;I&&I!==O;)re=p(I),n(I,W,ae),I=re;n(O,W,ae)},b=({el:I,anchor:O})=>{let W;for(;I&&I!==O;)W=p(I),s(I),I=W;s(O)},_=(I,O,W,ae,re,se,fe,de,ue)=>{if(O.type==="svg"?fe="svg":O.type==="math"&&(fe="mathml"),I==null)T(O,W,ae,re,se,fe,de,ue);else{const ie=I.el&&I.el._isVueCE?I.el:null;try{ie&&ie._beginPatch(),M(I,O,re,se,fe,de,ue)}finally{ie&&ie._endPatch()}}},T=(I,O,W,ae,re,se,fe,de)=>{let ue,ie;const{props:k,shapeFlag:B,transition:H,dirs:X}=I;if(ue=I.el=o(I.type,se,k&&k.is,k),B&8?c(ue,I.children):B&16&&g(I.children,ue,null,ae,re,Ka(I,se),fe,de),X&&Cr(I,null,ae,"created"),P(ue,I,I.scopeId,fe,ae),k){for(const J in k)J!=="value"&&!Pn(J)&&i(ue,J,null,k[J],se,ae);"value"in k&&i(ue,"value",null,k.value,se),(ie=k.onVnodeBeforeMount)&&Lt(ie,ae,I)}X&&Cr(I,null,ae,"beforeMount");const $=dd(re,H);$&&H.beforeEnter(ue),n(ue,O,W),((ie=k&&k.onVnodeMounted)||$||X)&&lt(()=>{ie&&Lt(ie,ae,I),$&&H.enter(ue),X&&Cr(I,null,ae,"mounted")},re)},P=(I,O,W,ae,re)=>{if(W&&h(I,W),ae)for(let se=0;se<ae.length;se++)h(I,ae[se]);if(re){let se=re.subTree;if(O===se||oo(se.type)&&(se.ssContent===O||se.ssFallback===O)){const fe=re.vnode;P(I,fe,fe.scopeId,fe.slotScopeIds,re.parent)}}},g=(I,O,W,ae,re,se,fe,de,ue=0)=>{for(let ie=ue;ie<I.length;ie++)w(null,I[ie]=de?zr(I[ie]):Bt(I[ie]),O,W,ae,re,se,fe,de)},M=(I,O,W,ae,re,se,fe)=>{const de=O.el=I.el;let{patchFlag:ue,dynamicChildren:ie,dirs:k}=O;ue|=I.patchFlag&16;const B=I.props||Ne,H=O.props||Ne;let X;if(W&&Nn(W,!1),(X=H.onVnodeBeforeUpdate)&&Lt(X,W,O,I),k&&Cr(O,I,W,"beforeUpdate"),W&&Nn(W,!0),(B.innerHTML&&H.innerHTML==null||B.textContent&&H.textContent==null)&&c(de,""),ie?N(I.dynamicChildren,ie,de,W,ae,Ka(O,re),se):fe||Y(I,O,de,null,W,ae,Ka(O,re),se,!1),ue>0){if(ue&16)S(de,B,H,W,re);else if(ue&2&&B.class!==H.class&&i(de,"class",null,H.class,re),ue&4&&i(de,"style",B.style,H.style,re),ue&8){const $=O.dynamicProps;for(let J=0;J<$.length;J++){const G=$[J],_e=B[G],$e=H[G];($e!==_e||G==="value")&&i(de,G,_e,$e,re,W)}}ue&1&&I.children!==O.children&&c(de,O.children)}else!fe&&ie==null&&S(de,B,H,W,re);((X=H.onVnodeUpdated)||k)&&lt(()=>{X&&Lt(X,W,O,I),k&&Cr(O,I,W,"updated")},ae)},N=(I,O,W,ae,re,se,fe)=>{for(let de=0;de<O.length;de++){const ue=I[de],ie=O[de];w(ue,ie,ue.el&&(ue.type===Be||!pr(ue,ie)||ue.shapeFlag&198)?d(ue.el):W,null,ae,re,se,fe,!0)}},S=(I,O,W,ae,re)=>{if(O!==W){if(O!==Ne)for(const se in O)!Pn(se)&&!(se in W)&&i(I,se,O[se],null,re,ae);for(const se in W){if(Pn(se))continue;const fe=W[se],de=O[se];fe!==de&&se!=="value"&&i(I,se,de,fe,re,ae)}"value"in W&&i(I,"value",O.value,W.value,re)}},E=(I,O,W,ae,re,se,fe,de,ue)=>{const ie=O.el=I?I.el:a(""),k=O.anchor=I?I.anchor:a("");let{patchFlag:B,dynamicChildren:H,slotScopeIds:X}=O;X&&(de=de?de.concat(X):X),I==null?(n(ie,W,ae),n(k,W,ae),g(O.children||[],W,k,re,se,fe,de,ue)):B>0&&B&64&&H&&I.dynamicChildren&&I.dynamicChildren.length===H.length?(N(I.dynamicChildren,H,W,re,se,fe,de),(O.key!=null||re&&O===re.subTree)&&Wa(I,O,!0)):Y(I,O,W,k,re,se,fe,de,ue)},A=(I,O,W,ae,re,se,fe,de,ue)=>{O.slotScopeIds=de,I==null?O.shapeFlag&512?re.ctx.activate(O,W,ae,fe,ue):Z(O,W,ae,re,se,fe,ue):ee(I,O,ue)},Z=(I,O,W,ae,re,se,fe)=>{const de=I.component=bd(I,ae,re);if(Gs(I)&&(de.ctx.renderer=ct),Sd(de,!1,fe),de.asyncDep){if(re&&re.registerDep(de,z,fe),!I.el){const ue=de.subTree=q(it);v(null,ue,O,W),I.placeholder=ue.el}}else z(de,I,O,W,re,se,fe)},ee=(I,O,W)=>{const ae=O.component=I.component;if(rm(I,O,W))if(ae.asyncDep&&!ae.asyncResolved){Q(ae,O,W);return}else ae.next=O,ae.update();else O.el=I.el,ae.vnode=O},z=(I,O,W,ae,re,se,fe)=>{const de=()=>{if(I.isMounted){let{next:B,bu:H,u:X,parent:$,vnode:J}=I;{const Ye=fd(I);if(Ye){B&&(B.el=J.el,Q(I,B,fe)),Ye.asyncDep.then(()=>{lt(()=>{I.isUnmounted||ie()},re)});return}}let G=B,_e;Nn(I,!1),B?(B.el=J.el,Q(I,B,fe)):B=J,H&&rs(H),(_e=B.props&&B.props.onVnodeBeforeUpdate)&&Lt(_e,$,B,J),Nn(I,!0);const $e=no(I),Le=I.subTree;I.subTree=$e,w(Le,$e,d(Le.el),Je(Le),I,re,se),B.el=$e.el,G===null&&so(I,$e.el),X&&lt(X,re),(_e=B.props&&B.props.onVnodeUpdated)&&lt(()=>Lt(_e,$,B,J),re)}else{let B;const{el:H,props:X}=O,{bm:$,m:J,parent:G,root:_e,type:$e}=I,Le=Vr(O);if(Nn(I,!1),$&&rs($),!Le&&(B=X&&X.onVnodeBeforeMount)&&Lt(B,G,O),Nn(I,!0),H&&et){const Ye=()=>{I.subTree=no(I),et(H,I.subTree,I,re,null)};Le&&$e.__asyncHydrate?$e.__asyncHydrate(H,I,Ye):Ye()}else{_e.ce&&_e.ce._hasShadowRoot()&&_e.ce._injectChildStyle($e);const Ye=I.subTree=no(I);w(null,Ye,W,ae,I,re,se),O.el=Ye.el}if(J&&lt(J,re),!Le&&(B=X&&X.onVnodeMounted)){const Ye=O;lt(()=>Lt(B,G,Ye),re)}(O.shapeFlag&256||G&&Vr(G.vnode)&&G.vnode.shapeFlag&256)&&I.a&&lt(I.a,re),I.isMounted=!0,O=W=ae=null}};I.scope.on();const ue=I.effect=new Os(de);I.scope.off();const ie=I.update=ue.run.bind(ue),k=I.job=ue.runIfDirty.bind(ue);k.i=I,k.id=I.uid,ue.scheduler=()=>Ca(k),Nn(I,!0),ie()},Q=(I,O,W)=>{O.component=I;const ae=I.vnode.props;I.vnode=O,I.next=null,sm(I,O.props,ae,W),lm(I,O.children,W),Dr(),lu(I),Or()},Y=(I,O,W,ae,re,se,fe,de,ue=!1)=>{const ie=I&&I.children,k=I?I.shapeFlag:0,B=O.children,{patchFlag:H,shapeFlag:X}=O;if(H>0){if(H&128){K(ie,B,W,ae,re,se,fe,de,ue);return}else if(H&256){le(ie,B,W,ae,re,se,fe,de,ue);return}}X&8?(k&16&&Ae(ie,re,se),B!==ie&&c(W,B)):k&16?X&16?K(ie,B,W,ae,re,se,fe,de,ue):Ae(ie,re,se,!0):(k&8&&c(W,""),X&16&&g(B,W,ae,re,se,fe,de,ue))},le=(I,O,W,ae,re,se,fe,de,ue)=>{I=I||Xn,O=O||Xn;const ie=I.length,k=O.length,B=Math.min(ie,k);let H;for(H=0;H<B;H++){const X=O[H]=ue?zr(O[H]):Bt(O[H]);w(I[H],X,W,null,re,se,fe,de,ue)}ie>k?Ae(I,re,se,!0,!1,B):g(O,W,ae,re,se,fe,de,ue,B)},K=(I,O,W,ae,re,se,fe,de,ue)=>{let ie=0;const k=O.length;let B=I.length-1,H=k-1;for(;ie<=B&&ie<=H;){const X=I[ie],$=O[ie]=ue?zr(O[ie]):Bt(O[ie]);if(pr(X,$))w(X,$,W,null,re,se,fe,de,ue);else break;ie++}for(;ie<=B&&ie<=H;){const X=I[B],$=O[H]=ue?zr(O[H]):Bt(O[H]);if(pr(X,$))w(X,$,W,null,re,se,fe,de,ue);else break;B--,H--}if(ie>B){if(ie<=H){const X=H+1,$=X<k?O[X].el:ae;for(;ie<=H;)w(null,O[ie]=ue?zr(O[ie]):Bt(O[ie]),W,$,re,se,fe,de,ue),ie++}}else if(ie>H)for(;ie<=B;)pe(I[ie],re,se,!0),ie++;else{const X=ie,$=ie,J=new Map;for(ie=$;ie<=H;ie++){const bt=O[ie]=ue?zr(O[ie]):Bt(O[ie]);bt.key!=null&&J.set(bt.key,ie)}let G,_e=0;const $e=H-$+1;let Le=!1,Ye=0;const br=new Array($e);for(ie=0;ie<$e;ie++)br[ie]=0;for(ie=X;ie<=B;ie++){const bt=I[ie];if(_e>=$e){pe(bt,re,se,!0);continue}let $r;if(bt.key!=null)$r=J.get(bt.key);else for(G=$;G<=H;G++)if(br[G-$]===0&&pr(bt,O[G])){$r=G;break}$r===void 0?pe(bt,re,se,!0):(br[$r-$]=ie+1,$r>=Ye?Ye=$r:Le=!0,w(bt,O[$r],W,null,re,se,fe,de,ue),_e++)}const ks=Le?cm(br):Xn;for(G=ks.length-1,ie=$e-1;ie>=0;ie--){const bt=$+ie,$r=O[bt],Yh=O[bt+1],Zh=bt+1<k?Yh.el||pd(Yh):ae;br[ie]===0?w(null,$r,W,Zh,re,se,fe,de,ue):Le&&(G<0||ie!==ks[G]?ce($r,W,Zh,2):G--)}}},ce=(I,O,W,ae,re=null)=>{const{el:se,type:fe,transition:de,children:ue,shapeFlag:ie}=I;if(ie&6){ce(I.component.subTree,O,W,ae);return}if(ie&128){I.suspense.move(O,W,ae);return}if(ie&64){fe.move(I,O,W,ct);return}if(fe===Be){n(se,O,W);for(let k=0;k<ue.length;k++)ce(ue[k],O,W,ae);n(I.anchor,O,W);return}if(fe===qn){y(I,O,W);return}if(ae!==2&&ie&1&&de)if(ae===0)de.beforeEnter(se),n(se,O,W),lt(()=>de.enter(se),re);else{const{leave:k,delayLeave:B,afterLeave:H}=de,X=()=>{I.ctx.isUnmounted?s(se):n(se,O,W)},$=()=>{se._isLeaving&&se[xr](!0),k(se,()=>{X(),H&&H()})};B?B(se,X,$):$()}else n(se,O,W)},pe=(I,O,W,ae=!1,re=!1)=>{const{type:se,props:fe,ref:de,children:ue,dynamicChildren:ie,shapeFlag:k,patchFlag:B,dirs:H,cacheIndex:X}=I;if(B===-2&&(re=!1),de!=null&&(Dr(),us(de,null,W,I,!0),Or()),X!=null&&(O.renderCache[X]=void 0),k&256){O.ctx.deactivate(I);return}const $=k&1&&H,J=!Vr(I);let G;if(J&&(G=fe&&fe.onVnodeBeforeUnmount)&&Lt(G,O,I),k&6)xe(I.component,W,ae);else{if(k&128){I.suspense.unmount(W,ae);return}$&&Cr(I,null,O,"beforeUnmount"),k&64?I.type.remove(I,O,W,ct,ae):ie&&!ie.hasOnce&&(se!==Be||B>0&&B&64)?Ae(ie,O,W,!1,!0):(se===Be&&B&384||!re&&k&16)&&Ae(ue,O,W),ae&&Ce(I)}(J&&(G=fe&&fe.onVnodeUnmounted)||$)&&lt(()=>{G&&Lt(G,O,I),$&&Cr(I,null,O,"unmounted")},W)},Ce=I=>{const{type:O,el:W,anchor:ae,transition:re}=I;if(O===Be){He(W,ae);return}if(O===qn){b(I);return}const se=()=>{s(W),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(I.shapeFlag&1&&re&&!re.persisted){const{leave:fe,delayLeave:de}=re,ue=()=>fe(W,se);de?de(I.el,se,ue):ue()}else se()},He=(I,O)=>{let W;for(;I!==O;)W=p(I),s(I),I=W;s(O)},xe=(I,O,W)=>{const{bum:ae,scope:re,job:se,subTree:fe,um:de,m:ue,a:ie}=I;io(ue),io(ie),ae&&rs(ae),re.stop(),se&&(se.flags|=8,pe(fe,I,O,W)),de&&lt(de,O),lt(()=>{I.isUnmounted=!0},O)},Ae=(I,O,W,ae=!1,re=!1,se=0)=>{for(let fe=se;fe<I.length;fe++)pe(I[fe],O,W,ae,re)},Je=I=>{if(I.shapeFlag&6)return Je(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const O=p(I.anchor||I.el),W=O&&O[gu];return W?p(W):O};let at=!1;const De=(I,O,W)=>{let ae;I==null?O._vnode&&(pe(O._vnode,null,null,!0),ae=O._vnode.component):w(O._vnode||null,I,O,null,null,null,W),O._vnode=I,at||(at=!0,lu(ae),Vi(),at=!1)},ct={p:w,um:pe,m:ce,r:Ce,mt:Z,mc:g,pc:Y,pbc:N,n:Je,o:e};let ht,et;return t&&([ht,et]=t(ct)),{render:De,hydrate:ht,createApp:Jv(De,ht)}}function Ka({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function Nn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function dd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wa(e,t,r=!1){const n=e.children,s=t.children;if(me(n)&&me(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=zr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Wa(o,a)),a.type===ln&&(a.patchFlag===-1&&(a=s[i]=zr(a)),a.el=o.el),a.type===it&&!a.el&&(a.el=o.el)}}function cm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const u=e[n];if(u!==0){if(s=r[r.length-1],e[s]<u){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<u?i=a+1:o=a;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function fd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fd(t)}function io(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pd(t.subTree):null}var oo=e=>e.__isSuspense,Ga=0,um={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)dm(t,r,n,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}fm(e,t,r,n,s,o,a,l,u)}},hydrate:pm,normalize:hm};function ti(e,t){const r=e.props&&e.props[t];Te(r)&&r()}function dm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=hd(e,s,n,t,d,r,i,o,a,l);u(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(ti(e,"onPending"),ti(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),hs(p,e.ssFallback)):p.resolve(!1,!0)}function fm(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:v}=d;if(w)d.pendingBranch=p,pr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(v||(l(m,h,r,n,s,null,i,o,a),hs(d,h)))):(d.pendingId=Ga++,v?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),hs(d,h))):m&&pr(m,p)?(l(m,p,r,n,s,d,i,o,a),d.resolve(!0)):(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0&&d.resolve()));else if(m&&pr(m,p))l(m,p,r,n,s,d,i,o,a),hs(d,p);else if(ti(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Ga++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:y}=d;C>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},C):C===0&&d.fallback(h)}}function hd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let v;const C=gm(e);C&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const y=e.props?Ii(e.props.timeout):void 0,b=i,_={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Ga++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(T=!1,P=!1){const{vnode:g,activeBranch:M,pendingBranch:N,pendingId:S,effects:E,parentComponent:A,container:Z,isInFallback:ee}=_;let z=!1;_.isHydrating?_.isHydrating=!1:T||(z=M&&N.transition&&N.transition.mode==="out-in",z&&(M.transition.afterLeave=()=>{S===_.pendingId&&(p(N,Z,i===b?m(M):i,0),Vs(E),ee&&g.ssFallback&&(g.ssFallback.el=null))}),M&&(w(M.el)===Z&&(i=m(M)),h(M,A,_,!0),!z&&ee&&g.ssFallback&&lt(()=>g.ssFallback.el=null,_)),z||p(N,Z,i,0)),hs(_,N),_.pendingBranch=null,_.isInFallback=!1;let Q=_.parent,Y=!1;for(;Q;){if(Q.pendingBranch){Q.effects.push(...E),Y=!0;break}Q=Q.parent}!Y&&!z&&Vs(E),_.effects=[],C&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!P&&t.resolve()),ti(g,"onResolve")},fallback(T){if(!_.pendingBranch)return;const{vnode:P,activeBranch:g,parentComponent:M,container:N,namespace:S}=_;ti(P,"onFallback");const E=m(g),A=()=>{_.isInFallback&&(d(null,T,N,E,M,null,S,a,l),hs(_,T))},Z=T.transition&&T.transition.mode==="out-in";Z&&(g.transition.afterLeave=A),_.isInFallback=!0,h(g,M,null,!0),Z||A()},move(T,P,g){_.activeBranch&&p(_.activeBranch,T,P,g),_.container=T},next(){return _.activeBranch&&m(_.activeBranch)},registerDep(T,P,g){const M=!!_.pendingBranch;M&&_.deps++;const N=T.vnode.el;T.asyncDep.catch(S=>{On(S,T,0)}).then(S=>{if(T.isUnmounted||_.isUnmounted||_.pendingId!==T.suspenseId)return;T.asyncResolved=!0;const{vnode:E}=T;Xa(T,S,!1),N&&(E.el=N);const A=!N&&T.subTree.el;P(T,E,w(N||T.subTree.el),N?null:m(T.subTree),_,o,g),A&&(E.placeholder=null,x(A)),so(T,E.el),M&&--_.deps===0&&_.resolve()})},unmount(T,P){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,r,T,P),_.pendingBranch&&h(_.pendingBranch,r,T,P)}};return _}function pm(e,t,r,n,s,i,o,a,l){const u=t.suspense=hd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,r,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function hm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=gd(n?r.default:r),e.ssFallback=n?gd(r.fallback):q(it)}function gd(e){let t;if(Te(e)){const r=Bn&&e._c;r&&(e._d=!1,D()),e=e(),r&&(e._d=!0,t=It,md())}return me(e)&&(e=Qv(e)),e=Bt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function vd(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):Vs(e)}function hs(e,t){e.activeBranch=t;const{vnode:r,parentComponent:n}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;r.el=s,n&&n.subTree===r&&(n.vnode.el=s,so(n,s))}function gm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Be=Symbol.for("v-fgt"),ln=Symbol.for("v-txt"),it=Symbol.for("v-cmt"),qn=Symbol.for("v-stc"),ri=[],It=null;function D(e=!1){ri.push(It=e?null:[])}function md(){ri.pop(),It=ri[ri.length-1]||null}var Bn=1;function ni(e,t=!1){Bn+=e,e<0&&It&&t&&(It.hasOnce=!0)}function wd(e){return e.dynamicChildren=Bn>0?It||Xn:null,md(),Bn>0&&It&&It.push(e),e}function we(e,t,r,n,s,i){return wd(ne(e,t,r,n,s,i,!0))}function j(e,t,r,n,s){return wd(q(e,t,r,n,s,!0))}function Ur(e){return e?e.__v_isVNode===!0:!1}function pr(e,t){return e.type===t.type&&e.key===t.key}function vm(e){}var yd=({key:e})=>e??null,ao=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Xe(e)||We(e)||Te(e)?{i:_t,r:e,k:t,f:!!r}:e:null);function ne(e,t=null,r=null,n=0,s=null,i=e===Be?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yd(t),ref:t&&ao(t),scopeId:Ui,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:_t};return a?(Ya(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Xe(r)?8:16),Bn>0&&!o&&It&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&It.push(l),l}var q=mm;function mm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Bu)&&(e=it),Ur(e)){const a=hr(e,t,!0);return r&&Ya(a,r),Bn>0&&!i&&It&&(a.shapeFlag&6?It[It.indexOf(e)]=a:It.push(a)),a.patchFlag=-2,a}if(xm(e)&&(e=e.__vccOpts),t){t=tr(t);let{class:a,style:l}=t;a&&!Xe(a)&&(t.class=Ze(a)),Ve(l)&&(Ls(l)&&!me(l)&&(l=ze({},l)),t.style=gt(l))}const o=Xe(e)?1:oo(e)?128:vu(e)?64:Ve(e)?4:Te(e)?2:0;return ne(e,t,r,n,s,o,i,!0)}function tr(e){return e?Ls(e)||td(e)?ze({},e):e:null}function hr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ge(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&yd(u),ref:t&&t.ref?r&&i?me(i)?i.concat(ao(t)):[i,ao(t)]:ao(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hr(e.ssContent),ssFallback:e.ssFallback&&hr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Fr(c,l.clone(c)),c}function Me(e=" ",t=0){return q(ln,null,e,t)}function Ja(e,t){const r=q(qn,null,e);return r.staticCount=t,r}function ke(e="",t=!1){return t?(D(),j(it,null,e)):q(it,null,e)}function Bt(e){return e==null||typeof e=="boolean"?q(it):me(e)?q(Be,null,e.slice()):Ur(e)?zr(e):q(ln,null,String(e))}function zr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hr(e)}function Ya(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(me(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Ya(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!td(t)?t._ctx=_t:s===3&&_t&&(_t.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Te(t)?(t={default:t,_ctx:_t},r=32):(t=String(t),n&64?(r=16,t=[Me(t)]):r=8);e.children=t,e.shapeFlag|=r}function ge(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=Ze([t.class,n.class]));else if(s==="style")t.style=gt([t.style,n.style]);else if(Ps(s)){const i=t[s],o=n[s];o&&i!==o&&!(me(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Lt(e,t,r,n=null){Xt(e,t,7,[r,n])}var wm=Gu(),ym=0;function bd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||wm,i={uid:ym++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new la(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nd(n,s),emitsOptions:Yu(n,s),emit:null,emitted:null,propsDefaults:Ne,inheritAttrs:n.inheritAttrs,ctx:Ne,data:Ne,props:Ne,attrs:Ne,slots:Ne,refs:Ne,setupState:Ne,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Zv.bind(null,i),e.ce&&e.ce(i),i}var St=null,ot=()=>St||_t,lo,Za;{const e=Ri(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};lo=t("__VUE_INSTANCE_SETTERS__",r=>St=r),Za=t("__VUE_SSR_SETTERS__",r=>gs=r)}var Ln=e=>{const t=St;return lo(e),e.scope.on(),()=>{e.scope.off(),lo(t)}},co=()=>{St&&St.scope.off(),lo(null)};function _d(e){return e.vnode.shapeFlag&4}var gs=!1;function Sd(e,t=!1,r=!1){t&&Za(t);const{props:n,children:s}=e.vnode,i=_d(e);nm(e,n,i,t),am(e,s,r||t);const o=i?bm(e,t):void 0;return t&&Za(!1),o}function bm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:n}=r;if(n){Dr();const s=e.setupContext=n.length>1?xd(e):null,i=Ln(e),o=is(n,e,0,[e.props,s]),a=oa(o);if(Or(),i(),(a||e.sp)&&!Vr(e)&&$a(e),a){if(o.then(co,co),t)return o.then(l=>{Xa(e,l,t)}).catch(l=>{On(l,e,0)});e.asyncDep=o}else Xa(e,o,t)}else Cd(e,t)}function Xa(e,t,r){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ve(t)&&(e.setupState=_a(t)),Cd(e,r)}var uo,Qa;function _m(e){uo=e,Qa=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,kv))}}var Sm=()=>!uo;function Cd(e,t,r){const n=e.type;if(!e.render){if(!t&&uo&&!n.render){const s=n.template||Fa(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=ze(ze({isCustomElement:i,delimiters:a},o),l);n.render=uo(s,u)}}e.render=n.render||Zt,Qa&&Qa(e)}{const s=Ln(e);Dr();try{jv(e)}finally{Or(),s()}}}var Cm={get(e,t){return Tt(e,"get",""),e[t]}};function xd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Cm),slots:e.slots,emit:e.emit,expose:t}}function si(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_a(ba(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Xs)return Xs[r](e)},has(t,r){return r in t||r in Xs}})):e.proxy}function el(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function xm(e){return Te(e)&&"__vccOpts"in e}var V=(e,t)=>zg(e,t,gs);function rr(e,t,r){try{ni(-1);const n=arguments.length;return n===2?Ve(t)&&!me(t)?Ur(t)?q(e,null,[t]):q(e,t):q(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ur(r)&&(r=[r]),q(e,t,r))}finally{ni(1)}}function Tm(){return;function e(t,r,n){const s=t[n];if(me(s)&&s.includes(r)||Ve(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function Em(e,t,r,n){const s=r[n];if(s&&Td(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Td(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if($t(r[n],t[n]))return!1;return Bn>0&&It&&It.push(e),!0}var Ed="3.5.29",Am=Zt,Im=ev,Rm=ls,km=uu,$m={createComponentInstance:bd,setupComponent:Sd,renderComponentRoot:no,setCurrentRenderingInstance:Us,isVNode:Ur,normalizeVNode:Bt,getComponentPublicInstance:si,ensureValidVNode:Ma,pushWarningContext:Yg,popWarningContext:Zg},sx=null,ix=null,ox=null;var tl=void 0,Ad=typeof window<"u"&&window.trustedTypes;if(Ad)try{tl=Ad.createPolicy("vue",{createHTML:e=>e})}catch{}var Id=tl?e=>tl.createHTML(e):e=>e,Pm="http://www.w3.org/2000/svg",Dm="http://www.w3.org/1998/Math/MathML",Kr=typeof document<"u"?document:null,Rd=Kr&&Kr.createElement("template"),kd={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Kr.createElementNS(Pm,e):t==="mathml"?Kr.createElementNS(Dm,e):r?Kr.createElement(e,{is:r}):Kr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Kr.createTextNode(e),createComment:e=>Kr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Kr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Rd.innerHTML=Id(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Rd.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},cn="transition",ii="animation",vs=Symbol("_vtc"),$d={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Pd=ze({},Ra,$d),Om=e=>(e.displayName="Transition",e.props=Pd,e),Hm=Om((e,{slots:t})=>rr(Cu,Od(e),t)),Fn=(e,t=[])=>{me(e)?e.forEach(r=>r(...t)):e&&e(...t)},Dd=e=>e?me(e)?e.some(t=>t.length>1):e.length>1:!1;function Od(e){const t={};for(const E in e)E in $d||(t[E]=e[E]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=Mm(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:v,onEnter:C,onEnterCancelled:y,onLeave:b,onLeaveCancelled:_,onBeforeAppear:T=v,onAppear:P=C,onAppearCancelled:g=y}=t,M=(E,A,Z,ee)=>{E._enterCancelled=ee,un(E,A?c:a),un(E,A?u:o),Z&&Z()},N=(E,A)=>{E._isLeaving=!1,un(E,d),un(E,h),un(E,p),A&&A()},S=E=>(A,Z)=>{const ee=E?P:C,z=()=>M(A,E,Z);Fn(ee,[A,z]),Hd(()=>{un(A,E?l:i),Tr(A,E?c:a),Dd(ee)||Md(A,n,w,z)})};return ze(t,{onBeforeEnter(E){Fn(v,[E]),Tr(E,i),Tr(E,o)},onBeforeAppear(E){Fn(T,[E]),Tr(E,l),Tr(E,u)},onEnter:S(!1),onAppear:S(!0),onLeave(E,A){E._isLeaving=!0;const Z=()=>N(E,A);Tr(E,d),E._enterCancelled?(Tr(E,p),nl(E)):(nl(E),Tr(E,p)),Hd(()=>{E._isLeaving&&(un(E,d),Tr(E,h),Dd(b)||Md(E,n,x,Z))}),Fn(b,[E,Z])},onEnterCancelled(E){M(E,!1,void 0,!0),Fn(y,[E])},onAppearCancelled(E){M(E,!0,void 0,!0),Fn(g,[E])},onLeaveCancelled(E){N(E),Fn(_,[E])}})}function Mm(e){if(e==null)return null;if(Ve(e))return[rl(e.enter),rl(e.leave)];{const t=rl(e);return[t,t]}}function rl(e){return Ii(e)}function Tr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[vs]||(e[vs]=new Set)).add(t)}function un(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[vs];r&&(r.delete(t),r.size||(e[vs]=void 0))}function Hd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Nm=0;function Md(e,t,r,n){const s=e._endId=++Nm,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Nd(e,t);if(!o)return n();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,p),i()},p=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,p)}function Nd(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${cn}Delay`),i=n(`${cn}Duration`),o=qd(s,i),a=n(`${ii}Delay`),l=n(`${ii}Duration`),u=qd(a,l);let c=null,d=0,p=0;t===cn?o>0&&(c=cn,d=o,p=i.length):t===ii?u>0&&(c=ii,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?cn:ii:null,p=c?c===cn?i.length:l.length:0);const h=c===cn&&/\b(?:transform|all)(?:,|$)/.test(n(`${cn}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function qd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Bd(r)+Bd(e[n])))}function Bd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function nl(e){return(e?e.ownerDocument:document).body.offsetHeight}function qm(e,t,r){const n=e[vs];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var fo=Symbol("_vod"),Ld=Symbol("_vsh"),po={name:"show",beforeMount(e,{value:t},{transition:r}){e[fo]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):oi(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),oi(e,!0),n.enter(e)):n.leave(e,()=>{oi(e,!1)}):oi(e,t))},beforeUnmount(e,{value:t}){oi(e,t)}};function oi(e,t){e.style.display=t?e[fo]:"none",e[Ld]=!t}function Bm(){po.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Fd=Symbol("");function Lm(e){const t=ot();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>ho(i,s))},n=()=>{const s=e(t.proxy);t.ce?ho(t.ce,s):sl(t.subTree,s),r(s)};Da(()=>{Vs(n)}),Ke(()=>{Ie(n,Zt,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Ot(()=>s.disconnect())})}function sl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{sl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ho(e.el,t);else if(e.type===Be)e.children.forEach(r=>sl(r,t));else if(e.type===qn){let{el:r,anchor:n}=e;for(;r&&(ho(r,t),r!==n);)r=r.nextSibling}}function ho(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=mg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Fd]=n}}var Fm=/(?:^|;)\s*display\s*:/;function Vm(e,t,r){const n=e.style,s=Xe(r);let i=!1;if(r&&!s){if(t)if(Xe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&go(n,a,"")}else for(const o in t)r[o]==null&&go(n,o,"");for(const o in r)o==="display"&&(i=!0),go(n,o,r[o])}else if(s){if(t!==r){const o=n[Fd];o&&(r+=";"+o),n.cssText=r,i=Fm.test(r)}}else t&&e.removeAttribute("style");fo in e&&(e[fo]=i?n.display:"",e[Ld]&&(n.display="none"))}var Vd=/\s*!important$/;function go(e,t,r){if(me(r))r.forEach(n=>go(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=jm(e,t);Vd.test(r)?e.setProperty(Nt(n),r.replace(Vd,""),"important"):e[n]=r}}var jd=["Webkit","Moz","ms"],il={};function jm(e,t){const r=il[t];if(r)return r;let n=dt(t);if(n!=="filter"&&n in e)return il[t]=n;n=Ds(n);for(let s=0;s<jd.length;s++){const i=jd[s]+n;if(i in e)return il[t]=i}return t}var Ud="http://www.w3.org/1999/xlink";function zd(e,t,r,n,s,i=gg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Ud,t.slice(6,t.length)):e.setAttributeNS(Ud,t,r):r==null||i&&!Oc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":cr(r)?String(r):r)}function Kd(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Id(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=r==null?e.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in e))&&(e.value=l),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const a=typeof e[t];a==="boolean"?r=Oc(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(s||t)}function Wr(e,t,r,n){e.addEventListener(t,r,n)}function Um(e,t,r,n){e.removeEventListener(t,r,n)}var Wd=Symbol("_vei");function zm(e,t,r,n,s=null){const i=e[Wd]||(e[Wd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=Km(t);n?Wr(e,a,i[t]=Jm(n,s),l):o&&(Um(e,a,o,l),i[t]=void 0)}}var Gd=/(?:Once|Passive|Capture)$/;function Km(e){let t;if(Gd.test(e)){t={};let r;for(;r=e.match(Gd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Nt(e.slice(2)),t]}var ol=0,Wm=Promise.resolve(),Gm=()=>ol||(Wm.then(()=>ol=0),ol=Date.now());function Jm(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Xt(Ym(n,r.value),t,5,[n])};return r.value=e,r.attached=Gm(),r}function Ym(e,t){if(me(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}var Jd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Yd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?qm(e,n,o):t==="style"?Vm(e,r,n):Ps(t)?sa(t)||zm(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zm(e,t,n,o))?(Kd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Xe(n))?Kd(e,dt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),zd(e,t,n,o))};function Zm(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jd(t)&&Te(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Jd(t)&&Xe(r)?!1:t in e}var Zd={};function al(e,t,r){let n=te(e,t);xi(n)&&(n=ze({},n,t));class s extends Xd{constructor(o){super(n,o,r)}}return s.def=n,s}var Xm=((e,t)=>al(e,t,wf)),Qm=typeof HTMLElement<"u"?HTMLElement:class{},Xd=class Xh extends Qm{constructor(t,r={},n=dl){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==dl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(ze({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Xh){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,vt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let a;if(i&&!me(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ii(this._props[l])),(a||(a=Object.create(null)))[dt(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)Ue(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=me(r)?r:Object.keys(r||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(dt))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):Zd;const s=dt(t);r&&this._numberProps&&this._numberProps[s]&&(n=Ii(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,s=!1){if(r!==this._props[t]&&(this._dirty=!0,r===Zd?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),s&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(Nt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Nt(t),r+""):r||this.removeAttribute(Nt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),mf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=q(this._def,ze(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,xi(o[0])?ze({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Nt(i)!==i&&s(Nt(i),o)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");n&&i.setAttribute("nonce",n),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],i=s.getAttribute("name")||"default",o=this._slots[i],a=s.parentNode;if(o)for(const l of o){if(r&&l.nodeType===1){const u=r+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let i=0;i<s.length;i++)r.add(s[i])}return Array.from(r)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}};function Qd(e){const t=ot(),r=t&&t.ce;return r||null}function e0(){const e=Qd();return e&&e.shadowRoot}function t0(e="$style"){{const t=ot();if(!t)return Ne;const r=t.type.__cssModules;if(!r)return Ne;const n=r[e];return n||Ne}}var ef=new WeakMap,tf=new WeakMap,vo=Symbol("_moveCb"),rf=Symbol("_enterCb"),r0=e=>(delete e.props.mode,e),n0=r0({name:"TransitionGroup",props:ze({},Pd,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ot(),n=Ia();let s,i;return Ys(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!a0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(s0),s.forEach(i0);const a=s.filter(o0);nl(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Tr(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[vo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[vo]=null,un(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=qe(e),a=Od(o);let l=o.tag||Be;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Fr(c,cs(c,a,n,r)),ef.set(c,nf(c.el)))}i=t.default?Gi(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Fr(c,cs(c,a,n,r))}return q(l,null,i)}}});function s0(e){const t=e.el;t[vo]&&t[vo](),t[rf]&&t[rf]()}function i0(e){tf.set(e,nf(e.el))}function o0(e){const t=ef.get(e),r=tf.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function nf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function a0(e,t,r){const n=e.cloneNode(),s=e[vs];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Nd(n);return i.removeChild(n),o}var dn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return me(t)?r=>rs(t,r):t};function l0(e){e.target.composing=!0}function sf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var nr=Symbol("_assign");function of(e,t,r){return t&&(e=e.trim()),r&&(e=Ai(e)),e}var ai={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[nr]=dn(s);const i=n||s.props&&s.props.type==="number";Wr(e,t?"change":"input",o=>{o.target.composing||e[nr](of(e.value,r,i))}),(r||i)&&Wr(e,"change",()=>{e.value=of(e.value,r,i)}),t||(Wr(e,"compositionstart",l0),Wr(e,"compositionend",sf),Wr(e,"change",sf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[nr]=dn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ai(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},ll={deep:!0,created(e,t,r){e[nr]=dn(r),Wr(e,"change",()=>{const n=e._modelValue,s=ms(e),i=e.checked,o=e[nr];if(me(n)){const a=ki(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const u=[...n];u.splice(a,1),o(u)}}else if($n(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(uf(e,i))})},mounted:af,beforeUpdate(e,t,r){e[nr]=dn(r),af(e,t,r)}};function af(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(me(t))s=ki(t,n.props.value)>-1;else if($n(t))s=t.has(n.props.value);else{if(t===r)return;s=Pr(t,uf(e,!0))}e.checked!==s&&(e.checked=s)}var cl={created(e,{value:t},r){e.checked=Pr(t,r.props.value),e[nr]=dn(r),Wr(e,"change",()=>{e[nr](ms(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[nr]=dn(n),t!==r&&(e.checked=Pr(t,n.props.value))}},lf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=$n(t);Wr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Ai(ms(o)):ms(o));e[nr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,vt(()=>{e._assigning=!1})}),e[nr]=dn(n)},mounted(e,{value:t}){cf(e,t)},beforeUpdate(e,t,r){e[nr]=dn(r)},updated(e,{value:t}){e._assigning||cf(e,t)}};function cf(e,t){const r=e.multiple,n=me(t);if(!(r&&!n&&!$n(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=ms(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=ki(t,a)>-1}else o.selected=t.has(a);else if(Pr(ms(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ms(e){return"_value"in e?e._value:e.value}function uf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var df={created(e,t,r){mo(e,t,r,null,"created")},mounted(e,t,r){mo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){mo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){mo(e,t,r,n,"updated")}};function ff(e,t){switch(e){case"SELECT":return lf;case"TEXTAREA":return ai;default:switch(t){case"checkbox":return ll;case"radio":return cl;default:return ai}}}function mo(e,t,r,n,s){const i=ff(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function c0(){ai.getSSRProps=({value:e})=>({value:e}),cl.getSSRProps=({value:e},t)=>{if(t.props&&Pr(t.props.value,e))return{checked:!0}},ll.getSSRProps=({value:e},t)=>{if(me(e)){if(t.props&&ki(e,t.props.value)>-1)return{checked:!0}}else if($n(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},df.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=ff(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var u0=["ctrl","shift","alt","meta"],d0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>u0.some(r=>e[`${r}Key`]&&!t.includes(r))},sr=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<t.length;o++){const a=d0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},f0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ul=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Nt(s.key);if(t.some(o=>o===i||f0[o]===i))return e(s)}))},pf=ze({patchProp:Yd},kd),li,hf=!1;function gf(){return li||(li=ld(pf))}function vf(){return li=hf?li:cd(pf),hf=!0,li}var mf=((...e)=>{gf().render(...e)}),p0=((...e)=>{vf().hydrate(...e)}),dl=((...e)=>{const t=gf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=bf(n);if(!s)return;const i=t._component;!Te(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,yf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),wf=((...e)=>{const t=vf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=bf(n);if(s)return r(s,!0,yf(s))},t});function yf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bf(e){return Xe(e)?document.querySelector(e):e}var _f=!1,h0=()=>{_f||(_f=!0,c0(),Bm())},g0=sg({BaseTransition:()=>Cu,BaseTransitionPropsValidators:()=>Ra,Comment:()=>it,DeprecationTypes:()=>null,EffectScope:()=>la,ErrorCodes:()=>Qg,ErrorTypeStrings:()=>Im,Fragment:()=>Be,KeepAlive:()=>xv,ReactiveEffect:()=>Os,Static:()=>qn,Suspense:()=>um,Teleport:()=>Ea,Text:()=>ln,TrackOpTypes:()=>Kg,Transition:()=>Hm,TransitionGroup:()=>n0,TriggerOpTypes:()=>Wg,VueElement:()=>Xd,assertNumber:()=>Xg,callWithAsyncErrorHandling:()=>Xt,callWithErrorHandling:()=>is,camelize:()=>dt,capitalize:()=>Ds,cloneVNode:()=>hr,compatUtils:()=>null,compile:()=>v0,computed:()=>V,createApp:()=>dl,createBlock:()=>j,createCommentVNode:()=>ke,createElementBlock:()=>we,createElementVNode:()=>ne,createHydrationRenderer:()=>cd,createPropsRestProxy:()=>Fv,createRenderer:()=>ld,createSSRApp:()=>wf,createSlots:()=>Rv,createStaticVNode:()=>Ja,createTextVNode:()=>Me,createVNode:()=>q,customRef:()=>Fs,defineAsyncComponent:()=>Cv,defineComponent:()=>te,defineCustomElement:()=>al,defineEmits:()=>Pv,defineExpose:()=>Dv,defineModel:()=>Mv,defineOptions:()=>Ov,defineProps:()=>$v,defineSSRCustomElement:()=>Xm,defineSlots:()=>Hv,devtools:()=>Rm,effect:()=>yg,effectScope:()=>ca,getCurrentInstance:()=>ot,getCurrentScope:()=>$i,getCurrentWatcher:()=>Gg,getTransitionRawChildren:()=>Gi,guardReactiveProps:()=>tr,h:()=>rr,handleError:()=>On,hasInjectionContext:()=>ov,hydrate:()=>p0,hydrateOnIdle:()=>mv,hydrateOnInteraction:()=>_v,hydrateOnMediaQuery:()=>bv,hydrateOnVisible:()=>yv,initCustomFormatter:()=>Tm,initDirectivesForSSR:()=>h0,inject:()=>Dt,isMemoSame:()=>Td,isProxy:()=>Ls,isReactive:()=>Br,isReadonly:()=>_r,isRef:()=>We,isRuntimeOnly:()=>Sm,isShallow:()=>qt,isVNode:()=>Ur,markRaw:()=>ba,mergeDefaults:()=>ju,mergeModels:()=>Lv,mergeProps:()=>ge,nextTick:()=>vt,nodeOps:()=>kd,normalizeClass:()=>Ze,normalizeProps:()=>ur,normalizeStyle:()=>gt,onActivated:()=>$u,onBeforeMount:()=>Ou,onBeforeUnmount:()=>ps,onBeforeUpdate:()=>Da,onDeactivated:()=>Pu,onErrorCaptured:()=>qu,onMounted:()=>Ke,onRenderTracked:()=>Nu,onRenderTriggered:()=>Mu,onScopeDispose:()=>ua,onServerPrefetch:()=>Hu,onUnmounted:()=>Ot,onUpdated:()=>Ys,onWatcherCleanup:()=>su,openBlock:()=>D,patchProp:()=>Yd,popScopeId:()=>sv,provide:()=>Hn,proxyRefs:()=>_a,pushScopeId:()=>nv,queuePostFlushCb:()=>Vs,reactive:()=>Nr,readonly:()=>Et,ref:()=>F,registerRuntimeCompiler:()=>_m,render:()=>mf,renderList:()=>er,renderSlot:()=>oe,resolveComponent:()=>Av,resolveDirective:()=>Iv,resolveDynamicComponent:()=>Zs,resolveFilter:()=>null,resolveTransitionHooks:()=>cs,setBlockTracking:()=>ni,setDevtoolsHook:()=>km,setTransitionHooks:()=>Fr,shallowReactive:()=>eu,shallowReadonly:()=>qr,shallowRef:()=>rt,ssrContextKey:()=>du,ssrUtils:()=>$m,stop:()=>bg,toDisplayString:()=>Oe,toHandlerKey:()=>ts,toHandlers:()=>Fu,toRaw:()=>qe,toRef:()=>Sa,toRefs:()=>At,toValue:()=>Se,transformVNodeArgs:()=>vm,triggerRef:()=>ru,unref:()=>f,useAttrs:()=>Bv,useCssModule:()=>t0,useCssVars:()=>Lm,useHost:()=>Qd,useId:()=>Eu,useModel:()=>Yv,useSSRContext:()=>fu,useShadowRoot:()=>e0,useSlots:()=>qv,useTemplateRef:()=>uv,useTransitionState:()=>Ia,vModelCheckbox:()=>ll,vModelDynamic:()=>df,vModelRadio:()=>cl,vModelSelect:()=>lf,vModelText:()=>ai,vShow:()=>po,version:()=>Ed,warn:()=>Am,watch:()=>Ie,watchEffect:()=>tt,watchPostEffect:()=>xa,watchSyncEffect:()=>pu,withAsyncContext:()=>Vv,withCtx:()=>R,withDefaults:()=>Nv,withDirectives:()=>zi,withKeys:()=>ul,withMemo:()=>Em,withModifiers:()=>sr,withScopeId:()=>iv},1),v0=()=>{},m0=2;const gr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},w0=(e="webphone_db")=>{const t=F(null),r=F(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,m0);c.onerror=d=>{console.error("IndexedDB error:",d),u(d)},c.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},c.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(gr.CALL_HISTORY)||p.createObjectStore(gr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(gr.CONTACTS)||p.createObjectStore(gr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(gr.CONNECTIONS)||p.createObjectStore(gr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((u,c)=>{if(!t.value)return c("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>u(d.result),d.onerror=()=>c(d.error)}),add:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),put:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),remove:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),isReady:r}},y0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=w0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(gr.CALL_HISTORY)).sort((K,ce)=>ce.startTime-K.startTime),i.value=await a(gr.CONTACTS)}catch(K){console.error("Error loading data from IndexedDB:",K)}});const u=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=F(e?.initialKeypadVisible??!0),d=F(""),p=F(!1),h=V(()=>u.value.find(K=>K.id===r.value)||u.value[0]),m=V(()=>h.value?.status||"idle"),w=V(()=>h.value?.remoteNumber||""),x=V(()=>h.value?.isMuted||!1),v=V(()=>h.value?.isHeld||!1),C=V({get:()=>h.value?.keypadValue||"",set:K=>{h.value&&(h.value.keypadValue=K)}}),y=K=>{t.value=K},b=K=>{u.value.some(ce=>ce.id===K)&&(r.value=K)},_=(K,ce)=>{const pe=u.value.find(Ce=>Ce.id===K);pe&&Object.assign(pe,ce)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:v,keypadValue:C,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:y,setActiveChannelId:b,updateChannelState:_,setCallStatus:K=>{_(r.value,{status:K})},setIncomingCall:K=>{_(r.value,{remoteNumber:K})},resetCall:()=>{_(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async K=>{const ce={id:crypto.randomUUID(),...K};s.value.unshift(ce);try{await l(gr.CALL_HISTORY,ce)}catch(pe){console.error("Error saving call log:",pe)}},callHistory:s,contacts:i,addContact:async K=>{try{await l(gr.CONTACTS,K),i.value=await a(gr.CONTACTS)}catch(ce){console.error("Error saving contact:",ce)}},setMuted:K=>{_(r.value,{isMuted:K})},setHeld:K=>{_(r.value,{isHeld:K})},appendKeypad:K=>{C.value+=K},clearKeypad:()=>{C.value=""},backspaceKeypad:()=>{C.value=C.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:K=>{d.value=K},setTransferInProgress:K=>{n.value=K},toggleVideoMode:()=>{p.value=!p.value}}},b0="0.21.1";var Vn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},fl=class extends Vn{constructor(e){super(e||"Unsupported content type.")}},pl=class extends Vn{constructor(e){super(e||"Request pending.")}},_0=class extends Vn{constructor(e){super(e||"Unspecified session description handler error.")}},hl=class extends Vn{constructor(){super("The session has terminated.")}},ci=class extends Vn{constructor(e){super(e||"An error occurred during state transition.")}},S0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},C0=class{constructor(e){this.incomingByeRequest=e}get request(){return this.incomingByeRequest.message}accept(e){return this.incomingByeRequest.accept(e),Promise.resolve()}reject(e){return this.incomingByeRequest.reject(e),Promise.resolve()}},x0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},ui=class{constructor(){this.listeners=new Array}addListener(e,t){const r=n=>{this.removeListener(r),e(n)};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}emit(e){this.listeners.slice().forEach(t=>t(e))}removeAllListeners(){this.listeners=[]}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}on(e){return this.addListener(e)}off(e){return this.removeListener(e)}once(e){return this.addListener(e,{once:!0})}},T0=class{constructor(e){this.incomingInfoRequest=e}get request(){return this.incomingInfoRequest.message}accept(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}reject(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}},Sf=class{constructor(e){this.parameters={};for(const t in e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}setParam(e,t){e&&(this.parameters[e.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(e){if(e)return this.parameters[e.toLowerCase()]}hasParam(e){return!!(e&&this.parameters[e.toLowerCase()]!==void 0)}deleteParam(e){if(e=e.toLowerCase(),this.hasParam(e)){const t=this.parameters[e];return delete this.parameters[e],t}}clearParams(){this.parameters={}}},ir=class Qh extends Sf{constructor(t,r,n){super(n),this.uri=t,this._displayName=r}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(t){this._displayName=t}clone(){return new Qh(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let t=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";t+="<"+this.uri.toString()+">";for(const r in this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,this.parameters[r]!==null&&(t+="="+this.parameters[r]));return t}},fn=class eg extends Sf{constructor(t="sip",r,n,s,i,o){if(super(i||{}),this.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(const a in o)o.hasOwnProperty(a)&&this.setHeader(a,o[a]);this.raw={scheme:t,user:r,host:n,port:s},this.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:s}}get scheme(){return this.normal.scheme}set scheme(t){this.raw.scheme=t,this.normal.scheme=t.toLowerCase()}get user(){return this.normal.user}set user(t){this.normal.user=this.raw.user=t}get host(){return this.normal.host}set host(t){this.raw.host=t,this.normal.host=t.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(t){this.normal.port=this.raw.port=t}setHeader(t,r){this.headers[this.headerize(t)]=r instanceof Array?r:[r]}getHeader(t){if(t)return this.headers[this.headerize(t)]}hasHeader(t){return!!t&&!!this.headers.hasOwnProperty(this.headerize(t))}deleteHeader(t){if(t=this.headerize(t),this.headers.hasOwnProperty(t)){const r=this.headers[t];return delete this.headers[t],r}}clearHeaders(){this.headers={}}clone(){return new eg(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}toRaw(){return this._toString(this._raw)}toString(){return this._toString(this._normal)}get _normal(){return this.normal}get _raw(){return this.raw}_toString(t){let r=t.scheme+":";t.scheme.toLowerCase().match("^sips?$")||(r+="//"),t.user&&(r+=this.escapeUser(t.user)+"@"),r+=t.host,(t.port||t.port===0)&&(r+=":"+t.port);for(const s in this.parameters)this.parameters.hasOwnProperty(s)&&(r+=";"+s,this.parameters[s]!==null&&(r+="="+this.parameters[s]));const n=[];for(const s in this.headers)if(this.headers.hasOwnProperty(s))for(const i in this.headers[s])this.headers[s].hasOwnProperty(i)&&n.push(s+"="+this.headers[s][i]);return n.length>0&&(r+="?"+n.join("&")),r}escapeUser(t){let r;try{r=decodeURIComponent(t)}catch(n){throw n}return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}headerize(t){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},n=t.toLowerCase().replace(/_/g,"-").split("-"),s=n.length;let i="";for(let o=0;o<s;o++)o!==0&&(i+="-"),i+=n[o].charAt(0).toUpperCase()+n[o].substring(1);return r[i]&&(i=r[i]),i}};function Cf(e,t){if(e.scheme!==t.scheme||e.user!==t.user||e.host!==t.host||e.port!==t.port)return!1;function r(i,o){const a=Object.keys(i.parameters),l=Object.keys(o.parameters);return!(!a.filter(u=>l.includes(u)).every(u=>i.parameters[u]===o.parameters[u])||!["user","ttl","method","transport"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u))||!["maddr"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u)))}if(!r(e,t))return!1;const n=Object.keys(e.headers),s=Object.keys(t.headers);if(n.length!==0||s.length!==0){if(n.length!==s.length)return!1;const i=n.filter(o=>s.includes(o));if(i.length!==s.length||!i.every(o=>e.headers[o].length&&t.headers[o].length&&e.headers[o][0]===t.headers[o][0]))return!1}return!0}function gl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var xf=class ta extends Error{constructor(t,r,n,s){super(),this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,ta.prototype):this.__proto__=ta.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ta)}static buildMessage(t,r){function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function s(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function i(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function o(u){switch(u.type){case"literal":return'"'+s(u.text)+'"';case"class":const c=u.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(u.inverted?"^":"")+c+"]";case"any":return"any character";case"end":return"end of input";case"other":return u.description}}function a(u){const c=u.map(o);let d,p;if(c.sort(),c.length>0){for(d=1,p=1;d<c.length;d++)c[d-1]!==c[d]&&(c[p]=c[d],p++);c.length=p}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function l(u){return u?'"'+s(u)+'"':"end of input"}return"Expected "+a(t)+" but "+l(r)+" found."}format(t){let r="Error: "+this.message;if(this.location){let n=null,s;for(s=0;s<t.length;s++)if(t[s].source===this.location.source){n=t[s].text.split(/\r\n|\n|\r/g);break}let i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){let a=this.location.end,l=gl("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
3
+ (function(){var Ac=Object.defineProperty,sg=(e,t)=>{let r={};for(var n in e)Ac(r,n,{get:e[n],enumerable:!0});return t&&Ac(r,Symbol.toStringTag,{value:"Module"}),r};function $s(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var qe={},Qn=[],Qt=()=>{},Ic=()=>!1,Ps=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sa=e=>e.startsWith("onUpdate:"),Ke=Object.assign,ia=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},ig=Object.prototype.hasOwnProperty,ze=(e,t)=>ig.call(e,t),ve=Array.isArray,es=e=>ts(e)==="[object Map]",Pn=e=>ts(e)==="[object Set]",Rc=e=>ts(e)==="[object Date]",og=e=>ts(e)==="[object RegExp]",Ee=e=>typeof e=="function",Xe=e=>typeof e=="string",dr=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",oa=e=>(je(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),kc=Object.prototype.toString,ts=e=>kc.call(e),ag=e=>ts(e).slice(8,-1),xi=e=>ts(e)==="[object Object]",Ti=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dn=$s(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ei=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},lg=/-\w/g,ft=Ei(e=>e.replace(lg,t=>t.slice(1).toUpperCase())),cg=/\B([A-Z])/g,Bt=Ei(e=>e.replace(cg,"-$1").toLowerCase()),Ds=Ei(e=>e.charAt(0).toUpperCase()+e.slice(1)),rs=Ei(e=>e?`on${Ds(e)}`:""),Pt=(e,t)=>!Object.is(e,t),ns=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},$c=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Ai=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ii=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t},Pc,Ri=()=>Pc||(Pc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ug=$s("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function vt(e){if(ve(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=Xe(n)?hg(n):vt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(Xe(e)||je(e))return e}var dg=/;(?![^(]*\))/g,fg=/:([^]+)/,pg=/\/\*[^]*?\*\//g;function hg(e){const t={};return e.replace(pg,"").split(dg).forEach(r=>{if(r){const n=r.split(fg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ze(e){let t="";if(Xe(e))t=e;else if(ve(e))for(let r=0;r<e.length;r++){const n=Ze(e[r]);n&&(t+=n+" ")}else if(je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function fr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!Xe(t)&&(e.class=Ze(t)),r&&(e.style=vt(r)),e}var Dc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",gg=$s(Dc),rx=$s(Dc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Oc(e){return!!e||e===""}function vg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Pr(e[n],t[n]);return r}function Pr(e,t){if(e===t)return!0;let r=Rc(e),n=Rc(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=dr(e),n=dr(t),r||n)return e===t;if(r=ve(e),n=ve(t),r||n)return r&&n?vg(e,t):!1;if(r=je(e),n=je(t),r||n){if(!r||!n||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e){const i=e.hasOwnProperty(s),o=t.hasOwnProperty(s);if(i&&!o||!i&&o||!Pr(e[s],t[s]))return!1}}return String(e)===String(t)}function ki(e,t){return e.findIndex(r=>Pr(r,t))}var Hc=e=>!!(e&&e.__v_isRef===!0),Oe=e=>Xe(e)?e:e==null?"":ve(e)||je(e)&&(e.toString===kc||!Ee(e.toString))?Hc(e)?Oe(e.value):JSON.stringify(e,Mc,2):String(e),Mc=(e,t)=>Hc(t)?Mc(e,t.value):es(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[aa(n,i)+" =>"]=s,r),{})}:Pn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>aa(r))}:dr(t)?aa(t):je(t)&&!ve(t)&&!xi(t)?String(t):t,aa=(e,t="")=>{var r;return dr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function mg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Tt,la=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Tt,!e&&Tt&&(this.index=(Tt.scopes||(Tt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=Tt;try{return Tt=this,e()}finally{Tt=t}}}on(){++this._on===1&&(this.prevScope=Tt,Tt=this)}off(){this._on>0&&--this._on===0&&(Tt=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,r;for(t=0,r=this.effects.length;t<r;t++)this.effects[t].stop();for(this.effects.length=0,t=0,r=this.cleanups.length;t<r;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function ca(e){return new la(e)}function $i(){return Tt}function ua(e,t=!1){Tt&&Tt.cleanups.push(e)}var Qe,da=new WeakSet,Os=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Tt&&Tt.active&&Tt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,da.has(this)&&(da.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||qc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,jc(this),Bc(this);const e=Qe,t=pr;Qe=this,pr=!0;try{return this.fn()}finally{Lc(this),Qe=e,pr=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ga(e);this.deps=this.depsTail=void 0,jc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?da.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ha(this)&&this.run()}get dirty(){return ha(this)}},Nc=0,Hs,Ms;function qc(e,t=!1){if(e.flags|=8,t){e.next=Ms,Ms=e;return}e.next=Hs,Hs=e}function fa(){Nc++}function pa(){if(--Nc>0)return;if(Ms){let t=Ms;for(Ms=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Hs;){let t=Hs;for(Hs=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function Bc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ga(n),wg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function ha(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Fc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ns)||(e.globalVersion=Ns,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ha(e))))return;e.flags|=2;const t=e.dep,r=Qe,n=pr;Qe=e,pr=!0;try{Bc(e);const s=e.fn(e._value);(t.version===0||Pt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Qe=r,pr=n,Lc(e),e.flags&=-3}}function ga(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)ga(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function wg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function yg(e,t){e.effect instanceof Os&&(e=e.effect.fn);const r=new Os(e);t&&Ke(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function bg(e){e.effect.stop()}var pr=!0,Vc=[];function Dr(){Vc.push(pr),pr=!1}function Or(){const e=Vc.pop();pr=e===void 0?!0:e}function jc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=Qe;Qe=void 0;try{t()}finally{Qe=r}}}var Ns=0,_g=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Pi=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Qe||!pr||Qe===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Qe)t=this.activeLink=new _g(Qe,this),Qe.deps?(t.prevDep=Qe.depsTail,Qe.depsTail.nextDep=t,Qe.depsTail=t):Qe.deps=Qe.depsTail=t,Uc(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=Qe.depsTail,t.nextDep=void 0,Qe.depsTail.nextDep=t,Qe.depsTail=t,Qe.deps===t&&(Qe.deps=r)}return t}trigger(e){this.version++,Ns++,this.notify(e)}notify(e){fa();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{pa()}}};function Uc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Uc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Di=new WeakMap,On=Symbol(""),va=Symbol(""),qs=Symbol("");function Et(e,t,r){if(pr&&Qe){let n=Di.get(e);n||Di.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Pi),s.map=n,s.key=r),s.track()}}function Hr(e,t,r,n,s,i){const o=Di.get(e);if(!o){Ns++;return}const a=l=>{l&&l.trigger()};if(fa(),t==="clear")o.forEach(a);else{const l=ve(e),u=l&&Ti(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===qs||!dr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(qs)),t){case"add":l?u&&a(o.get("length")):(a(o.get(On)),es(e)&&a(o.get(va)));break;case"delete":l||(a(o.get(On)),es(e)&&a(o.get(va)));break;case"set":es(e)&&a(o.get(On));break}}pa()}function Sg(e,t){const r=Di.get(e);return r&&r.get(t)}function ss(e){const t=Be(e);return t===e?t:(Et(t,"iterate",qs),Lt(e)?t:t.map(hr))}function Oi(e){return Et(e=Be(e),"iterate",qs),e}function sn(e,t){return Sr(e)?is(Br(e)?hr(t):t):hr(t)}var Cg={__proto__:null,[Symbol.iterator](){return ma(this,Symbol.iterator,e=>sn(this,e))},concat(...e){return ss(this).concat(...e.map(t=>ve(t)?ss(t):t))},entries(){return ma(this,"entries",e=>(e[1]=sn(this,e[1]),e))},every(e,t){return Mr(this,"every",e,t,void 0,arguments)},filter(e,t){return Mr(this,"filter",e,t,r=>r.map(n=>sn(this,n)),arguments)},find(e,t){return Mr(this,"find",e,t,r=>sn(this,r),arguments)},findIndex(e,t){return Mr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Mr(this,"findLast",e,t,r=>sn(this,r),arguments)},findLastIndex(e,t){return Mr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Mr(this,"forEach",e,t,void 0,arguments)},includes(...e){return wa(this,"includes",e)},indexOf(...e){return wa(this,"indexOf",e)},join(e){return ss(this).join(e)},lastIndexOf(...e){return wa(this,"lastIndexOf",e)},map(e,t){return Mr(this,"map",e,t,void 0,arguments)},pop(){return Bs(this,"pop")},push(...e){return Bs(this,"push",e)},reduce(e,...t){return zc(this,"reduce",e,t)},reduceRight(e,...t){return zc(this,"reduceRight",e,t)},shift(){return Bs(this,"shift")},some(e,t){return Mr(this,"some",e,t,void 0,arguments)},splice(...e){return Bs(this,"splice",e)},toReversed(){return ss(this).toReversed()},toSorted(e){return ss(this).toSorted(e)},toSpliced(...e){return ss(this).toSpliced(...e)},unshift(...e){return Bs(this,"unshift",e)},values(){return ma(this,"values",e=>sn(this,e))}};function ma(e,t,r){const n=Oi(e),s=n[t]();return n!==e&&!Lt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var xg=Array.prototype;function Mr(e,t,r,n,s,i){const o=Oi(e),a=o!==e&&!Lt(e),l=o[t];if(l!==xg[t]){const d=l.apply(e,i);return a?hr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function zc(e,t,r,n){const s=Oi(e);let i=r;return s!==e&&(Lt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,sn(e,a),l,e)}),s[t](i,...n)}function wa(e,t,r){const n=Be(e);Et(n,"iterate",qs);const s=n[t](...r);return(s===-1||s===!1)&&Ls(r[0])?(r[0]=Be(r[0]),n[t](...r)):s}function Bs(e,t,r=[]){Dr(),fa();const n=Be(e)[t].apply(e,r);return pa(),Or(),n}var Tg=$s("__proto__,__v_isRef,__isVue"),Kc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(dr));function Eg(e){dr(e)||(e=String(e));const t=Be(this);return Et(t,"has",e),t.hasOwnProperty(e)}var Wc=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return r===(n?s?Qc:Xc:s?Zc:Yc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=ve(e);if(!n){let a;if(i&&(a=Cg[t]))return a;if(t==="hasOwnProperty")return Eg}const o=Reflect.get(e,t,Ge(e)?e:r);if((dr(t)?Kc.has(t):Tg(t))||(n||Et(e,"get",t),s))return o;if(Ge(o)){const a=i&&Ti(t)?o:o.value;return n&&je(a)?At(a):a}return je(o)?n?At(o):Nr(o):o}},Gc=class extends Wc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=ve(e)&&Ti(t);if(!this._isShallow){const l=Sr(s);if(!Lt(r)&&!Sr(r)&&(s=Be(s),r=Be(r)),!i&&Ge(s)&&!Ge(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:ze(e,t),a=Reflect.set(e,t,r,Ge(e)?e:n);return e===Be(n)&&(o?Pt(r,s)&&Hr(e,"set",t,r,s):Hr(e,"add",t,r)),a}deleteProperty(e,t){const r=ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Hr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!dr(t)||!Kc.has(t))&&Et(e,"has",t),r}ownKeys(e){return Et(e,"iterate",ve(e)?"length":On),Reflect.ownKeys(e)}},Jc=class extends Wc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Ag=new Gc,Ig=new Jc,Rg=new Gc(!0),kg=new Jc(!0),ya=e=>e,Hi=e=>Reflect.getPrototypeOf(e);function $g(e,t,r){return function(...n){const s=this.__v_raw,i=Be(s),o=es(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?ya:t?is:hr;return!t&&Et(i,"iterate",l?va:On),Ke(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function Mi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pg(e,t){const r={get(n){const s=this.__v_raw,i=Be(s),o=Be(n);e||(Pt(n,o)&&Et(i,"get",n),Et(i,"get",o));const{has:a}=Hi(i),l=t?ya:e?is:hr;if(a.call(i,n))return l(s.get(n));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(n)},get size(){const n=this.__v_raw;return!e&&Et(Be(n),"iterate",On),n.size},has(n){const s=this.__v_raw,i=Be(s),o=Be(n);return e||(Pt(n,o)&&Et(i,"has",n),Et(i,"has",o)),n===o?s.has(n):s.has(n)||s.has(o)},forEach(n,s){const i=this,o=i.__v_raw,a=Be(o),l=t?ya:e?is:hr;return!e&&Et(a,"iterate",On),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Ke(r,e?{add:Mi("add"),set:Mi("set"),delete:Mi("delete"),clear:Mi("clear")}:{add(n){!t&&!Lt(n)&&!Sr(n)&&(n=Be(n));const s=Be(this);return Hi(s).has.call(s,n)||(s.add(n),Hr(s,"add",n,n)),this},set(n,s){!t&&!Lt(s)&&!Sr(s)&&(s=Be(s));const i=Be(this),{has:o,get:a}=Hi(i);let l=o.call(i,n);l||(n=Be(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Pt(s,u)&&Hr(i,"set",n,s,u):Hr(i,"add",n,s),this},delete(n){const s=Be(this),{has:i,get:o}=Hi(s);let a=i.call(s,n);a||(n=Be(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Hr(s,"delete",n,void 0,l),u},clear(){const n=Be(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Hr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=$g(n,e,t)}),r}function Ni(e,t){const r=Pg(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(ze(r,s)&&s in n?r:n,s,i)}var Dg={get:Ni(!1,!1)},Og={get:Ni(!1,!0)},Hg={get:Ni(!0,!1)},Mg={get:Ni(!0,!0)},Yc=new WeakMap,Zc=new WeakMap,Xc=new WeakMap,Qc=new WeakMap;function Ng(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qg(e){return e.__v_skip||!Object.isExtensible(e)?0:Ng(ag(e))}function Nr(e){return Sr(e)?e:qi(e,!1,Ag,Dg,Yc)}function eu(e){return qi(e,!1,Rg,Og,Zc)}function At(e){return qi(e,!0,Ig,Hg,Xc)}function qr(e){return qi(e,!0,kg,Mg,Qc)}function qi(e,t,r,n,s){if(!je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=qg(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function Br(e){return Sr(e)?Br(e.__v_raw):!!(e&&e.__v_isReactive)}function Sr(e){return!!(e&&e.__v_isReadonly)}function Lt(e){return!!(e&&e.__v_isShallow)}function Ls(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function ba(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&$c(e,"__v_skip",!0),e}var hr=e=>je(e)?Nr(e):e,is=e=>je(e)?At(e):e;function Ge(e){return e?e.__v_isRef===!0:!1}function V(e){return tu(e,!1)}function tt(e){return tu(e,!0)}function tu(e,t){return Ge(e)?e:new Bg(e,t)}var Bg=class{constructor(e,t){this.dep=new Pi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Be(e),this._value=t?e:hr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Lt(e)||Sr(e);e=r?e:Be(e),Pt(e,t)&&(this._rawValue=e,this._value=r?e:hr(e),this.dep.trigger())}};function ru(e){e.dep&&e.dep.trigger()}function f(e){return Ge(e)?e.value:e}function xe(e){return Ee(e)?e():f(e)}var Lg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return Ge(s)&&!Ge(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function _a(e){return Br(e)?e:new Proxy(e,Lg)}var Fg=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Pi,{get:r,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}};function Fs(e){return new Fg(e)}function It(e){const t=ve(e)?new Array(e.length):{};for(const r in e)t[r]=nu(e,r);return t}var Vg=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Be(e);let n=!0,s=e;if(!ve(e)||!Ti(String(t)))do n=!Ls(s)||Lt(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=f(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Ge(this._raw[this._key])){const t=this._object[this._key];if(Ge(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Sg(this._raw,this._key)}},jg=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Sa(e,t,r){return Ge(e)?e:Ee(e)?new jg(e):je(e)&&arguments.length>1?nu(e,t,r):V(e)}function nu(e,t,r){return new Vg(e,t,r)}var Ug=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Pi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ns-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Qe!==this)return qc(this,!0),!0}get value(){const e=this.dep.track();return Fc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function zg(e,t,r=!1){let n,s;return Ee(e)?n=e:(n=e.get,s=e.set),new Ug(n,s,r)}var Kg={GET:"get",HAS:"has",ITERATE:"iterate"},Wg={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Bi={},Li=new WeakMap,on=void 0;function Gg(){return on}function su(e,t=!1,r=on){if(r){let n=Li.get(r);n||Li.set(r,n=[]),n.push(e)}}function Jg(e,t,r=qe){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=b=>s?b:Lt(b)||s===!1||s===0?Lr(b,1):Lr(b);let c,d,p,h,m=!1,w=!1;if(Ge(e)?(d=()=>e.value,m=Lt(e)):Br(e)?(d=()=>u(e),m=!0):ve(e)?(w=!0,m=e.some(b=>Br(b)||Lt(b)),d=()=>e.map(b=>{if(Ge(b))return b.value;if(Br(b))return u(b);if(Ee(b))return l?l(b,2):b()})):Ee(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Dr();try{p()}finally{Or()}}const b=on;on=c;try{return l?l(e,3,[h]):e(h)}finally{on=b}}:d=Qt,t&&s){const b=d,_=s===!0?1/0:s;d=()=>Lr(b(),_)}const x=$i(),v=()=>{c.stop(),x&&x.active&&ia(x.effects,c)};if(i&&t){const b=t;t=(..._)=>{b(..._),v()}}let C=w?new Array(e.length).fill(Bi):Bi;const y=b=>{if(!(!(c.flags&1)||!c.dirty&&!b))if(t){const _=c.run();if(s||m||(w?_.some((T,P)=>Pt(T,C[P])):Pt(_,C))){p&&p();const T=on;on=c;try{const P=[_,C===Bi?void 0:w&&C[0]===Bi?[]:C,h];C=_,l?l(t,3,P):t(...P)}finally{on=T}}}else c.run()};return a&&a(y),c=new Os(d),c.scheduler=o?()=>o(y,!1):y,h=b=>su(b,!1,c),p=c.onStop=()=>{const b=Li.get(c);if(b){if(l)l(b,4);else for(const _ of b)_();Li.delete(c)}},t?n?y(!0):C=c.run():o?o(y.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Lr(e,t=1/0,r){if(t<=0||!je(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,Ge(e))Lr(e.value,t,r);else if(ve(e))for(let n=0;n<e.length;n++)Lr(e[n],t,r);else if(Pn(e)||es(e))e.forEach(n=>{Lr(n,t,r)});else if(xi(e)){for(const n in e)Lr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Lr(e[n],t,r)}return e}var iu=[];function Yg(e){iu.push(e)}function Zg(){iu.pop()}function Xg(e,t){}var Qg={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ev={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function os(e,t,r,n){try{return n?e(...n):e()}catch(s){Hn(s,t,r)}}function er(e,t,r,n){if(Ee(e)){const s=os(e,t,r,n);return s&&oa(s)&&s.catch(i=>{Hn(i,t,r)}),s}if(ve(e)){const s=[];for(let i=0;i<e.length;i++)s.push(er(e[i],t,r,n));return s}}function Hn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||qe;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Dr(),os(i,null,10,[e,l,u]),Or();return}}tv(e,r,s,n,o)}function tv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Dt=[],Cr=-1,as=[],an=null,ls=0,ou=Promise.resolve(),Fi=null;function mt(e){const t=Fi||ou;return e?t.then(this?e.bind(this):e):t}function rv(e){let t=Cr+1,r=Dt.length;for(;t<r;){const n=t+r>>>1,s=Dt[n],i=js(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ca(e){if(!(e.flags&1)){const t=js(e),r=Dt[Dt.length-1];!r||!(e.flags&2)&&t>=js(r)?Dt.push(e):Dt.splice(rv(t),0,e),e.flags|=1,au()}}function au(){Fi||(Fi=ou.then(cu))}function Vs(e){ve(e)?as.push(...e):an&&e.id===-1?an.splice(ls+1,0,e):e.flags&1||(as.push(e),e.flags|=1),au()}function lu(e,t,r=Cr+1){for(;r<Dt.length;r++){const n=Dt[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Dt.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Vi(e){if(as.length){const t=[...new Set(as)].sort((r,n)=>js(r)-js(n));if(as.length=0,an){an.push(...t);return}for(an=t,ls=0;ls<an.length;ls++){const r=an[ls];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}an=null,ls=0}}var js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function cu(e){try{for(Cr=0;Cr<Dt.length;Cr++){const t=Dt[Cr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),os(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Cr<Dt.length;Cr++){const t=Dt[Cr];t&&(t.flags&=-2)}Cr=-1,Dt.length=0,Vi(e),Fi=null,(Dt.length||as.length)&&cu(e)}}var cs,ji=[];function uu(e,t){var r,n;cs=e,cs?(cs.enabled=!0,ji.forEach(({event:s,args:i})=>cs.emit(s,...i)),ji=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{uu(s,t)}),setTimeout(()=>{cs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ji=[])},3e3)):ji=[]}var _t=null,Ui=null;function Us(e){const t=_t;return _t=e,Ui=e&&e.type.__scopeId||null,t}function nv(e){Ui=e}function sv(){Ui=null}var iv=e=>k;function k(e,t=_t,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&ni(-1);const i=Us(t);let o;try{o=e(...s)}finally{Us(i),n._d&&ni(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function zi(e,t){if(_t===null)return e;const r=si(_t),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=qe]=t[s];i&&(Ee(i)&&(i={mounted:i,updated:i}),i.deep&&Lr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function xr(e,t,r,n){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(Dr(),er(l,r,8,[e.el,a,e,t]),Or())}}function Mn(e,t){if(St){let r=St.provides;const n=St.parent&&St.parent.provides;n===r&&(r=St.provides=Object.create(n)),r[e]=t}}function Ot(e,t,r=!1){const n=it();if(n||Nn){let s=Nn?Nn._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return r&&Ee(t)?t.call(n&&n.proxy):t}}function ov(){return!!(it()||Nn)}var du=Symbol.for("v-scx"),fu=()=>{{const e=Ot(du);return e}};function et(e,t){return zs(e,null,t)}function xa(e,t){return zs(e,null,{flush:"post"})}function pu(e,t){return zs(e,null,{flush:"sync"})}function Re(e,t,r){return zs(e,t,r)}function zs(e,t,r=qe){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ke({},r),l=t&&n||!t&&i!=="post";let u;if(vs){if(i==="sync"){const h=fu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=Qt,h.resume=Qt,h.pause=Qt,h}}const c=St;a.call=(h,m,w)=>er(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{ot(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ca(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Jg(e,t,a);return vs&&(u?u.push(p):l&&p()),p}function av(e,t,r){const n=this.proxy,s=Xe(e)?e.includes(".")?hu(n,e):()=>n[e]:e.bind(n,n);let i;Ee(t)?i=t:(i=t.handler,r=t);const o=Fn(this),a=zs(s,i.bind(n),r);return o(),a}function hu(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}var gu=Symbol("_vte"),vu=e=>e.__isTeleport,Ks=e=>e&&(e.disabled||e.disabled===""),mu=e=>e&&(e.defer||e.defer===""),wu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,yu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ta=(e,t)=>{const r=e&&e.to;return Xe(r)?t?t(r):null:r},bu={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,v=Ks(t.props);let{shapeFlag:C,children:y,dynamicChildren:b}=t;if(e==null){const _=t.el=w(""),T=t.anchor=w("");h(_,r,n),h(T,r,n);const P=(H,M)=>{C&16&&c(y,H,M,s,i,o,a,l)},g=()=>{const H=t.target=Ta(t.props,m),M=Aa(H,t,w,h);H&&(o!=="svg"&&wu(H)?o="svg":o!=="mathml"&&yu(H)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(H),v||(P(H,M),Wi(t,!1)))};v&&(P(r,T),Wi(t,!0)),mu(t.props)?(t.el.__isMounted=!1,ot(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(mu(t.props)&&e.el.__isMounted===!1){ot(()=>{bu.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,T=t.target=e.target,P=t.targetAnchor=e.targetAnchor,g=Ks(e.props),H=g?r:T,M=g?_:P;if(o==="svg"||wu(T)?o="svg":(o==="mathml"||yu(T))&&(o="mathml"),b?(p(e.dynamicChildren,b,H,s,i,o,a),Wa(e,t,!0)):l||d(e,t,H,M,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ki(t,r,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const S=t.target=Ta(t.props,m);S&&Ki(t,S,null,u,0)}else g&&Ki(t,T,P,u,1);Wi(t,v)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:p}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!Ks(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:Ki,hydrate:lv};function Ki(e,t,r,{o:{insert:n},m:s},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&n(o,t,r),(!d||Ks(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function lv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,v){let C=v;for(;C;){if(C&&C.nodeType===8){if(C.data==="teleport start anchor")t.targetStart=C;else if(C.data==="teleport anchor"){t.targetAnchor=C,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}C=o(C)}}function h(x,v){v.anchor=d(o(x),v,a(x),r,n,s,i)}const m=t.target=Ta(t.props,l),w=Ks(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||Aa(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||Aa(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),Wi(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Ea=bu;function Wi(e,t){const r=e.ctx;if(r&&r.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function Aa(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[gu]=o,e&&(n(i,e,s),n(o,e,s)),o}var Tr=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Ia(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return We(()=>{e.isMounted=!0}),hs(()=>{e.isUnmounting=!0}),e}var tr=[Function,Array],Ra={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:tr,onEnter:tr,onAfterEnter:tr,onEnterCancelled:tr,onBeforeLeave:tr,onLeave:tr,onAfterLeave:tr,onLeaveCancelled:tr,onBeforeAppear:tr,onAppear:tr,onAfterAppear:tr,onAppearCancelled:tr},_u=e=>{const t=e.subTree;return t.component?_u(t.component):t},cv={name:"BaseTransition",props:Ra,setup(e,{slots:t}){const r=it(),n=Ia();return()=>{const s=t.default&&Gi(t.default(),!0);if(!s||!s.length)return;const i=Su(s),o=Be(e),{mode:a}=o;if(n.isLeaving)return ka(i);const l=Tu(i);if(!l)return ka(i);let u=us(l,o,n,r,d=>u=d);l.type!==st&&Fr(l,u);let c=r.subTree&&Tu(r.subTree);if(c&&c.type!==st&&!gr(c,l)&&_u(r).type!==st){let d=us(c,o,n,r);if(Fr(c,d),a==="out-in"&&l.type!==st)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},ka(i);a==="in-out"&&l.type!==st?d.delayLeave=(p,h,m)=>{const w=xu(n,c);w[String(c.key)]=c,p[Tr]=()=>{h(),p[Tr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function Su(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==st){t=r;break}}return t}var Cu=cv;function xu(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function us(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:v,onAfterAppear:C,onAppearCancelled:y}=t,b=String(e.key),_=xu(r,e),T=(H,M)=>{H&&er(H,n,9,M)},P=(H,M)=>{const S=M[1];T(H,M),ve(H)?H.every(E=>E.length<=1)&&S():H.length<=1&&S()},g={mode:o,persisted:a,beforeEnter(H){let M=l;if(!r.isMounted)if(i)M=x||l;else return;H[Tr]&&H[Tr](!0);const S=_[b];S&&gr(e,S)&&S.el[Tr]&&S.el[Tr](),T(M,[H])},enter(H){if(_[b]===e)return;let M=u,S=c,E=d;if(!r.isMounted)if(i)M=v||u,S=C||c,E=y||d;else return;let A=!1;H[Ws]=Q=>{A||(A=!0,Q?T(E,[H]):T(S,[H]),g.delayedLeave&&g.delayedLeave(),H[Ws]=void 0)};const Z=H[Ws].bind(null,!1);M?P(M,[H,Z]):Z()},leave(H,M){const S=String(e.key);if(H[Ws]&&H[Ws](!0),r.isUnmounting)return M();T(p,[H]);let E=!1;H[Tr]=Z=>{E||(E=!0,M(),Z?T(w,[H]):T(m,[H]),H[Tr]=void 0,_[S]===e&&delete _[S])};const A=H[Tr].bind(null,!1);_[S]=e,h?P(h,[H,A]):A()},clone(H){const M=us(H,t,r,n,s);return s&&s(M),M}};return g}function ka(e){if(Gs(e))return e=vr(e),e.children=null,e}function Tu(e){if(!Gs(e))return vu(e.type)&&e.children?Su(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&Ee(r.default))return r.default()}}function Fr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gi(e,t=!1,r){let n=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===Le?(o.patchFlag&128&&s++,n=n.concat(Gi(o.children,t,a))):(t||o.type!==st)&&n.push(a!=null?vr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function ee(e,t){return Ee(e)?Ke({name:e.name},t,{setup:e}):e}function Eu(){const e=it();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function $a(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function uv(e){const t=it(),r=tt(null);if(t){const n=t.refs===qe?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Au(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var Ji=new WeakMap;function ds(e,t,r,n,s=!1){if(ve(e)){e.forEach((w,x)=>ds(w,t&&(ve(t)?t[x]:t),r,n,s));return}if(Vr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ds(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?si(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===qe?a.refs={}:a.refs,d=a.setupState,p=Be(d),h=d===qe?Ic:w=>Au(c,w)?!1:ze(p,w),m=(w,x)=>!(x&&Au(c,x));if(u!=null&&u!==l){if(Iu(t),Xe(u))c[u]=null,h(u)&&(d[u]=null);else if(Ge(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Ee(l))os(l,a,12,[o,c]);else{const w=Xe(l),x=Ge(l);if(w||x){const v=()=>{if(e.f){const C=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)ve(C)&&ia(C,i);else if(ve(C))C.includes(i)||C.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const y=[i];m(l,e.k)&&(l.value=y),e.k&&(c[e.k]=y)}}else w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const C=()=>{v(),Ji.delete(e)};C.id=-1,Ji.set(e,C),ot(C,r)}else Iu(e),v()}}}function Iu(e){const t=Ji.get(e);t&&(t.flags|=8,Ji.delete(e))}var Ru=!1,fs=()=>{Ru||(console.error("Hydration completed but contains mismatches."),Ru=!0)},dv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",fv=e=>e.namespaceURI.includes("MathML"),Yi=e=>{if(e.nodeType===1){if(dv(e))return"svg";if(fv(e))return"mathml"}},ps=e=>e.nodeType===8;function pv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(y,b)=>{if(!b.hasChildNodes()){r(null,y,b),Vi(),b._vnode=y;return}d(b.firstChild,y,null,null,null),Vi(),b._vnode=y},d=(y,b,_,T,P,g=!1)=>{g=g||!!b.dynamicChildren;const H=ps(y)&&y.data==="[",M=()=>w(y,b,_,T,P,H),{type:S,ref:E,shapeFlag:A,patchFlag:Z}=b;let Q=y.nodeType;b.el=y,Z===-2&&(g=!1,b.dynamicChildren=null);let K=null;switch(S){case ln:Q!==3?b.children===""?(l(b.el=s(""),o(y),y),K=y):K=M():(y.data!==b.children&&(fs(),y.data=b.children),K=i(y));break;case st:C(y)?(K=i(y),v(b.el=y.content.firstChild,y,_)):Q!==8||H?K=M():K=i(y);break;case Bn:if(H&&(y=i(y),Q=y.nodeType),Q===1||Q===3){K=y;const X=!b.children.length;for(let Y=0;Y<b.staticCount;Y++)X&&(b.children+=K.nodeType===1?K.outerHTML:K.data),Y===b.staticCount-1&&(b.anchor=K),K=i(K);return H?i(K):K}else M();break;case Le:H?K=m(y,b,_,T,P,g):K=M();break;default:if(A&1)(Q!==1||b.type.toLowerCase()!==y.tagName.toLowerCase())&&!C(y)?K=M():K=p(y,b,_,T,P,g);else if(A&6){b.slotScopeIds=P;const X=o(y);if(H?K=x(y):ps(y)&&y.data==="teleport start"?K=x(y,y.data,"teleport end"):K=i(y),t(b,X,null,_,T,Yi(X),g),Vr(b)&&!b.type.__asyncResolved){let Y;H?(Y=q(Le),Y.anchor=K?K.previousSibling:X.lastChild):Y=y.nodeType===3?Ne(""):q("div"),Y.el=y,b.component.subTree=Y}}else A&64?Q!==8?K=M():K=b.type.hydrate(y,b,_,T,P,g,e,h):A&128&&(K=b.type.hydrate(y,b,_,T,Yi(o(y)),P,g,e,d))}return E!=null&&ds(E,null,T,b),K},p=(y,b,_,T,P,g)=>{g=g||!!b.dynamicChildren;const{type:H,props:M,patchFlag:S,shapeFlag:E,dirs:A,transition:Z}=b,Q=H==="input"||H==="option";if(Q||S!==-1){A&&xr(b,null,_,"created");let K=!1;if(C(y)){K=dd(null,Z)&&_&&_.vnode.props&&_.vnode.props.appear;const Y=y.content.firstChild;if(K){const ae=Y.getAttribute("class");ae&&(Y.$cls=ae),Z.beforeEnter(Y)}v(Y,y,_),b.el=y=Y}if(E&16&&!(M&&(M.innerHTML||M.textContent))){let Y=h(y.firstChild,b,y,_,T,P,g);for(;Y;){Zi(y,1)||fs();const ae=Y;Y=Y.nextSibling,a(ae)}}else if(E&8){let Y=b.children;Y[0]===`
4
+ `&&(y.tagName==="PRE"||y.tagName==="TEXTAREA")&&(Y=Y.slice(1));const{textContent:ae}=y;ae!==Y&&ae!==Y.replace(/\r\n|\r/g,`
5
+ `)&&(Zi(y,0)||fs(),y.textContent=b.children)}if(M){if(Q||!g||S&48){const Y=y.tagName.includes("-");for(const ae in M)(Q&&(ae.endsWith("value")||ae==="indeterminate")||Ps(ae)&&!Dn(ae)||ae[0]==="."||Y&&!Dn(ae))&&n(y,ae,null,M[ae],void 0,_)}else if(M.onClick)n(y,"onClick",null,M.onClick,void 0,_);else if(S&4&&Br(M.style))for(const Y in M.style)M.style[Y]}let X;(X=M&&M.onVnodeBeforeMount)&&Vt(X,_,b),A&&xr(b,null,_,"beforeMount"),((X=M&&M.onVnodeMounted)||A||K)&&vd(()=>{X&&Vt(X,_,b),K&&Z.enter(y),A&&xr(b,null,_,"mounted")},T)}return y.nextSibling},h=(y,b,_,T,P,g,H)=>{H=H||!!b.dynamicChildren;const M=b.children,S=M.length;for(let E=0;E<S;E++){const A=H?M[E]:M[E]=Ft(M[E]),Z=A.type===ln;y?(Z&&!H&&E+1<S&&Ft(M[E+1]).type===ln&&(l(s(y.data.slice(A.children.length)),_,i(y)),y.data=A.children),y=d(y,A,T,P,g,H)):Z&&!A.children?l(A.el=s(""),_):(Zi(_,1)||fs(),r(null,A,_,null,T,P,Yi(_),g))}return y},m=(y,b,_,T,P,g)=>{const{slotScopeIds:H}=b;H&&(P=P?P.concat(H):H);const M=o(y),S=h(i(y),b,M,_,T,P,g);return S&&ps(S)&&S.data==="]"?i(b.anchor=S):(fs(),l(b.anchor=u("]"),M,S),S)},w=(y,b,_,T,P,g)=>{if(Zi(y.parentElement,1)||fs(),b.el=null,g){const S=x(y);for(;;){const E=i(y);if(E&&E!==S)a(E);else break}}const H=i(y),M=o(y);return a(y),r(null,b,M,H,_,T,Yi(M),P),_&&(_.vnode.el=b.el,so(_,b.el)),H},x=(y,b="[",_="]")=>{let T=0;for(;y;)if(y=i(y),y&&ps(y)&&(y.data===b&&T++,y.data===_)){if(T===0)return i(y);T--}return y},v=(y,b,_)=>{const T=b.parentNode;T&&T.replaceChild(y,b);let P=_;for(;P;)P.vnode.el===b&&(P.vnode.el=P.subTree.el=y),P=P.parent},C=y=>y.nodeType===1&&y.tagName==="TEMPLATE";return[c,d]}var ku="data-allow-mismatch",hv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Zi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ku);)e=e.parentElement;const r=e&&e.getAttribute(ku);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(hv[t])}}var gv=Ri().requestIdleCallback||(e=>setTimeout(e,1)),vv=Ri().cancelIdleCallback||(e=>clearTimeout(e)),mv=(e=1e4)=>t=>{const r=gv(t,{timeout:e});return()=>vv(r)};function wv(e){const{top:t,left:r,bottom:n,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:o}=window;return(t>0&&t<i||n>0&&n<i)&&(r>0&&r<o||s>0&&s<o)}var yv=e=>(t,r)=>{const n=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){n.disconnect(),t();break}},e);return r(s=>{if(s instanceof Element){if(wv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},bv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},_v=(e=[])=>(t,r)=>{Xe(e)&&(e=[e]);let n=!1;const s=o=>{n||(n=!0,i(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},i=()=>{r(o=>{for(const a of e)o.removeEventListener(a,s)})};return r(o=>{for(const a of e)o.addEventListener(a,s,{once:!0})}),i};function Sv(e,t){if(ps(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(ps(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var Vr=e=>!!e.type.__asyncLoader;function Cv(e){Ee(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,v)=>{l(w,()=>x(p()),()=>v(w),d+1)});throw w}).then(w=>m!==u&&u?u:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),c=w,w)))};return ee({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,x){let v=!1;(w.bu||(w.bu=[])).push(()=>v=!0);const C=()=>{v||x()},y=i?()=>{const b=i(C,_=>Sv(m,_));b&&(w.bum||(w.bum=[])).push(b)}:C;c?y():h().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return c},setup(){const m=St;if($a(m),c)return()=>Xi(c,m);const w=y=>{u=null,Hn(y,m,13,!n)};if(a&&m.suspense||vs)return h().then(y=>()=>Xi(y,m)).catch(y=>(w(y),()=>n?q(n,{error:y}):null));const x=V(!1),v=V(),C=V(!!s);return s&&setTimeout(()=>{C.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!v.value){const y=new Error(`Async component timed out after ${o}ms.`);w(y),v.value=y}},o),h().then(()=>{x.value=!0,m.parent&&Gs(m.parent.vnode)&&m.parent.update()}).catch(y=>{w(y),v.value=y}),()=>{if(x.value&&c)return Xi(c,m);if(v.value&&n)return q(n,{error:v.value});if(r&&!C.value)return Xi(r,m)}}})}function Xi(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=q(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Gs=e=>e.type.__isKeepAlive,xv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=it(),n=r.ctx;if(!n.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const s=new Map,i=new Set;let o=null;const a=r.suspense,{renderer:{p:l,m:u,um:c,o:{createElement:d}}}=n,p=d("div");n.activate=(C,y,b,_,T)=>{const P=C.component;u(C,y,b,0,a),l(P.vnode,C,y,b,P,a,_,C.slotScopeIds,T),ot(()=>{P.isDeactivated=!1,P.a&&ns(P.a);const g=C.props&&C.props.onVnodeMounted;g&&Vt(g,P.parent,C)},a)},n.deactivate=C=>{const y=C.component;io(y.m),io(y.a),u(C,p,null,1,a),ot(()=>{y.da&&ns(y.da);const b=C.props&&C.props.onVnodeUnmounted;b&&Vt(b,y.parent,C),y.isDeactivated=!0},a)};function h(C){Pa(C),c(C,r,a,!0)}function m(C){s.forEach((y,b)=>{const _=el(Vr(y)?y.type.__asyncResolved||{}:y.type);_&&!C(_)&&w(b)})}function w(C){const y=s.get(C);y&&(!o||!gr(y,o))?h(y):o&&Pa(o),s.delete(C),i.delete(C)}Re(()=>[e.include,e.exclude],([C,y])=>{C&&m(b=>Js(C,b)),y&&m(b=>!Js(y,b))},{flush:"post",deep:!0});let x=null;const v=()=>{x!=null&&(oo(r.subTree.type)?ot(()=>{s.set(x,Qi(r.subTree))},r.subTree.suspense):s.set(x,Qi(r.subTree)))};return We(v),Ys(v),hs(()=>{s.forEach(C=>{const{subTree:y,suspense:b}=r,_=Qi(y);if(C.type===_.type&&C.key===_.key){Pa(_);const T=_.component.da;T&&ot(T,b);return}h(C)})}),()=>{if(x=null,!t.default)return o=null;const C=t.default(),y=C[0];if(C.length>1)return o=null,C;if(!Ur(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return o=null,y;let b=Qi(y);if(b.type===st)return o=null,b;const _=b.type,T=el(Vr(b)?b.type.__asyncResolved||{}:_),{include:P,exclude:g,max:H}=e;if(P&&(!T||!Js(P,T))||g&&T&&Js(g,T))return b.shapeFlag&=-257,o=b,y;const M=b.key==null?_:b.key,S=s.get(M);return b.el&&(b=vr(b),y.shapeFlag&128&&(y.ssContent=b)),x=M,S?(b.el=S.el,b.component=S.component,b.transition&&Fr(b,b.transition),b.shapeFlag|=512,i.delete(M),i.add(M)):(i.add(M),H&&i.size>parseInt(H,10)&&w(i.values().next().value)),b.shapeFlag|=256,o=b,oo(y.type)?y:b}}};function Js(e,t){return ve(e)?e.some(r=>Js(r,t)):Xe(e)?e.split(",").includes(t):og(e)?(e.lastIndex=0,e.test(t)):!1}function $u(e,t){Du(e,"a",t)}function Pu(e,t){Du(e,"da",t)}function Du(e,t,r=St){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(eo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Gs(s.parent.vnode)&&Tv(n,t,r,s),s=s.parent}}function Tv(e,t,r,n){const s=eo(t,e,n,!0);Ht(()=>{ia(n[t],s)},r)}function Pa(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Qi(e){return e.shapeFlag&128?e.ssContent:e}function eo(e,t,r=St,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Dr();const a=Fn(r),l=er(t,r,e,o);return a(),Or(),l});return n?s.unshift(i):s.push(i),i}}var jr=e=>(t,r=St)=>{(!vs||e==="sp")&&eo(e,(...n)=>t(...n),r)},Ou=jr("bm"),We=jr("m"),Da=jr("bu"),Ys=jr("u"),hs=jr("bum"),Ht=jr("um"),Hu=jr("sp"),Mu=jr("rtg"),Nu=jr("rtc");function qu(e,t=St){eo("ec",e,t)}var Oa="components",Ev="directives";function Av(e,t){return Ha(Oa,e,!0,t)||e}var Bu=Symbol.for("v-ndc");function Zs(e){return Xe(e)?Ha(Oa,e,!1)||e:e||Bu}function Iv(e){return Ha(Ev,e)}function Ha(e,t,r=!0,n=!1){const s=_t||St;if(s){const i=s.type;if(e===Oa){const a=el(i,!1);if(a&&(a===t||a===ft(t)||a===Ds(ft(t))))return i}const o=Lu(s[e]||i[e],t)||Lu(s.appContext[e],t);return!o&&n?i:o}}function Lu(e,t){return e&&(e[t]||e[ft(t)]||e[Ds(ft(t))])}function rr(e,t,r,n){let s;const i=r&&r[n],o=ve(e);if(o||Xe(e)){const a=o&&Br(e);let l=!1,u=!1;a&&(l=!Lt(e),u=Sr(e),e=Oi(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?is(hr(e[c])):hr(e[c]):e[c],c,void 0,i&&i[c])}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i&&i[a])}else if(je(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function Rv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(ve(n))for(let s=0;s<n.length;s++)e[n[s].name]=n[s].fn;else n&&(e[n.name]=n.key?(...s)=>{const i=n.fn(...s);return i&&(i.key=n.key),i}:n.fn)}return e}function ie(e,t,r={},n,s){if(_t.ce||_t.parent&&Vr(_t.parent)&&_t.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),D(),U(Le,null,[q("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),D();const o=i&&Ma(i(r)),a=r.key||o&&o.key,l=U(Le,{key:(a&&!dr(a)?a:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Ma(e){return e.some(t=>Ur(t)?!(t.type===st||t.type===Le&&!Ma(t.children)):!0)?e:null}function Fu(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:rs(n)]=e[n];return r}var Na=e=>e?_d(e)?si(e):Na(e.parent):null,Xs=Ke(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Na(e.parent),$root:e=>Na(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fa(e),$forceUpdate:e=>e.f||(e.f=()=>{Ca(e.update)}),$nextTick:e=>e.n||(e.n=mt.bind(e.proxy)),$watch:e=>av.bind(e)}),qa=(e,t)=>e!==qe&&!e.__isScriptSetup&&ze(e,t),Ba={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(qa(n,t))return o[t]=1,n[t];if(s!==qe&&ze(s,t))return o[t]=2,s[t];if(ze(i,t))return o[t]=3,i[t];if(r!==qe&&ze(r,t))return o[t]=4,r[t];La&&(o[t]=0)}}const u=Xs[t];let c,d;if(u)return t==="$attrs"&&Et(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==qe&&ze(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,ze(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return qa(s,t)?(s[t]=r,!0):n!==qe&&ze(n,t)?(n[t]=r,!0):ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||e!==qe&&a[0]!=="$"&&ze(e,a)||qa(t,a)||ze(i,a)||ze(n,a)||ze(Xs,a)||ze(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:ze(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},kv=Ke({},Ba,{get(e,t){if(t!==Symbol.unscopables)return Ba.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ug(t)}});function $v(){return null}function Pv(){return null}function Dv(e){}function Ov(e){}function Hv(){return null}function Mv(){}function Nv(e,t){return null}function qv(){return Vu("useSlots").slots}function Bv(){return Vu("useAttrs").attrs}function Vu(e){const t=it();return t.setupContext||(t.setupContext=xd(t))}function Qs(e){return ve(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function ju(e,t){const r=Qs(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?ve(s)||Ee(s)?s=r[n]={type:s,default:t[n]}:s.default=t[n]:s===null&&(s=r[n]={default:t[n]}),s&&t[`__skip_${n}`]&&(s.skipFactory=!0)}return r}function Lv(e,t){return!e||!t?e||t:ve(e)&&ve(t)?e.concat(t):Ke({},Qs(e),Qs(t))}function Fv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Vv(e){const t=it();let r=e();co();const n=()=>{it()!==t&&t.scope.off(),co()};return oa(r)&&(r=r.catch(s=>{throw Fn(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Fn(t),Promise.resolve().then(n)}]}var La=!0;function jv(e){const t=Fa(e),r=e.proxy,n=e.ctx;La=!1,t.beforeCreate&&Uu(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:v,beforeUnmount:C,destroyed:y,unmounted:b,render:_,renderTracked:T,renderTriggered:P,errorCaptured:g,serverPrefetch:H,expose:M,inheritAttrs:S,components:E,directives:A,filters:Z}=t;if(u&&Uv(u,n,null),o)for(const X in o){const Y=o[X];Ee(Y)&&(n[X]=Y.bind(r))}if(s){const X=s.call(r,r);je(X)&&(e.data=Nr(X))}if(La=!0,i)for(const X in i){const Y=i[X],ae=j({get:Ee(Y)?Y.bind(r,r):Ee(Y.get)?Y.get.bind(r,r):Qt,set:!Ee(Y)&&Ee(Y.set)?Y.set.bind(r):Qt});Object.defineProperty(n,X,{enumerable:!0,configurable:!0,get:()=>ae.value,set:W=>ae.value=W})}if(a)for(const X in a)zu(a[X],n,r,X);if(l){const X=Ee(l)?l.call(r):l;Reflect.ownKeys(X).forEach(Y=>{Mn(Y,X[Y])})}c&&Uu(c,e,"c");function K(X,Y){ve(Y)?Y.forEach(ae=>X(ae.bind(r))):Y&&X(Y.bind(r))}if(K(Ou,d),K(We,p),K(Da,h),K(Ys,m),K($u,w),K(Pu,x),K(qu,g),K(Nu,T),K(Mu,P),K(hs,C),K(Ht,b),K(Hu,H),ve(M))if(M.length){const X=e.exposed||(e.exposed={});M.forEach(Y=>{Object.defineProperty(X,Y,{get:()=>r[Y],set:ae=>r[Y]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Qt&&(e.render=_),S!=null&&(e.inheritAttrs=S),E&&(e.components=E),A&&(e.directives=A),H&&$a(e)}function Uv(e,t,r=Qt){ve(e)&&(e=Va(e));for(const n in e){const s=e[n];let i;je(s)?"default"in s?i=Ot(s.from||n,s.default,!0):i=Ot(s.from||n):i=Ot(s),Ge(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Uu(e,t,r){er(ve(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function zu(e,t,r,n){let s=n.includes(".")?hu(r,n):()=>r[n];if(Xe(e)){const i=t[e];Ee(i)&&Re(s,i)}else if(Ee(e))Re(s,e.bind(r));else if(je(e))if(ve(e))e.forEach(i=>zu(i,t,r,n));else{const i=Ee(e.handler)?e.handler.bind(r):t[e.handler];Ee(i)&&Re(s,i,e)}}function Fa(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(u=>to(l,u,o,!0)),to(l,t,o)),je(t)&&i.set(t,l),l}function to(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&to(e,i,r,!0),s&&s.forEach(o=>to(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=zv[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var zv={data:Ku,props:Wu,emits:Wu,methods:ei,computed:ei,beforeCreate:Mt,created:Mt,beforeMount:Mt,mounted:Mt,beforeUpdate:Mt,updated:Mt,beforeDestroy:Mt,beforeUnmount:Mt,destroyed:Mt,unmounted:Mt,activated:Mt,deactivated:Mt,errorCaptured:Mt,serverPrefetch:Mt,components:ei,directives:ei,watch:Wv,provide:Ku,inject:Kv};function Ku(e,t){return t?e?function(){return Ke(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function Kv(e,t){return ei(Va(e),Va(t))}function Va(e){if(ve(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Mt(e,t){return e?[...new Set([].concat(e,t))]:t}function ei(e,t){return e?Ke(Object.create(null),e,t):t}function Wu(e,t){return e?ve(e)&&ve(t)?[...new Set([...e,...t])]:Ke(Object.create(null),Qs(e),Qs(t??{})):t}function Wv(e,t){if(!e)return t;if(!t)return e;const r=Ke(Object.create(null),e);for(const n in t)r[n]=Mt(e[n],t[n]);return r}function Gu(){return{app:null,config:{isNativeTag:Ic,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Gv=0;function Jv(e,t){return function(n,s=null){Ee(n)||(n=Ke({},n)),s!=null&&!je(s)&&(s=null);const i=Gu(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Gv++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:Ed,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ee(c.install)?(o.add(c),c.install(u,...d)):Ee(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,p){if(!l){const h=u._ceVNode||q(n,s);return h.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),d&&t?t(h,c):e(h,c,p),l=!0,u._container=c,c.__vue_app__=u,si(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(er(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=Nn;Nn=u;try{return c()}finally{Nn=d}}};return u}}var Nn=null;function Yv(e,t,r=qe){const n=it(),s=ft(t),i=Bt(t),o=Ju(e,s),a=Fs((l,u)=>{let c,d=qe,p;return pu(()=>{const h=e[s];Pt(c,h)&&(c=h,u())}),{get(){return l(),r.get?r.get(c):c},set(h){const m=r.set?r.set(h):h;if(!Pt(m,c)&&!(d!==qe&&Pt(h,d)))return;const w=n.vnode.props;w&&(t in w||s in w||i in w)&&(`onUpdate:${t}`in w||`onUpdate:${s}`in w||`onUpdate:${i}`in w)||(c=h,u()),n.emit(`update:${t}`,m),Pt(h,m)&&Pt(h,d)&&!Pt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||qe:a,done:!1}:{done:!0}}}},a}var Ju=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ft(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function Zv(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||qe;let s=r;const i=t.startsWith("update:"),o=i&&Ju(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>Xe(c)?c.trim():c)),o.number&&(s=r.map(Ai)));let a,l=n[a=rs(t)]||n[a=rs(ft(t))];!l&&i&&(l=n[a=rs(Bt(t))]),l&&er(l,e,6,s);const u=n[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,er(u,e,6,s)}}var Xv=new WeakMap;function Yu(e,t,r=!1){const n=r?Xv:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ee(e)){const l=u=>{const c=Yu(u,t,!0);c&&(a=!0,Ke(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(je(e)&&n.set(e,null),null):(ve(i)?i.forEach(l=>o[l]=null):Ke(o,i),je(e)&&n.set(e,o),o)}function ro(e,t){return!e||!Ps(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,Bt(t))||ze(e,t))}function no(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=Us(e);let v,C;try{if(r.shapeFlag&4){const b=s||n,_=b;v=Ft(u.call(_,b,c,d,h,p,m)),C=a}else{const b=t;v=Ft(b.length>1?b(d,{attrs:a,slots:o,emit:l}):b(d,null)),C=t.props?a:em(a)}}catch(b){ri.length=0,Hn(b,e,1),v=q(st)}let y=v;if(C&&w!==!1){const b=Object.keys(C),{shapeFlag:_}=y;b.length&&_&7&&(i&&b.some(sa)&&(C=tm(C,i)),y=vr(y,C,!1,!0))}return r.dirs&&(y=vr(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(r.dirs):r.dirs),r.transition&&Fr(y,r.transition),v=y,Us(x),v}function Qv(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Ur(s)){if(s.type!==st||s.children==="v-if"){if(r)return;r=s}}else return}return r}var em=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ps(r))&&((t||(t={}))[r]=e[r]);return t},tm=(e,t)=>{const r={};for(const n in e)(!sa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function rm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?Zu(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Xu(o,n,p)&&!ro(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Zu(n,o,u):!0:!!o;return!1}function Zu(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(Xu(t,e,i)&&!ro(r,i))return!0}return!1}function Xu(e,t,r){const n=e[r],s=t[r];return r==="style"&&je(n)&&je(s)?!Pr(n,s):n!==s}function so({vnode:e,parent:t},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=r,t=t.parent;else break}}var Qu={},ed=()=>Object.create(Qu),td=e=>Object.getPrototypeOf(e)===Qu;function nm(e,t,r,n=!1){const s={},i=ed();e.propsDefaults=Object.create(null),rd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:eu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function sm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(s),[l]=e.propsOptions;let u=!1;if((n||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let p=c[d];if(ro(e.emitsOptions,p))continue;const h=t[p];if(l)if(ze(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=ft(p);s[m]=ja(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{rd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!ze(t,d)&&((c=Bt(d))===d||!ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=ja(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!ze(t,d))&&(delete i[d],u=!0)}u&&Hr(e.attrs,"set","")}function rd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Dn(l))continue;const u=t[l];let c;s&&ze(s,c=ft(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:ro(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=Be(r),u=a||qe;for(let c=0;c<i.length;c++){const d=i[c];r[d]=ja(s,l,d,u[d],e,!ze(u,d))}}return o}function ja(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=ze(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Ee(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Fn(s);n=u[r]=l.call(null,t),c()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Bt(r))&&(n=!0))}return n}var im=new WeakMap;function nd(e,t,r=!1){const n=r?im:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ee(e)){const c=d=>{l=!0;const[p,h]=nd(d,t,!0);Ke(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return je(e)&&n.set(e,Qn),Qn;if(ve(i))for(let c=0;c<i.length;c++){const d=ft(i[c]);sd(d)&&(o[d]=qe)}else if(i)for(const c in i){const d=ft(c);if(sd(d)){const p=i[c],h=o[d]=ve(p)||Ee(p)?{type:p}:Ke({},p),m=h.type;let w=!1,x=!0;if(ve(m))for(let v=0;v<m.length;++v){const C=m[v],y=Ee(C)&&C.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(x=!1)}else w=Ee(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||ze(h,"default"))&&a.push(d)}}const u=[o,a];return je(e)&&n.set(e,u),u}function sd(e){return e[0]!=="$"&&!Dn(e)}var Ua=e=>e==="_"||e==="_ctx"||e==="$stable",za=e=>ve(e)?e.map(Ft):[Ft(e)],om=(e,t,r)=>{if(t._n)return t;const n=k((...s)=>za(t(...s)),r);return n._c=!1,n},id=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ua(s))continue;const i=e[s];if(Ee(i))t[s]=om(s,i,n);else if(i!=null){const o=za(i);t[s]=()=>o}}},od=(e,t)=>{const r=za(t);e.slots.default=()=>r},ad=(e,t,r)=>{for(const n in t)(r||!Ua(n))&&(e[n]=t[n])},am=(e,t,r)=>{const n=e.slots=ed();if(e.vnode.shapeFlag&32){const s=t._;s?(ad(n,t,r),r&&$c(n,"_",s,!0)):id(t,n)}else t&&od(e,t)},lm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=qe;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:ad(s,t,r):(i=!t.$stable,id(t,s)),o=t}else t&&(od(e,t),o={default:1});if(i)for(const a in s)!Ua(a)&&o[a]==null&&delete s[a]};function nx(){}var ot=vd;function ld(e){return ud(e)}function cd(e){return ud(e,pv)}function ud(e,t){const r=Ri();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:p,setScopeId:h=Qt,insertStaticContent:m}=e,w=(I,O,G,oe=null,te=null,se=null,de=void 0,ue=null,ce=!!O.dynamicChildren)=>{if(I===O)return;I&&!gr(I,O)&&(oe=Ye(I),fe(I,te,se,!0),I=null),O.patchFlag===-2&&(ce=!1,O.dynamicChildren=null);const{type:re,ref:_e,shapeFlag:R}=O;switch(re){case ln:x(I,O,G,oe);break;case st:v(I,O,G,oe);break;case Bn:I==null&&C(O,G,oe,de);break;case Le:E(I,O,G,oe,te,se,de,ue,ce);break;default:R&1?_(I,O,G,oe,te,se,de,ue,ce):R&6?A(I,O,G,oe,te,se,de,ue,ce):(R&64||R&128)&&re.process(I,O,G,oe,te,se,de,ue,ce,lt)}_e!=null&&te?ds(_e,I&&I.ref,se,O||I,!O):_e==null&&I&&I.ref!=null&&ds(I.ref,null,se,I,!0)},x=(I,O,G,oe)=>{if(I==null)n(O.el=a(O.children),G,oe);else{const te=O.el=I.el;O.children!==I.children&&u(te,O.children)}},v=(I,O,G,oe)=>{I==null?n(O.el=l(O.children||""),G,oe):O.el=I.el},C=(I,O,G,oe)=>{[I.el,I.anchor]=m(I.children,O,G,oe,I.el,I.anchor)},y=({el:I,anchor:O},G,oe)=>{let te;for(;I&&I!==O;)te=p(I),n(I,G,oe),I=te;n(O,G,oe)},b=({el:I,anchor:O})=>{let G;for(;I&&I!==O;)G=p(I),s(I),I=G;s(O)},_=(I,O,G,oe,te,se,de,ue,ce)=>{if(O.type==="svg"?de="svg":O.type==="math"&&(de="mathml"),I==null)T(O,G,oe,te,se,de,ue,ce);else{const re=I.el&&I.el._isVueCE?I.el:null;try{re&&re._beginPatch(),H(I,O,te,se,de,ue,ce)}finally{re&&re._endPatch()}}},T=(I,O,G,oe,te,se,de,ue)=>{let ce,re;const{props:_e,shapeFlag:R,transition:B,dirs:N}=I;if(ce=I.el=o(I.type,se,_e&&_e.is,_e),R&8?c(ce,I.children):R&16&&g(I.children,ce,null,oe,te,Ka(I,se),de,ue),N&&xr(I,null,oe,"created"),P(ce,I,I.scopeId,de,oe),_e){for(const L in _e)L!=="value"&&!Dn(L)&&i(ce,L,null,_e[L],se,oe);"value"in _e&&i(ce,"value",null,_e.value,se),(re=_e.onVnodeBeforeMount)&&Vt(re,oe,I)}N&&xr(I,null,oe,"beforeMount");const $=dd(te,B);$&&B.beforeEnter(ce),n(ce,O,G),((re=_e&&_e.onVnodeMounted)||$||N)&&ot(()=>{re&&Vt(re,oe,I),$&&B.enter(ce),N&&xr(I,null,oe,"mounted")},te)},P=(I,O,G,oe,te)=>{if(G&&h(I,G),oe)for(let se=0;se<oe.length;se++)h(I,oe[se]);if(te){let se=te.subTree;if(O===se||oo(se.type)&&(se.ssContent===O||se.ssFallback===O)){const de=te.vnode;P(I,de,de.scopeId,de.slotScopeIds,te.parent)}}},g=(I,O,G,oe,te,se,de,ue,ce=0)=>{for(let re=ce;re<I.length;re++)w(null,I[re]=ue?zr(I[re]):Ft(I[re]),O,G,oe,te,se,de,ue)},H=(I,O,G,oe,te,se,de)=>{const ue=O.el=I.el;let{patchFlag:ce,dynamicChildren:re,dirs:_e}=O;ce|=I.patchFlag&16;const R=I.props||qe,B=O.props||qe;let N;if(G&&qn(G,!1),(N=B.onVnodeBeforeUpdate)&&Vt(N,G,O,I),_e&&xr(O,I,G,"beforeUpdate"),G&&qn(G,!0),(R.innerHTML&&B.innerHTML==null||R.textContent&&B.textContent==null)&&c(ue,""),re?M(I.dynamicChildren,re,ue,G,oe,Ka(O,te),se):de||Y(I,O,ue,null,G,oe,Ka(O,te),se,!1),ce>0){if(ce&16)S(ue,R,B,G,te);else if(ce&2&&R.class!==B.class&&i(ue,"class",null,B.class,te),ce&4&&i(ue,"style",R.style,B.style,te),ce&8){const $=O.dynamicProps;for(let L=0;L<$.length;L++){const J=$[L],ye=R[J],Se=B[J];(Se!==ye||J==="value")&&i(ue,J,ye,Se,te,G)}}ce&1&&I.children!==O.children&&c(ue,O.children)}else!de&&re==null&&S(ue,R,B,G,te);((N=B.onVnodeUpdated)||_e)&&ot(()=>{N&&Vt(N,G,O,I),_e&&xr(O,I,G,"updated")},oe)},M=(I,O,G,oe,te,se,de)=>{for(let ue=0;ue<O.length;ue++){const ce=I[ue],re=O[ue];w(ce,re,ce.el&&(ce.type===Le||!gr(ce,re)||ce.shapeFlag&198)?d(ce.el):G,null,oe,te,se,de,!0)}},S=(I,O,G,oe,te)=>{if(O!==G){if(O!==qe)for(const se in O)!Dn(se)&&!(se in G)&&i(I,se,O[se],null,te,oe);for(const se in G){if(Dn(se))continue;const de=G[se],ue=O[se];de!==ue&&se!=="value"&&i(I,se,ue,de,te,oe)}"value"in G&&i(I,"value",O.value,G.value,te)}},E=(I,O,G,oe,te,se,de,ue,ce)=>{const re=O.el=I?I.el:a(""),_e=O.anchor=I?I.anchor:a("");let{patchFlag:R,dynamicChildren:B,slotScopeIds:N}=O;N&&(ue=ue?ue.concat(N):N),I==null?(n(re,G,oe),n(_e,G,oe),g(O.children||[],G,_e,te,se,de,ue,ce)):R>0&&R&64&&B&&I.dynamicChildren&&I.dynamicChildren.length===B.length?(M(I.dynamicChildren,B,G,te,se,de,ue),(O.key!=null||te&&O===te.subTree)&&Wa(I,O,!0)):Y(I,O,G,_e,te,se,de,ue,ce)},A=(I,O,G,oe,te,se,de,ue,ce)=>{O.slotScopeIds=ue,I==null?O.shapeFlag&512?te.ctx.activate(O,G,oe,de,ce):Z(O,G,oe,te,se,de,ce):Q(I,O,ce)},Z=(I,O,G,oe,te,se,de)=>{const ue=I.component=bd(I,oe,te);if(Gs(I)&&(ue.ctx.renderer=lt),Sd(ue,!1,de),ue.asyncDep){if(te&&te.registerDep(ue,K,de),!I.el){const ce=ue.subTree=q(st);v(null,ce,O,G),I.placeholder=ce.el}}else K(ue,I,O,G,te,se,de)},Q=(I,O,G)=>{const oe=O.component=I.component;if(rm(I,O,G))if(oe.asyncDep&&!oe.asyncResolved){X(oe,O,G);return}else oe.next=O,oe.update();else O.el=I.el,oe.vnode=O},K=(I,O,G,oe,te,se,de)=>{const ue=()=>{if(I.isMounted){let{next:R,bu:B,u:N,parent:$,vnode:L}=I;{const Me=fd(I);if(Me){R&&(R.el=L.el,X(I,R,de)),Me.asyncDep.then(()=>{ot(()=>{I.isUnmounted||re()},te)});return}}let J=R,ye;qn(I,!1),R?(R.el=L.el,X(I,R,de)):R=L,B&&ns(B),(ye=R.props&&R.props.onVnodeBeforeUpdate)&&Vt(ye,$,R,L),qn(I,!0);const Se=no(I),Fe=I.subTree;I.subTree=Se,w(Fe,Se,d(Fe.el),Ye(Fe),I,te,se),R.el=Se.el,J===null&&so(I,Se.el),N&&ot(N,te),(ye=R.props&&R.props.onVnodeUpdated)&&ot(()=>Vt(ye,$,R,L),te)}else{let R;const{el:B,props:N}=O,{bm:$,m:L,parent:J,root:ye,type:Se}=I,Fe=Vr(O);if(qn(I,!1),$&&ns($),!Fe&&(R=N&&N.onVnodeBeforeMount)&&Vt(R,J,O),qn(I,!0),B&&ut){const Me=()=>{I.subTree=no(I),ut(B,I.subTree,I,te,null)};Fe&&Se.__asyncHydrate?Se.__asyncHydrate(B,I,Me):Me()}else{ye.ce&&ye.ce._hasShadowRoot()&&ye.ce._injectChildStyle(Se);const Me=I.subTree=no(I);w(null,Me,G,oe,I,te,se),O.el=Me.el}if(L&&ot(L,te),!Fe&&(R=N&&N.onVnodeMounted)){const Me=O;ot(()=>Vt(R,J,Me),te)}(O.shapeFlag&256||J&&Vr(J.vnode)&&J.vnode.shapeFlag&256)&&I.a&&ot(I.a,te),I.isMounted=!0,O=G=oe=null}};I.scope.on();const ce=I.effect=new Os(ue);I.scope.off();const re=I.update=ce.run.bind(ce),_e=I.job=ce.runIfDirty.bind(ce);_e.i=I,_e.id=I.uid,ce.scheduler=()=>Ca(_e),qn(I,!0),re()},X=(I,O,G)=>{O.component=I;const oe=I.vnode.props;I.vnode=O,I.next=null,sm(I,O.props,oe,G),lm(I,O.children,G),Dr(),lu(I),Or()},Y=(I,O,G,oe,te,se,de,ue,ce=!1)=>{const re=I&&I.children,_e=I?I.shapeFlag:0,R=O.children,{patchFlag:B,shapeFlag:N}=O;if(B>0){if(B&128){W(re,R,G,oe,te,se,de,ue,ce);return}else if(B&256){ae(re,R,G,oe,te,se,de,ue,ce);return}}N&8?(_e&16&&Ie(re,te,se),R!==re&&c(G,R)):_e&16?N&16?W(re,R,G,oe,te,se,de,ue,ce):Ie(re,te,se,!0):(_e&8&&c(G,""),N&16&&g(R,G,oe,te,se,de,ue,ce))},ae=(I,O,G,oe,te,se,de,ue,ce)=>{I=I||Qn,O=O||Qn;const re=I.length,_e=O.length,R=Math.min(re,_e);let B;for(B=0;B<R;B++){const N=O[B]=ce?zr(O[B]):Ft(O[B]);w(I[B],N,G,null,te,se,de,ue,ce)}re>_e?Ie(I,te,se,!0,!1,R):g(O,G,oe,te,se,de,ue,ce,R)},W=(I,O,G,oe,te,se,de,ue,ce)=>{let re=0;const _e=O.length;let R=I.length-1,B=_e-1;for(;re<=R&&re<=B;){const N=I[re],$=O[re]=ce?zr(O[re]):Ft(O[re]);if(gr(N,$))w(N,$,G,null,te,se,de,ue,ce);else break;re++}for(;re<=R&&re<=B;){const N=I[R],$=O[B]=ce?zr(O[B]):Ft(O[B]);if(gr(N,$))w(N,$,G,null,te,se,de,ue,ce);else break;R--,B--}if(re>R){if(re<=B){const N=B+1,$=N<_e?O[N].el:oe;for(;re<=B;)w(null,O[re]=ce?zr(O[re]):Ft(O[re]),G,$,te,se,de,ue,ce),re++}}else if(re>B)for(;re<=R;)fe(I[re],te,se,!0),re++;else{const N=re,$=re,L=new Map;for(re=$;re<=B;re++){const xt=O[re]=ce?zr(O[re]):Ft(O[re]);xt.key!=null&&L.set(xt.key,re)}let J,ye=0;const Se=B-$+1;let Fe=!1,Me=0;const dt=new Array(Se);for(re=0;re<Se;re++)dt[re]=0;for(re=N;re<=R;re++){const xt=I[re];if(ye>=Se){fe(xt,te,se,!0);continue}let qt;if(xt.key!=null)qt=L.get(xt.key);else for(J=$;J<=B;J++)if(dt[J-$]===0&&gr(xt,O[J])){qt=J;break}qt===void 0?fe(xt,te,se,!0):(dt[qt-$]=re+1,qt>=Me?Me=qt:Fe=!0,w(xt,O[qt],G,null,te,se,de,ue,ce),ye++)}const kn=Fe?cm(dt):Qn;for(J=kn.length-1,re=Se-1;re>=0;re--){const xt=$+re,qt=O[xt],Yh=O[xt+1],Zh=xt+1<_e?Yh.el||pd(Yh):oe;dt[re]===0?w(null,qt,G,Zh,te,se,de,ue,ce):Fe&&(J<0||re!==kn[J]?le(qt,G,Zh,2):J--)}}},le=(I,O,G,oe,te=null)=>{const{el:se,type:de,transition:ue,children:ce,shapeFlag:re}=I;if(re&6){le(I.component.subTree,O,G,oe);return}if(re&128){I.suspense.move(O,G,oe);return}if(re&64){de.move(I,O,G,lt);return}if(de===Le){n(se,O,G);for(let _e=0;_e<ce.length;_e++)le(ce[_e],O,G,oe);n(I.anchor,O,G);return}if(de===Bn){y(I,O,G);return}if(oe!==2&&re&1&&ue)if(oe===0)ue.beforeEnter(se),n(se,O,G),ot(()=>ue.enter(se),te);else{const{leave:_e,delayLeave:R,afterLeave:B}=ue,N=()=>{I.ctx.isUnmounted?s(se):n(se,O,G)},$=()=>{se._isLeaving&&se[Tr](!0),_e(se,()=>{N(),B&&B()})};R?R(se,N,$):$()}else n(se,O,G)},fe=(I,O,G,oe=!1,te=!1)=>{const{type:se,props:de,ref:ue,children:ce,dynamicChildren:re,shapeFlag:_e,patchFlag:R,dirs:B,cacheIndex:N}=I;if(R===-2&&(te=!1),ue!=null&&(Dr(),ds(ue,null,G,I,!0),Or()),N!=null&&(O.renderCache[N]=void 0),_e&256){O.ctx.deactivate(I);return}const $=_e&1&&B,L=!Vr(I);let J;if(L&&(J=de&&de.onVnodeBeforeUnmount)&&Vt(J,O,I),_e&6)Te(I.component,G,oe);else{if(_e&128){I.suspense.unmount(G,oe);return}$&&xr(I,null,O,"beforeUnmount"),_e&64?I.type.remove(I,O,G,lt,oe):re&&!re.hasOnce&&(se!==Le||R>0&&R&64)?Ie(re,O,G,!1,!0):(se===Le&&R&384||!te&&_e&16)&&Ie(ce,O,G),oe&&Ce(I)}(L&&(J=de&&de.onVnodeUnmounted)||$)&&ot(()=>{J&&Vt(J,O,I),$&&xr(I,null,O,"unmounted")},G)},Ce=I=>{const{type:O,el:G,anchor:oe,transition:te}=I;if(O===Le){He(G,oe);return}if(O===Bn){b(I);return}const se=()=>{s(G),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(I.shapeFlag&1&&te&&!te.persisted){const{leave:de,delayLeave:ue}=te,ce=()=>de(G,se);ue?ue(I.el,se,ce):ce()}else se()},He=(I,O)=>{let G;for(;I!==O;)G=p(I),s(I),I=G;s(O)},Te=(I,O,G)=>{const{bum:oe,scope:te,job:se,subTree:de,um:ue,m:ce,a:re}=I;io(ce),io(re),oe&&ns(oe),te.stop(),se&&(se.flags|=8,fe(de,I,O,G)),ue&&ot(ue,O),ot(()=>{I.isUnmounted=!0},O)},Ie=(I,O,G,oe=!1,te=!1,se=0)=>{for(let de=se;de<I.length;de++)fe(I[de],O,G,oe,te)},Ye=I=>{if(I.shapeFlag&6)return Ye(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const O=p(I.anchor||I.el),G=O&&O[gu];return G?p(G):O};let at=!1;const Pe=(I,O,G)=>{let oe;I==null?O._vnode&&(fe(O._vnode,null,null,!0),oe=O._vnode.component):w(O._vnode||null,I,O,null,null,null,G),O._vnode=I,at||(at=!0,lu(oe),Vi(),at=!1)},lt={p:w,um:fe,m:le,r:Ce,mt:Z,mc:g,pc:Y,pbc:M,n:Ye,o:e};let gt,ut;return t&&([gt,ut]=t(lt)),{render:Pe,hydrate:gt,createApp:Jv(Pe,gt)}}function Ka({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function qn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function dd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Wa(e,t,r=!1){const n=e.children,s=t.children;if(ve(n)&&ve(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=zr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Wa(o,a)),a.type===ln&&(a.patchFlag===-1&&(a=s[i]=zr(a)),a.el=o.el),a.type===st&&!a.el&&(a.el=o.el)}}function cm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const u=e[n];if(u!==0){if(s=r[r.length-1],e[s]<u){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<u?i=a+1:o=a;u<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function fd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fd(t)}function io(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pd(t.subTree):null}var oo=e=>e.__isSuspense,Ga=0,um={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)dm(t,r,n,s,i,o,a,l,u);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}fm(e,t,r,n,s,o,a,l,u)}},hydrate:pm,normalize:hm};function ti(e,t){const r=e.props&&e.props[t];Ee(r)&&r()}function dm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=hd(e,s,n,t,d,r,i,o,a,l);u(null,p.pendingBranch=e.ssContent,d,null,n,p,i,o),p.deps>0?(ti(e,"onPending"),ti(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),gs(p,e.ssFallback)):p.resolve(!1,!0)}function fm(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:v}=d;if(w)d.pendingBranch=p,gr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(v||(l(m,h,r,n,s,null,i,o,a),gs(d,h)))):(d.pendingId=Ga++,v?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),gs(d,h))):m&&gr(m,p)?(l(m,p,r,n,s,d,i,o,a),d.resolve(!0)):(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0&&d.resolve()));else if(m&&gr(m,p))l(m,p,r,n,s,d,i,o,a),gs(d,p);else if(ti(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Ga++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:y}=d;C>0?setTimeout(()=>{d.pendingId===y&&d.fallback(h)},C):C===0&&d.fallback(h)}}function hd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let v;const C=gm(e);C&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const y=e.props?Ii(e.props.timeout):void 0,b=i,_={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Ga++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(T=!1,P=!1){const{vnode:g,activeBranch:H,pendingBranch:M,pendingId:S,effects:E,parentComponent:A,container:Z,isInFallback:Q}=_;let K=!1;_.isHydrating?_.isHydrating=!1:T||(K=H&&M.transition&&M.transition.mode==="out-in",K&&(H.transition.afterLeave=()=>{S===_.pendingId&&(p(M,Z,i===b?m(H):i,0),Vs(E),Q&&g.ssFallback&&(g.ssFallback.el=null))}),H&&(w(H.el)===Z&&(i=m(H)),h(H,A,_,!0),!K&&Q&&g.ssFallback&&ot(()=>g.ssFallback.el=null,_)),K||p(M,Z,i,0)),gs(_,M),_.pendingBranch=null,_.isInFallback=!1;let X=_.parent,Y=!1;for(;X;){if(X.pendingBranch){X.effects.push(...E),Y=!0;break}X=X.parent}!Y&&!K&&Vs(E),_.effects=[],C&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!P&&t.resolve()),ti(g,"onResolve")},fallback(T){if(!_.pendingBranch)return;const{vnode:P,activeBranch:g,parentComponent:H,container:M,namespace:S}=_;ti(P,"onFallback");const E=m(g),A=()=>{_.isInFallback&&(d(null,T,M,E,H,null,S,a,l),gs(_,T))},Z=T.transition&&T.transition.mode==="out-in";Z&&(g.transition.afterLeave=A),_.isInFallback=!0,h(g,H,null,!0),Z||A()},move(T,P,g){_.activeBranch&&p(_.activeBranch,T,P,g),_.container=T},next(){return _.activeBranch&&m(_.activeBranch)},registerDep(T,P,g){const H=!!_.pendingBranch;H&&_.deps++;const M=T.vnode.el;T.asyncDep.catch(S=>{Hn(S,T,0)}).then(S=>{if(T.isUnmounted||_.isUnmounted||_.pendingId!==T.suspenseId)return;T.asyncResolved=!0;const{vnode:E}=T;Xa(T,S,!1),M&&(E.el=M);const A=!M&&T.subTree.el;P(T,E,w(M||T.subTree.el),M?null:m(T.subTree),_,o,g),A&&(E.placeholder=null,x(A)),so(T,E.el),H&&--_.deps===0&&_.resolve()})},unmount(T,P){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,r,T,P),_.pendingBranch&&h(_.pendingBranch,r,T,P)}};return _}function pm(e,t,r,n,s,i,o,a,l){const u=t.suspense=hd(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),c=l(e,u.pendingBranch=t.ssContent,r,u,i,o);return u.deps===0&&u.resolve(!1,!0),c}function hm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=gd(n?r.default:r),e.ssFallback=n?gd(r.fallback):q(st)}function gd(e){let t;if(Ee(e)){const r=Ln&&e._c;r&&(e._d=!1,D()),e=e(),r&&(e._d=!0,t=Rt,md())}return ve(e)&&(e=Qv(e)),e=Ft(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function vd(e,t){t&&t.pendingBranch?ve(e)?t.effects.push(...e):t.effects.push(e):Vs(e)}function gs(e,t){e.activeBranch=t;const{vnode:r,parentComponent:n}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;r.el=s,n&&n.subTree===r&&(n.vnode.el=s,so(n,s))}function gm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Le=Symbol.for("v-fgt"),ln=Symbol.for("v-txt"),st=Symbol.for("v-cmt"),Bn=Symbol.for("v-stc"),ri=[],Rt=null;function D(e=!1){ri.push(Rt=e?null:[])}function md(){ri.pop(),Rt=ri[ri.length-1]||null}var Ln=1;function ni(e,t=!1){Ln+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function wd(e){return e.dynamicChildren=Ln>0?Rt||Qn:null,md(),Ln>0&&Rt&&Rt.push(e),e}function me(e,t,r,n,s,i){return wd(ne(e,t,r,n,s,i,!0))}function U(e,t,r,n,s){return wd(q(e,t,r,n,s,!0))}function Ur(e){return e?e.__v_isVNode===!0:!1}function gr(e,t){return e.type===t.type&&e.key===t.key}function vm(e){}var yd=({key:e})=>e??null,ao=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Xe(e)||Ge(e)||Ee(e)?{i:_t,r:e,k:t,f:!!r}:e:null);function ne(e,t=null,r=null,n=0,s=null,i=e===Le?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yd(t),ref:t&&ao(t),scopeId:Ui,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:_t};return a?(Ya(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Xe(r)?8:16),Ln>0&&!o&&Rt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Rt.push(l),l}var q=mm;function mm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===Bu)&&(e=st),Ur(e)){const a=vr(e,t,!0);return r&&Ya(a,r),Ln>0&&!i&&Rt&&(a.shapeFlag&6?Rt[Rt.indexOf(e)]=a:Rt.push(a)),a.patchFlag=-2,a}if(xm(e)&&(e=e.__vccOpts),t){t=nr(t);let{class:a,style:l}=t;a&&!Xe(a)&&(t.class=Ze(a)),je(l)&&(Ls(l)&&!ve(l)&&(l=Ke({},l)),t.style=vt(l))}const o=Xe(e)?1:oo(e)?128:vu(e)?64:je(e)?4:Ee(e)?2:0;return ne(e,t,r,n,s,o,i,!0)}function nr(e){return e?Ls(e)||td(e)?Ke({},e):e:null}function vr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?he(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&yd(u),ref:t&&t.ref?r&&i?ve(i)?i.concat(ao(t)):[i,ao(t)]:ao(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vr(e.ssContent),ssFallback:e.ssFallback&&vr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Fr(c,l.clone(c)),c}function Ne(e=" ",t=0){return q(ln,null,e,t)}function Ja(e,t){const r=q(Bn,null,e);return r.staticCount=t,r}function $e(e="",t=!1){return t?(D(),U(st,null,e)):q(st,null,e)}function Ft(e){return e==null||typeof e=="boolean"?q(st):ve(e)?q(Le,null,e.slice()):Ur(e)?zr(e):q(ln,null,String(e))}function zr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vr(e)}function Ya(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ve(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Ya(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!td(t)?t._ctx=_t:s===3&&_t&&(_t.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:_t},r=32):(t=String(t),n&64?(r=16,t=[Ne(t)]):r=8);e.children=t,e.shapeFlag|=r}function he(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=Ze([t.class,n.class]));else if(s==="style")t.style=vt([t.style,n.style]);else if(Ps(s)){const i=t[s],o=n[s];o&&i!==o&&!(ve(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Vt(e,t,r,n=null){er(e,t,7,[r,n])}var wm=Gu(),ym=0;function bd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||wm,i={uid:ym++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new la(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nd(n,s),emitsOptions:Yu(n,s),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:n.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Zv.bind(null,i),e.ce&&e.ce(i),i}var St=null,it=()=>St||_t,lo,Za;{const e=Ri(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};lo=t("__VUE_INSTANCE_SETTERS__",r=>St=r),Za=t("__VUE_SSR_SETTERS__",r=>vs=r)}var Fn=e=>{const t=St;return lo(e),e.scope.on(),()=>{e.scope.off(),lo(t)}},co=()=>{St&&St.scope.off(),lo(null)};function _d(e){return e.vnode.shapeFlag&4}var vs=!1;function Sd(e,t=!1,r=!1){t&&Za(t);const{props:n,children:s}=e.vnode,i=_d(e);nm(e,n,i,t),am(e,s,r||t);const o=i?bm(e,t):void 0;return t&&Za(!1),o}function bm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ba);const{setup:n}=r;if(n){Dr();const s=e.setupContext=n.length>1?xd(e):null,i=Fn(e),o=os(n,e,0,[e.props,s]),a=oa(o);if(Or(),i(),(a||e.sp)&&!Vr(e)&&$a(e),a){if(o.then(co,co),t)return o.then(l=>{Xa(e,l,t)}).catch(l=>{Hn(l,e,0)});e.asyncDep=o}else Xa(e,o,t)}else Cd(e,t)}function Xa(e,t,r){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:je(t)&&(e.setupState=_a(t)),Cd(e,r)}var uo,Qa;function _m(e){uo=e,Qa=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,kv))}}var Sm=()=>!uo;function Cd(e,t,r){const n=e.type;if(!e.render){if(!t&&uo&&!n.render){const s=n.template||Fa(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Ke(Ke({isCustomElement:i,delimiters:a},o),l);n.render=uo(s,u)}}e.render=n.render||Qt,Qa&&Qa(e)}{const s=Fn(e);Dr();try{jv(e)}finally{Or(),s()}}}var Cm={get(e,t){return Et(e,"get",""),e[t]}};function xd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Cm),slots:e.slots,emit:e.emit,expose:t}}function si(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_a(ba(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Xs)return Xs[r](e)},has(t,r){return r in t||r in Xs}})):e.proxy}function el(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function xm(e){return Ee(e)&&"__vccOpts"in e}var j=(e,t)=>zg(e,t,vs);function sr(e,t,r){try{ni(-1);const n=arguments.length;return n===2?je(t)&&!ve(t)?Ur(t)?q(e,null,[t]):q(e,t):q(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Ur(r)&&(r=[r]),q(e,t,r))}finally{ni(1)}}function Tm(){return;function e(t,r,n){const s=t[n];if(ve(s)&&s.includes(r)||je(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function Em(e,t,r,n){const s=r[n];if(s&&Td(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Td(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Pt(r[n],t[n]))return!1;return Ln>0&&Rt&&Rt.push(e),!0}var Ed="3.5.29",Am=Qt,Im=ev,Rm=cs,km=uu,$m={createComponentInstance:bd,setupComponent:Sd,renderComponentRoot:no,setCurrentRenderingInstance:Us,isVNode:Ur,normalizeVNode:Ft,getComponentPublicInstance:si,ensureValidVNode:Ma,pushWarningContext:Yg,popWarningContext:Zg},sx=null,ix=null,ox=null;var tl=void 0,Ad=typeof window<"u"&&window.trustedTypes;if(Ad)try{tl=Ad.createPolicy("vue",{createHTML:e=>e})}catch{}var Id=tl?e=>tl.createHTML(e):e=>e,Pm="http://www.w3.org/2000/svg",Dm="http://www.w3.org/1998/Math/MathML",Kr=typeof document<"u"?document:null,Rd=Kr&&Kr.createElement("template"),kd={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Kr.createElementNS(Pm,e):t==="mathml"?Kr.createElementNS(Dm,e):r?Kr.createElement(e,{is:r}):Kr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Kr.createTextNode(e),createComment:e=>Kr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Kr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Rd.innerHTML=Id(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Rd.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},cn="transition",ii="animation",ms=Symbol("_vtc"),$d={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Pd=Ke({},Ra,$d),Om=e=>(e.displayName="Transition",e.props=Pd,e),Hm=Om((e,{slots:t})=>sr(Cu,Od(e),t)),Vn=(e,t=[])=>{ve(e)?e.forEach(r=>r(...t)):e&&e(...t)},Dd=e=>e?ve(e)?e.some(t=>t.length>1):e.length>1:!1;function Od(e){const t={};for(const E in e)E in $d||(t[E]=e[E]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=Mm(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:v,onEnter:C,onEnterCancelled:y,onLeave:b,onLeaveCancelled:_,onBeforeAppear:T=v,onAppear:P=C,onAppearCancelled:g=y}=t,H=(E,A,Z,Q)=>{E._enterCancelled=Q,un(E,A?c:a),un(E,A?u:o),Z&&Z()},M=(E,A)=>{E._isLeaving=!1,un(E,d),un(E,h),un(E,p),A&&A()},S=E=>(A,Z)=>{const Q=E?P:C,K=()=>H(A,E,Z);Vn(Q,[A,K]),Hd(()=>{un(A,E?l:i),Er(A,E?c:a),Dd(Q)||Md(A,n,w,K)})};return Ke(t,{onBeforeEnter(E){Vn(v,[E]),Er(E,i),Er(E,o)},onBeforeAppear(E){Vn(T,[E]),Er(E,l),Er(E,u)},onEnter:S(!1),onAppear:S(!0),onLeave(E,A){E._isLeaving=!0;const Z=()=>M(E,A);Er(E,d),E._enterCancelled?(Er(E,p),nl(E)):(nl(E),Er(E,p)),Hd(()=>{E._isLeaving&&(un(E,d),Er(E,h),Dd(b)||Md(E,n,x,Z))}),Vn(b,[E,Z])},onEnterCancelled(E){H(E,!1,void 0,!0),Vn(y,[E])},onAppearCancelled(E){H(E,!0,void 0,!0),Vn(g,[E])},onLeaveCancelled(E){M(E),Vn(_,[E])}})}function Mm(e){if(e==null)return null;if(je(e))return[rl(e.enter),rl(e.leave)];{const t=rl(e);return[t,t]}}function rl(e){return Ii(e)}function Er(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ms]||(e[ms]=new Set)).add(t)}function un(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ms];r&&(r.delete(t),r.size||(e[ms]=void 0))}function Hd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Nm=0;function Md(e,t,r,n){const s=e._endId=++Nm,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Nd(e,t);if(!o)return n();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,p),i()},p=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,p)}function Nd(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${cn}Delay`),i=n(`${cn}Duration`),o=qd(s,i),a=n(`${ii}Delay`),l=n(`${ii}Duration`),u=qd(a,l);let c=null,d=0,p=0;t===cn?o>0&&(c=cn,d=o,p=i.length):t===ii?u>0&&(c=ii,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?cn:ii:null,p=c?c===cn?i.length:l.length:0);const h=c===cn&&/\b(?:transform|all)(?:,|$)/.test(n(`${cn}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function qd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Bd(r)+Bd(e[n])))}function Bd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function nl(e){return(e?e.ownerDocument:document).body.offsetHeight}function qm(e,t,r){const n=e[ms];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var fo=Symbol("_vod"),Ld=Symbol("_vsh"),po={name:"show",beforeMount(e,{value:t},{transition:r}){e[fo]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):oi(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),oi(e,!0),n.enter(e)):n.leave(e,()=>{oi(e,!1)}):oi(e,t))},beforeUnmount(e,{value:t}){oi(e,t)}};function oi(e,t){e.style.display=t?e[fo]:"none",e[Ld]=!t}function Bm(){po.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Fd=Symbol("");function Lm(e){const t=it();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>ho(i,s))},n=()=>{const s=e(t.proxy);t.ce?ho(t.ce,s):sl(t.subTree,s),r(s)};Da(()=>{Vs(n)}),We(()=>{Re(n,Qt,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Ht(()=>s.disconnect())})}function sl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{sl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ho(e.el,t);else if(e.type===Le)e.children.forEach(r=>sl(r,t));else if(e.type===Bn){let{el:r,anchor:n}=e;for(;r&&(ho(r,t),r!==n);)r=r.nextSibling}}function ho(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=mg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Fd]=n}}var Fm=/(?:^|;)\s*display\s*:/;function Vm(e,t,r){const n=e.style,s=Xe(r);let i=!1;if(r&&!s){if(t)if(Xe(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&go(n,a,"")}else for(const o in t)r[o]==null&&go(n,o,"");for(const o in r)o==="display"&&(i=!0),go(n,o,r[o])}else if(s){if(t!==r){const o=n[Fd];o&&(r+=";"+o),n.cssText=r,i=Fm.test(r)}}else t&&e.removeAttribute("style");fo in e&&(e[fo]=i?n.display:"",e[Ld]&&(n.display="none"))}var Vd=/\s*!important$/;function go(e,t,r){if(ve(r))r.forEach(n=>go(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=jm(e,t);Vd.test(r)?e.setProperty(Bt(n),r.replace(Vd,""),"important"):e[n]=r}}var jd=["Webkit","Moz","ms"],il={};function jm(e,t){const r=il[t];if(r)return r;let n=ft(t);if(n!=="filter"&&n in e)return il[t]=n;n=Ds(n);for(let s=0;s<jd.length;s++){const i=jd[s]+n;if(i in e)return il[t]=i}return t}var Ud="http://www.w3.org/1999/xlink";function zd(e,t,r,n,s,i=gg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Ud,t.slice(6,t.length)):e.setAttributeNS(Ud,t,r):r==null||i&&!Oc(r)?e.removeAttribute(t):e.setAttribute(t,i?"":dr(r)?String(r):r)}function Kd(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Id(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=r==null?e.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in e))&&(e.value=l),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const a=typeof e[t];a==="boolean"?r=Oc(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(s||t)}function Wr(e,t,r,n){e.addEventListener(t,r,n)}function Um(e,t,r,n){e.removeEventListener(t,r,n)}var Wd=Symbol("_vei");function zm(e,t,r,n,s=null){const i=e[Wd]||(e[Wd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=Km(t);n?Wr(e,a,i[t]=Jm(n,s),l):o&&(Um(e,a,o,l),i[t]=void 0)}}var Gd=/(?:Once|Passive|Capture)$/;function Km(e){let t;if(Gd.test(e)){t={};let r;for(;r=e.match(Gd);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Bt(e.slice(2)),t]}var ol=0,Wm=Promise.resolve(),Gm=()=>ol||(Wm.then(()=>ol=0),ol=Date.now());function Jm(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;er(Ym(n,r.value),t,5,[n])};return r.value=e,r.attached=Gm(),r}function Ym(e,t){if(ve(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}var Jd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Yd=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?qm(e,n,o):t==="style"?Vm(e,r,n):Ps(t)?sa(t)||zm(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Zm(e,t,n,o))?(Kd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Xe(n))?Kd(e,ft(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),zd(e,t,n,o))};function Zm(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jd(t)&&Ee(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Jd(t)&&Xe(r)?!1:t in e}var Zd={};function al(e,t,r){let n=ee(e,t);xi(n)&&(n=Ke({},n,t));class s extends Xd{constructor(o){super(n,o,r)}}return s.def=n,s}var Xm=((e,t)=>al(e,t,wf)),Qm=typeof HTMLElement<"u"?HTMLElement:class{},Xd=class Xh extends Qm{constructor(t,r={},n=dl){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==dl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ke({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Xh){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,mt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let a;if(i&&!ve(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ii(this._props[l])),(a||(a=Object.create(null)))[ft(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)ze(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=ve(r)?r:Object.keys(r||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(ft))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):Zd;const s=ft(t);r&&this._numberProps&&this._numberProps[s]&&(n=Ii(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,s=!1){if(r!==this._props[t]&&(this._dirty=!0,r===Zd?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),s&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(Bt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Bt(t),r+""):r||this.removeAttribute(Bt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),mf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=q(this._def,Ke(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,xi(o[0])?Ke({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Bt(i)!==i&&s(Bt(i),o)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");n&&i.setAttribute("nonce",n),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],i=s.getAttribute("name")||"default",o=this._slots[i],a=s.parentNode;if(o)for(const l of o){if(r&&l.nodeType===1){const u=r+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let i=0;i<s.length;i++)r.add(s[i])}return Array.from(r)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}};function Qd(e){const t=it(),r=t&&t.ce;return r||null}function e0(){const e=Qd();return e&&e.shadowRoot}function t0(e="$style"){{const t=it();if(!t)return qe;const r=t.type.__cssModules;if(!r)return qe;const n=r[e];return n||qe}}var ef=new WeakMap,tf=new WeakMap,vo=Symbol("_moveCb"),rf=Symbol("_enterCb"),r0=e=>(delete e.props.mode,e),n0=r0({name:"TransitionGroup",props:Ke({},Pd,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=it(),n=Ia();let s,i;return Ys(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!a0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(s0),s.forEach(i0);const a=s.filter(o0);nl(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Er(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[vo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[vo]=null,un(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Be(e),a=Od(o);let l=o.tag||Le;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Fr(c,us(c,a,n,r)),ef.set(c,nf(c.el)))}i=t.default?Gi(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Fr(c,us(c,a,n,r))}return q(l,null,i)}}});function s0(e){const t=e.el;t[vo]&&t[vo](),t[rf]&&t[rf]()}function i0(e){tf.set(e,nf(e.el))}function o0(e){const t=ef.get(e),r=tf.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el,o=i.style,a=i.getBoundingClientRect();let l=1,u=1;return i.offsetWidth&&(l=a.width/i.offsetWidth),i.offsetHeight&&(u=a.height/i.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),o.transform=o.webkitTransform=`translate(${n/l}px,${s/u}px)`,o.transitionDuration="0s",e}}function nf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function a0(e,t,r){const n=e.cloneNode(),s=e[ms];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Nd(n);return i.removeChild(n),o}var dn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ve(t)?r=>ns(t,r):t};function l0(e){e.target.composing=!0}function sf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var ir=Symbol("_assign");function of(e,t,r){return t&&(e=e.trim()),r&&(e=Ai(e)),e}var ai={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[ir]=dn(s);const i=n||s.props&&s.props.type==="number";Wr(e,t?"change":"input",o=>{o.target.composing||e[ir](of(e.value,r,i))}),(r||i)&&Wr(e,"change",()=>{e.value=of(e.value,r,i)}),t||(Wr(e,"compositionstart",l0),Wr(e,"compositionend",sf),Wr(e,"change",sf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[ir]=dn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ai(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},ll={deep:!0,created(e,t,r){e[ir]=dn(r),Wr(e,"change",()=>{const n=e._modelValue,s=ws(e),i=e.checked,o=e[ir];if(ve(n)){const a=ki(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const u=[...n];u.splice(a,1),o(u)}}else if(Pn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(uf(e,i))})},mounted:af,beforeUpdate(e,t,r){e[ir]=dn(r),af(e,t,r)}};function af(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(ve(t))s=ki(t,n.props.value)>-1;else if(Pn(t))s=t.has(n.props.value);else{if(t===r)return;s=Pr(t,uf(e,!0))}e.checked!==s&&(e.checked=s)}var cl={created(e,{value:t},r){e.checked=Pr(t,r.props.value),e[ir]=dn(r),Wr(e,"change",()=>{e[ir](ws(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[ir]=dn(n),t!==r&&(e.checked=Pr(t,n.props.value))}},lf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Pn(t);Wr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Ai(ws(o)):ws(o));e[ir](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,mt(()=>{e._assigning=!1})}),e[ir]=dn(n)},mounted(e,{value:t}){cf(e,t)},beforeUpdate(e,t,r){e[ir]=dn(r)},updated(e,{value:t}){e._assigning||cf(e,t)}};function cf(e,t){const r=e.multiple,n=ve(t);if(!(r&&!n&&!Pn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=ws(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=ki(t,a)>-1}else o.selected=t.has(a);else if(Pr(ws(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ws(e){return"_value"in e?e._value:e.value}function uf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var df={created(e,t,r){mo(e,t,r,null,"created")},mounted(e,t,r){mo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){mo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){mo(e,t,r,n,"updated")}};function ff(e,t){switch(e){case"SELECT":return lf;case"TEXTAREA":return ai;default:switch(t){case"checkbox":return ll;case"radio":return cl;default:return ai}}}function mo(e,t,r,n,s){const i=ff(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function c0(){ai.getSSRProps=({value:e})=>({value:e}),cl.getSSRProps=({value:e},t)=>{if(t.props&&Pr(t.props.value,e))return{checked:!0}},ll.getSSRProps=({value:e},t)=>{if(ve(e)){if(t.props&&ki(e,t.props.value)>-1)return{checked:!0}}else if(Pn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},df.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=ff(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var u0=["ctrl","shift","alt","meta"],d0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>u0.some(r=>e[`${r}Key`]&&!t.includes(r))},or=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<t.length;o++){const a=d0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},f0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ul=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Bt(s.key);if(t.some(o=>o===i||f0[o]===i))return e(s)}))},pf=Ke({patchProp:Yd},kd),li,hf=!1;function gf(){return li||(li=ld(pf))}function vf(){return li=hf?li:cd(pf),hf=!0,li}var mf=((...e)=>{gf().render(...e)}),p0=((...e)=>{vf().hydrate(...e)}),dl=((...e)=>{const t=gf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=bf(n);if(!s)return;const i=t._component;!Ee(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,yf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),wf=((...e)=>{const t=vf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=bf(n);if(s)return r(s,!0,yf(s))},t});function yf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function bf(e){return Xe(e)?document.querySelector(e):e}var _f=!1,h0=()=>{_f||(_f=!0,c0(),Bm())},g0=sg({BaseTransition:()=>Cu,BaseTransitionPropsValidators:()=>Ra,Comment:()=>st,DeprecationTypes:()=>null,EffectScope:()=>la,ErrorCodes:()=>Qg,ErrorTypeStrings:()=>Im,Fragment:()=>Le,KeepAlive:()=>xv,ReactiveEffect:()=>Os,Static:()=>Bn,Suspense:()=>um,Teleport:()=>Ea,Text:()=>ln,TrackOpTypes:()=>Kg,Transition:()=>Hm,TransitionGroup:()=>n0,TriggerOpTypes:()=>Wg,VueElement:()=>Xd,assertNumber:()=>Xg,callWithAsyncErrorHandling:()=>er,callWithErrorHandling:()=>os,camelize:()=>ft,capitalize:()=>Ds,cloneVNode:()=>vr,compatUtils:()=>null,compile:()=>v0,computed:()=>j,createApp:()=>dl,createBlock:()=>U,createCommentVNode:()=>$e,createElementBlock:()=>me,createElementVNode:()=>ne,createHydrationRenderer:()=>cd,createPropsRestProxy:()=>Fv,createRenderer:()=>ld,createSSRApp:()=>wf,createSlots:()=>Rv,createStaticVNode:()=>Ja,createTextVNode:()=>Ne,createVNode:()=>q,customRef:()=>Fs,defineAsyncComponent:()=>Cv,defineComponent:()=>ee,defineCustomElement:()=>al,defineEmits:()=>Pv,defineExpose:()=>Dv,defineModel:()=>Mv,defineOptions:()=>Ov,defineProps:()=>$v,defineSSRCustomElement:()=>Xm,defineSlots:()=>Hv,devtools:()=>Rm,effect:()=>yg,effectScope:()=>ca,getCurrentInstance:()=>it,getCurrentScope:()=>$i,getCurrentWatcher:()=>Gg,getTransitionRawChildren:()=>Gi,guardReactiveProps:()=>nr,h:()=>sr,handleError:()=>Hn,hasInjectionContext:()=>ov,hydrate:()=>p0,hydrateOnIdle:()=>mv,hydrateOnInteraction:()=>_v,hydrateOnMediaQuery:()=>bv,hydrateOnVisible:()=>yv,initCustomFormatter:()=>Tm,initDirectivesForSSR:()=>h0,inject:()=>Ot,isMemoSame:()=>Td,isProxy:()=>Ls,isReactive:()=>Br,isReadonly:()=>Sr,isRef:()=>Ge,isRuntimeOnly:()=>Sm,isShallow:()=>Lt,isVNode:()=>Ur,markRaw:()=>ba,mergeDefaults:()=>ju,mergeModels:()=>Lv,mergeProps:()=>he,nextTick:()=>mt,nodeOps:()=>kd,normalizeClass:()=>Ze,normalizeProps:()=>fr,normalizeStyle:()=>vt,onActivated:()=>$u,onBeforeMount:()=>Ou,onBeforeUnmount:()=>hs,onBeforeUpdate:()=>Da,onDeactivated:()=>Pu,onErrorCaptured:()=>qu,onMounted:()=>We,onRenderTracked:()=>Nu,onRenderTriggered:()=>Mu,onScopeDispose:()=>ua,onServerPrefetch:()=>Hu,onUnmounted:()=>Ht,onUpdated:()=>Ys,onWatcherCleanup:()=>su,openBlock:()=>D,patchProp:()=>Yd,popScopeId:()=>sv,provide:()=>Mn,proxyRefs:()=>_a,pushScopeId:()=>nv,queuePostFlushCb:()=>Vs,reactive:()=>Nr,readonly:()=>At,ref:()=>V,registerRuntimeCompiler:()=>_m,render:()=>mf,renderList:()=>rr,renderSlot:()=>ie,resolveComponent:()=>Av,resolveDirective:()=>Iv,resolveDynamicComponent:()=>Zs,resolveFilter:()=>null,resolveTransitionHooks:()=>us,setBlockTracking:()=>ni,setDevtoolsHook:()=>km,setTransitionHooks:()=>Fr,shallowReactive:()=>eu,shallowReadonly:()=>qr,shallowRef:()=>tt,ssrContextKey:()=>du,ssrUtils:()=>$m,stop:()=>bg,toDisplayString:()=>Oe,toHandlerKey:()=>rs,toHandlers:()=>Fu,toRaw:()=>Be,toRef:()=>Sa,toRefs:()=>It,toValue:()=>xe,transformVNodeArgs:()=>vm,triggerRef:()=>ru,unref:()=>f,useAttrs:()=>Bv,useCssModule:()=>t0,useCssVars:()=>Lm,useHost:()=>Qd,useId:()=>Eu,useModel:()=>Yv,useSSRContext:()=>fu,useShadowRoot:()=>e0,useSlots:()=>qv,useTemplateRef:()=>uv,useTransitionState:()=>Ia,vModelCheckbox:()=>ll,vModelDynamic:()=>df,vModelRadio:()=>cl,vModelSelect:()=>lf,vModelText:()=>ai,vShow:()=>po,version:()=>Ed,warn:()=>Am,watch:()=>Re,watchEffect:()=>et,watchPostEffect:()=>xa,watchSyncEffect:()=>pu,withAsyncContext:()=>Vv,withCtx:()=>k,withDefaults:()=>Nv,withDirectives:()=>zi,withKeys:()=>ul,withMemo:()=>Em,withModifiers:()=>or,withScopeId:()=>iv},1),v0=()=>{},m0=2;const mr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},w0=(e="webphone_db")=>{const t=V(null),r=V(!1);return{initDB:()=>new Promise((l,u)=>{if(t.value){l();return}const c=indexedDB.open(e,m0);c.onerror=d=>{console.error("IndexedDB error:",d),u(d)},c.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},c.onupgradeneeded=d=>{const p=d.target.result;p.objectStoreNames.contains(mr.CALL_HISTORY)||p.createObjectStore(mr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(mr.CONTACTS)||p.createObjectStore(mr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(mr.CONNECTIONS)||p.createObjectStore(mr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((u,c)=>{if(!t.value)return c("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>u(d.result),d.onerror=()=>c(d.error)}),add:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).add(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),put:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).put(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),remove:(l,u)=>new Promise((c,d)=>{if(!t.value)return d("DB not initialized");const p=t.value.transaction([l],"readwrite").objectStore(l).delete(u);p.onsuccess=()=>c(),p.onerror=()=>d(p.error)}),isReady:r}},y0=e=>{const t=V(e?.initialConnected??!1),r=V(0),n=V(null),s=V([]),i=V([]),{initDB:o,getAll:a,add:l}=w0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(mr.CALL_HISTORY)).sort((W,le)=>le.startTime-W.startTime),i.value=await a(mr.CONTACTS)}catch(W){console.error("Error loading data from IndexedDB:",W)}});const u=V([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=V(e?.initialKeypadVisible??!0),d=V(""),p=V(!1),h=j(()=>u.value.find(W=>W.id===r.value)||u.value[0]),m=j(()=>h.value?.status||"idle"),w=j(()=>h.value?.remoteNumber||""),x=j(()=>h.value?.isMuted||!1),v=j(()=>h.value?.isHeld||!1),C=j({get:()=>h.value?.keypadValue||"",set:W=>{h.value&&(h.value.keypadValue=W)}}),y=W=>{t.value=W},b=W=>{u.value.some(le=>le.id===W)&&(r.value=W)},_=(W,le)=>{const fe=u.value.find(Ce=>Ce.id===W);fe&&Object.assign(fe,le)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:v,keypadValue:C,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:y,setActiveChannelId:b,updateChannelState:_,setCallStatus:W=>{_(r.value,{status:W})},setIncomingCall:W=>{_(r.value,{remoteNumber:W})},resetCall:()=>{_(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async W=>{const le={id:crypto.randomUUID(),...W};s.value.unshift(le);try{await l(mr.CALL_HISTORY,le)}catch(fe){console.error("Error saving call log:",fe)}},callHistory:s,contacts:i,addContact:async W=>{try{await l(mr.CONTACTS,W),i.value=await a(mr.CONTACTS)}catch(le){console.error("Error saving contact:",le)}},setMuted:W=>{_(r.value,{isMuted:W})},setHeld:W=>{_(r.value,{isHeld:W})},appendKeypad:W=>{C.value+=W},clearKeypad:()=>{C.value=""},backspaceKeypad:()=>{C.value=C.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:W=>{d.value=W},setTransferInProgress:W=>{n.value=W},toggleVideoMode:()=>{p.value=!p.value}}},b0="0.21.1";var jn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},fl=class extends jn{constructor(e){super(e||"Unsupported content type.")}},pl=class extends jn{constructor(e){super(e||"Request pending.")}},_0=class extends jn{constructor(e){super(e||"Unspecified session description handler error.")}},hl=class extends jn{constructor(){super("The session has terminated.")}},ci=class extends jn{constructor(e){super(e||"An error occurred during state transition.")}},S0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},C0=class{constructor(e){this.incomingByeRequest=e}get request(){return this.incomingByeRequest.message}accept(e){return this.incomingByeRequest.accept(e),Promise.resolve()}reject(e){return this.incomingByeRequest.reject(e),Promise.resolve()}},x0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},ui=class{constructor(){this.listeners=new Array}addListener(e,t){const r=n=>{this.removeListener(r),e(n)};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}emit(e){this.listeners.slice().forEach(t=>t(e))}removeAllListeners(){this.listeners=[]}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}on(e){return this.addListener(e)}off(e){return this.removeListener(e)}once(e){return this.addListener(e,{once:!0})}},T0=class{constructor(e){this.incomingInfoRequest=e}get request(){return this.incomingInfoRequest.message}accept(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}reject(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}},Sf=class{constructor(e){this.parameters={};for(const t in e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}setParam(e,t){e&&(this.parameters[e.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(e){if(e)return this.parameters[e.toLowerCase()]}hasParam(e){return!!(e&&this.parameters[e.toLowerCase()]!==void 0)}deleteParam(e){if(e=e.toLowerCase(),this.hasParam(e)){const t=this.parameters[e];return delete this.parameters[e],t}}clearParams(){this.parameters={}}},ar=class Qh extends Sf{constructor(t,r,n){super(n),this.uri=t,this._displayName=r}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(t){this._displayName=t}clone(){return new Qh(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let t=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";t+="<"+this.uri.toString()+">";for(const r in this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,this.parameters[r]!==null&&(t+="="+this.parameters[r]));return t}},fn=class eg extends Sf{constructor(t="sip",r,n,s,i,o){if(super(i||{}),this.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(const a in o)o.hasOwnProperty(a)&&this.setHeader(a,o[a]);this.raw={scheme:t,user:r,host:n,port:s},this.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:s}}get scheme(){return this.normal.scheme}set scheme(t){this.raw.scheme=t,this.normal.scheme=t.toLowerCase()}get user(){return this.normal.user}set user(t){this.normal.user=this.raw.user=t}get host(){return this.normal.host}set host(t){this.raw.host=t,this.normal.host=t.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(t){this.normal.port=this.raw.port=t}setHeader(t,r){this.headers[this.headerize(t)]=r instanceof Array?r:[r]}getHeader(t){if(t)return this.headers[this.headerize(t)]}hasHeader(t){return!!t&&!!this.headers.hasOwnProperty(this.headerize(t))}deleteHeader(t){if(t=this.headerize(t),this.headers.hasOwnProperty(t)){const r=this.headers[t];return delete this.headers[t],r}}clearHeaders(){this.headers={}}clone(){return new eg(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}toRaw(){return this._toString(this._raw)}toString(){return this._toString(this._normal)}get _normal(){return this.normal}get _raw(){return this.raw}_toString(t){let r=t.scheme+":";t.scheme.toLowerCase().match("^sips?$")||(r+="//"),t.user&&(r+=this.escapeUser(t.user)+"@"),r+=t.host,(t.port||t.port===0)&&(r+=":"+t.port);for(const s in this.parameters)this.parameters.hasOwnProperty(s)&&(r+=";"+s,this.parameters[s]!==null&&(r+="="+this.parameters[s]));const n=[];for(const s in this.headers)if(this.headers.hasOwnProperty(s))for(const i in this.headers[s])this.headers[s].hasOwnProperty(i)&&n.push(s+"="+this.headers[s][i]);return n.length>0&&(r+="?"+n.join("&")),r}escapeUser(t){let r;try{r=decodeURIComponent(t)}catch(n){throw n}return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}headerize(t){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},n=t.toLowerCase().replace(/_/g,"-").split("-"),s=n.length;let i="";for(let o=0;o<s;o++)o!==0&&(i+="-"),i+=n[o].charAt(0).toUpperCase()+n[o].substring(1);return r[i]&&(i=r[i]),i}};function Cf(e,t){if(e.scheme!==t.scheme||e.user!==t.user||e.host!==t.host||e.port!==t.port)return!1;function r(i,o){const a=Object.keys(i.parameters),l=Object.keys(o.parameters);return!(!a.filter(u=>l.includes(u)).every(u=>i.parameters[u]===o.parameters[u])||!["user","ttl","method","transport"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u))||!["maddr"].every(u=>i.hasParam(u)&&o.hasParam(u)||!i.hasParam(u)&&!o.hasParam(u)))}if(!r(e,t))return!1;const n=Object.keys(e.headers),s=Object.keys(t.headers);if(n.length!==0||s.length!==0){if(n.length!==s.length)return!1;const i=n.filter(o=>s.includes(o));if(i.length!==s.length||!i.every(o=>e.headers[o].length&&t.headers[o].length&&e.headers[o][0]===t.headers[o][0]))return!1}return!0}function gl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var xf=class ta extends Error{constructor(t,r,n,s){super(),this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,ta.prototype):this.__proto__=ta.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ta)}static buildMessage(t,r){function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function s(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function i(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,c=>"\\x0"+n(c)).replace(/[\x10-\x1F\x7F-\x9F]/g,c=>"\\x"+n(c))}function o(u){switch(u.type){case"literal":return'"'+s(u.text)+'"';case"class":const c=u.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(u.inverted?"^":"")+c+"]";case"any":return"any character";case"end":return"end of input";case"other":return u.description}}function a(u){const c=u.map(o);let d,p;if(c.sort(),c.length>0){for(d=1,p=1;d<c.length;d++)c[d-1]!==c[d]&&(c[p]=c[d],p++);c.length=p}switch(c.length){case 1:return c[0];case 2:return c[0]+" or "+c[1];default:return c.slice(0,-1).join(", ")+", or "+c[c.length-1]}}function l(u){return u?'"'+s(u)+'"':"end of input"}return"Expected "+a(t)+" but "+l(r)+" found."}format(t){let r="Error: "+this.message;if(this.location){let n=null,s;for(s=0;s<t.length;s++)if(t[s].source===this.location.source){n=t[s].text.split(/\r\n|\n|\r/g);break}let i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){let a=this.location.end,l=gl("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
6
6
  --> `+o+`
7
7
  `+l+` |
8
8
  `+i.line+" | "+u+`
9
9
  `+l+" | "+gl("",i.column-1," ")+gl("",c-i.column,"^")}else r+=`
10
10
  at `+o}return r}};function E0(e,t){t=t!==void 0?t:{};const r={},n=t.grammarSource,s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231};let i=119;const o=[`\r
11
11
  `,v(`\r
12
- `,!1),/^[0-9]/,C([["0","9"]],!1,!1),/^[a-zA-Z]/,C([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,C([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,C([["\0","ÿ"]],!1,!1),/^["]/,C(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,C([["a","z"],["A","Z"],["0","9"]],!1,!1),";",v(";",!1),"/",v("/",!1),"?",v("?",!1),":",v(":",!1),"@",v("@",!1),"&",v("&",!1),"=",v("=",!1),"+",v("+",!1),"$",v("$",!1),",",v(",",!1),"-",v("-",!1),"_",v("_",!1),".",v(".",!1),"!",v("!",!1),"~",v("~",!1),"*",v("*",!1),"'",v("'",!1),"(",v("(",!1),")",v(")",!1),"%",v("%",!1),function(){return" "},function(){return":"},/^[!-~]/,C([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,C([["€","￿"]],!1,!1),/^[\x80-\xBF]/,C([["€","¿"]],!1,!1),/^[a-f]/,C([["a","f"]],!1,!1),"`",v("`",!1),"<",v("<",!1),">",v(">",!1),"\\",v("\\",!1),"[",v("[",!1),"]",v("]",!1),"{",v("{",!1),"}",v("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,C([["!","'"]],!1,!1),/^[*-[]/,C([["*","["]],!1,!1),/^[\]-~]/,C([["]","~"]],!1,!1),function(S){return S},/^[#-[]/,C([["#","["]],!1,!1),/^[\0-\t]/,C([["\0"," "]],!1,!1),/^[\v-\f]/,C([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,C([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",v("sips",!0),"sip",v("sip",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(){t=t||{data:{}},t.data.user=decodeURIComponent(w().slice(0,-1))},function(){t=t||{data:{}},t.data.password=w()},function(){return t=t||{data:{}},t.data.host=w(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",w()},/^[a-zA-Z0-9_\-]/,C([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,C([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",v("25",!1),/^[0-5]/,C([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,C([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,C([["1","9"]],!1,!1),function(S){return t=t||{data:{}},S=parseInt(S.join("")),t.data.port=S,S},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=S.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=S.toLowerCase()},"method=",v("method=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=S},"ttl=",v("ttl=",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=S},"maddr=",v("maddr=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=S},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(S,E){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),E===null?E=void 0:E=E[1],t.data.uri_params[S.toLowerCase()]=E},function(S,E){S=S.join("").toLowerCase(),E=E.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[S]?t.data.uri_headers[S].push(E):t.data.uri_headers[S]=[E]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",v("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",v("INVITE",!1),"ACK",v("ACK",!1),"VXACH",v("VXACH",!1),"OPTIONS",v("OPTIONS",!1),"BYE",v("BYE",!1),"CANCEL",v("CANCEL",!1),"REGISTER",v("REGISTER",!1),"SUBSCRIBE",v("SUBSCRIBE",!1),"NOTIFY",v("NOTIFY",!1),"REFER",v("REFER",!1),"PUBLISH",v("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(S){t=t||{data:{}},t.data.status_code=parseInt(S.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var S,E;for(t=t||{data:{}},E=t.data.multi_header.length,S=0;S<E;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new ir(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:S})},function(S){S=w().trim(),S[0]==='"'&&(S=S.substring(1,S.length-1)),t=t||{data:{}},t.data.displayName=S},"q",v("q",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=S},"expires",v("expires",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=S},function(S){return parseInt(S.join(""))},"0",v("0",!1),function(){return parseFloat(w())},function(S,E){t=t||{data:{}},t.data.params||(t.data.params={}),E===null?E=void 0:E=E[1],t.data.params[S.toLowerCase()]=E},"render",v("render",!0),"session",v("session",!0),"icon",v("icon",!0),"alert",v("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(){t=t||{data:{}},t.data=w()},"text",v("text",!0),"image",v("image",!0),"audio",v("audio",!0),"video",v("video",!0),"application",v("application",!0),"message",v("message",!0),"multipart",v("multipart",!0),"x-",v("x-",!0),function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(S){t=t||{data:{}},t.data.event=S.toLowerCase()},function(){t=t||{data:{}};var S=t.data.tag;t.data=new ir(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"tag",v("tag",!0),function(S){t=t||{data:{}},t.data.tag=S},function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(){t=t||{data:{}},t.data=new ir(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(S){t=t||{data:{}},t.data.realm=S},"domain",v("domain",!0),"nonce",v("nonce",!0),function(S){t=t||{data:{}},t.data.nonce=S},"opaque",v("opaque",!0),function(S){t=t||{data:{}},t.data.opaque=S},"stale",v("stale",!0),"true",v("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",v("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",v("algorithm",!0),"md5",v("MD5",!0),"md5-sess",v("MD5-sess",!0),function(S){t=t||{data:{}},t.data.algorithm=S.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(S){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(S.toLowerCase())},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(){var S,E;for(t=t||{data:{}},E=t.data.multi_header.length,S=0;S<E;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new ir(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:S})},function(){t=t||{data:{}},t.data=new ir(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",v("from-tag",!0),function(S){t=t||{data:{}},t.data.replaces_from_tag=S},"to-tag",v("to-tag",!0),function(S){t=t||{data:{}},t.data.replaces_to_tag=S},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(S,E){return E},function(S,E){return N(S,E)},function(S){t=t||{data:{}},t.startRule==="Require"&&(t.data=S||[])},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",v("reason",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.reason=S)},function(S){t=t||{data:{}},typeof S<"u"&&(t.data.expires=S)},"retry_after",v("retry_after",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.retry_after=S)},"deactivated",v("deactivated",!0),"probation",v("probation",!0),"rejected",v("rejected",!0),"timeout",v("timeout",!0),"giveup",v("giveup",!0),"noresource",v("noresource",!0),"invariant",v("invariant",!0),function(S){t=t||{data:{}},t.startRule==="Supported"&&(t.data=S||[])},function(){t=t||{data:{}};var S=t.data.tag;t.data=new ir(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"ttl",v("ttl",!0),function(S){t=t||{data:{}},t.data.ttl=S},"maddr",v("maddr",!0),function(S){t=t||{data:{}},t.data.maddr=S},"received",v("received",!0),function(S){t=t||{data:{}},t.data.received=S},"branch",v("branch",!0),function(S){t=t||{data:{}},t.data.branch=S},"rport",v("rport",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.rport=S.join(""))},function(S){t=t||{data:{}},t.data.protocol=S},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data.host=w()},function(S){t=t||{data:{}},t.data.port=parseInt(S.join(""))},function(S){return parseInt(S.join(""))},function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=S)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=S)},function(S){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=S)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(S){t=t||{data:{}},t.data.host=S},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data=w()},"Referred-By",v("Referred-By",!1),"b",v("b",!1),"cid",v("cid",!1)],a=[g('2 ""6 7!'),g('4"""5!7#'),g('4$""5!7%'),g(`4&""5!7'`),g(";'.# &;("),g('4(""5!7)'),g('4*""5!7+'),g('2,""6,7-'),g('2.""6.7/'),g('40""5!71'),g('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(";).# &;,"),g('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),g(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),g(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),g(';.." &"'),g(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),g(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g('4\\""5!7].# &;3'),g('4^""5!7_'),g('4`""5!7a'),g(';!.) &4b""5!7c'),g('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),g('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),g(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),g(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),g(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),g(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),g(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),g(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),g(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),g(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),g(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),g(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),g(`%;//0#;&/'$8":~" )("'#&'#`),g(`%;&/0#;//'$8":~" )("'#&'#`),g(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),g('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),g(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),g(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),g(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),g(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),g(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),g(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),g(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),g(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),g("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),g('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),g('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),g(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:—! )"),g(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),g('$4™""5!7š/,#0)*4™""5!7š&&&#'),g(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),g(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),g(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),g(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),g(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),g(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),g(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),g(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),g(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),g(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),g(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),g(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),g(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),g(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),g(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),g('%$;j/&#0#*;j&&&#/"!&,)'),g('%$;j/&#0#*;j&&&#/"!&,)'),g(";k.) &;+.# &;-"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),g(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),g(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),g("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),g("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),g(";‘.# &;r"),g(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),g(";M.# &;t"),g(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),g(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),g(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),g(`%24""6475/,#;{/#$+")("'#&'#`),g(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),g(";*.) &;+.# &;-"),g(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),g(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),g("$;~0#*;~&"),g(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),g(";.# &;‚"),g(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),g('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),g("$;y0#*;y&"),g(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),g('2Õ""6Õ7Ö'),g('2×""6×7Ø'),g('2Ù""6Ù7Ú'),g('2Û""6Û7Ü'),g('2Ý""6Ý7Þ'),g('2ß""6ß7à'),g('2á""6á7â'),g('2ã""6ã7ä'),g('2å""6å7æ'),g('2ç""6ç7è'),g('2é""6é7ê'),g("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),g(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),g("%;“/' 8!:ì!! )"),g(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),g("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),g(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),g(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),g(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),g(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),g(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),g(";œ.) &;.# &; "),g(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),g(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),g(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),g(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),g(";6.) &;T.# &;H"),g(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),g(";¥.# &; "),g(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),g("%;©/& 8!:č! )"),g(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";«.# &;¬"),g('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),g(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),g(";6.# &;®"),g(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),g(";­.# &;6"),g(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),g(";6.# &;H"),g(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),g("%;ž/' 8!:ğ!! )"),g(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),g(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),g(";¹.# &; "),g(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),g("%;ž/' 8!:Ħ!! )"),g(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),g(";¾"),g(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),g(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),g(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),g(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),g("%;I/' 8!:Ĭ!! )"),g(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),g(";t.# &;w"),g(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),g("%;I/' 8!:ı!! )"),g(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),g(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),g(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),g(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),g(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),g(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),g(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),g(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),g("%;–/& 8!:Ő! )"),g(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),g(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),g(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),g(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),g(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),g(';1." &"'),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),g(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),g(";¹.# &; "),g(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),g(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),g(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),g(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),g(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),g(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),g(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),g(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),g(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),g(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),g(";¾"),g(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),g(";ô.# &; "),g(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),g(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),g(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),g("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),g("$;%0#*;%&"),g(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),g(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),g(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),g(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),g('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),g(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),g(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),g(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),g(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),g(`%;ă/,#;ă/#$+")("'#&'#`),g(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),g(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),g(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";™.# &;L"),g(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),g(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,u=0;const c=[{line:1,column:1}];let d=0,p=[],h=0,m;if(t.startRule!==void 0){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=s[t.startRule]}function w(){return e.substring(u,l)}function x(){return _(u,l)}function v(S,E){return{type:"literal",text:S,ignoreCase:E}}function C(S,E,A){return{type:"class",parts:S,inverted:E,ignoreCase:A}}function y(){return{type:"end"}}function b(S){let E=c[S],A;if(E)return E;for(A=S-1;!c[A];)A--;for(E=c[A],E={line:E.line,column:E.column};A<S;)e.charCodeAt(A)===10?(E.line++,E.column=1):E.column++,A++;return c[S]=E,E}function _(S,E){const A=b(S),Z=b(E);return{source:n,start:{offset:S,line:A.line,column:A.column},end:{offset:E,line:Z.line,column:Z.column}}}function T(S){l<d||(l>d&&(d=l,p=[]),p.push(S))}function P(S,E,A){return new xf(xf.buildMessage(S,E),S,E,A)}function g(S){return S.split("").map(E=>E.charCodeAt(0)-32)}function M(S){const E=a[S];let A=0;const Z=[];let ee=E.length;const z=[],Q=[];let Y;for(;;){for(;A<ee;)switch(E[A]){case 0:Q.push(o[E[A+1]]),A+=2;break;case 1:Q.push(void 0),A++;break;case 2:Q.push(null),A++;break;case 3:Q.push(r),A++;break;case 4:Q.push([]),A++;break;case 5:Q.push(l),A++;break;case 6:Q.pop(),A++;break;case 7:l=Q.pop(),A++;break;case 8:Q.length-=E[A+1],A+=2;break;case 9:Q.splice(-2,1),A++;break;case 10:Q[Q.length-2].push(Q.pop()),A++;break;case 11:Q.push(Q.splice(Q.length-E[A+1],E[A+1])),A+=2;break;case 12:Q.push(e.substring(Q.pop(),l)),A++;break;case 13:z.push(ee),Z.push(A+3+E[A+1]+E[A+2]),Q[Q.length-1]?(ee=A+3+E[A+1],A+=3):(ee=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 14:z.push(ee),Z.push(A+3+E[A+1]+E[A+2]),Q[Q.length-1]===r?(ee=A+3+E[A+1],A+=3):(ee=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 15:z.push(ee),Z.push(A+3+E[A+1]+E[A+2]),Q[Q.length-1]!==r?(ee=A+3+E[A+1],A+=3):(ee=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 16:Q[Q.length-1]!==r?(z.push(ee),Z.push(A),ee=A+2+E[A+1],A+=2):A+=2+E[A+1];break;case 17:z.push(ee),Z.push(A+3+E[A+1]+E[A+2]),e.length>l?(ee=A+3+E[A+1],A+=3):(ee=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 18:z.push(ee),Z.push(A+4+E[A+2]+E[A+3]),e.substr(l,o[E[A+1]].length)===o[E[A+1]]?(ee=A+4+E[A+2],A+=4):(ee=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 19:z.push(ee),Z.push(A+4+E[A+2]+E[A+3]),e.substr(l,o[E[A+1]].length).toLowerCase()===o[E[A+1]]?(ee=A+4+E[A+2],A+=4):(ee=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 20:z.push(ee),Z.push(A+4+E[A+2]+E[A+3]),o[E[A+1]].test(e.charAt(l))?(ee=A+4+E[A+2],A+=4):(ee=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 21:Q.push(e.substr(l,E[A+1])),l+=E[A+1],A+=2;break;case 22:Q.push(o[E[A+1]]),l+=o[E[A+1]].length,A+=2;break;case 23:Q.push(r),h===0&&T(o[E[A+1]]),A+=2;break;case 24:u=Q[Q.length-1-E[A+1]],A+=2;break;case 25:u=l,A++;break;case 26:Y=E.slice(A+4,A+4+E[A+3]).map(function(le){return Q[Q.length-1-le]}),Q.splice(Q.length-E[A+2],E[A+2],o[E[A+1]].apply(null,Y)),A+=4+E[A+3];break;case 27:Q.push(M(E[A+1])),A+=2;break;case 28:h++,A++;break;case 29:h--,A++;break;default:throw new Error("Invalid opcode: "+E[A]+".")}if(z.length>0)ee=z.pop(),A=Z.pop();else break}return Q[0]}t.data={};function N(S,E){return[S].concat(E)}if(m=M(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&T(y()),P(p,d<e.length?e.charAt(d):null,d<e.length?_(d,d+1):_(d,d))}const A0=E0;var ft;(function(e){function t(s,i){const o={startRule:i};try{A0(s,o)}catch{o.data=-1}return o.data}e.parse=t;function r(s){const i=e.parse(s,"Name_Addr_Header");return i!==-1?i:void 0}e.nameAddrHeaderParse=r;function n(s){const i=e.parse(s,"SIP_URI");return i!==-1?i:void 0}e.URIParse=n})(ft=ft||(ft={}));var I0={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function jn(e,t=32){let r="";for(let n=0;n<e;n++){const s=Math.floor(Math.random()*t);r+=s.toString(t)}return r}function wo(e){return I0[e]||""}function yo(){return jn(10)}function Er(e){const t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length;let s="";for(let i=0;i<n;i++)i!==0&&(s+="-"),s+=r[i].charAt(0).toUpperCase()+r[i].substring(1);return t[s]&&(s=t[s]),s}function di(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var Tf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Er(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Er(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Er(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Er(e)]}parseHeader(e,t=0){if(e=Er(e),this.headers[e]){if(t>=this.headers[e].length)return}else return;const r=this.headers[e][t],n=r.raw;if(r.parsed)return r.parsed;const s=ft.parse(n,e.replace(/-/g,"_"));if(s===-1){this.headers[e].splice(t,1);return}else return r.parsed=s,s}s(e,t=0){return this.parseHeader(e,t)}setHeader(e,t){this.headers[Er(e)]=[{raw:t}]}toString(){return this.data}},ws=class extends Tf{constructor(){super()}},pn=class extends Tf{constructor(){super()}},vl=class ra{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ra.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:yo(),this.from=ra.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ra.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+jn(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}static getDefaultOptions(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}static makeNameAddrHeader(t,r,n){const s={};return n&&(s.tag=n),new ir(t,r,s)}getHeader(t){const r=this.headers[Er(t)];if(r){if(r[0])return r[0]}else{const n=new RegExp("^\\s*"+t+"\\s*:","i");for(const s of this.extraHeaders)if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}getHeaders(t){const r=[],n=this.headers[Er(t)];if(n)for(const s of n)r.push(s);else{const s=new RegExp("^\\s*"+t+"\\s*:","i");for(const i of this.extraHeaders)s.test(i)&&r.push(i.substring(i.indexOf(":")+1).trim())}return r}hasHeader(t){if(this.headers[Er(t)])return!0;{const r=new RegExp("^\\s*"+t+"\\s*:","i");for(const n of this.extraHeaders)if(r.test(n))return!0}return!1}setHeader(t,r){this.headers[Er(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
12
+ `,!1),/^[0-9]/,C([["0","9"]],!1,!1),/^[a-zA-Z]/,C([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,C([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,C([["\0","ÿ"]],!1,!1),/^["]/,C(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,C([["a","z"],["A","Z"],["0","9"]],!1,!1),";",v(";",!1),"/",v("/",!1),"?",v("?",!1),":",v(":",!1),"@",v("@",!1),"&",v("&",!1),"=",v("=",!1),"+",v("+",!1),"$",v("$",!1),",",v(",",!1),"-",v("-",!1),"_",v("_",!1),".",v(".",!1),"!",v("!",!1),"~",v("~",!1),"*",v("*",!1),"'",v("'",!1),"(",v("(",!1),")",v(")",!1),"%",v("%",!1),function(){return" "},function(){return":"},/^[!-~]/,C([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,C([["€","￿"]],!1,!1),/^[\x80-\xBF]/,C([["€","¿"]],!1,!1),/^[a-f]/,C([["a","f"]],!1,!1),"`",v("`",!1),"<",v("<",!1),">",v(">",!1),"\\",v("\\",!1),"[",v("[",!1),"]",v("]",!1),"{",v("{",!1),"}",v("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,C([["!","'"]],!1,!1),/^[*-[]/,C([["*","["]],!1,!1),/^[\]-~]/,C([["]","~"]],!1,!1),function(S){return S},/^[#-[]/,C([["#","["]],!1,!1),/^[\0-\t]/,C([["\0"," "]],!1,!1),/^[\v-\f]/,C([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,C([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",v("sips",!0),"sip",v("sip",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(){t=t||{data:{}},t.data.user=decodeURIComponent(w().slice(0,-1))},function(){t=t||{data:{}},t.data.password=w()},function(){return t=t||{data:{}},t.data.host=w(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",w()},/^[a-zA-Z0-9_\-]/,C([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,C([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",v("25",!1),/^[0-5]/,C([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,C([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,C([["1","9"]],!1,!1),function(S){return t=t||{data:{}},S=parseInt(S.join("")),t.data.port=S,S},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=S.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=S.toLowerCase()},"method=",v("method=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=S},"ttl=",v("ttl=",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=S},"maddr=",v("maddr=",!0),function(S){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=S},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(S,E){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),E===null?E=void 0:E=E[1],t.data.uri_params[S.toLowerCase()]=E},function(S,E){S=S.join("").toLowerCase(),E=E.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[S]?t.data.uri_headers[S].push(E):t.data.uri_headers[S]=[E]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new fn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",v("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",v("INVITE",!1),"ACK",v("ACK",!1),"VXACH",v("VXACH",!1),"OPTIONS",v("OPTIONS",!1),"BYE",v("BYE",!1),"CANCEL",v("CANCEL",!1),"REGISTER",v("REGISTER",!1),"SUBSCRIBE",v("SUBSCRIBE",!1),"NOTIFY",v("NOTIFY",!1),"REFER",v("REFER",!1),"PUBLISH",v("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(S){t=t||{data:{}},t.data.status_code=parseInt(S.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var S,E;for(t=t||{data:{}},E=t.data.multi_header.length,S=0;S<E;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new ar(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:S})},function(S){S=w().trim(),S[0]==='"'&&(S=S.substring(1,S.length-1)),t=t||{data:{}},t.data.displayName=S},"q",v("q",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=S},"expires",v("expires",!0),function(S){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=S},function(S){return parseInt(S.join(""))},"0",v("0",!1),function(){return parseFloat(w())},function(S,E){t=t||{data:{}},t.data.params||(t.data.params={}),E===null?E=void 0:E=E[1],t.data.params[S.toLowerCase()]=E},"render",v("render",!0),"session",v("session",!0),"icon",v("icon",!0),"alert",v("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(){t=t||{data:{}},t.data=w()},"text",v("text",!0),"image",v("image",!0),"audio",v("audio",!0),"video",v("video",!0),"application",v("application",!0),"message",v("message",!0),"multipart",v("multipart",!0),"x-",v("x-",!0),function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(S){t=t||{data:{}},t.data.event=S.toLowerCase()},function(){t=t||{data:{}};var S=t.data.tag;t.data=new ar(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"tag",v("tag",!0),function(S){t=t||{data:{}},t.data.tag=S},function(S){t=t||{data:{}},t.data=parseInt(S.join(""))},function(S){t=t||{data:{}},t.data=S},function(){t=t||{data:{}},t.data=new ar(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(S){t=t||{data:{}},t.data.realm=S},"domain",v("domain",!0),"nonce",v("nonce",!0),function(S){t=t||{data:{}},t.data.nonce=S},"opaque",v("opaque",!0),function(S){t=t||{data:{}},t.data.opaque=S},"stale",v("stale",!0),"true",v("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",v("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",v("algorithm",!0),"md5",v("MD5",!0),"md5-sess",v("MD5-sess",!0),function(S){t=t||{data:{}},t.data.algorithm=S.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(S){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(S.toLowerCase())},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},function(){var S,E;for(t=t||{data:{}},E=t.data.multi_header.length,S=0;S<E;S++)if(t.data.multi_header[S].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var S;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{S=new ar(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{S=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:S})},function(){t=t||{data:{}},t.data=new ar(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",v("from-tag",!0),function(S){t=t||{data:{}},t.data.replaces_from_tag=S},"to-tag",v("to-tag",!0),function(S){t=t||{data:{}},t.data.replaces_to_tag=S},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(S,E){return E},function(S,E){return M(S,E)},function(S){t=t||{data:{}},t.startRule==="Require"&&(t.data=S||[])},function(S){t=t||{data:{}},t.data.value=parseInt(S.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",v("reason",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.reason=S)},function(S){t=t||{data:{}},typeof S<"u"&&(t.data.expires=S)},"retry_after",v("retry_after",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.retry_after=S)},"deactivated",v("deactivated",!0),"probation",v("probation",!0),"rejected",v("rejected",!0),"timeout",v("timeout",!0),"giveup",v("giveup",!0),"noresource",v("noresource",!0),"invariant",v("invariant",!0),function(S){t=t||{data:{}},t.startRule==="Supported"&&(t.data=S||[])},function(){t=t||{data:{}};var S=t.data.tag;t.data=new ar(t.data.uri,t.data.displayName,t.data.params),S&&t.data.setParam("tag",S)},"ttl",v("ttl",!0),function(S){t=t||{data:{}},t.data.ttl=S},"maddr",v("maddr",!0),function(S){t=t||{data:{}},t.data.maddr=S},"received",v("received",!0),function(S){t=t||{data:{}},t.data.received=S},"branch",v("branch",!0),function(S){t=t||{data:{}},t.data.branch=S},"rport",v("rport",!0),function(S){t=t||{data:{}},typeof S<"u"&&(t.data.rport=S.join(""))},function(S){t=t||{data:{}},t.data.protocol=S},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data.host=w()},function(S){t=t||{data:{}},t.data.port=parseInt(S.join(""))},function(S){return parseInt(S.join(""))},function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=S)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(S){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=S)},function(S){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=S)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(S){t=t||{data:{}},t.data.scheme=S},function(S){t=t||{data:{}},t.data.host=S},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(S){t=t||{data:{}},t.data.transport=S},function(){t=t||{data:{}},t.data=w()},"Referred-By",v("Referred-By",!1),"b",v("b",!1),"cid",v("cid",!1)],a=[g('2 ""6 7!'),g('4"""5!7#'),g('4$""5!7%'),g(`4&""5!7'`),g(";'.# &;("),g('4(""5!7)'),g('4*""5!7+'),g('2,""6,7-'),g('2.""6.7/'),g('40""5!71'),g('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(";).# &;,"),g('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),g(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),g(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),g(';.." &"'),g(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),g(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g('4\\""5!7].# &;3'),g('4^""5!7_'),g('4`""5!7a'),g(';!.) &4b""5!7c'),g('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),g(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),g('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),g(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),g(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),g(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),g(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),g(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),g(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),g(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),g(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),g(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),g(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),g(`%;//0#;&/'$8":~" )("'#&'#`),g(`%;&/0#;//'$8":~" )("'#&'#`),g(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),g('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),g(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),g(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),g(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),g(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),g(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),g(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),g(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),g(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),g("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),g('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),g('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),g(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:—! )"),g(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),g('$4™""5!7š/,#0)*4™""5!7š&&&#'),g(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),g(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),g(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),g(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),g(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),g(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),g(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),g(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),g(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),g(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),g(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),g(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),g(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),g(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),g(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),g('%$;j/&#0#*;j&&&#/"!&,)'),g('%$;j/&#0#*;j&&&#/"!&,)'),g(";k.) &;+.# &;-"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),g(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),g(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),g("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),g("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),g('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),g(";‘.# &;r"),g(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),g(";M.# &;t"),g(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),g(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),g(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),g(`%24""6475/,#;{/#$+")("'#&'#`),g(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),g(";*.) &;+.# &;-"),g(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),g(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),g("$;~0#*;~&"),g(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),g(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),g(";.# &;‚"),g(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),g('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),g("$;y0#*;y&"),g(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),g('2Õ""6Õ7Ö'),g('2×""6×7Ø'),g('2Ù""6Ù7Ú'),g('2Û""6Û7Ü'),g('2Ý""6Ý7Þ'),g('2ß""6ß7à'),g('2á""6á7â'),g('2ã""6ã7ä'),g('2å""6å7æ'),g('2ç""6ç7è'),g('2é""6é7ê'),g("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),g(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),g("%;“/' 8!:ì!! )"),g(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),g("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),g(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),g(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),g(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),g(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),g(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),g(";œ.) &;.# &; "),g(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),g(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),g(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),g(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),g(";6.) &;T.# &;H"),g(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),g(";¥.# &; "),g(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),g("%;©/& 8!:č! )"),g(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";«.# &;¬"),g('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),g(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),g(";6.# &;®"),g(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),g(";­.# &;6"),g(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),g(";6.# &;H"),g(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),g("%;ž/' 8!:ğ!! )"),g(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),g(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),g(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),g(";¹.# &; "),g(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),g("%;ž/' 8!:Ħ!! )"),g(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),g(";¾"),g(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),g(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),g(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),g(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),g("%;I/' 8!:Ĭ!! )"),g(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),g(";t.# &;w"),g(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),g("%;I/' 8!:ı!! )"),g(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),g(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),g(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),g(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),g(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),g(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),g(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),g(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),g(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),g("%;–/& 8!:Ő! )"),g(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),g(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),g("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),g(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),g(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),g(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),g(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),g(';1." &"'),g(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),g(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),g(";¹.# &; "),g(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),g(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),g(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),g(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),g(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),g(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),g(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),g(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),g(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),g(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),g(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),g(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),g(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),g(";¾"),g(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),g(";ô.# &; "),g(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),g(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),g(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),g("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),g("$;%0#*;%&"),g(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),g(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),g(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),g("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),g(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),g('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),g(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),g(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),g(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),g(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),g(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),g(`%;ă/,#;ă/#$+")("'#&'#`),g(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),g(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),g(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),g(";™.# &;L"),g(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),g(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,u=0;const c=[{line:1,column:1}];let d=0,p=[],h=0,m;if(t.startRule!==void 0){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=s[t.startRule]}function w(){return e.substring(u,l)}function x(){return _(u,l)}function v(S,E){return{type:"literal",text:S,ignoreCase:E}}function C(S,E,A){return{type:"class",parts:S,inverted:E,ignoreCase:A}}function y(){return{type:"end"}}function b(S){let E=c[S],A;if(E)return E;for(A=S-1;!c[A];)A--;for(E=c[A],E={line:E.line,column:E.column};A<S;)e.charCodeAt(A)===10?(E.line++,E.column=1):E.column++,A++;return c[S]=E,E}function _(S,E){const A=b(S),Z=b(E);return{source:n,start:{offset:S,line:A.line,column:A.column},end:{offset:E,line:Z.line,column:Z.column}}}function T(S){l<d||(l>d&&(d=l,p=[]),p.push(S))}function P(S,E,A){return new xf(xf.buildMessage(S,E),S,E,A)}function g(S){return S.split("").map(E=>E.charCodeAt(0)-32)}function H(S){const E=a[S];let A=0;const Z=[];let Q=E.length;const K=[],X=[];let Y;for(;;){for(;A<Q;)switch(E[A]){case 0:X.push(o[E[A+1]]),A+=2;break;case 1:X.push(void 0),A++;break;case 2:X.push(null),A++;break;case 3:X.push(r),A++;break;case 4:X.push([]),A++;break;case 5:X.push(l),A++;break;case 6:X.pop(),A++;break;case 7:l=X.pop(),A++;break;case 8:X.length-=E[A+1],A+=2;break;case 9:X.splice(-2,1),A++;break;case 10:X[X.length-2].push(X.pop()),A++;break;case 11:X.push(X.splice(X.length-E[A+1],E[A+1])),A+=2;break;case 12:X.push(e.substring(X.pop(),l)),A++;break;case 13:K.push(Q),Z.push(A+3+E[A+1]+E[A+2]),X[X.length-1]?(Q=A+3+E[A+1],A+=3):(Q=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 14:K.push(Q),Z.push(A+3+E[A+1]+E[A+2]),X[X.length-1]===r?(Q=A+3+E[A+1],A+=3):(Q=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 15:K.push(Q),Z.push(A+3+E[A+1]+E[A+2]),X[X.length-1]!==r?(Q=A+3+E[A+1],A+=3):(Q=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 16:X[X.length-1]!==r?(K.push(Q),Z.push(A),Q=A+2+E[A+1],A+=2):A+=2+E[A+1];break;case 17:K.push(Q),Z.push(A+3+E[A+1]+E[A+2]),e.length>l?(Q=A+3+E[A+1],A+=3):(Q=A+3+E[A+1]+E[A+2],A+=3+E[A+1]);break;case 18:K.push(Q),Z.push(A+4+E[A+2]+E[A+3]),e.substr(l,o[E[A+1]].length)===o[E[A+1]]?(Q=A+4+E[A+2],A+=4):(Q=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 19:K.push(Q),Z.push(A+4+E[A+2]+E[A+3]),e.substr(l,o[E[A+1]].length).toLowerCase()===o[E[A+1]]?(Q=A+4+E[A+2],A+=4):(Q=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 20:K.push(Q),Z.push(A+4+E[A+2]+E[A+3]),o[E[A+1]].test(e.charAt(l))?(Q=A+4+E[A+2],A+=4):(Q=A+4+E[A+2]+E[A+3],A+=4+E[A+2]);break;case 21:X.push(e.substr(l,E[A+1])),l+=E[A+1],A+=2;break;case 22:X.push(o[E[A+1]]),l+=o[E[A+1]].length,A+=2;break;case 23:X.push(r),h===0&&T(o[E[A+1]]),A+=2;break;case 24:u=X[X.length-1-E[A+1]],A+=2;break;case 25:u=l,A++;break;case 26:Y=E.slice(A+4,A+4+E[A+3]).map(function(ae){return X[X.length-1-ae]}),X.splice(X.length-E[A+2],E[A+2],o[E[A+1]].apply(null,Y)),A+=4+E[A+3];break;case 27:X.push(H(E[A+1])),A+=2;break;case 28:h++,A++;break;case 29:h--,A++;break;default:throw new Error("Invalid opcode: "+E[A]+".")}if(K.length>0)Q=K.pop(),A=Z.pop();else break}return X[0]}t.data={};function M(S,E){return[S].concat(E)}if(m=H(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&T(y()),P(p,d<e.length?e.charAt(d):null,d<e.length?_(d,d+1):_(d,d))}const A0=E0;var pt;(function(e){function t(s,i){const o={startRule:i};try{A0(s,o)}catch{o.data=-1}return o.data}e.parse=t;function r(s){const i=e.parse(s,"Name_Addr_Header");return i!==-1?i:void 0}e.nameAddrHeaderParse=r;function n(s){const i=e.parse(s,"SIP_URI");return i!==-1?i:void 0}e.URIParse=n})(pt=pt||(pt={}));var I0={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function Un(e,t=32){let r="";for(let n=0;n<e;n++){const s=Math.floor(Math.random()*t);r+=s.toString(t)}return r}function wo(e){return I0[e]||""}function yo(){return Un(10)}function Ar(e){const t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length;let s="";for(let i=0;i<n;i++)i!==0&&(s+="-"),s+=r[i].charAt(0).toUpperCase()+r[i].substring(1);return t[s]&&(s=t[s]),s}function di(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var Tf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Ar(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Ar(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Ar(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Ar(e)]}parseHeader(e,t=0){if(e=Ar(e),this.headers[e]){if(t>=this.headers[e].length)return}else return;const r=this.headers[e][t],n=r.raw;if(r.parsed)return r.parsed;const s=pt.parse(n,e.replace(/-/g,"_"));if(s===-1){this.headers[e].splice(t,1);return}else return r.parsed=s,s}s(e,t=0){return this.parseHeader(e,t)}setHeader(e,t){this.headers[Ar(e)]=[{raw:t}]}toString(){return this.data}},ys=class extends Tf{constructor(){super()}},pn=class extends Tf{constructor(){super()}},vl=class ra{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ra.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:yo(),this.from=ra.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ra.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Un(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}static getDefaultOptions(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}static makeNameAddrHeader(t,r,n){const s={};return n&&(s.tag=n),new ar(t,r,s)}getHeader(t){const r=this.headers[Ar(t)];if(r){if(r[0])return r[0]}else{const n=new RegExp("^\\s*"+t+"\\s*:","i");for(const s of this.extraHeaders)if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}getHeaders(t){const r=[],n=this.headers[Ar(t)];if(n)for(const s of n)r.push(s);else{const s=new RegExp("^\\s*"+t+"\\s*:","i");for(const i of this.extraHeaders)s.test(i)&&r.push(i.substring(i.indexOf(":")+1).trim())}return r}hasHeader(t){if(this.headers[Ar(t)])return!0;{const r=new RegExp("^\\s*"+t+"\\s*:","i");for(const n of this.extraHeaders)if(r.test(n))return!0}return!1}setHeader(t,r){this.headers[Ar(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
13
13
  `;for(const r in this.headers)if(this.headers[r])for(const n of this.headers[r])t+=r+": "+n+`\r
14
14
  `;for(const r of this.extraHeaders)t+=r.trim()+`\r
15
15
  `;return t+="Supported: "+this.options.optionTags.join(", ")+`\r
@@ -23,9 +23,9 @@
23
23
  \r
24
24
  `:t+=`Content-Length: 0\r
25
25
  \r
26
- `,t}};function Ef(e){return e==="application/sdp"?"session":"render"}function bo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:Ef(r),contentType:r,content:t}}function Af(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function fi(e){let t,r,n;if(e instanceof ws&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof pn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof vl&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(Af(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=Ef(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var or;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(or=or||(or={}));var he;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(he=he||(he={}));var Gr=500,R0=4e3,ml=5e3;const mt={T1:Gr,T2:R0,T4:ml,TIMER_B:64*Gr,TIMER_D:0*Gr,TIMER_F:64*Gr,TIMER_H:64*Gr,TIMER_I:0*ml,TIMER_J:0*Gr,TIMER_K:0*ml,TIMER_L:64*Gr,TIMER_M:64*Gr,TIMER_N:64*Gr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var hn=class extends Vn{constructor(e){super(e||"Transaction state error.")}},ve;(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(ve=ve||(ve={}));const gn=[ve.ACK,ve.BYE,ve.CANCEL,ve.INFO,ve.INVITE,ve.MESSAGE,ve.NOTIFY,ve.OPTIONS,ve.PRACK,ve.REFER,ve.REGISTER,ve.SUBSCRIBE];var If=class{constructor(e){this.incomingMessageRequest=e}get request(){return this.incomingMessageRequest.message}accept(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}reject(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}},wl=class{constructor(e){this.incomingNotifyRequest=e}get request(){return this.incomingNotifyRequest.message}accept(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}reject(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}},k0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof ir))throw new Error("Failed to parse Refer-To header.");return e}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const e=this.referTo.uri.getHeader("replaces");return e instanceof Array?e[0]:e}get request(){return this.incomingReferRequest.message}accept(e={statusCode:202}){return this.incomingReferRequest.accept(e),Promise.resolve()}reject(e){return this.incomingReferRequest.reject(e),Promise.resolve()}makeInviter(e){if(this.inviter)return this.inviter;const t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};const r=(e.extraHeaders||[]).slice(),n=this.replaces;n&&r.push("Replaces: "+decodeURIComponent(n));const s=this.referredBy;return s&&r.push("Referred-By: "+s),e.extraHeaders=r,this.inviter=this.session.userAgent._makeInviter(t,e),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}},U;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(U=U||(U={}));var yl=class tg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=U.Initial,this.delegate=r.delegate,this._stateEventEmitter=new ui,this._userAgent=t}dispose(){switch(this.logger.log(`Session ${this.id} in state ${this._state} is being disposed`),delete this.userAgent._sessions[this.id],this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.state){case U.Initial:break;case U.Establishing:break;case U.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case U.Terminating:break;case U.Terminated:break;default:throw new Error("Unknown state.")}return Promise.resolve()}get assertedIdentity(){return this._assertedIdentity}get dialog(){return this._dialog}get id(){return this._id}get replacee(){return this._replacee}get sessionDescriptionHandler(){return this._sessionDescriptionHandler}get sessionDescriptionHandlerFactory(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}get sessionDescriptionHandlerModifiers(){return this._sessionDescriptionHandlerModifiers||[]}set sessionDescriptionHandlerModifiers(t){this._sessionDescriptionHandlerModifiers=t.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(t){this._sessionDescriptionHandlerOptions=Object.assign({},t)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(t){this._sessionDescriptionHandlerModifiersReInvite=t.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(t){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},t)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(t={}){let r="Session.bye() may only be called if established session.";switch(this.state){case U.Initial:typeof this.cancel=="function"?(r+=" However Inviter.invite() has not yet been called.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called.",r+=" Perhaps you should have called Invitation.reject()?");break;case U.Establishing:typeof this.cancel=="function"?(r+=" However a dialog does not yet exist.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called (or not yet resolved).",r+=" Perhaps you should have called Invitation.reject()?");break;case U.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case U.Terminating:r+=" However this session is already terminating.",typeof this.cancel=="function"?r+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(r+=" Perhaps you have already called Session.bye()?");break;case U.Terminated:r+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(r),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(t={}){if(this.state!==U.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._info(r,n)}invite(t={}){if(this.logger.log("Session.invite"),this.state!==U.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new pl("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,t.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=t.sessionDescriptionHandlerModifiers),t.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=t.sessionDescriptionHandlerOptions);const r={onAccept:i=>{const o=fi(i.message);if(!o){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(i,400,"Missing session description"),this.stateTransition(U.Terminated),this.pendingReinvite=!1;return}if(t.withoutSdp){const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(o,a).then(l=>{i.ack({body:l})}).catch(l=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state===U.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(U.Terminated))}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}else{const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(o,a).then(()=>{i.ack()}).catch(l=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state!==U.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(U.Terminated)):i.ack()}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}},onProgress:i=>{},onRedirect:i=>{},onReject:i=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):this.rollbackOffer().catch(o=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(o.message),this.state!==U.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(U.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+gn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==U.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._message(r,n)}refer(t,r={}){if(this.state!==U.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof tg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case or.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case or.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case or.AckWait:return this.stateTransition(U.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(U.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(U.Terminated),s(i)}}});case or.Confirmed:{const s=n.bye(t,r);return this.stateTransition(U.Terminated),Promise.resolve(s)}case or.Terminated:throw new Error(`Invalid dialog state ${n.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(t,r){return this.dialog?Promise.resolve(this.dialog.info(t,r)):Promise.reject(new Error("Session dialog undefined."))}_message(t,r){return this.dialog?Promise.resolve(this.dialog.message(t,r)):Promise.reject(new Error("Session dialog undefined."))}_refer(t,r,n){return this.dialog?(this.onNotify=t,Promise.resolve(this.dialog.refer(r,n))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(t,r,n){t.ack();const s=[];r&&s.push("Reason: "+this.getReasonHeaderValue(r,n)),t.session.bye(void 0,{extraHeaders:s})}onAckRequest(t){if(this.logger.log("Session.onAckRequest"),this.state!==U.Established&&this.state!==U.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const r=this.dialog;if(!r)throw new Error("Dialog undefined.");const n={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const s=new S0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case he.Initial:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(U.Terminated),Promise.resolve()}case he.Stable:{const s=fi(t.message);return s?s.contentDisposition==="render"?(this._renderbody=s.content,this._rendertype=s.contentType,Promise.resolve()):s.contentDisposition!=="session"?Promise.resolve():this.setAnswer(s,n).catch(i=>{this.logger.error(i.message);const o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];r.bye(void 0,{extraHeaders:o}),this.stateTransition(U.Terminated)}):Promise.resolve()}case he.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(U.Terminated),Promise.resolve()}case he.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(U.Terminated),Promise.resolve()}case he.Closed:throw new Error(`Invalid signaling state ${r.signalingState}.`);default:throw new Error(`Invalid signaling state ${r.signalingState}.`)}}onByeRequest(t){if(this.logger.log("Session.onByeRequest"),this.state!==U.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new C0(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(U.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==U.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new T0(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==U.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const r=["Contact: "+this._contact];if(t.message.hasHeader("P-Asserted-Identity")){const s=t.message.getHeader("P-Asserted-Identity");if(!s)throw new Error("Header undefined.");this._assertedIdentity=ft.nameAddrHeaderParse(s)}const n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(n).then(s=>{const i=t.accept({statusCode:200,extraHeaders:r,body:s});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,200)}).catch(s=>{if(this.logger.error(s.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===he.Stable){const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488);return}this.rollbackOffer().then(()=>{const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488)}).catch(i=>{this.logger.error(i.message),this.logger.error("Failed to rollback offer on re-INVITE request");const o=t.reject({statusCode:488});if(this.state!==U.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(U.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==U.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new If(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==U.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new wl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new wl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==U.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(t){if(this.logger.log("Session.onReferRequest"),this.state!==U.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!t.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),t.reject();return}const r=new k0(t,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(r):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),r.accept().then(()=>r.makeInviter(this._referralInviterOptions).invite()).catch(n=>{this.logger.error(n.message)}))}generateResponseOfferAnswer(t,r){if(this.dialog)return this.generateResponseOfferAnswerInDialog(r);const n=fi(t.message);return!n||n.contentDisposition!=="session"?this.getOffer(r):this.setOfferAndGetAnswer(n,r)}generateResponseOfferAnswerInDialog(t){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case he.Initial:return this.getOffer(t);case he.HaveLocalOffer:return Promise.resolve(void 0);case he.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,t);case he.Stable:return this.state!==U.Established?Promise.resolve(void 0):this.getOffer(t);case he.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(t){const r=this.setupSessionDescriptionHandler(),n=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{return r.getDescription(n,s).then(i=>bo(i)).catch(i=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const o=i instanceof Error?i:new Error("Session.getOffer unknown error.");throw this.logger.error(o.message),o})}catch(i){this.logger.error("Session.getOffer: SDH getDescription threw...");const o=i instanceof Error?i:new Error(i);return this.logger.error(o.message),Promise.reject(o)}}rollbackOffer(){const t=this.setupSessionDescriptionHandler();if(t.rollbackDescription===void 0)return Promise.resolve();try{return t.rollbackDescription().catch(r=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const n=r instanceof Error?r:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(n.message),n})}catch(r){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const n=r instanceof Error?r:new Error(r);return this.logger.error(n.message),Promise.reject(n)}}setAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new fl)}catch(o){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).catch(o=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const a=o instanceof Error?o:new Error("Session.setAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setAnswer: SDH setDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setOfferAndGetAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new fl)}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).then(()=>n.getDescription(s,i)).then(o=>bo(o)).catch(o=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const a=o instanceof Error?o:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setSessionDescriptionHandler(t){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=t}setupSessionDescriptionHandler(){var t;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case U.Initial:t!==U.Establishing&&t!==U.Established&&t!==U.Terminating&&t!==U.Terminated&&r();break;case U.Establishing:t!==U.Established&&t!==U.Terminating&&t!==U.Terminated&&r();break;case U.Established:t!==U.Terminating&&t!==U.Terminated&&r();break;case U.Terminating:t!==U.Terminated&&r();break;case U.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===U.Terminated&&this.dispose()}copyRequestOptions(t={}){return{extraHeaders:t.extraHeaders?t.extraHeaders.slice():void 0,body:t.body?{contentDisposition:t.body.contentDisposition||"render",contentType:t.body.contentType||"text/plain",content:t.body.content||""}:void 0}}getReasonHeaderValue(t,r){const n=t;let s=wo(t);return!s&&r&&(s=r),"SIP;cause="+n+';text="'+s+'"'}referExtraHeaders(t){const r=[];return r.push("Referred-By: <"+this.userAgent.configuration.uri+">"),r.push("Contact: "+this._contact),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.push("Refer-To: "+t),r}referToString(t){let r;if(t instanceof fn)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},vr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(vr=vr||(vr={}));const $0={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var ys=class extends yl{constructor(e,t){super(e),this.incomingInviteRequest=t,this.disposed=!1,this.expiresTimer=void 0,this.isCanceled=!1,this.rel100="none",this.rseq=Math.floor(Math.random()*1e4),this.userNoAnswerTimer=void 0,this.waitingForPrack=!1,this.logger=e.getLogger("sip.Invitation");const r=this.incomingInviteRequest.message,n=r.getHeader("require");n&&n.toLowerCase().includes("100rel")&&(this.rel100="required");const s=r.getHeader("supported");if(s&&s.toLowerCase().includes("100rel")&&(this.rel100="supported"),r.toTag=t.toTag,typeof r.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{t.reject({statusCode:480}),this.stateTransition(U.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),r.hasHeader("expires")){const a=Number(r.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===U.Initial&&(t.reject({statusCode:487}),this.stateTransition(U.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=ft.nameAddrHeaderParse(i)),this._contact=this.userAgent.contact.toString();const o=r.parseHeader("Content-Disposition");o&&o.type==="render"&&(this._renderbody=r.body,this._rendertype=r.getHeader("Content-Type")),this._id=r.callId+r.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.expiresTimer&&(clearTimeout(this.expiresTimer),this.expiresTimer=void 0),this.userNoAnswerTimer&&(clearTimeout(this.userNoAnswerTimer),this.userNoAnswerTimer=void 0),this.prackNeverArrived(),this.state){case U.Initial:return this.reject().then(()=>super.dispose());case U.Establishing:return this.reject().then(()=>super.dispose());case U.Established:return super.dispose();case U.Terminating:return super.dispose();case U.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get autoSendAnInitialProvisionalResponse(){return this.rel100!=="required"&&this.userAgent.configuration.sendInitialProvisionalResponse}get body(){return this.incomingInviteRequest.message.body}get localIdentity(){return this.request.to}get remoteIdentity(){return this.request.from}get request(){return this.incomingInviteRequest.message}accept(e={}){if(this.logger.log("Invitation.accept"),this.state!==U.Initial){const t=new Error(`Invalid session state ${this.state}`);return this.logger.error(t.message),Promise.reject(t)}return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.stateTransition(U.Establishing),this.sendAccept(e).then(({message:t,session:r})=>{r.delegate={onAck:n=>this.onAckRequest(n),onAckTimeout:()=>this.onAckTimeout(),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,this.stateTransition(U.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==U.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===vr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==U.Initial&&this.state!==U.Establishing){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}const t=e.statusCode||480,r=e.reasonPhrase?e.reasonPhrase:wo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?bo(e.body):void 0;return t<400?this.incomingInviteRequest.redirect([],{statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}):this.incomingInviteRequest.reject({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}),this.stateTransition(U.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==U.Initial&&this.state!==U.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new x0(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(U.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=fi(e.message);if(!t||t.contentDisposition!=="session")return Promise.resolve(void 0);const r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case he.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case he.Stable:return this.setAnswer(t,r).then(()=>{});case he.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case he.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case he.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(e){let t=480;if(e instanceof Error?this.logger.error(e.message):this.logger.error(e),e instanceof fl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof _0?this.logger.error("A session description handler occurred while sending response"):e instanceof hl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof hn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===U.Initial||this.state===U.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(U.Terminated)}catch(r){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),r}if(this.isCanceled){this.logger.warn("An error occurred while attempting to formulate and send a response to an incoming INVITE. However a CANCEL was received and processed while doing so which can (and often does) result in errors occurring as the session terminates in the meantime. Said error is being ignored.");return}throw e}onAckTimeout(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(U.Terminated)}sendAccept(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,t)).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})))}sendProgress(e={}){const t=e.statusCode||180,r=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),s=e.body?bo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(v=>{try{c=u.accept({statusCode:200,body:v}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(C){a(C)}}).catch(v=>a(v)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(w),this.reject({statusCode:504}).then(()=>a(new hl)).catch(x=>a(x)))},mt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=mt.T1,w=setTimeout(h,m)}).catch(l=>{this.waitingForPrack=!1,a(l)})})}sendProgressTrying(){try{const e=this.incomingInviteRequest.trying();return Promise.resolve(e)}catch(e){return Promise.reject(e)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((e,t)=>{this.waitingForPrackResolve=e,this.waitingForPrackReject=t}),this.waitingForPrackPromise}prackArrived(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}prackNeverArrived(){this.waitingForPrackReject&&this.waitingForPrackReject(new hl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},_o=class extends yl{constructor(e,t,r={}){super(e,r),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=e.getLogger("sip.Inviter"),this.earlyMedia=r.earlyMedia!==void 0?r.earlyMedia:this.earlyMedia,this.fromTag=yo(),this.inviteWithoutSdp=r.inviteWithoutSdp!==void 0?r.inviteWithoutSdp:this.inviteWithoutSdp;const n=Object.assign({},r);n.params=Object.assign({},r.params);const s=r.anonymous||!1,i=e.contact.toString({anonymous:s,outbound:s?!e.contact.tempGruu:!e.contact.pubGruu});s&&e.configuration.uri&&(n.params.fromDisplayName="Anonymous",n.params.fromUri="sip:anonymous@anonymous.invalid");let o=e.userAgentCore.configuration.aor;if(n.params.fromUri&&(o=typeof n.params.fromUri=="string"?ft.URIParse(n.params.fromUri):n.params.fromUri),!o)throw new TypeError("Invalid from URI: "+n.params.fromUri);let a=t;if(n.params.toUri&&(a=typeof n.params.toUri=="string"?ft.URIParse(n.params.toUri):n.params.toUri),!a)throw new TypeError("Invalid to URI: "+n.params.toUri);const l=Object.assign({},n.params);l.fromTag=this.fromTag;const u=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(u.push("P-Preferred-Identity: "+e.configuration.uri.toString()),u.push("Privacy: id")),u.push("Contact: "+i),u.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===vr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===vr.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(ve.INVITE,t,o,a,l,u,void 0),this._contact=i,this._referralInviterOptions=n,this._renderbody=r.renderbody,this._rendertype=r.rendertype,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiersReInvite),r.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptionsReInvite),this._id=this.outgoingRequestMessage.callId+this.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.disposeEarlyMedia(),this.state){case U.Initial:return this.cancel().then(()=>super.dispose());case U.Establishing:return this.cancel().then(()=>super.dispose());case U.Established:return super.dispose();case U.Terminating:return super.dispose();case U.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get body(){return this.outgoingRequestMessage.body}get localIdentity(){return this.outgoingRequestMessage.from}get remoteIdentity(){return this.outgoingRequestMessage.to}get request(){return this.outgoingRequestMessage}cancel(e={}){if(this.logger.log("Inviter.cancel"),this.state!==U.Initial&&this.state!==U.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(U.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=wo(r)||n;return"SIP;cause="+s+';text="'+i+'"'}}if(this.outgoingInviteRequest){let r;e.statusCode&&e.reasonPhrase&&(r=t(e.statusCode,e.reasonPhrase)),this.outgoingInviteRequest.cancel(r,e)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(U.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==U.Initial)return super.invite(e);if(e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),e.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(U.Establishing),Promise.resolve(this.sendInvite(e));const t={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(t).then(r=>(this.outgoingRequestMessage.body={body:r.content,contentType:r.contentType},this.stateTransition(U.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==U.Terminated&&this.stateTransition(U.Terminated),r})}sendInvite(e={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:t=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(t);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(t),this.stateTransition(U.Terminated);return}this.notifyReferer(t),this.onAccept(t).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onAccept&&e.requestDelegate.onAccept(t)})},onProgress:t=>{this.isCanceled||(this.notifyReferer(t),this.onProgress(t).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onProgress&&e.requestDelegate.onProgress(t)}))},onRedirect:t=>{this.notifyReferer(t),this.onRedirect(t),e.requestDelegate&&e.requestDelegate.onRedirect&&e.requestDelegate.onRedirect(t)},onReject:t=>{this.notifyReferer(t),this.onReject(t),e.requestDelegate&&e.requestDelegate.onReject&&e.requestDelegate.onReject(t)},onTrying:t=>{this.notifyReferer(t),this.onTrying(t),e.requestDelegate&&e.requestDelegate.onTrying&&e.requestDelegate.onTrying(t)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(e=>{e.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(e){if(!this._referred)return;if(!(this._referred instanceof yl))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");const t=`SIP/2.0 ${e.message.statusCode} ${e.message.reasonPhrase}`.trim(),r=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:t}});r.delegate={onReject:()=>{this._referred=void 0}}}onAccept(e){if(this.logger.log("Inviter.onAccept"),this.state!==U.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const t=e.message,r=e.session;switch(t.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=ft.nameAddrHeaderParse(t.getHeader("P-Asserted-Identity"))),r.delegate={onAck:n=>this.onAckRequest(n),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,r.signalingState){case he.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(U.Terminated),Promise.reject(new Error("Bad Media Description"));case he.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(U.Terminated),Promise.reject(new Error("Bad Media Description"));case he.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const n={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,n).then(s=>{e.ack({body:s}),this.stateTransition(U.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(U.Terminated),s})}case he.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const i=this.earlyMediaSessionDescriptionHandlers.get(r.id);if(!i)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(i),this.earlyMediaSessionDescriptionHandlers.delete(r.id),e.ack(),this.stateTransition(U.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==r){this.earlyMedia&&this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behavior of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.");const i=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(U.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(U.Established),Promise.resolve()}const n=r.answer;if(!n)throw new Error("Answer is undefined.");const s={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(n,s).then(()=>{let i;this._renderbody&&this._rendertype&&(i={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),e.ack(i),this.stateTransition(U.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(U.Terminated),i})}case he.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(e){var t;if(this.logger.log("Inviter.onProgress"),this.state!==U.Establishing)return this.logger.error(`Progress received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");const r=e.message,n=e.session;r.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=ft.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));const s=r.getHeader("require"),i=r.getHeader("rseq"),o=!!(s&&s.includes("100rel")&&i&&Number(i)),a=[];switch(o&&a.push("RAck: "+r.getHeader("rseq")+" "+r.getHeader("cseq")),n.signalingState){case he.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:a})),Promise.resolve();case he.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case he.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const l=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(l,!0),this.earlyMediaSessionDescriptionHandlers.set(n.id,l),l.setDescription(r.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>l.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(u=>{const c={contentDisposition:"session",contentType:u.contentType,content:u.body};e.prack({extraHeaders:a,body:c})}).catch(u=>{throw this.stateTransition(U.Terminated),u})}case he.Stable:if(o&&e.prack({extraHeaders:a}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;const l=n.answer;if(!l)throw new Error("Answer is undefined.");const u={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,u).catch(c=>{throw this.stateTransition(U.Terminated),c})}return Promise.resolve();case he.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(e){if(this.logger.log("Inviter.onRedirect"),this.state!==U.Establishing&&this.state!==U.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(U.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==U.Establishing&&this.state!==U.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(U.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==U.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Ge;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Ge=Ge||(Ge={}));var bl=class Zn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Ge.Initial,this._waiting=!1,this._stateEventEmitter=new ui,this._waitingEventEmitter=new ui,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},Zn.defaultOptions()),{registrar:n}),Zn.stripUndefinedProperties(r)),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=this.userAgent.instanceId:!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&ft.parse(this.options.instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");const s=this.options.registrar,i=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,a=this.options.params||{},l=(r.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(ve.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Zn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Zn.defaultRefreshFrequency,this.refreshFrequency<50||this.refreshFrequency>99)throw new Error("Invalid refresh frequency. The value represents a percentage of the expiration time and should be between 50 and 99.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(u=>{const c=this.options[u];u==="registrar"?this.logger.log("· "+u+": "+c):this.logger.log("· "+u+": "+JSON.stringify(c))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:Zn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new fn("sip","anonymous","anonymous.invalid"),refreshFrequency:Zn.defaultRefreshFrequency}}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get contacts(){return this._contacts.slice()}get retryAfter(){return this._retryAfter}get state(){return this._state}get stateChange(){return this._stateEventEmitter}dispose(){return this.disposed?Promise.resolve():(this.disposed=!0,this.logger.log(`Registerer ${this.id} in state ${this.state} is being disposed`),delete this.userAgent._registerers[this.id],new Promise(t=>{const r=()=>{if(!this.waiting&&this._state===Ge.Registered){this.stateChange.addListener(()=>{this.terminated(),t()},{once:!0}),this.unregister();return}this.terminated(),t()};this.waiting?this.waitingChange.addListener(()=>{r()},{once:!0}):r()}))}register(t={}){if(this.state===Ge.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new pl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions));const r=(this.options.extraHeaders||[]).slice();r.push("Contact: "+this.generateContactHeader(this.expires)),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=r,this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{let i;s.message.hasHeader("expires")&&(i=Number(s.message.getHeader("expires"))),this._contacts=s.message.getHeaders("contact");let o=this._contacts.length;if(!o){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let a;for(;o--;){if(a=s.message.parseHeader("contact",o),!a)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&Cf(a.uri,this.userAgent.contact.pubGruu)){i=Number(a.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(a.uri.user===this.userAgent.contact.uri.user){i=Number(a.getParam("expires"));break}}else if(Cf(a.uri,this.userAgent.contact.uri)){i=Number(a.getParam("expires"));break}a=void 0}if(a===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(i===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(a.hasParam("temp-gruu")){const l=a.getParam("temp-gruu");l&&(this.userAgent.contact.tempGruu=ft.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=ft.URIParse(l.replace(/"/g,"")))}this.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{if(s.message.statusCode===423){if(!s.message.hasHeader("min-expires")){this.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),this.unregistered(),this.waitingToggle(!1);return}this.expires=Number(s.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${s.message.statusCode}`);let i=NaN;if(s.message.statusCode===500||s.message.statusCode===503){const o=s.message.getHeader("retry-after");o&&(i=Number.parseInt(o,void 0))}this._retryAfter=isNaN(i)?void 0:i,this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}unregister(t={}){if(this.state===Ge.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Ge.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new pl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==Ge.Registered&&!t.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const r=(t.requestOptions&&t.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=r,t.all?(r.push("Contact: *"),r.push("Expires: 0")):r.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{this._contacts=s.message.getHeaders("contact"),this.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{this.logger.error(`Unregister rejected with status code ${s.message.statusCode}`),this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(t){let r=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(r+=";reg-id="+this.options.regId,r+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(n=>{r+=";"+n}),r+=";expires="+t,r}registered(t){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*t*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},t*1e3),this._state!==Ge.Registered&&this.stateTransition(Ge.Registered)}unregistered(){this.clearTimers(),this._state!==Ge.Unregistered&&this.stateTransition(Ge.Unregistered)}terminated(){this.clearTimers(),this._state!==Ge.Terminated&&this.stateTransition(Ge.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ge.Initial:t!==Ge.Registered&&t!==Ge.Unregistered&&t!==Ge.Terminated&&r();break;case Ge.Registered:t!==Ge.Unregistered&&t!==Ge.Terminated&&r();break;case Ge.Unregistered:t!==Ge.Registered&&t!==Ge.Terminated&&r();break;case Ge.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===Ge.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(t){if(this._waiting===t)throw new Error(`Invalid waiting transition from ${this._waiting} to ${t}`);this._waiting=t,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let t="An attempt was made to send a REGISTER request while a prior one was still in progress.";t+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",t+=" from the registrar for the previous one or the previous REGISTER request has timed out.",t+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",t+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(t)}stateError(){let t=`An attempt was made to send a REGISTER request when the Registerer ${this.state===Ge.Terminated?"is in 'Terminated' state":"has been disposed"}.`;t+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",t+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(t)}};bl.defaultExpires=600,bl.defaultRefreshFrequency=99;var je;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(je=je||(je={}));var Re;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Re=Re||(Re={}));var Ct;(function(e){e.Started="Started",e.Stopped="Stopped"})(Ct=Ct||(Ct={}));var vn=class lr{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,r=!1){return this.onePassHasher.start().appendStr(t).end(r)}static hashAsciiStr(t,r=!1){return this.onePassHasher.start().appendAsciiStr(t).end(r)}static _hex(t){const r=lr.hexChars,n=lr.hexOut;let s,i,o,a;for(a=0;a<4;a+=1)for(i=a*8,s=t[a],o=0;o<8;o+=2)n[i+1+o]=r.charAt(s&15),s>>>=4,n[i+0+o]=r.charAt(s&15),s>>>=4;return n.join("")}static _md5cycle(t,r){let n=t[0],s=t[1],i=t[2],o=t[3];n+=(s&i|~s&o)+r[0]-680876936|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[2]+606105819|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[3]-1044525330|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[4]-176418897|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[7]-45705983|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[8]+1770035416|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[10]-42063|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[11]-1990404162|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[12]+1804603682|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[15]+1236535329|0,s=(s<<22|s>>>10)+i|0,n+=(s&o|i&~o)+r[1]-165796510|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[11]+643717713|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[0]-373897302|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[5]-701558691|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[15]-660478335|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[4]-405537848|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[9]+568446438|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[3]-187363961|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[8]+1163531501|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[13]-1444681467|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[12]-1926607734|0,s=(s<<20|s>>>12)+i|0,n+=(s^i^o)+r[5]-378558|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[14]-35309556|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[1]-1530992060|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[7]-155497632|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[10]-1094730640|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[13]+681279174|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[3]-722521979|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[6]+76029189|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[9]-640364487|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[15]+530742520|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[2]-995338651|0,s=(s<<23|s>>>9)+i|0,n+=(i^(s|~o))+r[0]-198630844|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[5]-57434055|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[12]+1700485571|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[10]-1051523|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[1]-2054922799|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[8]+1873313359|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[13]+1309151649|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[4]-145523070|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[2]+718787259|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[9]-343485551|0,s=(s<<21|s>>>11)+i|0,t[0]=n+t[0]|0,t[1]=s+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(lr.stateIdentity),this}appendStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o;for(o=0;o<t.length;o+=1){if(i=t.charCodeAt(o),i<128)r[s++]=i;else if(i<2048)r[s++]=(i>>>6)+192,r[s++]=i&63|128;else if(i<55296||i>56319)r[s++]=(i>>>12)+224,r[s++]=i>>>6&63|128,r[s++]=i&63|128;else{if(i=(i-55296)*1024+(t.charCodeAt(++o)-56320)+65536,i>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");r[s++]=(i>>>18)+240,r[s++]=i>>>12&63|128,r[s++]=i>>>6&63|128,r[s++]=i&63|128}s>=64&&(this._dataLength+=64,lr._md5cycle(this._state,n),s-=64,n[0]=n[16])}return this._bufferLength=s,this}appendAsciiStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t.charCodeAt(o++);if(s<64)break;this._dataLength+=64,lr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}appendByteArray(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t[o++];if(s<64)break;this._dataLength+=64,lr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}getState(){const t=this,r=t._state;return{buffer:String.fromCharCode.apply(null,t._buffer8),buflen:t._bufferLength,length:t._dataLength,state:[r[0],r[1],r[2],r[3]]}}setState(t){const r=t.buffer,n=t.state,s=this._state;let i;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],i=0;i<r.length;i+=1)this._buffer8[i]=r.charCodeAt(i)}end(t=!1){const r=this._bufferLength,n=this._buffer8,s=this._buffer32,i=(r>>2)+1;let o;if(this._dataLength+=r,n[r]=128,n[r+1]=n[r+2]=n[r+3]=0,s.set(lr.buffer32Identity.subarray(i),i),r>55&&(lr._md5cycle(this._state,s),s.set(lr.buffer32Identity)),o=this._dataLength*8,o<=4294967295)s[14]=o;else{const a=o.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;s[14]=l,s[15]=u}return lr._md5cycle(this._state,s),t?this._state:lr._hex(this._state)}};vn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),vn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),vn.hexChars="0123456789abcdef",vn.hexOut=[],vn.onePassHasher=new vn,vn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function mn(e){return vn.hashStr(e)}var P0=class{constructor(e,t,r,n){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=r,this.password=n,this.ha1=t,this.nc=0,this.ncHex="00000000"}authenticate(e,t,r){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if(this.algorithm!=="MD5")return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else if(t.qop.indexOf("auth-int")>-1)this.qop="auth-int";else return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=jn(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0}toString(){const e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}updateNcHex(){const e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}calculateResponse(e){let t,r;t=this.ha1,(t===""||t===void 0)&&(t=mn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=mn(this.method+":"+this.uri),this.response=mn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=mn(this.method+":"+this.uri+":"+mn(e||"")),this.response=mn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=mn(this.method+":"+this.uri),this.response=mn(t+":"+this.nonce+":"+r))}},wt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(wt=wt||(wt={}));var Rf=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(wt.error,e)}warn(e){this.genericLog(wt.warn,e)}log(e){this.genericLog(wt.log,e)}debug(e){this.genericLog(wt.debug,e)}genericLog(e,t){this.logger.genericLog(e,this.category,this.label,t)}get level(){return this.logger.level}set level(e){this.logger.level=e}},D0=class{constructor(){this.builtinEnabled=!0,this._level=wt.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:wt.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}get connector(){return this._connector}set connector(e){e?typeof e=="function"?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}getLogger(e,t){if(t&&this.level===3)return new Rf(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Rf(this,e);return this.loggers[e]=r,r}}genericLog(e,t,r,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,n),this.connector&&this.connector(wt[e],t,r,n)}print(e,t,r,n){if(typeof n=="string"){const s=[new Date,t];r&&s.push(r),n=s.concat(n).join(" | ")}switch(e){case wt.error:console.error(n);break;case wt.warn:console.warn(n);break;case wt.log:console.log(n);break;case wt.debug:console.debug(n);break;default:break}}},So;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
27
- `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),u=i.substring(o,l).trim(),c=i.substring(l+1,a).trim();let d;switch(u.toLowerCase()){case"via":case"v":s.addHeader("via",c),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",c),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",c),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=ft.parse(c,"Record_Route"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("record-route",c.substring(p.position,p.offset)),s.headers["Record-Route"][s.getHeaders("record-route").length-1].parsed=p.parsed});break;case"call-id":case"i":s.setHeader("call-id",c),d=s.parseHeader("call-id"),d&&(s.callId=c);break;case"contact":case"m":if(d=ft.parse(c,"Contact"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("contact",c.substring(p.position,p.offset)),s.headers.Contact[s.getHeaders("contact").length-1].parsed=p.parsed});break;case"content-length":case"l":s.setHeader("content-length",c),d=s.parseHeader("content-length");break;case"content-type":case"c":s.setHeader("content-type",c),d=s.parseHeader("content-type");break;case"cseq":s.setHeader("cseq",c),d=s.parseHeader("cseq"),d&&(s.cseq=d.value),s instanceof pn&&(s.method=d.method);break;case"max-forwards":s.setHeader("max-forwards",c),d=s.parseHeader("max-forwards");break;case"www-authenticate":s.setHeader("www-authenticate",c),d=s.parseHeader("www-authenticate");break;case"proxy-authenticate":s.setHeader("proxy-authenticate",c),d=s.parseHeader("proxy-authenticate");break;case"refer-to":case"r":s.setHeader("refer-to",c),d=s.parseHeader("refer-to"),d&&(s.referTo=d);break;default:s.addHeader(u.toLowerCase(),c),d=0}return d===void 0?{error:"error parsing header '"+u+"'"}:!0}e.parseHeader=r;function n(s,i){let o=0,a=s.indexOf(`\r
28
- `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),u=ft.parse(l,"Request_Response");let c;if(u===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else u.status_code?(c=new pn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new ws,c.method=u.method,c.ruri=u.uri);c.data=s,o=a+2;let d;for(;;){if(a=t(s,o),a===-2){d=o+2;break}else if(a===-1){i.error("malformed message");return}const p=r(c,s,o,a);if(p&&p!==!0){i.error(p.error);return}o=a+2}return c.hasHeader("content-length")?c.body=s.substr(d,Number(c.getHeader("content-length"))):c.body=s.substring(d),c}e.parseMessage=n})(So=So||(So={}));function kf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:wo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
26
+ `,t}};function Ef(e){return e==="application/sdp"?"session":"render"}function bo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:Ef(r),contentType:r,content:t}}function Af(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function fi(e){let t,r,n;if(e instanceof ys&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof pn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof vl&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(Af(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=Ef(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var lr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(lr=lr||(lr={}));var pe;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(pe=pe||(pe={}));var Gr=500,R0=4e3,ml=5e3;const wt={T1:Gr,T2:R0,T4:ml,TIMER_B:64*Gr,TIMER_D:0*Gr,TIMER_F:64*Gr,TIMER_H:64*Gr,TIMER_I:0*ml,TIMER_J:0*Gr,TIMER_K:0*ml,TIMER_L:64*Gr,TIMER_M:64*Gr,TIMER_N:64*Gr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var hn=class extends jn{constructor(e){super(e||"Transaction state error.")}},ge;(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(ge=ge||(ge={}));const gn=[ge.ACK,ge.BYE,ge.CANCEL,ge.INFO,ge.INVITE,ge.MESSAGE,ge.NOTIFY,ge.OPTIONS,ge.PRACK,ge.REFER,ge.REGISTER,ge.SUBSCRIBE];var If=class{constructor(e){this.incomingMessageRequest=e}get request(){return this.incomingMessageRequest.message}accept(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}reject(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}},wl=class{constructor(e){this.incomingNotifyRequest=e}get request(){return this.incomingNotifyRequest.message}accept(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}reject(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}},k0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof ar))throw new Error("Failed to parse Refer-To header.");return e}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const e=this.referTo.uri.getHeader("replaces");return e instanceof Array?e[0]:e}get request(){return this.incomingReferRequest.message}accept(e={statusCode:202}){return this.incomingReferRequest.accept(e),Promise.resolve()}reject(e){return this.incomingReferRequest.reject(e),Promise.resolve()}makeInviter(e){if(this.inviter)return this.inviter;const t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};const r=(e.extraHeaders||[]).slice(),n=this.replaces;n&&r.push("Replaces: "+decodeURIComponent(n));const s=this.referredBy;return s&&r.push("Referred-By: "+s),e.extraHeaders=r,this.inviter=this.session.userAgent._makeInviter(t,e),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}},z;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(z=z||(z={}));var yl=class tg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new ui,this._userAgent=t}dispose(){switch(this.logger.log(`Session ${this.id} in state ${this._state} is being disposed`),delete this.userAgent._sessions[this.id],this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.state){case z.Initial:break;case z.Establishing:break;case z.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case z.Terminating:break;case z.Terminated:break;default:throw new Error("Unknown state.")}return Promise.resolve()}get assertedIdentity(){return this._assertedIdentity}get dialog(){return this._dialog}get id(){return this._id}get replacee(){return this._replacee}get sessionDescriptionHandler(){return this._sessionDescriptionHandler}get sessionDescriptionHandlerFactory(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}get sessionDescriptionHandlerModifiers(){return this._sessionDescriptionHandlerModifiers||[]}set sessionDescriptionHandlerModifiers(t){this._sessionDescriptionHandlerModifiers=t.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(t){this._sessionDescriptionHandlerOptions=Object.assign({},t)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(t){this._sessionDescriptionHandlerModifiersReInvite=t.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(t){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},t)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(t={}){let r="Session.bye() may only be called if established session.";switch(this.state){case z.Initial:typeof this.cancel=="function"?(r+=" However Inviter.invite() has not yet been called.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called.",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Establishing:typeof this.cancel=="function"?(r+=" However a dialog does not yet exist.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called (or not yet resolved).",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case z.Terminating:r+=" However this session is already terminating.",typeof this.cancel=="function"?r+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(r+=" Perhaps you have already called Session.bye()?");break;case z.Terminated:r+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(r),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(t={}){if(this.state!==z.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._info(r,n)}invite(t={}){if(this.logger.log("Session.invite"),this.state!==z.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new pl("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,t.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=t.sessionDescriptionHandlerModifiers),t.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=t.sessionDescriptionHandlerOptions);const r={onAccept:i=>{const o=fi(i.message);if(!o){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(i,400,"Missing session description"),this.stateTransition(z.Terminated),this.pendingReinvite=!1;return}if(t.withoutSdp){const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(o,a).then(l=>{i.ack({body:l})}).catch(l=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state===z.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated))}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}else{const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(o,a).then(()=>{i.ack()}).catch(l=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state!==z.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated)):i.ack()}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}},onProgress:i=>{},onRedirect:i=>{},onReject:i=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):this.rollbackOffer().catch(o=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(o.message),this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+gn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==z.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._message(r,n)}refer(t,r={}){if(this.state!==z.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof tg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case lr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case lr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case lr.AckWait:return this.stateTransition(z.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(z.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(z.Terminated),s(i)}}});case lr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case lr.Terminated:throw new Error(`Invalid dialog state ${n.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(t,r){return this.dialog?Promise.resolve(this.dialog.info(t,r)):Promise.reject(new Error("Session dialog undefined."))}_message(t,r){return this.dialog?Promise.resolve(this.dialog.message(t,r)):Promise.reject(new Error("Session dialog undefined."))}_refer(t,r,n){return this.dialog?(this.onNotify=t,Promise.resolve(this.dialog.refer(r,n))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(t,r,n){t.ack();const s=[];r&&s.push("Reason: "+this.getReasonHeaderValue(r,n)),t.session.bye(void 0,{extraHeaders:s})}onAckRequest(t){if(this.logger.log("Session.onAckRequest"),this.state!==z.Established&&this.state!==z.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const r=this.dialog;if(!r)throw new Error("Dialog undefined.");const n={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const s=new S0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case pe.Initial:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case pe.Stable:{const s=fi(t.message);return s?s.contentDisposition==="render"?(this._renderbody=s.content,this._rendertype=s.contentType,Promise.resolve()):s.contentDisposition!=="session"?Promise.resolve():this.setAnswer(s,n).catch(i=>{this.logger.error(i.message);const o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];r.bye(void 0,{extraHeaders:o}),this.stateTransition(z.Terminated)}):Promise.resolve()}case pe.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case pe.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case pe.Closed:throw new Error(`Invalid signaling state ${r.signalingState}.`);default:throw new Error(`Invalid signaling state ${r.signalingState}.`)}}onByeRequest(t){if(this.logger.log("Session.onByeRequest"),this.state!==z.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new C0(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(z.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==z.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new T0(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==z.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const r=["Contact: "+this._contact];if(t.message.hasHeader("P-Asserted-Identity")){const s=t.message.getHeader("P-Asserted-Identity");if(!s)throw new Error("Header undefined.");this._assertedIdentity=pt.nameAddrHeaderParse(s)}const n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(n).then(s=>{const i=t.accept({statusCode:200,extraHeaders:r,body:s});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,200)}).catch(s=>{if(this.logger.error(s.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===pe.Stable){const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488);return}this.rollbackOffer().then(()=>{const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488)}).catch(i=>{this.logger.error(i.message),this.logger.error("Failed to rollback offer on re-INVITE request");const o=t.reject({statusCode:488});if(this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==z.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new If(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==z.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new wl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new wl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==z.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(t){if(this.logger.log("Session.onReferRequest"),this.state!==z.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!t.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),t.reject();return}const r=new k0(t,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(r):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),r.accept().then(()=>r.makeInviter(this._referralInviterOptions).invite()).catch(n=>{this.logger.error(n.message)}))}generateResponseOfferAnswer(t,r){if(this.dialog)return this.generateResponseOfferAnswerInDialog(r);const n=fi(t.message);return!n||n.contentDisposition!=="session"?this.getOffer(r):this.setOfferAndGetAnswer(n,r)}generateResponseOfferAnswerInDialog(t){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case pe.Initial:return this.getOffer(t);case pe.HaveLocalOffer:return Promise.resolve(void 0);case pe.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,t);case pe.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case pe.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(t){const r=this.setupSessionDescriptionHandler(),n=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{return r.getDescription(n,s).then(i=>bo(i)).catch(i=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const o=i instanceof Error?i:new Error("Session.getOffer unknown error.");throw this.logger.error(o.message),o})}catch(i){this.logger.error("Session.getOffer: SDH getDescription threw...");const o=i instanceof Error?i:new Error(i);return this.logger.error(o.message),Promise.reject(o)}}rollbackOffer(){const t=this.setupSessionDescriptionHandler();if(t.rollbackDescription===void 0)return Promise.resolve();try{return t.rollbackDescription().catch(r=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const n=r instanceof Error?r:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(n.message),n})}catch(r){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const n=r instanceof Error?r:new Error(r);return this.logger.error(n.message),Promise.reject(n)}}setAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new fl)}catch(o){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).catch(o=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const a=o instanceof Error?o:new Error("Session.setAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setAnswer: SDH setDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setOfferAndGetAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new fl)}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).then(()=>n.getDescription(s,i)).then(o=>bo(o)).catch(o=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const a=o instanceof Error?o:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setSessionDescriptionHandler(t){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=t}setupSessionDescriptionHandler(){var t;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case z.Initial:t!==z.Establishing&&t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Establishing:t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Established:t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Terminating:t!==z.Terminated&&r();break;case z.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===z.Terminated&&this.dispose()}copyRequestOptions(t={}){return{extraHeaders:t.extraHeaders?t.extraHeaders.slice():void 0,body:t.body?{contentDisposition:t.body.contentDisposition||"render",contentType:t.body.contentType||"text/plain",content:t.body.content||""}:void 0}}getReasonHeaderValue(t,r){const n=t;let s=wo(t);return!s&&r&&(s=r),"SIP;cause="+n+';text="'+s+'"'}referExtraHeaders(t){const r=[];return r.push("Referred-By: <"+this.userAgent.configuration.uri+">"),r.push("Contact: "+this._contact),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.push("Refer-To: "+t),r}referToString(t){let r;if(t instanceof fn)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},wr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(wr=wr||(wr={}));const $0={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var bs=class extends yl{constructor(e,t){super(e),this.incomingInviteRequest=t,this.disposed=!1,this.expiresTimer=void 0,this.isCanceled=!1,this.rel100="none",this.rseq=Math.floor(Math.random()*1e4),this.userNoAnswerTimer=void 0,this.waitingForPrack=!1,this.logger=e.getLogger("sip.Invitation");const r=this.incomingInviteRequest.message,n=r.getHeader("require");n&&n.toLowerCase().includes("100rel")&&(this.rel100="required");const s=r.getHeader("supported");if(s&&s.toLowerCase().includes("100rel")&&(this.rel100="supported"),r.toTag=t.toTag,typeof r.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{t.reject({statusCode:480}),this.stateTransition(z.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),r.hasHeader("expires")){const a=Number(r.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===z.Initial&&(t.reject({statusCode:487}),this.stateTransition(z.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=pt.nameAddrHeaderParse(i)),this._contact=this.userAgent.contact.toString();const o=r.parseHeader("Content-Disposition");o&&o.type==="render"&&(this._renderbody=r.body,this._rendertype=r.getHeader("Content-Type")),this._id=r.callId+r.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.expiresTimer&&(clearTimeout(this.expiresTimer),this.expiresTimer=void 0),this.userNoAnswerTimer&&(clearTimeout(this.userNoAnswerTimer),this.userNoAnswerTimer=void 0),this.prackNeverArrived(),this.state){case z.Initial:return this.reject().then(()=>super.dispose());case z.Establishing:return this.reject().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get autoSendAnInitialProvisionalResponse(){return this.rel100!=="required"&&this.userAgent.configuration.sendInitialProvisionalResponse}get body(){return this.incomingInviteRequest.message.body}get localIdentity(){return this.request.to}get remoteIdentity(){return this.request.from}get request(){return this.incomingInviteRequest.message}accept(e={}){if(this.logger.log("Invitation.accept"),this.state!==z.Initial){const t=new Error(`Invalid session state ${this.state}`);return this.logger.error(t.message),Promise.reject(t)}return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.stateTransition(z.Establishing),this.sendAccept(e).then(({message:t,session:r})=>{r.delegate={onAck:n=>this.onAckRequest(n),onAckTimeout:()=>this.onAckTimeout(),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,this.stateTransition(z.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==z.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===wr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==z.Initial&&this.state!==z.Establishing){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}const t=e.statusCode||480,r=e.reasonPhrase?e.reasonPhrase:wo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?bo(e.body):void 0;return t<400?this.incomingInviteRequest.redirect([],{statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}):this.incomingInviteRequest.reject({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}),this.stateTransition(z.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==z.Initial&&this.state!==z.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new x0(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(z.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=fi(e.message);if(!t||t.contentDisposition!=="session")return Promise.resolve(void 0);const r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case pe.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.Stable:return this.setAnswer(t,r).then(()=>{});case pe.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case pe.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case pe.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(e){let t=480;if(e instanceof Error?this.logger.error(e.message):this.logger.error(e),e instanceof fl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof _0?this.logger.error("A session description handler occurred while sending response"):e instanceof hl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof hn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===z.Initial||this.state===z.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(z.Terminated)}catch(r){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),r}if(this.isCanceled){this.logger.warn("An error occurred while attempting to formulate and send a response to an incoming INVITE. However a CANCEL was received and processed while doing so which can (and often does) result in errors occurring as the session terminates in the meantime. Said error is being ignored.");return}throw e}onAckTimeout(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(z.Terminated)}sendAccept(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,t)).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})))}sendProgress(e={}){const t=e.statusCode||180,r=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),s=e.body?bo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(v=>{try{c=u.accept({statusCode:200,body:v}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(C){a(C)}}).catch(v=>a(v)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(w),this.reject({statusCode:504}).then(()=>a(new hl)).catch(x=>a(x)))},wt.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=wt.T1,w=setTimeout(h,m)}).catch(l=>{this.waitingForPrack=!1,a(l)})})}sendProgressTrying(){try{const e=this.incomingInviteRequest.trying();return Promise.resolve(e)}catch(e){return Promise.reject(e)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((e,t)=>{this.waitingForPrackResolve=e,this.waitingForPrackReject=t}),this.waitingForPrackPromise}prackArrived(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}prackNeverArrived(){this.waitingForPrackReject&&this.waitingForPrackReject(new hl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},_o=class extends yl{constructor(e,t,r={}){super(e,r),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=e.getLogger("sip.Inviter"),this.earlyMedia=r.earlyMedia!==void 0?r.earlyMedia:this.earlyMedia,this.fromTag=yo(),this.inviteWithoutSdp=r.inviteWithoutSdp!==void 0?r.inviteWithoutSdp:this.inviteWithoutSdp;const n=Object.assign({},r);n.params=Object.assign({},r.params);const s=r.anonymous||!1,i=e.contact.toString({anonymous:s,outbound:s?!e.contact.tempGruu:!e.contact.pubGruu});s&&e.configuration.uri&&(n.params.fromDisplayName="Anonymous",n.params.fromUri="sip:anonymous@anonymous.invalid");let o=e.userAgentCore.configuration.aor;if(n.params.fromUri&&(o=typeof n.params.fromUri=="string"?pt.URIParse(n.params.fromUri):n.params.fromUri),!o)throw new TypeError("Invalid from URI: "+n.params.fromUri);let a=t;if(n.params.toUri&&(a=typeof n.params.toUri=="string"?pt.URIParse(n.params.toUri):n.params.toUri),!a)throw new TypeError("Invalid to URI: "+n.params.toUri);const l=Object.assign({},n.params);l.fromTag=this.fromTag;const u=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(u.push("P-Preferred-Identity: "+e.configuration.uri.toString()),u.push("Privacy: id")),u.push("Contact: "+i),u.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===wr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===wr.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(ge.INVITE,t,o,a,l,u,void 0),this._contact=i,this._referralInviterOptions=n,this._renderbody=r.renderbody,this._rendertype=r.rendertype,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiersReInvite),r.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptionsReInvite),this._id=this.outgoingRequestMessage.callId+this.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.disposeEarlyMedia(),this.state){case z.Initial:return this.cancel().then(()=>super.dispose());case z.Establishing:return this.cancel().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get body(){return this.outgoingRequestMessage.body}get localIdentity(){return this.outgoingRequestMessage.from}get remoteIdentity(){return this.outgoingRequestMessage.to}get request(){return this.outgoingRequestMessage}cancel(e={}){if(this.logger.log("Inviter.cancel"),this.state!==z.Initial&&this.state!==z.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(z.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=wo(r)||n;return"SIP;cause="+s+';text="'+i+'"'}}if(this.outgoingInviteRequest){let r;e.statusCode&&e.reasonPhrase&&(r=t(e.statusCode,e.reasonPhrase)),this.outgoingInviteRequest.cancel(r,e)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(z.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==z.Initial)return super.invite(e);if(e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),e.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(z.Establishing),Promise.resolve(this.sendInvite(e));const t={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(t).then(r=>(this.outgoingRequestMessage.body={body:r.content,contentType:r.contentType},this.stateTransition(z.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==z.Terminated&&this.stateTransition(z.Terminated),r})}sendInvite(e={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:t=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(t);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(t),this.stateTransition(z.Terminated);return}this.notifyReferer(t),this.onAccept(t).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onAccept&&e.requestDelegate.onAccept(t)})},onProgress:t=>{this.isCanceled||(this.notifyReferer(t),this.onProgress(t).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onProgress&&e.requestDelegate.onProgress(t)}))},onRedirect:t=>{this.notifyReferer(t),this.onRedirect(t),e.requestDelegate&&e.requestDelegate.onRedirect&&e.requestDelegate.onRedirect(t)},onReject:t=>{this.notifyReferer(t),this.onReject(t),e.requestDelegate&&e.requestDelegate.onReject&&e.requestDelegate.onReject(t)},onTrying:t=>{this.notifyReferer(t),this.onTrying(t),e.requestDelegate&&e.requestDelegate.onTrying&&e.requestDelegate.onTrying(t)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(e=>{e.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(e){if(!this._referred)return;if(!(this._referred instanceof yl))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");const t=`SIP/2.0 ${e.message.statusCode} ${e.message.reasonPhrase}`.trim(),r=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:t}});r.delegate={onReject:()=>{this._referred=void 0}}}onAccept(e){if(this.logger.log("Inviter.onAccept"),this.state!==z.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const t=e.message,r=e.session;switch(t.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=pt.nameAddrHeaderParse(t.getHeader("P-Asserted-Identity"))),r.delegate={onAck:n=>this.onAckRequest(n),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,r.signalingState){case pe.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case pe.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const n={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,n).then(s=>{e.ack({body:s}),this.stateTransition(z.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(z.Terminated),s})}case pe.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const i=this.earlyMediaSessionDescriptionHandlers.get(r.id);if(!i)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(i),this.earlyMediaSessionDescriptionHandlers.delete(r.id),e.ack(),this.stateTransition(z.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==r){this.earlyMedia&&this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behavior of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.");const i=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(z.Established),Promise.resolve()}const n=r.answer;if(!n)throw new Error("Answer is undefined.");const s={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(n,s).then(()=>{let i;this._renderbody&&this._rendertype&&(i={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),e.ack(i),this.stateTransition(z.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),i})}case pe.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(e){var t;if(this.logger.log("Inviter.onProgress"),this.state!==z.Establishing)return this.logger.error(`Progress received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");const r=e.message,n=e.session;r.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=pt.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));const s=r.getHeader("require"),i=r.getHeader("rseq"),o=!!(s&&s.includes("100rel")&&i&&Number(i)),a=[];switch(o&&a.push("RAck: "+r.getHeader("rseq")+" "+r.getHeader("cseq")),n.signalingState){case pe.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:a})),Promise.resolve();case pe.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case pe.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const l=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(l,!0),this.earlyMediaSessionDescriptionHandlers.set(n.id,l),l.setDescription(r.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>l.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(u=>{const c={contentDisposition:"session",contentType:u.contentType,content:u.body};e.prack({extraHeaders:a,body:c})}).catch(u=>{throw this.stateTransition(z.Terminated),u})}case pe.Stable:if(o&&e.prack({extraHeaders:a}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;const l=n.answer;if(!l)throw new Error("Answer is undefined.");const u={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,u).catch(c=>{throw this.stateTransition(z.Terminated),c})}return Promise.resolve();case pe.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(e){if(this.logger.log("Inviter.onRedirect"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==z.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Je;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Je=Je||(Je={}));var bl=class Xn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Je.Initial,this._waiting=!1,this._stateEventEmitter=new ui,this._waitingEventEmitter=new ui,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},Xn.defaultOptions()),{registrar:n}),Xn.stripUndefinedProperties(r)),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=this.userAgent.instanceId:!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&pt.parse(this.options.instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");const s=this.options.registrar,i=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,a=this.options.params||{},l=(r.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(ge.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Xn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Xn.defaultRefreshFrequency,this.refreshFrequency<50||this.refreshFrequency>99)throw new Error("Invalid refresh frequency. The value represents a percentage of the expiration time and should be between 50 and 99.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(u=>{const c=this.options[u];u==="registrar"?this.logger.log("· "+u+": "+c):this.logger.log("· "+u+": "+JSON.stringify(c))})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:Xn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new fn("sip","anonymous","anonymous.invalid"),refreshFrequency:Xn.defaultRefreshFrequency}}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get contacts(){return this._contacts.slice()}get retryAfter(){return this._retryAfter}get state(){return this._state}get stateChange(){return this._stateEventEmitter}dispose(){return this.disposed?Promise.resolve():(this.disposed=!0,this.logger.log(`Registerer ${this.id} in state ${this.state} is being disposed`),delete this.userAgent._registerers[this.id],new Promise(t=>{const r=()=>{if(!this.waiting&&this._state===Je.Registered){this.stateChange.addListener(()=>{this.terminated(),t()},{once:!0}),this.unregister();return}this.terminated(),t()};this.waiting?this.waitingChange.addListener(()=>{r()},{once:!0}):r()}))}register(t={}){if(this.state===Je.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new pl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions));const r=(this.options.extraHeaders||[]).slice();r.push("Contact: "+this.generateContactHeader(this.expires)),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=r,this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{let i;s.message.hasHeader("expires")&&(i=Number(s.message.getHeader("expires"))),this._contacts=s.message.getHeaders("contact");let o=this._contacts.length;if(!o){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let a;for(;o--;){if(a=s.message.parseHeader("contact",o),!a)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&Cf(a.uri,this.userAgent.contact.pubGruu)){i=Number(a.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(a.uri.user===this.userAgent.contact.uri.user){i=Number(a.getParam("expires"));break}}else if(Cf(a.uri,this.userAgent.contact.uri)){i=Number(a.getParam("expires"));break}a=void 0}if(a===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(i===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(a.hasParam("temp-gruu")){const l=a.getParam("temp-gruu");l&&(this.userAgent.contact.tempGruu=pt.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=pt.URIParse(l.replace(/"/g,"")))}this.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{if(s.message.statusCode===423){if(!s.message.hasHeader("min-expires")){this.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),this.unregistered(),this.waitingToggle(!1);return}this.expires=Number(s.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${s.message.statusCode}`);let i=NaN;if(s.message.statusCode===500||s.message.statusCode===503){const o=s.message.getHeader("retry-after");o&&(i=Number.parseInt(o,void 0))}this._retryAfter=isNaN(i)?void 0:i,this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}unregister(t={}){if(this.state===Je.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Je.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new pl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==Je.Registered&&!t.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const r=(t.requestOptions&&t.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=r,t.all?(r.push("Contact: *"),r.push("Expires: 0")):r.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{this._contacts=s.message.getHeaders("contact"),this.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{this.logger.error(`Unregister rejected with status code ${s.message.statusCode}`),this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(t){let r=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(r+=";reg-id="+this.options.regId,r+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(n=>{r+=";"+n}),r+=";expires="+t,r}registered(t){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*t*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},t*1e3),this._state!==Je.Registered&&this.stateTransition(Je.Registered)}unregistered(){this.clearTimers(),this._state!==Je.Unregistered&&this.stateTransition(Je.Unregistered)}terminated(){this.clearTimers(),this._state!==Je.Terminated&&this.stateTransition(Je.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Je.Initial:t!==Je.Registered&&t!==Je.Unregistered&&t!==Je.Terminated&&r();break;case Je.Registered:t!==Je.Unregistered&&t!==Je.Terminated&&r();break;case Je.Unregistered:t!==Je.Registered&&t!==Je.Terminated&&r();break;case Je.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===Je.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(t){if(this._waiting===t)throw new Error(`Invalid waiting transition from ${this._waiting} to ${t}`);this._waiting=t,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let t="An attempt was made to send a REGISTER request while a prior one was still in progress.";t+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",t+=" from the registrar for the previous one or the previous REGISTER request has timed out.",t+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",t+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(t)}stateError(){let t=`An attempt was made to send a REGISTER request when the Registerer ${this.state===Je.Terminated?"is in 'Terminated' state":"has been disposed"}.`;t+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",t+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(t)}};bl.defaultExpires=600,bl.defaultRefreshFrequency=99;var Ue;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ue=Ue||(Ue={}));var ke;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(ke=ke||(ke={}));var Ct;(function(e){e.Started="Started",e.Stopped="Stopped"})(Ct=Ct||(Ct={}));var vn=class ur{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,r=!1){return this.onePassHasher.start().appendStr(t).end(r)}static hashAsciiStr(t,r=!1){return this.onePassHasher.start().appendAsciiStr(t).end(r)}static _hex(t){const r=ur.hexChars,n=ur.hexOut;let s,i,o,a;for(a=0;a<4;a+=1)for(i=a*8,s=t[a],o=0;o<8;o+=2)n[i+1+o]=r.charAt(s&15),s>>>=4,n[i+0+o]=r.charAt(s&15),s>>>=4;return n.join("")}static _md5cycle(t,r){let n=t[0],s=t[1],i=t[2],o=t[3];n+=(s&i|~s&o)+r[0]-680876936|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[2]+606105819|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[3]-1044525330|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[4]-176418897|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[7]-45705983|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[8]+1770035416|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[10]-42063|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[11]-1990404162|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[12]+1804603682|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[15]+1236535329|0,s=(s<<22|s>>>10)+i|0,n+=(s&o|i&~o)+r[1]-165796510|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[11]+643717713|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[0]-373897302|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[5]-701558691|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[15]-660478335|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[4]-405537848|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[9]+568446438|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[3]-187363961|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[8]+1163531501|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[13]-1444681467|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[12]-1926607734|0,s=(s<<20|s>>>12)+i|0,n+=(s^i^o)+r[5]-378558|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[14]-35309556|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[1]-1530992060|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[7]-155497632|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[10]-1094730640|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[13]+681279174|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[3]-722521979|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[6]+76029189|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[9]-640364487|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[15]+530742520|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[2]-995338651|0,s=(s<<23|s>>>9)+i|0,n+=(i^(s|~o))+r[0]-198630844|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[5]-57434055|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[12]+1700485571|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[10]-1051523|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[1]-2054922799|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[8]+1873313359|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[13]+1309151649|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[4]-145523070|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[2]+718787259|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[9]-343485551|0,s=(s<<21|s>>>11)+i|0,t[0]=n+t[0]|0,t[1]=s+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(ur.stateIdentity),this}appendStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o;for(o=0;o<t.length;o+=1){if(i=t.charCodeAt(o),i<128)r[s++]=i;else if(i<2048)r[s++]=(i>>>6)+192,r[s++]=i&63|128;else if(i<55296||i>56319)r[s++]=(i>>>12)+224,r[s++]=i>>>6&63|128,r[s++]=i&63|128;else{if(i=(i-55296)*1024+(t.charCodeAt(++o)-56320)+65536,i>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");r[s++]=(i>>>18)+240,r[s++]=i>>>12&63|128,r[s++]=i>>>6&63|128,r[s++]=i&63|128}s>=64&&(this._dataLength+=64,ur._md5cycle(this._state,n),s-=64,n[0]=n[16])}return this._bufferLength=s,this}appendAsciiStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t.charCodeAt(o++);if(s<64)break;this._dataLength+=64,ur._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}appendByteArray(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t[o++];if(s<64)break;this._dataLength+=64,ur._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}getState(){const t=this,r=t._state;return{buffer:String.fromCharCode.apply(null,t._buffer8),buflen:t._bufferLength,length:t._dataLength,state:[r[0],r[1],r[2],r[3]]}}setState(t){const r=t.buffer,n=t.state,s=this._state;let i;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],i=0;i<r.length;i+=1)this._buffer8[i]=r.charCodeAt(i)}end(t=!1){const r=this._bufferLength,n=this._buffer8,s=this._buffer32,i=(r>>2)+1;let o;if(this._dataLength+=r,n[r]=128,n[r+1]=n[r+2]=n[r+3]=0,s.set(ur.buffer32Identity.subarray(i),i),r>55&&(ur._md5cycle(this._state,s),s.set(ur.buffer32Identity)),o=this._dataLength*8,o<=4294967295)s[14]=o;else{const a=o.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),u=parseInt(a[1],16)||0;s[14]=l,s[15]=u}return ur._md5cycle(this._state,s),t?this._state:ur._hex(this._state)}};vn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),vn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),vn.hexChars="0123456789abcdef",vn.hexOut=[],vn.onePassHasher=new vn,vn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function mn(e){return vn.hashStr(e)}var P0=class{constructor(e,t,r,n){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=r,this.password=n,this.ha1=t,this.nc=0,this.ncHex="00000000"}authenticate(e,t,r){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if(this.algorithm!=="MD5")return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else if(t.qop.indexOf("auth-int")>-1)this.qop="auth-int";else return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=Un(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0}toString(){const e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}updateNcHex(){const e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}calculateResponse(e){let t,r;t=this.ha1,(t===""||t===void 0)&&(t=mn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=mn(this.method+":"+this.uri),this.response=mn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=mn(this.method+":"+this.uri+":"+mn(e||"")),this.response=mn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=mn(this.method+":"+this.uri),this.response=mn(t+":"+this.nonce+":"+r))}},yt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(yt=yt||(yt={}));var Rf=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(yt.error,e)}warn(e){this.genericLog(yt.warn,e)}log(e){this.genericLog(yt.log,e)}debug(e){this.genericLog(yt.debug,e)}genericLog(e,t){this.logger.genericLog(e,this.category,this.label,t)}get level(){return this.logger.level}set level(e){this.logger.level=e}},D0=class{constructor(){this.builtinEnabled=!0,this._level=yt.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:yt.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}get connector(){return this._connector}set connector(e){e?typeof e=="function"?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}getLogger(e,t){if(t&&this.level===3)return new Rf(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Rf(this,e);return this.loggers[e]=r,r}}genericLog(e,t,r,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,n),this.connector&&this.connector(yt[e],t,r,n)}print(e,t,r,n){if(typeof n=="string"){const s=[new Date,t];r&&s.push(r),n=s.concat(n).join(" | ")}switch(e){case yt.error:console.error(n);break;case yt.warn:console.warn(n);break;case yt.log:console.log(n);break;case yt.debug:console.debug(n);break;default:break}}},So;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
27
+ `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),u=i.substring(o,l).trim(),c=i.substring(l+1,a).trim();let d;switch(u.toLowerCase()){case"via":case"v":s.addHeader("via",c),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",c),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",c),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=pt.parse(c,"Record_Route"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("record-route",c.substring(p.position,p.offset)),s.headers["Record-Route"][s.getHeaders("record-route").length-1].parsed=p.parsed});break;case"call-id":case"i":s.setHeader("call-id",c),d=s.parseHeader("call-id"),d&&(s.callId=c);break;case"contact":case"m":if(d=pt.parse(c,"Contact"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(p=>{s.addHeader("contact",c.substring(p.position,p.offset)),s.headers.Contact[s.getHeaders("contact").length-1].parsed=p.parsed});break;case"content-length":case"l":s.setHeader("content-length",c),d=s.parseHeader("content-length");break;case"content-type":case"c":s.setHeader("content-type",c),d=s.parseHeader("content-type");break;case"cseq":s.setHeader("cseq",c),d=s.parseHeader("cseq"),d&&(s.cseq=d.value),s instanceof pn&&(s.method=d.method);break;case"max-forwards":s.setHeader("max-forwards",c),d=s.parseHeader("max-forwards");break;case"www-authenticate":s.setHeader("www-authenticate",c),d=s.parseHeader("www-authenticate");break;case"proxy-authenticate":s.setHeader("proxy-authenticate",c),d=s.parseHeader("proxy-authenticate");break;case"refer-to":case"r":s.setHeader("refer-to",c),d=s.parseHeader("refer-to"),d&&(s.referTo=d);break;default:s.addHeader(u.toLowerCase(),c),d=0}return d===void 0?{error:"error parsing header '"+u+"'"}:!0}e.parseHeader=r;function n(s,i){let o=0,a=s.indexOf(`\r
28
+ `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),u=pt.parse(l,"Request_Response");let c;if(u===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else u.status_code?(c=new pn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new ys,c.method=u.method,c.ruri=u.uri);c.data=s,o=a+2;let d;for(;;){if(a=t(s,o),a===-2){d=o+2;break}else if(a===-1){i.error("malformed message");return}const p=r(c,s,o,a);if(p&&p!==!0){i.error(p.error);return}o=a+2}return c.hasHeader("content-length")?c.body=s.substr(d,Number(c.getHeader("content-length"))):c.body=s.substring(d),c}e.parseMessage=n})(So=So||(So={}));function kf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:wo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
29
29
  `;t.statusCode>=100&&t.statusCode<200,t.statusCode;const i="From: "+e.getHeader("From")+`\r
30
30
  `,o="Call-ID: "+e.callId+`\r
31
31
  `,a="CSeq: "+e.cseq+" "+e.method+`\r
@@ -39,7 +39,7 @@
39
39
  \r
40
40
  `,s+=t.body.content):s+=`Content-Length: 0\r
41
41
  \r
42
- `,{message:s}}var _l=class extends Vn{constructor(e){super(e||"Unspecified transport error.")}},$f=class{constructor(e,t,r,n,s){this._transport=e,this._user=t,this._id=r,this._state=n,this.listeners=new Array,this.logger=t.loggerFactory.getLogger(s,r),this.logger.debug(`Constructing ${this.typeToString()} with id ${this.id}.`)}dispose(){this.logger.debug(`Destroyed ${this.typeToString()} with id ${this.id}.`)}get id(){return this._id}get kind(){throw new Error("Invalid kind.")}get state(){return this._state}get transport(){return this._transport}addStateChangeListener(e,t){const r=()=>{this.removeStateChangeListener(r),e()};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}notifyStateChangeListeners(){this.listeners.slice().forEach(e=>e())}removeStateChangeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}logTransportError(e,t){this.logger.error(e.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(t)}send(e){return this.transport.send(e).catch(t=>{if(t instanceof _l)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new _l(t.message):r=new _l,this.onTransportError(r),r})}setState(e){this.logger.debug(`State change to "${e}" on ${this.typeToString()} with id ${this.id}.`),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}},Pf=class extends $f{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},L;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(L=L||(L={}));var Ft=class extends Pf{constructor(e,t,r){super(e,t,r,L.Proceeding,"sip.transaction.ist")}dispose(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),super.dispose()}get kind(){return"ist"}receiveRequest(e){switch(this.state){case L.Proceeding:if(e.method===ve.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case L.Accepted:if(e.method===ve.INVITE)return;break;case L.Completed:if(e.method===ve.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of final response.")});return}if(e.method===ve.ACK){this.stateTransition(L.Confirmed);return}break;case L.Confirmed:if(e.method===ve.INVITE||e.method===ve.ACK)return;break;case L.Terminated:if(e.method===ve.INVITE||e.method===ve.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const t=`INVITE server transaction received unexpected ${e.method} request while in state ${this.state}.`;this.logger.warn(t)}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);switch(this.state){case L.Proceeding:if(e>=100&&e<=199){this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 1xx response.")});return}if(e>=200&&e<=299){this.lastFinalResponse=t,this.stateTransition(L.Accepted),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}if(e>=300&&e<=699){this.lastFinalResponse=t,this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case L.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case L.Completed:break;case L.Confirmed:break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}retransmitAcceptedResponse(){this.state===L.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(e=>{this.logTransportError(e,"Failed to send 2xx response.")})}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e)}typeToString(){return"INVITE server transaction"}stateTransition(e){const t=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Proceeding:t();break;case L.Accepted:case L.Completed:this.state!==L.Proceeding&&t();break;case L.Confirmed:this.state!==L.Completed&&t();break;case L.Terminated:this.state!==L.Accepted&&this.state!==L.Completed&&this.state!==L.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===L.Accepted&&(this.L=setTimeout(()=>this.timerL(),mt.TIMER_L)),e===L.Completed&&(this.H=setTimeout(()=>this.timerH(),mt.TIMER_H)),e===L.Confirmed&&(this.I=setTimeout(()=>this.timerI(),mt.TIMER_I)),e===L.Terminated&&this.dispose(),this.setState(e)}startProgressExtensionTimer(){this.progressExtensionTimer===void 0&&(this.progressExtensionTimer=setInterval(()=>{if(this.logger.debug(`Progress extension timer expired for INVITE server transaction ${this.id}.`),!this.lastProvisionalResponse)throw new Error("Last provisional response undefined.");this.send(this.lastProvisionalResponse).catch(e=>{this.logTransportError(e,"Failed to send retransmission of provisional response.")})},mt.PROVISIONAL_RESPONSE_INTERVAL))}stopProgressExtensionTimer(){this.progressExtensionTimer!==void 0&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}timerG(){}timerH(){this.logger.debug(`Timer H expired for INVITE server transaction ${this.id}.`),this.state===L.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(L.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(L.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},Df=class rg extends $f{constructor(t,r,n,s,i){super(r,n,rg.makeId(t),s,i),this._request=t,this.user=n,t.setViaHeader(this.id,r.protocol)}static makeId(t){if(t.method==="CANCEL"){if(!t.branch)throw new Error("Outgoing CANCEL request without a branch.");return t.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}},Ut=class extends Df{constructor(e,t,r){super(e,t,r,L.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),mt.TIMER_F),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),super.dispose()}get kind(){return"nict"}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case L.Trying:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Completed:return;case L.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE client transaction received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Trying&&this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),mt.TIMER_K)),e===L.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===L.Trying||this.state===L.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerK(){this.state===L.Completed&&this.stateTransition(L.Terminated)}},bs=class{constructor(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(e,t){const n=t.getHeaders("record-route").reverse(),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof ir))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.toTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");const h=t.statusCode<200;return{id:l+u+c,early:h,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}static initialDialogStateForUserAgentServer(e,t,r=!1){const s=e.getHeaders("record-route"),i=e.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof ir))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,u=e.callId,c=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:u+c+d,early:r,callId:u,localTag:c,remoteTag:d,localSequenceNumber:l,remoteSequenceNumber:a,localURI:h,remoteURI:p,remoteTarget:o,routeSet:s,secure:!1}}dispose(){this.core.dialogs.delete(this.id)}get id(){return this.dialogState.id}get early(){return this.dialogState.early}get callId(){return this.dialogState.callId}get localTag(){return this.dialogState.localTag}get remoteTag(){return this.dialogState.remoteTag}get localSequenceNumber(){return this.dialogState.localSequenceNumber}get remoteSequenceNumber(){return this.dialogState.remoteSequenceNumber}get localURI(){return this.dialogState.localURI}get remoteURI(){return this.dialogState.remoteURI}get remoteTarget(){return this.dialogState.remoteTarget}get routeSet(){return this.dialogState.routeSet}get secure(){return this.dialogState.secure}get userAgentCore(){return this.core}confirm(){this.dialogState.early=!1}receiveRequest(e){if(e.method!==ve.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}recomputeRouteSet(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}createOutgoingRequestMessage(e,t){const r=this.remoteURI,n=this.remoteTag,s=this.localURI,i=this.localTag,o=this.callId;let a;t&&t.cseq?a=t.cseq:this.dialogState.localSequenceNumber?a=this.dialogState.localSequenceNumber+=1:a=this.dialogState.localSequenceNumber=1;const l=this.remoteTarget,u=this.routeSet,c=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:u},c,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===ve.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},wn=class extends Df{constructor(e,t,r){super(e,t,r,L.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),mt.TIMER_B),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),super.dispose()}get kind(){return"ict"}ackResponse(e){const t=e.toTag;if(!t)throw new Error("To tag undefined.");const r="z9hG4bK"+Math.floor(Math.random()*1e7);e.setViaHeader(r,this.transport.protocol),this.ackRetransmissionCache.set(t,e),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send ACK to 2xx response.")})}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case L.Calling:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Proceeding:if(t>=100&&t<=199){this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Accepted:if(t>=200&&t<=299){if(!this.ackRetransmissionCache.has(e.toTag)){this.ackRetransmissionCache.set(e.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(e);return}const n=this.ackRetransmissionCache.get(e.toTag);if(n){this.send(n.toString()).catch(s=>{this.logTransportError(s,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case L.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
42
+ `,{message:s}}var _l=class extends jn{constructor(e){super(e||"Unspecified transport error.")}},$f=class{constructor(e,t,r,n,s){this._transport=e,this._user=t,this._id=r,this._state=n,this.listeners=new Array,this.logger=t.loggerFactory.getLogger(s,r),this.logger.debug(`Constructing ${this.typeToString()} with id ${this.id}.`)}dispose(){this.logger.debug(`Destroyed ${this.typeToString()} with id ${this.id}.`)}get id(){return this._id}get kind(){throw new Error("Invalid kind.")}get state(){return this._state}get transport(){return this._transport}addStateChangeListener(e,t){const r=()=>{this.removeStateChangeListener(r),e()};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}notifyStateChangeListeners(){this.listeners.slice().forEach(e=>e())}removeStateChangeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}logTransportError(e,t){this.logger.error(e.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(t)}send(e){return this.transport.send(e).catch(t=>{if(t instanceof _l)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new _l(t.message):r=new _l,this.onTransportError(r),r})}setState(e){this.logger.debug(`State change to "${e}" on ${this.typeToString()} with id ${this.id}.`),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}},Pf=class extends $f{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},F;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(F=F||(F={}));var jt=class extends Pf{constructor(e,t,r){super(e,t,r,F.Proceeding,"sip.transaction.ist")}dispose(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),super.dispose()}get kind(){return"ist"}receiveRequest(e){switch(this.state){case F.Proceeding:if(e.method===ge.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case F.Accepted:if(e.method===ge.INVITE)return;break;case F.Completed:if(e.method===ge.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of final response.")});return}if(e.method===ge.ACK){this.stateTransition(F.Confirmed);return}break;case F.Confirmed:if(e.method===ge.INVITE||e.method===ge.ACK)return;break;case F.Terminated:if(e.method===ge.INVITE||e.method===ge.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const t=`INVITE server transaction received unexpected ${e.method} request while in state ${this.state}.`;this.logger.warn(t)}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);switch(this.state){case F.Proceeding:if(e>=100&&e<=199){this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 1xx response.")});return}if(e>=200&&e<=299){this.lastFinalResponse=t,this.stateTransition(F.Accepted),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}if(e>=300&&e<=699){this.lastFinalResponse=t,this.stateTransition(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case F.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case F.Completed:break;case F.Confirmed:break;case F.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}retransmitAcceptedResponse(){this.state===F.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(e=>{this.logTransportError(e,"Failed to send 2xx response.")})}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e)}typeToString(){return"INVITE server transaction"}stateTransition(e){const t=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case F.Proceeding:t();break;case F.Accepted:case F.Completed:this.state!==F.Proceeding&&t();break;case F.Confirmed:this.state!==F.Completed&&t();break;case F.Terminated:this.state!==F.Accepted&&this.state!==F.Completed&&this.state!==F.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===F.Accepted&&(this.L=setTimeout(()=>this.timerL(),wt.TIMER_L)),e===F.Completed&&(this.H=setTimeout(()=>this.timerH(),wt.TIMER_H)),e===F.Confirmed&&(this.I=setTimeout(()=>this.timerI(),wt.TIMER_I)),e===F.Terminated&&this.dispose(),this.setState(e)}startProgressExtensionTimer(){this.progressExtensionTimer===void 0&&(this.progressExtensionTimer=setInterval(()=>{if(this.logger.debug(`Progress extension timer expired for INVITE server transaction ${this.id}.`),!this.lastProvisionalResponse)throw new Error("Last provisional response undefined.");this.send(this.lastProvisionalResponse).catch(e=>{this.logTransportError(e,"Failed to send retransmission of provisional response.")})},wt.PROVISIONAL_RESPONSE_INTERVAL))}stopProgressExtensionTimer(){this.progressExtensionTimer!==void 0&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}timerG(){}timerH(){this.logger.debug(`Timer H expired for INVITE server transaction ${this.id}.`),this.state===F.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(F.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(F.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===F.Accepted&&this.stateTransition(F.Terminated)}},Df=class rg extends $f{constructor(t,r,n,s,i){super(r,n,rg.makeId(t),s,i),this._request=t,this.user=n,t.setViaHeader(this.id,r.protocol)}static makeId(t){if(t.method==="CANCEL"){if(!t.branch)throw new Error("Outgoing CANCEL request without a branch.");return t.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}},Kt=class extends Df{constructor(e,t,r){super(e,t,r,F.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),wt.TIMER_F),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),super.dispose()}get kind(){return"nict"}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case F.Trying:if(t>=100&&t<=199){this.stateTransition(F.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(F.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(F.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Completed:return;case F.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE client transaction received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(F.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case F.Trying:r();break;case F.Proceeding:this.state!==F.Trying&&r();break;case F.Completed:this.state!==F.Trying&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Trying&&this.state!==F.Proceeding&&this.state!==F.Completed&&(t||r());break;default:r()}e===F.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),wt.TIMER_K)),e===F.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===F.Trying||this.state===F.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(F.Terminated))}timerK(){this.state===F.Completed&&this.stateTransition(F.Terminated)}},_s=class{constructor(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(e,t){const n=t.getHeaders("record-route").reverse(),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof ar))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.toTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");const h=t.statusCode<200;return{id:l+u+c,early:h,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}static initialDialogStateForUserAgentServer(e,t,r=!1){const s=e.getHeaders("record-route"),i=e.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof ar))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,u=e.callId,c=t,d=e.fromTag,p=e.from.uri,h=e.to.uri;return{id:u+c+d,early:r,callId:u,localTag:c,remoteTag:d,localSequenceNumber:l,remoteSequenceNumber:a,localURI:h,remoteURI:p,remoteTarget:o,routeSet:s,secure:!1}}dispose(){this.core.dialogs.delete(this.id)}get id(){return this.dialogState.id}get early(){return this.dialogState.early}get callId(){return this.dialogState.callId}get localTag(){return this.dialogState.localTag}get remoteTag(){return this.dialogState.remoteTag}get localSequenceNumber(){return this.dialogState.localSequenceNumber}get remoteSequenceNumber(){return this.dialogState.remoteSequenceNumber}get localURI(){return this.dialogState.localURI}get remoteURI(){return this.dialogState.remoteURI}get remoteTarget(){return this.dialogState.remoteTarget}get routeSet(){return this.dialogState.routeSet}get secure(){return this.dialogState.secure}get userAgentCore(){return this.core}confirm(){this.dialogState.early=!1}receiveRequest(e){if(e.method!==ge.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}recomputeRouteSet(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}createOutgoingRequestMessage(e,t){const r=this.remoteURI,n=this.remoteTag,s=this.localURI,i=this.localTag,o=this.callId;let a;t&&t.cseq?a=t.cseq:this.dialogState.localSequenceNumber?a=this.dialogState.localSequenceNumber+=1:a=this.dialogState.localSequenceNumber=1;const l=this.remoteTarget,u=this.routeSet,c=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:u},c,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===ge.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},wn=class extends Df{constructor(e,t,r){super(e,t,r,F.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),wt.TIMER_B),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),super.dispose()}get kind(){return"ict"}ackResponse(e){const t=e.toTag;if(!t)throw new Error("To tag undefined.");const r="z9hG4bK"+Math.floor(Math.random()*1e7);e.setViaHeader(r,this.transport.protocol),this.ackRetransmissionCache.set(t,e),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send ACK to 2xx response.")})}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case F.Calling:if(t>=100&&t<=199){this.stateTransition(F.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(F.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(F.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Proceeding:if(t>=100&&t<=199){this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(F.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(F.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case F.Accepted:if(t>=200&&t<=299){if(!this.ackRetransmissionCache.has(e.toTag)){this.ackRetransmissionCache.set(e.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(e);return}const n=this.ackRetransmissionCache.get(e.toTag);if(n){this.send(n.toString()).catch(s=>{this.logTransportError(s,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case F.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case F.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(F.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
43
43
  `;a&&(l+=`Route: ${a}\r
44
44
  `),l+=`Via: ${o}\r
45
45
  `,l+=`To: ${i}\r
@@ -49,31 +49,31 @@
49
49
  `,l+=`Max-Forwards: 70\r
50
50
  `,l+=`Content-Length: 0\r
51
51
  \r
52
- `,this.send(l).catch(u=>{this.logTransportError(u,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Calling:r();break;case L.Proceeding:this.state!==L.Calling&&r();break;case L.Accepted:case L.Completed:this.state!==L.Calling&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Calling&&this.state!==L.Accepted&&this.state!==L.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),L.Proceeding,e===L.Completed&&(this.D=setTimeout(()=>this.timerD(),mt.TIMER_D)),e===L.Accepted&&(this.M=setTimeout(()=>this.timerM(),mt.TIMER_M)),e===L.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===L.Calling&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},zt=class Ec{constructor(t,r,n,s){this.transactionConstructor=t,this.core=r,this.message=n,this.delegate=s,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}cancel(t,r={}){if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");const n=this.core.makeOutgoingRequestMessage(ve.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);return n.branch=this.message.branch,this.message.headers.Route&&(n.headers.Route=this.message.headers.Route),t&&n.setHeader("Reason",t),this.transaction.state===L.Proceeding?new Ec(Ut,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===L.Proceeding&&new Ec(Ut,this.core,n)},{once:!0}),n}authenticationGuard(t,r){const n=t.statusCode;if(!n)throw new Error("Response status code undefined.");if(n!==401&&n!==407)return!0;let s,i;if(n===401?(s=t.parseHeader("www-authenticate"),i="authorization"):(s=t.parseHeader("proxy-authenticate"),i="proxy-authorization"),!s)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||s.stale!==!0))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,s))return!0;this.challenged=!0,s.stale&&(this.stale=!0);let o=this.message.cseq+=1;return r&&r.localSequenceNumber&&(r.incrementLocalSequenceNumber(),o=this.message.cseq=r.localSequenceNumber),this.message.setHeader("cseq",o+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const t=new pn;t.statusCode=408,t.reasonPhrase="Request Timeout",this.receiveResponse(t)}onTransportError(t){this.logger.error(t.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const r=new pn;r.statusCode=503,r.reasonPhrase="Service Unavailable",this.receiveResponse(r)}receiveResponse(t){if(!this.authenticationGuard(t))return;const r=t.statusCode?t.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:t});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:t});break;case/^2[0-9]{2}$/.test(r):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:t});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:t});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:t});break;default:throw new Error(`Invalid status code ${r}`)}}init(){const t={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:s=>{s===L.Terminated&&(this.core.userAgentClients.delete(n),r===this._transaction&&this.dispose())},onTransportError:s=>this.onTransportError(s),receiveResponse:s=>this.receiveResponse(s)},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;const n=r.id+r.request.method;this.core.userAgentClients.set(n,this)}},O0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.BYE,r);super(Ut,e.userAgentCore,n,t),e.dispose()}},Kt=class extends Pf{constructor(e,t,r){super(e,t,r,L.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(e){switch(this.state){case L.Trying:break;case L.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of provisional response.")});break;case L.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of final response.")});break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case L.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(L.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Completed:return;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.J=setTimeout(()=>this.timerJ(),mt.TIMER_J)),e===L.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}},Ar=class{constructor(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:yo(),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<200||t>299)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<101||t>199)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}redirect(e,t={statusCode:302}){if(!this.redirectable)throw new hn(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const r=t.statusCode;if(r<300||r>399)throw new TypeError(`Invalid statusCode: ${r}`);const n=new Array;return e.forEach(s=>n.push(`Contact: ${s.toString()}`)),t.extraHeaders=(t.extraHeaders||[]).concat(n),this.reply(t)}reject(e={statusCode:480}){if(!this.rejectable)throw new hn(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<400||t>699)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}trying(e){if(!this.tryingable)throw new hn(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}get acceptable(){if(this.transaction instanceof Ft)return this.transaction.state===L.Proceeding||this.transaction.state===L.Accepted;if(this.transaction instanceof Kt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Ft)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Kt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Ft)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Kt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Ft)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Kt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Ft)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Kt)return this.transaction.state===L.Trying;throw new Error("Unknown transaction type.")}reply(e){!e.toTag&&e.statusCode!==100&&(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;const t=kf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===L.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},H0=class extends Ar{constructor(e,t,r){super(Kt,e.userAgentCore,t,r)}},M0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INFO,r);super(Ut,e.userAgentCore,n,t)}},N0=class extends Ar{constructor(e,t,r){super(Kt,e.userAgentCore,t,r)}},Of=class extends zt{constructor(e,t,r){super(Ut,e,t,r)}},Hf=class extends Ar{constructor(e,t,r){super(Kt,e,t,r)}},q0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.NOTIFY,r);super(Ut,e.userAgentCore,n,t)}};function B0(e){return e.userAgentCore!==void 0}var Co=class extends Ar{constructor(e,t,r){const n=B0(e)?e.userAgentCore:e;super(Kt,n,t,r)}},L0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.PRACK,r);super(Ut,e.userAgentCore,n,t),e.signalingStateTransition(n)}},F0=class extends Ar{constructor(e,t,r){super(Kt,e.userAgentCore,t,r),e.signalingStateTransition(t),this.dialog=e}accept(e={statusCode:200}){return e.body&&this.dialog.signalingStateTransition(e.body),super.accept(e)}},V0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.INVITE,r);super(wn,e.userAgentCore,n,t),this.delegate=t,e.signalingStateTransition(n),e.reinviteUserAgentClient=this,this.dialog=e}receiveResponse(e){if(!this.authenticationGuard(e,this.dialog))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:r=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(t):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:r=>this.dialog.ack(r)});break;case/^3[0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error(`Invalid status code ${t}`)}}},j0=class extends Ar{constructor(e,t,r){super(Ft,e.userAgentCore,t,r),e.reinviteUserAgentServer=this,this.dialog=e}accept(e={statusCode:200}){e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map(s=>`Record-Route: ${s}`));const t=super.accept(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),n}progress(e={statusCode:180}){const t=super.progress(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),n}redirect(e,t={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(e={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(e)}},U0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.REFER,r);super(Ut,e.userAgentCore,n,t)}};function z0(e){return e.userAgentCore!==void 0}var Mf=class extends Ar{constructor(e,t,r){const n=z0(e)?e.userAgentCore:e;super(Kt,n,t,r)}},xo=class extends bs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=he.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Ft&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(e.request),this.logger=t.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=he.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?or.Early:this.ackWait?or.AckWait:this._signalingState===he.Closed?or.Terminated:or.Confirmed}get signalingState(){return this._signalingState}get offer(){return this._offer}get answer(){return this._answer}confirm(){this.early&&this.start2xxRetransmissionTimer(),super.confirm()}reConfirm(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}ack(e={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let t;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof wn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(ve.ACK,{cseq:t.request.cseq,extraHeaders:e.extraHeaders,body:e.body});return t.ackResponse(r),this.signalingStateTransition(r),{message:r}}bye(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof Ft){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==L.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new O0(this,e,t)}info(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new M0(this,e,t)}invite(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INVITE request`),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new V0(this,e,t)}message(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const r=this.createOutgoingRequestMessage(ve.MESSAGE,t);return new Of(this.core,r,e)}notify(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new q0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new L0(this,e,t)}refer(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new U0(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===ve.ACK){if(this.ackWait){if(this.initialTransaction instanceof wn){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(e),this.delegate&&this.delegate.onAck){const t=this.delegate.onAck({message:e});t instanceof Promise&&(this.ackProcessing=!0,t.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(e)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${e.method} request.`);return}if(super.receiveRequest(e),e.method===ve.INVITE){const t=()=>{const n=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${n}`);let s="RFC 5407 suggests the following to avoid this race condition... ";s+=" Note: Implementation issues are outside the scope of this document,",s+=" but the following tip is provided for avoiding race conditions of",s+=" this type. The caller can delay sending re-INVITE F6 for some period",s+=" of time (2 seconds, perhaps), after which the caller can reasonably",s+=" assume that its ACK has been received. Implementors can decouple the",s+=" actions of the user (e.g., pressing the hold button) from the actions",s+=" of the protocol (the sending of re-INVITE F6), so that the UA can",s+=" behave like this. In this case, it is the implementor's choice as to",s+=" how long to wait. In most cases, such an implementation may be",s+=" useful to prevent the type of race condition shown in this section.",s+=" This document expresses no preference about whether or not they",s+=" should wait for an ACK to be delivered. After considering the impact",s+=" on user experience, implementors should decide whether or not to wait",s+=" for a while, because the user experience depends on the",s+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(s)},r=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.ackWait&&this.signalingState!==he.Stable){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.reinviteUserAgentServer){this.core.replyStateless(e,{statusCode:500,extraHeaders:r});return}if(this.reinviteUserAgentClient){this.core.replyStateless(e,{statusCode:491});return}}if(e.method===ve.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof ir))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case ve.BYE:{const t=new H0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case ve.INFO:{const t=new N0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case ve.INVITE:{const t=new j0(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case ve.MESSAGE:{const t=new Hf(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new Co(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case ve.PRACK:{const t=new F0(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case ve.REFER:{const t=new Mf(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(t):t.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}reliableSequenceGuard(e){const t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){const r=e.getHeader("require"),n=e.getHeader("rseq"),s=r&&r.includes("100rel")&&n?Number(n):void 0;if(s){if(this.rseq&&this.rseq+1!==s)return!1;this.rseq=this.rseq?this.rseq+1:s}}return!0}signalingStateRollback(){(this._signalingState===he.HaveLocalOffer||this.signalingState===he.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=he.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=fi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===he.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof ws)switch(this._signalingState){case he.Initial:case he.Stable:this._signalingState=he.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case he.HaveLocalOffer:this._signalingState=he.Stable,this._answer=t;break;case he.HaveRemoteOffer:break;case he.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof pn)switch(this._signalingState){case he.Initial:case he.Stable:this._signalingState=he.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case he.HaveLocalOffer:this._signalingState=he.Stable,this._answer=t;break;case he.HaveRemoteOffer:break;case he.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof vl)switch(this._signalingState){case he.Initial:case he.Stable:this._signalingState=he.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case he.HaveLocalOffer:break;case he.HaveRemoteOffer:this._signalingState=he.Stable,this._answer=t;break;case he.Closed:break;default:throw new Error("Unexpected signaling state.")}if(Af(e))switch(this._signalingState){case he.Initial:case he.Stable:this._signalingState=he.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case he.HaveLocalOffer:break;case he.HaveRemoteOffer:this._signalingState=he.Stable,this._answer=t;break;case he.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Ft){const e=this.initialTransaction;let t=mt.T1;const r=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,mt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};e.addStateChangeListener(n)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof Ft){const e=this.reinviteUserAgentServer.transaction;let t=mt.T1;const r=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,mt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},K0=class extends zt{constructor(e,t,r){super(wn,e,t,r),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=r}dispose(){this.earlyDialogs.forEach(e=>e.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(e){if(this.transaction.state===L.Calling)return super.onTransportError(e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(e){if(!this.authenticationGuard(e))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});return;case/^1[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const r=bs.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new xo(i,this.core,r),this.earlyDialogs.set(n.id,n)}if(!n.reliableSequenceGuard(e)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(n.signalingState===he.Initial||n.signalingState===he.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:s,prack:i=>s.prack(void 0,i)})}return;case/^2[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const r=bs.initialDialogStateForUserAgentClient(this.message,e);let n=this.confirmedDialogs.get(r.id);if(n){const i=this.confirmedDialogAcks.get(r.id);if(i){const o=this.transaction;if(!(o instanceof wn))throw new Error("Client transaction not instance of InviteClientTransaction.");o.ackResponse(i.message)}return}if(n=this.earlyDialogs.get(r.id),n)n.confirm(),n.recomputeRouteSet(e),this.earlyDialogs.delete(n.id),this.confirmedDialogs.set(n.id,n);else{const i=this.transaction;if(!(i instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new xo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===he.Initial||n.signalingState===he.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:s,ack:i=>{const o=s.ack(i);return this.confirmedDialogAcks.set(s.id,o),o}});else{const i=s.ack();this.confirmedDialogAcks.set(s.id,i)}}return;case/^3[0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});return;case/^[4-6][0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});return;default:throw new Error(`Invalid status code ${t}`)}throw new Error(`Executing what should be an unreachable code path receiving ${t} response.`)}},Sl=class extends Ar{constructor(e,t,r){super(Ft,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{const a=this.transaction;if(!(a instanceof Ft))throw new Error("Transaction not instance of InviteClientTransaction.");const l=bs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new xo(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+gn.toString();if(!e.body){if(this.confirmedDialog.signalingState===he.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===he.Initial||this.confirmedDialog.signalingState===he.HaveRemoteOffer)throw new Error("Response must have a body.")}e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(n),e.extraHeaders.push(r);const s=super.accept(e),i=this.confirmedDialog,o=Object.assign(Object.assign({},s),{session:i});return e.body&&this.confirmedDialog.signalingState!==he.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Ft))throw new Error("Transaction not instance of InviteClientTransaction.");const a=bs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new xo(o,this.core,a)}const t=this.message.getHeaders("record-route").map(o=>`Record-Route: ${o}`),r=`Contact: ${this.core.configuration.contact}`;e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(r);const n=super.progress(e),s=this.earlyDialog,i=Object.assign(Object.assign({},n),{session:s});return e.body&&this.earlyDialog.signalingState!==he.Stable&&this.earlyDialog.signalingStateTransition(e.body),i}redirect(e,t={statusCode:302}){return super.redirect(e,t)}reject(e={statusCode:486}){return super.reject(e)}},W0=class extends zt{constructor(e,t,r){super(Ut,e,t,r)}},G0=class extends zt{constructor(e,t,r){super(Ut,e,t,r)}},J0=class extends Ar{constructor(e,t,r){super(Kt,e,t,r),this.core=e}},Y0=class extends zt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ve.SUBSCRIBE,r);super(Ut,e.userAgentCore,n,t),this.dialog=e}waitNotifyStop(){}receiveResponse(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);this.dialog.subscriptionExpires>r&&(this.dialog.subscriptionExpires=r)}}e.statusCode&&e.statusCode>=400&&e.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(e.statusCode)&&this.dialog.terminate(),super.receiveResponse(e)}},Nf=class extends bs{constructor(e,t,r,n,s,i){super(n,s),this.delegate=i,this._autoRefresh=!1,this._subscriptionEvent=e,this._subscriptionExpires=t,this._subscriptionExpiresInitial=t,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=r,this.logger=n.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(e,t){const n=t.getHeaders("record-route"),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof ir))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;return{id:l+u+c,early:!1,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}dispose(){super.dispose(),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log(`SUBSCRIBE dialog ${this.id} destroyed`)}get autoRefresh(){return this._autoRefresh}set autoRefresh(e){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)}set subscriptionExpires(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const t=this.subscriptionRefresh;(t===void 0||t>=e)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(e){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${e.method} request`),!this.sequenceGuard(e)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${e.method} request.`);return}super.receiveRequest(e),e.method===ve.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+gn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==je.Pending&&this.subscriptionState!==je.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Y0(this,e,t);return this.N&&(clearTimeout(this.N),this.N=void 0),!((r=t.extraHeaders)===null||r===void 0)&&r.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),mt.TIMER_N)),n}terminate(){this.stateTransition(je.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+gn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(je.Pending,s);break;case"active":this.stateTransition(je.Active,s);break;case"terminated":this.stateTransition(je.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Co(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case je.Initial:r();return;case je.NotifyWait:r();return;case je.Pending:if(this.subscriptionState!==je.NotifyWait&&this.subscriptionState!==je.Pending){r();return}break;case je.Active:if(this.subscriptionState!==je.NotifyWait&&this.subscriptionState!==je.Pending&&this.subscriptionState!==je.Active){r();return}break;case je.Terminated:if(this.subscriptionState!==je.NotifyWait&&this.subscriptionState!==je.Pending&&this.subscriptionState!==je.Active){r();return}break;default:r();return}e===je.Pending&&t&&(this.subscriptionExpires=t),e===je.Active&&t&&(this.subscriptionExpires=t),e===je.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==je.Terminated&&(this.stateTransition(je.Terminated),this.onTerminated())}},Z0=class extends zt{constructor(e,t,r){const n=t.getHeader("Event");if(!n)throw new Error("Event undefined");const s=t.getHeader("Expires");if(!s)throw new Error("Expires undefined");super(Ut,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=je.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=je.Pending;break;case"active":this.subscriptionState=je.Active;break;case"terminated":this.subscriptionState=je.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==je.Terminated){const s=Nf.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Nf(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){const s=e,i=this.dialog;this.delegate.onNotify({request:s,subscription:i})}else e.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),mt.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);r>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),r<this.subscriptionExpires&&(this.subscriptionExpires=r)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(e)}}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}},X0=class extends Ar{constructor(e,t,r){super(Kt,e,t,r),this.core=e}},qf=["application/sdp","application/dtmf-relay"],Q0=class{constructor(e,t={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(e=>e.dispose()),this.dialogs.clear(),this.subscribers.forEach(e=>e.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(e=>e.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(e=>e.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}invite(e,t){return new K0(this,e,t)}message(e,t){return new Of(this,e,t)}publish(e,t){return new W0(this,e,t)}register(e,t){return new G0(this,e,t)}subscribe(e,t){return new Z0(this,e,t)}request(e,t){return new zt(Ut,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,u=this.configuration.viaForceRport,c=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===ve.REGISTER&&d.push("path","gruu"),e===ve.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:u,fromDisplayName:l,hackViaTcp:c,optionTags:d,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost};return new vl(e,t,r,n,Object.assign(Object.assign({},p),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=kf(e,t);return this.transport.send(s.message).catch(i=>{i instanceof Error&&this.logger.error(i.message),this.logger.error(`Transport error occurred sending stateless reply to ${e.method} request.`)}),s}receiveRequestFromTransport(e){const t=e.viaBranch,r=this.userAgentServers.get(t);if(e.method===ve.ACK&&r&&r.transaction.state===L.Accepted&&r instanceof Sl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===ve.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Ft&&r.transaction.state===L.Proceeding&&r instanceof Sl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!gn.includes(e.method)){const n="Allow: "+gn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==ve.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===ve.INVITE&&!e.hasHeader("Contact")){this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!e.toTag){const n=e.viaBranch;if(!this.userAgentServers.has(n)&&Array.from(this.userAgentServers.values()).some(s=>s.transaction.request.fromTag===e.fromTag&&s.transaction.request.callId===e.callId&&s.transaction.request.cseq===e.cseq)){this.replyStateless(e,{statusCode:482});return}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}receiveInsideDialogRequest(e){if(e.method===ve.NOTIFY){const n=e.parseHeader("Event");if(!n||!n.event){this.replyStateless(e,{statusCode:489});return}const s=e.callId+e.toTag+n.event,i=this.subscribers.get(s);if(i){const o=new Co(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===ve.OPTIONS){const n="Allow: "+gn.toString(),s="Accept: "+qf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==ve.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case ve.ACK:break;case ve.BYE:this.replyStateless(e,{statusCode:481});break;case ve.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case ve.INFO:this.replyStateless(e,{statusCode:405});break;case ve.INVITE:{const t=new Sl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case ve.MESSAGE:{const t=new Hf(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ve.NOTIFY:{const t=new Co(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case ve.OPTIONS:{const t="Allow: "+gn.toString(),r="Accept: "+qf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case ve.REFER:{const t=new Mf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case ve.REGISTER:{const t=new J0(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case ve.SUBSCRIBE:{const t=new X0(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${e.method}.`)}}receiveResponseFromTransport(e){if(e.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn(`Discarding unmatched ${e.statusCode} response to ${e.method} ${t}.`)}};function ew(){return e=>!e.audio&&!e.video?Promise.resolve(new MediaStream):navigator.mediaDevices===void 0?Promise.reject(new Error("Media devices not available in insecure contexts.")):navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices,e)}function tw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var rw=class kn{constructor(t,r,n){t.debug("SessionDescriptionHandler.constructor"),this.logger=t,this.mediaStreamFactory=r,this.sessionDescriptionHandlerConfiguration=n,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(n?.peerConnectionConfiguration),this.initPeerConnectionEventHandlers()}get localMediaStream(){return this._localMediaStream}get remoteMediaStream(){return this._remoteMediaStream}get dataChannel(){return this._dataChannel}get peerConnection(){return this._peerConnection}get peerConnectionDelegate(){return this._peerConnectionDelegate}set peerConnectionDelegate(t){this._peerConnectionDelegate=t}static dispatchAddTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:r}))}static dispatchRemoveTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:r}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(t=>{t.track&&t.track.stop()}),this._peerConnection.getSenders().forEach(t=>{t.track&&t.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getReceivers().forEach(n=>{n.track&&(n.track.enabled=t)})}enableSenderTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getSenders().forEach(n=>{n.track&&(n.track.enabled=t)})}getDescription(t,r){var n,s;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=t?.onDataChannel;const i=(n=t?.offerOptions)===null||n===void 0?void 0:n.iceRestart,o=t?.iceGatheringTimeout===void 0?(s=this.sessionDescriptionHandlerConfiguration)===null||s===void 0?void 0:s.iceGatheringTimeout:t?.iceGatheringTimeout;return this.getLocalMediaStream(t).then(()=>this.updateDirection(t)).then(()=>this.createDataChannel(t)).then(()=>this.createLocalOfferOrAnswer(t)).then(a=>this.applyModifiers(a,r)).then(a=>this.setLocalSessionDescription(a)).then(()=>this.waitForIceGatheringComplete(i,o)).then(()=>this.getLocalSessionDescription()).then(a=>({body:a.sdp,contentType:"application/sdp"})).catch(a=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+a),a})}hasDescription(t){return this.logger.debug("SessionDescriptionHandler.hasDescription"),t==="application/sdp"}iceGatheringComplete(){this.logger.debug("SessionDescriptionHandler.iceGatheringComplete"),this.iceGatheringCompleteTimeoutId!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - clearing timeout"),clearTimeout(this.iceGatheringCompleteTimeoutId),this.iceGatheringCompleteTimeoutId=void 0),this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - resolving promise"),this.iceGatheringCompleteResolve&&this.iceGatheringCompleteResolve(),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0)}sendDtmf(t,r){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const n=this._peerConnection.getSenders();if(n.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const s=n[0].dtmf;if(!s)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const i=r?.duration,o=r?.interToneGap;try{s.insertDTMF(t,i,o)}catch(a){return this.logger.error(a.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+t.toString()),!0}setDescription(t,r,n){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r?.onDataChannel;const s=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(r).then(()=>this.applyModifiers({sdp:t,type:s},n)).then(i=>this.setRemoteSessionDescription(i)).catch(i=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+i),i})}applyModifiers(t,r){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!r||r.length===0?Promise.resolve(t):r.reduce((n,s)=>n.then(s),Promise.resolve(t)).then(n=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!n.sdp||!n.type)throw new Error("Invalid SDP.");return{sdp:n.sdp,type:n.type}})}createDataChannel(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if(t?.dataChannel!==!0||this._dataChannel)return Promise.resolve();switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.createDataChannel - creating data channel");try{return this._dataChannel=this._peerConnection.createDataChannel(t?.dataChannelLabel||"",t?.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(r){return Promise.reject(r)}case"have-remote-offer":return Promise.resolve();default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP offer"),this._peerConnection.createOffer(t?.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(t?.answerOptions);default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let r=Object.assign({},t?.constraints);if(this.localMediaStreamConstraints){if(r.audio=r.audio||this.localMediaStreamConstraints.audio,r.video=r.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(r.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(r.video))return Promise.resolve()}else r.audio===void 0&&r.video===void 0&&(r={audio:!0});return this.localMediaStreamConstraints=r,this.mediaStreamFactory(r,this,t).then(n=>this.setLocalMediaStream(n))}setLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection,n=this._localMediaStream,s=[],i=l=>{const u=l.kind;if(u!=="audio"&&u!=="video")throw new Error(`Unknown new track kind ${u}.`);const c=r.getSenders().find(d=>d.track&&d.track.kind===u);c?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${u} track`),d()}).then(()=>c.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===u);d&&(d.stop(),n.removeTrack(d),kn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),kn.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${u} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${u} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${u} track`),d}n.addTrack(l),kn.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,u)=>l.then(()=>u),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const t=this._peerConnection.localDescription;return t?Promise.resolve(t):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(t){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(t)}setRemoteSessionDescription(t){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=t.sdp;let n;switch(this._peerConnection.signalingState){case"stable":n="offer";break;case"have-local-offer":n="answer";break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return r?this._peerConnection.setRemoteDescription({sdp:r,type:n}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(t){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const r=this._remoteMediaStream;r.getTrackById(t.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${t.kind} track`):t.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getAudioTracks().forEach(n=>{n.stop(),r.removeTrack(n),kn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),kn.dispatchAddTrackEvent(r,t)):t.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getVideoTracks().forEach(n=>{n.stop(),r.removeTrack(n),kn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),kn.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
52
+ `,this.send(l).catch(u=>{this.logTransportError(u,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case F.Calling:r();break;case F.Proceeding:this.state!==F.Calling&&r();break;case F.Accepted:case F.Completed:this.state!==F.Calling&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Calling&&this.state!==F.Accepted&&this.state!==F.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),F.Proceeding,e===F.Completed&&(this.D=setTimeout(()=>this.timerD(),wt.TIMER_D)),e===F.Accepted&&(this.M=setTimeout(()=>this.timerM(),wt.TIMER_M)),e===F.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===F.Calling&&(this.onRequestTimeout(),this.stateTransition(F.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===F.Completed&&this.stateTransition(F.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===F.Accepted&&this.stateTransition(F.Terminated)}},Wt=class Ec{constructor(t,r,n,s){this.transactionConstructor=t,this.core=r,this.message=n,this.delegate=s,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}cancel(t,r={}){if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");const n=this.core.makeOutgoingRequestMessage(ge.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);return n.branch=this.message.branch,this.message.headers.Route&&(n.headers.Route=this.message.headers.Route),t&&n.setHeader("Reason",t),this.transaction.state===F.Proceeding?new Ec(Kt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===F.Proceeding&&new Ec(Kt,this.core,n)},{once:!0}),n}authenticationGuard(t,r){const n=t.statusCode;if(!n)throw new Error("Response status code undefined.");if(n!==401&&n!==407)return!0;let s,i;if(n===401?(s=t.parseHeader("www-authenticate"),i="authorization"):(s=t.parseHeader("proxy-authenticate"),i="proxy-authorization"),!s)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||s.stale!==!0))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,s))return!0;this.challenged=!0,s.stale&&(this.stale=!0);let o=this.message.cseq+=1;return r&&r.localSequenceNumber&&(r.incrementLocalSequenceNumber(),o=this.message.cseq=r.localSequenceNumber),this.message.setHeader("cseq",o+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const t=new pn;t.statusCode=408,t.reasonPhrase="Request Timeout",this.receiveResponse(t)}onTransportError(t){this.logger.error(t.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const r=new pn;r.statusCode=503,r.reasonPhrase="Service Unavailable",this.receiveResponse(r)}receiveResponse(t){if(!this.authenticationGuard(t))return;const r=t.statusCode?t.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:t});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:t});break;case/^2[0-9]{2}$/.test(r):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:t});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:t});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:t});break;default:throw new Error(`Invalid status code ${r}`)}}init(){const t={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:s=>{s===F.Terminated&&(this.core.userAgentClients.delete(n),r===this._transaction&&this.dispose())},onTransportError:s=>this.onTransportError(s),receiveResponse:s=>this.receiveResponse(s)},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;const n=r.id+r.request.method;this.core.userAgentClients.set(n,this)}},O0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.BYE,r);super(Kt,e.userAgentCore,n,t),e.dispose()}},Gt=class extends Pf{constructor(e,t,r){super(e,t,r,F.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(e){switch(this.state){case F.Trying:break;case F.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of provisional response.")});break;case F.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of final response.")});break;case F.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case F.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(F.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case F.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(F.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case F.Completed:return;case F.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(F.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case F.Trying:r();break;case F.Proceeding:this.state!==F.Trying&&r();break;case F.Completed:this.state!==F.Trying&&this.state!==F.Proceeding&&r();break;case F.Terminated:this.state!==F.Proceeding&&this.state!==F.Completed&&(t||r());break;default:r()}e===F.Completed&&(this.J=setTimeout(()=>this.timerJ(),wt.TIMER_J)),e===F.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===F.Completed&&this.stateTransition(F.Terminated)}},Ir=class{constructor(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:yo(),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<200||t>299)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<101||t>199)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}redirect(e,t={statusCode:302}){if(!this.redirectable)throw new hn(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const r=t.statusCode;if(r<300||r>399)throw new TypeError(`Invalid statusCode: ${r}`);const n=new Array;return e.forEach(s=>n.push(`Contact: ${s.toString()}`)),t.extraHeaders=(t.extraHeaders||[]).concat(n),this.reply(t)}reject(e={statusCode:480}){if(!this.rejectable)throw new hn(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<400||t>699)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}trying(e){if(!this.tryingable)throw new hn(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}get acceptable(){if(this.transaction instanceof jt)return this.transaction.state===F.Proceeding||this.transaction.state===F.Accepted;if(this.transaction instanceof Gt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof jt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof Gt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof jt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof Gt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof jt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof Gt)return this.transaction.state===F.Trying||this.transaction.state===F.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof jt)return this.transaction.state===F.Proceeding;if(this.transaction instanceof Gt)return this.transaction.state===F.Trying;throw new Error("Unknown transaction type.")}reply(e){!e.toTag&&e.statusCode!==100&&(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;const t=kf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===F.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},H0=class extends Ir{constructor(e,t,r){super(Gt,e.userAgentCore,t,r)}},M0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.INFO,r);super(Kt,e.userAgentCore,n,t)}},N0=class extends Ir{constructor(e,t,r){super(Gt,e.userAgentCore,t,r)}},Of=class extends Wt{constructor(e,t,r){super(Kt,e,t,r)}},Hf=class extends Ir{constructor(e,t,r){super(Gt,e,t,r)}},q0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.NOTIFY,r);super(Kt,e.userAgentCore,n,t)}};function B0(e){return e.userAgentCore!==void 0}var Co=class extends Ir{constructor(e,t,r){const n=B0(e)?e.userAgentCore:e;super(Gt,n,t,r)}},L0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.PRACK,r);super(Kt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},F0=class extends Ir{constructor(e,t,r){super(Gt,e.userAgentCore,t,r),e.signalingStateTransition(t),this.dialog=e}accept(e={statusCode:200}){return e.body&&this.dialog.signalingStateTransition(e.body),super.accept(e)}},V0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.INVITE,r);super(wn,e.userAgentCore,n,t),this.delegate=t,e.signalingStateTransition(n),e.reinviteUserAgentClient=this,this.dialog=e}receiveResponse(e){if(!this.authenticationGuard(e,this.dialog))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:r=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(t):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:r=>this.dialog.ack(r)});break;case/^3[0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error(`Invalid status code ${t}`)}}},j0=class extends Ir{constructor(e,t,r){super(jt,e.userAgentCore,t,r),e.reinviteUserAgentServer=this,this.dialog=e}accept(e={statusCode:200}){e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map(s=>`Record-Route: ${s}`));const t=super.accept(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),n}progress(e={statusCode:180}){const t=super.progress(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),n}redirect(e,t={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(e={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(e)}},U0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.REFER,r);super(Kt,e.userAgentCore,n,t)}};function z0(e){return e.userAgentCore!==void 0}var Mf=class extends Ir{constructor(e,t,r){const n=z0(e)?e.userAgentCore:e;super(Gt,n,t,r)}},xo=class extends _s{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=pe.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof jt&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(e.request),this.logger=t.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=pe.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?lr.Early:this.ackWait?lr.AckWait:this._signalingState===pe.Closed?lr.Terminated:lr.Confirmed}get signalingState(){return this._signalingState}get offer(){return this._offer}get answer(){return this._answer}confirm(){this.early&&this.start2xxRetransmissionTimer(),super.confirm()}reConfirm(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}ack(e={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let t;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof wn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(ge.ACK,{cseq:t.request.cseq,extraHeaders:e.extraHeaders,body:e.body});return t.ackResponse(r),this.signalingStateTransition(r),{message:r}}bye(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof jt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==F.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new O0(this,e,t)}info(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new M0(this,e,t)}invite(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INVITE request`),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new V0(this,e,t)}message(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const r=this.createOutgoingRequestMessage(ge.MESSAGE,t);return new Of(this.core,r,e)}notify(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new q0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new L0(this,e,t)}refer(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new U0(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===ge.ACK){if(this.ackWait){if(this.initialTransaction instanceof wn){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(e),this.delegate&&this.delegate.onAck){const t=this.delegate.onAck({message:e});t instanceof Promise&&(this.ackProcessing=!0,t.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(e)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${e.method} request.`);return}if(super.receiveRequest(e),e.method===ge.INVITE){const t=()=>{const n=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${n}`);let s="RFC 5407 suggests the following to avoid this race condition... ";s+=" Note: Implementation issues are outside the scope of this document,",s+=" but the following tip is provided for avoiding race conditions of",s+=" this type. The caller can delay sending re-INVITE F6 for some period",s+=" of time (2 seconds, perhaps), after which the caller can reasonably",s+=" assume that its ACK has been received. Implementors can decouple the",s+=" actions of the user (e.g., pressing the hold button) from the actions",s+=" of the protocol (the sending of re-INVITE F6), so that the UA can",s+=" behave like this. In this case, it is the implementor's choice as to",s+=" how long to wait. In most cases, such an implementation may be",s+=" useful to prevent the type of race condition shown in this section.",s+=" This document expresses no preference about whether or not they",s+=" should wait for an ACK to be delivered. After considering the impact",s+=" on user experience, implementors should decide whether or not to wait",s+=" for a while, because the user experience depends on the",s+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(s)},r=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.ackWait&&this.signalingState!==pe.Stable){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.reinviteUserAgentServer){this.core.replyStateless(e,{statusCode:500,extraHeaders:r});return}if(this.reinviteUserAgentClient){this.core.replyStateless(e,{statusCode:491});return}}if(e.method===ge.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof ar))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case ge.BYE:{const t=new H0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case ge.INFO:{const t=new N0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case ge.INVITE:{const t=new j0(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case ge.MESSAGE:{const t=new Hf(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ge.NOTIFY:{const t=new Co(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case ge.PRACK:{const t=new F0(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case ge.REFER:{const t=new Mf(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(t):t.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}reliableSequenceGuard(e){const t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){const r=e.getHeader("require"),n=e.getHeader("rseq"),s=r&&r.includes("100rel")&&n?Number(n):void 0;if(s){if(this.rseq&&this.rseq+1!==s)return!1;this.rseq=this.rseq?this.rseq+1:s}}return!0}signalingStateRollback(){(this._signalingState===pe.HaveLocalOffer||this.signalingState===pe.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=pe.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=fi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===pe.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof ys)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof pn)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.HaveRemoteOffer:break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof vl)switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}if(Af(e))switch(this._signalingState){case pe.Initial:case pe.Stable:this._signalingState=pe.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case pe.HaveLocalOffer:break;case pe.HaveRemoteOffer:this._signalingState=pe.Stable,this._answer=t;break;case pe.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof jt){const e=this.initialTransaction;let t=wt.T1;const r=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,wt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===F.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};e.addStateChangeListener(n)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof jt){const e=this.reinviteUserAgentServer.transaction;let t=wt.T1;const r=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,wt.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===F.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},K0=class extends Wt{constructor(e,t,r){super(wn,e,t,r),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=r}dispose(){this.earlyDialogs.forEach(e=>e.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(e){if(this.transaction.state===F.Calling)return super.onTransportError(e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(e){if(!this.authenticationGuard(e))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});return;case/^1[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const r=_s.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new xo(i,this.core,r),this.earlyDialogs.set(n.id,n)}if(!n.reliableSequenceGuard(e)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(n.signalingState===pe.Initial||n.signalingState===pe.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:s,prack:i=>s.prack(void 0,i)})}return;case/^2[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const r=_s.initialDialogStateForUserAgentClient(this.message,e);let n=this.confirmedDialogs.get(r.id);if(n){const i=this.confirmedDialogAcks.get(r.id);if(i){const o=this.transaction;if(!(o instanceof wn))throw new Error("Client transaction not instance of InviteClientTransaction.");o.ackResponse(i.message)}return}if(n=this.earlyDialogs.get(r.id),n)n.confirm(),n.recomputeRouteSet(e),this.earlyDialogs.delete(n.id),this.confirmedDialogs.set(n.id,n);else{const i=this.transaction;if(!(i instanceof wn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new xo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===pe.Initial||n.signalingState===pe.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:s,ack:i=>{const o=s.ack(i);return this.confirmedDialogAcks.set(s.id,o),o}});else{const i=s.ack();this.confirmedDialogAcks.set(s.id,i)}}return;case/^3[0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});return;case/^[4-6][0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});return;default:throw new Error(`Invalid status code ${t}`)}throw new Error(`Executing what should be an unreachable code path receiving ${t} response.`)}},Sl=class extends Ir{constructor(e,t,r){super(jt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{const a=this.transaction;if(!(a instanceof jt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=_s.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new xo(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+gn.toString();if(!e.body){if(this.confirmedDialog.signalingState===pe.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===pe.Initial||this.confirmedDialog.signalingState===pe.HaveRemoteOffer)throw new Error("Response must have a body.")}e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(n),e.extraHeaders.push(r);const s=super.accept(e),i=this.confirmedDialog,o=Object.assign(Object.assign({},s),{session:i});return e.body&&this.confirmedDialog.signalingState!==pe.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof jt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=_s.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new xo(o,this.core,a)}const t=this.message.getHeaders("record-route").map(o=>`Record-Route: ${o}`),r=`Contact: ${this.core.configuration.contact}`;e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(r);const n=super.progress(e),s=this.earlyDialog,i=Object.assign(Object.assign({},n),{session:s});return e.body&&this.earlyDialog.signalingState!==pe.Stable&&this.earlyDialog.signalingStateTransition(e.body),i}redirect(e,t={statusCode:302}){return super.redirect(e,t)}reject(e={statusCode:486}){return super.reject(e)}},W0=class extends Wt{constructor(e,t,r){super(Kt,e,t,r)}},G0=class extends Wt{constructor(e,t,r){super(Kt,e,t,r)}},J0=class extends Ir{constructor(e,t,r){super(Gt,e,t,r),this.core=e}},Y0=class extends Wt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ge.SUBSCRIBE,r);super(Kt,e.userAgentCore,n,t),this.dialog=e}waitNotifyStop(){}receiveResponse(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);this.dialog.subscriptionExpires>r&&(this.dialog.subscriptionExpires=r)}}e.statusCode&&e.statusCode>=400&&e.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(e.statusCode)&&this.dialog.terminate(),super.receiveResponse(e)}},Nf=class extends _s{constructor(e,t,r,n,s,i){super(n,s),this.delegate=i,this._autoRefresh=!1,this._subscriptionEvent=e,this._subscriptionExpires=t,this._subscriptionExpiresInitial=t,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=r,this.logger=n.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(e,t){const n=t.getHeaders("record-route"),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof ar))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,u=e.fromTag,c=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!u)throw new Error("From tag undefined.");if(!c)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,p=e.to.uri;return{id:l+u+c,early:!1,callId:l,localTag:u,remoteTag:c,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:p,remoteTarget:i,routeSet:n,secure:!1}}dispose(){super.dispose(),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log(`SUBSCRIBE dialog ${this.id} destroyed`)}get autoRefresh(){return this._autoRefresh}set autoRefresh(e){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)}set subscriptionExpires(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const t=this.subscriptionRefresh;(t===void 0||t>=e)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(e){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${e.method} request`),!this.sequenceGuard(e)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${e.method} request.`);return}super.receiveRequest(e),e.method===ge.NOTIFY?this.onNotify(e):(this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501}))}refresh(){const e="Allow: "+gn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Y0(this,e,t);return this.N&&(clearTimeout(this.N),this.N=void 0),!((r=t.extraHeaders)===null||r===void 0)&&r.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),wt.TIMER_N)),n}terminate(){this.stateTransition(Ue.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+gn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Ue.Pending,s);break;case"active":this.stateTransition(Ue.Active,s);break;case"terminated":this.stateTransition(Ue.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Co(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Ue.Initial:r();return;case Ue.NotifyWait:r();return;case Ue.Pending:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending){r();return}break;case Ue.Active:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;case Ue.Terminated:if(this.subscriptionState!==Ue.NotifyWait&&this.subscriptionState!==Ue.Pending&&this.subscriptionState!==Ue.Active){r();return}break;default:r();return}e===Ue.Pending&&t&&(this.subscriptionExpires=t),e===Ue.Active&&t&&(this.subscriptionExpires=t),e===Ue.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ue.Terminated&&(this.stateTransition(Ue.Terminated),this.onTerminated())}},Z0=class extends Wt{constructor(e,t,r){const n=t.getHeader("Event");if(!n)throw new Error("Event undefined");const s=t.getHeader("Expires");if(!s)throw new Error("Expires undefined");super(Kt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ue.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Ue.Pending;break;case"active":this.subscriptionState=Ue.Active;break;case"terminated":this.subscriptionState=Ue.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ue.Terminated){const s=Nf.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Nf(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){const s=e,i=this.dialog;this.delegate.onNotify({request:s,subscription:i})}else e.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),wt.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);r>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),r<this.subscriptionExpires&&(this.subscriptionExpires=r)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(e)}}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}},X0=class extends Ir{constructor(e,t,r){super(Gt,e,t,r),this.core=e}},qf=["application/sdp","application/dtmf-relay"],Q0=class{constructor(e,t={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(e=>e.dispose()),this.dialogs.clear(),this.subscribers.forEach(e=>e.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(e=>e.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(e=>e.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}invite(e,t){return new K0(this,e,t)}message(e,t){return new Of(this,e,t)}publish(e,t){return new W0(this,e,t)}register(e,t){return new G0(this,e,t)}subscribe(e,t){return new Z0(this,e,t)}request(e,t){return new Wt(Kt,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,u=this.configuration.viaForceRport,c=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===ge.REGISTER&&d.push("path","gruu"),e===ge.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const p={callIdPrefix:a,forceRport:u,fromDisplayName:l,hackViaTcp:c,optionTags:d,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost};return new vl(e,t,r,n,Object.assign(Object.assign({},p),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=kf(e,t);return this.transport.send(s.message).catch(i=>{i instanceof Error&&this.logger.error(i.message),this.logger.error(`Transport error occurred sending stateless reply to ${e.method} request.`)}),s}receiveRequestFromTransport(e){const t=e.viaBranch,r=this.userAgentServers.get(t);if(e.method===ge.ACK&&r&&r.transaction.state===F.Accepted&&r instanceof Sl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===ge.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof jt&&r.transaction.state===F.Proceeding&&r instanceof Sl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!gn.includes(e.method)){const n="Allow: "+gn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==ge.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===ge.INVITE&&!e.hasHeader("Contact")){this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!e.toTag){const n=e.viaBranch;if(!this.userAgentServers.has(n)&&Array.from(this.userAgentServers.values()).some(s=>s.transaction.request.fromTag===e.fromTag&&s.transaction.request.callId===e.callId&&s.transaction.request.cseq===e.cseq)){this.replyStateless(e,{statusCode:482});return}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}receiveInsideDialogRequest(e){if(e.method===ge.NOTIFY){const n=e.parseHeader("Event");if(!n||!n.event){this.replyStateless(e,{statusCode:489});return}const s=e.callId+e.toTag+n.event,i=this.subscribers.get(s);if(i){const o=new Co(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===ge.OPTIONS){const n="Allow: "+gn.toString(),s="Accept: "+qf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==ge.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case ge.ACK:break;case ge.BYE:this.replyStateless(e,{statusCode:481});break;case ge.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case ge.INFO:this.replyStateless(e,{statusCode:405});break;case ge.INVITE:{const t=new Sl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case ge.MESSAGE:{const t=new Hf(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ge.NOTIFY:{const t=new Co(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case ge.OPTIONS:{const t="Allow: "+gn.toString(),r="Accept: "+qf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case ge.REFER:{const t=new Mf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case ge.REGISTER:{const t=new J0(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case ge.SUBSCRIBE:{const t=new X0(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${e.method}.`)}}receiveResponseFromTransport(e){if(e.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn(`Discarding unmatched ${e.statusCode} response to ${e.method} ${t}.`)}};function ew(){return e=>!e.audio&&!e.video?Promise.resolve(new MediaStream):navigator.mediaDevices===void 0?Promise.reject(new Error("Media devices not available in insecure contexts.")):navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices,e)}function tw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var rw=class $n{constructor(t,r,n){t.debug("SessionDescriptionHandler.constructor"),this.logger=t,this.mediaStreamFactory=r,this.sessionDescriptionHandlerConfiguration=n,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(n?.peerConnectionConfiguration),this.initPeerConnectionEventHandlers()}get localMediaStream(){return this._localMediaStream}get remoteMediaStream(){return this._remoteMediaStream}get dataChannel(){return this._dataChannel}get peerConnection(){return this._peerConnection}get peerConnectionDelegate(){return this._peerConnectionDelegate}set peerConnectionDelegate(t){this._peerConnectionDelegate=t}static dispatchAddTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:r}))}static dispatchRemoveTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:r}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(t=>{t.track&&t.track.stop()}),this._peerConnection.getSenders().forEach(t=>{t.track&&t.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getReceivers().forEach(n=>{n.track&&(n.track.enabled=t)})}enableSenderTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getSenders().forEach(n=>{n.track&&(n.track.enabled=t)})}getDescription(t,r){var n,s;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=t?.onDataChannel;const i=(n=t?.offerOptions)===null||n===void 0?void 0:n.iceRestart,o=t?.iceGatheringTimeout===void 0?(s=this.sessionDescriptionHandlerConfiguration)===null||s===void 0?void 0:s.iceGatheringTimeout:t?.iceGatheringTimeout;return this.getLocalMediaStream(t).then(()=>this.updateDirection(t)).then(()=>this.createDataChannel(t)).then(()=>this.createLocalOfferOrAnswer(t)).then(a=>this.applyModifiers(a,r)).then(a=>this.setLocalSessionDescription(a)).then(()=>this.waitForIceGatheringComplete(i,o)).then(()=>this.getLocalSessionDescription()).then(a=>({body:a.sdp,contentType:"application/sdp"})).catch(a=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+a),a})}hasDescription(t){return this.logger.debug("SessionDescriptionHandler.hasDescription"),t==="application/sdp"}iceGatheringComplete(){this.logger.debug("SessionDescriptionHandler.iceGatheringComplete"),this.iceGatheringCompleteTimeoutId!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - clearing timeout"),clearTimeout(this.iceGatheringCompleteTimeoutId),this.iceGatheringCompleteTimeoutId=void 0),this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - resolving promise"),this.iceGatheringCompleteResolve&&this.iceGatheringCompleteResolve(),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0)}sendDtmf(t,r){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const n=this._peerConnection.getSenders();if(n.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const s=n[0].dtmf;if(!s)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const i=r?.duration,o=r?.interToneGap;try{s.insertDTMF(t,i,o)}catch(a){return this.logger.error(a.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+t.toString()),!0}setDescription(t,r,n){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r?.onDataChannel;const s=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(r).then(()=>this.applyModifiers({sdp:t,type:s},n)).then(i=>this.setRemoteSessionDescription(i)).catch(i=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+i),i})}applyModifiers(t,r){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!r||r.length===0?Promise.resolve(t):r.reduce((n,s)=>n.then(s),Promise.resolve(t)).then(n=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!n.sdp||!n.type)throw new Error("Invalid SDP.");return{sdp:n.sdp,type:n.type}})}createDataChannel(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if(t?.dataChannel!==!0||this._dataChannel)return Promise.resolve();switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.createDataChannel - creating data channel");try{return this._dataChannel=this._peerConnection.createDataChannel(t?.dataChannelLabel||"",t?.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(r){return Promise.reject(r)}case"have-remote-offer":return Promise.resolve();default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP offer"),this._peerConnection.createOffer(t?.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(t?.answerOptions);default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let r=Object.assign({},t?.constraints);if(this.localMediaStreamConstraints){if(r.audio=r.audio||this.localMediaStreamConstraints.audio,r.video=r.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(r.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(r.video))return Promise.resolve()}else r.audio===void 0&&r.video===void 0&&(r={audio:!0});return this.localMediaStreamConstraints=r,this.mediaStreamFactory(r,this,t).then(n=>this.setLocalMediaStream(n))}setLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection,n=this._localMediaStream,s=[],i=l=>{const u=l.kind;if(u!=="audio"&&u!=="video")throw new Error(`Unknown new track kind ${u}.`);const c=r.getSenders().find(d=>d.track&&d.track.kind===u);c?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${u} track`),d()}).then(()=>c.replaceTrack(l).then(()=>{const d=n.getTracks().find(p=>p.kind===u);d&&(d.stop(),n.removeTrack(d),$n.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),$n.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${u} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${u} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${u} track`),d}n.addTrack(l),$n.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,u)=>l.then(()=>u),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const t=this._peerConnection.localDescription;return t?Promise.resolve(t):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(t){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(t)}setRemoteSessionDescription(t){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=t.sdp;let n;switch(this._peerConnection.signalingState){case"stable":n="offer";break;case"have-local-offer":n="answer";break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return r?this._peerConnection.setRemoteDescription({sdp:r,type:n}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(t){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const r=this._remoteMediaStream;r.getTrackById(t.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${t.kind} track`):t.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getAudioTracks().forEach(n=>{n.stop(),r.removeTrack(n),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.dispatchAddTrackEvent(r,t)):t.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getVideoTracks().forEach(n=>{n.stop(),r.removeTrack(n),$n.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),$n.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
53
53
  `:return"inactive";case`a=recvonly\r
54
54
  `:return"recvonly";case`a=sendonly\r
55
55
  `:return"sendonly";case`a=sendrecv\r
56
- `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function nw(e){return(t,r)=>{e===void 0&&(e=ew());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},tw()),r?.peerConnectionConfiguration)};return new rw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Bf=class ng{constructor(t,r){if(this._state=Re.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new ui,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},ng.defaultOptions),r);const n=this.configuration.server,s=ft.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===Re.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Re.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Re.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Re.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Re.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Re.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Re.Connecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case Re.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Re.Connecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(Re.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case Re.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Re.Disconnecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case Re.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Re.Disconnecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case Re.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Re.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Re.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Re.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
56
+ `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function nw(e){return(t,r)=>{e===void 0&&(e=ew());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},tw()),r?.peerConnectionConfiguration)};return new rw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var Bf=class ng{constructor(t,r){if(this._state=ke.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new ui,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},ng.defaultOptions),r);const n=this.configuration.server,s=pt.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===ke.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case ke.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(ke.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case ke.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(ke.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case ke.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(ke.Connecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case ke.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(ke.Connecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(ke.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case ke.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(ke.Disconnecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case ke.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(ke.Disconnecting)}catch(r){if(r instanceof ci)return Promise.reject(r);throw r}break;case ke.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(ke.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case ke.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(ke.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
57
57
 
58
58
  `+t+`
59
- `),this._state!==Re.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(Re.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
59
+ `),this._state!==ke.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(ke.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
60
60
 
61
61
  `+s+`
62
62
  `)}else s=n,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
63
63
 
64
64
  `+s+`
65
- `);if(this.state!==Re.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(s)}catch(i){throw this.logger.error(i.toString()),this.logger.error("Exception thrown by onMessage callback"),i}}onWebSocketOpen(t,r){r===this._ws&&this._state===Re.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Re.Connected))}transitionLoopDetectedError(t){let r="A state transition loop has been detected.";return r+=` An attempt to transition from ${this._state} to ${t} before the prior transition completed.`,r+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(r),new ci("Loop detected.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(t);switch(this.transitioningState=!0,this._state){case Re.Connecting:t!==Re.Connected&&t!==Re.Disconnecting&&t!==Re.Disconnected&&n();break;case Re.Connected:t!==Re.Disconnecting&&t!==Re.Disconnected&&n();break;case Re.Disconnecting:t!==Re.Connecting&&t!==Re.Disconnected&&n();break;case Re.Disconnected:t!==Re.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Re.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Re.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${s} to ${this._state}`),this._stateEventEmitter.emit(this._state),t===Re.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onConnect callback"),u}if(s===Re.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onDisconnect callback"),u}if(s===Re.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Re.Connected?i():o(r||new Error("Connect aborted."))}if(s===Re.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Re.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
65
+ `);if(this.state!==ke.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(s)}catch(i){throw this.logger.error(i.toString()),this.logger.error("Exception thrown by onMessage callback"),i}}onWebSocketOpen(t,r){r===this._ws&&this._state===ke.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(ke.Connected))}transitionLoopDetectedError(t){let r="A state transition loop has been detected.";return r+=` An attempt to transition from ${this._state} to ${t} before the prior transition completed.`,r+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(r),new ci("Loop detected.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(t);switch(this.transitioningState=!0,this._state){case ke.Connecting:t!==ke.Connected&&t!==ke.Disconnecting&&t!==ke.Disconnected&&n();break;case ke.Connected:t!==ke.Disconnecting&&t!==ke.Disconnected&&n();break;case ke.Disconnecting:t!==ke.Connecting&&t!==ke.Disconnected&&n();break;case ke.Disconnected:t!==ke.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===ke.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===ke.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${s} to ${this._state}`),this._stateEventEmitter.emit(this._state),t===ke.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onConnect callback"),u}if(s===ke.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(u){throw this.logger.error(u.toString()),this.logger.error("Exception thrown by onDisconnect callback"),u}if(s===ke.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===ke.Connected?i():o(r||new Error("Connect aborted."))}if(s===ke.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===ke.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
66
66
  \r
67
- `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};Bf.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var yn=class na{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Ct.Stopped,this._stateEventEmitter=new ui,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},na.defaultOptions()),{sipjsId:jn(5)}),{uri:new fn("sip","anonymous."+jn(6),"anonymous.invalid")}),{viaHost:jn(12)+".invalid"}),na.stripUndefinedProperties(t)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const n=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+n}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new D0,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=wt.error;break;case"warn":this.loggerFactory.level=wt.warn;break;case"log":this.loggerFactory.level=wt.log;break;case"debug":this.loggerFactory.level=wt.debug;break;default:break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(r=>{const n=this.options[r];switch(r){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+r+": "+n);break;case"authorizationPassword":this.logger.log("· "+r+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+r+": "+n.name);break;default:this.logger.log("· "+r+": "+JSON.stringify(n))}})),this.options.transportOptions){const r=this.options.transportOptions,n=r.maxReconnectionAttempts,s=r.reconnectionTimeout;n!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),s!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionDelay===void 0&&s!==void 0&&(this.options.reconnectionDelay=s),t.reconnectionAttempts===void 0&&n!==void 0&&(this.options.reconnectionAttempts=n)}if(t.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:na.newUUID(),ft.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return ft.URIParse(t)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:nw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:vr.Unsupported,sipExtensionReplaces:vr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Bf,transportOptions:{},uri:new fn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+b0,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.floor(Math.random()*16);return(t==="x"?r:r%4+8).toString(16)})}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(t,r){return this.loggerFactory.getLogger(t,r)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===Ct.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Ct.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Ct.Started),this.transport.connect())}async stop(){if(this.state===Ct.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(Ct.Stopped),Promise.resolve();const t=Object.assign({},this._publishers),r=Object.assign({},this._registerers),n=Object.assign({},this._sessions),s=Object.assign({},this._subscriptions),i=this.transport,o=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in r)r[a]&&await r[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._registerers[a],l});this.logger.log("Dispose of sessions");for(const a in n)n[a]&&await n[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._sessions[a],l});this.logger.log("Dispose of subscriptions");for(const a in s)s[a]&&await s[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._subscriptions[a],l});this.logger.log("Dispose of publishers");for(const a in t)t[a]&&await t[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._publishers[a],l});this.logger.log("Dispose of transport"),await i.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),o.dispose(),this.transitionState(Ct.Stopped)}_makeInviter(t,r){return new _o(this,t,r)}attemptReconnection(t=1){const r=this.options.reconnectionAttempts,n=this.options.reconnectionDelay;if(t>r){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${t} of ${r} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${t} of ${r} - succeeded`)}).catch(s=>{this.logger.error(s.message),this.logger.log(`Reconnection attempt ${t} of ${r} - failed`),this.attemptReconnection(++t)})},t===1?0:n*1e3)}initContact(){const t=this.options.contactName!==""?this.options.contactName:jn(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new fn("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===vr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===vr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>$0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Q0({aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:t,supportedOptionTagsResponse:r,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const n=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,s=this.options.authorizationPassword?this.options.authorizationPassword:void 0,i=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new P0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new ys(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==vr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const u=o.replaces_from_tag;if(typeof u!="string")throw new Error("type of from tag is not string");const c=a+l+u,d=this.userAgentCore.dialogs.get(c);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+u]||this._sessions[a+l]||void 0;if(!p)throw new Error("Session does not exist.");i._replacee=p}}if(!((s=this.delegate)===null||s===void 0)&&s.onInvite){if(i.autoSendAnInitialProvisionalResponse){i.progress().then(()=>{var o;if(((o=this.delegate)===null||o===void 0?void 0:o.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(i)});return}this.delegate.onInvite(i);return}i.reject({statusCode:486})},onMessage:n=>{if(this.delegate&&this.delegate.onMessage){const s=new If(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new wl(n);this.delegate.onNotify(s)}else this.options.allowLegacyNotifications?n.accept():n.reject({statusCode:481})},onRefer:n=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(n):n.reject({statusCode:405})},onRegister:n=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(n):n.reject({statusCode:405})},onSubscribe:n=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(n):n.reject({statusCode:405})}})}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=t=>this.onTransportDisconnect(t),this.transport.onMessage=t=>this.onTransportMessage(t)}onTransportConnect(){this.state!==Ct.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==Ct.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=So.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===Ct.Stopped&&r instanceof ws){this.logger.warn(`Received ${r.method} request while stopped. Dropping.`);return}const n=()=>{for(const s of["from","to","call_id","cseq","via"])if(!r.hasHeader(s))return this.logger.warn(`Missing mandatory header field : ${s}.`),!1;return!0};if(r instanceof ws){if(!n()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!r.toTag&&r.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(r,{statusCode:482});return}const s=di(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof pn){if(!n()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(r.via.host!==this.options.viaHost||r.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const s=di(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(r instanceof ws){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof pn){this.userAgentCore.receiveIncomingResponseFromTransport(r);return}throw new Error("Invalid message type.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ct.Started:t!==Ct.Stopped&&n();break;case Ct.Stopped:t!==Ct.Started&&n();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${t}`),this._state=t,this._stateEventEmitter.emit(this._state)}},yt=new window.AudioContext,sw={1:[697,1209],2:[697,1336],3:[697,1477],A:[697,1633],4:[770,1209],5:[770,1336],6:[770,1477],B:[770,1633],7:[852,1209],8:[852,1336],9:[852,1477],C:[852,1633],"*":[941,1209],0:[941,1336],"#":[941,1477],D:[941,1633]},pi=F(null),hi=F(null),gi=F(.5);const Lf=()=>({playDtmf:(o,a=150)=>{yt.state==="suspended"&&yt.resume();const l=sw[o.toUpperCase()];if(!l)return;const u=yt.createOscillator(),c=yt.createOscillator(),d=yt.createGain();u.frequency.value=l[0],c.frequency.value=l[1],u.type="sine",c.type="sine",d.gain.value=.1*gi.value,u.connect(d),c.connect(d),d.connect(yt.destination),u.start(),c.start(),setTimeout(()=>{u.stop(),c.stop(),u.disconnect(),c.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(pi.value)return;yt.state==="suspended"&&yt.resume();const o=()=>{const a=yt.currentTime,l=yt.createOscillator(),u=yt.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),u.gain.setValueAtTime(.1*gi.value,a),u.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(u),u.connect(yt.destination),l.start(a),l.stop(a+.5)};o(),pi.value=window.setInterval(()=>{o(),setTimeout(o,400)},3e3)},stopRingtone:()=>{pi.value&&(clearInterval(pi.value),pi.value=null)},startRingback:()=>{if(hi.value)return;yt.state==="suspended"&&yt.resume();const o=()=>{const a=yt.currentTime,l=yt.createOscillator(),u=yt.createGain();l.type="sine",l.frequency.value=425,u.gain.setValueAtTime(.1*gi.value,a),u.gain.linearRampToValueAtTime(.1*gi.value,a+1),u.gain.linearRampToValueAtTime(0,a+1.1),l.connect(u),u.connect(yt.destination),l.start(a),l.stop(a+1.1)};o(),hi.value=window.setInterval(()=>{o()},4e3)},stopRingback:()=>{hi.value&&(clearInterval(hi.value),hi.value=null)},setNotificationVolume:o=>{gi.value=Math.max(0,Math.min(1,o/100))}});function Ff(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ff(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ff(e))&&(n&&(n+=" "),n+=t);return n}var iw=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},ow=(e,t)=>({classGroupId:e,validator:t}),jf=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),To="-",Uf=[],aw="arbitrary..",lw=e=>{const t=uw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return cw(o);const a=o.split(To);return zf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?iw(u,l):l:u||Uf}return r[o]||Uf}}},zf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=zf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(To):e.slice(t).join(To),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},cw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?aw+n:void 0})(),uw=e=>{const{theme:t,classGroups:r}=e;return dw(r,t)},dw=(e,t)=>{const r=jf();for(const n in e){const s=e[n];Cl(s,r,n,t)}return r},Cl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];fw(o,t,r,n)}},fw=(e,t,r,n)=>{if(typeof e=="string"){pw(e,t,r);return}if(typeof e=="function"){hw(e,t,r,n);return}gw(e,t,r,n)},pw=(e,t,r)=>{const n=e===""?t:Kf(t,e);n.classGroupId=r},hw=(e,t,r,n)=>{if(vw(e)){Cl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ow(r,e))},gw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Cl(l,Kf(t,a),r,n)}},Kf=(e,t)=>{let r=e;const n=t.split(To),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=jf(),r.nextPart.set(o,a)),r=a}return r},vw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},xl="!",Wf=":",ww=[],Gf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),yw=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Wf){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(xl)?(p=d.slice(0,-1),h=!0):d.startsWith(xl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Gf(i,h,p,m)};if(t){const s=t+Wf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Gf(ww,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},bw=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let i=0;i<r.length;i++){const o=r[i],a=o[0]==="[",l=t.has(o);a||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},_w=e=>({cache:mw(e.cacheSize),parseClassName:yw(e),sortModifiers:bw(e),...lw(e)}),Sw=/\s+/,Cw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Sw);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,v=n(x?m.substring(0,w):m);if(!v){if(!x){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}x=!1}const C=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=h?C+xl:C,b=y+v;if(o.indexOf(b)>-1)continue;o.push(b);const _=s(v,x);for(let T=0;T<_.length;++T){const P=_[T];o.push(y+P)}l=c+(l.length>0?" "+l:l)}return l},xw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Jf(r))&&(s&&(s+=" "),s+=n);return s},Jf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Jf(e[n]))&&(r&&(r+=" "),r+=t);return r},Tw=(e,...t)=>{let r,n,s,i;const o=l=>(r=_w(t.reduce((u,c)=>c(u),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const u=n(l);if(u)return u;const c=Cw(l,r);return s(l,c),c};return i=o,(...l)=>i(xw(...l))},Ew=[],pt=e=>{const t=r=>r[e]||Ew;return t.isThemeGetter=!0,t},Yf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Aw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$w=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Aw.test(e),Pe=e=>!!e&&!Number.isNaN(Number(e)),_n=e=>!!e&&Number.isInteger(Number(e)),Tl=e=>e.endsWith("%")&&Pe(e.slice(0,-1)),Jr=e=>Iw.test(e),Xf=()=>!0,Dw=e=>Rw.test(e)&&!kw.test(e),El=()=>!1,Ow=e=>$w.test(e),Hw=e=>Pw.test(e),Mw=e=>!ye(e)&&!be(e),Nw=e=>Sn(e,sp,El),ye=e=>Yf.test(e),Un=e=>Sn(e,ip,Dw),Qf=e=>Sn(e,zw,Pe),qw=e=>Sn(e,ap,Xf),Bw=e=>Sn(e,op,El),ep=e=>Sn(e,rp,El),Lw=e=>Sn(e,np,Hw),Eo=e=>Sn(e,lp,Ow),be=e=>Zf.test(e),vi=e=>zn(e,ip),Fw=e=>zn(e,op),tp=e=>zn(e,rp),Vw=e=>zn(e,sp),jw=e=>zn(e,np),Ao=e=>zn(e,lp,!0),Uw=e=>zn(e,ap,!0),Sn=(e,t,r)=>{const n=Yf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},zn=(e,t,r=!1)=>{const n=Zf.exec(e);return n?n[1]?t(n[1]):r:!1},rp=e=>e==="position"||e==="percentage",np=e=>e==="image"||e==="url",sp=e=>e==="length"||e==="size"||e==="bg-size",ip=e=>e==="length",zw=e=>e==="number",op=e=>e==="family-name",ap=e=>e==="number"||e==="weight",lp=e=>e==="shadow",Kw=()=>{const e=pt("color"),t=pt("font"),r=pt("text"),n=pt("font-weight"),s=pt("tracking"),i=pt("leading"),o=pt("breakpoint"),a=pt("container"),l=pt("spacing"),u=pt("radius"),c=pt("shadow"),d=pt("inset-shadow"),p=pt("text-shadow"),h=pt("drop-shadow"),m=pt("blur"),w=pt("perspective"),x=pt("aspect"),v=pt("ease"),C=pt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...b(),be,ye],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],g=()=>[be,ye,l],M=()=>[bn,"full","auto",...g()],N=()=>[_n,"none","subgrid",be,ye],S=()=>["auto",{span:["full",_n,be,ye]},_n,be,ye],E=()=>[_n,"auto",be,ye],A=()=>["auto","min","max","fr",be,ye],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...g()],Q=()=>[bn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],Y=()=>[bn,"screen","full","dvw","lvw","svw","min","max","fit",...g()],le=()=>[bn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],K=()=>[e,be,ye],ce=()=>[...b(),tp,ep,{position:[be,ye]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",Vw,Nw,{size:[be,ye]}],He=()=>[Tl,vi,Un],xe=()=>["","none","full",u,be,ye],Ae=()=>["",Pe,vi,Un],Je=()=>["solid","dashed","dotted","double"],at=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],De=()=>[Pe,Tl,tp,ep],ct=()=>["","none",m,be,ye],ht=()=>["none",Pe,be,ye],et=()=>["none",Pe,be,ye],I=()=>[Pe,be,ye],O=()=>[bn,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Jr],breakpoint:[Jr],color:[Xf],container:[Jr],"drop-shadow":[Jr],ease:["in","out","in-out"],font:[Mw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Jr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Jr],shadow:[Jr],spacing:["px",Pe],text:[Jr],"text-shadow":[Jr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bn,ye,be,x]}],container:["container"],columns:[{columns:[Pe,ye,be,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",be,ye]}],basis:[{basis:[bn,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Pe,bn,"auto","initial","none",ye]}],grow:[{grow:["",Pe,be,ye]}],shrink:[{shrink:["",Pe,be,ye]}],order:[{order:[_n,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[a,"screen",...Q()]}],"min-w":[{"min-w":[a,"screen","none",...Q()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,vi,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Uw,qw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tl,ye]}],"font-family":[{font:[Fw,Bw,t]}],"font-features":[{"font-features":[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,be,ye]}],"line-clamp":[{"line-clamp":[Pe,"none",be,Qf]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Je(),"wavy"]}],"text-decoration-thickness":[{decoration:[Pe,"from-font","auto",be,Un]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Pe,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,be,ye],radial:["",be,ye],conic:[_n,be,ye]},jw,Lw]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:He()}],"gradient-via-pos":[{via:He()}],"gradient-to-pos":[{to:He()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:xe()}],"rounded-s":[{"rounded-s":xe()}],"rounded-e":[{"rounded-e":xe()}],"rounded-t":[{"rounded-t":xe()}],"rounded-r":[{"rounded-r":xe()}],"rounded-b":[{"rounded-b":xe()}],"rounded-l":[{"rounded-l":xe()}],"rounded-ss":[{"rounded-ss":xe()}],"rounded-se":[{"rounded-se":xe()}],"rounded-ee":[{"rounded-ee":xe()}],"rounded-es":[{"rounded-es":xe()}],"rounded-tl":[{"rounded-tl":xe()}],"rounded-tr":[{"rounded-tr":xe()}],"rounded-br":[{"rounded-br":xe()}],"rounded-bl":[{"rounded-bl":xe()}],"border-w":[{border:Ae()}],"border-w-x":[{"border-x":Ae()}],"border-w-y":[{"border-y":Ae()}],"border-w-s":[{"border-s":Ae()}],"border-w-e":[{"border-e":Ae()}],"border-w-bs":[{"border-bs":Ae()}],"border-w-be":[{"border-be":Ae()}],"border-w-t":[{"border-t":Ae()}],"border-w-r":[{"border-r":Ae()}],"border-w-b":[{"border-b":Ae()}],"border-w-l":[{"border-l":Ae()}],"divide-x":[{"divide-x":Ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Je(),"hidden","none"]}],"divide-style":[{divide:[...Je(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...Je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Pe,be,ye]}],"outline-w":[{outline:["",Pe,vi,Un]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",c,Ao,Eo]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",d,Ao,Eo]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:Ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Pe,Un]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":Ae()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",p,Ao,Eo]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Pe,be,ye]}],"mix-blend":[{"mix-blend":[...at(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":at()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":De()}],"mask-image-linear-to-pos":[{"mask-linear-to":De()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":De()}],"mask-image-t-to-pos":[{"mask-t-to":De()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":De()}],"mask-image-r-to-pos":[{"mask-r-to":De()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":De()}],"mask-image-b-to-pos":[{"mask-b-to":De()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":De()}],"mask-image-l-to-pos":[{"mask-l-to":De()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":De()}],"mask-image-x-to-pos":[{"mask-x-to":De()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":De()}],"mask-image-y-to-pos":[{"mask-y-to":De()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":De()}],"mask-image-radial-to-pos":[{"mask-radial-to":De()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":De()}],"mask-image-conic-to-pos":[{"mask-conic-to":De()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:ct()}],brightness:[{brightness:[Pe,be,ye]}],contrast:[{contrast:[Pe,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",h,Ao,Eo]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Pe,be,ye]}],"hue-rotate":[{"hue-rotate":[Pe,be,ye]}],invert:[{invert:["",Pe,be,ye]}],saturate:[{saturate:[Pe,be,ye]}],sepia:[{sepia:["",Pe,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":ct()}],"backdrop-brightness":[{"backdrop-brightness":[Pe,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Pe,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Pe,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Pe,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",Pe,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Pe,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Pe,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Pe,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Pe,"initial",be,ye]}],ease:[{ease:["linear","initial",v,be,ye]}],delay:[{delay:[Pe,be,ye]}],animate:[{animate:["none",C,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,be,ye]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ht()}],"rotate-x":[{"rotate-x":ht()}],"rotate-y":[{"rotate-y":ht()}],"rotate-z":[{"rotate-z":ht()}],scale:[{scale:et()}],"scale-x":[{"scale-x":et()}],"scale-y":[{"scale-y":et()}],"scale-z":[{"scale-z":et()}],"scale-3d":["scale-3d"],skew:[{skew:I()}],"skew-x":[{"skew-x":I()}],"skew-y":[{"skew-y":I()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ye]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Pe,vi,Un,Qf]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ww=Tw(Kw);const nt=(...e)=>Ww(Vf(e)),cp=(e,t)=>{if(e){const r=Al(e);if(r&&up(r))return r;if(e.trim())return e.trim()}if(t){const r=Al(t);if(r&&up(r))return r;const n=Gw(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Al=e=>e.replace(/[^\d+*#]/g,""),up=e=>/^\+?[\d*#]{2,}$/.test(e),Gw=e=>{let t=e.match(/^([+]?[\d*#]{2,})\s*[-:]/);return t&&t[1]||(t=e.match(/\(([+]?[\d*#]{2,})\)/),t&&t[1])||(t=e.match(/(?:ext\.?|extension)\s*([+]?[\d*#]{2,})/i),t&&t[1])?t[1]:(t=e.match(/([+]?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9})/),t&&t[1]?Al(t[1]):null)},Jw="X-Nebula-Queue",Yw="X-Nebula-Queue-Id";const Zw=(e,t={})=>{const r=rt(null),n=rt(null),s=rt(new Map),i=new Audio;i.autoplay=!0;const o=rt(void 0),a=rt(null),l=rt(null),u=new Map,c=new Map,d=new Set;let p=null,h=null,m=null,w=null,x=null;const v=V(()=>r.value?.configuration.uri?.user||""),{startRingtone:C,stopRingtone:y,startRingback:b,stopRingback:_,setNotificationVolume:T}=Lf(),P=k=>k instanceof _o||k instanceof ys?k.request?.callId||k.dialog?.callId||k.id||crypto.randomUUID():k.dialog?.callId||k.id||crypto.randomUUID(),g=k=>{if(!(k instanceof ys))return;const B=k.request;if(!B)return;const H=B.getHeader(Jw)?.trim(),X=B.getHeader(Yw)?.trim();if(!(!H&&!X))return{...X?{id:X}:{},...H?{name:H}:{}}},M=(k,B,H,X)=>{const $=g(k),J={channelId:B,sipCallId:P(k),direction:H,remoteNumber:X,...$?{queue:$}:{}};return u.set(B,J),t.onCallContext?.(J),J},N=(k,B)=>{const H=u.get(k);H&&t.onCallState?.({...H,state:B,timestamp:Date.now()})},S=(k,B)=>{if(k.state!==U.Established)return;const H=u.get(B),X=k.sessionDescriptionHandler,$=X?.localMediaStream??l.value,J=X?.remoteMediaStream??a.value,G=$?.getAudioTracks()??[],_e=J?.getAudioTracks()??[];if(!H||!$||!J||G.length===0||_e.length===0)return;const $e=[H.sipCallId,...G.map(Le=>`local:${Le.id}`),..._e.map(Le=>`remote:${Le.id}`)].join("|");c.get(B)!==$e&&(c.set(B,$e),t.onMediaReady?.({...H,localStream:$,remoteStream:J}))},E=k=>{u.delete(k),c.delete(k),d.delete(k)},A=()=>{e.channels.value.some(k=>k.status==="incoming")?C():y(),e.activeChannel.value?.status==="calling"?b():_()},Z=k=>{i.volume=k/100},ee=async k=>{typeof i.setSinkId=="function"&&await i.setSinkId(k)},z=k=>{o.value=k},Q=(k,B)=>{let H=!1;const X=k.sessionDescriptionHandler;return X?.peerConnection&&X.peerConnection.getSenders().forEach($=>{$.track&&$.track.kind==="audio"&&($.track.enabled=B,H=!0)}),H},Y=k=>{let B=!1;return l.value&&l.value.getAudioTracks().forEach(H=>{H.enabled=k,B=!0}),B},le=(k,B)=>{const H=!(B?.isHeld||B?.isMuted),X=Q(k,H),$=Y(H);!X&&!$&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},K=k=>{for(const[B,H]of s.value.entries())if(H===k)return e.channels.value.find(X=>X.id===B)||null;return e.activeChannel.value||null},ce=async k=>{const B=k.sessionDescriptionHandler?.peerConnection;if(!B)return;const H=K(k),X=!(H?.isHeld||H?.isMuted),$=B.getSenders().find(J=>J.track?.kind==="audio");if($?.track){$.track.enabled=X,H&&S(k,H.id);return}try{const[J]=(await navigator.mediaDevices.getUserMedia(pe(!1))).getAudioTracks();if(!J)return;J.enabled=X;const G=new MediaStream([J]);l.value=G;const _e=B.getSenders().find($e=>$e.track===null);_e?await _e.replaceTrack(J):B.addTrack(J,G),le(k,H),H&&S(k,H.id)}catch(J){console.warn("[SipJs] Failed to recover outbound audio track:",J)}},pe=(k=!1)=>{const B={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return o.value&&(B.deviceId={exact:o.value}),{audio:B,video:k}},Ce=async k=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(B=>B.stop())}catch(B){console.error("Microphone permission denied",B);return}try{const B=yn.makeURI(k.uri);if(!B)throw new Error("Invalid URI");r.value=new yn({uri:B,logLevel:"error",transportOptions:{server:k.transportOptions.server},authorizationUsername:k.authorizationUsername,authorizationPassword:k.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>e.setConnected(!0),onDisconnect:()=>e.setConnected(!1),onInvite:H=>Je(H)}}),await r.value.start(),n.value=new bl(r.value),await n.value.register(),He()}catch{}}},He=()=>{m=new AbortController;const{signal:k}=m;let B=Date.now();const H=5e3,X=(Ye=1e3)=>{w&&clearTimeout(w),w=setTimeout(async()=>{w=null,await xe()},Ye)},$=()=>{if(document.visibilityState==="visible"){const Ye=Date.now()-B;Ye>H?(console.log(`[SipJs] Device was suspended for ${Math.round(Ye/1e3)}s, reconnecting...`),X(1500)):X(500)}B=Date.now()},J=()=>{console.log("[SipJs] Network online, reconnecting..."),X(1e3)},G=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),w&&(clearTimeout(w),w=null)},_e=()=>{x=setInterval(()=>{const Ye=Date.now(),br=Ye-B;br>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(br/1e3)}s), device may have woken from sleep`),X(1500)),B=Ye},1e3)},$e=()=>{console.log("[SipJs] Page frozen"),x&&(clearInterval(x),x=null)},Le=()=>{console.log("[SipJs] Page resumed"),B=Date.now(),_e(),X(1e3)};document.addEventListener("visibilitychange",$,{signal:k}),window.addEventListener("online",J,{signal:k}),window.addEventListener("offline",G,{signal:k}),document.addEventListener("freeze",$e,{signal:k}),document.addEventListener("resume",Le,{signal:k}),_e()},xe=async()=>{if(r.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}if(s.value.size>0){console.log("[SipJs] Skipping reconnect, active calls in progress");return}try{if(r.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await r.value.reconnect()),n.value&&r.value.isConnected())try{await n.value.register()}catch{}}catch(k){console.error("[SipJs] Reconnection failed:",k)}}},Ae=async()=>{m?.abort(),m=null,w&&(clearTimeout(w),w=null),x&&(clearInterval(x),x=null);const k=n.value,B=r.value;if(n.value=null,r.value=null,k)try{await k.unregister()}catch(H){console.warn("[SipJs] Unregister failed:",H)}if(B)try{await B.stop()}catch(H){console.warn("[SipJs] UserAgent stop failed:",H)}},Je=k=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",k.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",k.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",k.remoteIdentity.displayName);const B=e.channels.value.find(J=>J.status==="idle");if(!B){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),k.reject();return}const H=B.id;s.value.set(H,k);const X=k.body?k.body.includes("m=video"):!1,$=cp(k.remoteIdentity.uri.user,k.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",$),console.log("[SipJs] 🎥 Video:",X?"Sí":"No"),e.updateChannelState(H,{status:"incoming",remoteNumber:$,remoteDisplayName:k.remoteIdentity.displayName||void 0,hasVideo:X}),M(k,H,"incoming",$),N(H,"ringing"),A(),e.setActiveChannelId(H),k.stateChange.addListener(J=>{switch(J){case U.Terminated:{const G=e.channels.value.find($e=>$e.id===H),_e=cp(k.remoteIdentity.uri.user,k.remoteIdentity.displayName);if(G?.status==="connected"){const $e=Math.floor((Date.now()-(G.startTime||Date.now()))/1e3);e.addCallLog({number:_e,direction:"incoming",status:"answered",startTime:G.startTime||Date.now(),duration:$e})}else G?.status==="incoming"&&e.addCallLog({number:_e,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});N(H,d.has(H)?"ended":"failed"),E(H),e.updateChannelState(H,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),s.value.delete(H),e.activeChannelId.value===H&&ie(),A();break}case U.Established:d.add(H),e.updateChannelState(H,{status:"connected",startTime:Date.now()}),N(H,"connected"),e.activeChannelId.value===H&&(ue(k),ce(k).then(()=>S(k,H))),A();break}})},at=async(k,B=!1)=>{if(!r.value)return;const H=e.activeChannelId.value;if(s.value.has(H))return;let X=yn.makeURI(k);if(!X&&r.value.configuration.uri){const G=r.value.configuration.uri.host;X=yn.makeURI(`sip:${k}@${G}`)}if(!X)return;const $=new _o(r.value,X);s.value.set(H,$),M($,H,"outgoing",k),N(H,"dialing"),e.updateChannelState(H,{status:"calling",remoteNumber:k,hasVideo:B}),e.setLastDialedNumber(k),A(),$.stateChange.addListener(G=>{switch(G){case U.Established:d.add(H),e.channels.value.find(_e=>_e.id===H)?.status!=="connected"&&(e.updateChannelState(H,{status:"connected",startTime:Date.now()}),N(H,"connected"),ue($),ce($).then(()=>S($,H)),A());break;case U.Terminated:{const _e=e.channels.value.find($e=>$e.id===H);if(_e?.status==="connected"){const $e=Math.floor((Date.now()-(_e.startTime||Date.now()))/1e3);e.addCallLog({number:k,direction:"outgoing",status:"answered",startTime:_e.startTime||Date.now(),duration:$e})}else e.addCallLog({number:k,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});N(H,d.has(H)?"ended":"failed"),E(H),e.updateChannelState(H,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),s.value.delete(H),e.activeChannelId.value===H&&ie(),A();break}}});const J={sessionDescriptionHandlerOptions:{constraints:pe(B)},requestDelegate:{onProgress:G=>{(G.message.statusCode===180||G.message.statusCode===183)&&(G.message.body&&(e.updateChannelState(H,{hasEarlyMedia:!0}),ue($)),A())},onAccept:G=>{e.channels.value.find(_e=>_e.id===H)?.status!=="connected"&&(d.add(H),e.updateChannelState(H,{status:"connected",startTime:Date.now()}),N(H,"connected"),ue($),ce($).then(()=>S($,H)),A())}}};await $.invite(J)},De=async(k=!1)=>{const B=e.activeChannelId.value,H=s.value.get(B);if(H instanceof ys&&H.state===U.Initial){for(const[$,J]of s.value.entries())if($!==e.activeChannelId.value&&J.state===U.Established&&!e.channels.value.find(G=>G.id===$)?.isHeld)try{await et(J,!0),e.updateChannelState($,{isHeld:!0})}catch(G){console.error(`[SipJs] Failed to hold channel ${$}:`,G)}const X={sessionDescriptionHandlerOptions:{constraints:pe(k)}};e.updateChannelState(B,{status:"connected",startTime:Date.now()});try{await H.accept(X),await ce(H),A()}catch($){const J=s.value.get(B);throw J instanceof ys&&J.state===U.Initial&&e.updateChannelState(B,{status:"incoming",startTime:void 0}),$}}},ct=async()=>{const k=s.value.get(e.activeChannelId.value);if(k)switch(k.state){case U.Initial:case U.Establishing:k instanceof _o?await k.cancel():k instanceof ys&&await k.reject();break;case U.Established:await k.bye();break}},ht=()=>{const k=s.value.get(e.activeChannelId.value);if(!k)return;const B=!e.isMuted.value;e.setMuted(B),le(k,e.channels.value.find(H=>H.id===e.activeChannelId.value))},et=async(k,B)=>{const H={sessionDescriptionHandlerOptions:{hold:B}};await k.invite(H)},I=async()=>{const k=s.value.get(e.activeChannelId.value);if(k?.state!==U.Established)return;const B=!e.isHeld.value;try{await et(k,B),e.setHeld(B),le(k,e.channels.value.find(H=>H.id===e.activeChannelId.value))}catch{}},O=async k=>{const B=e.activeChannelId.value;if(B===k)return;const H=s.value.get(B),X=s.value.get(k),$=e.channels.value.find(G=>G.id===B),J=e.channels.value.find(G=>G.id===k);if(H&&H.state===U.Established&&!$?.isHeld)try{await et(H,!0),e.updateChannelState(B,{isHeld:!0}),le(H,e.channels.value.find(G=>G.id===B))}catch{}if(e.setActiveChannelId(k),A(),X&&X.state===U.Established){if(J?.isHeld)try{await et(X,!1),e.updateChannelState(k,{isHeld:!1})}catch{}le(X,e.channels.value.find(G=>G.id===k)),ue(X)}else ie()},W=k=>{const B=s.value.get(e.activeChannelId.value);if(B?.state!==U.Established)return;const H={requestOptions:{body:{content:`Signal=${k}\r
68
- Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};B.info(H)},ae=(k,B)=>{const H=e.channels.value.find(X=>X.id===k);!H||H.status!=="connected"||(ue(B),le(B,H),ce(B),i.play().catch(()=>{}))},re=async k=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",k);const B=e.activeChannelId.value,H=s.value.get(B);if(!H)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",B),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",H.state),console.log("[SipJs] Dialog ID:",H.dialog?.id),console.log("[SipJs] Call ID:",H.dialog?.callId),H.state!==U.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",H.state),new Error(`Cannot transfer call. Call is not established (state: ${H.state})`);let X=yn.makeURI(k);if(!X&&r.value?.configuration.uri){const $=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",$),X=yn.makeURI(`sip:${k}@${$}`)}if(!X)throw console.error("[SipJs] ❌ URI de destino inválida:",k),new Error(`Invalid transfer target: ${k}`);console.log("[SipJs] 📤 URI de transferencia:",X.toString()),console.log("[SipJs] URI scheme:",X.scheme),console.log("[SipJs] URI user:",X.user),console.log("[SipJs] URI host:",X.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await H.refer(X,{requestDelegate:{onAccept:$=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",$.message)},onReject:$=>{const J=$.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",J),console.error("[SipJs] Response completo:",$.message),ae(B,H)}},onNotify:$=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",$.request),$.accept();const J=$.request.body;if(console.log("[SipJs] NOTIFY body:",J),J){const G=J.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(G&&G[1]){const _e=parseInt(G[1],10),$e=G[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",_e),console.log("[SipJs] 📊 Status text:",$e),_e>=200&&_e<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{H.bye().catch(Le=>{console.warn("[SipJs] Error hanging up after successful transfer:",Le)})},500);else if(_e>=400){console.error("[SipJs] ❌ Transfer falló con status:",_e,$e),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Le={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[_e]||`Error en transferencia (código ${_e})`;console.warn("[SipJs] 💬",Le),ae(B,H)}else _e>=100&&_e<200&&console.log("[SipJs] 📞 Transferencia en progreso:",_e,$e)}else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body")}else console.warn("[SipJs] ⚠️ NOTIFY sin body")}}),console.log("[SipJs] ✅ REFER enviado exitosamente (promesa resuelta)")}catch($){throw console.error("[SipJs] ❌ Error en transferCall:",$),console.error("[SipJs] Error type:",$?.constructor?.name),console.error("[SipJs] Error message:",$ instanceof Error?$.message:String($)),console.error("[SipJs] Error stack:",$ instanceof Error?$.stack:"N/A"),$}},se=async k=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",k);const B=e.activeChannelId.value,H=s.value.get(B);if(console.log("[SipJs] Canal original:",B),console.log("[SipJs] Sesión original:",H?.state),!H||H.state!==U.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const X=e.channels.value.find($=>$.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",X?.id),!X)throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"),new Error("No available channel for consultation call");try{console.log("[SipJs] 🔇 Poniendo llamada original en hold..."),await et(H,!0),e.updateChannelState(B,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch($){throw console.error("[SipJs] ❌ Failed to hold original call:",$),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",X.id),e.setActiveChannelId(X.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",k),await at(k,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:B,consultationChannelId:X.id,targetNumber:k}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch($){throw console.error("[SipJs] ❌ Failed to start consultation call:",$),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(B),await et(H,!1).catch(()=>{}),e.updateChannelState(B,{isHeld:!1}),new Error("Failed to initiate consultation call")}},fe=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const k=e.transferInProgress.value;if(!k)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",k);const B=s.value.get(k.originalChannelId),H=s.value.get(k.consultationChannelId);if(console.log("[SipJs] Sesión original:",B?.state),console.log("[SipJs] Sesión de consulta:",H?.state),!B||!H)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(H.state!==U.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",H.state),new Error("Consultation call not established");const X=H.dialog;if(!X)throw new Error("No dialog available for consultation session");const $=X.callId,J=X.remoteTag,G=X.localTag;let _e=yn.makeURI(k.targetNumber);if(!_e&&r.value?.configuration.uri){const Le=r.value.configuration.uri.host;_e=yn.makeURI(`sip:${k.targetNumber}@${Le}`)}if(!_e)throw new Error("Invalid transfer target URI");const $e=`${encodeURIComponent($)}%3Bto-tag%3D${encodeURIComponent(J)}%3Bfrom-tag%3D${encodeURIComponent(G)}`;_e.setHeader("Replaces",$e);try{await B.refer(_e,{onNotify:Le=>{Le.accept();const Ye=Le.request.body,br=typeof Ye=="string"?Ye:Ye&&typeof Ye=="object"&&"content"in Ye?Ye.content:void 0;if(br){const ks=br.match(/SIP\/2\.0\s+(\d+)/);if(ks&&ks[1]){const bt=parseInt(ks[1]);bt>=200&&bt<300?setTimeout(()=>{B.bye().catch(()=>{}),H.bye().catch(()=>{}),e.setTransferInProgress(null)},500):bt>=400&&(console.error("[SipJs] Attended transfer failed with status:",bt),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Le=>{console.error("[SipJs] Attended transfer REFER rejected:",Le.message.statusCode),e.setTransferInProgress(null)}}})}catch(Le){throw console.error("[SipJs] Attended transfer failed:",Le),Le}},de=async()=>{const k=e.transferInProgress.value;if(!k)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const B=s.value.get(k.originalChannelId),H=s.value.get(k.consultationChannelId);if(H)try{await H.bye(),console.log("[SipJs] Consultation call ended")}catch(X){console.warn("[SipJs] Error ending consultation:",X)}if(B)try{e.setActiveChannelId(k.originalChannelId),await et(B,!1),e.updateChannelState(k.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(X){console.warn("[SipJs] Error resuming original call:",X)}e.setTransferInProgress(null)},ue=k=>{const B=k.sessionDescriptionHandler;if(!B){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const H=B.remoteMediaStream;if(!H){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===H)return;i.pause(),i.srcObject=null,p?.abort(),p=new AbortController,a.value=H,l.value=B.localMediaStream??null;const X=K(k);le(k,X),X&&S(k,X.id);const $=G=>{h?.abort(),h=new AbortController;const{signal:_e}=h,$e=()=>{i.play().catch(Le=>{Le.name!=="AbortError"&&console.error("[SipJs] play() failed:",Le.name,Le.message)})};G.addEventListener("unmute",()=>{$e()},{signal:_e}),$e()};H.addEventListener("addtrack",G=>{G.track.kind==="audio"&&(i.srcObject=null,i.srcObject=H,$(G.track),X&&S(k,X.id))},{signal:p.signal});const[J]=H.getTracks();J&&(i.srcObject=H,$(J),X&&S(k,X.id))},ie=()=>{h?.abort(),h=null,p?.abort(),p=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:Ce,stop:Ae,makeCall:at,answerCall:De,hangupCall:ct,toggleMute:ht,toggleHold:I,sendDTMF:W,transferCall:re,startAttendedTransfer:se,completeAttendedTransfer:fe,cancelAttendedTransfer:de,switchChannel:O,extension:v,setVolume:Z,setNotificationVolume:T,setOutputDevice:ee,setInputDevice:z,remoteStream:a,localStream:l}};var dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const fp=Vf,Xw=(e,t)=>r=>{var n;if(t?.variants==null)return fp(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const u=r?.[l],c=i?.[l];if(u===null)return null;const d=dp(u)||dp(c);return s[l][d]}),a=r&&Object.entries(r).reduce((l,u)=>{let[c,d]=u;return d===void 0||(l[c]=d),l},{});return fp(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:c,className:d,...p}=u;return Object.entries(p).every(h=>{let[m,w]=h;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...l,c,d]:l},[]),r?.class,r?.className)};function Qw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ey(e,t,r){Qw(e,t),t.set(e,r)}function ty(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function Io(e,t){return e.get(ty(e,t))}function pp(e){return typeof e=="string"?`'${e}'`:new ry().serialize(e)}var ry=(function(){var e=new WeakMap;class t{constructor(){ey(this,e,new Map)}compare(n,s){const i=typeof n,o=typeof s;return i==="string"&&o==="string"?n.localeCompare(s):i==="number"&&o==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const i=n.constructor,o=i===Object||i===void 0?"":i.name;if(o!==""&&globalThis[o]===i)return this.serializeBuiltInType(o,n);if(typeof n.toJSON=="function"){const a=n.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(n))}serializeBuiltInType(n,s){const i=this["$"+n];if(i)return i.call(this,s);if(typeof s?.entries=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const i=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${n}{`;for(let a=0;a<i.length;a++){const[l,u]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(u)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=Io(e,this).get(n);return s===void 0&&(Io(e,this).set(n,`#${Io(e,this).size}`),s=this.serializeObject(n),Io(e,this).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let i=0;i<n.length;i++)s+=this.serialize(n[i]),i<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,i)=>this.compare(s,i)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const r of["Error","RegExp","URL"])t.prototype["$"+r]=function(n){return`${r}(${n})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join("n,")}${n.length>0?"n":""}]`};return t})();function ny(e,t){return e===t||pp(e)===pp(t)}function mi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Rt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Dt(n,o);if(a||a===null)return a;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Hn(n,o),o)]}function Wt(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Il(e,t,r){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(s)}function Rl(e){return e==null}function kl(e){return e?e.flatMap(t=>t.type===Be?kl(t.children):[t]):[]}var[Ro,lx]=Rt("ConfigProvider");function sy(e,t){var r;const n=rt();return tt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Et(n)}function Cn(e,t){return $i()?(ua(e,t),!0):!1}function iy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Cn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function oy(e){let t=!1,r;const n=ca(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var kt=typeof window<"u"&&typeof document<"u",cx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,ay=e=>typeof e<"u",ly=Object.prototype.toString,cy=e=>ly.call(e)==="[object Object]",Yr=()=>{},$l=uy();function uy(){var e,t,r;return kt&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((r=window)===null||r===void 0?void 0:r.navigator.userAgent))}function dy(...e){if(e.length!==1)return Sa(...e);const t=e[0];return typeof t=="function"?Et(Fs(()=>({get:t,set:Yr}))):F(t)}function hp(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}var gp=e=>e();function fy(e,t={}){let r,n,s=Yr;const i=l=>{clearTimeout(l),s(),s=Yr};let o;return l=>{const u=Se(e),c=Se(t.maxWait);return r&&i(r),u<=0||c!==void 0&&c<=0?(n&&(i(n),n=void 0),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,c&&!n&&(n=setTimeout(()=>{r&&i(r),n=void 0,d(o())},c)),r=setTimeout(()=>{n&&i(n),n=void 0,d(l())},u)})}}function py(e=gp,t={}){const{initialState:r="active"}=t,n=dy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Et(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Pl(e){return Array.isArray(e)?e:[e]}function vp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var hy=/\B([A-Z])/g,ux=vp(e=>e.replace(hy,"-$1").toLowerCase()),gy=/-(\w)/g,dx=vp(e=>e.replace(gy,(t,r)=>r?r.toUpperCase():""));function mp(e){return e||ot()}function vy(e){if(!kt)return e;let t=0,r,n;const s=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return((...i)=>(t+=1,n||(n=ca(!0),r=n.run(()=>e(...i))),Cn(s),r))}function my(e){return Nr(We(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return We(e.value[r])&&!We(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function wy(e){return my(V(e))}function Vt(e,...t){const r=t.flat(),n=r[0];return wy(()=>Object.fromEntries(typeof n=="function"?Object.entries(At(e)).filter(([s,i])=>!n(Se(i),s)):Object.entries(At(e)).filter(s=>!r.includes(s[0]))))}function wp(e,t=1e4){return Fs((r,n)=>{let s=Se(e),i;const o=()=>setTimeout(()=>{s=Se(e),n()},Se(t));return Cn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Dl(e,t=200,r={}){return hp(fy(t,r),e)}function yy(e,t,r={}){const{eventFilter:n=gp,...s}=r;return Ie(e,hp(n,t),s)}function by(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=py(n,{initialState:s});return{stop:yy(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function _y(e,t={}){if(!We(e))return At(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=Fs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=Se(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function Sy(e,t){mp(t)&&ps(e,t)}function Cy(e,t=!0,r){mp(r)?Ke(e,r):t?e():vt(e)}function xy(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=rt(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Se(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&kt&&u(),(We(t)||typeof t=="function")&&Cn(Ie(t,()=>{o.value&&kt&&u()})),Cn(l),{isActive:qr(o),pause:l,resume:u}}function yp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=rt(!1);let o;function a(){o&&(clearTimeout(o),o=void 0)}function l(){i.value=!1,a()}function u(...c){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=void 0,e(...c)},Se(t))}return n&&(i.value=!0,kt&&u()),Cn(l),{isPending:qr(i),start:u,stop:l}}function Ty(e,t,r){return Ie(e,t,{...r,immediate:!0})}function Ey(e,t,r){return Ie(e,t,{...r,once:!0})}var mr=kt?window:void 0,fx=kt?window.document:void 0,px=kt?window.navigator:void 0,hx=kt?window.location:void 0;function jt(e){var t;const r=Se(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Mt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=V(()=>{const n=Pl(Se(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return Ty(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>jt(i)))!==null&&n!==void 0?n:[mr].filter(i=>i!=null),Pl(Se(r.value?e[1]:e[0])),Pl(f(r.value?e[2]:e[1])),Se(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=cy(o)?{...o}:o,c=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}var bp=!1;function Ay(e,t,r={}){const{window:n=mr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Yr,cancel:Yr,trigger:Yr}:Yr;if($l&&!bp){bp=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",Yr,x)),n.document.documentElement.addEventListener("click",Yr,x)}let l=!0;const u=x=>Se(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(C=>C===x.target||x.composedPath().includes(C));{const C=jt(v);return C&&(x.target===C||x.composedPath().includes(C))}});function c(x){const v=Se(x);return v&&v.$.subTree.shapeFlag===16}function d(x,v){const C=Se(x),y=C.$.subTree&&C.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(b=>b.el===v.target||v.composedPath().includes(b.el))}const p=x=>{const v=jt(e);if(x.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,x))&&!(!v||v===x.target||x.composedPath().includes(v))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[Mt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),Mt(n,"pointerdown",x=>{const v=jt(e);l=!u(x)&&!!(v&&!x.composedPath().includes(v))},{passive:!0}),o&&Mt(n,"blur",x=>{setTimeout(()=>{var v;const C=jt(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!C?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function Ol(){const e=rt(!1),t=ot();return t&&Ke(()=>{e.value=!0},t),e}function _p(e){const t=Ol();return V(()=>(t.value,!!e()))}function Iy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ry(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:s=mr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Iy(t);return Mt(s,i,c=>{c.repeat&&Se(a)||l(c)&&r(c)},o)}function ky(e){return JSON.parse(JSON.stringify(e))}var ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$o="__vueuse_ssr_handlers__",$y=Py();function Py(){return $o in ko||(ko[$o]=ko[$o]||{}),ko[$o]}function Dy(e,t){return $y[e]||t}function Oy(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Hy={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Sp="vueuse-storage";function Po(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=mr,eventFilter:p,onError:h=Z=>{console.error(Z)},initOnMounted:m}=n,w=(c?rt:F)(typeof t=="function"?t():t),x=V(()=>Se(e));if(!r)try{r=Dy("getDefaultStorage",()=>mr?.localStorage)()}catch(Z){h(Z)}if(!r)return w;const v=Se(t),C=Oy(v),y=(s=n.serializer)!==null&&s!==void 0?s:Hy[C],{pause:b,resume:_}=by(w,Z=>N(Z),{flush:i,deep:o,eventFilter:p});Ie(x,()=>E(),{flush:i});let T=!1;const P=Z=>{m&&!T||E(Z)},g=Z=>{m&&!T||A(Z)};d&&a&&(r instanceof Storage?Mt(d,"storage",P,{passive:!0}):Mt(d,Sp,g)),m?Cy(()=>{T=!0,E()}):E();function M(Z,ee){if(d){const z={key:x.value,oldValue:Z,newValue:ee,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",z):new CustomEvent(Sp,{detail:z}))}}function N(Z){try{const ee=r.getItem(x.value);if(Z==null)M(ee,null),r.removeItem(x.value);else{const z=y.write(Z);ee!==z&&(r.setItem(x.value,z),M(ee,z))}}catch(ee){h(ee)}}function S(Z){const ee=Z?Z.newValue:r.getItem(x.value);if(ee==null)return l&&v!=null&&r.setItem(x.value,y.write(v)),v;if(!Z&&u){const z=y.read(ee);return typeof u=="function"?u(z,v):C==="object"&&!Array.isArray(z)?{...v,...z}:z}else return typeof ee!="string"?ee:y.read(ee)}function E(Z){if(!(Z&&Z.storageArea!==r)){if(Z&&Z.key==null){w.value=v;return}if(!(Z&&Z.key!==x.value)){b();try{const ee=y.write(w.value);(Z===void 0||Z?.newValue!==ee)&&(w.value=S(Z))}catch(ee){h(ee)}finally{Z?vt(_):_()}}}}function A(Z){E(Z.detail)}return w}var Do={speed:2,margin:30,direction:"both"};function My(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function Ny(e,t={}){var r,n,s,i;const{pointerTypes:o,preventDefault:a,stopPropagation:l,exact:u,onMove:c,onEnd:d,onStart:p,initialValue:h,axis:m="both",draggingElement:w=mr,containerElement:x,handle:v=e,buttons:C=[0],restrictInView:y,autoScroll:b=!1}=t,_=F((r=Se(h))!==null&&r!==void 0?r:{x:0,y:0}),T=F(),P=ce=>o?o.includes(ce.pointerType):!0,g=ce=>{Se(a)&&ce.preventDefault(),Se(l)&&ce.stopPropagation()},M=Se(b),N=typeof M=="object"?{speed:(n=Se(M.speed))!==null&&n!==void 0?n:Do.speed,margin:(s=Se(M.margin))!==null&&s!==void 0?s:Do.margin,direction:(i=M.direction)!==null&&i!==void 0?i:Do.direction}:Do,S=ce=>typeof ce=="number"?[ce,ce]:[ce.x,ce.y],E=(ce,pe,Ce)=>{const{clientWidth:He,clientHeight:xe,scrollLeft:Ae,scrollTop:Je,scrollWidth:at,scrollHeight:De}=ce,[ct,ht]=S(N.margin),[et,I]=S(N.speed);let O=0,W=0;(N.direction==="x"||N.direction==="both")&&(Ce.x<ct&&Ae>0?O=-et:Ce.x+pe.width>He-ct&&Ae<at-He&&(O=et)),(N.direction==="y"||N.direction==="both")&&(Ce.y<ht&&Je>0?W=-I:Ce.y+pe.height>xe-ht&&Je<De-xe&&(W=I)),(O||W)&&ce.scrollBy({left:O,top:W,behavior:"auto"})};let A=null;const Z=()=>{const ce=Se(x);ce&&!A&&(A=setInterval(()=>{const pe=Se(e).getBoundingClientRect(),{x:Ce,y:He}=_.value,xe={x:Ce-ce.scrollLeft,y:He-ce.scrollTop};xe.x>=0&&xe.y>=0&&(E(ce,pe,xe),xe.x+=ce.scrollLeft,xe.y+=ce.scrollTop,_.value=xe)},1e3/60))},ee=()=>{A&&(clearInterval(A),A=null)},z=(ce,pe,Ce,He)=>{const[xe,Ae]=typeof Ce=="number"?[Ce,Ce]:[Ce.x,Ce.y],{clientWidth:Je,clientHeight:at}=pe;return ce.x<xe||ce.x+He.width>Je-xe||ce.y<Ae||ce.y+He.height>at-Ae},Q=()=>{if(Se(t.disabled)||!T.value)return;const ce=Se(x);if(!ce)return;const pe=Se(e).getBoundingClientRect(),{x:Ce,y:He}=_.value;z({x:Ce-ce.scrollLeft,y:He-ce.scrollTop},ce,N.margin,pe)?Z():ee()};Se(b)&&Ie(_,Q);const Y=ce=>{var pe;if(!Se(C).includes(ce.button)||Se(t.disabled)||!P(ce)||Se(u)&&ce.target!==Se(e))return;const Ce=Se(x),He=Ce==null||(pe=Ce.getBoundingClientRect)===null||pe===void 0?void 0:pe.call(Ce),xe=Se(e).getBoundingClientRect(),Ae={x:ce.clientX-(Ce?xe.left-He.left+(b?0:Ce.scrollLeft):xe.left),y:ce.clientY-(Ce?xe.top-He.top+(b?0:Ce.scrollTop):xe.top)};p?.(Ae,ce)!==!1&&(T.value=Ae,g(ce))},le=ce=>{if(Se(t.disabled)||!P(ce)||!T.value)return;const pe=Se(x);pe instanceof HTMLElement&&My(pe);const Ce=Se(e).getBoundingClientRect();let{x:He,y:xe}=_.value;if((m==="x"||m==="both")&&(He=ce.clientX-T.value.x,pe&&(He=Math.min(Math.max(0,He),pe.scrollWidth-Ce.width))),(m==="y"||m==="both")&&(xe=ce.clientY-T.value.y,pe&&(xe=Math.min(Math.max(0,xe),pe.scrollHeight-Ce.height))),Se(b)&&pe&&(A===null&&E(pe,Ce,{x:He,y:xe}),He+=pe.scrollLeft,xe+=pe.scrollTop),pe&&(y||b)){if(m!=="y"){const Ae=He-pe.scrollLeft;Ae<0?He=pe.scrollLeft:Ae>pe.clientWidth-Ce.width&&(He=pe.clientWidth-Ce.width+pe.scrollLeft)}if(m!=="x"){const Ae=xe-pe.scrollTop;Ae<0?xe=pe.scrollTop:Ae>pe.clientHeight-Ce.height&&(xe=pe.clientHeight-Ce.height+pe.scrollTop)}}_.value={x:He,y:xe},c?.(_.value,ce),g(ce)},K=ce=>{Se(t.disabled)||!P(ce)||T.value&&(T.value=void 0,b&&ee(),d?.(_.value,ce),g(ce))};if(kt){const ce=()=>{var pe;return{capture:(pe=t.capture)!==null&&pe!==void 0?pe:!0,passive:!Se(a)}};Mt(v,"pointerdown",Y,ce),Mt(w,"pointermove",le,ce),Mt(w,"pointerup",K,ce)}return{..._y(_),position:_,isDragging:V(()=>!!T.value),style:V(()=>`
67
+ `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};Bf.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var yn=class na{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=Ct.Stopped,this._stateEventEmitter=new ui,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},na.defaultOptions()),{sipjsId:Un(5)}),{uri:new fn("sip","anonymous."+Un(6),"anonymous.invalid")}),{viaHost:Un(12)+".invalid"}),na.stripUndefinedProperties(t)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const n=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+n}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new D0,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=yt.error;break;case"warn":this.loggerFactory.level=yt.warn;break;case"log":this.loggerFactory.level=yt.log;break;case"debug":this.loggerFactory.level=yt.debug;break;default:break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(r=>{const n=this.options[r];switch(r){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+r+": "+n);break;case"authorizationPassword":this.logger.log("· "+r+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+r+": "+n.name);break;default:this.logger.log("· "+r+": "+JSON.stringify(n))}})),this.options.transportOptions){const r=this.options.transportOptions,n=r.maxReconnectionAttempts,s=r.reconnectionTimeout;n!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),s!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionDelay===void 0&&s!==void 0&&(this.options.reconnectionDelay=s),t.reconnectionAttempts===void 0&&n!==void 0&&(this.options.reconnectionAttempts=n)}if(t.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:na.newUUID(),pt.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return pt.URIParse(t)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:nw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:wr.Unsupported,sipExtensionReplaces:wr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:Bf,transportOptions:{},uri:new fn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+b0,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.floor(Math.random()*16);return(t==="x"?r:r%4+8).toString(16)})}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(t,r){return this.loggerFactory.getLogger(t,r)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===Ct.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===Ct.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(Ct.Started),this.transport.connect())}async stop(){if(this.state===Ct.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(Ct.Stopped),Promise.resolve();const t=Object.assign({},this._publishers),r=Object.assign({},this._registerers),n=Object.assign({},this._sessions),s=Object.assign({},this._subscriptions),i=this.transport,o=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in r)r[a]&&await r[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._registerers[a],l});this.logger.log("Dispose of sessions");for(const a in n)n[a]&&await n[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._sessions[a],l});this.logger.log("Dispose of subscriptions");for(const a in s)s[a]&&await s[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._subscriptions[a],l});this.logger.log("Dispose of publishers");for(const a in t)t[a]&&await t[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._publishers[a],l});this.logger.log("Dispose of transport"),await i.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),o.dispose(),this.transitionState(Ct.Stopped)}_makeInviter(t,r){return new _o(this,t,r)}attemptReconnection(t=1){const r=this.options.reconnectionAttempts,n=this.options.reconnectionDelay;if(t>r){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${t} of ${r} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${t} of ${r} - succeeded`)}).catch(s=>{this.logger.error(s.message),this.logger.log(`Reconnection attempt ${t} of ${r} - failed`),this.attemptReconnection(++t)})},t===1?0:n*1e3)}initContact(){const t=this.options.contactName!==""?this.options.contactName:Un(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new fn("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===wr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===wr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>$0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Q0({aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:t,supportedOptionTagsResponse:r,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const n=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,s=this.options.authorizationPassword?this.options.authorizationPassword:void 0,i=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new P0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new bs(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==wr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const u=o.replaces_from_tag;if(typeof u!="string")throw new Error("type of from tag is not string");const c=a+l+u,d=this.userAgentCore.dialogs.get(c);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const p=this._sessions[a+u]||this._sessions[a+l]||void 0;if(!p)throw new Error("Session does not exist.");i._replacee=p}}if(!((s=this.delegate)===null||s===void 0)&&s.onInvite){if(i.autoSendAnInitialProvisionalResponse){i.progress().then(()=>{var o;if(((o=this.delegate)===null||o===void 0?void 0:o.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(i)});return}this.delegate.onInvite(i);return}i.reject({statusCode:486})},onMessage:n=>{if(this.delegate&&this.delegate.onMessage){const s=new If(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new wl(n);this.delegate.onNotify(s)}else this.options.allowLegacyNotifications?n.accept():n.reject({statusCode:481})},onRefer:n=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(n):n.reject({statusCode:405})},onRegister:n=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(n):n.reject({statusCode:405})},onSubscribe:n=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(n):n.reject({statusCode:405})}})}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=t=>this.onTransportDisconnect(t),this.transport.onMessage=t=>this.onTransportMessage(t)}onTransportConnect(){this.state!==Ct.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==Ct.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=So.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===Ct.Stopped&&r instanceof ys){this.logger.warn(`Received ${r.method} request while stopped. Dropping.`);return}const n=()=>{for(const s of["from","to","call_id","cseq","via"])if(!r.hasHeader(s))return this.logger.warn(`Missing mandatory header field : ${s}.`),!1;return!0};if(r instanceof ys){if(!n()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!r.toTag&&r.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(r,{statusCode:482});return}const s=di(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof pn){if(!n()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(r.via.host!==this.options.viaHost||r.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const s=di(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(r instanceof ys){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof pn){this.userAgentCore.receiveIncomingResponseFromTransport(r);return}throw new Error("Invalid message type.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ct.Started:t!==Ct.Stopped&&n();break;case Ct.Stopped:t!==Ct.Started&&n();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${t}`),this._state=t,this._stateEventEmitter.emit(this._state)}},bt=new window.AudioContext,sw={1:[697,1209],2:[697,1336],3:[697,1477],A:[697,1633],4:[770,1209],5:[770,1336],6:[770,1477],B:[770,1633],7:[852,1209],8:[852,1336],9:[852,1477],C:[852,1633],"*":[941,1209],0:[941,1336],"#":[941,1477],D:[941,1633]},pi=V(null),hi=V(null),gi=V(.5);const Lf=()=>({playDtmf:(o,a=150)=>{bt.state==="suspended"&&bt.resume();const l=sw[o.toUpperCase()];if(!l)return;const u=bt.createOscillator(),c=bt.createOscillator(),d=bt.createGain();u.frequency.value=l[0],c.frequency.value=l[1],u.type="sine",c.type="sine",d.gain.value=.1*gi.value,u.connect(d),c.connect(d),d.connect(bt.destination),u.start(),c.start(),setTimeout(()=>{u.stop(),c.stop(),u.disconnect(),c.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(pi.value)return;bt.state==="suspended"&&bt.resume();const o=()=>{const a=bt.currentTime,l=bt.createOscillator(),u=bt.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),u.gain.setValueAtTime(.1*gi.value,a),u.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(u),u.connect(bt.destination),l.start(a),l.stop(a+.5)};o(),pi.value=window.setInterval(()=>{o(),setTimeout(o,400)},3e3)},stopRingtone:()=>{pi.value&&(clearInterval(pi.value),pi.value=null)},startRingback:()=>{if(hi.value)return;bt.state==="suspended"&&bt.resume();const o=()=>{const a=bt.currentTime,l=bt.createOscillator(),u=bt.createGain();l.type="sine",l.frequency.value=425,u.gain.setValueAtTime(.1*gi.value,a),u.gain.linearRampToValueAtTime(.1*gi.value,a+1),u.gain.linearRampToValueAtTime(0,a+1.1),l.connect(u),u.connect(bt.destination),l.start(a),l.stop(a+1.1)};o(),hi.value=window.setInterval(()=>{o()},4e3)},stopRingback:()=>{hi.value&&(clearInterval(hi.value),hi.value=null)},setNotificationVolume:o=>{gi.value=Math.max(0,Math.min(1,o/100))}});function Ff(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Ff(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Vf(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ff(e))&&(n&&(n+=" "),n+=t);return n}var iw=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},ow=(e,t)=>({classGroupId:e,validator:t}),jf=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),To="-",Uf=[],aw="arbitrary..",lw=e=>{const t=uw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return cw(o);const a=o.split(To);return zf(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?iw(u,l):l:u||Uf}return r[o]||Uf}}},zf=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=zf(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(To):e.slice(t).join(To),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},cw=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?aw+n:void 0})(),uw=e=>{const{theme:t,classGroups:r}=e;return dw(r,t)},dw=(e,t)=>{const r=jf();for(const n in e){const s=e[n];Cl(s,r,n,t)}return r},Cl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];fw(o,t,r,n)}},fw=(e,t,r,n)=>{if(typeof e=="string"){pw(e,t,r);return}if(typeof e=="function"){hw(e,t,r,n);return}gw(e,t,r,n)},pw=(e,t,r)=>{const n=e===""?t:Kf(t,e);n.classGroupId=r},hw=(e,t,r,n)=>{if(vw(e)){Cl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ow(r,e))},gw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Cl(l,Kf(t,a),r,n)}},Kf=(e,t)=>{let r=e;const n=t.split(To),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=jf(),r.nextPart.set(o,a)),r=a}return r},vw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,mw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},xl="!",Wf=":",ww=[],Gf=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),yw=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Wf){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(xl)?(p=d.slice(0,-1),h=!0):d.startsWith(xl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Gf(i,h,p,m)};if(t){const s=t+Wf,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Gf(ww,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},bw=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let i=0;i<r.length;i++){const o=r[i],a=o[0]==="[",l=t.has(o);a||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},_w=e=>({cache:mw(e.cacheSize),parseClassName:yw(e),sortModifiers:bw(e),...lw(e)}),Sw=/\s+/,Cw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Sw);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,v=n(x?m.substring(0,w):m);if(!v){if(!x){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}x=!1}const C=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=h?C+xl:C,b=y+v;if(o.indexOf(b)>-1)continue;o.push(b);const _=s(v,x);for(let T=0;T<_.length;++T){const P=_[T];o.push(y+P)}l=c+(l.length>0?" "+l:l)}return l},xw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Jf(r))&&(s&&(s+=" "),s+=n);return s},Jf=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Jf(e[n]))&&(r&&(r+=" "),r+=t);return r},Tw=(e,...t)=>{let r,n,s,i;const o=l=>(r=_w(t.reduce((u,c)=>c(u),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const u=n(l);if(u)return u;const c=Cw(l,r);return s(l,c),c};return i=o,(...l)=>i(xw(...l))},Ew=[],ht=e=>{const t=r=>r[e]||Ew;return t.isThemeGetter=!0,t},Yf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Aw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$w=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bn=e=>Aw.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),_n=e=>!!e&&Number.isInteger(Number(e)),Tl=e=>e.endsWith("%")&&De(e.slice(0,-1)),Jr=e=>Iw.test(e),Xf=()=>!0,Dw=e=>Rw.test(e)&&!kw.test(e),El=()=>!1,Ow=e=>$w.test(e),Hw=e=>Pw.test(e),Mw=e=>!we(e)&&!be(e),Nw=e=>Sn(e,sp,El),we=e=>Yf.test(e),zn=e=>Sn(e,ip,Dw),Qf=e=>Sn(e,zw,De),qw=e=>Sn(e,ap,Xf),Bw=e=>Sn(e,op,El),ep=e=>Sn(e,rp,El),Lw=e=>Sn(e,np,Hw),Eo=e=>Sn(e,lp,Ow),be=e=>Zf.test(e),vi=e=>Kn(e,ip),Fw=e=>Kn(e,op),tp=e=>Kn(e,rp),Vw=e=>Kn(e,sp),jw=e=>Kn(e,np),Ao=e=>Kn(e,lp,!0),Uw=e=>Kn(e,ap,!0),Sn=(e,t,r)=>{const n=Yf.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Kn=(e,t,r=!1)=>{const n=Zf.exec(e);return n?n[1]?t(n[1]):r:!1},rp=e=>e==="position"||e==="percentage",np=e=>e==="image"||e==="url",sp=e=>e==="length"||e==="size"||e==="bg-size",ip=e=>e==="length",zw=e=>e==="number",op=e=>e==="family-name",ap=e=>e==="number"||e==="weight",lp=e=>e==="shadow",Kw=()=>{const e=ht("color"),t=ht("font"),r=ht("text"),n=ht("font-weight"),s=ht("tracking"),i=ht("leading"),o=ht("breakpoint"),a=ht("container"),l=ht("spacing"),u=ht("radius"),c=ht("shadow"),d=ht("inset-shadow"),p=ht("text-shadow"),h=ht("drop-shadow"),m=ht("blur"),w=ht("perspective"),x=ht("aspect"),v=ht("ease"),C=ht("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...b(),be,we],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],g=()=>[be,we,l],H=()=>[bn,"full","auto",...g()],M=()=>[_n,"none","subgrid",be,we],S=()=>["auto",{span:["full",_n,be,we]},_n,be,we],E=()=>[_n,"auto",be,we],A=()=>["auto","min","max","fr",be,we],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...g()],X=()=>[bn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],Y=()=>[bn,"screen","full","dvw","lvw","svw","min","max","fit",...g()],ae=()=>[bn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],W=()=>[e,be,we],le=()=>[...b(),tp,ep,{position:[be,we]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",Vw,Nw,{size:[be,we]}],He=()=>[Tl,vi,zn],Te=()=>["","none","full",u,be,we],Ie=()=>["",De,vi,zn],Ye=()=>["solid","dashed","dotted","double"],at=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Pe=()=>[De,Tl,tp,ep],lt=()=>["","none",m,be,we],gt=()=>["none",De,be,we],ut=()=>["none",De,be,we],I=()=>[De,be,we],O=()=>[bn,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Jr],breakpoint:[Jr],color:[Xf],container:[Jr],"drop-shadow":[Jr],ease:["in","out","in-out"],font:[Mw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Jr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Jr],shadow:[Jr],spacing:["px",De],text:[Jr],"text-shadow":[Jr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bn,we,be,x]}],container:["container"],columns:[{columns:[De,we,be,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[_n,"auto",be,we]}],basis:[{basis:[bn,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,bn,"auto","initial","none",we]}],grow:[{grow:["",De,be,we]}],shrink:[{shrink:["",De,be,we]}],order:[{order:[_n,"first","last","none",be,we]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:g()}],px:[{px:g()}],py:[{py:g()}],ps:[{ps:g()}],pe:[{pe:g()}],pbs:[{pbs:g()}],pbe:[{pbe:g()}],pt:[{pt:g()}],pr:[{pr:g()}],pb:[{pb:g()}],pl:[{pl:g()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,vi,zn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Uw,qw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tl,we]}],"font-family":[{font:[Fw,Bw,t]}],"font-features":[{"font-features":[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,be,we]}],"line-clamp":[{"line-clamp":[De,"none",be,Qf]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",be,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",be,zn]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[De,"auto",be,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",be,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_n,be,we],radial:["",be,we],conic:[_n,be,we]},jw,Lw]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:He()}],"gradient-via-pos":[{via:He()}],"gradient-to-pos":[{to:He()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:Ie()}],"border-w-x":[{"border-x":Ie()}],"border-w-y":[{"border-y":Ie()}],"border-w-s":[{"border-s":Ie()}],"border-w-e":[{"border-e":Ie()}],"border-w-bs":[{"border-bs":Ie()}],"border-w-be":[{"border-be":Ie()}],"border-w-t":[{"border-t":Ie()}],"border-w-r":[{"border-r":Ie()}],"border-w-b":[{"border-b":Ie()}],"border-w-l":[{"border-l":Ie()}],"divide-x":[{"divide-x":Ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ye(),"hidden","none"]}],"divide-style":[{divide:[...Ye(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-bs":[{"border-bs":W()}],"border-color-be":[{"border-be":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,be,we]}],"outline-w":[{outline:["",De,vi,zn]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",c,Ao,Eo]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",d,Ao,Eo]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[De,zn]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Ie()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,Ao,Eo]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[De,be,we]}],"mix-blend":[{"mix-blend":[...at(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":at()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":Pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Pe()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":Pe()}],"mask-image-t-to-pos":[{"mask-t-to":Pe()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":Pe()}],"mask-image-r-to-pos":[{"mask-r-to":Pe()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":Pe()}],"mask-image-b-to-pos":[{"mask-b-to":Pe()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":Pe()}],"mask-image-l-to-pos":[{"mask-l-to":Pe()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":Pe()}],"mask-image-x-to-pos":[{"mask-x-to":Pe()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":Pe()}],"mask-image-y-to-pos":[{"mask-y-to":Pe()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[be,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":Pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Pe()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":Pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Pe()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,we]}],filter:[{filter:["","none",be,we]}],blur:[{blur:lt()}],brightness:[{brightness:[De,be,we]}],contrast:[{contrast:[De,be,we]}],"drop-shadow":[{"drop-shadow":["","none",h,Ao,Eo]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",De,be,we]}],"hue-rotate":[{"hue-rotate":[De,be,we]}],invert:[{invert:["",De,be,we]}],saturate:[{saturate:[De,be,we]}],sepia:[{sepia:["",De,be,we]}],"backdrop-filter":[{"backdrop-filter":["","none",be,we]}],"backdrop-blur":[{"backdrop-blur":lt()}],"backdrop-brightness":[{"backdrop-brightness":[De,be,we]}],"backdrop-contrast":[{"backdrop-contrast":[De,be,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,be,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,be,we]}],"backdrop-invert":[{"backdrop-invert":["",De,be,we]}],"backdrop-opacity":[{"backdrop-opacity":[De,be,we]}],"backdrop-saturate":[{"backdrop-saturate":[De,be,we]}],"backdrop-sepia":[{"backdrop-sepia":["",De,be,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":g()}],"border-spacing-x":[{"border-spacing-x":g()}],"border-spacing-y":[{"border-spacing-y":g()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",be,we]}],ease:[{ease:["linear","initial",v,be,we]}],delay:[{delay:[De,be,we]}],animate:[{animate:["none",C,be,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,be,we]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:gt()}],"rotate-x":[{"rotate-x":gt()}],"rotate-y":[{"rotate-y":gt()}],"rotate-z":[{"rotate-z":gt()}],scale:[{scale:ut()}],"scale-x":[{"scale-x":ut()}],"scale-y":[{"scale-y":ut()}],"scale-z":[{"scale-z":ut()}],"scale-3d":["scale-3d"],skew:[{skew:I()}],"skew-x":[{"skew-x":I()}],"skew-y":[{"skew-y":I()}],transform:[{transform:[be,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mbs":[{"scroll-mbs":g()}],"scroll-mbe":[{"scroll-mbe":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pbs":[{"scroll-pbs":g()}],"scroll-pbe":[{"scroll-pbe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,we]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[De,vi,zn,Qf]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ww=Tw(Kw);const rt=(...e)=>Ww(Vf(e)),cp=(e,t)=>{if(e){const r=Al(e);if(r&&up(r))return r;if(e.trim())return e.trim()}if(t){const r=Al(t);if(r&&up(r))return r;const n=Gw(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Al=e=>e.replace(/[^\d+*#]/g,""),up=e=>/^\+?[\d*#]{2,}$/.test(e),Gw=e=>{let t=e.match(/^([+]?[\d*#]{2,})\s*[-:]/);return t&&t[1]||(t=e.match(/\(([+]?[\d*#]{2,})\)/),t&&t[1])||(t=e.match(/(?:ext\.?|extension)\s*([+]?[\d*#]{2,})/i),t&&t[1])?t[1]:(t=e.match(/([+]?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9})/),t&&t[1]?Al(t[1]):null)},Jw="X-Nebula-Queue",Yw="X-Nebula-Queue-Id";const Zw=(e,t={})=>{const r=tt(null),n=tt(null),s=tt(new Map),i=new Audio;i.autoplay=!0;const o=tt(void 0),a=tt(null),l=tt(null),u=new Map,c=new Map,d=new Set;let p=null,h=null,m=null,w=null,x=null;const v=j(()=>r.value?.configuration.uri?.user||""),{startRingtone:C,stopRingtone:y,startRingback:b,stopRingback:_,setNotificationVolume:T}=Lf(),P=R=>R instanceof _o||R instanceof bs?R.request?.callId||R.dialog?.callId||R.id||crypto.randomUUID():R.dialog?.callId||R.id||crypto.randomUUID(),g=R=>{if(!(R instanceof bs))return;const B=R.request;if(!B)return;const N=B.getHeader(Jw)?.trim(),$=B.getHeader(Yw)?.trim();if(!(!N&&!$))return{...$?{id:$}:{},...N?{name:N}:{}}},H=(R,B,N,$)=>{const L=g(R),J={channelId:B,sipCallId:P(R),direction:N,remoteNumber:$,...L?{queue:L}:{}};return u.set(B,J),t.onCallContext?.(J),J},M=(R,B)=>{const N=u.get(R);N&&t.onCallState?.({...N,state:B,timestamp:Date.now()})},S=(R,B)=>{if(R.state!==z.Established)return;const N=u.get(B),$=R.sessionDescriptionHandler,L=$?.localMediaStream??l.value,J=$?.remoteMediaStream??a.value,ye=L?.getAudioTracks()??[],Se=J?.getAudioTracks()??[];if(!N||!L||!J||ye.length===0||Se.length===0)return;const Fe=[N.sipCallId,...ye.map(Me=>`local:${Me.id}`),...Se.map(Me=>`remote:${Me.id}`)].join("|");c.get(B)!==Fe&&(c.set(B,Fe),t.onMediaReady?.({...N,localStream:L,remoteStream:J}))},E=R=>{u.delete(R),c.delete(R),d.delete(R)},A=()=>{e.channels.value.some(R=>R.status==="incoming")?C():y(),e.activeChannel.value?.status==="calling"?b():_()},Z=R=>{i.volume=R/100},Q=async R=>{typeof i.setSinkId=="function"&&await i.setSinkId(R)},K=R=>{o.value=R},X=(R,B)=>{let N=!1;const $=R.sessionDescriptionHandler;return $?.peerConnection&&$.peerConnection.getSenders().forEach(L=>{L.track&&L.track.kind==="audio"&&(L.track.enabled=B,N=!0)}),N},Y=R=>{let B=!1;return l.value&&l.value.getAudioTracks().forEach(N=>{N.enabled=R,B=!0}),B},ae=(R,B)=>{const N=!(B?.isHeld||B?.isMuted),$=X(R,N),L=Y(N);!$&&!L&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},W=R=>{for(const[B,N]of s.value.entries())if(N===R)return e.channels.value.find($=>$.id===B)||null;return e.activeChannel.value||null},le=async R=>{const B=R.sessionDescriptionHandler?.peerConnection;if(!B)return;const N=W(R),$=!(N?.isHeld||N?.isMuted),L=B.getSenders().find(J=>J.track?.kind==="audio");if(L?.track){L.track.enabled=$,N&&S(R,N.id);return}try{const[J]=(await navigator.mediaDevices.getUserMedia(fe(!1))).getAudioTracks();if(!J)return;J.enabled=$;const ye=new MediaStream([J]);l.value=ye;const Se=B.getSenders().find(Fe=>Fe.track===null);Se?await Se.replaceTrack(J):B.addTrack(J,ye),ae(R,N),N&&S(R,N.id)}catch(J){console.warn("[SipJs] Failed to recover outbound audio track:",J)}},fe=(R=!1)=>{const B={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return o.value&&(B.deviceId={exact:o.value}),{audio:B,video:R}},Ce=async()=>{const R=n.value;R&&await R.register({requestDelegate:{onAccept:()=>{e.setConnected(!0)},onReject:()=>{e.setConnected(!1)}}})},He=async R=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(B=>B.stop())}catch(B){console.error("Microphone permission denied",B);return}try{const B=yn.makeURI(R.uri);if(!B)throw new Error("Invalid URI");r.value=new yn({uri:B,logLevel:"error",transportOptions:{server:R.transportOptions.server},authorizationUsername:R.authorizationUsername,authorizationPassword:R.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>{},onDisconnect:()=>e.setConnected(!1),onInvite:N=>at(N)}}),await r.value.start(),n.value=new bl(r.value),await Ce(),Te()}catch{}}},Te=()=>{m=new AbortController;const{signal:R}=m;let B=Date.now();const N=5e3,$=(dt=1e3)=>{w&&clearTimeout(w),w=setTimeout(async()=>{w=null,await Ie()},dt)},L=()=>{if(document.visibilityState==="visible"){const dt=Date.now()-B;dt>N?(console.log(`[SipJs] Device was suspended for ${Math.round(dt/1e3)}s, reconnecting...`),$(1500)):$(500)}B=Date.now()},J=()=>{console.log("[SipJs] Network online, reconnecting..."),$(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),w&&(clearTimeout(w),w=null)},Se=()=>{x=setInterval(()=>{const dt=Date.now(),kn=dt-B;kn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(kn/1e3)}s), device may have woken from sleep`),$(1500)),B=dt},1e3)},Fe=()=>{console.log("[SipJs] Page frozen"),x&&(clearInterval(x),x=null)},Me=()=>{console.log("[SipJs] Page resumed"),B=Date.now(),Se(),$(1e3)};document.addEventListener("visibilitychange",L,{signal:R}),window.addEventListener("online",J,{signal:R}),window.addEventListener("offline",ye,{signal:R}),document.addEventListener("freeze",Fe,{signal:R}),document.addEventListener("resume",Me,{signal:R}),Se()},Ie=async()=>{if(r.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}if(s.value.size>0){console.log("[SipJs] Skipping reconnect, active calls in progress");return}try{if(r.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await r.value.reconnect()),n.value&&r.value.isConnected())try{await Ce()}catch{}}catch(R){console.error("[SipJs] Reconnection failed:",R)}}},Ye=async()=>{m?.abort(),m=null,w&&(clearTimeout(w),w=null),x&&(clearInterval(x),x=null);const R=n.value,B=r.value;if(n.value=null,r.value=null,R)try{await R.unregister()}catch(N){console.warn("[SipJs] Unregister failed:",N)}if(B)try{await B.stop()}catch(N){console.warn("[SipJs] UserAgent stop failed:",N)}},at=R=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",R.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",R.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",R.remoteIdentity.displayName);const B=e.channels.value.find(J=>J.status==="idle");if(!B){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),R.reject();return}const N=B.id;s.value.set(N,R);const $=R.body?R.body.includes("m=video"):!1,L=cp(R.remoteIdentity.uri.user,R.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",L),console.log("[SipJs] 🎥 Video:",$?"Sí":"No"),e.updateChannelState(N,{status:"incoming",remoteNumber:L,remoteDisplayName:R.remoteIdentity.displayName||void 0,hasVideo:$}),H(R,N,"incoming",L),M(N,"ringing"),A(),e.setActiveChannelId(N),R.stateChange.addListener(J=>{switch(J){case z.Terminated:{const ye=e.channels.value.find(Fe=>Fe.id===N),Se=cp(R.remoteIdentity.uri.user,R.remoteIdentity.displayName);if(ye?.status==="connected"){const Fe=Math.floor((Date.now()-(ye.startTime||Date.now()))/1e3);e.addCallLog({number:Se,direction:"incoming",status:"answered",startTime:ye.startTime||Date.now(),duration:Fe})}else ye?.status==="incoming"&&e.addCallLog({number:Se,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});M(N,d.has(N)?"ended":"failed"),E(N),e.updateChannelState(N,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),s.value.delete(N),e.activeChannelId.value===N&&_e(),A();break}case z.Established:d.add(N),e.updateChannelState(N,{status:"connected",startTime:Date.now()}),M(N,"connected"),e.activeChannelId.value===N&&(re(R),le(R).then(()=>S(R,N))),A();break}})},Pe=async(R,B=!1)=>{if(!r.value)return;const N=e.activeChannelId.value;if(s.value.has(N))return;let $=yn.makeURI(R);if(!$&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;$=yn.makeURI(`sip:${R}@${ye}`)}if(!$)return;const L=new _o(r.value,$);s.value.set(N,L),H(L,N,"outgoing",R),M(N,"dialing"),e.updateChannelState(N,{status:"calling",remoteNumber:R,hasVideo:B}),e.setLastDialedNumber(R),A(),L.stateChange.addListener(ye=>{switch(ye){case z.Established:d.add(N),e.channels.value.find(Se=>Se.id===N)?.status!=="connected"&&(e.updateChannelState(N,{status:"connected",startTime:Date.now()}),M(N,"connected"),re(L),le(L).then(()=>S(L,N)),A());break;case z.Terminated:{const Se=e.channels.value.find(Fe=>Fe.id===N);if(Se?.status==="connected"){const Fe=Math.floor((Date.now()-(Se.startTime||Date.now()))/1e3);e.addCallLog({number:R,direction:"outgoing",status:"answered",startTime:Se.startTime||Date.now(),duration:Fe})}else e.addCallLog({number:R,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});M(N,d.has(N)?"ended":"failed"),E(N),e.updateChannelState(N,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),s.value.delete(N),e.activeChannelId.value===N&&_e(),A();break}}});const J={sessionDescriptionHandlerOptions:{constraints:fe(B)},requestDelegate:{onProgress:ye=>{(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(N,{hasEarlyMedia:!0}),re(L)),A())},onAccept:ye=>{e.channels.value.find(Se=>Se.id===N)?.status!=="connected"&&(d.add(N),e.updateChannelState(N,{status:"connected",startTime:Date.now()}),M(N,"connected"),re(L),le(L).then(()=>S(L,N)),A())}}};await L.invite(J)},lt=async(R=!1)=>{const B=e.activeChannelId.value,N=s.value.get(B);if(N instanceof bs&&N.state===z.Initial){for(const[L,J]of s.value.entries())if(L!==e.activeChannelId.value&&J.state===z.Established&&!e.channels.value.find(ye=>ye.id===L)?.isHeld)try{await I(J,!0),e.updateChannelState(L,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${L}:`,ye)}const $={sessionDescriptionHandlerOptions:{constraints:fe(R)}};e.updateChannelState(B,{status:"connected",startTime:Date.now()});try{await N.accept($),await le(N),A()}catch(L){const J=s.value.get(B);throw J instanceof bs&&J.state===z.Initial&&e.updateChannelState(B,{status:"incoming",startTime:void 0}),L}}},gt=async()=>{const R=s.value.get(e.activeChannelId.value);if(R)switch(R.state){case z.Initial:case z.Establishing:R instanceof _o?await R.cancel():R instanceof bs&&await R.reject();break;case z.Established:await R.bye();break}},ut=()=>{const R=s.value.get(e.activeChannelId.value);if(!R)return;const B=!e.isMuted.value;e.setMuted(B),ae(R,e.channels.value.find(N=>N.id===e.activeChannelId.value))},I=async(R,B)=>{const N={sessionDescriptionHandlerOptions:{hold:B}};await R.invite(N)},O=async()=>{const R=s.value.get(e.activeChannelId.value);if(R?.state!==z.Established)return;const B=!e.isHeld.value;try{await I(R,B),e.setHeld(B),ae(R,e.channels.value.find(N=>N.id===e.activeChannelId.value))}catch{}},G=async R=>{const B=e.activeChannelId.value;if(B===R)return;const N=s.value.get(B),$=s.value.get(R),L=e.channels.value.find(ye=>ye.id===B),J=e.channels.value.find(ye=>ye.id===R);if(N&&N.state===z.Established&&!L?.isHeld)try{await I(N,!0),e.updateChannelState(B,{isHeld:!0}),ae(N,e.channels.value.find(ye=>ye.id===B))}catch{}if(e.setActiveChannelId(R),A(),$&&$.state===z.Established){if(J?.isHeld)try{await I($,!1),e.updateChannelState(R,{isHeld:!1})}catch{}ae($,e.channels.value.find(ye=>ye.id===R)),re($)}else _e()},oe=R=>{const B=s.value.get(e.activeChannelId.value);if(B?.state!==z.Established)return;const N={requestOptions:{body:{content:`Signal=${R}\r
68
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};B.info(N)},te=(R,B)=>{const N=e.channels.value.find($=>$.id===R);!N||N.status!=="connected"||(re(B),ae(B,N),le(B),i.play().catch(()=>{}))},se=async R=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",R);const B=e.activeChannelId.value,N=s.value.get(B);if(!N)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",B),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",N.state),console.log("[SipJs] Dialog ID:",N.dialog?.id),console.log("[SipJs] Call ID:",N.dialog?.callId),N.state!==z.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",N.state),new Error(`Cannot transfer call. Call is not established (state: ${N.state})`);let $=yn.makeURI(R);if(!$&&r.value?.configuration.uri){const L=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",L),$=yn.makeURI(`sip:${R}@${L}`)}if(!$)throw console.error("[SipJs] ❌ URI de destino inválida:",R),new Error(`Invalid transfer target: ${R}`);console.log("[SipJs] 📤 URI de transferencia:",$.toString()),console.log("[SipJs] URI scheme:",$.scheme),console.log("[SipJs] URI user:",$.user),console.log("[SipJs] URI host:",$.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await N.refer($,{requestDelegate:{onAccept:L=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",L.message)},onReject:L=>{const J=L.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",J),console.error("[SipJs] Response completo:",L.message),te(B,N)}},onNotify:L=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",L.request),L.accept();const J=L.request.body;if(console.log("[SipJs] NOTIFY body:",J),J){const ye=J.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ye&&ye[1]){const Se=parseInt(ye[1],10),Fe=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",Se),console.log("[SipJs] 📊 Status text:",Fe),Se>=200&&Se<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{N.bye().catch(Me=>{console.warn("[SipJs] Error hanging up after successful transfer:",Me)})},500);else if(Se>=400){console.error("[SipJs] ❌ Transfer falló con status:",Se,Fe),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Me={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[Se]||`Error en transferencia (código ${Se})`;console.warn("[SipJs] 💬",Me),te(B,N)}else Se>=100&&Se<200&&console.log("[SipJs] 📞 Transferencia en progreso:",Se,Fe)}else console.warn("[SipJs] ⚠️ No se pudo extraer el código de estado del NOTIFY body")}else console.warn("[SipJs] ⚠️ NOTIFY sin body")}}),console.log("[SipJs] ✅ REFER enviado exitosamente (promesa resuelta)")}catch(L){throw console.error("[SipJs] ❌ Error en transferCall:",L),console.error("[SipJs] Error type:",L?.constructor?.name),console.error("[SipJs] Error message:",L instanceof Error?L.message:String(L)),console.error("[SipJs] Error stack:",L instanceof Error?L.stack:"N/A"),L}},de=async R=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",R);const B=e.activeChannelId.value,N=s.value.get(B);if(console.log("[SipJs] Canal original:",B),console.log("[SipJs] Sesión original:",N?.state),!N||N.state!==z.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const $=e.channels.value.find(L=>L.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",$?.id),!$)throw console.error("[SipJs] ❌ No hay canales disponibles para llamada de consulta"),new Error("No available channel for consultation call");try{console.log("[SipJs] 🔇 Poniendo llamada original en hold..."),await I(N,!0),e.updateChannelState(B,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(L){throw console.error("[SipJs] ❌ Failed to hold original call:",L),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",$.id),e.setActiveChannelId($.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",R),await Pe(R,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:B,consultationChannelId:$.id,targetNumber:R}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(L){throw console.error("[SipJs] ❌ Failed to start consultation call:",L),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(B),await I(N,!1).catch(()=>{}),e.updateChannelState(B,{isHeld:!1}),new Error("Failed to initiate consultation call")}},ue=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const R=e.transferInProgress.value;if(!R)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",R);const B=s.value.get(R.originalChannelId),N=s.value.get(R.consultationChannelId);if(console.log("[SipJs] Sesión original:",B?.state),console.log("[SipJs] Sesión de consulta:",N?.state),!B||!N)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(N.state!==z.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",N.state),new Error("Consultation call not established");const $=N.dialog;if(!$)throw new Error("No dialog available for consultation session");const L=$.callId,J=$.remoteTag,ye=$.localTag;let Se=yn.makeURI(R.targetNumber);if(!Se&&r.value?.configuration.uri){const Me=r.value.configuration.uri.host;Se=yn.makeURI(`sip:${R.targetNumber}@${Me}`)}if(!Se)throw new Error("Invalid transfer target URI");const Fe=`${encodeURIComponent(L)}%3Bto-tag%3D${encodeURIComponent(J)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;Se.setHeader("Replaces",Fe);try{await B.refer(Se,{onNotify:Me=>{Me.accept();const dt=Me.request.body,kn=typeof dt=="string"?dt:dt&&typeof dt=="object"&&"content"in dt?dt.content:void 0;if(kn){const xt=kn.match(/SIP\/2\.0\s+(\d+)/);if(xt&&xt[1]){const qt=parseInt(xt[1]);qt>=200&&qt<300?setTimeout(()=>{B.bye().catch(()=>{}),N.bye().catch(()=>{}),e.setTransferInProgress(null)},500):qt>=400&&(console.error("[SipJs] Attended transfer failed with status:",qt),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Me=>{console.error("[SipJs] Attended transfer REFER rejected:",Me.message.statusCode),e.setTransferInProgress(null)}}})}catch(Me){throw console.error("[SipJs] Attended transfer failed:",Me),Me}},ce=async()=>{const R=e.transferInProgress.value;if(!R)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const B=s.value.get(R.originalChannelId),N=s.value.get(R.consultationChannelId);if(N)try{await N.bye(),console.log("[SipJs] Consultation call ended")}catch($){console.warn("[SipJs] Error ending consultation:",$)}if(B)try{e.setActiveChannelId(R.originalChannelId),await I(B,!1),e.updateChannelState(R.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch($){console.warn("[SipJs] Error resuming original call:",$)}e.setTransferInProgress(null)},re=R=>{const B=R.sessionDescriptionHandler;if(!B){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const N=B.remoteMediaStream;if(!N){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===N)return;i.pause(),i.srcObject=null,p?.abort(),p=new AbortController,a.value=N,l.value=B.localMediaStream??null;const $=W(R);ae(R,$),$&&S(R,$.id);const L=ye=>{h?.abort(),h=new AbortController;const{signal:Se}=h,Fe=()=>{i.play().catch(Me=>{Me.name!=="AbortError"&&console.error("[SipJs] play() failed:",Me.name,Me.message)})};ye.addEventListener("unmute",()=>{Fe()},{signal:Se}),Fe()};N.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=N,L(ye.track),$&&S(R,$.id))},{signal:p.signal});const[J]=N.getTracks();J&&(i.srcObject=N,L(J),$&&S(R,$.id))},_e=()=>{h?.abort(),h=null,p?.abort(),p=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:He,stop:Ye,makeCall:Pe,answerCall:lt,hangupCall:gt,toggleMute:ut,toggleHold:O,sendDTMF:oe,transferCall:se,startAttendedTransfer:de,completeAttendedTransfer:ue,cancelAttendedTransfer:ce,switchChannel:G,extension:v,setVolume:Z,setNotificationVolume:T,setOutputDevice:Q,setInputDevice:K,remoteStream:a,localStream:l}};var dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const fp=Vf,Xw=(e,t)=>r=>{var n;if(t?.variants==null)return fp(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const u=r?.[l],c=i?.[l];if(u===null)return null;const d=dp(u)||dp(c);return s[l][d]}),a=r&&Object.entries(r).reduce((l,u)=>{let[c,d]=u;return d===void 0||(l[c]=d),l},{});return fp(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,u)=>{let{class:c,className:d,...p}=u;return Object.entries(p).every(h=>{let[m,w]=h;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...l,c,d]:l},[]),r?.class,r?.className)};function Qw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ey(e,t,r){Qw(e,t),t.set(e,r)}function ty(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function Io(e,t){return e.get(ty(e,t))}function pp(e){return typeof e=="string"?`'${e}'`:new ry().serialize(e)}var ry=(function(){var e=new WeakMap;class t{constructor(){ey(this,e,new Map)}compare(n,s){const i=typeof n,o=typeof s;return i==="string"&&o==="string"?n.localeCompare(s):i==="number"&&o==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const i=n.constructor,o=i===Object||i===void 0?"":i.name;if(o!==""&&globalThis[o]===i)return this.serializeBuiltInType(o,n);if(typeof n.toJSON=="function"){const a=n.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(n))}serializeBuiltInType(n,s){const i=this["$"+n];if(i)return i.call(this,s);if(typeof s?.entries=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const i=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${n}{`;for(let a=0;a<i.length;a++){const[l,u]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(u)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=Io(e,this).get(n);return s===void 0&&(Io(e,this).set(n,`#${Io(e,this).size}`),s=this.serializeObject(n),Io(e,this).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let i=0;i<n.length;i++)s+=this.serialize(n[i]),i<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,i)=>this.compare(s,i)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const r of["Error","RegExp","URL"])t.prototype["$"+r]=function(n){return`${r}(${n})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join("n,")}${n.length>0?"n":""}]`};return t})();function ny(e,t){return e===t||pp(e)===pp(t)}function mi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function kt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ot(n,o);if(a||a===null)return a;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Mn(n,o),o)]}function Jt(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Il(e,t,r){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(s)}function Rl(e){return e==null}function kl(e){return e?e.flatMap(t=>t.type===Le?kl(t.children):[t]):[]}var[Ro,lx]=kt("ConfigProvider");function sy(e,t){var r;const n=tt();return et(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),At(n)}function Cn(e,t){return $i()?(ua(e,t),!0):!1}function iy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Cn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function oy(e){let t=!1,r;const n=ca(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var $t=typeof window<"u"&&typeof document<"u",cx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,ay=e=>typeof e<"u",ly=Object.prototype.toString,cy=e=>ly.call(e)==="[object Object]",Yr=()=>{},$l=uy();function uy(){var e,t,r;return $t&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((r=window)===null||r===void 0?void 0:r.navigator.userAgent))}function dy(...e){if(e.length!==1)return Sa(...e);const t=e[0];return typeof t=="function"?At(Fs(()=>({get:t,set:Yr}))):V(t)}function hp(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}var gp=e=>e();function fy(e,t={}){let r,n,s=Yr;const i=l=>{clearTimeout(l),s(),s=Yr};let o;return l=>{const u=xe(e),c=xe(t.maxWait);return r&&i(r),u<=0||c!==void 0&&c<=0?(n&&(i(n),n=void 0),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,o=l,c&&!n&&(n=setTimeout(()=>{r&&i(r),n=void 0,d(o())},c)),r=setTimeout(()=>{n&&i(n),n=void 0,d(l())},u)})}}function py(e=gp,t={}){const{initialState:r="active"}=t,n=dy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:At(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Pl(e){return Array.isArray(e)?e:[e]}function vp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var hy=/\B([A-Z])/g,ux=vp(e=>e.replace(hy,"-$1").toLowerCase()),gy=/-(\w)/g,dx=vp(e=>e.replace(gy,(t,r)=>r?r.toUpperCase():""));function mp(e){return e||it()}function vy(e){if(!$t)return e;let t=0,r,n;const s=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return((...i)=>(t+=1,n||(n=ca(!0),r=n.run(()=>e(...i))),Cn(s),r))}function my(e){return Nr(Ge(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return Ge(e.value[r])&&!Ge(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function wy(e){return my(j(e))}function Ut(e,...t){const r=t.flat(),n=r[0];return wy(()=>Object.fromEntries(typeof n=="function"?Object.entries(It(e)).filter(([s,i])=>!n(xe(i),s)):Object.entries(It(e)).filter(s=>!r.includes(s[0]))))}function wp(e,t=1e4){return Fs((r,n)=>{let s=xe(e),i;const o=()=>setTimeout(()=>{s=xe(e),n()},xe(t));return Cn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Dl(e,t=200,r={}){return hp(fy(t,r),e)}function yy(e,t,r={}){const{eventFilter:n=gp,...s}=r;return Re(e,hp(n,t),s)}function by(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=py(n,{initialState:s});return{stop:yy(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function _y(e,t={}){if(!Ge(e))return It(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=Fs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=xe(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function Sy(e,t){mp(t)&&hs(e,t)}function Cy(e,t=!0,r){mp(r)?We(e,r):t?e():mt(e)}function xy(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=tt(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=xe(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&$t&&u(),(Ge(t)||typeof t=="function")&&Cn(Re(t,()=>{o.value&&$t&&u()})),Cn(l),{isActive:qr(o),pause:l,resume:u}}function yp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=tt(!1);let o;function a(){o&&(clearTimeout(o),o=void 0)}function l(){i.value=!1,a()}function u(...c){s&&e(),a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=void 0,e(...c)},xe(t))}return n&&(i.value=!0,$t&&u()),Cn(l),{isPending:qr(i),start:u,stop:l}}function Ty(e,t,r){return Re(e,t,{...r,immediate:!0})}function Ey(e,t,r){return Re(e,t,{...r,once:!0})}var yr=$t?window:void 0,fx=$t?window.document:void 0,px=$t?window.navigator:void 0,hx=$t?window.location:void 0;function zt(e){var t;const r=xe(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Nt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=j(()=>{const n=Pl(xe(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return Ty(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>zt(i)))!==null&&n!==void 0?n:[yr].filter(i=>i!=null),Pl(xe(r.value?e[1]:e[0])),Pl(f(r.value?e[2]:e[1])),xe(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=cy(o)?{...o}:o,c=n.flatMap(d=>s.flatMap(p=>i.map(h=>t(d,p,h,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}var bp=!1;function Ay(e,t,r={}){const{window:n=yr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Yr,cancel:Yr,trigger:Yr}:Yr;if($l&&!bp){bp=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",Yr,x)),n.document.documentElement.addEventListener("click",Yr,x)}let l=!0;const u=x=>xe(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(C=>C===x.target||x.composedPath().includes(C));{const C=zt(v);return C&&(x.target===C||x.composedPath().includes(C))}});function c(x){const v=xe(x);return v&&v.$.subTree.shapeFlag===16}function d(x,v){const C=xe(x),y=C.$.subTree&&C.$.subTree.children;return y==null||!Array.isArray(y)?!1:y.some(b=>b.el===v.target||v.composedPath().includes(b.el))}const p=x=>{const v=zt(e);if(x.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,x))&&!(!v||v===x.target||x.composedPath().includes(v))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[Nt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),Nt(n,"pointerdown",x=>{const v=zt(e);l=!u(x)&&!!(v&&!x.composedPath().includes(v))},{passive:!0}),o&&Nt(n,"blur",x=>{setTimeout(()=>{var v;const C=zt(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!C?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function Ol(){const e=tt(!1),t=it();return t&&We(()=>{e.value=!0},t),e}function _p(e){const t=Ol();return j(()=>(t.value,!!e()))}function Iy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ry(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:s=yr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Iy(t);return Nt(s,i,c=>{c.repeat&&xe(a)||l(c)&&r(c)},o)}function ky(e){return JSON.parse(JSON.stringify(e))}var ko=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$o="__vueuse_ssr_handlers__",$y=Py();function Py(){return $o in ko||(ko[$o]=ko[$o]||{}),ko[$o]}function Dy(e,t){return $y[e]||t}function Oy(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Hy={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Sp="vueuse-storage";function Po(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:u=!1,shallow:c,window:d=yr,eventFilter:p,onError:h=Z=>{console.error(Z)},initOnMounted:m}=n,w=(c?tt:V)(typeof t=="function"?t():t),x=j(()=>xe(e));if(!r)try{r=Dy("getDefaultStorage",()=>yr?.localStorage)()}catch(Z){h(Z)}if(!r)return w;const v=xe(t),C=Oy(v),y=(s=n.serializer)!==null&&s!==void 0?s:Hy[C],{pause:b,resume:_}=by(w,Z=>M(Z),{flush:i,deep:o,eventFilter:p});Re(x,()=>E(),{flush:i});let T=!1;const P=Z=>{m&&!T||E(Z)},g=Z=>{m&&!T||A(Z)};d&&a&&(r instanceof Storage?Nt(d,"storage",P,{passive:!0}):Nt(d,Sp,g)),m?Cy(()=>{T=!0,E()}):E();function H(Z,Q){if(d){const K={key:x.value,oldValue:Z,newValue:Q,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",K):new CustomEvent(Sp,{detail:K}))}}function M(Z){try{const Q=r.getItem(x.value);if(Z==null)H(Q,null),r.removeItem(x.value);else{const K=y.write(Z);Q!==K&&(r.setItem(x.value,K),H(Q,K))}}catch(Q){h(Q)}}function S(Z){const Q=Z?Z.newValue:r.getItem(x.value);if(Q==null)return l&&v!=null&&r.setItem(x.value,y.write(v)),v;if(!Z&&u){const K=y.read(Q);return typeof u=="function"?u(K,v):C==="object"&&!Array.isArray(K)?{...v,...K}:K}else return typeof Q!="string"?Q:y.read(Q)}function E(Z){if(!(Z&&Z.storageArea!==r)){if(Z&&Z.key==null){w.value=v;return}if(!(Z&&Z.key!==x.value)){b();try{const Q=y.write(w.value);(Z===void 0||Z?.newValue!==Q)&&(w.value=S(Z))}catch(Q){h(Q)}finally{Z?mt(_):_()}}}}function A(Z){E(Z.detail)}return w}var Do={speed:2,margin:30,direction:"both"};function My(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function Ny(e,t={}){var r,n,s,i;const{pointerTypes:o,preventDefault:a,stopPropagation:l,exact:u,onMove:c,onEnd:d,onStart:p,initialValue:h,axis:m="both",draggingElement:w=yr,containerElement:x,handle:v=e,buttons:C=[0],restrictInView:y,autoScroll:b=!1}=t,_=V((r=xe(h))!==null&&r!==void 0?r:{x:0,y:0}),T=V(),P=le=>o?o.includes(le.pointerType):!0,g=le=>{xe(a)&&le.preventDefault(),xe(l)&&le.stopPropagation()},H=xe(b),M=typeof H=="object"?{speed:(n=xe(H.speed))!==null&&n!==void 0?n:Do.speed,margin:(s=xe(H.margin))!==null&&s!==void 0?s:Do.margin,direction:(i=H.direction)!==null&&i!==void 0?i:Do.direction}:Do,S=le=>typeof le=="number"?[le,le]:[le.x,le.y],E=(le,fe,Ce)=>{const{clientWidth:He,clientHeight:Te,scrollLeft:Ie,scrollTop:Ye,scrollWidth:at,scrollHeight:Pe}=le,[lt,gt]=S(M.margin),[ut,I]=S(M.speed);let O=0,G=0;(M.direction==="x"||M.direction==="both")&&(Ce.x<lt&&Ie>0?O=-ut:Ce.x+fe.width>He-lt&&Ie<at-He&&(O=ut)),(M.direction==="y"||M.direction==="both")&&(Ce.y<gt&&Ye>0?G=-I:Ce.y+fe.height>Te-gt&&Ye<Pe-Te&&(G=I)),(O||G)&&le.scrollBy({left:O,top:G,behavior:"auto"})};let A=null;const Z=()=>{const le=xe(x);le&&!A&&(A=setInterval(()=>{const fe=xe(e).getBoundingClientRect(),{x:Ce,y:He}=_.value,Te={x:Ce-le.scrollLeft,y:He-le.scrollTop};Te.x>=0&&Te.y>=0&&(E(le,fe,Te),Te.x+=le.scrollLeft,Te.y+=le.scrollTop,_.value=Te)},1e3/60))},Q=()=>{A&&(clearInterval(A),A=null)},K=(le,fe,Ce,He)=>{const[Te,Ie]=typeof Ce=="number"?[Ce,Ce]:[Ce.x,Ce.y],{clientWidth:Ye,clientHeight:at}=fe;return le.x<Te||le.x+He.width>Ye-Te||le.y<Ie||le.y+He.height>at-Ie},X=()=>{if(xe(t.disabled)||!T.value)return;const le=xe(x);if(!le)return;const fe=xe(e).getBoundingClientRect(),{x:Ce,y:He}=_.value;K({x:Ce-le.scrollLeft,y:He-le.scrollTop},le,M.margin,fe)?Z():Q()};xe(b)&&Re(_,X);const Y=le=>{var fe;if(!xe(C).includes(le.button)||xe(t.disabled)||!P(le)||xe(u)&&le.target!==xe(e))return;const Ce=xe(x),He=Ce==null||(fe=Ce.getBoundingClientRect)===null||fe===void 0?void 0:fe.call(Ce),Te=xe(e).getBoundingClientRect(),Ie={x:le.clientX-(Ce?Te.left-He.left+(b?0:Ce.scrollLeft):Te.left),y:le.clientY-(Ce?Te.top-He.top+(b?0:Ce.scrollTop):Te.top)};p?.(Ie,le)!==!1&&(T.value=Ie,g(le))},ae=le=>{if(xe(t.disabled)||!P(le)||!T.value)return;const fe=xe(x);fe instanceof HTMLElement&&My(fe);const Ce=xe(e).getBoundingClientRect();let{x:He,y:Te}=_.value;if((m==="x"||m==="both")&&(He=le.clientX-T.value.x,fe&&(He=Math.min(Math.max(0,He),fe.scrollWidth-Ce.width))),(m==="y"||m==="both")&&(Te=le.clientY-T.value.y,fe&&(Te=Math.min(Math.max(0,Te),fe.scrollHeight-Ce.height))),xe(b)&&fe&&(A===null&&E(fe,Ce,{x:He,y:Te}),He+=fe.scrollLeft,Te+=fe.scrollTop),fe&&(y||b)){if(m!=="y"){const Ie=He-fe.scrollLeft;Ie<0?He=fe.scrollLeft:Ie>fe.clientWidth-Ce.width&&(He=fe.clientWidth-Ce.width+fe.scrollLeft)}if(m!=="x"){const Ie=Te-fe.scrollTop;Ie<0?Te=fe.scrollTop:Ie>fe.clientHeight-Ce.height&&(Te=fe.clientHeight-Ce.height+fe.scrollTop)}}_.value={x:He,y:Te},c?.(_.value,le),g(le)},W=le=>{xe(t.disabled)||!P(le)||T.value&&(T.value=void 0,b&&Q(),d?.(_.value,le),g(le))};if($t){const le=()=>{var fe;return{capture:(fe=t.capture)!==null&&fe!==void 0?fe:!0,passive:!xe(a)}};Nt(v,"pointerdown",Y,le),Nt(w,"pointermove",ae,le),Nt(w,"pointerup",W,le)}return{..._y(_),position:_,isDragging:j(()=>!!T.value),style:j(()=>`
69
69
  left: ${_.value.x}px;
70
70
  top: ${_.value.y}px;
71
71
  ${b?"text-wrap: nowrap;":""}
72
- `)}}function Kn(e,t,r={}){const{window:n=mr,...s}=r;let i;const o=_p(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ie(V(()=>{const c=Se(e);return Array.isArray(c)?c.map(d=>jt(d)):[jt(c)]}),c=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of c)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return Cn(u),{isSupported:o,stop:u}}function qy(e={}){const{window:t=mr}=e,r=t?.navigator,n=_p(()=>r&&"connection"in r),s=rt(!0),i=rt(!1),o=rt(void 0),a=rt(void 0),l=rt(void 0),u=rt(void 0),c=rt(void 0),d=rt(void 0),p=rt("unknown"),h=n.value&&r.connection;function m(){r&&(s.value=r.onLine,o.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,h&&(l.value=h.downlink,u.value=h.downlinkMax,d.value=h.effectiveType,c.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(Mt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),Mt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&Mt(h,"change",m,w),m(),{isSupported:n,isOnline:Et(s),saveData:Et(i),offlineAt:Et(o),onlineAt:Et(a),downlink:Et(l),downlinkMax:Et(u),effectiveType:Et(d),rtt:Et(c),type:Et(p)}}var gx=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function _s(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:u=!1,defaultValue:c,shouldEmit:d}=n,p=ot(),h=r||p?.emit||(p==null||(s=p.$emit)===null||s===void 0?void 0:s.bind(p))||(p==null||(i=p.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(p?.proxy));let m=l;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=C=>o?typeof o=="function"?o(C):ky(C):C,x=()=>ay(e[t])?w(e[t]):c,v=C=>{d?d(C)&&h(m,C):h(m,C)};if(a){const C=F(x());let y=!1;return Ie(()=>e[t],b=>{y||(y=!0,C.value=w(b),vt(()=>y=!1))}),Ie(C,b=>{!y&&(b!==e[t]||u)&&v(b)},{deep:u}),C}else return V({get(){return x()},set(C){v(C)}})}function Hl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ml(e,t,r=".",n){if(!Hl(t))return Ml(e,{},r,n);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(n&&n(s,i,o,r)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:Hl(o)&&Hl(s[i])?s[i]=Ml(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Nl(e){return(...t)=>t.reduce((r,n)=>Ml(r,n,"",e),{})}var Cp=Nl(),vx=Nl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),mx=Nl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),By=vy(()=>{const e=F(new Map),t=F(),r=V(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Ro({scrollBody:F(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",$l&&s?.(),t.value=void 0};return Ie(r,(o,a)=>{if(!kt)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=n.scrollBody?.value?typeof n.scrollBody.value=="object"?Cp({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),$l&&(s=Mt(document,"touchmove",d=>Ly(d),{passive:!1})),vt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function xp(e){const t=Math.random().toString(36).substring(2,7),r=By();r.value.set(t,e??!1);const n=V({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Sy(()=>{r.value.delete(t)}),n}function Tp(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const r=e.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:Tp(r)}}function Ly(e){const t=e||window.event,r=t.target;return r instanceof Element&&Tp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function ql(e){const t=Ro({dir:F("ltr")});return V(()=>e?.value||t.dir?.value||"ltr")}function Oo(e){const t=ot(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[ts(dt(s))]=(...i)=>e(s,...i)}),n}var Bl=0;function Fy(){tt(e=>{if(!kt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Ep()),document.body.insertAdjacentElement("beforeend",t[1]??Ep()),Bl++,e(()=>{Bl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Bl--})})}function Ep(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Ap(e){return V(()=>Se(e)?!!jt(e)?.closest("form"):!0)}function Ee(){const e=ot(),t=F(),r=V(()=>n());Ys(()=>{r.value!==n()&&ru(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:jt(t)}const s=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(a){if(t.value=a,!!a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.prototype.hasOwnProperty.call(a,"$el"))){const l=a.$.exposed,u=Object.assign({},i);for(const c in l)Object.defineProperty(u,c,{enumerable:!0,configurable:!0,get:()=>l[c]});e.exposed=u}}return{forwardRef:o,currentRef:t,currentElement:r}}function Zr(e){const t=ot(),r=Object.keys(t?.type.props??{}).reduce((s,i)=>{const o=(t?.type.props[i]).default;return o!==void 0&&(s[i]=o),s},{}),n=Sa(e);return V(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[dt(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Xr(e,t){const r=Zr(e),n=t?Oo(t):{};return V(()=>({...r.value,...n}))}function Vy(e,t){const r=wp(!1,300);Cn(()=>{r.value=!1});const n=F(null),s=iy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=Uy(c,jy(c,u.getBoundingClientRect()),1),p=zy(l.getBoundingClientRect());n.value=Wy([...d,...p]),r.value=!0}return tt(a=>{if(e.value&&t.value){const l=c=>o(c,t.value),u=c=>o(c,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",u),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",u)})}}),tt(a=>{if(n.value){const l=u=>{if(!n.value||!(u.target instanceof Element))return;const c=u.target,d={x:u.clientX,y:u.clientY},p=e.value?.contains(c)||t.value?.contains(c),h=!Ky(d,n.value),m=!!c.closest("[data-grace-area-trigger]");p?i():(h||m)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function jy(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Uy(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function zy(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Ky(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,c=t[o].y;l>n!=c>n&&r<(u-a)*(n-l)/(c-l)+a&&(s=!s)}return s}function Wy(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Gy(t)}function Gy(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Jy=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ss=new WeakMap,Ho=new WeakMap,Mo={},Ll=0,Ip=function(e){return e&&(e.host||Ip(e.parentNode))},Yy=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ip(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Zy=function(e,t,r,n){var s=Yy(t,Array.isArray(e)?e:[e]);Mo[r]||(Mo[r]=new WeakMap);var i=Mo[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else try{var h=p.getAttribute(n),m=h!==null&&h!=="false",w=(Ss.get(p)||0)+1,x=(i.get(p)||0)+1;Ss.set(p,w),i.set(p,x),o.push(p),w===1&&m&&Ho.set(p,!0),x===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),a.clear(),Ll++,function(){o.forEach(function(d){var p=Ss.get(d)-1,h=i.get(d)-1;Ss.set(d,p),i.set(d,h),p||(Ho.has(d)||d.removeAttribute(n),Ho.delete(d)),h||d.removeAttribute(r)}),Ll--,Ll||(Ss=new WeakMap,Ss=new WeakMap,Ho=new WeakMap,Mo={})}},Xy=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Jy(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Zy(n,s,r,"aria-hidden")):function(){return null}};function Rp(e){let t;Ie(()=>jt(e),r=>{r?t=Xy(r):t&&t()}),Ot(()=>{t&&t()})}var Qy=0;function Cs(e,t="reka"){if(e)return e;let r;return"useId"in g0?r=Eu?.():r=Ro({useId:void 0}).useId?.()??`${++Qy}`,t?`${t}-${r}`:r}function kp(e){const t=F(),r=V(()=>t.value?.width??0),n=V(()=>t.value?.height??0);return Ke(()=>{const s=jt(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=s.offsetWidth,u=s.offsetHeight;t.value={width:l,height:u}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function Fl(e,t){const r=F(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function $p(e){const t=wp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Wt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=tb(a.map(d=>d.textValue),t.value,l?.textValue),c=a.find(d=>d.textValue===u);return c&&c.ref.focus(),c?.ref}},resetTypeahead:()=>{t.value=""}}}function eb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function tb(e,t,r){const n=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=eb(e,Math.max(s,0));n.length===1&&(i=i.filter(a=>a!==r));const o=i.find(a=>a.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function rb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??mr,{state:l,dispatch:u}=Fl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(kt){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};Ie(e,async(w,x)=>{const v=x!==w;if(await vt(),v){const C=n.value,y=No(t.value);w?(u("MOUNT"),c("enter"),y==="none"&&c("after-enter")):y==="none"||y==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&C!==y?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=No(t.value),v=x.includes(CSS.escape(w.animationName)),C=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&v&&(c(`after-${C}`),u("ANIMATION_END"),!s.value)){const y=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=y)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=No(t.value))},h=Ie(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=Ie(l,()=>{const w=No(t.value);n.value=l.value==="mounted"?w:"none"});return Ot(()=>{h(),m()}),{isPresent:V(()=>["mounted","unmountSuspended"].includes(l.value))}}function No(e){return e&&getComputedStyle(e).animationName||"none"}var xn=te({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=At(e),i=F(),{isPresent:o}=rb(n,i);r({present:o});let a=t.default({present:o.value});a=kl(a||[]);const l=ot();if(a&&a?.length>1){const u=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(c=>` - ${c}`).join(`
72
+ `)}}function Wn(e,t,r={}){const{window:n=yr,...s}=r;let i;const o=_p(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Re(j(()=>{const c=xe(e);return Array.isArray(c)?c.map(d=>zt(d)):[zt(c)]}),c=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of c)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return Cn(u),{isSupported:o,stop:u}}function qy(e={}){const{window:t=yr}=e,r=t?.navigator,n=_p(()=>r&&"connection"in r),s=tt(!0),i=tt(!1),o=tt(void 0),a=tt(void 0),l=tt(void 0),u=tt(void 0),c=tt(void 0),d=tt(void 0),p=tt("unknown"),h=n.value&&r.connection;function m(){r&&(s.value=r.onLine,o.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,h&&(l.value=h.downlink,u.value=h.downlinkMax,d.value=h.effectiveType,c.value=h.rtt,i.value=h.saveData,p.value=h.type))}const w={passive:!0};return t&&(Nt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),Nt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&Nt(h,"change",m,w),m(),{isSupported:n,isOnline:At(s),saveData:At(i),offlineAt:At(o),onlineAt:At(a),downlink:At(l),downlinkMax:At(u),effectiveType:At(d),rtt:At(c),type:At(p)}}var gx=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function Ss(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:u=!1,defaultValue:c,shouldEmit:d}=n,p=it(),h=r||p?.emit||(p==null||(s=p.$emit)===null||s===void 0?void 0:s.bind(p))||(p==null||(i=p.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(p?.proxy));let m=l;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=C=>o?typeof o=="function"?o(C):ky(C):C,x=()=>ay(e[t])?w(e[t]):c,v=C=>{d?d(C)&&h(m,C):h(m,C)};if(a){const C=V(x());let y=!1;return Re(()=>e[t],b=>{y||(y=!0,C.value=w(b),mt(()=>y=!1))}),Re(C,b=>{!y&&(b!==e[t]||u)&&v(b)},{deep:u}),C}else return j({get(){return x()},set(C){v(C)}})}function Hl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ml(e,t,r=".",n){if(!Hl(t))return Ml(e,{},r,n);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(n&&n(s,i,o,r)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:Hl(o)&&Hl(s[i])?s[i]=Ml(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Nl(e){return(...t)=>t.reduce((r,n)=>Ml(r,n,"",e),{})}var Cp=Nl(),vx=Nl((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),mx=Nl((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),By=vy(()=>{const e=V(new Map),t=V(),r=j(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Ro({scrollBody:V(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",$l&&s?.(),t.value=void 0};return Re(r,(o,a)=>{if(!$t)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,u={padding:l,margin:0},c=n.scrollBody?.value?typeof n.scrollBody.value=="object"?Cp({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},u):u:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof c.padding=="number"?`${c.padding}px`:String(c.padding),document.body.style.marginRight=typeof c.margin=="number"?`${c.margin}px`:String(c.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),$l&&(s=Nt(document,"touchmove",d=>Ly(d),{passive:!1})),mt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function xp(e){const t=Math.random().toString(36).substring(2,7),r=By();r.value.set(t,e??!1);const n=j({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Sy(()=>{r.value.delete(t)}),n}function Tp(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const r=e.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:Tp(r)}}function Ly(e){const t=e||window.event,r=t.target;return r instanceof Element&&Tp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function ql(e){const t=Ro({dir:V("ltr")});return j(()=>e?.value||t.dir?.value||"ltr")}function Oo(e){const t=it(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[rs(ft(s))]=(...i)=>e(s,...i)}),n}var Bl=0;function Fy(){et(e=>{if(!$t)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Ep()),document.body.insertAdjacentElement("beforeend",t[1]??Ep()),Bl++,e(()=>{Bl===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),Bl--})})}function Ep(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Ap(e){return j(()=>xe(e)?!!zt(e)?.closest("form"):!0)}function Ae(){const e=it(),t=V(),r=j(()=>n());Ys(()=>{r.value!==n()&&ru(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:zt(t)}const s=Object.assign({},e.exposed),i={};for(const a in e.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>e.props[a]});if(Object.keys(s).length>0)for(const a in s)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>s[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function o(a){if(t.value=a,!!a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),!(a instanceof Element)&&!Object.prototype.hasOwnProperty.call(a,"$el"))){const l=a.$.exposed,u=Object.assign({},i);for(const c in l)Object.defineProperty(u,c,{enumerable:!0,configurable:!0,get:()=>l[c]});e.exposed=u}}return{forwardRef:o,currentRef:t,currentElement:r}}function Zr(e){const t=it(),r=Object.keys(t?.type.props??{}).reduce((s,i)=>{const o=(t?.type.props[i]).default;return o!==void 0&&(s[i]=o),s},{}),n=Sa(e);return j(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ft(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Xr(e,t){const r=Zr(e),n=t?Oo(t):{};return j(()=>({...r.value,...n}))}function Vy(e,t){const r=wp(!1,300);Cn(()=>{r.value=!1});const n=V(null),s=iy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=Uy(c,jy(c,u.getBoundingClientRect()),1),p=zy(l.getBoundingClientRect());n.value=Wy([...d,...p]),r.value=!0}return et(a=>{if(e.value&&t.value){const l=c=>o(c,t.value),u=c=>o(c,e.value);e.value.addEventListener("pointerleave",l),t.value.addEventListener("pointerleave",u),a(()=>{e.value?.removeEventListener("pointerleave",l),t.value?.removeEventListener("pointerleave",u)})}}),et(a=>{if(n.value){const l=u=>{if(!n.value||!(u.target instanceof Element))return;const c=u.target,d={x:u.clientX,y:u.clientY},p=e.value?.contains(c)||t.value?.contains(c),h=!Ky(d,n.value),m=!!c.closest("[data-grace-area-trigger]");p?i():(h||m)&&(i(),s.trigger())};e.value?.ownerDocument.addEventListener("pointermove",l),a(()=>e.value?.ownerDocument.removeEventListener("pointermove",l))}}),{isPointerInTransit:r,onPointerExit:s.on}}function jy(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Uy(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function zy(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function Ky(e,t){const{x:r,y:n}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const a=t[i].x,l=t[i].y,u=t[o].x,c=t[o].y;l>n!=c>n&&r<(u-a)*(n-l)/(c-l)+a&&(s=!s)}return s}function Wy(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Gy(t)}function Gy(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Jy=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Cs=new WeakMap,Ho=new WeakMap,Mo={},Ll=0,Ip=function(e){return e&&(e.host||Ip(e.parentNode))},Yy=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ip(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Zy=function(e,t,r,n){var s=Yy(t,Array.isArray(e)?e:[e]);Mo[r]||(Mo[r]=new WeakMap);var i=Mo[r],o=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))c(p);else try{var h=p.getAttribute(n),m=h!==null&&h!=="false",w=(Cs.get(p)||0)+1,x=(i.get(p)||0)+1;Cs.set(p,w),i.set(p,x),o.push(p),w===1&&m&&Ho.set(p,!0),x===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return c(t),a.clear(),Ll++,function(){o.forEach(function(d){var p=Cs.get(d)-1,h=i.get(d)-1;Cs.set(d,p),i.set(d,h),p||(Ho.has(d)||d.removeAttribute(n),Ho.delete(d)),h||d.removeAttribute(r)}),Ll--,Ll||(Cs=new WeakMap,Cs=new WeakMap,Ho=new WeakMap,Mo={})}},Xy=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Jy(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Zy(n,s,r,"aria-hidden")):function(){return null}};function Rp(e){let t;Re(()=>zt(e),r=>{r?t=Xy(r):t&&t()}),Ht(()=>{t&&t()})}var Qy=0;function xs(e,t="reka"){if(e)return e;let r;return"useId"in g0?r=Eu?.():r=Ro({useId:void 0}).useId?.()??`${++Qy}`,t?`${t}-${r}`:r}function kp(e){const t=V(),r=j(()=>t.value?.width??0),n=j(()=>t.value?.height??0);return We(()=>{const s=zt(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,u;if("borderBoxSize"in a){const c=a.borderBoxSize,d=Array.isArray(c)?c[0]:c;l=d.inlineSize,u=d.blockSize}else l=s.offsetWidth,u=s.offsetHeight;t.value={width:l,height:u}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function Fl(e,t){const r=V(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function $p(e){const t=wp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=Jt(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=tb(a.map(d=>d.textValue),t.value,l?.textValue),c=a.find(d=>d.textValue===u);return c&&c.ref.focus(),c?.ref}},resetTypeahead:()=>{t.value=""}}}function eb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function tb(e,t,r){const n=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=eb(e,Math.max(s,0));n.length===1&&(i=i.filter(a=>a!==r));const o=i.find(a=>a.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function rb(e,t){const r=V({}),n=V("none"),s=V(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??yr,{state:l,dispatch:u}=Fl(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if($t){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};Re(e,async(w,x)=>{const v=x!==w;if(await mt(),v){const C=n.value,y=No(t.value);w?(u("MOUNT"),c("enter"),y==="none"&&c("after-enter")):y==="none"||y==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&C!==y?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=No(t.value),v=x.includes(CSS.escape(w.animationName)),C=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&v&&(c(`after-${C}`),u("ANIMATION_END"),!s.value)){const y=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=y)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=No(t.value))},h=Re(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=Re(l,()=>{const w=No(t.value);n.value=l.value==="mounted"?w:"none"});return Ht(()=>{h(),m()}),{isPresent:j(()=>["mounted","unmountSuspended"].includes(l.value))}}function No(e){return e&&getComputedStyle(e).animationName||"none"}var xn=ee({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=It(e),i=V(),{isPresent:o}=rb(n,i);r({present:o});let a=t.default({present:o.value});a=kl(a||[]);const l=it();if(a&&a?.length>1){const u=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(c=>` - ${c}`).join(`
73
73
  `)].join(`
74
- `))}return()=>s.value||n.value||o.value?rr(t.default({present:o.value})[0],{ref:u=>{const c=jt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),Vl=te({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=kl(r.default()),s=n.findIndex(l=>l.type!==it);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ge(t,i.props):t,a=hr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),nb=["area","img","input"],Fe=te({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const n=e.asChild?"template":e.as;return typeof n=="string"&&nb.includes(n)?()=>rr(n,t):n!=="template"?()=>rr(e.as,t,{default:r.default}):()=>rr(Vl,t,{default:r.default})}});function jl(){const e=F();return{primitiveElement:e,currentElement:V(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:jt(e))}}var[Tn,sb]=Rt("DialogRoot"),ib=te({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=_s(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=At(r);return sb({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:a=>{n.value=a},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:i}),(a,l)=>oe(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),ob=te({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Ee();const r=Tn();return(n,s)=>(D(),j(f(Fe),ge(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["type"]))}}),ab="dismissableLayer.pointerDownOutside",lb="dismissableLayer.focusOutside";function Pp(e,t){const r=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(n===r||s.indexOf(n)<s.indexOf(r)))}function cb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return tt(o=>{if(!kt||!Se(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(Pp(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){Il(ab,e,p)};var d=h;const p={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=h,n.addEventListener("click",i.value,{once:!0})):h()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{Se(r)&&(s.value=!0)}}}function ub(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return tt(i=>{if(!kt||!Se(r))return;const o=async a=>{if(!t?.value)return;await vt(),await vt();const l=a.target;!t.value||!l||Pp(t.value,l)||a.target&&!s.value&&Il(lb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{Se(r)&&(s.value=!0)},onBlurCapture:()=>{Se(r)&&(s.value=!1)}}}var ar=Nr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Ul=te({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Ee(),o=V(()=>i.value?.ownerDocument??globalThis.document),a=V(()=>ar.layersRoot),l=V(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=V(()=>ar.layersWithOutsidePointerEventsDisabled.size>0),c=V(()=>{const h=Array.from(a.value),[m]=[...ar.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=cb(async h=>{const m=[...ar.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await vt(),h.defaultPrevented||n("dismiss"))},i),p=ub(h=>{[...ar.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return Ry("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),tt(h=>{i.value&&(r.disableOutsidePointerEvents&&(ar.layersWithOutsidePointerEventsDisabled.size===0&&(ar.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),ar.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&ar.layersWithOutsidePointerEventsDisabled.size===1&&!Rl(ar.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=ar.originalBodyPointerEvents)}))}),tt(h=>{h(()=>{i.value&&(a.value.delete(i.value),ar.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(D(),j(f(Fe),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:gt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:R(()=>[oe(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),db=oy(()=>F([]));function fb(){const e=db();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Dp(e.value,t),e.value.unshift(t)},remove(t){e.value=Dp(e.value,t),e.value[0]?.resume()}}}function Dp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var zl="focusScope.autoFocusOnMount",Kl="focusScope.autoFocusOnUnmount",Op={bubbles:!1,cancelable:!0};function pb(e,{select:t=!1}={}){const r=Wt();for(const n of e)if(En(n,{select:t}),Wt()!==r)return!0}function hb(e){const t=Hp(e);return[Mp(t,e),Mp(t.reverse(),e)]}function Hp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Mp(e,t){for(const r of e)if(!gb(r,{upTo:t}))return r}function gb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vb(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const r=Wt();e.focus({preventScroll:!0}),e!==r&&vb(e)&&t&&e.select()}}var Np=te({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const r=e,n=t,{currentRef:s,currentElement:i}=Ee(),o=F(null),a=fb(),l=Nr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});tt(c=>{if(!kt)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const v=x.target;d.contains(v)?o.value=v:En(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const v=x.relatedTarget;v!==null&&(d.contains(v)||En(o.value,{select:!0}))}function m(x){d.contains(o.value)||En(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(m);d&&w.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),tt(async c=>{const d=i.value;if(await vt(),!d)return;a.add(l);const p=Wt();if(!d.contains(p)){const h=new CustomEvent(zl,Op);d.addEventListener(zl,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(pb(Hp(d),{select:!0}),Wt()===p&&En(d))}c(()=>{d.removeEventListener(zl,w=>n("mountAutoFocus",w));const h=new CustomEvent(Kl,Op),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Kl,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||En(p??document.body,{select:!0}),d.removeEventListener(Kl,m),a.remove(l)},0)})});function u(c){if(!r.loop&&!r.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=Wt();if(d&&p){const h=c.currentTarget,[m,w]=hb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&En(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&En(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(D(),j(f(Fe),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:R(()=>[oe(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),qp=["Enter"," "],mb=["ArrowDown","PageUp","Home"],wb=["ArrowUp","PageDown","End"],wx=[...mb,...wb],yx={ltr:[...qp,"ArrowRight"],rtl:[...qp,"ArrowLeft"]};function yb(e){return e?"open":"closed"}function Bp(e){const t=Wt();for(const r of e)if(r===t||(r.focus(),Wt()!==t))return}var Lp=te({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),{forwardRef:i,currentElement:o}=Ee();return s.titleId||(s.titleId=Cs(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Cs(void 0,"reka-dialog-description")),Ke(()=>{s.contentElement=o,Wt()!==document.body&&(s.triggerElement.value=Wt())}),(a,l)=>(D(),j(f(Np),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>n("closeAutoFocus",u))},{default:R(()=>[q(f(Ul),ge({id:f(s).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(s).descriptionId,"aria-labelledby":f(s).titleId,"data-state":f(yb)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>n("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>n("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>n("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>n("pointerDownOutside",u))}),{default:R(()=>[oe(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),bb=te({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),i=Oo(n),{forwardRef:o,currentElement:a}=Ee();return Rp(a),(l,u)=>(D(),j(Lp,ge({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:R(()=>[oe(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),_b=te({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=Oo(t);Ee();const s=Tn(),i=F(!1),o=F(!1);return(a,l)=>(D(),j(Lp,ge({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{u.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const c=u.target;f(s).triggerElement.value?.contains(c)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:R(()=>[oe(a.$slots,"default")]),_:3},16))}}),Sb=te({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),i=Oo(n),{forwardRef:o}=Ee();return(a,l)=>(D(),j(f(xn),{present:a.forceMount||f(s).open.value},{default:R(()=>[f(s).modal.value?(D(),j(bb,ge({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[oe(a.$slots,"default")]),_:3},16)):(D(),j(_b,ge({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:R(()=>[oe(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Cb=te({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Tn();return xp(!0),Ee(),(r,n)=>(D(),j(f(Fe),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:R(()=>[oe(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),xb=te({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Tn(),{forwardRef:r}=Ee();return(n,s)=>f(t)?.modal.value?(D(),j(f(xn),{key:0,present:n.forceMount||f(t).open.value},{default:R(()=>[q(Cb,ge(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):ke("v-if",!0)}}),Wl=te({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=Ol();return(r,n)=>f(t)||r.forceMount?(D(),j(Ea,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[oe(r.$slots,"default")],8,["to","disabled","defer"])):ke("v-if",!0)}}),Tb=te({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),j(f(Wl),ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),Eb=te({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Tn();return Ee(),(n,s)=>(D(),j(f(Fe),ge(t,{id:f(r).titleId}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["id"]))}}),Fp="data-reka-collection-item";function Qr(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Hn(n,s)):s=Dt(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Fp}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>c.indexOf(p.ref)-c.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=te({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=jl();return Ie(p,()=>{s.collectionRef.value=p.value}),()=>rr(Vl,{ref:d,...c},u)}}),a=te({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=jl();return tt(h=>{if(p.value){const m=ba(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>rr(Vl,{...c,[Fp]:"",ref:d},u)}});return{getItems:i,reactiveItems:V(()=>Array.from(s.itemMap.value.values())),itemMapSize:V(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Gl=te({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(D(),j(f(Fe),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:R(()=>[oe(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Vp=te({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:r,currentElement:n}=jl();return Ie(V(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>(D(),j(Gl,ge({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Ab=te({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,r=V(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=V(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>(D(),we(Be,null,[ke(" We render single input if it's required "),r.value?(D(),j(Vp,ge({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(D(!0),we(Be,{key:1},er(n.value,o=>(D(),j(Vp,ge({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[jp,Ib]=Rt("PopperRoot"),Up=te({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return Ib({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>oe(r.$slots,"default")}}),zp=te({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Ee(),s=jp();return xa(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(D(),j(f(Fe),{ref:f(r),as:i.as,"as-child":i.asChild},{default:R(()=>[oe(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rb={key:0,d:"M0 0L6 6L12 0"},kb={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},$b=te({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Ee(),(r,n)=>(D(),j(f(Fe),ge(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:R(()=>[oe(r.$slots,"default",{},()=>[r.rounded?(D(),we("path",kb)):(D(),we("path",Rb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Pb(e){return e!==null}function Db(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:s}=t,i=s.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=Jl(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",m="";return l==="bottom"?(h=i?c:`${d}px`,m=`${-a}px`):l==="top"?(h=i?c:`${d}px`,m=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,m=i?c:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,m=i?c:`${p}px`),{data:{x:h,y:m}}}}}function Jl(e){const[t,r="center"]=e.split("-");return[t,r]}var Ob=["top","right","bottom","left"],An=Math.min,Gt=Math.max,qo=Math.round,Bo=Math.floor,Ir=e=>({x:e,y:e}),Hb={left:"right",right:"left",bottom:"top",top:"bottom"};function Yl(e,t,r){return Gt(e,An(t,r))}function en(e,t){return typeof e=="function"?e(t):e}function tn(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Zl(e){return e==="x"?"y":"x"}function Xl(e){return e==="y"?"height":"width"}function Rr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ql(e){return Zl(Rr(e))}function Mb(e,t,r){r===void 0&&(r=!1);const n=xs(e),s=Ql(e),i=Xl(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Lo(o)),[o,Lo(o)]}function Nb(e){const t=Lo(e);return[ec(e),t,ec(t)]}function ec(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Kp=["left","right"],Wp=["right","left"],qb=["top","bottom"],Bb=["bottom","top"];function Lb(e,t,r){switch(e){case"top":case"bottom":return r?t?Wp:Kp:t?Kp:Wp;case"left":case"right":return t?qb:Bb;default:return[]}}function Fb(e,t,r,n){const s=xs(e);let i=Lb(tn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(ec)))),i}function Lo(e){const t=tn(e);return Hb[t]+e.slice(t.length)}function Vb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gp(e){return typeof e!="number"?Vb(e):{top:e,right:e,bottom:e,left:e}}function Fo(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Jp(e,t,r){let{reference:n,floating:s}=e;const i=Rr(t),o=Ql(t),a=Xl(o),l=tn(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(xs(t)){case"start":h[o]-=p*(r&&u?-1:1);break;case"end":h[o]+=p*(r&&u?-1:1);break}return h}async function jb(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=en(t,e),m=Gp(h),w=a[p?d==="floating"?"reference":"floating":d],x=Fo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),y=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},b=Fo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:C,strategy:l}):v);return{top:(x.top-b.top+m.top)/y.y,bottom:(b.bottom-x.bottom+m.bottom)/y.y,left:(x.left-b.left+m.left)/y.x,right:(b.right-x.right+m.right)/y.x}}var Ub=50,zb=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:jb},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=Jp(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:v,fn:C}=x,{x:y,y:b,data:_,reset:T}=await C({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=y??c,d=b??d,m[v]={...m[v],..._},T&&h<Ub&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(u=T.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):T.rects),{x:c,y:d}=Jp(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},Kb=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=en(e,t)||{};if(u==null)return{};const d=Gp(c),p={x:r,y:n},h=Ql(s),m=Xl(h),w=await o.getDimensions(u),x=h==="y",v=x?"top":"left",C=x?"bottom":"right",y=x?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-p[h]-i.floating[m],_=p[h]-i.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let P=T?T[y]:0;(!P||!await(o.isElement==null?void 0:o.isElement(T)))&&(P=a.floating[y]||i.floating[m]);const g=b/2-_/2,M=P/2-w[m]/2-1,N=An(d[v],M),S=An(d[C],M),E=N,A=P-w[m]-S,Z=P/2-w[m]/2+g,ee=Yl(E,Z,A),z=!l.arrow&&xs(s)!=null&&Z!==ee&&i.reference[m]/2-(Z<E?N:S)-w[m]/2<0,Q=z?Z<E?Z-E:Z-A:0;return{[h]:p[h]+Q,data:{[h]:ee,centerOffset:Z-ee-Q,...z&&{alignmentOffset:Q}},reset:z}}}),Wb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...x}=en(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=tn(s),C=Rr(a),y=tn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(y||!w?[Lo(a)]:Nb(a)),T=m!=="none";!p&&T&&_.push(...Fb(a,w,m,b));const P=[a,..._],g=await l.detectOverflow(t,x),M=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&M.push(g[v]),d){const Z=Mb(s,o,b);M.push(g[Z[0]],g[Z[1]])}if(N=[...N,{placement:s,overflows:M}],!M.every(Z=>Z<=0)){var S,E;const Z=(((S=i.flip)==null?void 0:S.index)||0)+1,ee=P[Z];if(ee&&(!(d==="alignment"&&C!==Rr(ee))||N.every(Q=>Rr(Q.placement)===C?Q.overflows[0]>0:!0)))return{data:{index:Z,overflows:N},reset:{placement:ee}};let z=(E=N.filter(Q=>Q.overflows[0]<=0).sort((Q,Y)=>Q.overflows[1]-Y.overflows[1])[0])==null?void 0:E.placement;if(!z)switch(h){case"bestFit":{var A;const Q=(A=N.filter(Y=>{if(T){const le=Rr(Y.placement);return le===C||le==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(le=>le>0).reduce((le,K)=>le+K,0)]).sort((Y,le)=>Y[1]-le[1])[0])==null?void 0:A[0];Q&&(z=Q);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zp(e){return Ob.some(t=>e[t]>=0)}var Gb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=en(e,t);switch(s){case"referenceHidden":{const o=Yp(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Zp(o)}}}case"escaped":{const o=Yp(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Zp(o)}}}default:return{}}}}},Xp=new Set(["left","top"]);async function Jb(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=tn(r),a=xs(r),l=Rr(r)==="y",u=Xp.has(o)?-1:1,c=i&&l?-1:1,d=en(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}var Yb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await Jb(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Zb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:C,y}=v;return{x:C,y}}},...u}=en(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=Rr(tn(s)),h=Zl(p);let m=c[h],w=c[p];if(o){const v=h==="y"?"top":"left",C=h==="y"?"bottom":"right",y=m+d[v],b=m-d[C];m=Yl(y,m,b)}if(a){const v=p==="y"?"top":"left",C=p==="y"?"bottom":"right",y=w+d[v],b=w-d[C];w=Yl(y,w,b)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},Xb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=en(e,t),c={x:r,y:n},d=Rr(s),p=Zl(d);let h=c[p],m=c[d];const w=en(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const y=p==="y"?"height":"width",b=i.reference[p]-i.floating[y]+x.mainAxis,_=i.reference[p]+i.reference[y]-x.mainAxis;h<b?h=b:h>_&&(h=_)}if(u){var v,C;const y=p==="y"?"width":"height",b=Xp.has(tn(s)),_=i.reference[d]-i.floating[y]+(b&&((v=o.offset)==null?void 0:v[d])||0)+(b?0:x.crossAxis),T=i.reference[d]+i.reference[y]+(b?0:((C=o.offset)==null?void 0:C[d])||0)-(b?x.crossAxis:0);m<_?m=_:m>T&&(m=T)}return{[p]:h,[d]:m}}}},Qb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=en(e,t),c=await o.detectOverflow(t,u),d=tn(s),p=xs(s),h=Rr(s)==="y",{width:m,height:w}=i.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,x=p==="end"?"top":"bottom");const C=w-c.top-c.bottom,y=m-c.left-c.right,b=An(w-c[x],C),_=An(m-c[v],y),T=!t.middlewareData.shift;let P=b,g=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=C),T&&!p){const N=Gt(c.left,0),S=Gt(c.right,0),E=Gt(c.top,0),A=Gt(c.bottom,0);h?g=m-2*(N!==0||S!==0?N+S:Gt(c.left,c.right)):P=w-2*(E!==0||A!==0?E+A:Gt(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:P});const M=await o.getDimensions(a.floating);return m!==M.width||w!==M.height?{reset:{rects:!0}}:{}}}};function Vo(){return typeof window<"u"}function Wn(e){return tc(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(tc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tc(e){return Vo()?e instanceof Node||e instanceof Jt(e).Node:!1}function wr(e){return Vo()?e instanceof Element||e instanceof Jt(e).Element:!1}function rn(e){return Vo()?e instanceof HTMLElement||e instanceof Jt(e).HTMLElement:!1}function Qp(e){return!Vo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function wi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function e1(e){return/^(table|td|th)$/.test(Wn(e))}function jo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var t1=/transform|translate|scale|rotate|perspective|filter/,r1=/paint|layout|strict|content/,Gn=e=>!!e&&e!=="none",rc;function nc(e){const t=wr(e)?yr(e):e;return Gn(t.transform)||Gn(t.translate)||Gn(t.scale)||Gn(t.rotate)||Gn(t.perspective)||!sc()&&(Gn(t.backdropFilter)||Gn(t.filter))||t1.test(t.willChange||"")||r1.test(t.contain||"")}function n1(e){let t=In(e);for(;rn(t)&&!Ts(t);){if(nc(t))return t;if(jo(t))return null;t=In(t)}return null}function sc(){return rc==null&&(rc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rc}function Ts(e){return/^(html|body|#document)$/.test(Wn(e))}function yr(e){return Jt(e).getComputedStyle(e)}function Uo(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(Wn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qp(e)&&e.host||kr(e);return Qp(t)?t.host:t}function eh(e){const t=In(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&wi(t)?t:eh(t)}function yi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=eh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Jt(s);if(i){const a=ic(o);return t.concat(o,o.visualViewport||[],wi(s)?s:[],a&&r?yi(a):[])}else return t.concat(s,yi(s,[],r))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function th(e){const t=yr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=rn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=qo(r)!==i||qo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function oc(e){return wr(e)?e:e.contextElement}function Es(e){const t=oc(e);if(!rn(t))return Ir(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=th(t);let o=(i?qo(r.width):r.width)/n,a=(i?qo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var s1=Ir(0);function rh(e){const t=Jt(e);return!sc()||!t.visualViewport?s1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Jt(e)?!1:t}function Jn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=oc(e);let o=Ir(1);t&&(n?wr(n)&&(o=Es(n)):o=Es(e));const a=i1(i,r,n)?rh(i):Ir(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const p=Jt(i),h=n&&wr(n)?Jt(n):n;let m=p,w=ic(m);for(;w&&n&&h!==m;){const x=Es(w),v=w.getBoundingClientRect(),C=yr(w),y=v.left+(w.clientLeft+parseFloat(C.paddingLeft))*x.x,b=v.top+(w.clientTop+parseFloat(C.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=b,m=Jt(w),w=ic(m)}}return Fo({width:c,height:d,x:l,y:u})}function zo(e,t){const r=Uo(e).scrollLeft;return t?t.left+r:Jn(kr(e)).left+r}function nh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-zo(e,r),y:r.top+t.scrollTop}}function o1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=kr(n),a=t?jo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Ir(1);const c=Ir(0),d=rn(n);if((d||!d&&!i)&&((Wn(n)!=="body"||wi(o))&&(l=Uo(n)),d)){const h=Jn(n);u=Es(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?nh(o,l):Ir(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function a1(e){return Array.from(e.getClientRects())}function l1(e){const t=kr(e),r=Uo(e),n=e.ownerDocument.body,s=Gt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Gt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+zo(e);const a=-r.scrollTop;return yr(n).direction==="rtl"&&(o+=Gt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var sh=25;function c1(e,t){const r=Jt(e),n=kr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=sc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=zo(n);if(u<=0){const c=n.ownerDocument,d=c.body,p=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=sh&&(i-=m)}else u<=sh&&(i+=u);return{width:i,height:o,x:a,y:l}}function u1(e,t){const r=Jn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=rn(e)?Es(e):Ir(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function ih(e,t,r){let n;if(t==="viewport")n=c1(e,r);else if(t==="document")n=l1(kr(e));else if(wr(t))n=u1(t,r);else{const s=rh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Fo(n)}function oh(e,t){const r=In(e);return r===t||!wr(r)||Ts(r)?!1:yr(r).position==="fixed"||oh(r,t)}function d1(e,t){const r=t.get(e);if(r)return r;let n=yi(e,[],!1).filter(a=>wr(a)&&Wn(a)!=="body"),s=null;const i=yr(e).position==="fixed";let o=i?In(e):e;for(;wr(o)&&!Ts(o);){const a=yr(o),l=nc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||wi(o)&&!l&&oh(e,o))?n=n.filter(u=>u!==o):s=a,o=In(o)}return t.set(e,n),n}function f1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?jo(t)?[]:d1(t,this._c):[].concat(r),n],o=ih(t,i[0],s);let a=o.top,l=o.right,u=o.bottom,c=o.left;for(let d=1;d<i.length;d++){const p=ih(t,i[d],s);a=Gt(p.top,a),l=An(p.right,l),u=An(p.bottom,u),c=Gt(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function p1(e){const{width:t,height:r}=th(e);return{width:t,height:r}}function h1(e,t,r){const n=rn(t),s=kr(t),i=r==="fixed",o=Jn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ir(0);function u(){l.x=zo(s)}if(n||!n&&!i)if((Wn(t)!=="body"||wi(s))&&(a=Uo(t)),n){const d=Jn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?nh(s,a):Ir(0);return{x:o.left+a.scrollLeft-l.x-c.x,y:o.top+a.scrollTop-l.y-c.y,width:o.width,height:o.height}}function ac(e){return yr(e).position==="static"}function ah(e,t){if(!rn(e)||yr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return kr(e)===r&&(r=r.ownerDocument.body),r}function lh(e,t){const r=Jt(e);if(jo(e))return r;if(!rn(e)){let s=In(e);for(;s&&!Ts(s);){if(wr(s)&&!ac(s))return s;s=In(s)}return r}let n=ah(e,t);for(;n&&e1(n)&&ac(n);)n=ah(n,t);return n&&Ts(n)&&ac(n)&&!nc(n)?r:n||n1(e)||r}var g1=async function(e){const t=this.getOffsetParent||lh,r=this.getDimensions,n=await r(e.floating);return{reference:h1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function v1(e){return yr(e).direction==="rtl"}var m1={convertOffsetParentRelativeRectToViewportRelativeRect:o1,getDocumentElement:kr,getClippingRect:f1,getOffsetParent:lh,getElementRects:g1,getClientRects:a1,getDimensions:p1,getScale:Es,isElement:wr,isRTL:v1};function ch(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function w1(e,t){let r=null,n;const s=kr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=Bo(d),w=Bo(s.clientWidth-(c+p)),x=Bo(s.clientHeight-(d+h)),v=Bo(c),C={rootMargin:-m+"px "+-w+"px "+-x+"px "+-v+"px",threshold:Gt(0,An(1,l))||1};let y=!0;function b(_){const T=_[0].intersectionRatio;if(T!==l){if(!y)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!ch(u,e.getBoundingClientRect())&&o(),y=!1}try{r=new IntersectionObserver(b,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(b,C)}r.observe(e)}return o(!0),i}function y1(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=oc(e),c=s||i?[...u?yi(u):[],...t?yi(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?w1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[C]=v;C&&C.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?Jn(e):null;l&&x();function x(){const v=Jn(e);w&&!ch(w,v)&&r(),w=v,m=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(C=>{s&&C.removeEventListener("scroll",r),i&&C.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var b1=Yb,_1=Zb,uh=Wb,S1=Qb,C1=Gb,x1=Kb,T1=Xb,E1=(e,t,r)=>{const n=new Map,s={platform:m1,...r},i={...s.platform,_c:n};return zb(e,t,{...s,platform:i})};function A1(e){return e!=null&&typeof e=="object"&&"$el"in e}function lc(e){if(A1(e)){const t=e.$el;return tc(t)&&Wn(t)==="#comment"?null:t}return e}function As(e){return typeof e=="function"?e():f(e)}function I1(e){return{name:"arrow",options:e,fn(t){const r=lc(As(e.element));return r==null?{}:x1({element:r,padding:e.padding}).fn(t)}}}function dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fh(e,t){const r=dh(e);return Math.round(t*r)/r}function R1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=V(()=>{var P;return(P=As(r.open))!=null?P:!0}),i=V(()=>As(r.middleware)),o=V(()=>{var P;return(P=As(r.placement))!=null?P:"bottom"}),a=V(()=>{var P;return(P=As(r.strategy))!=null?P:"absolute"}),l=V(()=>{var P;return(P=As(r.transform))!=null?P:!0}),u=V(()=>lc(e.value)),c=V(()=>lc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=rt({}),x=F(!1),v=V(()=>{const P={position:h.value,left:"0",top:"0"};if(!c.value)return P;const g=fh(c.value,d.value),M=fh(c.value,p.value);return l.value?{...P,transform:"translate("+g+"px, "+M+"px)",...dh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:M+"px"}});let C;function y(){if(u.value==null||c.value==null)return;const P=s.value;E1(u.value,c.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(g=>{d.value=g.x,p.value=g.y,h.value=g.strategy,m.value=g.placement,w.value=g.middlewareData,x.value=P!==!1})}function b(){typeof C=="function"&&(C(),C=void 0)}function _(){if(b(),n===void 0){y();return}if(u.value!=null&&c.value!=null){C=n(u.value,c.value,y);return}}function T(){s.value||(x.value=!1)}return Ie([i,o,a,s],y,{flush:"sync"}),Ie([u,c],_,{flush:"sync"}),Ie(s,T,{flush:"sync"}),$i()&&ua(b),{x:qr(d),y:qr(p),strategy:qr(h),placement:qr(m),middlewareData:qr(w),isPositioned:qr(x),floatingStyles:v,update:y}}var k1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[$1,P1]=Rt("PopperContent"),ph=te({inheritAttrs:!1,__name:"PopperContent",props:ju({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...k1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=jp(),{forwardRef:i,currentElement:o}=Ee(),a=F(),l=F(),{width:u,height:c}=kp(l),d=V(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=V(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=V(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=V(()=>({padding:p.value,boundary:h.value.filter(Pb),altBoundary:h.value.length>0})),w=V(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=sy(()=>[b1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&uh({...m.value,...w.value}),r.avoidCollisions&&_1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?T1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&uh({...m.value,...w.value}),S1({...m.value,apply:({elements:N,rects:S,availableWidth:E,availableHeight:A})=>{const{width:Z,height:ee}=S.reference,z=N.floating.style;z.setProperty("--reka-popper-available-width",`${E}px`),z.setProperty("--reka-popper-available-height",`${A}px`),z.setProperty("--reka-popper-anchor-width",`${Z}px`),z.setProperty("--reka-popper-anchor-height",`${ee}px`)}}),l.value&&I1({element:l.value,padding:r.arrowPadding}),Db({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&C1({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:C,isPositioned:y,middlewareData:b,update:_}=R1(V(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...N)=>y1(...N,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),T=V(()=>Jl(C.value)[0]),P=V(()=>Jl(C.value)[1]);xa(()=>{y.value&&n("placed")});const g=V(()=>{const N=b.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&N}),M=F("");return tt(()=>{o.value&&(M.value=window.getComputedStyle(o.value).zIndex)}),P1({placedSide:T,onArrowChange:N=>l.value=N,arrowX:V(()=>b.value.arrow?.x??0),arrowY:V(()=>b.value.arrow?.y??0),shouldHideArrow:g}),(N,S)=>(D(),we("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:gt({...f(v),transform:f(y)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:M.value,"--reka-popper-transform-origin":[f(b).transformOrigin?.x,f(b).transformOrigin?.y].join(" "),...f(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[q(f(Fe),ge({ref:f(i)},N.$attrs,{"as-child":r.asChild,as:N.as,"data-side":T.value,"data-align":P.value,style:{animation:f(y)?void 0:"none"}}),{default:R(()=>[oe(N.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),D1={top:"bottom",right:"left",bottom:"top",left:"right"},O1=te({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=Ee(),r=$1(),n=V(()=>D1[r.placedSide.value]);return(s,i)=>(D(),we("span",{ref:o=>{f(r).onArrowChange(o)},style:gt({position:"absolute",left:f(r).arrowX?.value?`${f(r).arrowX?.value}px`:void 0,top:f(r).arrowY?.value?`${f(r).arrowY?.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(r).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(r).placedSide.value],visibility:f(r).shouldHideArrow.value?"hidden":void 0})},[q($b,ge(s.$attrs,{ref:f(t),style:{display:"block"},as:s.as,"as-child":s.asChild,rounded:s.rounded,width:s.width,height:s.height}),{default:R(()=>[oe(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function hh(e){const t=Ro({nonce:F()});return V(()=>e?.value||t.nonce?.value)}function H1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function gh(e,t,r){return mi(100/(r-t)*(e-t),0,100)}function M1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function N1(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function q1(e,t,r){const n=e/2;return(n-cc([0,50],[0,n])(t)*r)*r}function B1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function L1(e,t){if(t>0){const r=B1(e);return Math.min(...r)>=t}return!0}function cc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function F1(e){return(String(e).split(".")[1]||"").length}function V1(e,t){const r=10**t;return Math.round(e*r)/r}var vh=["PageUp","PageDown"],mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[yh,bh]=Rt(["SliderVertical","SliderHorizontal"]),j1=te({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,dir:o,inverted:a}=At(r),{forwardRef:l,currentElement:u}=Ee(),c=Is(),d=F(),p=F(),h=V(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const v=p.value||u.value.getBoundingClientRect(),C=[...c.thumbElements.value][c.valueIndexToChangeRef.value],y=c.thumbAlignment.value==="contain"?C.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-C.getBoundingClientRect().left);const b=cc([0,v.width-y],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,b(x?w.clientX-v.left-y/2:w.clientX-v.left-(d.value??0))}return bh({startEdge:V(()=>h.value?"left":"right"),endEdge:V(()=>h.value?"right":"left"),direction:V(()=>h.value?1:-1),size:"width"}),(w,x)=>(D(),j(_h,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:gt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:x[1]||(x[1]=v=>{n("slideMove",m(v))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=v=>{const C=h.value?"from-left":"from-right";n("stepKeyDown",v,f(wh)[C].includes(v.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=v=>n("endKeyDown",v)),onHomeKeyDown:x[5]||(x[5]=v=>n("homeKeyDown",v))},{default:R(()=>[oe(w.$slots,"default")]),_:3},8,["dir","style"]))}}),U1=te({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,inverted:o}=At(r),a=Is(),{forwardRef:l,currentElement:u}=Ee(),c=F(),d=F(),p=V(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],C=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const y=cc([0,x.height-C],p.value?[s.value,i.value]:[i.value,s.value]),b=w?m.clientY-x.top-C/2:m.clientY-x.top-(c.value??0);return d.value=x,y(b)}return bh({startEdge:V(()=>p.value?"bottom":"top"),endEdge:V(()=>p.value?"top":"bottom"),direction:V(()=>p.value?1:-1),size:"height"}),(m,w)=>(D(),j(_h,{ref:f(l),"data-orientation":"vertical",style:gt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(wh)[v].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:R(()=>[oe(m.$slots,"default")]),_:3},8,["style"]))}}),[Is,z1]=Rt("SliderRoot"),K1=te({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,{min:s,max:i,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:u,thumbAlignment:c,dir:d}=At(r),p=ql(d),{forwardRef:h,currentElement:m}=Ee(),w=Ap(m),{CollectionSlot:x}=Qr({isProvider:!0}),v=_s(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),C=V(()=>Array.isArray(v.value)?[...v.value]:[]),y=F(0),b=F(C.value);function _(N){g(N,N1(C.value,N))}function T(N){g(N,y.value)}function P(){const N=b.value[y.value];C.value[y.value]!==N&&n("valueCommit",qe(C.value))}function g(N,S,{commit:E}={commit:!1}){const A=F1(o.value),Z=mi(V1(Math.round((N-s.value)/o.value)*o.value+s.value,A),s.value,i.value),ee=H1(C.value,Z,S);if(L1(ee,a.value*o.value)){y.value=ee.indexOf(Z);const z=String(ee)!==String(v.value);z&&E&&n("valueCommit",ee),z&&(M.value[y.value]?.focus(),v.value=ee)}}const M=F([]);return z1({modelValue:v,currentModelValue:C,valueIndexToChangeRef:y,thumbElements:M,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(N,S)=>(D(),j(f(x),null,{default:R(()=>[(D(),j(Zs(f(l)==="horizontal"?j1:U1),ge(N.$attrs,{ref:f(h),"as-child":N.asChild,as:N.as,min:f(s),max:f(i),dir:f(p),inverted:N.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:S[0]||(S[0]=()=>{f(u)||(b.value=C.value)}),onSlideStart:S[1]||(S[1]=E=>!f(u)&&_(E)),onSlideMove:S[2]||(S[2]=E=>!f(u)&&T(E)),onSlideEnd:S[3]||(S[3]=E=>!f(u)&&P()),onHomeKeyDown:S[4]||(S[4]=E=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:S[5]||(S[5]=E=>!f(u)&&g(f(i),C.value.length-1,{commit:!0})),onStepKeyDown:S[6]||(S[6]=(E,A)=>{if(!f(u)){const Z=f(vh).includes(E.key)||E.shiftKey&&f(mh).includes(E.key)?10:1,ee=y.value,z=C.value[ee];g(z+f(o)*Z*A,ee,{commit:!0})}})}),{default:R(()=>[oe(N.$slots,"default",{modelValue:f(v)}),f(w)&&N.name?(D(),j(f(Ab),{key:0,type:"number",value:f(v),name:N.name,required:N.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):ke("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),_h=te({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,s=Is();return(i,o)=>(D(),j(f(Fe),ge({"data-slider-impl":""},r,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(n("homeKeyDown",a),a.preventDefault()):a.key==="End"?(n("endKeyDown",a),a.preventDefault()):f(vh).concat(f(mh)).includes(a.key)&&(n("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),f(s).thumbElements.value.includes(l)?l.focus():n("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&n("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),n("slideEnd",a))})}),{default:R(()=>[oe(i.$slots,"default")]),_:3},16))}}),W1=te({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Is(),r=yh();Ee();const n=V(()=>t.currentModelValue.value.map(o=>gh(o,t.min.value,t.max.value))),s=V(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=V(()=>100-Math.max(...n.value,0));return(o,a)=>(D(),j(f(Fe),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:gt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:R(()=>[oe(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),G1=te({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Is(),n=yh(),{forwardRef:s,currentElement:i}=Ee(),{CollectionItem:o}=Qr(),a=V(()=>r.modelValue?.value?.[t.index]),l=V(()=>a.value===void 0?0:gh(a.value,r.min.value??0,r.max.value??100)),u=V(()=>M1(t.index,r.modelValue?.value?.length??0)),c=kp(i),d=V(()=>c[n.size].value),p=V(()=>r.thumbAlignment.value==="overflow"||!d.value?0:q1(d.value,l.value,n.direction.value)),h=Ol();return Ke(()=>{r.thumbElements.value.push(i.value)}),Ot(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>(D(),j(f(o),null,{default:R(()=>[q(f(Fe),ge(m.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":m.$attrs["aria-label"]||u.value,"data-disabled":f(r).disabled.value?"":void 0,"data-orientation":f(r).orientation.value,"aria-valuenow":a.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,"aria-orientation":f(r).orientation.value,"as-child":m.asChild,as:m.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(n).startEdge.value]:`calc(${l.value}% + ${p.value}px)`,display:!f(h)&&a.value===void 0?"none":void 0},onFocus:w[0]||(w[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:R(()=>[oe(m.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),J1=te({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=Qr(),{forwardRef:n,currentElement:s}=Ee(),i=V(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(D(),j(G1,ge({ref:f(n)},t,{index:i.value}),{default:R(()=>[oe(o.$slots,"default")]),_:3},16,["index"]))}}),Y1=te({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Is();return Ee(),(r,n)=>(D(),j(f(Fe),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:R(()=>[oe(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),Z1=te({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return Ee(),(r,n)=>(D(),j(f(Fe),ge(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),[Yt,X1]=Rt("ScrollAreaRoot"),Q1=te({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=F(0),s=F(0),i=F(),o=F(),a=F(),l=F(),u=F(!1),c=F(!1),{type:d,dir:p,scrollHideDelay:h}=At(r),m=ql(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:v,currentElement:C}=Ee();return X1({type:d,dir:m,scrollHideDelay:h,scrollArea:C,viewport:i,onViewportChange:y=>{i.value=y||void 0},content:o,onContentChange:y=>{o.value=y},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:y=>{a.value=y||void 0},onScrollbarYChange:y=>{l.value=y||void 0},onScrollbarXEnabledChange:y=>{u.value=y},onScrollbarYEnabledChange:y=>{c.value=y},onCornerWidthChange:y=>{n.value=y},onCornerHeightChange:y=>{s.value=y}}),(y,b)=>(D(),j(f(Fe),{ref:f(v),"as-child":r.asChild,as:y.as,dir:f(m),style:gt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:R(()=>[oe(y.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),e2=te({__name:"ScrollAreaCornerImpl",setup(e){const t=Yt(),r=F(0),n=F(0),s=V(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return Kn(t.scrollbarX.value,i),Kn(t.scrollbarY.value,o),Ie(()=>t.scrollbarX.value,i),Ie(()=>t.scrollbarY.value,o),(a,l)=>s.value?(D(),j(f(Fe),ge({key:0,style:{width:`${r.value}px`,height:`${n.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},a.$parent?.$props),{default:R(()=>[oe(a.$slots,"default")]),_:3},16,["style"])):ke("v-if",!0)}}),t2=te({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Ee(),n=Yt(),s=V(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=V(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(D(),j(e2,ge({key:0},t,{ref:f(r)}),{default:R(()=>[oe(o.$slots,"default")]),_:3},16)):ke("v-if",!0)}});function Sh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ko(e){const t=Ch(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Ch(e,t){const r=e/t;return Number.isNaN(r)?0:r}function r2(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(n)}function xh(e,t,r="ltr"){const n=Ko(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=mi(e,l[0],l[1]);return Sh([0,o],[0,a])(u)}function Wo(e){return e?Number.parseInt(e,10):0}function n2(e,t,r,n="ltr"){const s=Ko(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return Sh([l,u],d)(e)}function Th(e,t){return e>0&&e<t}var s2=te({__name:"ScrollAreaScrollbarX",setup(e){const t=Yt(),r=Go(),{forwardRef:n,currentElement:s}=Ee();Ke(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>(D(),j(Eh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:gt({bottom:0,left:f(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":i.value?`${f(Ko)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:R(()=>[oe(o.$slots,"default")]),_:3},8,["style"]))}}),i2=te({__name:"ScrollAreaScrollbarY",setup(e){const t=Yt(),r=Go(),{forwardRef:n,currentElement:s}=Ee();Ke(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>(D(),j(Eh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:gt({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":i.value?`${f(Ko)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:R(()=>[oe(o.$slots,"default")]),_:3},8,["style"]))}}),uc=te({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Yt(),r=bi(),{forwardRef:n}=Ee(),s=F(!1),i=Dl(()=>{if(t.viewport.value){const o=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,a=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;s.value=r.isHorizontal.value?o:a}},10);return Ke(()=>i()),Kn(t.viewport,i),Kn(t.content,i),(o,a)=>(D(),j(f(xn),{present:o.forceMount||s.value},{default:R(()=>[q(dc,ge(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[oe(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),o2=te({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Yt(),r=bi(),{forwardRef:n}=Ee(),{state:s,dispatch:i}=Fl("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=Dl(()=>i("SCROLL_END"),100);return tt(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),tt(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),tt(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const w=d[p];h!==w&&(i("SCROLL"),u()),h=w};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),Ke(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Ot(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(D(),j(f(xn),{present:c.forceMount||o.value},{default:R(()=>[q(uc,ge(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[oe(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),a2=te({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Yt(),{forwardRef:r}=Ee();let n;const s=F(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return Ke(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Ot(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(D(),j(f(xn),{present:a.forceMount||s.value},{default:R(()=>[q(uc,ge(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:R(()=>[oe(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),l2=te({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Yt(),r=bi(),{forwardRef:n}=Ee(),{state:s,dispatch:i}=Fl("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");tt(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Dl(()=>i("SCROLL_END"),100);return tt(l=>{const u=t.viewport.value,c=r.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let d=u[c];const p=()=>{const h=u[c];d!==h&&(i("SCROLL"),a()),d=h};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(D(),j(f(xn),{present:l.forceMount||o.value},{default:R(()=>[q(dc,ge(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:R(()=>[oe(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[bi,c2]=Rt("ScrollAreaScrollbar"),u2=te({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:r}=Ee(),n=Yt(),s=V(()=>t.orientation==="horizontal");Ie(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Ot(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=At(t);return c2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(D(),j(a2,ge({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(D(),j(l2,ge({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(D(),j(o2,ge({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(D(),j(uc,ge({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(D(),j(dc,ge({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16)):ke("v-if",!0)}}),[Go,d2]=Rt("ScrollAreaScrollbarVisible"),dc=te({__name:"ScrollAreaScrollbarVisible",setup(e){const t=Yt(),r=bi(),{forwardRef:n}=Ee(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=V(()=>{const v=Ch(s.value.viewport,s.value.content);return v>0&&v<1}),o=F(),a=F(0);function l(v,C){if(h.value){const y=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=y,Th(y,C)&&v.preventDefault()}else{const y=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=y,Th(y,C)&&v.preventDefault()}}function u(v,C){h.value?a.value=C.x:a.value=C.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,C){return n2(v,a.value,s.value,C)}const h=V(()=>r.isHorizontal.value);function m(v){h.value?t.viewport.value.scrollLeft=p(v,t.dir.value):t.viewport.value.scrollTop=p(v)}function w(){if(h.value){if(t.viewport.value&&o.value){const v=t.viewport.value.scrollLeft,C=xh(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${C}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,C=xh(v,s.value);o.value.style.transform=`translate3d(0, ${C}px, 0)`}}function x(v){o.value=v}return d2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(v,C)=>h.value?(D(),j(s2,ge({key:0},v.$attrs,{ref:f(n)}),{default:R(()=>[oe(v.$slots,"default")]),_:3},16)):(D(),j(i2,ge({key:1},v.$attrs,{ref:f(n)}),{default:R(()=>[oe(v.$slots,"default")]),_:3},16))}}),Eh=te({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=Yt(),i=Go(),o=bi(),{forwardRef:a,currentElement:l}=Ee(),u=F(""),c=F();function d(v){c.value&&n("onDragScroll",{x:v.clientX-c.value?.left,y:v.clientY-c.value?.top})}function p(v){v.button===0&&(v.target.setPointerCapture(v.pointerId),c.value=l.value.getBoundingClientRect(),u.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(v))}function h(v){d(v)}function m(v){const C=v.target;C.hasPointerCapture(v.pointerId)&&C.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(v){const C=v.target,y=l.value?.contains(C),b=i.sizes.value.content-i.sizes.value.viewport;y&&i.handleWheelScroll(v,b)}Ke(()=>{document.addEventListener("wheel",w,{passive:!1})}),Ot(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:Wo(getComputedStyle(l.value).paddingLeft),paddingEnd:Wo(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:s.viewport.value?.scrollHeight??0,viewport:s.viewport.value?.offsetHeight??0,scrollbar:{size:l.value?.clientHeight??0,paddingStart:Wo(getComputedStyle(l.value).paddingTop),paddingEnd:Wo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Kn(l,x),Kn(s.content,x),(v,C)=>(D(),j(f(Fe),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:p,onPointermove:h,onPointerup:m},{default:R(()=>[oe(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),f2=te({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Yt(),n=Go();function s(d){const p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;n.handleThumbDown(d,{x:h,y:m})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Ee(),l=F(),u=V(()=>r.viewport.value);function c(){l.value||(l.value=r2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ey(V(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Ot(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(D(),j(f(Fe),{ref:f(o),"data-state":f(n).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:d.as,onPointerdown:s,onPointerup:i},{default:R(()=>[oe(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),p2=te({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,{nonce:n}=At(r),s=hh(n),i=Yt(),o=F();Ke(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Ee();return(u,c)=>(D(),we(Be,null,[ne("div",ge({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:f(i).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(i).scrollbarYEnabled.value?"scroll":"hidden"}},u.$attrs,{tabindex:0}),[q(f(Fe),{ref:f(a),style:gt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:R(()=>[oe(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),q(f(Fe),{as:"style",nonce:f(s)},{default:R(()=>c[0]||(c[0]=[Me(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),h2=[" ","Enter","ArrowUp","ArrowDown"],g2=[" ","Enter"],bx=10;function _i(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>fc(n,t,r)):fc(e,t,r)}function fc(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:ny(e,t)}function v2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var m2={key:0,value:""},[Rn,Ah]=Rt("SelectRoot"),w2=te({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=e,n=t,{required:s,disabled:i,multiple:o,dir:a}=At(r),l=_s(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=_s(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=V(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Rl(l.value));Qr({isProvider:!0});const m=ql(a),w=Ap(c),x=F(new Set),v=V(()=>Array.from(x.value).map(b=>b.value).join(";"));function C(b){if(o.value){const _=Array.isArray(l.value)?[...l.value]:[],T=_.findIndex(P=>fc(P,b,r.by));T===-1?_.push(b):_.splice(T,1),l.value=[..._]}else l.value=b}function y(b){return Array.from(x.value).find(_=>_i(b,_.value,r.by))}return Ah({triggerElement:c,onTriggerChange:b=>{c.value=b},valueElement:d,onValueElementChange:b=>{d.value=b},contentId:"",modelValue:l,onValueChange:C,by:r.by,open:u,multiple:o,required:s,onOpenChange:b=>{u.value=b},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:b=>{const _=y(b.value);_&&x.value.delete(_),x.value.add(b)},onOptionRemove:b=>{const _=y(b.value);_&&x.value.delete(_)}}),(b,_)=>(D(),j(f(Up),null,{default:R(()=>[oe(b.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?(D(),j(y2,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:b.name,autocomplete:b.autocomplete,disabled:f(i),value:f(l)},{default:R(()=>[f(Rl)(f(l))?(D(),we("option",m2)):ke("v-if",!0),(D(!0),we(Be,null,er(Array.from(x.value),T=>(D(),we("option",ge({key:T.value??""},{ref_for:!0},T),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):ke("v-if",!0)]),_:3}))}}),y2=te({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=F(),n=Rn();Ie(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const u=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(u)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>(D(),j(f(Gl),{"as-child":""},{default:R(()=>[ne("select",ge({ref_key:"selectElement",ref:r},t,{onInput:s}),[oe(i.$slots,"default")],16)]),_:3}))}}),b2=te({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zr(e);return(r,n)=>(D(),j(f(ph),ge(f(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),_2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Yn,Ih]=Rt("SelectContent"),S2=te({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Rn();Fy(),xp(r.bodyLock);const{CollectionSlot:i,getItems:o}=Qr(),a=F();Rp(a);const{search:l,handleTypeaheadSearch:u}=$p(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function x(){d.value&&a.value&&Bp([d.value,a.value])}Ie(h,()=>{x()});const{onOpenChange:v,triggerPointerDownPosRef:C}=s;tt(_=>{if(!a.value)return;let T={x:0,y:0};const P=M=>{T={x:Math.abs(Math.round(M.pageX)-(C.value?.x??0)),y:Math.abs(Math.round(M.pageY)-(C.value?.y??0))}},g=M=>{M.pointerType!=="touch"&&(T.x<=10&&T.y<=10?M.preventDefault():a.value?.contains(M.target)||v(!1),document.removeEventListener("pointermove",P),C.value=null)};C.value!==null&&(document.addEventListener("pointermove",P),document.addEventListener("pointerup",g,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",g,{capture:!0})})});function y(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&u(_.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let P=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(_.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const g=_.target,M=P.indexOf(g);P=P.slice(M+1)}setTimeout(()=>Bp(P)),_.preventDefault()}}const b=Zr(V(()=>r.position==="popper"?r:{}).value);return Ih({content:a,viewport:c,onViewportChange:_=>{c.value=_},itemRefCallback:(_,T,P)=>{const g=!m.value&&!P,M=_i(s.modelValue.value,T,s.by);if(s.multiple.value){if(w.value)return;(M||g)&&(d.value=_,M&&(w.value=!0))}else(M||g)&&(d.value=_);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(_,T,P)=>{const g=!m.value&&!P;(_i(s.modelValue.value,T,s.by)||g)&&(p.value=_)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(_,T)=>(D(),j(f(i),null,{default:R(()=>[q(f(Np),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=sr(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=P=>{n("closeAutoFocus",P),!P.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),P.preventDefault())})},{default:R(()=>[q(f(Ul),{"as-child":"","disable-outside-pointer-events":_.disableOutsidePointerEvents,onFocusOutside:T[2]||(T[2]=sr(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=P=>f(s).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=P=>n("escapeKeyDown",P)),onPointerDownOutside:T[5]||(T[5]=P=>n("pointerDownOutside",P))},{default:R(()=>[(D(),j(Zs(_.position==="popper"?b2:x2),ge({..._.$attrs,...f(b)},{id:f(s).contentId,ref:P=>{const g=f(jt)(P);g?.hasAttribute("data-reka-popper-content-wrapper")?a.value=g.firstElementChild:a.value=g},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=sr(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=P=>h.value=!0),onKeydown:y}),{default:R(()=>[oe(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[pc,C2]=Rt("SelectItemAlignedPosition"),x2=te({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const r=e,n=t,{getItems:s}=Qr(),i=Rn(),o=Yn(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=Ee(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const y=i.triggerElement.value.getBoundingClientRect(),b=d.value.getBoundingClientRect(),_=i.valueElement.value.getBoundingClientRect(),T=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Ae=T.left-b.left,Je=_.left-Ae,at=y.left-Je,De=y.width+at,ct=Math.max(De,b.width),ht=window.innerWidth-10,et=mi(Je,10,Math.max(10,ht-ct));u.value.style.minWidth=`${De}px`,u.value.style.left=`${et}px`}else{const Ae=b.right-T.right,Je=window.innerWidth-_.right-Ae,at=window.innerWidth-y.right-Je,De=y.width+at,ct=Math.max(De,b.width),ht=window.innerWidth-10,et=mi(Je,10,Math.max(10,ht-ct));u.value.style.minWidth=`${De}px`,u.value.style.right=`${et}px`}const P=s().map(Ae=>Ae.ref),g=window.innerHeight-20,M=p.value.scrollHeight,N=window.getComputedStyle(d.value),S=Number.parseInt(N.borderTopWidth,10),E=Number.parseInt(N.paddingTop,10),A=Number.parseInt(N.borderBottomWidth,10),Z=Number.parseInt(N.paddingBottom,10),ee=S+E+M+Z+A,z=Math.min(h.value.offsetHeight*5,ee),Q=window.getComputedStyle(p.value),Y=Number.parseInt(Q.paddingTop,10),le=Number.parseInt(Q.paddingBottom,10),K=y.top+y.height/2-10,ce=g-K,pe=h.value.offsetHeight/2,Ce=h.value.offsetTop+pe,He=S+E+Ce,xe=ee-He;if(He<=K){const Ae=h.value===P[P.length-1];u.value.style.bottom="0px";const Je=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,at=He+Math.max(ce,pe+(Ae?le:0)+Je+A);u.value.style.height=`${at}px`}else{const Ae=h.value===P[0];u.value.style.top="0px";const Je=Math.max(K,S+p.value.offsetTop+(Ae?Y:0)+pe)+xe;u.value.style.height=`${Je}px`,p.value.scrollTop=He-K+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${z}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=F("");Ke(async()=>{await vt(),x(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function C(y){y&&l.value===!0&&(x(),w?.(),l.value=!1)}return Kn(i.triggerElement,()=>{x()}),C2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:C}),(y,b)=>(D(),we("div",{ref_key:"contentWrapperElement",ref:u,style:gt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[q(f(Fe),ge({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...r}),{default:R(()=>[oe(y.$slots,"default")]),_:3},16)],4))}}),T2=te({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Ah(e.context),Ih(_2),(t,r)=>oe(t.$slots,"default")}}),E2={key:1},A2=te({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Xr(r,t),s=Rn(),i=F();Ke(()=>{i.value=new DocumentFragment});const o=F(),a=V(()=>r.forceMount||s.open.value),l=F(a.value);return Ie(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(D(),j(f(xn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:R(()=>[q(S2,ur(tr({...f(n),...u.$attrs})),{default:R(()=>[oe(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(D(),we("div",E2,[(D(),j(Ea,{to:i.value},[q(T2,{context:f(s)},{default:R(()=>[oe(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):ke("v-if",!0)}}),[_x,I2]=Rt("SelectGroup"),R2=te({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Cs(void 0,"reka-select-group");return I2({id:r}),(n,s)=>(D(),j(f(Fe),ge({role:"group"},t,{"aria-labelledby":f(r)}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),k2=te({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(D(),j(f(Fe),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:R(()=>[oe(t.$slots,"default",{},()=>[r[0]||(r[0]=Me("▼"))])]),_:3},8,["as","as-child"]))}}),[Rh,$2]=Rt("SelectItem"),P2=te({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,{disabled:s}=At(r),i=Rn(),o=Yn(),{forwardRef:a,currentElement:l}=Ee(),{CollectionItem:u}=Qr(),c=V(()=>_i(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Cs(void 0,"reka-select-item-text"),m="select.select";async function w(b){b.defaultPrevented||Il(m,x,{originalEvent:b,value:r.value})}async function x(b){await vt(),n("select",b),!b.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(b){await vt(),!b.defaultPrevented&&(s.value?o.onItemLeave?.():b.currentTarget?.focus({preventScroll:!0}))}async function C(b){await vt(),!b.defaultPrevented&&b.currentTarget===Wt()&&o.onItemLeave?.()}async function y(b){await vt(),!b.defaultPrevented&&(o.searchRef?.value!==""&&b.key===" "||(g2.includes(b.key)&&w(b),b.key===" "&&b.preventDefault()))}if(r.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Ke(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),$2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:b=>{p.value=((p.value||b?.textContent)??"").trim()}}),(b,_)=>(D(),j(f(u),{value:{textValue:p.value}},{default:R(()=>[q(f(Fe),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":c.value,"data-state":c.value?"checked":"unchecked","aria-disabled":f(s)||void 0,"data-disabled":f(s)?"":void 0,tabindex:f(s)?void 0:-1,as:b.as,"as-child":b.asChild,onFocus:_[0]||(_[0]=T=>d.value=!0),onBlur:_[1]||(_[1]=T=>d.value=!1),onPointerup:w,onPointerdown:_[2]||(_[2]=T=>{T.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=sr(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:C,onKeydown:y},{default:R(()=>[oe(b.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),D2=te({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rh();return(n,s)=>f(r).isSelected.value?(D(),j(f(Fe),ge({key:0,"aria-hidden":"true"},t),{default:R(()=>[oe(n.$slots,"default")]),_:3},16)):ke("v-if",!0)}}),O2=te({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rn(),n=Yn(),s=Rh(),{forwardRef:i,currentElement:o}=Ee(),a=V(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Ke(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Ot(()=>{r.onOptionRemove(a.value)}),(l,u)=>(D(),j(f(Fe),ge({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:R(()=>[oe(l.$slots,"default")]),_:3},16,["id"]))}}),H2=te({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),j(f(Wl),ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),kh=te({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=Qr(),s=Yn(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}tt(()=>{n().map(u=>u.ref).find(u=>u===Wt())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return ps(()=>o()),(u,c)=>(D(),j(f(Fe),ge({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:R(()=>[oe(u.$slots,"default")]),_:3},16))}}),M2=te({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Yn(),r=t.position==="item-aligned"?pc():void 0,{forwardRef:n,currentElement:s}=Ee(),i=F(!1);return tt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){const c=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<c};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(D(),j(kh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop+u.value.offsetHeight)})},{default:R(()=>[oe(o.$slots,"default")]),_:3},512)):ke("v-if",!0)}}),N2=te({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Yn(),r=t.position==="item-aligned"?pc():void 0,{forwardRef:n,currentElement:s}=Ee(),i=F(!1);return tt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){i.value=l.scrollTop>0};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(D(),j(kh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop-u.value.offsetHeight)})},{default:R(()=>[oe(o.$slots,"default")]),_:3},512)):ke("v-if",!0)}}),q2=te({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Rn(),{forwardRef:n,currentElement:s}=Ee(),i=V(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Cs(void 0,"reka-select-content")),Ke(()=>{r.onTriggerChange(s.value)});const{getItems:o}=Qr(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=$p();function c(){i.value||(r.onOpenChange(!0),u())}function d(p){c(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>(D(),j(f(zp),{"as-child":"",reference:p.reference},{default:R(()=>[q(f(Fe),{ref:f(n),role:"combobox",type:p.as==="button"?"button":void 0,"aria-controls":f(r).contentId,"aria-expanded":f(r).open.value||!1,"aria-required":f(r).required?.value,"aria-autocomplete":"none",disabled:i.value,dir:f(r)?.dir.value,"data-state":f(r)?.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":f(v2)(f(r).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=m=>{m?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=m=>{if(m.pointerType==="touch")return m.preventDefault();const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=sr(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const w=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&w&&m.key===" "||(f(l)(m.key,f(o)()),f(h2).includes(m.key)&&(c(),m.preventDefault()))})},{default:R(()=>[oe(p.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),B2=te({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Ee(),s=Rn();Ke(()=>{s.valueElement=n});const i=V(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>_i(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=V(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(D(),j(f(Fe),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:R(()=>[oe(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[Me(Oe(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),L2=te({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:r}=At(t),n=hh(r),s=Yn(),i=s.position==="item-aligned"?pc():void 0,{forwardRef:o,currentElement:a}=Ee();Ke(()=>{s?.onViewportChange(a.value)});const l=F(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const w=window.innerHeight-20,x=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),C=Math.max(x,v);if(C<w){const y=C+m,b=Math.min(w,y),_=y-b;h.value.style.height=`${b}px`,h.value.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(D(),we(Be,null,[q(f(Fe),ge({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:R(()=>[oe(c.$slots,"default")]),_:3},16),q(f(Fe),{as:"style",nonce:f(n)},{default:R(()=>d[0]||(d[0]=[Me(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),F2=te({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=["horizontal","vertical"];function n(a){return r.includes(a)}const s=V(()=>n(t.orientation)?t.orientation:"horizontal"),i=V(()=>s.value==="vertical"?t.orientation:void 0),o=V(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(D(),j(f(Fe),ge({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:R(()=>[oe(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),V2=te({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(r,n)=>(D(),j(F2,ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),j2=te({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Ee(),(r,n)=>(D(),j(f(O1),ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),[Jo,U2]=Rt("TooltipProvider"),z2=te({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o,content:a}=At(e);Ee();const l=F(!0),u=F(!1),{start:c,stop:d}=yp(()=>{l.value=!0},r,{immediate:!1});return U2({isOpenDelayed:l,delayDuration:t,onOpen(){d(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i,content:a}),(p,h)=>oe(p.$slots,"default")}}),$h="tooltip.open",[Yo,K2]=Rt("TooltipRoot"),W2=te({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=t;Ee();const s=Jo(),i=V(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=V(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=V(()=>r.disabled??s.disabled.value),l=V(()=>r.delayDuration??s.delayDuration.value),u=V(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=_s(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Ie(c,y=>{s.onClose&&(y?(s.onOpen(),document.dispatchEvent(new CustomEvent($h))):s.onClose())});const d=F(!1),p=F(),h=V(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=yp(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function v(){w(),c.value=!1}function C(){m()}return K2({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(y){p.value=y},onTriggerEnter(){s.isOpenDelayed.value?C():x()},onTriggerLeave(){i.value?v():w()},onOpen:x,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(y,b)=>(D(),j(f(Up),null,{default:R(()=>[oe(y.$slots,"default",{open:f(c)})]),_:3}))}}),Ph=te({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Yo(),i=Jo(),{forwardRef:o,currentElement:a}=Ee(),l=V(()=>r.ariaLabel||a.value?.textContent),u=V(()=>{const{ariaLabel:c,...d}=r;return Cp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Ke(()=>{Mt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Mt(window,$h,s.onClose)}),(c,d)=>(D(),j(f(Ul),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>n("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{f(s).disableClosingTrigger.value&&f(s).trigger.value?.contains(p.target)&&p.preventDefault(),n("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=sr(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:R(()=>[q(f(ph),ge({ref:f(o),"data-state":f(s).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:R(()=>[oe(c.$slots,"default"),q(f(Gl),{id:f(s).contentId,role:"tooltip"},{default:R(()=>[Me(Oe(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),G2=te({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){const t=Zr(e),{forwardRef:r,currentElement:n}=Ee(),{trigger:s,onClose:i}=Yo(),o=Jo(),{isPointerInTransit:a,onPointerExit:l}=Vy(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(D(),j(Ph,ge({ref:f(r)},f(t)),{default:R(()=>[oe(u.$slots,"default")]),_:3},16))}}),J2=te({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Yo(),i=Xr(r,n),{forwardRef:o}=Ee();return(a,l)=>(D(),j(f(xn),{present:a.forceMount||f(s).open.value},{default:R(()=>[(D(),j(Zs(f(s).disableHoverableContent.value?Ph:G2),ge({ref:f(o)},f(i)),{default:R(()=>[oe(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Y2=te({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),j(f(Wl),ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),Z2=te({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Yo(),n=Jo();r.contentId||(r.contentId=Cs(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Ee(),o=F(!1),a=F(!1),l=V(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});Ke(()=>{r.onTriggerChange(i.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,v)=>(D(),j(f(zp),{"as-child":"",reference:x.reference},{default:R(()=>[q(f(Fe),ge({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Fu(l.value)),{default:R(()=>[oe(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),X2=te({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(D(),j(f(Fe),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:Ze(f(nt)(f(Q2)({variant:e.variant,size:e.size}),t.class))},{default:R(()=>[oe(r.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),st=X2;const Q2=Xw("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:whitespace-nowrap wp:rounded-md wp:text-sm wp:font-medium wp:transition-all wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:shrink-0 wp:[&_svg]:shrink-0 wp:outline-none wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",{variants:{variant:{default:"wp:bg-primary wp:text-primary-foreground wp:hover:bg-primary/90",destructive:"wp:bg-destructive wp:text-white wp:hover:bg-destructive/90 wp:focus-visible:ring-destructive/20 wp:dark:focus-visible:ring-destructive/40 wp:dark:bg-destructive/60",outline:"wp:border wp:bg-background wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:bg-input/30 wp:dark:border-input wp:dark:hover:bg-input/50",secondary:"wp:bg-secondary wp:text-secondary-foreground wp:hover:bg-secondary/80",ghost:"wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:hover:bg-accent/50",link:"wp:text-primary wp:underline-offset-4 wp:hover:underline"},size:{default:"wp:h-9 wp:px-4 wp:py-2 wp:has-[>svg]:px-3",sm:"wp:h-8 wp:rounded-md wp:gap-1.5 wp:px-3 wp:has-[>svg]:px-2.5",lg:"wp:h-10 wp:rounded-md wp:px-6 wp:has-[>svg]:px-4",icon:"wp:size-9","icon-sm":"wp:size-8","icon-lg":"wp:size-10"}},defaultVariants:{variant:"default",size:"default"}});var e_={class:"webphone-keypad wp:grid wp:grid-cols-3 wp:gap-y-3 wp:gap-x-6 wp:px-4 wp:py-2 wp:mx-auto wp:place-items-center"},t_=te({__name:"KeyPad",setup(e){const t=Dt("webphone"),{sendDTMF:r}=Dt("sip"),{playDtmf:n}=Lf(),s=["1","2","3","4","5","6","7","8","9","*","0","#"],i=o=>{n(o),t.callStatus==="connected"?r(o):t.appendKeypad(o)};return(o,a)=>(D(),we("div",e_,[(D(),we(Be,null,er(s,l=>q(f(st),{key:l,onClick:u=>i(l),variant:"ghost",size:"icon",class:"webphone-keypad__key wp:flex wp:items-center wp:justify-center wp:h-10 wp:w-full wp:rounded-xs wp:text-lg wp:bg-neutral-100 wp:dark:bg-neutral-700 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-600 wp:hover:text-primary wp:dark:hover:text-neutral-100 wp:text-primary wp:dark:text-white wp:transition-all wp:duration-150 wp:active:scale-95 wp:font-light montserrat","data-key":l},{default:R(()=>[Me(Oe(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),hc=t_;var Dh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),n_=e=>{const t=r_(e);return t.charAt(0).toUpperCase()+t.slice(1)},s_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Oh=e=>e==="";var Si={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var i_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Si.width,color:a=Si.stroke,...l},{slots:u})=>rr("svg",{...Si,...l,width:o,height:o,stroke:a,"stroke-width":Oh(r)||Oh(n)||r===!0||n===!0?Number(s||i||Si["stroke-width"])*24/Number(o):s||i||Si["stroke-width"],class:s_("lucide",l.class,...e?[`lucide-${Dh(n_(e))}-icon`,`lucide-${Dh(e)}`]:["lucide-icon"])},[...t.map(c=>rr(...c)),...u.default?[u.default()]:[]]);var ut=(e,t)=>(r,{slots:n,attrs:s})=>rr(i_,{...s,...r,iconNode:t,name:e},n);var Hh=ut("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);var Mh=ut("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Nh=ut("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var o_=ut("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var gc=ut("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var a_=ut("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);var l_=ut("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"}]]);var c_=ut("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var u_=ut("phone-incoming",[["path",{d:"M16 2v6h6",key:"1mfrl5"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var d_=ut("phone-missed",[["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var f_=ut("phone-outgoing",[["path",{d:"m16 8 6-6",key:"oawc05"}],["path",{d:"M22 8V2h-6",key:"oqy2zc"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var qh=ut("phone",[["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var p_=ut("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]);var h_=ut("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var g_=ut("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var v_=ut("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var m_=ut("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var Bh=ut("voicemail",[["circle",{cx:"6",cy:"12",r:"4",key:"1ehtga"}],["circle",{cx:"18",cy:"12",r:"4",key:"4vafl8"}],["line",{x1:"6",x2:"18",y1:"16",y2:"16",key:"pmt8us"}]]);var Lh=ut("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var vc=ut("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),w_=te({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=_s(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>zi((D(),we("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>We(n)?n.value=o:null),"data-slot":"input",class:Ze(f(nt)("wp:file:text-foreground wp:placeholder:text-muted-foreground wp:selection:bg-primary wp:selection:text-primary-foreground wp:dark:bg-input/30 wp:border-blue-500 wp:h-9 wp:w-full wp:min-w-0 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-1 wp:text-base wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:file:inline-flex wp:file:h-7 wp:file:border-0 wp:file:bg-transparent wp:file:text-sm wp:file:font-medium wp:disabled:pointer-events-none wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:md:text-sm","wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px]","wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",r.class))},null,2)),[[ai,f(n)]])}}),Ci=w_,y_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function b_(e,t){return D(),we("svg",y_,[...t[0]||(t[0]=[Ja('<g clip-path="url(#a)"><path fill="currentColor" d="m1.913 7.003.035.49c0 .605.49 1.095 1.095 1.095.015 0 1.08-.14 1.08-.14a1.1 1.1 0 0 0 1.07-1.07l.075-.655c1.192-.463 2.33-.465 3.47-.005l.072.657c.01.585.485 1.06 1.07 1.07 0 0 1.065.14 1.08.14.605 0 1.095-.49 1.095-1.07l.038-.537c0-.575-.23-1.12-.65-1.54-1.91-1.91-6.973-1.908-8.88 0-.418.417-.65.965-.648 1.562zM10.94 5.94c.285.285.443.653.44 1.015l-.037.538a.39.39 0 0 1-.368.387s-1.057-.137-1.072-.137a.4.4 0 0 1-.388-.388c0-.015-.1-.92-.1-.92a.35.35 0 0 0-.207-.282c-1.43-.64-2.913-.643-4.408-.003a.36.36 0 0 0-.212.288s-.103.907-.103.917a.386.386 0 0 1-.387.388c-.015 0-1.073.137-1.073.137a.395.395 0 0 1-.37-.41l-.035-.49c0-.385.155-.755.44-1.04 1.74-1.74 6.383-1.497 7.88 0"></path></g><circle cx="7" cy="7" r="6.6" stroke="currentColor" stroke-width=".8"></circle><defs><clipPath id="a"><path fill="#fff" d="M7 13 1 7l6-6 6 6z"></path></clipPath></defs>',3)])])}var mc={render:b_},__={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function S_(e,t){return D(),we("svg",__,[...t[0]||(t[0]=[ne("g",{"clip-path":"url(#a)"},[ne("path",{fill:"currentColor",d:"M0 8.625V6a3.38 3.38 0 0 1 3.375-3.375h1.811V2.03a.75.75 0 0 1 1.28-.53l2.206 2.205a1.125 1.125 0 0 1 0 1.59L6.466 7.5a.75.75 0 0 1-1.28-.53v-.595H3a2.25 2.25 0 0 0-2.25 2.25.375.375 0 0 1-.75 0M5.936 3a.375.375 0 0 1-.375.375H3.375A2.63 2.63 0 0 0 .75 6v.643A3 3 0 0 1 3 5.625h2.561A.375.375 0 0 1 5.936 6v.97l2.205-2.205a.375.375 0 0 0 0-.53L5.936 2.03z"})],-1),ne("defs",null,[ne("clipPath",{id:"a"},[ne("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var C_={render:S_},x_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function T_(e,t){return D(),we("svg",x_,[...t[0]||(t[0]=[Ja('<g clip-path="url(#a)"><path fill="currentColor" d="m13.499 13.495.321-.371a1.095 1.095 0 0 0 0-1.549c-.01-.01-.862-.665-.862-.665a1.1 1.1 0 0 0-1.514 0l-.516.41c-1.17-.516-1.976-1.318-2.457-2.45l.414-.516a1.09 1.09 0 0 0 0-1.513s-.654-.852-.665-.863c-.428-.427-1.12-.427-1.53-.017l-.407.353c-.407.407-.63.955-.63 1.549 0 2.701 3.582 6.279 6.28 6.279.59 0 1.141-.223 1.562-.647zM6.364 7.863c0-.403.148-.774.406-1.029l.407-.354a.39.39 0 0 1 .534-.014s.65.845.661.856a.4.4 0 0 1 0 .548c-.01.01-.58.721-.58.721a.35.35 0 0 0-.053.347c.559 1.463 1.605 2.513 3.115 3.118a.36.36 0 0 0 .354-.053l.72-.576a.386.386 0 0 1 .549 0c.01.01.855.66.855.66a.395.395 0 0 1-.028.552l-.322.372a1.47 1.47 0 0 1-1.046.424c-2.46 0-5.572-3.454-5.572-5.572"></path></g><circle cx="9.899" cy="9.899" r="6.6" stroke="currentColor" stroke-width=".8" transform="rotate(-135 9.9 9.9)"></circle><defs><clipPath id="a"><path fill="#fff" d="M14.143 5.657v8.485H5.658V5.657z"></path></clipPath></defs>',3)])])}var E_={render:T_},A_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function I_(e,t){return D(),we("svg",A_,[...t[0]||(t[0]=[ne("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),ne("path",{fill:"currentColor",d:"M13.634 8.18a.66.66 0 0 0-.729.094l-.585.591a1.663 1.663 0 0 0-1.653-1.531h-3C6.747 7.334 6 8.08 6 9v2a1.67 1.67 0 0 0 1.667 1.667h3c.876 0 1.589-.683 1.654-1.543l.585.585.036.03a.66.66 0 0 0 .692.063.66.66 0 0 0 .366-.591V8.77a.66.66 0 0 0-.366-.592M10.667 12h-3c-.552 0-1-.449-1-1V9c0-.551.448-1 1-1h3c.551 0 1 .449 1 1v2c0 .551-.449 1-1 1m1.666-1.806v-.396l1-1.01.009 2.413z"},null,-1)])])}var R_={render:I_},k_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function $_(e,t){return D(),we("svg",k_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.076-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.144.223c.192.26.44.468.726.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.75 1.75 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.93 1.93 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.143.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.03-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.797-.008l.07.043c.244.163.445.384.589.645a1.93 1.93 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.74 1.74 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zm-2.03-1.943c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222a1.97 1.97 0 0 0 1.569.803c.292 0 .58-.067.844-.196.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1)])])}var wc={render:$_},P_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function D_(e,t){return D(),we("svg",P_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.74 1.74 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.92 1.92 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.142.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.75 1.75 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.384.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.029-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.964.027.056.047.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.708 14.6c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222c.19.26.44.468.725.607a1.92 1.92 0 0 0 1.688 0c.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1),ne("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var yc={render:D_},O_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function H_(e,t){return D(),we("svg",O_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor",d:"M9.75 1H4.5c-.678 0-1.314.302-1.743.828L.513 4.578a2.26 2.26 0 0 0 0 2.844l2.243 2.75A2.24 2.24 0 0 0 4.5 11h5.25C10.99 11 12 9.99 12 8.75v-5.5C12 2.01 10.99 1 9.75 1m1.75 7.75c0 .965-.785 1.75-1.75 1.75H4.5a1.74 1.74 0 0 1-1.356-.644L.901 7.106a1.755 1.755 0 0 1 0-2.212l2.243-2.75A1.74 1.74 0 0 1 4.5 1.499h5.25c.965 0 1.75.785 1.75 1.75zM8.927 4.427 7.354 6l1.573 1.573a.25.25 0 0 1-.354.353L7 6.355 5.427 7.926a.25.25 0 0 1-.354 0 .25.25 0 0 1 0-.353L6.646 6 5.073 4.427a.25.25 0 0 1 .354-.353L7 5.646l1.573-1.572a.25.25 0 0 1 .353.353z"},null,-1)])])}var bc={render:H_},M_=["data-call-status"],N_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},q_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},B_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},L_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},F_=["data-visible"],V_={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},j_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},U_=["data-visible"],z_={key:4,class:"webphone-actions__transfer-state wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},K_=te({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean},onAnswer:{type:Function},onHangup:{type:Function},onReject:{type:Function}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=Dt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a}=Dt("sip"),l=e,u=t,c=V(()=>!!r.transferInProgress),d=V(()=>l.destination||r.keypadValue||r.lastDialedNumber||""),p=V(()=>!!l.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),h=V(()=>p.value||!!r.lastDialedNumber),m=V(()=>!l.isVideo||!p.value?!1:d.value?/^[0-9*#]{1,5}$/.test(d.value):!0),w=async _=>{try{l.destination?await n(l.destination,_):r.keypadValue?await n(r.keypadValue,_):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(T){if(console.error("Error initiating call:",T),_){let P="No se pudo acceder a la cámara.";const g=T instanceof Error?T.name:String(T);g==="NotReadableError"?P="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":g==="NotAllowedError"||g==="PermissionDeniedError"?P="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":g==="NotFoundError"?P="No se detectó ninguna cámara en el sistema.":P+=" "+(T instanceof Error?T.message:String(T)),confirm(`${P}
74
+ `))}return()=>s.value||n.value||o.value?sr(t.default({present:o.value})[0],{ref:u=>{const c=zt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),Vl=ee({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=kl(r.default()),s=n.findIndex(l=>l.type!==st);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?he(t,i.props):t,a=vr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),nb=["area","img","input"],Ve=ee({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const n=e.asChild?"template":e.as;return typeof n=="string"&&nb.includes(n)?()=>sr(n,t):n!=="template"?()=>sr(e.as,t,{default:r.default}):()=>sr(Vl,t,{default:r.default})}});function jl(){const e=V();return{primitiveElement:e,currentElement:j(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:zt(e))}}var[Tn,sb]=kt("DialogRoot"),ib=ee({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=Ss(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=V(),i=V(),{modal:o}=It(r);return sb({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:a=>{n.value=a},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:i}),(a,l)=>ie(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),ob=ee({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Ae();const r=Tn();return(n,s)=>(D(),U(f(Ve),he(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["type"]))}}),ab="dismissableLayer.pointerDownOutside",lb="dismissableLayer.focusOutside";function Pp(e,t){const r=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(n===r||s.indexOf(n)<s.indexOf(r)))}function cb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=V(!1),i=V(()=>{});return et(o=>{if(!$t||!xe(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(Pp(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){Il(ab,e,p)};var d=h;const p={originalEvent:u};u.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=h,n.addEventListener("click",i.value,{once:!0})):h()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{xe(r)&&(s.value=!0)}}}function ub(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=V(!1);return et(i=>{if(!$t||!xe(r))return;const o=async a=>{if(!t?.value)return;await mt(),await mt();const l=a.target;!t.value||!l||Pp(t.value,l)||a.target&&!s.value&&Il(lb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{xe(r)&&(s.value=!0)},onBlurCapture:()=>{xe(r)&&(s.value=!1)}}}var cr=Nr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Ul=ee({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Ae(),o=j(()=>i.value?.ownerDocument??globalThis.document),a=j(()=>cr.layersRoot),l=j(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=j(()=>cr.layersWithOutsidePointerEventsDisabled.size>0),c=j(()=>{const h=Array.from(a.value),[m]=[...cr.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=cb(async h=>{const m=[...cr.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await mt(),h.defaultPrevented||n("dismiss"))},i),p=ub(h=>{[...cr.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return Ry("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),et(h=>{i.value&&(r.disableOutsidePointerEvents&&(cr.layersWithOutsidePointerEventsDisabled.size===0&&(cr.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),cr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&cr.layersWithOutsidePointerEventsDisabled.size===1&&!Rl(cr.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=cr.originalBodyPointerEvents)}))}),et(h=>{h(()=>{i.value&&(a.value.delete(i.value),cr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(D(),U(f(Ve),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:vt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:k(()=>[ie(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),db=oy(()=>V([]));function fb(){const e=db();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Dp(e.value,t),e.value.unshift(t)},remove(t){e.value=Dp(e.value,t),e.value[0]?.resume()}}}function Dp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var zl="focusScope.autoFocusOnMount",Kl="focusScope.autoFocusOnUnmount",Op={bubbles:!1,cancelable:!0};function pb(e,{select:t=!1}={}){const r=Jt();for(const n of e)if(En(n,{select:t}),Jt()!==r)return!0}function hb(e){const t=Hp(e);return[Mp(t,e),Mp(t.reverse(),e)]}function Hp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Mp(e,t){for(const r of e)if(!gb(r,{upTo:t}))return r}function gb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function vb(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const r=Jt();e.focus({preventScroll:!0}),e!==r&&vb(e)&&t&&e.select()}}var Np=ee({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const r=e,n=t,{currentRef:s,currentElement:i}=Ae(),o=V(null),a=fb(),l=Nr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});et(c=>{if(!$t)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const v=x.target;d.contains(v)?o.value=v:En(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const v=x.relatedTarget;v!==null&&(d.contains(v)||En(o.value,{select:!0}))}function m(x){d.contains(o.value)||En(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const w=new MutationObserver(m);d&&w.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),w.disconnect()})}),et(async c=>{const d=i.value;if(await mt(),!d)return;a.add(l);const p=Jt();if(!d.contains(p)){const h=new CustomEvent(zl,Op);d.addEventListener(zl,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(pb(Hp(d),{select:!0}),Jt()===p&&En(d))}c(()=>{d.removeEventListener(zl,w=>n("mountAutoFocus",w));const h=new CustomEvent(Kl,Op),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Kl,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||En(p??document.body,{select:!0}),d.removeEventListener(Kl,m),a.remove(l)},0)})});function u(c){if(!r.loop&&!r.trapped||l.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,p=Jt();if(d&&p){const h=c.currentTarget,[m,w]=hb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&En(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&En(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(D(),U(f(Ve),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:k(()=>[ie(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),qp=["Enter"," "],mb=["ArrowDown","PageUp","Home"],wb=["ArrowUp","PageDown","End"],wx=[...mb,...wb],yx={ltr:[...qp,"ArrowRight"],rtl:[...qp,"ArrowLeft"]};function yb(e){return e?"open":"closed"}function Bp(e){const t=Jt();for(const r of e)if(r===t||(r.focus(),Jt()!==t))return}var Lp=ee({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),{forwardRef:i,currentElement:o}=Ae();return s.titleId||(s.titleId=xs(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=xs(void 0,"reka-dialog-description")),We(()=>{s.contentElement=o,Jt()!==document.body&&(s.triggerElement.value=Jt())}),(a,l)=>(D(),U(f(Np),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=u=>n("openAutoFocus",u)),onUnmountAutoFocus:l[6]||(l[6]=u=>n("closeAutoFocus",u))},{default:k(()=>[q(f(Ul),he({id:f(s).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(s).descriptionId,"aria-labelledby":f(s).titleId,"data-state":f(yb)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=u=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=u=>n("escapeKeyDown",u)),onFocusOutside:l[2]||(l[2]=u=>n("focusOutside",u)),onInteractOutside:l[3]||(l[3]=u=>n("interactOutside",u)),onPointerDownOutside:l[4]||(l[4]=u=>n("pointerDownOutside",u))}),{default:k(()=>[ie(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),bb=ee({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),i=Oo(n),{forwardRef:o,currentElement:a}=Ae();return Rp(a),(l,u)=>(D(),U(Lp,he({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:u[0]||(u[0]=c=>{c.defaultPrevented||(c.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:u[1]||(u[1]=c=>{const d=c.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0;(d.button===2||p)&&c.preventDefault()}),onFocusOutside:u[2]||(u[2]=c=>{c.preventDefault()})}),{default:k(()=>[ie(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),_b=ee({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=Oo(t);Ae();const s=Tn(),i=V(!1),o=V(!1);return(a,l)=>(D(),U(Lp,he({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=u=>{u.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=u=>{u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const c=u.target;f(s).triggerElement.value?.contains(c)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:k(()=>[ie(a.$slots,"default")]),_:3},16))}}),Sb=ee({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Tn(),i=Oo(n),{forwardRef:o}=Ae();return(a,l)=>(D(),U(f(xn),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?(D(),U(bb,he({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[ie(a.$slots,"default")]),_:3},16)):(D(),U(_b,he({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[ie(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Cb=ee({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Tn();return xp(!0),Ae(),(r,n)=>(D(),U(f(Ve),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:k(()=>[ie(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),xb=ee({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Tn(),{forwardRef:r}=Ae();return(n,s)=>f(t)?.modal.value?(D(),U(f(xn),{key:0,present:n.forceMount||f(t).open.value},{default:k(()=>[q(Cb,he(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):$e("v-if",!0)}}),Wl=ee({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=Ol();return(r,n)=>f(t)||r.forceMount?(D(),U(Ea,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[ie(r.$slots,"default")],8,["to","disabled","defer"])):$e("v-if",!0)}}),Tb=ee({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),U(f(Wl),fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),Eb=ee({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Tn();return Ae(),(n,s)=>(D(),U(f(Ve),he(t,{id:f(r).titleId}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["id"]))}}),Fp="data-reka-collection-item";function Qr(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:V(),itemMap:V(new Map)},Mn(n,s)):s=Ot(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Fp}]`)),d=Array.from(s.itemMap.value.values()).sort((p,h)=>c.indexOf(p.ref)-c.indexOf(h.ref));return l?d:d.filter(p=>p.ref.dataset.disabled!=="")},o=ee({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=jl();return Re(p,()=>{s.collectionRef.value=p.value}),()=>sr(Vl,{ref:d,...c},u)}}),a=ee({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=jl();return et(h=>{if(p.value){const m=ba(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>sr(Vl,{...c,[Fp]:"",ref:d},u)}});return{getItems:i,reactiveItems:j(()=>Array.from(s.itemMap.value.values())),itemMapSize:j(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Gl=ee({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(D(),U(f(Ve),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:k(()=>[ie(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Vp=ee({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:r,currentElement:n}=jl();return Re(j(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>(D(),U(Gl,he({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Ab=ee({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,r=j(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=j(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>(D(),me(Le,null,[$e(" We render single input if it's required "),r.value?(D(),U(Vp,he({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(D(!0),me(Le,{key:1},rr(n.value,o=>(D(),U(Vp,he({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[jp,Ib]=kt("PopperRoot"),Up=ee({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=V();return Ib({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>ie(r.$slots,"default")}}),zp=ee({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Ae(),s=jp();return xa(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(D(),U(f(Ve),{ref:f(r),as:i.as,"as-child":i.asChild},{default:k(()=>[ie(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),Rb={key:0,d:"M0 0L6 6L12 0"},kb={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},$b=ee({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Ae(),(r,n)=>(D(),U(f(Ve),he(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:k(()=>[ie(r.$slots,"default",{},()=>[r.rounded?(D(),me("path",kb)):(D(),me("path",Rb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Pb(e){return e!==null}function Db(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:s}=t,i=s.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,u]=Jl(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+a/2;let h="",m="";return l==="bottom"?(h=i?c:`${d}px`,m=`${-a}px`):l==="top"?(h=i?c:`${d}px`,m=`${n.floating.height+a}px`):l==="right"?(h=`${-a}px`,m=i?c:`${p}px`):l==="left"&&(h=`${n.floating.width+a}px`,m=i?c:`${p}px`),{data:{x:h,y:m}}}}}function Jl(e){const[t,r="center"]=e.split("-");return[t,r]}var Ob=["top","right","bottom","left"],An=Math.min,Yt=Math.max,qo=Math.round,Bo=Math.floor,Rr=e=>({x:e,y:e}),Hb={left:"right",right:"left",bottom:"top",top:"bottom"};function Yl(e,t,r){return Yt(e,An(t,r))}function en(e,t){return typeof e=="function"?e(t):e}function tn(e){return e.split("-")[0]}function Ts(e){return e.split("-")[1]}function Zl(e){return e==="x"?"y":"x"}function Xl(e){return e==="y"?"height":"width"}function kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ql(e){return Zl(kr(e))}function Mb(e,t,r){r===void 0&&(r=!1);const n=Ts(e),s=Ql(e),i=Xl(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Lo(o)),[o,Lo(o)]}function Nb(e){const t=Lo(e);return[ec(e),t,ec(t)]}function ec(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Kp=["left","right"],Wp=["right","left"],qb=["top","bottom"],Bb=["bottom","top"];function Lb(e,t,r){switch(e){case"top":case"bottom":return r?t?Wp:Kp:t?Kp:Wp;case"left":case"right":return t?qb:Bb;default:return[]}}function Fb(e,t,r,n){const s=Ts(e);let i=Lb(tn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(ec)))),i}function Lo(e){const t=tn(e);return Hb[t]+e.slice(t.length)}function Vb(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gp(e){return typeof e!="number"?Vb(e):{top:e,right:e,bottom:e,left:e}}function Fo(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Jp(e,t,r){let{reference:n,floating:s}=e;const i=kr(t),o=Ql(t),a=Xl(o),l=tn(t),u=i==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,p=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Ts(t)){case"start":h[o]-=p*(r&&u?-1:1);break;case"end":h[o]+=p*(r&&u?-1:1);break}return h}async function jb(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=en(t,e),m=Gp(h),w=a[p?d==="floating"?"reference":"floating":d],x=Fo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),y=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},b=Fo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:C,strategy:l}):v);return{top:(x.top-b.top+m.top)/y.y,bottom:(b.bottom-x.bottom+m.bottom)/y.y,left:(x.left-b.left+m.left)/y.x,right:(b.right-x.right+m.right)/y.x}}var Ub=50,zb=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:jb},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=Jp(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:v,fn:C}=x,{x:y,y:b,data:_,reset:T}=await C({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=y??c,d=b??d,m[v]={...m[v],..._},T&&h<Ub&&(h++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(u=T.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):T.rects),{x:c,y:d}=Jp(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},Kb=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=en(e,t)||{};if(u==null)return{};const d=Gp(c),p={x:r,y:n},h=Ql(s),m=Xl(h),w=await o.getDimensions(u),x=h==="y",v=x?"top":"left",C=x?"bottom":"right",y=x?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[h]-p[h]-i.floating[m],_=p[h]-i.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let P=T?T[y]:0;(!P||!await(o.isElement==null?void 0:o.isElement(T)))&&(P=a.floating[y]||i.floating[m]);const g=b/2-_/2,H=P/2-w[m]/2-1,M=An(d[v],H),S=An(d[C],H),E=M,A=P-w[m]-S,Z=P/2-w[m]/2+g,Q=Yl(E,Z,A),K=!l.arrow&&Ts(s)!=null&&Z!==Q&&i.reference[m]/2-(Z<E?M:S)-w[m]/2<0,X=K?Z<E?Z-E:Z-A:0;return{[h]:p[h]+X,data:{[h]:Q,centerOffset:Z-Q-X,...K&&{alignmentOffset:X}},reset:K}}}),Wb=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...x}=en(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=tn(s),C=kr(a),y=tn(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=p||(y||!w?[Lo(a)]:Nb(a)),T=m!=="none";!p&&T&&_.push(...Fb(a,w,m,b));const P=[a,..._],g=await l.detectOverflow(t,x),H=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&H.push(g[v]),d){const Z=Mb(s,o,b);H.push(g[Z[0]],g[Z[1]])}if(M=[...M,{placement:s,overflows:H}],!H.every(Z=>Z<=0)){var S,E;const Z=(((S=i.flip)==null?void 0:S.index)||0)+1,Q=P[Z];if(Q&&(!(d==="alignment"&&C!==kr(Q))||M.every(X=>kr(X.placement)===C?X.overflows[0]>0:!0)))return{data:{index:Z,overflows:M},reset:{placement:Q}};let K=(E=M.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:E.placement;if(!K)switch(h){case"bestFit":{var A;const X=(A=M.filter(Y=>{if(T){const ae=kr(Y.placement);return ae===C||ae==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(ae=>ae>0).reduce((ae,W)=>ae+W,0)]).sort((Y,ae)=>Y[1]-ae[1])[0])==null?void 0:A[0];X&&(K=X);break}case"initialPlacement":K=a;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function Yp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zp(e){return Ob.some(t=>e[t]>=0)}var Gb=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=en(e,t);switch(s){case"referenceHidden":{const o=Yp(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Zp(o)}}}case"escaped":{const o=Yp(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Zp(o)}}}default:return{}}}}},Xp=new Set(["left","top"]);async function Jb(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=tn(r),a=Ts(r),l=kr(r)==="y",u=Xp.has(o)?-1:1,c=i&&l?-1:1,d=en(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:p*u}:{x:p*u,y:h*c}}var Yb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await Jb(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},Zb=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s,platform:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:C,y}=v;return{x:C,y}}},...u}=en(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=kr(tn(s)),h=Zl(p);let m=c[h],w=c[p];if(o){const v=h==="y"?"top":"left",C=h==="y"?"bottom":"right",y=m+d[v],b=m-d[C];m=Yl(y,m,b)}if(a){const v=p==="y"?"top":"left",C=p==="y"?"bottom":"right",y=w+d[v],b=w-d[C];w=Yl(y,w,b)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},Xb=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=en(e,t),c={x:r,y:n},d=kr(s),p=Zl(d);let h=c[p],m=c[d];const w=en(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const y=p==="y"?"height":"width",b=i.reference[p]-i.floating[y]+x.mainAxis,_=i.reference[p]+i.reference[y]-x.mainAxis;h<b?h=b:h>_&&(h=_)}if(u){var v,C;const y=p==="y"?"width":"height",b=Xp.has(tn(s)),_=i.reference[d]-i.floating[y]+(b&&((v=o.offset)==null?void 0:v[d])||0)+(b?0:x.crossAxis),T=i.reference[d]+i.reference[y]+(b?0:((C=o.offset)==null?void 0:C[d])||0)-(b?x.crossAxis:0);m<_?m=_:m>T&&(m=T)}return{[p]:h,[d]:m}}}},Qb=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...u}=en(e,t),c=await o.detectOverflow(t,u),d=tn(s),p=Ts(s),h=kr(s)==="y",{width:m,height:w}=i.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,x=p==="end"?"top":"bottom");const C=w-c.top-c.bottom,y=m-c.left-c.right,b=An(w-c[x],C),_=An(m-c[v],y),T=!t.middlewareData.shift;let P=b,g=_;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(P=C),T&&!p){const M=Yt(c.left,0),S=Yt(c.right,0),E=Yt(c.top,0),A=Yt(c.bottom,0);h?g=m-2*(M!==0||S!==0?M+S:Yt(c.left,c.right)):P=w-2*(E!==0||A!==0?E+A:Yt(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:P});const H=await o.getDimensions(a.floating);return m!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function Vo(){return typeof window<"u"}function Gn(e){return tc(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $r(e){var t;return(t=(tc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tc(e){return Vo()?e instanceof Node||e instanceof Zt(e).Node:!1}function br(e){return Vo()?e instanceof Element||e instanceof Zt(e).Element:!1}function rn(e){return Vo()?e instanceof HTMLElement||e instanceof Zt(e).HTMLElement:!1}function Qp(e){return!Vo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function wi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function e1(e){return/^(table|td|th)$/.test(Gn(e))}function jo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var t1=/transform|translate|scale|rotate|perspective|filter/,r1=/paint|layout|strict|content/,Jn=e=>!!e&&e!=="none",rc;function nc(e){const t=br(e)?_r(e):e;return Jn(t.transform)||Jn(t.translate)||Jn(t.scale)||Jn(t.rotate)||Jn(t.perspective)||!sc()&&(Jn(t.backdropFilter)||Jn(t.filter))||t1.test(t.willChange||"")||r1.test(t.contain||"")}function n1(e){let t=In(e);for(;rn(t)&&!Es(t);){if(nc(t))return t;if(jo(t))return null;t=In(t)}return null}function sc(){return rc==null&&(rc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rc}function Es(e){return/^(html|body|#document)$/.test(Gn(e))}function _r(e){return Zt(e).getComputedStyle(e)}function Uo(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(Gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qp(e)&&e.host||$r(e);return Qp(t)?t.host:t}function eh(e){const t=In(e);return Es(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&wi(t)?t:eh(t)}function yi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=eh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=Zt(s);if(i){const a=ic(o);return t.concat(o,o.visualViewport||[],wi(s)?s:[],a&&r?yi(a):[])}else return t.concat(s,yi(s,[],r))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function th(e){const t=_r(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=rn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=qo(r)!==i||qo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function oc(e){return br(e)?e:e.contextElement}function As(e){const t=oc(e);if(!rn(t))return Rr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=th(t);let o=(i?qo(r.width):r.width)/n,a=(i?qo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var s1=Rr(0);function rh(e){const t=Zt(e);return!sc()||!t.visualViewport?s1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Zt(e)?!1:t}function Yn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=oc(e);let o=Rr(1);t&&(n?br(n)&&(o=As(n)):o=As(e));const a=i1(i,r,n)?rh(i):Rr(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const p=Zt(i),h=n&&br(n)?Zt(n):n;let m=p,w=ic(m);for(;w&&n&&h!==m;){const x=As(w),v=w.getBoundingClientRect(),C=_r(w),y=v.left+(w.clientLeft+parseFloat(C.paddingLeft))*x.x,b=v.top+(w.clientTop+parseFloat(C.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=b,m=Zt(w),w=ic(m)}}return Fo({width:c,height:d,x:l,y:u})}function zo(e,t){const r=Uo(e).scrollLeft;return t?t.left+r:Yn($r(e)).left+r}function nh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-zo(e,r),y:r.top+t.scrollTop}}function o1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=$r(n),a=t?jo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Rr(1);const c=Rr(0),d=rn(n);if((d||!d&&!i)&&((Gn(n)!=="body"||wi(o))&&(l=Uo(n)),d)){const h=Yn(n);u=As(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?nh(o,l):Rr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+p.x,y:r.y*u.y-l.scrollTop*u.y+c.y+p.y}}function a1(e){return Array.from(e.getClientRects())}function l1(e){const t=$r(e),r=Uo(e),n=e.ownerDocument.body,s=Yt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Yt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+zo(e);const a=-r.scrollTop;return _r(n).direction==="rtl"&&(o+=Yt(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var sh=25;function c1(e,t){const r=Zt(e),n=$r(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=sc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=zo(n);if(u<=0){const c=n.ownerDocument,d=c.body,p=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-h);m<=sh&&(i-=m)}else u<=sh&&(i+=u);return{width:i,height:o,x:a,y:l}}function u1(e,t){const r=Yn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=rn(e)?As(e):Rr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function ih(e,t,r){let n;if(t==="viewport")n=c1(e,r);else if(t==="document")n=l1($r(e));else if(br(t))n=u1(t,r);else{const s=rh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Fo(n)}function oh(e,t){const r=In(e);return r===t||!br(r)||Es(r)?!1:_r(r).position==="fixed"||oh(r,t)}function d1(e,t){const r=t.get(e);if(r)return r;let n=yi(e,[],!1).filter(a=>br(a)&&Gn(a)!=="body"),s=null;const i=_r(e).position==="fixed";let o=i?In(e):e;for(;br(o)&&!Es(o);){const a=_r(o),l=nc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||wi(o)&&!l&&oh(e,o))?n=n.filter(u=>u!==o):s=a,o=In(o)}return t.set(e,n),n}function f1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?jo(t)?[]:d1(t,this._c):[].concat(r),n],o=ih(t,i[0],s);let a=o.top,l=o.right,u=o.bottom,c=o.left;for(let d=1;d<i.length;d++){const p=ih(t,i[d],s);a=Yt(p.top,a),l=An(p.right,l),u=An(p.bottom,u),c=Yt(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function p1(e){const{width:t,height:r}=th(e);return{width:t,height:r}}function h1(e,t,r){const n=rn(t),s=$r(t),i=r==="fixed",o=Yn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Rr(0);function u(){l.x=zo(s)}if(n||!n&&!i)if((Gn(t)!=="body"||wi(s))&&(a=Uo(t)),n){const d=Yn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&u();i&&!n&&s&&u();const c=s&&!n&&!i?nh(s,a):Rr(0);return{x:o.left+a.scrollLeft-l.x-c.x,y:o.top+a.scrollTop-l.y-c.y,width:o.width,height:o.height}}function ac(e){return _r(e).position==="static"}function ah(e,t){if(!rn(e)||_r(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return $r(e)===r&&(r=r.ownerDocument.body),r}function lh(e,t){const r=Zt(e);if(jo(e))return r;if(!rn(e)){let s=In(e);for(;s&&!Es(s);){if(br(s)&&!ac(s))return s;s=In(s)}return r}let n=ah(e,t);for(;n&&e1(n)&&ac(n);)n=ah(n,t);return n&&Es(n)&&ac(n)&&!nc(n)?r:n||n1(e)||r}var g1=async function(e){const t=this.getOffsetParent||lh,r=this.getDimensions,n=await r(e.floating);return{reference:h1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function v1(e){return _r(e).direction==="rtl"}var m1={convertOffsetParentRelativeRectToViewportRelativeRect:o1,getDocumentElement:$r,getClippingRect:f1,getOffsetParent:lh,getElementRects:g1,getClientRects:a1,getDimensions:p1,getScale:As,isElement:br,isRTL:v1};function ch(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function w1(e,t){let r=null,n;const s=$r(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=Bo(d),w=Bo(s.clientWidth-(c+p)),x=Bo(s.clientHeight-(d+h)),v=Bo(c),C={rootMargin:-m+"px "+-w+"px "+-x+"px "+-v+"px",threshold:Yt(0,An(1,l))||1};let y=!0;function b(_){const T=_[0].intersectionRatio;if(T!==l){if(!y)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!ch(u,e.getBoundingClientRect())&&o(),y=!1}try{r=new IntersectionObserver(b,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(b,C)}r.observe(e)}return o(!0),i}function y1(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=oc(e),c=s||i?[...u?yi(u):[],...t?yi(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?w1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[C]=v;C&&C.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?Yn(e):null;l&&x();function x(){const v=Yn(e);w&&!ch(w,v)&&r(),w=v,m=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(C=>{s&&C.removeEventListener("scroll",r),i&&C.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var b1=Yb,_1=Zb,uh=Wb,S1=Qb,C1=Gb,x1=Kb,T1=Xb,E1=(e,t,r)=>{const n=new Map,s={platform:m1,...r},i={...s.platform,_c:n};return zb(e,t,{...s,platform:i})};function A1(e){return e!=null&&typeof e=="object"&&"$el"in e}function lc(e){if(A1(e)){const t=e.$el;return tc(t)&&Gn(t)==="#comment"?null:t}return e}function Is(e){return typeof e=="function"?e():f(e)}function I1(e){return{name:"arrow",options:e,fn(t){const r=lc(Is(e.element));return r==null?{}:x1({element:r,padding:e.padding}).fn(t)}}}function dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fh(e,t){const r=dh(e);return Math.round(t*r)/r}function R1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=j(()=>{var P;return(P=Is(r.open))!=null?P:!0}),i=j(()=>Is(r.middleware)),o=j(()=>{var P;return(P=Is(r.placement))!=null?P:"bottom"}),a=j(()=>{var P;return(P=Is(r.strategy))!=null?P:"absolute"}),l=j(()=>{var P;return(P=Is(r.transform))!=null?P:!0}),u=j(()=>lc(e.value)),c=j(()=>lc(t.value)),d=V(0),p=V(0),h=V(a.value),m=V(o.value),w=tt({}),x=V(!1),v=j(()=>{const P={position:h.value,left:"0",top:"0"};if(!c.value)return P;const g=fh(c.value,d.value),H=fh(c.value,p.value);return l.value?{...P,transform:"translate("+g+"px, "+H+"px)",...dh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:H+"px"}});let C;function y(){if(u.value==null||c.value==null)return;const P=s.value;E1(u.value,c.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(g=>{d.value=g.x,p.value=g.y,h.value=g.strategy,m.value=g.placement,w.value=g.middlewareData,x.value=P!==!1})}function b(){typeof C=="function"&&(C(),C=void 0)}function _(){if(b(),n===void 0){y();return}if(u.value!=null&&c.value!=null){C=n(u.value,c.value,y);return}}function T(){s.value||(x.value=!1)}return Re([i,o,a,s],y,{flush:"sync"}),Re([u,c],_,{flush:"sync"}),Re(s,T,{flush:"sync"}),$i()&&ua(b),{x:qr(d),y:qr(p),strategy:qr(h),placement:qr(m),middlewareData:qr(w),isPositioned:qr(x),floatingStyles:v,update:y}}var k1={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[$1,P1]=kt("PopperContent"),ph=ee({inheritAttrs:!1,__name:"PopperContent",props:ju({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...k1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=jp(),{forwardRef:i,currentElement:o}=Ae(),a=V(),l=V(),{width:u,height:c}=kp(l),d=j(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=j(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=j(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=j(()=>({padding:p.value,boundary:h.value.filter(Pb),altBoundary:h.value.length>0})),w=j(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=sy(()=>[b1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&uh({...m.value,...w.value}),r.avoidCollisions&&_1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?T1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&uh({...m.value,...w.value}),S1({...m.value,apply:({elements:M,rects:S,availableWidth:E,availableHeight:A})=>{const{width:Z,height:Q}=S.reference,K=M.floating.style;K.setProperty("--reka-popper-available-width",`${E}px`),K.setProperty("--reka-popper-available-height",`${A}px`),K.setProperty("--reka-popper-anchor-width",`${Z}px`),K.setProperty("--reka-popper-anchor-height",`${Q}px`)}}),l.value&&I1({element:l.value,padding:r.arrowPadding}),Db({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&C1({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:C,isPositioned:y,middlewareData:b,update:_}=R1(j(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...M)=>y1(...M,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),T=j(()=>Jl(C.value)[0]),P=j(()=>Jl(C.value)[1]);xa(()=>{y.value&&n("placed")});const g=j(()=>{const M=b.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&M}),H=V("");return et(()=>{o.value&&(H.value=window.getComputedStyle(o.value).zIndex)}),P1({placedSide:T,onArrowChange:M=>l.value=M,arrowX:j(()=>b.value.arrow?.x??0),arrowY:j(()=>b.value.arrow?.y??0),shouldHideArrow:g}),(M,S)=>(D(),me("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:vt({...f(v),transform:f(y)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H.value,"--reka-popper-transform-origin":[f(b).transformOrigin?.x,f(b).transformOrigin?.y].join(" "),...f(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[q(f(Ve),he({ref:f(i)},M.$attrs,{"as-child":r.asChild,as:M.as,"data-side":T.value,"data-align":P.value,style:{animation:f(y)?void 0:"none"}}),{default:k(()=>[ie(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),D1={top:"bottom",right:"left",bottom:"top",left:"right"},O1=ee({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=Ae(),r=$1(),n=j(()=>D1[r.placedSide.value]);return(s,i)=>(D(),me("span",{ref:o=>{f(r).onArrowChange(o)},style:vt({position:"absolute",left:f(r).arrowX?.value?`${f(r).arrowX?.value}px`:void 0,top:f(r).arrowY?.value?`${f(r).arrowY?.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(r).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(r).placedSide.value],visibility:f(r).shouldHideArrow.value?"hidden":void 0})},[q($b,he(s.$attrs,{ref:f(t),style:{display:"block"},as:s.as,"as-child":s.asChild,rounded:s.rounded,width:s.width,height:s.height}),{default:k(()=>[ie(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function hh(e){const t=Ro({nonce:V()});return j(()=>e?.value||t.nonce?.value)}function H1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function gh(e,t,r){return mi(100/(r-t)*(e-t),0,100)}function M1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function N1(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function q1(e,t,r){const n=e/2;return(n-cc([0,50],[0,n])(t)*r)*r}function B1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function L1(e,t){if(t>0){const r=B1(e);return Math.min(...r)>=t}return!0}function cc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function F1(e){return(String(e).split(".")[1]||"").length}function V1(e,t){const r=10**t;return Math.round(e*r)/r}var vh=["PageUp","PageDown"],mh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[yh,bh]=kt(["SliderVertical","SliderHorizontal"]),j1=ee({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,dir:o,inverted:a}=It(r),{forwardRef:l,currentElement:u}=Ae(),c=Rs(),d=V(),p=V(),h=j(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const v=p.value||u.value.getBoundingClientRect(),C=[...c.thumbElements.value][c.valueIndexToChangeRef.value],y=c.thumbAlignment.value==="contain"?C.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-C.getBoundingClientRect().left);const b=cc([0,v.width-y],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,b(x?w.clientX-v.left-y/2:w.clientX-v.left-(d.value??0))}return bh({startEdge:j(()=>h.value?"left":"right"),endEdge:j(()=>h.value?"right":"left"),direction:j(()=>h.value?1:-1),size:"width"}),(w,x)=>(D(),U(_h,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:vt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:x[1]||(x[1]=v=>{n("slideMove",m(v))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=v=>{const C=h.value?"from-left":"from-right";n("stepKeyDown",v,f(wh)[C].includes(v.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=v=>n("endKeyDown",v)),onHomeKeyDown:x[5]||(x[5]=v=>n("homeKeyDown",v))},{default:k(()=>[ie(w.$slots,"default")]),_:3},8,["dir","style"]))}}),U1=ee({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,inverted:o}=It(r),a=Rs(),{forwardRef:l,currentElement:u}=Ae(),c=V(),d=V(),p=j(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],C=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const y=cc([0,x.height-C],p.value?[s.value,i.value]:[i.value,s.value]),b=w?m.clientY-x.top-C/2:m.clientY-x.top-(c.value??0);return d.value=x,y(b)}return bh({startEdge:j(()=>p.value?"bottom":"top"),endEdge:j(()=>p.value?"top":"bottom"),direction:j(()=>p.value?1:-1),size:"height"}),(m,w)=>(D(),U(_h,{ref:f(l),"data-orientation":"vertical",style:vt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(wh)[v].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:k(()=>[ie(m.$slots,"default")]),_:3},8,["style"]))}}),[Rs,z1]=kt("SliderRoot"),K1=ee({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,{min:s,max:i,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:u,thumbAlignment:c,dir:d}=It(r),p=ql(d),{forwardRef:h,currentElement:m}=Ae(),w=Ap(m),{CollectionSlot:x}=Qr({isProvider:!0}),v=Ss(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),C=j(()=>Array.isArray(v.value)?[...v.value]:[]),y=V(0),b=V(C.value);function _(M){g(M,N1(C.value,M))}function T(M){g(M,y.value)}function P(){const M=b.value[y.value];C.value[y.value]!==M&&n("valueCommit",Be(C.value))}function g(M,S,{commit:E}={commit:!1}){const A=F1(o.value),Z=mi(V1(Math.round((M-s.value)/o.value)*o.value+s.value,A),s.value,i.value),Q=H1(C.value,Z,S);if(L1(Q,a.value*o.value)){y.value=Q.indexOf(Z);const K=String(Q)!==String(v.value);K&&E&&n("valueCommit",Q),K&&(H.value[y.value]?.focus(),v.value=Q)}}const H=V([]);return z1({modelValue:v,currentModelValue:C,valueIndexToChangeRef:y,thumbElements:H,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(M,S)=>(D(),U(f(x),null,{default:k(()=>[(D(),U(Zs(f(l)==="horizontal"?j1:U1),he(M.$attrs,{ref:f(h),"as-child":M.asChild,as:M.as,min:f(s),max:f(i),dir:f(p),inverted:M.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:S[0]||(S[0]=()=>{f(u)||(b.value=C.value)}),onSlideStart:S[1]||(S[1]=E=>!f(u)&&_(E)),onSlideMove:S[2]||(S[2]=E=>!f(u)&&T(E)),onSlideEnd:S[3]||(S[3]=E=>!f(u)&&P()),onHomeKeyDown:S[4]||(S[4]=E=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:S[5]||(S[5]=E=>!f(u)&&g(f(i),C.value.length-1,{commit:!0})),onStepKeyDown:S[6]||(S[6]=(E,A)=>{if(!f(u)){const Z=f(vh).includes(E.key)||E.shiftKey&&f(mh).includes(E.key)?10:1,Q=y.value,K=C.value[Q];g(K+f(o)*Z*A,Q,{commit:!0})}})}),{default:k(()=>[ie(M.$slots,"default",{modelValue:f(v)}),f(w)&&M.name?(D(),U(f(Ab),{key:0,type:"number",value:f(v),name:M.name,required:M.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):$e("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),_h=ee({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,s=Rs();return(i,o)=>(D(),U(f(Ve),he({"data-slider-impl":""},r,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(n("homeKeyDown",a),a.preventDefault()):a.key==="End"?(n("endKeyDown",a),a.preventDefault()):f(vh).concat(f(mh)).includes(a.key)&&(n("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),f(s).thumbElements.value.includes(l)?l.focus():n("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&n("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),n("slideEnd",a))})}),{default:k(()=>[ie(i.$slots,"default")]),_:3},16))}}),W1=ee({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Rs(),r=yh();Ae();const n=j(()=>t.currentModelValue.value.map(o=>gh(o,t.min.value,t.max.value))),s=j(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=j(()=>100-Math.max(...n.value,0));return(o,a)=>(D(),U(f(Ve),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:vt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:k(()=>[ie(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),G1=ee({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Rs(),n=yh(),{forwardRef:s,currentElement:i}=Ae(),{CollectionItem:o}=Qr(),a=j(()=>r.modelValue?.value?.[t.index]),l=j(()=>a.value===void 0?0:gh(a.value,r.min.value??0,r.max.value??100)),u=j(()=>M1(t.index,r.modelValue?.value?.length??0)),c=kp(i),d=j(()=>c[n.size].value),p=j(()=>r.thumbAlignment.value==="overflow"||!d.value?0:q1(d.value,l.value,n.direction.value)),h=Ol();return We(()=>{r.thumbElements.value.push(i.value)}),Ht(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>(D(),U(f(o),null,{default:k(()=>[q(f(Ve),he(m.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":m.$attrs["aria-label"]||u.value,"data-disabled":f(r).disabled.value?"":void 0,"data-orientation":f(r).orientation.value,"aria-valuenow":a.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,"aria-orientation":f(r).orientation.value,"as-child":m.asChild,as:m.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(n).startEdge.value]:`calc(${l.value}% + ${p.value}px)`,display:!f(h)&&a.value===void 0?"none":void 0},onFocus:w[0]||(w[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:k(()=>[ie(m.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),J1=ee({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=Qr(),{forwardRef:n,currentElement:s}=Ae(),i=j(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(D(),U(G1,he({ref:f(n)},t,{index:i.value}),{default:k(()=>[ie(o.$slots,"default")]),_:3},16,["index"]))}}),Y1=ee({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Rs();return Ae(),(r,n)=>(D(),U(f(Ve),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:k(()=>[ie(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),Z1=ee({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return Ae(),(r,n)=>(D(),U(f(Ve),he(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),[Xt,X1]=kt("ScrollAreaRoot"),Q1=ee({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=V(0),s=V(0),i=V(),o=V(),a=V(),l=V(),u=V(!1),c=V(!1),{type:d,dir:p,scrollHideDelay:h}=It(r),m=ql(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:v,currentElement:C}=Ae();return X1({type:d,dir:m,scrollHideDelay:h,scrollArea:C,viewport:i,onViewportChange:y=>{i.value=y||void 0},content:o,onContentChange:y=>{o.value=y},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:y=>{a.value=y||void 0},onScrollbarYChange:y=>{l.value=y||void 0},onScrollbarXEnabledChange:y=>{u.value=y},onScrollbarYEnabledChange:y=>{c.value=y},onCornerWidthChange:y=>{n.value=y},onCornerHeightChange:y=>{s.value=y}}),(y,b)=>(D(),U(f(Ve),{ref:f(v),"as-child":r.asChild,as:y.as,dir:f(m),style:vt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:k(()=>[ie(y.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),e2=ee({__name:"ScrollAreaCornerImpl",setup(e){const t=Xt(),r=V(0),n=V(0),s=j(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return Wn(t.scrollbarX.value,i),Wn(t.scrollbarY.value,o),Re(()=>t.scrollbarX.value,i),Re(()=>t.scrollbarY.value,o),(a,l)=>s.value?(D(),U(f(Ve),he({key:0,style:{width:`${r.value}px`,height:`${n.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},a.$parent?.$props),{default:k(()=>[ie(a.$slots,"default")]),_:3},16,["style"])):$e("v-if",!0)}}),t2=ee({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Ae(),n=Xt(),s=j(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=j(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(D(),U(e2,he({key:0},t,{ref:f(r)}),{default:k(()=>[ie(o.$slots,"default")]),_:3},16)):$e("v-if",!0)}});function Sh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Ko(e){const t=Ch(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Ch(e,t){const r=e/t;return Number.isNaN(r)?0:r}function r2(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(n)}function xh(e,t,r="ltr"){const n=Ko(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],u=mi(e,l[0],l[1]);return Sh([0,o],[0,a])(u)}function Wo(e){return e?Number.parseInt(e,10):0}function n2(e,t,r,n="ltr"){const s=Ko(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return Sh([l,u],d)(e)}function Th(e,t){return e>0&&e<t}var s2=ee({__name:"ScrollAreaScrollbarX",setup(e){const t=Xt(),r=Go(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(D(),U(Eh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:vt({bottom:0,left:f(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":i.value?`${f(Ko)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:k(()=>[ie(o.$slots,"default")]),_:3},8,["style"]))}}),i2=ee({__name:"ScrollAreaScrollbarY",setup(e){const t=Xt(),r=Go(),{forwardRef:n,currentElement:s}=Ae();We(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(D(),U(Eh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:vt({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":i.value?`${f(Ko)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:k(()=>[ie(o.$slots,"default")]),_:3},8,["style"]))}}),uc=ee({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Xt(),r=bi(),{forwardRef:n}=Ae(),s=V(!1),i=Dl(()=>{if(t.viewport.value){const o=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,a=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;s.value=r.isHorizontal.value?o:a}},10);return We(()=>i()),Wn(t.viewport,i),Wn(t.content,i),(o,a)=>(D(),U(f(xn),{present:o.forceMount||s.value},{default:k(()=>[q(dc,he(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[ie(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),o2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Xt(),r=bi(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=Fl("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=j(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=Dl(()=>i("SCROLL_END"),100);return et(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),et(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),et(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const w=d[p];h!==w&&(i("SCROLL"),u()),h=w};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),We(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Ht(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(D(),U(f(xn),{present:c.forceMount||o.value},{default:k(()=>[q(uc,he(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[ie(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),a2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Xt(),{forwardRef:r}=Ae();let n;const s=V(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return We(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Ht(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(D(),U(f(xn),{present:a.forceMount||s.value},{default:k(()=>[q(uc,he(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[ie(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),l2=ee({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Xt(),r=bi(),{forwardRef:n}=Ae(),{state:s,dispatch:i}=Fl("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=j(()=>s.value!=="hidden");et(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Dl(()=>i("SCROLL_END"),100);return et(l=>{const u=t.viewport.value,c=r.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let d=u[c];const p=()=>{const h=u[c];d!==h&&(i("SCROLL"),a()),d=h};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(D(),U(f(xn),{present:l.forceMount||o.value},{default:k(()=>[q(dc,he(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[ie(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[bi,c2]=kt("ScrollAreaScrollbar"),u2=ee({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:r}=Ae(),n=Xt(),s=j(()=>t.orientation==="horizontal");Re(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Ht(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=It(t);return c2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(D(),U(a2,he({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(D(),U(l2,he({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(D(),U(o2,he({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(D(),U(uc,he({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(D(),U(dc,he({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16)):$e("v-if",!0)}}),[Go,d2]=kt("ScrollAreaScrollbarVisible"),dc=ee({__name:"ScrollAreaScrollbarVisible",setup(e){const t=Xt(),r=bi(),{forwardRef:n}=Ae(),s=V({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=j(()=>{const v=Ch(s.value.viewport,s.value.content);return v>0&&v<1}),o=V(),a=V(0);function l(v,C){if(h.value){const y=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=y,Th(y,C)&&v.preventDefault()}else{const y=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=y,Th(y,C)&&v.preventDefault()}}function u(v,C){h.value?a.value=C.x:a.value=C.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,C){return n2(v,a.value,s.value,C)}const h=j(()=>r.isHorizontal.value);function m(v){h.value?t.viewport.value.scrollLeft=p(v,t.dir.value):t.viewport.value.scrollTop=p(v)}function w(){if(h.value){if(t.viewport.value&&o.value){const v=t.viewport.value.scrollLeft,C=xh(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${C}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,C=xh(v,s.value);o.value.style.transform=`translate3d(0, ${C}px, 0)`}}function x(v){o.value=v}return d2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(v,C)=>h.value?(D(),U(s2,he({key:0},v.$attrs,{ref:f(n)}),{default:k(()=>[ie(v.$slots,"default")]),_:3},16)):(D(),U(i2,he({key:1},v.$attrs,{ref:f(n)}),{default:k(()=>[ie(v.$slots,"default")]),_:3},16))}}),Eh=ee({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=Xt(),i=Go(),o=bi(),{forwardRef:a,currentElement:l}=Ae(),u=V(""),c=V();function d(v){c.value&&n("onDragScroll",{x:v.clientX-c.value?.left,y:v.clientY-c.value?.top})}function p(v){v.button===0&&(v.target.setPointerCapture(v.pointerId),c.value=l.value.getBoundingClientRect(),u.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(v))}function h(v){d(v)}function m(v){const C=v.target;C.hasPointerCapture(v.pointerId)&&C.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(v){const C=v.target,y=l.value?.contains(C),b=i.sizes.value.content-i.sizes.value.viewport;y&&i.handleWheelScroll(v,b)}We(()=>{document.addEventListener("wheel",w,{passive:!1})}),Ht(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:Wo(getComputedStyle(l.value).paddingLeft),paddingEnd:Wo(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:s.viewport.value?.scrollHeight??0,viewport:s.viewport.value?.offsetHeight??0,scrollbar:{size:l.value?.clientHeight??0,paddingStart:Wo(getComputedStyle(l.value).paddingTop),paddingEnd:Wo(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Wn(l,x),Wn(s.content,x),(v,C)=>(D(),U(f(Ve),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:p,onPointermove:h,onPointerup:m},{default:k(()=>[ie(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),f2=ee({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Xt(),n=Go();function s(d){const p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;n.handleThumbDown(d,{x:h,y:m})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Ae(),l=V(),u=j(()=>r.viewport.value);function c(){l.value||(l.value=r2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ey(j(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Ht(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(D(),U(f(Ve),{ref:f(o),"data-state":f(n).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:d.as,onPointerdown:s,onPointerup:i},{default:k(()=>[ie(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),p2=ee({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,{nonce:n}=It(r),s=hh(n),i=Xt(),o=V();We(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Ae();return(u,c)=>(D(),me(Le,null,[ne("div",he({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:f(i).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(i).scrollbarYEnabled.value?"scroll":"hidden"}},u.$attrs,{tabindex:0}),[q(f(Ve),{ref:f(a),style:vt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:k(()=>[ie(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),q(f(Ve),{as:"style",nonce:f(s)},{default:k(()=>c[0]||(c[0]=[Ne(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),h2=[" ","Enter","ArrowUp","ArrowDown"],g2=[" ","Enter"],bx=10;function _i(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>fc(n,t,r)):fc(e,t,r)}function fc(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:ny(e,t)}function v2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var m2={key:0,value:""},[Rn,Ah]=kt("SelectRoot"),w2=ee({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=e,n=t,{required:s,disabled:i,multiple:o,dir:a}=It(r),l=Ss(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=Ss(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=V(),d=V(),p=V({x:0,y:0}),h=j(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Rl(l.value));Qr({isProvider:!0});const m=ql(a),w=Ap(c),x=V(new Set),v=j(()=>Array.from(x.value).map(b=>b.value).join(";"));function C(b){if(o.value){const _=Array.isArray(l.value)?[...l.value]:[],T=_.findIndex(P=>fc(P,b,r.by));T===-1?_.push(b):_.splice(T,1),l.value=[..._]}else l.value=b}function y(b){return Array.from(x.value).find(_=>_i(b,_.value,r.by))}return Ah({triggerElement:c,onTriggerChange:b=>{c.value=b},valueElement:d,onValueElementChange:b=>{d.value=b},contentId:"",modelValue:l,onValueChange:C,by:r.by,open:u,multiple:o,required:s,onOpenChange:b=>{u.value=b},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:b=>{const _=y(b.value);_&&x.value.delete(_),x.value.add(b)},onOptionRemove:b=>{const _=y(b.value);_&&x.value.delete(_)}}),(b,_)=>(D(),U(f(Up),null,{default:k(()=>[ie(b.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?(D(),U(y2,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:b.name,autocomplete:b.autocomplete,disabled:f(i),value:f(l)},{default:k(()=>[f(Rl)(f(l))?(D(),me("option",m2)):$e("v-if",!0),(D(!0),me(Le,null,rr(Array.from(x.value),T=>(D(),me("option",he({key:T.value??""},{ref_for:!0},T),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):$e("v-if",!0)]),_:3}))}}),y2=ee({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=V(),n=Rn();Re(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const u=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(u)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>(D(),U(f(Gl),{"as-child":""},{default:k(()=>[ne("select",he({ref_key:"selectElement",ref:r},t,{onInput:s}),[ie(i.$slots,"default")],16)]),_:3}))}}),b2=ee({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zr(e);return(r,n)=>(D(),U(f(ph),he(f(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),_2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Zn,Ih]=kt("SelectContent"),S2=ee({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Rn();Fy(),xp(r.bodyLock);const{CollectionSlot:i,getItems:o}=Qr(),a=V();Rp(a);const{search:l,handleTypeaheadSearch:u}=$p(),c=V(),d=V(),p=V(),h=V(!1),m=V(!1),w=V(!1);function x(){d.value&&a.value&&Bp([d.value,a.value])}Re(h,()=>{x()});const{onOpenChange:v,triggerPointerDownPosRef:C}=s;et(_=>{if(!a.value)return;let T={x:0,y:0};const P=H=>{T={x:Math.abs(Math.round(H.pageX)-(C.value?.x??0)),y:Math.abs(Math.round(H.pageY)-(C.value?.y??0))}},g=H=>{H.pointerType!=="touch"&&(T.x<=10&&T.y<=10?H.preventDefault():a.value?.contains(H.target)||v(!1),document.removeEventListener("pointermove",P),C.value=null)};C.value!==null&&(document.addEventListener("pointermove",P),document.addEventListener("pointerup",g,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",P),document.removeEventListener("pointerup",g,{capture:!0})})});function y(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&u(_.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let P=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(_.key)&&(P=P.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const g=_.target,H=P.indexOf(g);P=P.slice(H+1)}setTimeout(()=>Bp(P)),_.preventDefault()}}const b=Zr(j(()=>r.position==="popper"?r:{}).value);return Ih({content:a,viewport:c,onViewportChange:_=>{c.value=_},itemRefCallback:(_,T,P)=>{const g=!m.value&&!P,H=_i(s.modelValue.value,T,s.by);if(s.multiple.value){if(w.value)return;(H||g)&&(d.value=_,H&&(w.value=!0))}else(H||g)&&(d.value=_);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(_,T,P)=>{const g=!m.value&&!P;(_i(s.modelValue.value,T,s.by)||g)&&(p.value=_)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(_,T)=>(D(),U(f(i),null,{default:k(()=>[q(f(Np),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=or(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=P=>{n("closeAutoFocus",P),!P.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),P.preventDefault())})},{default:k(()=>[q(f(Ul),{"as-child":"","disable-outside-pointer-events":_.disableOutsidePointerEvents,onFocusOutside:T[2]||(T[2]=or(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=P=>f(s).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=P=>n("escapeKeyDown",P)),onPointerDownOutside:T[5]||(T[5]=P=>n("pointerDownOutside",P))},{default:k(()=>[(D(),U(Zs(_.position==="popper"?b2:x2),he({..._.$attrs,...f(b)},{id:f(s).contentId,ref:P=>{const g=f(zt)(P);g?.hasAttribute("data-reka-popper-content-wrapper")?a.value=g.firstElementChild:a.value=g},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=or(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=P=>h.value=!0),onKeydown:y}),{default:k(()=>[ie(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[pc,C2]=kt("SelectItemAlignedPosition"),x2=ee({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const r=e,n=t,{getItems:s}=Qr(),i=Rn(),o=Zn(),a=V(!1),l=V(!0),u=V(),{forwardRef:c,currentElement:d}=Ae(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const y=i.triggerElement.value.getBoundingClientRect(),b=d.value.getBoundingClientRect(),_=i.valueElement.value.getBoundingClientRect(),T=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Ie=T.left-b.left,Ye=_.left-Ie,at=y.left-Ye,Pe=y.width+at,lt=Math.max(Pe,b.width),gt=window.innerWidth-10,ut=mi(Ye,10,Math.max(10,gt-lt));u.value.style.minWidth=`${Pe}px`,u.value.style.left=`${ut}px`}else{const Ie=b.right-T.right,Ye=window.innerWidth-_.right-Ie,at=window.innerWidth-y.right-Ye,Pe=y.width+at,lt=Math.max(Pe,b.width),gt=window.innerWidth-10,ut=mi(Ye,10,Math.max(10,gt-lt));u.value.style.minWidth=`${Pe}px`,u.value.style.right=`${ut}px`}const P=s().map(Ie=>Ie.ref),g=window.innerHeight-20,H=p.value.scrollHeight,M=window.getComputedStyle(d.value),S=Number.parseInt(M.borderTopWidth,10),E=Number.parseInt(M.paddingTop,10),A=Number.parseInt(M.borderBottomWidth,10),Z=Number.parseInt(M.paddingBottom,10),Q=S+E+H+Z+A,K=Math.min(h.value.offsetHeight*5,Q),X=window.getComputedStyle(p.value),Y=Number.parseInt(X.paddingTop,10),ae=Number.parseInt(X.paddingBottom,10),W=y.top+y.height/2-10,le=g-W,fe=h.value.offsetHeight/2,Ce=h.value.offsetTop+fe,He=S+E+Ce,Te=Q-He;if(He<=W){const Ie=h.value===P[P.length-1];u.value.style.bottom="0px";const Ye=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,at=He+Math.max(le,fe+(Ie?ae:0)+Ye+A);u.value.style.height=`${at}px`}else{const Ie=h.value===P[0];u.value.style.top="0px";const Ye=Math.max(W,S+p.value.offsetTop+(Ie?Y:0)+fe)+Te;u.value.style.height=`${Ye}px`,p.value.scrollTop=He-W+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${K}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=V("");We(async()=>{await mt(),x(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function C(y){y&&l.value===!0&&(x(),w?.(),l.value=!1)}return Wn(i.triggerElement,()=>{x()}),C2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:C}),(y,b)=>(D(),me("div",{ref_key:"contentWrapperElement",ref:u,style:vt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[q(f(Ve),he({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...y.$attrs,...r}),{default:k(()=>[ie(y.$slots,"default")]),_:3},16)],4))}}),T2=ee({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Ah(e.context),Ih(_2),(t,r)=>ie(t.$slots,"default")}}),E2={key:1},A2=ee({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Xr(r,t),s=Rn(),i=V();We(()=>{i.value=new DocumentFragment});const o=V(),a=j(()=>r.forceMount||s.open.value),l=V(a.value);return Re(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(D(),U(f(xn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:k(()=>[q(S2,fr(nr({...f(n),...u.$attrs})),{default:k(()=>[ie(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(D(),me("div",E2,[(D(),U(Ea,{to:i.value},[q(T2,{context:f(s)},{default:k(()=>[ie(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):$e("v-if",!0)}}),[_x,I2]=kt("SelectGroup"),R2=ee({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=xs(void 0,"reka-select-group");return I2({id:r}),(n,s)=>(D(),U(f(Ve),he({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),k2=ee({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(D(),U(f(Ve),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:k(()=>[ie(t.$slots,"default",{},()=>[r[0]||(r[0]=Ne("▼"))])]),_:3},8,["as","as-child"]))}}),[Rh,$2]=kt("SelectItem"),P2=ee({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,{disabled:s}=It(r),i=Rn(),o=Zn(),{forwardRef:a,currentElement:l}=Ae(),{CollectionItem:u}=Qr(),c=j(()=>_i(i.modelValue?.value,r.value,i.by)),d=V(!1),p=V(r.textValue??""),h=xs(void 0,"reka-select-item-text"),m="select.select";async function w(b){b.defaultPrevented||Il(m,x,{originalEvent:b,value:r.value})}async function x(b){await mt(),n("select",b),!b.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(b){await mt(),!b.defaultPrevented&&(s.value?o.onItemLeave?.():b.currentTarget?.focus({preventScroll:!0}))}async function C(b){await mt(),!b.defaultPrevented&&b.currentTarget===Jt()&&o.onItemLeave?.()}async function y(b){await mt(),!b.defaultPrevented&&(o.searchRef?.value!==""&&b.key===" "||(g2.includes(b.key)&&w(b),b.key===" "&&b.preventDefault()))}if(r.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return We(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),$2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:b=>{p.value=((p.value||b?.textContent)??"").trim()}}),(b,_)=>(D(),U(f(u),{value:{textValue:p.value}},{default:k(()=>[q(f(Ve),{ref:f(a),role:"option","aria-labelledby":f(h),"data-highlighted":d.value?"":void 0,"aria-selected":c.value,"data-state":c.value?"checked":"unchecked","aria-disabled":f(s)||void 0,"data-disabled":f(s)?"":void 0,tabindex:f(s)?void 0:-1,as:b.as,"as-child":b.asChild,onFocus:_[0]||(_[0]=T=>d.value=!0),onBlur:_[1]||(_[1]=T=>d.value=!1),onPointerup:w,onPointerdown:_[2]||(_[2]=T=>{T.currentTarget.focus({preventScroll:!0})}),onTouchend:_[3]||(_[3]=or(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:C,onKeydown:y},{default:k(()=>[ie(b.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),D2=ee({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rh();return(n,s)=>f(r).isSelected.value?(D(),U(f(Ve),he({key:0,"aria-hidden":"true"},t),{default:k(()=>[ie(n.$slots,"default")]),_:3},16)):$e("v-if",!0)}}),O2=ee({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Rn(),n=Zn(),s=Rh(),{forwardRef:i,currentElement:o}=Ae(),a=j(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return We(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Ht(()=>{r.onOptionRemove(a.value)}),(l,u)=>(D(),U(f(Ve),he({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:k(()=>[ie(l.$slots,"default")]),_:3},16,["id"]))}}),H2=ee({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),U(f(Wl),fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),kh=ee({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=Qr(),s=Zn(),i=V(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}et(()=>{n().map(u=>u.ref).find(u=>u===Jt())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return hs(()=>o()),(u,c)=>(D(),U(f(Ve),he({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:k(()=>[ie(u.$slots,"default")]),_:3},16))}}),M2=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zn(),r=t.position==="item-aligned"?pc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=V(!1);return et(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){const c=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<c};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(D(),U(kh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop+u.value.offsetHeight)})},{default:k(()=>[ie(o.$slots,"default")]),_:3},512)):$e("v-if",!0)}}),N2=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Zn(),r=t.position==="item-aligned"?pc():void 0,{forwardRef:n,currentElement:s}=Ae(),i=V(!1);return et(o=>{if(t.viewport?.value&&t.isPositioned?.value){let u=function(){i.value=l.scrollTop>0};var a=u;const l=t.viewport.value;u(),l.addEventListener("scroll",u),o(()=>l.removeEventListener("scroll",u))}}),Re(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(D(),U(kh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:u}=f(t);l?.value&&u?.value&&(l.value.scrollTop=l.value.scrollTop-u.value.offsetHeight)})},{default:k(()=>[ie(o.$slots,"default")]),_:3},512)):$e("v-if",!0)}}),q2=ee({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Rn(),{forwardRef:n,currentElement:s}=Ae(),i=j(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=xs(void 0,"reka-select-content")),We(()=>{r.onTriggerChange(s.value)});const{getItems:o}=Qr(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=$p();function c(){i.value||(r.onOpenChange(!0),u())}function d(p){c(),r.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>(D(),U(f(zp),{"as-child":"",reference:p.reference},{default:k(()=>[q(f(Ve),{ref:f(n),role:"combobox",type:p.as==="button"?"button":void 0,"aria-controls":f(r).contentId,"aria-expanded":f(r).open.value||!1,"aria-required":f(r).required?.value,"aria-autocomplete":"none",disabled:i.value,dir:f(r)?.dir.value,"data-state":f(r)?.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":f(v2)(f(r).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=m=>{m?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=m=>{if(m.pointerType==="touch")return m.preventDefault();const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=or(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const w=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&w&&m.key===" "||(f(l)(m.key,f(o)()),f(h2).includes(m.key)&&(c(),m.preventDefault()))})},{default:k(()=>[ie(p.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),B2=ee({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Ae(),s=Rn();We(()=>{s.valueElement=n});const i=j(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>_i(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=j(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(D(),U(f(Ve),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:k(()=>[ie(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[Ne(Oe(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),L2=ee({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:r}=It(t),n=hh(r),s=Zn(),i=s.position==="item-aligned"?pc():void 0,{forwardRef:o,currentElement:a}=Ae();We(()=>{s?.onViewportChange(a.value)});const l=V(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const w=window.innerHeight-20,x=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),C=Math.max(x,v);if(C<w){const y=C+m,b=Math.min(w,y),_=y-b;h.value.style.height=`${b}px`,h.value.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(D(),me(Le,null,[q(f(Ve),he({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:k(()=>[ie(c.$slots,"default")]),_:3},16),q(f(Ve),{as:"style",nonce:f(n)},{default:k(()=>d[0]||(d[0]=[Ne(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),F2=ee({__name:"BaseSeparator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=["horizontal","vertical"];function n(a){return r.includes(a)}const s=j(()=>n(t.orientation)?t.orientation:"horizontal"),i=j(()=>s.value==="vertical"?t.orientation:void 0),o=j(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>(D(),U(f(Ve),he({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:k(()=>[ie(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),V2=ee({__name:"Separator",props:{orientation:{type:String,required:!1,default:"horizontal"},decorative:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(r,n)=>(D(),U(F2,fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),j2=ee({__name:"TooltipArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Ae(),(r,n)=>(D(),U(f(O1),fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),[Jo,U2]=kt("TooltipProvider"),z2=ee({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){const{delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,disableClosingTrigger:s,ignoreNonKeyboardFocus:i,disabled:o,content:a}=It(e);Ae();const l=V(!0),u=V(!1),{start:c,stop:d}=yp(()=>{l.value=!0},r,{immediate:!1});return U2({isOpenDelayed:l,delayDuration:t,onOpen(){d(),l.value=!1},onClose(){c()},isPointerInTransitRef:u,disableHoverableContent:n,disableClosingTrigger:s,disabled:o,ignoreNonKeyboardFocus:i,content:a}),(p,h)=>ie(p.$slots,"default")}}),$h="tooltip.open",[Yo,K2]=kt("TooltipRoot"),W2=ee({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=t;Ae();const s=Jo(),i=j(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=j(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=j(()=>r.disabled??s.disabled.value),l=j(()=>r.delayDuration??s.delayDuration.value),u=j(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=Ss(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Re(c,y=>{s.onClose&&(y?(s.onOpen(),document.dispatchEvent(new CustomEvent($h))):s.onClose())});const d=V(!1),p=V(),h=j(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=yp(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function v(){w(),c.value=!1}function C(){m()}return K2({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(y){p.value=y},onTriggerEnter(){s.isOpenDelayed.value?C():x()},onTriggerLeave(){i.value?v():w()},onOpen:x,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(y,b)=>(D(),U(f(Up),null,{default:k(()=>[ie(y.$slots,"default",{open:f(c)})]),_:3}))}}),Ph=ee({__name:"TooltipContentImpl",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Yo(),i=Jo(),{forwardRef:o,currentElement:a}=Ae(),l=j(()=>r.ariaLabel||a.value?.textContent),u=j(()=>{const{ariaLabel:c,...d}=r;return Cp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return We(()=>{Nt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Nt(window,$h,s.onClose)}),(c,d)=>(D(),U(f(Ul),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:d[0]||(d[0]=p=>n("escapeKeyDown",p)),onPointerDownOutside:d[1]||(d[1]=p=>{f(s).disableClosingTrigger.value&&f(s).trigger.value?.contains(p.target)&&p.preventDefault(),n("pointerDownOutside",p)}),onFocusOutside:d[2]||(d[2]=or(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:k(()=>[q(f(ph),he({ref:f(o),"data-state":f(s).stateAttribute.value},{...c.$attrs,...u.value},{style:{"--reka-tooltip-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-tooltip-content-available-width":"var(--reka-popper-available-width)","--reka-tooltip-content-available-height":"var(--reka-popper-available-height)","--reka-tooltip-trigger-width":"var(--reka-popper-anchor-width)","--reka-tooltip-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:k(()=>[ie(c.$slots,"default"),q(f(Gl),{id:f(s).contentId,role:"tooltip"},{default:k(()=>[Ne(Oe(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),G2=ee({__name:"TooltipContentHoverable",props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){const t=Zr(e),{forwardRef:r,currentElement:n}=Ae(),{trigger:s,onClose:i}=Yo(),o=Jo(),{isPointerInTransit:a,onPointerExit:l}=Vy(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(D(),U(Ph,he({ref:f(r)},f(t)),{default:k(()=>[ie(u.$slots,"default")]),_:3},16))}}),J2=ee({__name:"TooltipContent",props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Yo(),i=Xr(r,n),{forwardRef:o}=Ae();return(a,l)=>(D(),U(f(xn),{present:a.forceMount||f(s).open.value},{default:k(()=>[(D(),U(Zs(f(s).disableHoverableContent.value?Ph:G2),he({ref:f(o)},f(i)),{default:k(()=>[ie(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Y2=ee({__name:"TooltipPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(D(),U(f(Wl),fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),Z2=ee({__name:"TooltipTrigger",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Yo(),n=Jo();r.contentId||(r.contentId=xs(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Ae(),o=V(!1),a=V(!1),l=j(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});We(()=>{r.onTriggerChange(i.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,v)=>(D(),U(f(zp),{"as-child":"",reference:x.reference},{default:k(()=>[q(f(Ve),he({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Fu(l.value)),{default:k(()=>[ie(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),X2=ee({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(D(),U(f(Ve),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:Ze(f(rt)(f(Q2)({variant:e.variant,size:e.size}),t.class))},{default:k(()=>[ie(r.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),nt=X2;const Q2=Xw("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:whitespace-nowrap wp:rounded-md wp:text-sm wp:font-medium wp:transition-all wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:shrink-0 wp:[&_svg]:shrink-0 wp:outline-none wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",{variants:{variant:{default:"wp:bg-primary wp:text-primary-foreground wp:hover:bg-primary/90",destructive:"wp:bg-destructive wp:text-white wp:hover:bg-destructive/90 wp:focus-visible:ring-destructive/20 wp:dark:focus-visible:ring-destructive/40 wp:dark:bg-destructive/60",outline:"wp:border wp:bg-background wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:bg-input/30 wp:dark:border-input wp:dark:hover:bg-input/50",secondary:"wp:bg-secondary wp:text-secondary-foreground wp:hover:bg-secondary/80",ghost:"wp:hover:bg-accent wp:hover:text-accent-foreground wp:dark:hover:bg-accent/50",link:"wp:text-primary wp:underline-offset-4 wp:hover:underline"},size:{default:"wp:h-9 wp:px-4 wp:py-2 wp:has-[>svg]:px-3",sm:"wp:h-8 wp:rounded-md wp:gap-1.5 wp:px-3 wp:has-[>svg]:px-2.5",lg:"wp:h-10 wp:rounded-md wp:px-6 wp:has-[>svg]:px-4",icon:"wp:size-9","icon-sm":"wp:size-8","icon-lg":"wp:size-10"}},defaultVariants:{variant:"default",size:"default"}});var e_={class:"webphone-keypad wp:grid wp:grid-cols-3 wp:gap-y-3 wp:gap-x-6 wp:px-4 wp:py-2 wp:mx-auto wp:place-items-center"},t_=ee({__name:"KeyPad",setup(e){const t=Ot("webphone"),{sendDTMF:r}=Ot("sip"),{playDtmf:n}=Lf(),s=["1","2","3","4","5","6","7","8","9","*","0","#"],i=o=>{n(o),t.callStatus==="connected"?r(o):t.appendKeypad(o)};return(o,a)=>(D(),me("div",e_,[(D(),me(Le,null,rr(s,l=>q(f(nt),{key:l,onClick:u=>i(l),variant:"ghost",size:"icon",class:"webphone-keypad__key wp:flex wp:items-center wp:justify-center wp:h-10 wp:w-full wp:rounded-xs wp:text-lg wp:bg-neutral-100 wp:dark:bg-neutral-700 wp:hover:bg-neutral-200 wp:dark:hover:bg-neutral-600 wp:hover:text-primary wp:dark:hover:text-neutral-100 wp:text-primary wp:dark:text-white wp:transition-all wp:duration-150 wp:active:scale-95 wp:font-light montserrat","data-key":l},{default:k(()=>[Ne(Oe(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),hc=t_;var Dh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),n_=e=>{const t=r_(e);return t.charAt(0).toUpperCase()+t.slice(1)},s_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Oh=e=>e==="";var Si={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var i_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Si.width,color:a=Si.stroke,...l},{slots:u})=>sr("svg",{...Si,...l,width:o,height:o,stroke:a,"stroke-width":Oh(r)||Oh(n)||r===!0||n===!0?Number(s||i||Si["stroke-width"])*24/Number(o):s||i||Si["stroke-width"],class:s_("lucide",l.class,...e?[`lucide-${Dh(n_(e))}-icon`,`lucide-${Dh(e)}`]:["lucide-icon"])},[...t.map(c=>sr(...c)),...u.default?[u.default()]:[]]);var ct=(e,t)=>(r,{slots:n,attrs:s})=>sr(i_,{...s,...r,iconNode:t,name:e},n);var Hh=ct("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);var Mh=ct("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Nh=ct("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var o_=ct("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var gc=ct("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var a_=ct("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);var l_=ct("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"}]]);var c_=ct("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var u_=ct("phone-incoming",[["path",{d:"M16 2v6h6",key:"1mfrl5"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var d_=ct("phone-missed",[["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var f_=ct("phone-outgoing",[["path",{d:"m16 8 6-6",key:"oawc05"}],["path",{d:"M22 8V2h-6",key:"oqy2zc"}],["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var qh=ct("phone",[["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]);var p_=ct("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]);var h_=ct("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var g_=ct("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var v_=ct("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var m_=ct("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var Bh=ct("voicemail",[["circle",{cx:"6",cy:"12",r:"4",key:"1ehtga"}],["circle",{cx:"18",cy:"12",r:"4",key:"4vafl8"}],["line",{x1:"6",x2:"18",y1:"16",y2:"16",key:"pmt8us"}]]);var Lh=ct("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var vc=ct("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),w_=ee({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=Ss(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>zi((D(),me("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>Ge(n)?n.value=o:null),"data-slot":"input",class:Ze(f(rt)("wp:file:text-foreground wp:placeholder:text-muted-foreground wp:selection:bg-primary wp:selection:text-primary-foreground wp:dark:bg-input/30 wp:border-blue-500 wp:h-9 wp:w-full wp:min-w-0 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-1 wp:text-base wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:file:inline-flex wp:file:h-7 wp:file:border-0 wp:file:bg-transparent wp:file:text-sm wp:file:font-medium wp:disabled:pointer-events-none wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:md:text-sm","wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px]","wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive",r.class))},null,2)),[[ai,f(n)]])}}),Ci=w_,y_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function b_(e,t){return D(),me("svg",y_,[...t[0]||(t[0]=[Ja('<g clip-path="url(#a)"><path fill="currentColor" d="m1.913 7.003.035.49c0 .605.49 1.095 1.095 1.095.015 0 1.08-.14 1.08-.14a1.1 1.1 0 0 0 1.07-1.07l.075-.655c1.192-.463 2.33-.465 3.47-.005l.072.657c.01.585.485 1.06 1.07 1.07 0 0 1.065.14 1.08.14.605 0 1.095-.49 1.095-1.07l.038-.537c0-.575-.23-1.12-.65-1.54-1.91-1.91-6.973-1.908-8.88 0-.418.417-.65.965-.648 1.562zM10.94 5.94c.285.285.443.653.44 1.015l-.037.538a.39.39 0 0 1-.368.387s-1.057-.137-1.072-.137a.4.4 0 0 1-.388-.388c0-.015-.1-.92-.1-.92a.35.35 0 0 0-.207-.282c-1.43-.64-2.913-.643-4.408-.003a.36.36 0 0 0-.212.288s-.103.907-.103.917a.386.386 0 0 1-.387.388c-.015 0-1.073.137-1.073.137a.395.395 0 0 1-.37-.41l-.035-.49c0-.385.155-.755.44-1.04 1.74-1.74 6.383-1.497 7.88 0"></path></g><circle cx="7" cy="7" r="6.6" stroke="currentColor" stroke-width=".8"></circle><defs><clipPath id="a"><path fill="#fff" d="M7 13 1 7l6-6 6 6z"></path></clipPath></defs>',3)])])}var mc={render:b_},__={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function S_(e,t){return D(),me("svg",__,[...t[0]||(t[0]=[ne("g",{"clip-path":"url(#a)"},[ne("path",{fill:"currentColor",d:"M0 8.625V6a3.38 3.38 0 0 1 3.375-3.375h1.811V2.03a.75.75 0 0 1 1.28-.53l2.206 2.205a1.125 1.125 0 0 1 0 1.59L6.466 7.5a.75.75 0 0 1-1.28-.53v-.595H3a2.25 2.25 0 0 0-2.25 2.25.375.375 0 0 1-.75 0M5.936 3a.375.375 0 0 1-.375.375H3.375A2.63 2.63 0 0 0 .75 6v.643A3 3 0 0 1 3 5.625h2.561A.375.375 0 0 1 5.936 6v.97l2.205-2.205a.375.375 0 0 0 0-.53L5.936 2.03z"})],-1),ne("defs",null,[ne("clipPath",{id:"a"},[ne("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var C_={render:S_},x_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function T_(e,t){return D(),me("svg",x_,[...t[0]||(t[0]=[Ja('<g clip-path="url(#a)"><path fill="currentColor" d="m13.499 13.495.321-.371a1.095 1.095 0 0 0 0-1.549c-.01-.01-.862-.665-.862-.665a1.1 1.1 0 0 0-1.514 0l-.516.41c-1.17-.516-1.976-1.318-2.457-2.45l.414-.516a1.09 1.09 0 0 0 0-1.513s-.654-.852-.665-.863c-.428-.427-1.12-.427-1.53-.017l-.407.353c-.407.407-.63.955-.63 1.549 0 2.701 3.582 6.279 6.28 6.279.59 0 1.141-.223 1.562-.647zM6.364 7.863c0-.403.148-.774.406-1.029l.407-.354a.39.39 0 0 1 .534-.014s.65.845.661.856a.4.4 0 0 1 0 .548c-.01.01-.58.721-.58.721a.35.35 0 0 0-.053.347c.559 1.463 1.605 2.513 3.115 3.118a.36.36 0 0 0 .354-.053l.72-.576a.386.386 0 0 1 .549 0c.01.01.855.66.855.66a.395.395 0 0 1-.028.552l-.322.372a1.47 1.47 0 0 1-1.046.424c-2.46 0-5.572-3.454-5.572-5.572"></path></g><circle cx="9.899" cy="9.899" r="6.6" stroke="currentColor" stroke-width=".8" transform="rotate(-135 9.9 9.9)"></circle><defs><clipPath id="a"><path fill="#fff" d="M14.143 5.657v8.485H5.658V5.657z"></path></clipPath></defs>',3)])])}var E_={render:T_},A_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function I_(e,t){return D(),me("svg",A_,[...t[0]||(t[0]=[ne("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),ne("path",{fill:"currentColor",d:"M13.634 8.18a.66.66 0 0 0-.729.094l-.585.591a1.663 1.663 0 0 0-1.653-1.531h-3C6.747 7.334 6 8.08 6 9v2a1.67 1.67 0 0 0 1.667 1.667h3c.876 0 1.589-.683 1.654-1.543l.585.585.036.03a.66.66 0 0 0 .692.063.66.66 0 0 0 .366-.591V8.77a.66.66 0 0 0-.366-.592M10.667 12h-3c-.552 0-1-.449-1-1V9c0-.551.448-1 1-1h3c.551 0 1 .449 1 1v2c0 .551-.449 1-1 1m1.666-1.806v-.396l1-1.01.009 2.413z"},null,-1)])])}var R_={render:I_},k_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function $_(e,t){return D(),me("svg",k_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.076-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.144.223c.192.26.44.468.726.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.75 1.75 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.93 1.93 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.143.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.03-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.292 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.797-.008l.07.043c.244.163.445.384.589.645a1.93 1.93 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.445 1.944a1.7 1.7 0 0 1-.944-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.74 1.74 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zm-2.03-1.943c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222a1.97 1.97 0 0 0 1.569.803c.292 0 .58-.067.844-.196.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1)])])}var wc={render:$_},P_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function D_(e,t){return D(),me("svg",P_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor","fill-rule":"evenodd",stroke:"currentColor","stroke-width":".5",d:"M3.91 5.867a1.7 1.7 0 0 1-.946-.248 1.9 1.9 0 0 1-.606-.594l-.117-.223a1.93 1.93 0 0 1 .07-1.722q.077-.143.18-.264a1.8 1.8 0 0 1 .33-.322q.063-.048.13-.086c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.244.162.446.383.59.645a1.92 1.92 0 0 1 .003 1.847 2 2 0 0 1-.183.27c-.02.026-.029.038-.05.062q-.134.147-.293.264a1.7 1.7 0 0 1-.983.336zM1.88 3.923c-.017.333.048.665.188.965.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.209.63-.525.8-.905a2.14 2.14 0 0 0-.276-2.205L5.2 2.494c-.03-.023-.037-.036-.064-.057a1.94 1.94 0 0 0-1.212-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.942-.248 1.9 1.9 0 0 1-.606-.595L7.657 4.8a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.264a1.8 1.8 0 0 1 .33-.321q.062-.048.13-.086a1.75 1.75 0 0 1 1.798-.008l.076.043c.243.163.445.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.264 1.73 1.73 0 0 1-.984.336zM7.296 3.923c-.017.333.048.665.188.965.027.055.047.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078.35-.208.63-.524.802-.905a2.14 2.14 0 0 0-.278-2.205l-.173-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.944-.248 1.9 1.9 0 0 1-.602-.594l-.117-.223a1.93 1.93 0 0 1 .072-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .326-.323q.062-.048.13-.086c.05-.03.093-.052.144-.079a1.74 1.74 0 0 1 1.654.07l.07.044c.242.163.444.384.587.645a1.92 1.92 0 0 1 0 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.71 3.923c-.017.333.048.665.188.965.027.055.048.104.076.156l.144.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.27-2.206l-.175-.191c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.213-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.187.79zm-8.8 7.281a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.595l-.121-.224a1.93 1.93 0 0 1 .071-1.722q.077-.142.18-.263a1.8 1.8 0 0 1 .464-.407 1.74 1.74 0 0 1 1.798-.008l.07.043c.242.163.444.384.587.645a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27c-.02.026-.029.039-.05.063a2 2 0 0 1-.29.263 1.7 1.7 0 0 1-.984.337zM1.88 9.261c-.017.333.048.664.188.964.027.056.048.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.348-.209.626-.525.795-.904a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.442 1.943a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.142.18-.264a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.75 1.75 0 0 1 1.653.07l.07.043c.243.163.444.385.588.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.33-.983.337zM7.293 9.261c-.017.333.048.664.188.964.027.056.047.105.075.156l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.049.15-.078.352-.207.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.195c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.791zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.596l-.117-.222a1.93 1.93 0 0 1 .071-1.723q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.051.145-.078a1.74 1.74 0 0 1 1.653.07l.07.043c.243.163.444.384.588.646a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.063a2 2 0 0 1-.29.263c-.288.212-.63.329-.983.337zm-2.029-1.943c-.017.332.048.664.188.964.027.055.048.104.075.156l.145.223c.19.26.44.468.725.606a1.92 1.92 0 0 0 1.688 0c.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.196c-.418.2-.754.55-.947.985a2 2 0 0 0-.188.79zM3.91 16.543a1.7 1.7 0 0 1-.942-.246 1.9 1.9 0 0 1-.606-.596l-.121-.223a1.93 1.93 0 0 1 .071-1.723q.077-.141.18-.263a1.8 1.8 0 0 1 .464-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.242.163.444.385.587.646a1.92 1.92 0 0 1-.001 1.847 2 2 0 0 1-.183.27l-.05.063a2 2 0 0 1-.29.26 1.7 1.7 0 0 1-.984.337zm-2.03-1.944c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.191c-.03-.023-.037-.037-.064-.058a1.94 1.94 0 0 0-1.207-.483 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.442 1.944a1.7 1.7 0 0 1-.941-.246 1.9 1.9 0 0 1-.606-.596l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407 1.75 1.75 0 0 1 1.798-.008l.07.043c.243.163.444.384.588.645a1.92 1.92 0 0 1-.001 1.848 2 2 0 0 1-.184.27c-.02.026-.028.038-.05.062a2 2 0 0 1-.29.264c-.288.212-.63.329-.983.337zm-2.029-1.944c-.017.333.048.665.188.964.027.056.047.105.075.157l.145.223a1.97 1.97 0 0 0 1.569.802c.291 0 .58-.067.844-.196.053-.028.1-.05.15-.078.352-.208.633-.524.805-.905a2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.031-.024-.037-.037-.064-.059a1.94 1.94 0 0 0-1.214-.482 1.8 1.8 0 0 0-.908.196c-.419.2-.755.55-.948.985a2 2 0 0 0-.188.79zm7.444 1.944a1.7 1.7 0 0 1-.943-.246 1.9 1.9 0 0 1-.606-.595l-.117-.223a1.93 1.93 0 0 1 .071-1.722q.075-.141.18-.263a1.8 1.8 0 0 1 .463-.407c.05-.03.093-.052.145-.079a1.75 1.75 0 0 1 1.653.07l.07.044c.243.163.444.384.588.645a1.93 1.93 0 0 1-.001 1.847 2 2 0 0 1-.184.27c-.02.026-.028.039-.05.063a2 2 0 0 1-.29.264 1.7 1.7 0 0 1-.983.336zM12.708 14.6c-.017.333.048.665.188.964.027.056.048.105.075.157l.145.222c.19.26.44.468.725.607a1.92 1.92 0 0 0 1.688 0c.053-.029.1-.05.15-.079a2 2 0 0 0 .795-.904 2.14 2.14 0 0 0-.276-2.205l-.175-.19c-.03-.024-.037-.037-.064-.058a1.94 1.94 0 0 0-1.211-.482 1.8 1.8 0 0 0-.909.195c-.418.2-.754.55-.947.986a2 2 0 0 0-.188.79z","clip-rule":"evenodd"},null,-1),ne("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var yc={render:D_},O_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function H_(e,t){return D(),me("svg",O_,[...t[0]||(t[0]=[ne("path",{fill:"currentColor",d:"M9.75 1H4.5c-.678 0-1.314.302-1.743.828L.513 4.578a2.26 2.26 0 0 0 0 2.844l2.243 2.75A2.24 2.24 0 0 0 4.5 11h5.25C10.99 11 12 9.99 12 8.75v-5.5C12 2.01 10.99 1 9.75 1m1.75 7.75c0 .965-.785 1.75-1.75 1.75H4.5a1.74 1.74 0 0 1-1.356-.644L.901 7.106a1.755 1.755 0 0 1 0-2.212l2.243-2.75A1.74 1.74 0 0 1 4.5 1.499h5.25c.965 0 1.75.785 1.75 1.75zM8.927 4.427 7.354 6l1.573 1.573a.25.25 0 0 1-.354.353L7 6.355 5.427 7.926a.25.25 0 0 1-.354 0 .25.25 0 0 1 0-.353L6.646 6 5.073 4.427a.25.25 0 0 1 .354-.353L7 5.646l1.573-1.572a.25.25 0 0 1 .353.353z"},null,-1)])])}var bc={render:H_},M_=["data-call-status"],N_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},q_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},B_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},L_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},F_=["data-visible"],V_={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},j_={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},U_=["data-visible"],z_={key:4,class:"webphone-actions__transfer-state wp:absolute wp:inset-x-0 wp:bottom-full wp:mb-2 wp:flex wp:justify-center wp:gap-2"},K_=ee({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean},onAnswer:{type:Function},onHangup:{type:Function},onReject:{type:Function}},emits:["transfer","completeTransfer","cancelTransfer"],setup(e,{emit:t}){const r=Ot("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a}=Ot("sip"),l=e,u=t,c=j(()=>!!r.transferInProgress),d=j(()=>l.destination||r.keypadValue||r.lastDialedNumber||""),p=j(()=>!!l.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),h=j(()=>p.value||!!r.lastDialedNumber),m=j(()=>!l.isVideo||!p.value?!1:d.value?/^[0-9*#]{1,5}$/.test(d.value):!0),w=async _=>{try{l.destination?await n(l.destination,_):r.keypadValue?await n(r.keypadValue,_):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(T){if(console.error("Error initiating call:",T),_){let P="No se pudo acceder a la cámara.";const g=T instanceof Error?T.name:String(T);g==="NotReadableError"?P="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":g==="NotAllowedError"||g==="PermissionDeniedError"?P="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":g==="NotFoundError"?P="No se detectó ninguna cámara en el sistema.":P+=" "+(T instanceof Error?T.message:String(T)),confirm(`${P}
75
75
 
76
- ¿Desea realizar la llamada solo con AUDIO?`)&&w(!1)}else alert("Error al iniciar la llamada: "+(T instanceof Error?T.message:String(T)))}},x=(_=!1)=>{if(l.onAnswer){l.onAnswer(_);return}i(_)},v=()=>{if(l.onHangup){l.onHangup();return}s()},C=()=>{if(l.onReject){l.onReject();return}s()},y=V(()=>{const _={};return r.channels.forEach(T=>{const P=T.status==="connected"||T.status==="calling"||T.status==="incoming";_[T.id]=P?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),_}),b=V(()=>y.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(_,T)=>(D(),we("div",{class:"webphone-actions wp:flex wp:justify-center wp:items-center wp:gap-2 wp:px-4 wp:relative wp:mb-4","data-call-status":f(r).callStatus},[f(r).callStatus==="idle"?(D(),we("div",N_,[h.value?(D(),j(f(st),{key:0,variant:"default",size:"icon",onClick:T[0]||(T[0]=P=>w(!1)),"aria-label":"Audio Call",class:"webphone-actions__button webphone-actions__button--call wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-[color:var(--p-primary-color)]/80 wp:to-[color:var(--p-primary-color)]/100 wp:hover:from-[color:var(--p-primary-color)]/75 wp:hover:to-[color:var(--p-primary-color)]"},{default:R(()=>[q(f(E_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),T[13]||(T[13]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):ke("",!0),m.value?(D(),j(f(st),{key:1,variant:"outline",size:"icon",onClick:T[1]||(T[1]=P=>w(!0)),"aria-label":"Video Call",class:"webphone-actions__button webphone-actions__button--video wp:w-full wp:px-4 wp:bg-transparent wp:border wp:border-primary wp:hover:bg-[var(--p-primary-color)]/8"},{default:R(()=>[q(f(R_),{class:Ze(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",b.value])},null,8,["class"]),T[14]||(T[14]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-primary wp:text-xs wp:dark:text-white"}," Video llamada a extensiones ",-1))]),_:1})):ke("",!0)])):ke("",!0),f(r).callStatus==="incoming"?(D(),we(Be,{key:1},[f(r).activeChannel?.hasVideo?(D(),j(f(st),{key:0,variant:"default",size:"icon",onClick:T[2]||(T[2]=P=>x(!0)),class:"webphone-actions__button webphone-actions__button--answer-video wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-transparent wp:hover:bg-[var(--p-primary-color)]/10","aria-label":"Answer Video"},{default:R(()=>[q(f(m_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):ke("",!0),q(f(st),{variant:"default",size:"icon",onClick:T[3]||(T[3]=P=>x(!1)),class:"webphone-actions__button webphone-actions__button--answer wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-status-available wp:hover:bg-status-available/90","aria-label":"Answer"},{default:R(()=>[q(f(qh),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),q(f(st),{variant:"destructive",size:"icon",onClick:C,"aria-label":"Reject",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--reject wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:R(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):ke("",!0),f(r).callStatus==="connected"?(D(),we("div",q_,[ne("div",B_,[q(f(st),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:"webphone-actions__button webphone-actions__button--mute wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:R(()=>[f(r).isMuted?(D(),j(f(a_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(D(),j(f(l_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),q(f(st),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:"webphone-actions__button webphone-actions__button--hold wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:R(()=>[f(r).isHeld?(D(),j(f(h_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(D(),j(f(c_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),c.value?ke("",!0):(D(),j(f(st),{key:0,variant:"secondary",size:"icon",onClick:T[4]||(T[4]=P=>u("transfer")),"aria-label":"Transfer",class:"webphone-actions__button webphone-actions__button--transfer wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:R(()=>[q(f(C_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),ne("div",L_,[q(f(st),{variant:"ghost",size:"icon",onClick:T[5]||(T[5]=P=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:R(()=>[f(r).isKeypadVisible?(D(),j(f(yc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(D(),j(f(wc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),q(f(Ci),{modelValue:f(r).keypadValue,"onUpdate:modelValue":T[6]||(T[6]=P=>f(r).keypadValue=P),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:T[7]||(T[7]=sr(P=>f(r).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),ne("div",{class:Ze(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[q(hc)],10,F_),q(f(st),{size:"icon",onClick:v,"aria-label":"Hangup",class:"webphone-actions__button webphone-actions__button--hangup wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:R(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),T[15]||(T[15]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):ke("",!0),f(r).callStatus==="calling"?(D(),we("div",V_,[ne("div",j_,[q(f(st),{variant:"ghost",size:"icon",onClick:T[8]||(T[8]=P=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:R(()=>[f(r).isKeypadVisible?(D(),j(f(yc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(D(),j(f(wc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),q(f(Ci),{modelValue:f(r).keypadValue,"onUpdate:modelValue":T[9]||(T[9]=P=>f(r).keypadValue=P),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:T[10]||(T[10]=sr(P=>f(r).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),ne("div",{class:Ze(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[q(hc)],10,U_),q(f(st),{variant:"destructive",size:"lg",onClick:v,"aria-label":"Cancel",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--cancel wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:R(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),T[16]||(T[16]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):ke("",!0),c.value&&f(r).callStatus==="connected"?(D(),we("div",z_,[q(f(st),{variant:"default",size:"sm",onClick:T[11]||(T[11]=P=>u("completeTransfer")),class:"webphone-actions__button webphone-actions__button--complete-transfer wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:R(()=>[q(f(Mh),{class:"wp:w-4 wp:h-4"}),T[17]||(T[17]=Me(" Completar Transferencia ",-1))]),_:1}),q(f(st),{variant:"destructive",size:"sm",onClick:T[12]||(T[12]=P=>u("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:R(()=>[q(f(vc),{class:"wp:w-4 wp:h-4"}),T[18]||(T[18]=Me(" Cancelar ",-1))]),_:1})])):ke("",!0)],8,M_))}}),W_=K_,G_=te({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),we("kbd",{class:Ze(f(nt)("wp:bg-muted wp:text-muted-foreground wp:pointer-events-none wp:inline-flex wp:h-5 wp:w-fit wp:min-w-5 wp:items-center wp:justify-center wp:gap-1 wp:rounded-sm wp:px-1 wp:font-sans wp:text-xs wp:font-medium wp:select-none","wp:[&_svg:not([class*='size-'])]:size-3","wp:[[data-slot=tooltip-content]_&]:bg-background/20 wp:[[data-slot=tooltip-content]_&]:text-background wp:dark:[[data-slot=tooltip-content]_&]:bg-background/10",t.class))},[oe(r.$slots,"default")],2))}}),nn=G_,J_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function Y_(e,t){return D(),we("svg",J_,[...t[0]||(t[0]=[ne("path",{stroke:"currentColor","stroke-miterlimit":"22.926","stroke-width":"1.2",d:"m12.317 2.51 15.123-.027c2.609 1.773 1.65 19.836 0 18.746l-15.124.026zM1.593 2.484h1.45V21.29h-1.45c-1.79-2.697-1.79-17.855 0-18.806ZM6.244.25h3.078a1.573 1.573 0 0 1 1.574 1.566v18.902a1.58 1.58 0 0 1-1.574 1.574H6.244a1.58 1.58 0 0 1-1.574-1.576v-18.9A1.573 1.573 0 0 1 6.244.25Z","clip-rule":"evenodd"},null,-1)])])}var _c={render:Y_},Z_=te({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),j(f(W2),ge({"data-slot":"tooltip"},f(r)),{default:R(i=>[oe(n.$slots,"default",ur(tr(i)))]),_:3},16))}}),Zo=Z_,X_=te({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Vt(r,"class"),n);return(i,o)=>(D(),j(f(Y2),null,{default:R(()=>[q(f(J2),ge({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(nt)("wp:bg-foreground wp:text-background wp:animate-in wp:fade-in-0 wp:zoom-in-95 wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=closed]:zoom-out-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:z-50 wp:w-fit wp:rounded-md wp:px-3 wp:py-1.5 wp:text-xs wp:text-balance",r.class)}),{default:R(()=>[oe(i.$slots,"default"),q(f(j2),{class:"wp:bg-foreground wp:fill-foreground wp:z-50 wp:size-2.5 wp:translate-y-[calc(-50%_-_2px)] wp:rotate-45 wp:rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Xo=X_,Q_=te({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(r,n)=>(D(),j(f(z2),ur(tr(t)),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),Qo=Q_,eS=te({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),j(f(Z2),ge({"data-slot":"tooltip-trigger"},t),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),ea=eS,tS=["data-call-status"],rS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},nS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},sS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},iS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},oS={class:"webphone-display__dialer-field wp:relative"},aS={class:"webphone-display__suggestions wp:absolute wp:bottom-full wp:left-0 wp:w-full wp:z-50 wp:bg-popover wp:text-popover-foreground wp:shadow-md wp:rounded-md wp:border wp:mb-1 wp:max-h-40 wp:overflow-y-auto"},lS=["onPointerdown"],cS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},uS={class:"webphone-display__contact-name wp:truncate"},dS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},fS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},pS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},hS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},gS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},vS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},mS={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},wS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},yS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},bS={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},_S=te({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},isOnline:{type:Boolean,default:!0},user:{},contacts:{default:()=>[]},channelId:{default:void 0}},setup(e){const t=Dt("webphone"),r=Dt("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=V(()=>s.channelId!==void 0?t.channels.find(M=>M.id===s.channelId):t.activeChannel),o=V(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const M=i.value;return M&&M.status!=="idle"?M.isHeld||M.status==="held"?"wp:text-status-hold":M.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null);Ay(l,()=>{a.value=!1});const c=V({get:()=>i.value?.keypadValue||"",set:M=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:M})}}),d=V(()=>/^[+]?[0-9*#]+$/.test(c.value)),p=V(()=>{if(!c.value)return s.contacts.slice(0,10);const M=c.value.toLowerCase(),N=[];for(const S of s.contacts)if((S.name.toLowerCase().includes(M)||S.number.includes(M))&&(N.push(S),N.length>=10))break;return N}),h=M=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:M.number}),a.value=!1},m=()=>{!c.value||!d.value||(a.value=!1,r.makeCall(c.value))};Ie(c,()=>{a.value=!0});const w=()=>{c.value&&d.value&&m()},x=()=>{a.value=!1},v=()=>{a.value=!0},C=()=>{setTimeout(()=>{a.value=!1},150)},y=F(Date.now());xy(()=>{y.value=Date.now()},1e3);const b=V(()=>{const M=i.value?.startTime,N=i.value?.status||"idle";if(!M||N!=="connected")return"00:00:00";const S=Math.floor((y.value-M)/1e3);return S<0?"00:00:00":`${Math.floor(S/3600).toString().padStart(2,"0")}:${Math.floor(S%3600/60).toString().padStart(2,"0")}:${(S%60).toString().padStart(2,"0")}`}),_=V(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const M=i.value,N=M?.status||"idle";return N==="idle"?"Disponible":N==="calling"?"Llamando...":M?.isHeld?`En espera - ${M.remoteNumber||M.keypadValue||"Unknown"}`:N==="connected"?"Conectado":N.charAt(0).toUpperCase()+N.slice(1)}),T=M=>{if(!M)return"";const N=M.trim(),S=N.startsWith("+"),E=N.replace(/[^\d]/g,"");return S?`+${E}`:E},P=V(()=>{const M=i.value,N=M?.remoteNumber||M?.keypadValue,S=M?.remoteDisplayName;if(!N)return"Unknown";const E=T(N),A=s.contacts?.find(Z=>T(Z.number)===E);return A?A.name:S||N}),g=V(()=>{const M=i.value;return M?.remoteNumber||M?.keypadValue||""});return(M,N)=>(D(),we("div",{class:"webphone-display wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-6","data-call-status":i.value?.status||"idle"},[(i.value?.status||"idle")==="connected"?(D(),we("div",{key:0,class:Ze([o.value,"webphone-display__connected-status wp:w-full wp:flex wp:items-center wp:justify-between wp:gap-2 wp:text-3xl wp:font-light wp:mb-5"])},[ne("div",rS,[q(f(_c),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),N[3]||(N[3]=ne("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),ne("span",nS,Oe(b.value),1)],2)):ke("",!0),s.user?(D(),we("span",{key:1,class:Ze([o.value,"webphone-display__user wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-1 wp:transition-colors wp:duration-300"])},[ne("div",sS,[q(f(_c),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),Me(" "+Oe(s.user),1)]),ne("div",{class:Ze(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Oe(_.value),3)],2)):ke("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(D(),we("div",iS,[ne("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[ne("div",oS,[q(f(Qo),null,{default:R(()=>[q(f(Zo),null,{default:R(()=>[q(f(ea),{"as-child":""},{default:R(()=>[q(f(st),{onClick:N[0]||(N[0]=S=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:Ze(f(nt)("webphone-display__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"))},{default:R(()=>[f(t).isKeypadVisible?(D(),j(f(yc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(D(),j(f(wc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[ne("span",null,Oe(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),q(f(Ci),{ref_key:"inputRef",ref:u,modelValue:c.value,"onUpdate:modelValue":N[1]||(N[1]=S=>c.value=S),onFocus:v,onBlur:C,onKeydown:[ul(w,["enter"]),ul(x,["escape"])],placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-display__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-display__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:N[2]||(N[2]=sr(S=>f(t).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-display__backspace-icon wp:w-[15px] wp:h-[15px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-100 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),zi(ne("div",aS,[d.value?(D(),we("div",{key:0,class:"webphone-display__suggestion webphone-display__suggestion--raw wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:sr(m,["prevent"])},[q(f(qh),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),ne("span",null,"Marcar "+Oe(c.value),1)],32)):ke("",!0),(D(!0),we(Be,null,er(p.value,S=>(D(),we("div",{key:S.number,class:"webphone-display__suggestion webphone-display__suggestion--contact wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:sr(E=>h(S),["prevent"])},[ne("div",{class:Ze(f(nt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",S.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":S.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":S.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":S.type==="tool"?"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400":"wp:bg-neutral-100 wp:text-neutral-600 wp:dark:bg-neutral-800 wp:dark:text-neutral-400"))},[S.type==="extension"?(D(),j(f(Hh),{key:0,class:"wp:w-3 wp:h-3"})):S.type==="contact"?(D(),j(f(gc),{key:1,class:"wp:w-3 wp:h-3"})):S.type==="voicemail"?(D(),j(f(Bh),{key:2,class:"wp:w-3 wp:h-3"})):S.type==="tool"?(D(),j(f(Lh),{key:3,class:"wp:w-3 wp:h-3"})):(D(),j(f(gc),{key:4,class:"wp:w-3 wp:h-3"}))],2),ne("div",cS,[ne("span",uS,Oe(S.name),1),ne("span",dS,Oe(S.number),1)])],40,lS))),128))],512),[[po,a.value&&c.value&&(p.value.length>0||d.value)]])],512)])):(i.value?.status||"idle")==="connected"?(D(),we("div",fS,[ne("div",pS,[ne("div",hS," En llamada con "+Oe(P.value),1),P.value!==g.value?(D(),we("div",gS,Oe(g.value),1)):ke("",!0)])])):(i.value?.status||"idle")!=="idle"?(D(),we("div",vS,[ne("div",mS,[ne("div",wS,[ne("div",yS,Oe(P.value),1),P.value!==g.value?(D(),we("div",bS,Oe(g.value),1)):ke("",!0)]),q(f(Qo),null,{default:R(()=>[q(f(Zo),null,{default:R(()=>[q(f(ea),{"as-child":""}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[ne("span",null,Oe(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):ke("",!0)],8,tS))}}),SS=_S,CS=te({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),j(f(ib),ge({"data-slot":"dialog"},f(r)),{default:R(i=>[oe(n.$slots,"default",ur(tr(i)))]),_:3},16))}}),Sc=CS,xS=te({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Vt(t,"class");return(n,s)=>(D(),j(f(xb),ge({"data-slot":"dialog-overlay"},f(r),{class:f(nt)("wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:fixed wp:inset-0 wp:z-50 wp:bg-black/80",t.class)}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["class"]))}}),TS=xS,ES=te({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Vt(r,"class"),n);return(i,o)=>(D(),j(f(Tb),null,{default:R(()=>[q(TS),q(f(Sb),ge({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(nt)("wp:bg-background wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:fixed wp:top-[50%] wp:left-[50%] wp:z-50 wp:grid wp:w-full wp:max-w-[calc(100%-2rem)] wp:translate-x-[-50%] wp:translate-y-[-50%] wp:gap-4 wp:rounded-lg wp:border wp:p-6 wp:shadow-lg wp:duration-200 wp:sm:max-w-lg",r.class)}),{default:R(()=>[oe(i.$slots,"default"),e.showCloseButton?(D(),j(f(ob),{key:0,"data-slot":"dialog-close",class:"wp:ring-offset-background wp:focus:ring-ring wp:data-[state=open]:bg-accent wp:data-[state=open]:text-muted-foreground wp:absolute wp:top-4 wp:right-4 wp:rounded-xs wp:opacity-70 wp:transition-opacity wp:hover:opacity-100 wp:focus:ring-2 wp:focus:ring-offset-2 wp:focus:outline-hidden wp:disabled:pointer-events-none wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4"},{default:R(()=>[q(f(vc)),o[0]||(o[0]=ne("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):ke("",!0)]),_:3},16,["class"])]),_:3}))}}),Cc=ES,AS=te({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),we("div",{"data-slot":"dialog-footer",class:Ze(f(nt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[oe(r.$slots,"default")],2))}}),Fh=AS,IS=te({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),we("div",{"data-slot":"dialog-header",class:Ze(f(nt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[oe(r.$slots,"default")],2))}}),xc=IS,RS=te({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Vt(t,"class"));return(n,s)=>(D(),j(f(Eb),ge({"data-slot":"dialog-title"},f(r),{class:f(nt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["class"]))}}),Tc=RS,kS=te({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),j(f(w2),ge({"data-slot":"select"},f(r)),{default:R(i=>[oe(n.$slots,"default",ur(tr(i)))]),_:3},16))}}),Vh=kS,$S=te({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Vt(r,"class"),n);return(i,o)=>(D(),j(f(H2),null,{default:R(()=>[q(f(A2),ge({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(nt)("wp:bg-popover wp:text-popover-foreground wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:relative wp:z-50 wp:max-h-(--reka-select-content-available-height) wp:min-w-[8rem] wp:overflow-x-hidden wp:overflow-y-auto wp:rounded-md wp:border wp:shadow-md",e.position==="popper"&&"wp:data-[side=bottom]:translate-y-1 wp:data-[side=left]:-translate-x-1 wp:data-[side=right]:translate-x-1 wp:data-[side=top]:-translate-y-1",r.class)}),{default:R(()=>[q(f(qS)),q(f(L2),{class:Ze(f(nt)("wp:p-1",e.position==="popper"&&"wp:h-[var(--reka-select-trigger-height)] wp:w-full wp:min-w-[var(--reka-select-trigger-width)] wp:scroll-my-1"))},{default:R(()=>[oe(i.$slots,"default")]),_:3},8,["class"]),q(f(MS))]),_:3},16,["class"])]),_:3}))}}),jh=$S,PS=te({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),j(f(R2),ge({"data-slot":"select-group"},t),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),Uh=PS,DS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},OS=te({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Vt(t,"class"));return(n,s)=>(D(),j(f(P2),ge({"data-slot":"select-item"},f(r),{class:f(nt)("wp:focus:bg-accent wp:focus:text-accent-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:relative wp:flex wp:w-full wp:cursor-default wp:items-center wp:gap-2 wp:rounded-sm wp:py-1.5 wp:pr-8 wp:pl-2 wp:text-sm wp:outline-hidden wp:select-none wp:data-[disabled]:pointer-events-none wp:data-[disabled]:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4 wp:*:[span]:last:flex wp:*:[span]:last:items-center wp:*:[span]:last:gap-2",t.class)}),{default:R(()=>[ne("span",DS,[q(f(D2),null,{default:R(()=>[oe(n.$slots,"indicator-icon",{},()=>[q(f(Mh),{class:"wp:size-4"})])]),_:3})]),q(f(O2),null,{default:R(()=>[oe(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),zh=OS,HS=te({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Vt(t,"class"));return(n,s)=>(D(),j(f(M2),ge({"data-slot":"select-scroll-down-button"},f(r),{class:f(nt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[oe(n.$slots,"default",{},()=>[q(f(Nh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),MS=HS,NS=te({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Vt(t,"class"));return(n,s)=>(D(),j(f(N2),ge({"data-slot":"select-scroll-up-button"},f(r),{class:f(nt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:R(()=>[oe(n.$slots,"default",{},()=>[q(f(o_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),qS=NS,BS=te({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(e){const t=e,r=Zr(Vt(t,"class","size"));return(n,s)=>(D(),j(f(q2),ge({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(nt)("wp:border-input wp:data-[placeholder]:text-muted-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:dark:bg-input/30 wp:dark:hover:bg-input/50 wp:flex wp:w-fit wp:items-center wp:justify-between wp:gap-2 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-2 wp:text-sm wp:whitespace-nowrap wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:data-[size=default]:h-9 wp:data-[size=sm]:h-8 wp:*:data-[slot=select-value]:line-clamp-1 wp:*:data-[slot=select-value]:flex wp:*:data-[slot=select-value]:items-center wp:*:data-[slot=select-value]:gap-2 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4",t.class)}),{default:R(()=>[oe(n.$slots,"default"),q(f(k2),{"as-child":""},{default:R(()=>[q(f(Nh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Kh=BS,LS=te({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),j(f(B2),ge({"data-slot":"select-value"},t),{default:R(()=>[oe(r.$slots,"default")]),_:3},16))}}),Wh=LS,FS=te({__name:"Slider",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},thumbAlignment:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Vt(r,"class"),n);return(i,o)=>(D(),j(f(K1),ge({"data-slot":"slider",class:f(nt)("wp:relative wp:flex wp:w-full wp:touch-none wp:items-center wp:select-none wp:data-[disabled]:opacity-50 wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:min-h-44 wp:data-[orientation=vertical]:w-auto wp:data-[orientation=vertical]:flex-col",r.class)},f(s)),{default:R(({modelValue:a})=>[q(f(Y1),{"data-slot":"slider-track",class:"wp:bg-muted wp:relative wp:grow wp:overflow-hidden wp:rounded-full wp:data-[orientation=horizontal]:h-1.5 wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-1.5"},{default:R(()=>[q(f(W1),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(D(!0),we(Be,null,er(a,(l,u)=>(D(),j(f(J1),{key:u,"data-slot":"slider-thumb",class:"wp:bg-white wp:border-primary wp:ring-ring/50 wp:block wp:size-4 wp:shrink-0 wp:rounded-full wp:border wp:shadow-sm wp:transition-[color,box-shadow] wp:hover:ring-4 wp:focus-visible:ring-4 wp:focus-visible:outline-hidden wp:disabled:pointer-events-none wp:disabled:opacity-50"}))),128))]),_:1},16,["class"]))}}),Gh=FS,VS=te({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Vt(t,"class");return(n,s)=>(D(),j(f(Z1),ge({"data-slot":"label"},f(r),{class:f(nt)("wp:flex wp:items-center wp:gap-2 wp:text-sm wp:leading-none wp:font-medium wp:select-none wp:group-data-[disabled=true]:pointer-events-none wp:group-data-[disabled=true]:opacity-50 wp:peer-disabled:cursor-not-allowed wp:peer-disabled:opacity-50",t.class)}),{default:R(()=>[oe(n.$slots,"default")]),_:3},16,["class"]))}}),Rs=VS,jS=te({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Vt(t,"class");return(n,s)=>(D(),j(f(V2),ge({"data-slot":"separator"},f(r),{class:f(nt)("wp:bg-border wp:shrink-0 wp:data-[orientation=horizontal]:h-px wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),US=jS,zS={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},KS={class:"wp:flex wp:flex-col wp:gap-2"},WS={class:"wp:flex wp:flex-col wp:gap-2"},GS={class:"wp:flex wp:flex-col wp:gap-4"},JS={class:"wp:flex wp:justify-between"},YS={class:"wp:text-sm wp:text-muted-foreground"},ZS={class:"wp:flex wp:flex-col wp:gap-4"},XS={class:"wp:flex wp:justify-between"},QS={class:"wp:text-sm wp:text-muted-foreground"},eC={class:"wp:flex wp:flex-col wp:gap-3"},tC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},rC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},nC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},sC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},iC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},oC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},aC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},lC=te({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",{setVolume:s,setOutputDevice:i,setInputDevice:o,setNotificationVolume:a}=Dt("sip"),l=F([]),u=F([]),c=Po("webphone-input-device",""),d=Po("webphone-output-device",""),p=Po("webphone-volume",100),h=Po("webphone-notification-volume",100),m=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();l.value=b.filter(P=>P.kind==="audioinput").map((P,g)=>({deviceId:P.deviceId,label:P.label||`Microphone ${g+1}`})),u.value=b.filter(P=>P.kind==="audiooutput").map((P,g)=>({deviceId:P.deviceId,label:P.label||`Speaker ${g+1}`}));const _=l.value.some(P=>P.deviceId===c.value);(!c.value||!_)&&l.value.length>0&&(c.value=l.value[0]?.deviceId??"");const T=u.value.some(P=>P.deviceId===d.value);(!d.value||!T)&&u.value.length>0&&(d.value=u.value[0]?.deviceId??""),c.value&&o(c.value),d.value&&i(d.value)}catch(b){console.error("Error loading devices",b)}},w=b=>{const _=String(b);c.value=_,o(_)},x=b=>{const _=String(b);d.value=_,i(_)},v=(b,_=35)=>b.length<=_?b:b.substring(0,_)+"...",C=V({get:()=>[p.value],set:b=>{p.value=b[0],s(p.value)}}),y=V({get:()=>[h.value],set:b=>{h.value=b[0],a(h.value)}});return Ke(()=>{m(),s(p.value),a(h.value)}),(b,_)=>e.visible?(D(),j(f(Sc),{key:0,open:e.visible,"onUpdate:open":_[5]||(_[5]=T=>r("update:visible",T))},{default:R(()=>[q(f(Cc),{class:"wp:sm:max-w-sm"},{default:R(()=>[q(f(xc),null,{default:R(()=>[q(f(Tc),null,{default:R(()=>[..._[6]||(_[6]=[Me("Audio Settings",-1)])]),_:1})]),_:1}),ne("div",zS,[ne("div",KS,[q(f(Rs),null,{default:R(()=>[..._[7]||(_[7]=[Me("Microphone",-1)])]),_:1}),q(f(Vh),{modelValue:f(c),"onUpdate:modelValue":[_[0]||(_[0]=T=>We(c)?c.value=T:null),w]},{default:R(()=>[q(f(Kh),{class:"wp:w-full"},{default:R(()=>[q(f(Wh),{placeholder:"Select Microphone"})]),_:1}),q(f(jh),null,{default:R(()=>[q(f(Uh),null,{default:R(()=>[(D(!0),we(Be,null,er(l.value,T=>(D(),j(f(zh),{key:T.deviceId,value:T.deviceId,title:T.label},{default:R(()=>[Me(Oe(v(T.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",WS,[q(f(Rs),null,{default:R(()=>[..._[8]||(_[8]=[Me("Speaker",-1)])]),_:1}),q(f(Vh),{modelValue:f(d),"onUpdate:modelValue":[_[1]||(_[1]=T=>We(d)?d.value=T:null),x]},{default:R(()=>[q(f(Kh),{class:"wp:w-full"},{default:R(()=>[q(f(Wh),{placeholder:"Select Speaker"})]),_:1}),q(f(jh),null,{default:R(()=>[q(f(Uh),null,{default:R(()=>[(D(!0),we(Be,null,er(u.value,T=>(D(),j(f(zh),{key:T.deviceId,value:T.deviceId,title:T.label},{default:R(()=>[Me(Oe(v(T.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",GS,[ne("div",JS,[q(f(Rs),null,{default:R(()=>[..._[9]||(_[9]=[Me("Media Volume",-1)])]),_:1}),ne("span",YS,Oe(f(p))+"%",1)]),q(f(Gh),{modelValue:C.value,"onUpdate:modelValue":_[2]||(_[2]=T=>C.value=T),max:100,step:1},null,8,["modelValue"])]),ne("div",ZS,[ne("div",XS,[q(f(Rs),null,{default:R(()=>[..._[10]||(_[10]=[Me("Notification Volume",-1)])]),_:1}),ne("span",QS,Oe(f(h))+"%",1)]),q(f(Gh),{modelValue:y.value,"onUpdate:modelValue":_[3]||(_[3]=T=>y.value=T),max:100,step:1},null,8,["modelValue"])]),q(f(US)),ne("div",eC,[q(f(Rs),{class:"wp:text-base"},{default:R(()=>[..._[11]||(_[11]=[Me("Atajos de teclado",-1)])]),_:1}),ne("div",tC,[ne("div",rC,[_[12]||(_[12]=ne("span",{class:"wp:text-muted-foreground"},"Historial",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"H",1)]),_:1})]),ne("div",nC,[_[13]||(_[13]=ne("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+",",1)]),_:1})]),ne("div",sC,[_[14]||(_[14]=ne("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"K",1)]),_:1})]),ne("div",iC,[_[15]||(_[15]=ne("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"1",1)]),_:1})]),ne("div",oC,[_[16]||(_[16]=ne("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"2",1)]),_:1})]),ne("div",aC,[_[17]||(_[17]=ne("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(n))+"3",1)]),_:1})])])])]),q(f(Fh),null,{default:R(()=>[q(f(st),{variant:"secondary",onClick:_[4]||(_[4]=T=>r("update:visible",!1))},{default:R(()=>[..._[18]||(_[18]=[Me("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):ke("",!0)}}),cC=lC,uC=te({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Vt(t,"class");return(n,s)=>(D(),j(f(u2),ge({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(nt)("wp:flex wp:touch-none wp:p-px wp:transition-colors wp:select-none",e.orientation==="vertical"&&"wp:h-full wp:w-2.5 wp:border-l wp:border-l-transparent",e.orientation==="horizontal"&&"wp:h-2.5 wp:flex-col wp:border-t wp:border-t-transparent",t.class)}),{default:R(()=>[q(f(f2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),dC=uC,fC=te({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Vt(t,"class");return(n,s)=>(D(),j(f(Q1),ge({"data-slot":"scroll-area"},f(r),{class:f(nt)("wp:relative",t.class)}),{default:R(()=>[q(f(p2),{"data-slot":"scroll-area-viewport",class:"wp:focus-visible:ring-ring/50 wp:size-full wp:rounded-[inherit] wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:focus-visible:outline-1"},{default:R(()=>[oe(n.$slots,"default")]),_:3}),q(dC),q(f(t2))]),_:3},16,["class"]))}}),Jh=fC,pC={class:"wp:relative wp:my-2"},hC={class:"wp:flex wp:flex-col wp:gap-2"},gC=["onClick"],vC={class:"wp:flex wp:items-center wp:gap-3"},mC={class:"wp:flex wp:flex-col"},wC={class:"wp:text-sm wp:font-medium"},yC={class:"wp:text-[10px] wp:text-muted-foreground"},bC={class:"wp:flex wp:flex-col wp:items-end"},_C={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},SC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},CC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},xC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},TC=te({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Dt("webphone"),i=F(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(m=>m.number===p);return h?h.name:p},a=V(()=>{if(!i.value)return s.callHistory;const p=i.value.toLowerCase();return s.callHistory.filter(h=>{const m=o(h.number).toLowerCase(),w=h.number.toLowerCase();return m.includes(p)||w.includes(p)})}),l=p=>p===0?"":`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,u=p=>p.direction==="incoming"?p.status==="missed"?d_:u_:f_,c=p=>p.status==="missed"?"wp:text-red-500":p.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",d=p=>{n("update:visible",!1),n("call",p)};return(p,h)=>e.visible?(D(),j(f(Sc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=m=>n("update:visible",m))},{default:R(()=>[q(f(Cc),{class:"wp:sm:max-w-sm"},{default:R(()=>[q(f(xc),null,{default:R(()=>[q(f(Tc),null,{default:R(()=>[...h[2]||(h[2]=[Me("Call History",-1)])]),_:1})]),_:1}),ne("div",pC,[q(f(g_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),q(f(Ci),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=m=>i.value=m),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),q(f(Jh),{class:"wp:h-[60vh] wp:pr-4"},{default:R(()=>[ne("div",hC,[(D(!0),we(Be,null,er(a.value,m=>(D(),we("div",{key:m.id,class:"wp:flex wp:items-center wp:justify-between wp:p-2 wp:rounded-lg wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:w=>d(m.number)},[ne("div",vC,[(D(),j(Zs(u(m)),{class:Ze([c(m),"wp:w-4 wp:h-4"])},null,8,["class"])),ne("div",mC,[ne("span",wC,Oe(o(m.number)),1),ne("span",yC,Oe(new Date(m.startTime).toLocaleString()),1)])]),ne("div",bC,[m.duration>0?(D(),we("span",_C,Oe(l(m.duration)),1)):ke("",!0),ne("span",SC,Oe(m.status),1)])],8,gC))),128)),f(s).callHistory.length===0?(D(),we("div",CC," No call history ")):a.value.length===0?(D(),we("div",xC," No results found ")):ke("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):ke("",!0)}}),EC=TC,AC={class:"wp:grid wp:gap-4 wp:py-4"},IC={class:"wp:grid wp:gap-2 wp:relative"},RC={class:"wp:relative"},kC={key:0,class:"wp:absolute wp:top-full wp:left-0 wp:right-0 wp:mt-1 wp:bg-popover wp:border wp:rounded-md wp:shadow-lg wp:z-50 wp:max-h-60 wp:overflow-auto"},$C={class:"wp:p-1"},PC=["onClick"],DC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},OC={class:"wp:font-medium wp:text-sm wp:truncate"},HC={class:"wp:text-xs wp:text-muted-foreground"},MC=te({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);Ie(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Ie(s,p=>{i.value=p.length>0&&a.value.length>0});const a=V(()=>{if(!s.value)return r.contacts;const p=s.value.toLowerCase();return r.contacts.filter(h=>h.name.toLowerCase().includes(p)||h.number.includes(p))}),l=p=>{s.value=p.number,i.value=!1},u=()=>{s.value="",i.value=!1,o.value?.focus()},c=p=>{const h=s.value.trim();h&&(n("transfer",h,p),n("update:visible",!1),s.value="",i.value=!1)},d=p=>{p.key==="Enter"&&s.value.trim()?(p.preventDefault(),c("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(D(),j(f(Sc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:R(()=>[q(f(Cc),{class:"wp:sm:max-w-md"},{default:R(()=>[q(f(xc),null,{default:R(()=>[q(f(Tc),null,{default:R(()=>[...h[6]||(h[6]=[Me("Transferir Llamada",-1)])]),_:1})]),_:1}),ne("div",AC,[ne("div",IC,[q(f(Rs),{for:"transfer-input"},{default:R(()=>[...h[7]||(h[7]=[Me("Número o Contacto",-1)])]),_:1}),ne("div",RC,[q(f(Ci),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value=m),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:d,onFocus:h[1]||(h[1]=m=>i.value=s.value.length>0&&a.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?(D(),j(f(st),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:u},{default:R(()=>[q(f(vc),{class:"wp:h-4 wp:w-4"})]),_:1})):ke("",!0)]),i.value&&a.value.length>0?(D(),we("div",kC,[q(f(Jh),{class:"wp:max-h-60"},{default:R(()=>[ne("div",$C,[(D(!0),we(Be,null,er(a.value,m=>(D(),we("div",{key:m.number,class:"wp:flex wp:items-center wp:gap-2 wp:p-2 wp:rounded-sm wp:cursor-pointer wp:hover:bg-accent wp:transition-colors",onClick:w=>l(m)},[m.type?(D(),we("div",{key:0,class:Ze(f(nt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",m.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":m.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":m.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400"))},[m.type==="extension"?(D(),j(f(Hh),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(D(),j(f(gc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(D(),j(f(Bh),{key:2,class:"wp:w-4 wp:h-4"})):(D(),j(f(Lh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):ke("",!0),ne("div",DC,[ne("span",OC,Oe(m.name),1),ne("span",HC,Oe(m.number),1)])],8,PC))),128))])]),_:1})])):ke("",!0),h[8]||(h[8]=ne("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),q(f(Fh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:R(()=>[q(f(st),{variant:"secondary",onClick:h[2]||(h[2]=m=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:R(()=>[...h[9]||(h[9]=[Me(" Cancelar ",-1)])]),_:1}),q(f(st),{onClick:h[3]||(h[3]=m=>c("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[10]||(h[10]=[Me(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),q(f(st),{onClick:h[4]||(h[4]=m=>c("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:R(()=>[...h[11]||(h[11]=[Me(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):ke("",!0)}}),NC=MC,qC=te({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=F(!1),o=F(!1),a=F(!1),l=F(null),u=F(0),c=F(null);let d=null,p=null;Ke(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",x)}),Ot(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),C(),z()});const h=()=>{const Y=n.callStatus!=="idle",le=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&Y&&i.value&&le&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&ee()},120))},w=()=>{m()},x=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},C=()=>{c.value&&(clearInterval(c.value),c.value=null)},y=Y=>{const le=Math.floor(Y/60),K=Y%60;return`${le.toString().padStart(2,"0")}:${K.toString().padStart(2,"0")}`};Ie(()=>n.callStatus,(Y,le)=>{Y==="connected"&&le!=="connected"?v():Y==="idle"&&le!=="idle"&&(C(),o.value&&z())},{immediate:!0}),Ie(()=>n.isConnected,Y=>{!Y&&o.value&&(C(),z())}),Ie(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(S(l.value.document),M(l.value.document))});const b=V(()=>i.value&&n.isConnected),_={phone:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',phoneOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" transform="rotate(135 12 12)"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',mic:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',micOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" x2="22" y1="2" y2="22"/><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"/><path d="M5 10v2a7 7 0 0 0 12 5"/><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"/><path d="M9 9v3a3 3 0 0 0 5.12 2.12"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',transfer:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>'},T=Y=>{const le=Y.createElement("style");le.textContent=`
76
+ ¿Desea realizar la llamada solo con AUDIO?`)&&w(!1)}else alert("Error al iniciar la llamada: "+(T instanceof Error?T.message:String(T)))}},x=(_=!1)=>{if(l.onAnswer){l.onAnswer(_);return}i(_)},v=()=>{if(l.onHangup){l.onHangup();return}s()},C=()=>{if(l.onReject){l.onReject();return}s()},y=j(()=>{const _={};return r.channels.forEach(T=>{const P=T.status==="connected"||T.status==="calling"||T.status==="incoming";_[T.id]=P?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),_}),b=j(()=>y.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(_,T)=>(D(),me("div",{class:"webphone-actions wp:flex wp:justify-center wp:items-center wp:gap-2 wp:px-4 wp:relative wp:mb-4","data-call-status":f(r).callStatus},[f(r).callStatus==="idle"?(D(),me("div",N_,[h.value?(D(),U(f(nt),{key:0,variant:"default",size:"icon",onClick:T[0]||(T[0]=P=>w(!1)),"aria-label":"Audio Call",class:"webphone-actions__button webphone-actions__button--call wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-[color:var(--p-primary-color)]/80 wp:to-[color:var(--p-primary-color)]/100 wp:hover:from-[color:var(--p-primary-color)]/75 wp:hover:to-[color:var(--p-primary-color)]"},{default:k(()=>[q(f(E_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),T[13]||(T[13]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):$e("",!0),m.value?(D(),U(f(nt),{key:1,variant:"outline",size:"icon",onClick:T[1]||(T[1]=P=>w(!0)),"aria-label":"Video Call",class:"webphone-actions__button webphone-actions__button--video wp:w-full wp:px-4 wp:bg-transparent wp:border wp:border-primary wp:hover:bg-[var(--p-primary-color)]/8"},{default:k(()=>[q(f(R_),{class:Ze(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",b.value])},null,8,["class"]),T[14]||(T[14]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-primary wp:text-xs wp:dark:text-white"}," Video llamada a extensiones ",-1))]),_:1})):$e("",!0)])):$e("",!0),f(r).callStatus==="incoming"?(D(),me(Le,{key:1},[f(r).activeChannel?.hasVideo?(D(),U(f(nt),{key:0,variant:"default",size:"icon",onClick:T[2]||(T[2]=P=>x(!0)),class:"webphone-actions__button webphone-actions__button--answer-video wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:bg-transparent wp:hover:bg-[var(--p-primary-color)]/10","aria-label":"Answer Video"},{default:k(()=>[q(f(m_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):$e("",!0),q(f(nt),{variant:"default",size:"icon",onClick:T[3]||(T[3]=P=>x(!1)),class:"webphone-actions__button webphone-actions__button--answer wp:animate-pulse wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-status-available wp:hover:bg-status-available/90","aria-label":"Answer"},{default:k(()=>[q(f(qh),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),q(f(nt),{variant:"destructive",size:"icon",onClick:C,"aria-label":"Reject",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--reject wp:w-12 wp:h-12 wp:rounded-full wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):$e("",!0),f(r).callStatus==="connected"?(D(),me("div",q_,[ne("div",B_,[q(f(nt),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:"webphone-actions__button webphone-actions__button--mute wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[f(r).isMuted?(D(),U(f(a_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(D(),U(f(l_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),q(f(nt),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:"webphone-actions__button webphone-actions__button--hold wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[f(r).isHeld?(D(),U(f(h_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(D(),U(f(c_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),c.value?$e("",!0):(D(),U(f(nt),{key:0,variant:"secondary",size:"icon",onClick:T[4]||(T[4]=P=>u("transfer")),"aria-label":"Transfer",class:"webphone-actions__button webphone-actions__button--transfer wp:w-12 wp:h-12 wp:rounded-full wp:bg-primary/10 wp:hover:bg-[var(--p-primary-color)]/20"},{default:k(()=>[q(f(C_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),ne("div",L_,[q(f(nt),{variant:"ghost",size:"icon",onClick:T[5]||(T[5]=P=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:k(()=>[f(r).isKeypadVisible?(D(),U(f(yc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(D(),U(f(wc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),q(f(Ci),{modelValue:f(r).keypadValue,"onUpdate:modelValue":T[6]||(T[6]=P=>f(r).keypadValue=P),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:T[7]||(T[7]=or(P=>f(r).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),ne("div",{class:Ze(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[q(hc)],10,F_),q(f(nt),{size:"icon",onClick:v,"aria-label":"Hangup",class:"webphone-actions__button webphone-actions__button--hangup wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),T[15]||(T[15]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):$e("",!0),f(r).callStatus==="calling"?(D(),me("div",V_,[ne("div",j_,[q(f(nt),{variant:"ghost",size:"icon",onClick:T[8]||(T[8]=P=>f(r).toggleKeypad()),"aria-label":f(r).isKeypadVisible?"Ocultar teclado":"Mostrar teclado",class:"webphone-actions__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"},{default:k(()=>[f(r).isKeypadVisible?(D(),U(f(yc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(D(),U(f(wc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),q(f(Ci),{modelValue:f(r).keypadValue,"onUpdate:modelValue":T[9]||(T[9]=P=>f(r).keypadValue=P),placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-actions__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-actions__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:T[10]||(T[10]=or(P=>f(r).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-actions__backspace-icon wp:w-[16px] wp:h-[16px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-500 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),ne("div",{class:Ze(["webphone-actions__keypad wp:w-full wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",f(r).isKeypadVisible?"wp:max-h-[300px] wp:opacity-100":"wp:max-h-0 wp:opacity-0"]),"data-visible":f(r).isKeypadVisible?"true":"false"},[q(hc)],10,U_),q(f(nt),{variant:"destructive",size:"lg",onClick:v,"aria-label":"Cancel",class:"webphone-actions__button webphone-actions__button--hangup webphone-actions__button--cancel wp:w-full wp:px-4 wp:border-0 wp:bg-gradient-to-r wp:from-destructive/60 wp:to-destructive/90 wp:hover:from-destructive/70 wp:hover:to-destructive/95"},{default:k(()=>[q(f(mc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),T[16]||(T[16]=ne("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):$e("",!0),c.value&&f(r).callStatus==="connected"?(D(),me("div",z_,[q(f(nt),{variant:"default",size:"sm",onClick:T[11]||(T[11]=P=>u("completeTransfer")),class:"webphone-actions__button webphone-actions__button--complete-transfer wp:gap-2 wp:bg-status-available wp:hover:bg-status-available/90 wp:text-white"},{default:k(()=>[q(f(Mh),{class:"wp:w-4 wp:h-4"}),T[17]||(T[17]=Ne(" Completar Transferencia ",-1))]),_:1}),q(f(nt),{variant:"destructive",size:"sm",onClick:T[12]||(T[12]=P=>u("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:k(()=>[q(f(vc),{class:"wp:w-4 wp:h-4"}),T[18]||(T[18]=Ne(" Cancelar ",-1))]),_:1})])):$e("",!0)],8,M_))}}),W_=K_,G_=ee({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),me("kbd",{class:Ze(f(rt)("wp:bg-muted wp:text-muted-foreground wp:pointer-events-none wp:inline-flex wp:h-5 wp:w-fit wp:min-w-5 wp:items-center wp:justify-center wp:gap-1 wp:rounded-sm wp:px-1 wp:font-sans wp:text-xs wp:font-medium wp:select-none","wp:[&_svg:not([class*='size-'])]:size-3","wp:[[data-slot=tooltip-content]_&]:bg-background/20 wp:[[data-slot=tooltip-content]_&]:text-background wp:dark:[[data-slot=tooltip-content]_&]:bg-background/10",t.class))},[ie(r.$slots,"default")],2))}}),nn=G_,J_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function Y_(e,t){return D(),me("svg",J_,[...t[0]||(t[0]=[ne("path",{stroke:"currentColor","stroke-miterlimit":"22.926","stroke-width":"1.2",d:"m12.317 2.51 15.123-.027c2.609 1.773 1.65 19.836 0 18.746l-15.124.026zM1.593 2.484h1.45V21.29h-1.45c-1.79-2.697-1.79-17.855 0-18.806ZM6.244.25h3.078a1.573 1.573 0 0 1 1.574 1.566v18.902a1.58 1.58 0 0 1-1.574 1.574H6.244a1.58 1.58 0 0 1-1.574-1.576v-18.9A1.573 1.573 0 0 1 6.244.25Z","clip-rule":"evenodd"},null,-1)])])}var _c={render:Y_},Z_=ee({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),U(f(W2),he({"data-slot":"tooltip"},f(r)),{default:k(i=>[ie(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),Zo=Z_,X_=ee({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Ut(r,"class"),n);return(i,o)=>(D(),U(f(Y2),null,{default:k(()=>[q(f(J2),he({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(rt)("wp:bg-foreground wp:text-background wp:animate-in wp:fade-in-0 wp:zoom-in-95 wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=closed]:zoom-out-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:z-50 wp:w-fit wp:rounded-md wp:px-3 wp:py-1.5 wp:text-xs wp:text-balance",r.class)}),{default:k(()=>[ie(i.$slots,"default"),q(f(j2),{class:"wp:bg-foreground wp:fill-foreground wp:z-50 wp:size-2.5 wp:translate-y-[calc(-50%_-_2px)] wp:rotate-45 wp:rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Xo=X_,Q_=ee({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const t=e;return(r,n)=>(D(),U(f(z2),fr(nr(t)),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),Qo=Q_,eS=ee({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),U(f(Z2),he({"data-slot":"tooltip-trigger"},t),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),ea=eS,tS=["data-call-status"],rS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},nS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},sS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},iS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},oS={class:"webphone-display__dialer-field wp:relative"},aS={class:"webphone-display__suggestions wp:absolute wp:bottom-full wp:left-0 wp:w-full wp:z-50 wp:bg-popover wp:text-popover-foreground wp:shadow-md wp:rounded-md wp:border wp:mb-1 wp:max-h-40 wp:overflow-y-auto"},lS=["onPointerdown"],cS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},uS={class:"webphone-display__contact-name wp:truncate"},dS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},fS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},pS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},hS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},gS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},vS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},mS={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},wS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},yS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},bS={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},_S=ee({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},isOnline:{type:Boolean,default:!0},user:{},contacts:{default:()=>[]},channelId:{default:void 0}},setup(e){const t=Ot("webphone"),r=Ot("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=j(()=>s.channelId!==void 0?t.channels.find(H=>H.id===s.channelId):t.activeChannel),o=j(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const H=i.value;return H&&H.status!=="idle"?H.isHeld||H.status==="held"?"wp:text-status-hold":H.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=V(!1),l=V(null),u=V(null);Ay(l,()=>{a.value=!1});const c=j({get:()=>i.value?.keypadValue||"",set:H=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:H})}}),d=j(()=>/^[+]?[0-9*#]+$/.test(c.value)),p=j(()=>{if(!c.value)return s.contacts.slice(0,10);const H=c.value.toLowerCase(),M=[];for(const S of s.contacts)if((S.name.toLowerCase().includes(H)||S.number.includes(H))&&(M.push(S),M.length>=10))break;return M}),h=H=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:H.number}),a.value=!1},m=()=>{!c.value||!d.value||(a.value=!1,r.makeCall(c.value))};Re(c,()=>{a.value=!0});const w=()=>{c.value&&d.value&&m()},x=()=>{a.value=!1},v=()=>{a.value=!0},C=()=>{setTimeout(()=>{a.value=!1},150)},y=V(Date.now());xy(()=>{y.value=Date.now()},1e3);const b=j(()=>{const H=i.value?.startTime,M=i.value?.status||"idle";if(!H||M!=="connected")return"00:00:00";const S=Math.floor((y.value-H)/1e3);return S<0?"00:00:00":`${Math.floor(S/3600).toString().padStart(2,"0")}:${Math.floor(S%3600/60).toString().padStart(2,"0")}:${(S%60).toString().padStart(2,"0")}`}),_=j(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const H=i.value,M=H?.status||"idle";return M==="idle"?"Disponible":M==="calling"?"Llamando...":H?.isHeld?`En espera - ${H.remoteNumber||H.keypadValue||"Unknown"}`:M==="connected"?"Conectado":M.charAt(0).toUpperCase()+M.slice(1)}),T=H=>{if(!H)return"";const M=H.trim(),S=M.startsWith("+"),E=M.replace(/[^\d]/g,"");return S?`+${E}`:E},P=j(()=>{const H=i.value,M=H?.remoteNumber||H?.keypadValue,S=H?.remoteDisplayName;if(!M)return"Unknown";const E=T(M),A=s.contacts?.find(Z=>T(Z.number)===E);return A?A.name:S||M}),g=j(()=>{const H=i.value;return H?.remoteNumber||H?.keypadValue||""});return(H,M)=>(D(),me("div",{class:"webphone-display wp:flex wp:flex-col wp:items-center wp:px-4 wp:space-y-6","data-call-status":i.value?.status||"idle"},[(i.value?.status||"idle")==="connected"?(D(),me("div",{key:0,class:Ze([o.value,"webphone-display__connected-status wp:w-full wp:flex wp:items-center wp:justify-between wp:gap-2 wp:text-3xl wp:font-light wp:mb-5"])},[ne("div",rS,[q(f(_c),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),M[3]||(M[3]=ne("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),ne("span",nS,Oe(b.value),1)],2)):$e("",!0),s.user?(D(),me("span",{key:1,class:Ze([o.value,"webphone-display__user wp:font-bold wp:text-lg wp:flex wp:items-center wp:gap-1 wp:transition-colors wp:duration-300"])},[ne("div",sS,[q(f(_c),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),Ne(" "+Oe(s.user),1)]),ne("div",{class:Ze(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Oe(_.value),3)],2)):$e("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(D(),me("div",iS,[ne("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[ne("div",oS,[q(f(Qo),null,{default:k(()=>[q(f(Zo),null,{default:k(()=>[q(f(ea),{"as-child":""},{default:k(()=>[q(f(nt),{onClick:M[0]||(M[0]=S=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:Ze(f(rt)("webphone-display__keypad-toggle wp:absolute wp:left-0.5 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:h-9 wp:w-9 wp:rounded-full wp:text-[var(--p-primary-color)] wp:hover:opacity-80"))},{default:k(()=>[f(t).isKeypadVisible?(D(),U(f(yc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(D(),U(f(wc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[ne("span",null,Oe(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),q(f(Ci),{ref_key:"inputRef",ref:u,modelValue:c.value,"onUpdate:modelValue":M[1]||(M[1]=S=>c.value=S),onFocus:v,onBlur:C,onKeydown:[ul(w,["enter"]),ul(x,["escape"])],placeholder:"Ingresa el numero a llamar...",class:"p-input webphone-display__input wp:h-10 wp:text-center wp:select-text wp:px-14 wp:text-base hover:wp:border-[var(--p-primary-color)] wp:dark:hover:bg-neutral-900 focus-visible:wp:border-[var(--p-primary-color)] focus-visible:wp:ring-2 montserrat"},null,8,["modelValue"]),ne("div",{class:"webphone-display__backspace wp:absolute wp:right-1 wp:top-1/2 wp:-translate-y-1/2 wp:z-10 wp:flex wp:h-8 wp:w-8 wp:cursor-pointer wp:items-center wp:justify-center wp:hover:bg-accent wp:rounded-full",onClick:M[2]||(M[2]=or(S=>f(t).backspaceKeypad(),["stop"]))},[q(f(bc),{class:"webphone-display__backspace-icon wp:w-[15px] wp:h-[15px] wp:text-black wp:hover:text-status-disconnected wp:dark:text-neutral-100 wp:dark:hover:text-status-disconnected wp:transition-colors"})])]),zi(ne("div",aS,[d.value?(D(),me("div",{key:0,class:"webphone-display__suggestion webphone-display__suggestion--raw wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:or(m,["prevent"])},[q(f(qh),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),ne("span",null,"Marcar "+Oe(c.value),1)],32)):$e("",!0),(D(!0),me(Le,null,rr(p.value,S=>(D(),me("div",{key:S.number,class:"webphone-display__suggestion webphone-display__suggestion--contact wp:cursor-pointer wp:hover:bg-accent wp:flex wp:items-center wp:gap-2 wp:p-2 wp:px-3 wp:text-sm",onPointerdown:or(E=>h(S),["prevent"])},[ne("div",{class:Ze(f(rt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",S.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":S.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":S.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":S.type==="tool"?"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400":"wp:bg-neutral-100 wp:text-neutral-600 wp:dark:bg-neutral-800 wp:dark:text-neutral-400"))},[S.type==="extension"?(D(),U(f(Hh),{key:0,class:"wp:w-3 wp:h-3"})):S.type==="contact"?(D(),U(f(gc),{key:1,class:"wp:w-3 wp:h-3"})):S.type==="voicemail"?(D(),U(f(Bh),{key:2,class:"wp:w-3 wp:h-3"})):S.type==="tool"?(D(),U(f(Lh),{key:3,class:"wp:w-3 wp:h-3"})):(D(),U(f(gc),{key:4,class:"wp:w-3 wp:h-3"}))],2),ne("div",cS,[ne("span",uS,Oe(S.name),1),ne("span",dS,Oe(S.number),1)])],40,lS))),128))],512),[[po,a.value&&c.value&&(p.value.length>0||d.value)]])],512)])):(i.value?.status||"idle")==="connected"?(D(),me("div",fS,[ne("div",pS,[ne("div",hS," En llamada con "+Oe(P.value),1),P.value!==g.value?(D(),me("div",gS,Oe(g.value),1)):$e("",!0)])])):(i.value?.status||"idle")!=="idle"?(D(),me("div",vS,[ne("div",mS,[ne("div",wS,[ne("div",yS,Oe(P.value),1),P.value!==g.value?(D(),me("div",bS,Oe(g.value),1)):$e("",!0)]),q(f(Qo),null,{default:k(()=>[q(f(Zo),null,{default:k(()=>[q(f(ea),{"as-child":""}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[ne("span",null,Oe(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):$e("",!0)],8,tS))}}),SS=_S,CS=ee({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),U(f(ib),he({"data-slot":"dialog"},f(r)),{default:k(i=>[ie(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),Sc=CS,xS=ee({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>(D(),U(f(xb),he({"data-slot":"dialog-overlay"},f(r),{class:f(rt)("wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:fixed wp:inset-0 wp:z-50 wp:bg-black/80",t.class)}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["class"]))}}),TS=xS,ES=ee({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Ut(r,"class"),n);return(i,o)=>(D(),U(f(Tb),null,{default:k(()=>[q(TS),q(f(Sb),he({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(rt)("wp:bg-background wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:fixed wp:top-[50%] wp:left-[50%] wp:z-50 wp:grid wp:w-full wp:max-w-[calc(100%-2rem)] wp:translate-x-[-50%] wp:translate-y-[-50%] wp:gap-4 wp:rounded-lg wp:border wp:p-6 wp:shadow-lg wp:duration-200 wp:sm:max-w-lg",r.class)}),{default:k(()=>[ie(i.$slots,"default"),e.showCloseButton?(D(),U(f(ob),{key:0,"data-slot":"dialog-close",class:"wp:ring-offset-background wp:focus:ring-ring wp:data-[state=open]:bg-accent wp:data-[state=open]:text-muted-foreground wp:absolute wp:top-4 wp:right-4 wp:rounded-xs wp:opacity-70 wp:transition-opacity wp:hover:opacity-100 wp:focus:ring-2 wp:focus:ring-offset-2 wp:focus:outline-hidden wp:disabled:pointer-events-none wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4"},{default:k(()=>[q(f(vc)),o[0]||(o[0]=ne("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):$e("",!0)]),_:3},16,["class"])]),_:3}))}}),Cc=ES,AS=ee({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),me("div",{"data-slot":"dialog-footer",class:Ze(f(rt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[ie(r.$slots,"default")],2))}}),Fh=AS,IS=ee({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(D(),me("div",{"data-slot":"dialog-header",class:Ze(f(rt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[ie(r.$slots,"default")],2))}}),xc=IS,RS=ee({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Ut(t,"class"));return(n,s)=>(D(),U(f(Eb),he({"data-slot":"dialog-title"},f(r),{class:f(rt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["class"]))}}),Tc=RS,kS=ee({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=Xr(e,t);return(n,s)=>(D(),U(f(w2),he({"data-slot":"select"},f(r)),{default:k(i=>[ie(n.$slots,"default",fr(nr(i)))]),_:3},16))}}),Vh=kS,$S=ee({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Ut(r,"class"),n);return(i,o)=>(D(),U(f(H2),null,{default:k(()=>[q(f(A2),he({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(rt)("wp:bg-popover wp:text-popover-foreground wp:data-[state=open]:animate-in wp:data-[state=closed]:animate-out wp:data-[state=closed]:fade-out-0 wp:data-[state=open]:fade-in-0 wp:data-[state=closed]:zoom-out-95 wp:data-[state=open]:zoom-in-95 wp:data-[side=bottom]:slide-in-from-top-2 wp:data-[side=left]:slide-in-from-right-2 wp:data-[side=right]:slide-in-from-left-2 wp:data-[side=top]:slide-in-from-bottom-2 wp:relative wp:z-50 wp:max-h-(--reka-select-content-available-height) wp:min-w-[8rem] wp:overflow-x-hidden wp:overflow-y-auto wp:rounded-md wp:border wp:shadow-md",e.position==="popper"&&"wp:data-[side=bottom]:translate-y-1 wp:data-[side=left]:-translate-x-1 wp:data-[side=right]:translate-x-1 wp:data-[side=top]:-translate-y-1",r.class)}),{default:k(()=>[q(f(qS)),q(f(L2),{class:Ze(f(rt)("wp:p-1",e.position==="popper"&&"wp:h-[var(--reka-select-trigger-height)] wp:w-full wp:min-w-[var(--reka-select-trigger-width)] wp:scroll-my-1"))},{default:k(()=>[ie(i.$slots,"default")]),_:3},8,["class"]),q(f(MS))]),_:3},16,["class"])]),_:3}))}}),jh=$S,PS=ee({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),U(f(R2),he({"data-slot":"select-group"},t),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),Uh=PS,DS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},OS=ee({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Ut(t,"class"));return(n,s)=>(D(),U(f(P2),he({"data-slot":"select-item"},f(r),{class:f(rt)("wp:focus:bg-accent wp:focus:text-accent-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:relative wp:flex wp:w-full wp:cursor-default wp:items-center wp:gap-2 wp:rounded-sm wp:py-1.5 wp:pr-8 wp:pl-2 wp:text-sm wp:outline-hidden wp:select-none wp:data-[disabled]:pointer-events-none wp:data-[disabled]:opacity-50 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4 wp:*:[span]:last:flex wp:*:[span]:last:items-center wp:*:[span]:last:gap-2",t.class)}),{default:k(()=>[ne("span",DS,[q(f(D2),null,{default:k(()=>[ie(n.$slots,"indicator-icon",{},()=>[q(f(Mh),{class:"wp:size-4"})])]),_:3})]),q(f(O2),null,{default:k(()=>[ie(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),zh=OS,HS=ee({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Ut(t,"class"));return(n,s)=>(D(),U(f(M2),he({"data-slot":"select-scroll-down-button"},f(r),{class:f(rt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[ie(n.$slots,"default",{},()=>[q(f(Nh),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),MS=HS,NS=ee({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zr(Ut(t,"class"));return(n,s)=>(D(),U(f(N2),he({"data-slot":"select-scroll-up-button"},f(r),{class:f(rt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[ie(n.$slots,"default",{},()=>[q(f(o_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),qS=NS,BS=ee({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},size:{default:"default"}},setup(e){const t=e,r=Zr(Ut(t,"class","size"));return(n,s)=>(D(),U(f(q2),he({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(rt)("wp:border-input wp:data-[placeholder]:text-muted-foreground wp:[&_svg:not([class*='text-'])]:text-muted-foreground wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:dark:bg-input/30 wp:dark:hover:bg-input/50 wp:flex wp:w-fit wp:items-center wp:justify-between wp:gap-2 wp:rounded-md wp:border wp:bg-transparent wp:px-3 wp:py-2 wp:text-sm wp:whitespace-nowrap wp:shadow-xs wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:disabled:cursor-not-allowed wp:disabled:opacity-50 wp:data-[size=default]:h-9 wp:data-[size=sm]:h-8 wp:*:data-[slot=select-value]:line-clamp-1 wp:*:data-[slot=select-value]:flex wp:*:data-[slot=select-value]:items-center wp:*:data-[slot=select-value]:gap-2 wp:[&_svg]:pointer-events-none wp:[&_svg]:shrink-0 wp:[&_svg:not([class*='size-'])]:size-4",t.class)}),{default:k(()=>[ie(n.$slots,"default"),q(f(k2),{"as-child":""},{default:k(()=>[q(f(Nh),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Kh=BS,LS=ee({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(D(),U(f(B2),he({"data-slot":"select-value"},t),{default:k(()=>[ie(r.$slots,"default")]),_:3},16))}}),Wh=LS,FS=ee({__name:"Slider",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},thumbAlignment:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Xr(Ut(r,"class"),n);return(i,o)=>(D(),U(f(K1),he({"data-slot":"slider",class:f(rt)("wp:relative wp:flex wp:w-full wp:touch-none wp:items-center wp:select-none wp:data-[disabled]:opacity-50 wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:min-h-44 wp:data-[orientation=vertical]:w-auto wp:data-[orientation=vertical]:flex-col",r.class)},f(s)),{default:k(({modelValue:a})=>[q(f(Y1),{"data-slot":"slider-track",class:"wp:bg-muted wp:relative wp:grow wp:overflow-hidden wp:rounded-full wp:data-[orientation=horizontal]:h-1.5 wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-1.5"},{default:k(()=>[q(f(W1),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(D(!0),me(Le,null,rr(a,(l,u)=>(D(),U(f(J1),{key:u,"data-slot":"slider-thumb",class:"wp:bg-white wp:border-primary wp:ring-ring/50 wp:block wp:size-4 wp:shrink-0 wp:rounded-full wp:border wp:shadow-sm wp:transition-[color,box-shadow] wp:hover:ring-4 wp:focus-visible:ring-4 wp:focus-visible:outline-hidden wp:disabled:pointer-events-none wp:disabled:opacity-50"}))),128))]),_:1},16,["class"]))}}),Gh=FS,VS=ee({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>(D(),U(f(Z1),he({"data-slot":"label"},f(r),{class:f(rt)("wp:flex wp:items-center wp:gap-2 wp:text-sm wp:leading-none wp:font-medium wp:select-none wp:group-data-[disabled=true]:pointer-events-none wp:group-data-[disabled=true]:opacity-50 wp:peer-disabled:cursor-not-allowed wp:peer-disabled:opacity-50",t.class)}),{default:k(()=>[ie(n.$slots,"default")]),_:3},16,["class"]))}}),ks=VS,jS=ee({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>(D(),U(f(V2),he({"data-slot":"separator"},f(r),{class:f(rt)("wp:bg-border wp:shrink-0 wp:data-[orientation=horizontal]:h-px wp:data-[orientation=horizontal]:w-full wp:data-[orientation=vertical]:h-full wp:data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),US=jS,zS={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},KS={class:"wp:flex wp:flex-col wp:gap-2"},WS={class:"wp:flex wp:flex-col wp:gap-2"},GS={class:"wp:flex wp:flex-col wp:gap-4"},JS={class:"wp:flex wp:justify-between"},YS={class:"wp:text-sm wp:text-muted-foreground"},ZS={class:"wp:flex wp:flex-col wp:gap-4"},XS={class:"wp:flex wp:justify-between"},QS={class:"wp:text-sm wp:text-muted-foreground"},eC={class:"wp:flex wp:flex-col wp:gap-3"},tC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},rC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},nC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},sC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},iC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},oC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},aC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},lC=ee({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",{setVolume:s,setOutputDevice:i,setInputDevice:o,setNotificationVolume:a}=Ot("sip"),l=V([]),u=V([]),c=Po("webphone-input-device",""),d=Po("webphone-output-device",""),p=Po("webphone-volume",100),h=Po("webphone-notification-volume",100),m=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();l.value=b.filter(P=>P.kind==="audioinput").map((P,g)=>({deviceId:P.deviceId,label:P.label||`Microphone ${g+1}`})),u.value=b.filter(P=>P.kind==="audiooutput").map((P,g)=>({deviceId:P.deviceId,label:P.label||`Speaker ${g+1}`}));const _=l.value.some(P=>P.deviceId===c.value);(!c.value||!_)&&l.value.length>0&&(c.value=l.value[0]?.deviceId??"");const T=u.value.some(P=>P.deviceId===d.value);(!d.value||!T)&&u.value.length>0&&(d.value=u.value[0]?.deviceId??""),c.value&&o(c.value),d.value&&i(d.value)}catch(b){console.error("Error loading devices",b)}},w=b=>{const _=String(b);c.value=_,o(_)},x=b=>{const _=String(b);d.value=_,i(_)},v=(b,_=35)=>b.length<=_?b:b.substring(0,_)+"...",C=j({get:()=>[p.value],set:b=>{p.value=b[0],s(p.value)}}),y=j({get:()=>[h.value],set:b=>{h.value=b[0],a(h.value)}});return We(()=>{m(),s(p.value),a(h.value)}),(b,_)=>e.visible?(D(),U(f(Sc),{key:0,open:e.visible,"onUpdate:open":_[5]||(_[5]=T=>r("update:visible",T))},{default:k(()=>[q(f(Cc),{class:"wp:sm:max-w-sm"},{default:k(()=>[q(f(xc),null,{default:k(()=>[q(f(Tc),null,{default:k(()=>[..._[6]||(_[6]=[Ne("Audio Settings",-1)])]),_:1})]),_:1}),ne("div",zS,[ne("div",KS,[q(f(ks),null,{default:k(()=>[..._[7]||(_[7]=[Ne("Microphone",-1)])]),_:1}),q(f(Vh),{modelValue:f(c),"onUpdate:modelValue":[_[0]||(_[0]=T=>Ge(c)?c.value=T:null),w]},{default:k(()=>[q(f(Kh),{class:"wp:w-full"},{default:k(()=>[q(f(Wh),{placeholder:"Select Microphone"})]),_:1}),q(f(jh),null,{default:k(()=>[q(f(Uh),null,{default:k(()=>[(D(!0),me(Le,null,rr(l.value,T=>(D(),U(f(zh),{key:T.deviceId,value:T.deviceId,title:T.label},{default:k(()=>[Ne(Oe(v(T.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",WS,[q(f(ks),null,{default:k(()=>[..._[8]||(_[8]=[Ne("Speaker",-1)])]),_:1}),q(f(Vh),{modelValue:f(d),"onUpdate:modelValue":[_[1]||(_[1]=T=>Ge(d)?d.value=T:null),x]},{default:k(()=>[q(f(Kh),{class:"wp:w-full"},{default:k(()=>[q(f(Wh),{placeholder:"Select Speaker"})]),_:1}),q(f(jh),null,{default:k(()=>[q(f(Uh),null,{default:k(()=>[(D(!0),me(Le,null,rr(u.value,T=>(D(),U(f(zh),{key:T.deviceId,value:T.deviceId,title:T.label},{default:k(()=>[Ne(Oe(v(T.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),ne("div",GS,[ne("div",JS,[q(f(ks),null,{default:k(()=>[..._[9]||(_[9]=[Ne("Media Volume",-1)])]),_:1}),ne("span",YS,Oe(f(p))+"%",1)]),q(f(Gh),{modelValue:C.value,"onUpdate:modelValue":_[2]||(_[2]=T=>C.value=T),max:100,step:1},null,8,["modelValue"])]),ne("div",ZS,[ne("div",XS,[q(f(ks),null,{default:k(()=>[..._[10]||(_[10]=[Ne("Notification Volume",-1)])]),_:1}),ne("span",QS,Oe(f(h))+"%",1)]),q(f(Gh),{modelValue:y.value,"onUpdate:modelValue":_[3]||(_[3]=T=>y.value=T),max:100,step:1},null,8,["modelValue"])]),q(f(US)),ne("div",eC,[q(f(ks),{class:"wp:text-base"},{default:k(()=>[..._[11]||(_[11]=[Ne("Atajos de teclado",-1)])]),_:1}),ne("div",tC,[ne("div",rC,[_[12]||(_[12]=ne("span",{class:"wp:text-muted-foreground"},"Historial",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"H",1)]),_:1})]),ne("div",nC,[_[13]||(_[13]=ne("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+",",1)]),_:1})]),ne("div",sC,[_[14]||(_[14]=ne("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"K",1)]),_:1})]),ne("div",iC,[_[15]||(_[15]=ne("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"1",1)]),_:1})]),ne("div",oC,[_[16]||(_[16]=ne("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"2",1)]),_:1})]),ne("div",aC,[_[17]||(_[17]=ne("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(n))+"3",1)]),_:1})])])])]),q(f(Fh),null,{default:k(()=>[q(f(nt),{variant:"secondary",onClick:_[4]||(_[4]=T=>r("update:visible",!1))},{default:k(()=>[..._[18]||(_[18]=[Ne("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):$e("",!0)}}),cC=lC,uC=ee({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>(D(),U(f(u2),he({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(rt)("wp:flex wp:touch-none wp:p-px wp:transition-colors wp:select-none",e.orientation==="vertical"&&"wp:h-full wp:w-2.5 wp:border-l wp:border-l-transparent",e.orientation==="horizontal"&&"wp:h-2.5 wp:flex-col wp:border-t wp:border-t-transparent",t.class)}),{default:k(()=>[q(f(f2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),dC=uC,fC=ee({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>(D(),U(f(Q1),he({"data-slot":"scroll-area"},f(r),{class:f(rt)("wp:relative",t.class)}),{default:k(()=>[q(f(p2),{"data-slot":"scroll-area-viewport",class:"wp:focus-visible:ring-ring/50 wp:size-full wp:rounded-[inherit] wp:transition-[color,box-shadow] wp:outline-none wp:focus-visible:ring-[3px] wp:focus-visible:outline-1"},{default:k(()=>[ie(n.$slots,"default")]),_:3}),q(dC),q(f(t2))]),_:3},16,["class"]))}}),Jh=fC,pC={class:"wp:relative wp:my-2"},hC={class:"wp:flex wp:flex-col wp:gap-2"},gC=["onClick"],vC={class:"wp:flex wp:items-center wp:gap-3"},mC={class:"wp:flex wp:flex-col"},wC={class:"wp:text-sm wp:font-medium"},yC={class:"wp:text-[10px] wp:text-muted-foreground"},bC={class:"wp:flex wp:flex-col wp:items-end"},_C={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},SC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},CC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},xC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},TC=ee({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ot("webphone"),i=V(""),o=p=>{if(!r.contacts)return p;const h=r.contacts.find(m=>m.number===p);return h?h.name:p},a=j(()=>{if(!i.value)return s.callHistory;const p=i.value.toLowerCase();return s.callHistory.filter(h=>{const m=o(h.number).toLowerCase(),w=h.number.toLowerCase();return m.includes(p)||w.includes(p)})}),l=p=>p===0?"":`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,u=p=>p.direction==="incoming"?p.status==="missed"?d_:u_:f_,c=p=>p.status==="missed"?"wp:text-red-500":p.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",d=p=>{n("update:visible",!1),n("call",p)};return(p,h)=>e.visible?(D(),U(f(Sc),{key:0,open:e.visible,"onUpdate:open":h[1]||(h[1]=m=>n("update:visible",m))},{default:k(()=>[q(f(Cc),{class:"wp:sm:max-w-sm"},{default:k(()=>[q(f(xc),null,{default:k(()=>[q(f(Tc),null,{default:k(()=>[...h[2]||(h[2]=[Ne("Call History",-1)])]),_:1})]),_:1}),ne("div",pC,[q(f(g_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),q(f(Ci),{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=m=>i.value=m),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),q(f(Jh),{class:"wp:h-[60vh] wp:pr-4"},{default:k(()=>[ne("div",hC,[(D(!0),me(Le,null,rr(a.value,m=>(D(),me("div",{key:m.id,class:"wp:flex wp:items-center wp:justify-between wp:p-2 wp:rounded-lg wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:w=>d(m.number)},[ne("div",vC,[(D(),U(Zs(u(m)),{class:Ze([c(m),"wp:w-4 wp:h-4"])},null,8,["class"])),ne("div",mC,[ne("span",wC,Oe(o(m.number)),1),ne("span",yC,Oe(new Date(m.startTime).toLocaleString()),1)])]),ne("div",bC,[m.duration>0?(D(),me("span",_C,Oe(l(m.duration)),1)):$e("",!0),ne("span",SC,Oe(m.status),1)])],8,gC))),128)),f(s).callHistory.length===0?(D(),me("div",CC," No call history ")):a.value.length===0?(D(),me("div",xC," No results found ")):$e("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):$e("",!0)}}),EC=TC,AC={class:"wp:grid wp:gap-4 wp:py-4"},IC={class:"wp:grid wp:gap-2 wp:relative"},RC={class:"wp:relative"},kC={key:0,class:"wp:absolute wp:top-full wp:left-0 wp:right-0 wp:mt-1 wp:bg-popover wp:border wp:rounded-md wp:shadow-lg wp:z-50 wp:max-h-60 wp:overflow-auto"},$C={class:"wp:p-1"},PC=["onClick"],DC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},OC={class:"wp:font-medium wp:text-sm wp:truncate"},HC={class:"wp:text-xs wp:text-muted-foreground"},MC=ee({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=V(""),i=V(!1),o=V(null);Re(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Re(s,p=>{i.value=p.length>0&&a.value.length>0});const a=j(()=>{if(!s.value)return r.contacts;const p=s.value.toLowerCase();return r.contacts.filter(h=>h.name.toLowerCase().includes(p)||h.number.includes(p))}),l=p=>{s.value=p.number,i.value=!1},u=()=>{s.value="",i.value=!1,o.value?.focus()},c=p=>{const h=s.value.trim();h&&(n("transfer",h,p),n("update:visible",!1),s.value="",i.value=!1)},d=p=>{p.key==="Enter"&&s.value.trim()?(p.preventDefault(),c("blind")):p.key==="Escape"&&(i.value=!1)};return(p,h)=>e.visible?(D(),U(f(Sc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:k(()=>[q(f(Cc),{class:"wp:sm:max-w-md"},{default:k(()=>[q(f(xc),null,{default:k(()=>[q(f(Tc),null,{default:k(()=>[...h[6]||(h[6]=[Ne("Transferir Llamada",-1)])]),_:1})]),_:1}),ne("div",AC,[ne("div",IC,[q(f(ks),{for:"transfer-input"},{default:k(()=>[...h[7]||(h[7]=[Ne("Número o Contacto",-1)])]),_:1}),ne("div",RC,[q(f(Ci),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value=m),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:d,onFocus:h[1]||(h[1]=m=>i.value=s.value.length>0&&a.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?(D(),U(f(nt),{key:0,variant:"ghost",size:"icon",class:"wp:absolute wp:right-0 wp:top-0 wp:h-full wp:w-8 wp:hover:bg-transparent",onClick:u},{default:k(()=>[q(f(vc),{class:"wp:h-4 wp:w-4"})]),_:1})):$e("",!0)]),i.value&&a.value.length>0?(D(),me("div",kC,[q(f(Jh),{class:"wp:max-h-60"},{default:k(()=>[ne("div",$C,[(D(!0),me(Le,null,rr(a.value,m=>(D(),me("div",{key:m.number,class:"wp:flex wp:items-center wp:gap-2 wp:p-2 wp:rounded-sm wp:cursor-pointer wp:hover:bg-accent wp:transition-colors",onClick:w=>l(m)},[m.type?(D(),me("div",{key:0,class:Ze(f(rt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",m.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":m.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":m.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":"wp:bg-amber-100 wp:text-amber-600 wp:dark:bg-amber-900/30 wp:dark:text-amber-400"))},[m.type==="extension"?(D(),U(f(Hh),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(D(),U(f(gc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(D(),U(f(Bh),{key:2,class:"wp:w-4 wp:h-4"})):(D(),U(f(Lh),{key:3,class:"wp:w-4 wp:h-4"}))],2)):$e("",!0),ne("div",DC,[ne("span",OC,Oe(m.name),1),ne("span",HC,Oe(m.number),1)])],8,PC))),128))])]),_:1})])):$e("",!0),h[8]||(h[8]=ne("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),q(f(Fh),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:k(()=>[q(f(nt),{variant:"secondary",onClick:h[2]||(h[2]=m=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:k(()=>[...h[9]||(h[9]=[Ne(" Cancelar ",-1)])]),_:1}),q(f(nt),{onClick:h[3]||(h[3]=m=>c("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:k(()=>[...h[10]||(h[10]=[Ne(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),q(f(nt),{onClick:h[4]||(h[4]=m=>c("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:k(()=>[...h[11]||(h[11]=[Ne(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):$e("",!0)}}),NC=MC,qC=ee({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=V(!1),o=V(!1),a=V(!1),l=V(null),u=V(0),c=V(null);let d=null,p=null;We(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",x)}),Ht(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),C(),K()});const h=()=>{const Y=n.callStatus!=="idle",ae=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&Y&&i.value&&ae&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&Q()},120))},w=()=>{m()},x=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},C=()=>{c.value&&(clearInterval(c.value),c.value=null)},y=Y=>{const ae=Math.floor(Y/60),W=Y%60;return`${ae.toString().padStart(2,"0")}:${W.toString().padStart(2,"0")}`};Re(()=>n.callStatus,(Y,ae)=>{Y==="connected"&&ae!=="connected"?v():Y==="idle"&&ae!=="idle"&&(C(),o.value&&K())},{immediate:!0}),Re(()=>n.isConnected,Y=>{!Y&&o.value&&(C(),K())}),Re(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(S(l.value.document),H(l.value.document))});const b=j(()=>i.value&&n.isConnected),_={phone:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',phoneOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" transform="rotate(135 12 12)"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',mic:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',micOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" x2="22" y1="2" y2="22"/><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"/><path d="M5 10v2a7 7 0 0 0 12 5"/><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"/><path d="M9 9v3a3 3 0 0 0 5.12 2.12"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',transfer:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>'},T=Y=>{const ae=Y.createElement("style");ae.textContent=`
77
77
  * { box-sizing: border-box; margin: 0; padding: 0; }
78
78
 
79
79
  body {
@@ -279,7 +279,7 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
279
279
  0%, 100% { opacity: 1; }
280
280
  50% { opacity: 0.7; }
281
281
  }
282
- `,Y.head.appendChild(le)},P=()=>{switch(n.callStatus){case"calling":return"Llamando...";case"incoming":return"Entrante";case"connected":return n.isHeld?"En espera":"En llamada";case"held":return"En espera";default:return""}},g=()=>{switch(n.callStatus){case"calling":return"pip-status-calling";case"incoming":return"pip-status-incoming";case"connected":return n.isHeld?"pip-status-held":"pip-status-connected";case"held":return"pip-status-held";default:return""}},M=Y=>{const le=Y.querySelector(".pip-status-text");le&&(le.textContent=P(),le.className=`pip-status-text ${g()}`)},N=Y=>{const le=Y.createElement("div");return le.className="pip-wrapper",n.hasVideo?le.innerHTML=`
282
+ `,Y.head.appendChild(ae)},P=()=>{switch(n.callStatus){case"calling":return"Llamando...";case"incoming":return"Entrante";case"connected":return n.isHeld?"En espera":"En llamada";case"held":return"En espera";default:return""}},g=()=>{switch(n.callStatus){case"calling":return"pip-status-calling";case"incoming":return"pip-status-incoming";case"connected":return n.isHeld?"pip-status-held":"pip-status-connected";case"held":return"pip-status-held";default:return""}},H=Y=>{const ae=Y.querySelector(".pip-status-text");ae&&(ae.textContent=P(),ae.className=`pip-status-text ${g()}`)},M=Y=>{const ae=Y.createElement("div");return ae.className="pip-wrapper",n.hasVideo?ae.innerHTML=`
283
283
  <div class="pip-video-area">
284
284
  <video id="pip-remote-video" autoplay playsinline></video>
285
285
  <div class="pip-local-container">
@@ -291,11 +291,11 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
291
291
  </div>
292
292
  </div>
293
293
  <div class="pip-actions" id="pip-actions"></div>
294
- `:le.innerHTML=`
294
+ `:ae.innerHTML=`
295
295
  <div class="pip-audio-area">
296
296
  <div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
297
297
  <div class="pip-status-text ${g()}">${P()}</div>
298
298
  <div class="pip-duration" id="pip-timer">${y(u.value)}</div>
299
299
  </div>
300
300
  <div class="pip-actions" id="pip-actions"></div>
301
- `,le},S=Y=>{const le=Y.getElementById("pip-actions");if(le){if(le.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const pe=Y.createElement("button");pe.className="pip-btn pip-btn-video",pe.title="Contestar con Video",pe.innerHTML=_.video,pe.onclick=()=>s("answer",!0),le.appendChild(pe)}const K=Y.createElement("button");K.className="pip-btn pip-btn-answer",K.title="Contestar",K.innerHTML=_.phone,K.onclick=()=>s("answer",!1),le.appendChild(K);const ce=Y.createElement("button");ce.className="pip-btn pip-btn-hangup",ce.title="Rechazar",ce.innerHTML=_.phoneOff,ce.onclick=()=>{s("hangup"),z()},le.appendChild(ce)}else if(n.callStatus==="connected"){const K=Y.createElement("button");K.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,K.title=n.isMuted?"Activar micrófono":"Silenciar",K.innerHTML=n.isMuted?_.micOff:_.mic,K.onclick=()=>s("toggleMute"),le.appendChild(K);const ce=Y.createElement("button");ce.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ce.title=n.isHeld?"Reanudar":"Pausar",ce.innerHTML=n.isHeld?_.play:_.pause,ce.onclick=()=>s("toggleHold"),le.appendChild(ce);const pe=Y.createElement("button");pe.className="pip-btn pip-btn-transfer",pe.title="Transferir",pe.innerHTML=_.transfer,pe.onclick=()=>s("transfer"),le.appendChild(pe);const Ce=Y.createElement("button");Ce.className="pip-btn pip-btn-hangup",Ce.title="Colgar",Ce.innerHTML=_.phoneOff,Ce.onclick=()=>{s("hangup"),z()},le.appendChild(Ce)}else if(n.callStatus==="calling"){const K=Y.createElement("button");K.className="pip-btn pip-btn-hangup",K.title="Cancelar",K.innerHTML=_.phoneOff,K.onclick=()=>{s("hangup"),z()},le.appendChild(K)}}},E=Y=>{setTimeout(()=>{const le=Y.getElementById("pip-remote-video"),K=Y.getElementById("pip-local-video");le&&n.remoteStream&&(le.srcObject=n.remoteStream,le.play().catch(()=>{})),K&&n.localStream&&(K.srcObject=n.localStream,K.play().catch(()=>{}))},50)},A=Y=>{const le=Y.getElementById("pip-timer");le&&(d=setInterval(()=>{le.textContent=y(u.value)},1e3))},Z=()=>{d&&(clearInterval(d),d=null)},ee=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const Y=n.hasVideo?340:280,le=n.hasVideo?280:200,K=await window.documentPictureInPicture.requestWindow({width:Y,height:le,preferInitialWindowPlacement:!0});l.value=K,o.value=!0,s("update:active",!0),T(K.document);const ce=N(K.document);K.document.body.appendChild(ce),n.hasVideo&&E(K.document),S(K.document),A(K.document),K.addEventListener("pagehide",()=>{Z(),o.value=!1,l.value=null,s("update:active",!1)})}catch(Y){console.error("[DocumentPip] Error:",Y)}finally{a.value=!1}}},z=()=>{Z(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:ee,close:z,toggle:()=>{o.value?z():ee()},isActive:o,isSupported:i,canUsePip:b}),(Y,le)=>oe(Y.$slots,"default")}}),BC=qC,LC=["data-mode","data-call-status","data-network-status"],FC={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},VC={class:"webphone__video-local-frame wp:absolute wp:bottom-2 wp:right-2 wp:w-24 wp:aspect-video wp:bg-neutral-800 wp:rounded wp:overflow-hidden wp:border wp:border-white/20 wp:shadow-lg"},jC={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},UC={key:0,class:"webphone__channel-switcher-wrap wp:flex wp:flex-col wp:items-center wp:justify-center wp:py-3 wp:px-4 wp:gap-2"},zC={role:"radiogroup","aria-label":"Canales",class:"webphone__channel-switcher wp:w-full wp:max-w-[330px] wp:flex wp:items-center wp:justify-between wp:gap-1"},KC={class:"wp:flex wp:gap-0.5"},WC=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],GC={class:"webphone__display wp:py-1"},JC=["data-visible"],YC={key:1,class:"webphone__offline-overlay wp:absolute wp:inset-0 wp:z-40 wp:flex wp:items-center wp:justify-center wp:bg-white/70 wp:dark:bg-neutral-900/70 wp:backdrop-blur-[1px] wp:px-6 wp:text-center"},ZC={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},XC=te({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]},position:{default:()=>({})},initialKeypadVisible:{type:Boolean,default:!0},enablePictureInPicture:{type:Boolean,default:!0},onAnswer:{},onHangup:{},onReject:{}},emits:["back","call-context","call-state","media-ready"],setup(e,{expose:t,emit:r}){const n=new Map,s=e,i=r,o=V(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=V(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=y0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Nr(u),d=Zw(u,{onCallContext:$=>i("call-context",$),onCallState:$=>i("call-state",$),onMediaReady:$=>i("media-ready",$)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Hn("webphone",c),Hn("sip",d),t({stop:d.stop}),tt(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=F(!1),v=F(!1),C=F(!1),y=F(null),b=F(null),_=F(null),T=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",P=V(()=>s.mode==="webcall"),g=F(0),M=$=>!!$&&$.getVideoTracks().length>0;Ie(()=>c.callStatus,$=>{if($==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}$!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const N=V(()=>c.channels.find($=>$.id===c.activeChannelId)??null),S=$=>{if(!$)return"";const J=$.trim(),G=J.startsWith("+"),_e=J.replace(/[^\d]/g,"");return G?`+${_e}`:_e},E=V(()=>{const $=N.value?.remoteNumber||c.remoteNumber,J=S($);return s.contacts.find(G=>S(G.number)===J)?.name||$||"Llamada"}),A=V(()=>(g.value,!!N.value?.hasVideo||M(m.value)||M(w.value))),{isOnline:Z}=qy(),ee=V(()=>!Z.value),z=F(null),Q=F(!1),Y=V(()=>s.enablePictureInPicture),le=()=>{Y.value&&z.value?.toggle()},K=async($,J)=>{try{J==="blind"?await d.transferCall($):await d.startAttendedTransfer($)}catch(G){console.error("[WebPhone] Transfer error:",G),alert(G instanceof Error?G.message:"Transfer failed. Please try again.")}},ce=async()=>{try{await d.completeAttendedTransfer()}catch($){console.error("[WebPhone] Complete transfer error:",$),alert($ instanceof Error?$.message:"Failed to complete transfer.")}},pe=async()=>{try{await d.cancelAttendedTransfer()}catch($){console.error("[WebPhone] Cancel transfer error:",$),alert($ instanceof Error?$.message:"Failed to cancel transfer.")}},Ce=$=>{c.keypadValue=$,d.makeCall($)},He=$=>{if(s.onAnswer){s.onAnswer($);return}d.answerCall($)},xe=()=>{if(s.onHangup){s.onHangup();return}d.hangupCall()},Ae=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},Je=()=>{C.value=!0,z.value?.close(),window.focus()},at=()=>{if(!Y.value)return!1;const $=c.callStatus!=="idle",J=document.hidden||!document.hasFocus();return $&&J&&!Q.value},De=()=>{window.setTimeout(()=>{at()&&z.value?.open()},150)};tt(()=>{b.value&&(Q.value||!m.value?b.value.srcObject=null:b.value.srcObject=m.value),_.value&&(Q.value||!w.value?_.value.srcObject=null:_.value.srcObject=w.value)});const ct=$=>{if(!$||typeof $.addEventListener!="function"||typeof $.removeEventListener!="function")return()=>{};const J=()=>{g.value+=1};return $.addEventListener("addtrack",J),$.addEventListener("removetrack",J),()=>{$.removeEventListener("addtrack",J),$.removeEventListener("removetrack",J)}};Ie(m,($,J,G)=>{g.value+=1,G(ct($))},{immediate:!0}),Ie(w,($,J,G)=>{g.value+=1,G(ct($))},{immediate:!0});const ht=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),et=()=>{const $=window.innerWidth<640,J=window.innerWidth<1024;let G=360;return $?G=window.innerWidth*.9:J&&(G=340),{x:Math.max(0,(window.innerWidth-G)/2),y:$?30:80}},{x:I,y:O,style:W}=Ny(y,{initialValue:V(()=>{const $=et();return{x:s.position.x??$.x,y:s.position.y??$.y}}).value,preventDefault:!0,onStart:($,J)=>{const G=J.target;if(G instanceof HTMLElement&&G.closest(ht))return!1}});Ie(()=>s.position,$=>{const J=et();I.value=$.x??J.x,O.value=$.y??J.y},{deep:!0});const ae=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],re=F(!1),se=V({get:()=>c.activeChannelId.toString(),set:async $=>{if(!ee.value&&$&&!re.value){re.value=!0;try{await h(parseInt($))}finally{re.value=!1}}}}),fe=$=>{const J=c.channels.find(G=>G.id===$);return J?J.status==="connected"||J.status==="calling"||J.status==="incoming":!1},de=$=>{const J=c.channels.find(G=>G.id===$);return J?J.isHeld||J.status==="held":!1},ue=$=>{ee.value||(se.value=$.toString())},ie=$=>{if(!ee.value&&(($.metaKey||$.ctrlKey)&&$.key.toLowerCase()==="h"&&($.preventDefault(),v.value=!0),($.metaKey||$.ctrlKey)&&$.key===","&&($.preventDefault(),x.value=!0),($.metaKey||$.ctrlKey)&&$.key.toLowerCase()==="k"&&($.preventDefault(),c.toggleKeypad()),($.metaKey||$.ctrlKey)&&["1","2","3"].includes($.key))){$.preventDefault();const J=parseInt($.key)-1;re.value||(re.value=!0,h(J).finally(()=>{re.value=!1}))}};Ie(()=>c.callStatus,()=>{at()&&De()}),Ie(()=>c.isConnected,$=>{a.value&&n.set(a.value,$)},{immediate:!0}),Ie(Y,$=>{!$&&Q.value&&z.value?.close()});const k=F(!1),B=async()=>{k.value||ee.value||!s.host||!s.extension||!s.password||(await p({uri:`sip:${s.extension}@${s.host}`,transportOptions:{server:o.value},authorizationUsername:s.extension,authorizationPassword:s.password}),d.extension.value&&(k.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},H=()=>B(),X=async()=>{await d.stop(),k.value=!1};return Hn("webphoneRegistration",{isConnected:V(()=>c.isConnected),register:H,unregister:X}),Ke(async()=>{window.addEventListener("keydown",ie),document.addEventListener("visibilitychange",De),window.addEventListener("blur",De),window.addEventListener("pagehide",De),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await B()}),Ie(()=>Z.value,async $=>{$&&await B()}),Ot(()=>{d.stop(),window.removeEventListener("keydown",ie),document.removeEventListener("visibilitychange",De),window.removeEventListener("blur",De),window.removeEventListener("pagehide",De)}),($,J)=>(D(),we(Be,null,[ne("div",{ref_key:"phoneRef",ref:y,style:gt(f(W)),class:Ze(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",ee.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":ee.value?"offline":"online"},[A.value&&!Q.value?(D(),we("div",FC,[ne("video",{ref_key:"remoteVideoRef",ref:b,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),ne("div",VC,[ne("video",{ref_key:"localVideoRef",ref:_,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):ke("",!0),ne("div",jC,[P.value?ke("",!0):(D(),we("div",UC,[ne("div",zC,[ne("div",KC,[(D(),we(Be,null,er(ae,G=>ne("button",{key:G.value,type:"button",role:"radio","aria-checked":se.value===G.value.toString(),disabled:ee.value,title:`${G.label} (${f(T)}${G.value+1})`,class:Ze(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",de(G.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":fe(G.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":se.value===G.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":G.value,"data-state":se.value===G.value.toString()?"active":"idle","data-call-state":de(G.value)?"held":fe(G.value)?"busy":"available",onClick:_e=>ue(G.value)},[q(f(_c),{class:Ze(["webphone__channel-icon wp:size-3 wp:shrink-0",de(G.value)?"wp:text-status-hold":fe(G.value)?"wp:text-[var(--color-red)]":se.value===G.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),ne("span",{class:Ze(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",de(G.value)?"wp:text-status-hold":fe(G.value)?"wp:text-[var(--color-red)]":se.value===G.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Oe(G.label),3)],10,WC)),64))]),q(f(Qo),null,{default:R(()=>[q(f(Zo),null,{default:R(()=>[q(f(ea),{"as-child":""},{default:R(()=>[q(f(st),{variant:"ghost",size:"icon",class:Ze(["wp:h-8 wp:w-8 wp:rounded-full",Q.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:le},{default:R(()=>[q(f(p_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[...J[8]||(J[8]=[ne("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),q(f(Qo),null,{default:R(()=>[q(f(Zo),null,{default:R(()=>[q(f(ea),{"as-child":""},{default:R(()=>[q(f(st),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:J[0]||(J[0]=G=>x.value=!0)},{default:R(()=>[q(f(v_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:R(()=>[J[9]||(J[9]=ne("span",null,"Configuración",-1)),q(f(nn),null,{default:R(()=>[Me(Oe(f(T))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),ne("div",GC,[(D(!0),we(Be,null,er(c.channels,G=>zi((D(),j(SS,{key:G.id,"channel-id":G.id,"allow-input":!P.value,"is-web-call":P.value,"is-online":f(Z),contacts:s.contacts,user:s.extension},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user"])),[[po,G.id===c.activeChannelId]])),128))]),ne("div",{class:Ze(["webphone__keypad wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",c.isKeypadVisible&&c.callStatus==="idle"?"wp:max-h-[300px] wp:opacity-100 wp:pb-0":"wp:max-h-0 wp:opacity-0 wp:pb-0"]),"data-visible":c.isKeypadVisible&&c.callStatus==="idle"?"true":"false"},[q(hc)],10,JC),q(W_,{class:"webphone__actions",style:gt(ee.value?"pointer-events: none;":void 0),destination:P.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:J[1]||(J[1]=G=>C.value=!0),onCompleteTransfer:ce,onCancelTransfer:pe},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),ee.value?(D(),we("div",YC,[...J[10]||(J[10]=[ne("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):ke("",!0),P.value?(D(),we("div",ZC,[...J[11]||(J[11]=[ne("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),ne("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[ne("a",{href:"https://www.nebula123.com",target:"_blank",class:"webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):ke("",!0)],14,LC),q(cC,{visible:x.value,"onUpdate:visible":J[2]||(J[2]=G=>x.value=G)},null,8,["visible"]),q(EC,{visible:v.value,"onUpdate:visible":J[3]||(J[3]=G=>v.value=G),contacts:s.contacts,onCall:Ce},null,8,["visible","contacts"]),q(NC,{visible:C.value,"onUpdate:visible":J[4]||(J[4]=G=>C.value=G),contacts:s.contacts,onTransfer:K},null,8,["visible","contacts"]),q(BC,{ref_key:"documentPipRef",ref:z,active:Q.value,"onUpdate:active":J[5]||(J[5]=G=>Q.value=G),"auto-open-on-blur":Y.value,"is-connected":c.isConnected,"remote-number":c.remoteNumber,"caller-name":E.value,"has-video":A.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:P.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:Je,onTransferRequest:K,onHangup:xe,onReject:Ae,onAnswer:He,onToggleMute:J[6]||(J[6]=G=>f(d).toggleMute()),onToggleHold:J[7]||(J[7]=G=>f(d).toggleHold())},null,8,["active","auto-open-on-blur","is-connected","remote-number","caller-name","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),QC=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},ex=QC(XC,[["__scopeId","data-v-e843f7cf"]]),tx=al({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]},initialKeypadVisible:{type:[Boolean,String],default:!0},enablePictureInPicture:{type:Boolean,default:!0},onAnswer:Function,onHangup:Function,onReject:Function},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return rr(ex,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false")})}}},{shadowRoot:!1});customElements.define("web-phone",tx)})();
301
+ `,ae},S=Y=>{const ae=Y.getElementById("pip-actions");if(ae){if(ae.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const fe=Y.createElement("button");fe.className="pip-btn pip-btn-video",fe.title="Contestar con Video",fe.innerHTML=_.video,fe.onclick=()=>s("answer",!0),ae.appendChild(fe)}const W=Y.createElement("button");W.className="pip-btn pip-btn-answer",W.title="Contestar",W.innerHTML=_.phone,W.onclick=()=>s("answer",!1),ae.appendChild(W);const le=Y.createElement("button");le.className="pip-btn pip-btn-hangup",le.title="Rechazar",le.innerHTML=_.phoneOff,le.onclick=()=>{s("hangup"),K()},ae.appendChild(le)}else if(n.callStatus==="connected"){const W=Y.createElement("button");W.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,W.title=n.isMuted?"Activar micrófono":"Silenciar",W.innerHTML=n.isMuted?_.micOff:_.mic,W.onclick=()=>s("toggleMute"),ae.appendChild(W);const le=Y.createElement("button");le.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,le.title=n.isHeld?"Reanudar":"Pausar",le.innerHTML=n.isHeld?_.play:_.pause,le.onclick=()=>s("toggleHold"),ae.appendChild(le);const fe=Y.createElement("button");fe.className="pip-btn pip-btn-transfer",fe.title="Transferir",fe.innerHTML=_.transfer,fe.onclick=()=>s("transfer"),ae.appendChild(fe);const Ce=Y.createElement("button");Ce.className="pip-btn pip-btn-hangup",Ce.title="Colgar",Ce.innerHTML=_.phoneOff,Ce.onclick=()=>{s("hangup"),K()},ae.appendChild(Ce)}else if(n.callStatus==="calling"){const W=Y.createElement("button");W.className="pip-btn pip-btn-hangup",W.title="Cancelar",W.innerHTML=_.phoneOff,W.onclick=()=>{s("hangup"),K()},ae.appendChild(W)}}},E=Y=>{setTimeout(()=>{const ae=Y.getElementById("pip-remote-video"),W=Y.getElementById("pip-local-video");ae&&n.remoteStream&&(ae.srcObject=n.remoteStream,ae.play().catch(()=>{})),W&&n.localStream&&(W.srcObject=n.localStream,W.play().catch(()=>{}))},50)},A=Y=>{const ae=Y.getElementById("pip-timer");ae&&(d=setInterval(()=>{ae.textContent=y(u.value)},1e3))},Z=()=>{d&&(clearInterval(d),d=null)},Q=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const Y=n.hasVideo?340:280,ae=n.hasVideo?280:200,W=await window.documentPictureInPicture.requestWindow({width:Y,height:ae,preferInitialWindowPlacement:!0});l.value=W,o.value=!0,s("update:active",!0),T(W.document);const le=M(W.document);W.document.body.appendChild(le),n.hasVideo&&E(W.document),S(W.document),A(W.document),W.addEventListener("pagehide",()=>{Z(),o.value=!1,l.value=null,s("update:active",!1)})}catch(Y){console.error("[DocumentPip] Error:",Y)}finally{a.value=!1}}},K=()=>{Z(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:Q,close:K,toggle:()=>{o.value?K():Q()},isActive:o,isSupported:i,canUsePip:b}),(Y,ae)=>ie(Y.$slots,"default")}}),BC=qC,LC=["data-mode","data-call-status","data-network-status"],FC={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},VC={class:"webphone__video-local-frame wp:absolute wp:bottom-2 wp:right-2 wp:w-24 wp:aspect-video wp:bg-neutral-800 wp:rounded wp:overflow-hidden wp:border wp:border-white/20 wp:shadow-lg"},jC={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},UC={key:0,class:"webphone__channel-switcher-wrap wp:flex wp:flex-col wp:items-center wp:justify-center wp:py-3 wp:px-4 wp:gap-2"},zC={role:"radiogroup","aria-label":"Canales",class:"webphone__channel-switcher wp:w-full wp:max-w-[330px] wp:flex wp:items-center wp:justify-between wp:gap-1"},KC={class:"wp:flex wp:gap-0.5"},WC=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],GC={class:"webphone__display wp:py-1"},JC=["data-visible"],YC={key:1,class:"webphone__offline-overlay wp:absolute wp:inset-0 wp:z-40 wp:flex wp:items-center wp:justify-center wp:bg-white/70 wp:dark:bg-neutral-900/70 wp:backdrop-blur-[1px] wp:px-6 wp:text-center"},ZC={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},XC=ee({__name:"WebPhone",props:{host:{},wsUrl:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]},position:{default:()=>({})},initialKeypadVisible:{type:Boolean,default:!0},enablePictureInPicture:{type:Boolean,default:!0},onAnswer:{},onHangup:{},onReject:{}},emits:["back","call-context","call-state","media-ready"],setup(e,{expose:t,emit:r}){const n=new Map,s=e,i=r,o=j(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=j(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=y0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Nr(u),d=Zw(u,{onCallContext:$=>i("call-context",$),onCallState:$=>i("call-state",$),onMediaReady:$=>i("media-ready",$)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Mn("webphone",c),Mn("sip",d),t({stop:d.stop}),et(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=V(!1),v=V(!1),C=V(!1),y=V(null),b=V(null),_=V(null),T=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",P=j(()=>s.mode==="webcall"),g=V(0),H=$=>!!$&&$.getVideoTracks().length>0;Re(()=>c.callStatus,$=>{if($==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}$!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const M=j(()=>c.channels.find($=>$.id===c.activeChannelId)??null),S=$=>{if(!$)return"";const L=$.trim(),J=L.startsWith("+"),ye=L.replace(/[^\d]/g,"");return J?`+${ye}`:ye},E=j(()=>{const $=M.value?.remoteNumber||c.remoteNumber,L=S($);return s.contacts.find(J=>S(J.number)===L)?.name||$||"Llamada"}),A=j(()=>(g.value,!!M.value?.hasVideo||H(m.value)||H(w.value))),{isOnline:Z}=qy(),Q=j(()=>!Z.value),K=V(null),X=V(!1),Y=j(()=>s.enablePictureInPicture),ae=()=>{Y.value&&K.value?.toggle()},W=async($,L)=>{try{L==="blind"?await d.transferCall($):await d.startAttendedTransfer($)}catch(J){console.error("[WebPhone] Transfer error:",J),alert(J instanceof Error?J.message:"Transfer failed. Please try again.")}},le=async()=>{try{await d.completeAttendedTransfer()}catch($){console.error("[WebPhone] Complete transfer error:",$),alert($ instanceof Error?$.message:"Failed to complete transfer.")}},fe=async()=>{try{await d.cancelAttendedTransfer()}catch($){console.error("[WebPhone] Cancel transfer error:",$),alert($ instanceof Error?$.message:"Failed to cancel transfer.")}},Ce=$=>{c.keypadValue=$,d.makeCall($)},He=$=>{if(s.onAnswer){s.onAnswer($);return}d.answerCall($)},Te=()=>{if(s.onHangup){s.onHangup();return}d.hangupCall()},Ie=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},Ye=()=>{C.value=!0,K.value?.close(),window.focus()},at=()=>{if(!Y.value)return!1;const $=c.callStatus!=="idle",L=document.hidden||!document.hasFocus();return $&&L&&!X.value},Pe=()=>{window.setTimeout(()=>{at()&&K.value?.open()},150)};et(()=>{b.value&&(X.value||!m.value?b.value.srcObject=null:b.value.srcObject=m.value),_.value&&(X.value||!w.value?_.value.srcObject=null:_.value.srcObject=w.value)});const lt=$=>{if(!$||typeof $.addEventListener!="function"||typeof $.removeEventListener!="function")return()=>{};const L=()=>{g.value+=1};return $.addEventListener("addtrack",L),$.addEventListener("removetrack",L),()=>{$.removeEventListener("addtrack",L),$.removeEventListener("removetrack",L)}};Re(m,($,L,J)=>{g.value+=1,J(lt($))},{immediate:!0}),Re(w,($,L,J)=>{g.value+=1,J(lt($))},{immediate:!0});const gt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),ut=()=>{const $=window.innerWidth<640,L=window.innerWidth<1024;let J=360;return $?J=window.innerWidth*.9:L&&(J=340),{x:Math.max(0,(window.innerWidth-J)/2),y:$?30:80}},{x:I,y:O,style:G}=Ny(y,{initialValue:j(()=>{const $=ut();return{x:s.position.x??$.x,y:s.position.y??$.y}}).value,preventDefault:!0,onStart:($,L)=>{const J=L.target;if(J instanceof HTMLElement&&J.closest(gt))return!1}});Re(()=>s.position,$=>{const L=ut();I.value=$.x??L.x,O.value=$.y??L.y},{deep:!0});const oe=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],te=V(!1),se=j({get:()=>c.activeChannelId.toString(),set:async $=>{if(!Q.value&&$&&!te.value){te.value=!0;try{await h(parseInt($))}finally{te.value=!1}}}}),de=$=>{const L=c.channels.find(J=>J.id===$);return L?L.status==="connected"||L.status==="calling"||L.status==="incoming":!1},ue=$=>{const L=c.channels.find(J=>J.id===$);return L?L.isHeld||L.status==="held":!1},ce=$=>{Q.value||(se.value=$.toString())},re=$=>{if(!Q.value&&(($.metaKey||$.ctrlKey)&&$.key.toLowerCase()==="h"&&($.preventDefault(),v.value=!0),($.metaKey||$.ctrlKey)&&$.key===","&&($.preventDefault(),x.value=!0),($.metaKey||$.ctrlKey)&&$.key.toLowerCase()==="k"&&($.preventDefault(),c.toggleKeypad()),($.metaKey||$.ctrlKey)&&["1","2","3"].includes($.key))){$.preventDefault();const L=parseInt($.key)-1;te.value||(te.value=!0,h(L).finally(()=>{te.value=!1}))}};Re(()=>c.callStatus,()=>{at()&&Pe()}),Re(()=>c.isConnected,$=>{a.value&&n.set(a.value,$)},{immediate:!0}),Re(Y,$=>{!$&&X.value&&K.value?.close()});const _e=V(!1),R=async()=>{_e.value||Q.value||!s.host||!s.extension||!s.password||(await p({uri:`sip:${s.extension}@${s.host}`,transportOptions:{server:o.value},authorizationUsername:s.extension,authorizationPassword:s.password}),d.extension.value&&(_e.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},B=()=>R(),N=async()=>{await d.stop(),_e.value=!1};return Mn("webphoneRegistration",{isConnected:j(()=>c.isConnected),register:B,unregister:N}),We(async()=>{window.addEventListener("keydown",re),document.addEventListener("visibilitychange",Pe),window.addEventListener("blur",Pe),window.addEventListener("pagehide",Pe),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await R()}),Re(()=>Z.value,async $=>{$&&await R()}),Ht(()=>{d.stop(),window.removeEventListener("keydown",re),document.removeEventListener("visibilitychange",Pe),window.removeEventListener("blur",Pe),window.removeEventListener("pagehide",Pe)}),($,L)=>(D(),me(Le,null,[ne("div",{ref_key:"phoneRef",ref:y,style:vt(f(G)),class:Ze(["webphone webphone-container wp:bg-white wp:dark:bg-neutral-800 wp:rounded-lg wp:shadow-sm wp:inset-shadow-2xs wp:w-[min(92vw,330px)] wp:fixed wp:z-50 wp:select-none wp:[&_button]:cursor-pointer wp:**:[[role=button]]:cursor-pointer",Q.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":Q.value?"offline":"online"},[A.value&&!X.value?(D(),me("div",FC,[ne("video",{ref_key:"remoteVideoRef",ref:b,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),ne("div",VC,[ne("video",{ref_key:"localVideoRef",ref:_,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):$e("",!0),ne("div",jC,[P.value?$e("",!0):(D(),me("div",UC,[ne("div",zC,[ne("div",KC,[(D(),me(Le,null,rr(oe,J=>ne("button",{key:J.value,type:"button",role:"radio","aria-checked":se.value===J.value.toString(),disabled:Q.value,title:`${J.label} (${f(T)}${J.value+1})`,class:Ze(["webphone__channel-button wp:flex wp:items-center wp:gap-1 wp:px-2 wp:py-2 wp:rounded-lg wp:transition-colors wp:duration-200 wp:outline-none wp:focus-visible:ring-2 wp:focus-visible:ring-[var(--p-primary-color)] wp:focus-visible:ring-offset-2 wp:focus-visible:ring-offset-white wp:dark:focus-visible:ring-offset-neutral-900",ue(J.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":de(J.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":se.value===J.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":J.value,"data-state":se.value===J.value.toString()?"active":"idle","data-call-state":ue(J.value)?"held":de(J.value)?"busy":"available",onClick:ye=>ce(J.value)},[q(f(_c),{class:Ze(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(J.value)?"wp:text-status-hold":de(J.value)?"wp:text-[var(--color-red)]":se.value===J.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),ne("span",{class:Ze(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(J.value)?"wp:text-status-hold":de(J.value)?"wp:text-[var(--color-red)]":se.value===J.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Oe(J.label),3)],10,WC)),64))]),q(f(Qo),null,{default:k(()=>[q(f(Zo),null,{default:k(()=>[q(f(ea),{"as-child":""},{default:k(()=>[q(f(nt),{variant:"ghost",size:"icon",class:Ze(["wp:h-8 wp:w-8 wp:rounded-full",X.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:ae},{default:k(()=>[q(f(p_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[...L[8]||(L[8]=[ne("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),q(f(Qo),null,{default:k(()=>[q(f(Zo),null,{default:k(()=>[q(f(ea),{"as-child":""},{default:k(()=>[q(f(nt),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:L[0]||(L[0]=J=>x.value=!0)},{default:k(()=>[q(f(v_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),q(f(Xo),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[L[9]||(L[9]=ne("span",null,"Configuración",-1)),q(f(nn),null,{default:k(()=>[Ne(Oe(f(T))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),ne("div",GC,[(D(!0),me(Le,null,rr(c.channels,J=>zi((D(),U(SS,{key:J.id,"channel-id":J.id,"allow-input":!P.value,"is-web-call":P.value,"is-online":f(Z),contacts:s.contacts,user:s.extension},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user"])),[[po,J.id===c.activeChannelId]])),128))]),ne("div",{class:Ze(["webphone__keypad wp:transition-all wp:duration-300 wp:ease-in-out wp:overflow-hidden",c.isKeypadVisible&&c.callStatus==="idle"?"wp:max-h-[300px] wp:opacity-100 wp:pb-0":"wp:max-h-0 wp:opacity-0 wp:pb-0"]),"data-visible":c.isKeypadVisible&&c.callStatus==="idle"?"true":"false"},[q(hc)],10,JC),q(W_,{class:"webphone__actions",style:vt(Q.value?"pointer-events: none;":void 0),destination:P.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:L[1]||(L[1]=J=>C.value=!0),onCompleteTransfer:le,onCancelTransfer:fe},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),Q.value?(D(),me("div",YC,[...L[10]||(L[10]=[ne("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):$e("",!0),P.value?(D(),me("div",ZC,[...L[11]||(L[11]=[ne("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),ne("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[ne("a",{href:"https://www.nebula123.com",target:"_blank",class:"webphone__footer-link wp:text-[10px] wp:text-primary wp:hover:underline"}," www.nebula123.com ")],-1)])])):$e("",!0)],14,LC),q(cC,{visible:x.value,"onUpdate:visible":L[2]||(L[2]=J=>x.value=J)},null,8,["visible"]),q(EC,{visible:v.value,"onUpdate:visible":L[3]||(L[3]=J=>v.value=J),contacts:s.contacts,onCall:Ce},null,8,["visible","contacts"]),q(NC,{visible:C.value,"onUpdate:visible":L[4]||(L[4]=J=>C.value=J),contacts:s.contacts,onTransfer:W},null,8,["visible","contacts"]),q(BC,{ref_key:"documentPipRef",ref:K,active:X.value,"onUpdate:active":L[5]||(L[5]=J=>X.value=J),"auto-open-on-blur":Y.value,"is-connected":c.isConnected,"remote-number":c.remoteNumber,"caller-name":E.value,"has-video":A.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:P.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:Ye,onTransferRequest:W,onHangup:Te,onReject:Ie,onAnswer:He,onToggleMute:L[6]||(L[6]=J=>f(d).toggleMute()),onToggleHold:L[7]||(L[7]=J=>f(d).toggleHold())},null,8,["active","auto-open-on-blur","is-connected","remote-number","caller-name","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),QC=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},ex=QC(XC,[["__scopeId","data-v-e843f7cf"]]),tx=al({props:{host:String,wsUrl:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]},initialKeypadVisible:{type:[Boolean,String],default:!0},enablePictureInPicture:{type:Boolean,default:!0},onAnswer:Function,onHangup:Function,onReject:Function},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return sr(ex,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false")})}}},{shadowRoot:!1});customElements.define("web-phone",tx)})();